DEV_TARGET_CMD_ERR

Comments

12 comments

  • Avatar
    Michael Johnson

    Can you attach the project and I'll see if I can reproduce the problem.

    0
    Comment actions Permalink
  • Avatar
    stevek80

    Hey, thanks for the awesome offer!
    It took a while, I cleaned everything up, removed distracting junk & put dependencies with in there & made sure it compiled on another computer...
    Now that a lot of stuff is removed, the error seems to come up way less often. But everything I removed was inactive before (calls commented out).

    While I managed to get the error within 30 mins of debugging this now, 30 mins after that I didn't, so since you're probably not so inclined to play with it for hours, I'll try to find out what made it occur more often.

    0
    Comment actions Permalink
  • Avatar
    Michael Johnson

    My guess is that the debugger is asking the st-link to show memory that it reckons shouldn't be accessed. There's a target property "Restrict Memory Accesses" which will cause any debugger accesses to memory locations that aren't in the memory map file to be ignored - try setting this to "Yes".

    0
    Comment actions Permalink
  • Avatar
    stevek80

    I'll try that, thanks!

    0
    Comment actions Permalink
  • Avatar
    stevek80

    So, after I set this to "yes", I haven't had this error again with CrossWorks version 2.2, while debugging quite a bit yesterday.
    This "Restrict Memory Accesses" things seems to have done the trick for ver. 2.2, but in ver 2.1 this caused the app to freeze quite often, "whitening" the app window & content, so I had to forcefully terminate it. I guess that's something that was fixed then between the versions ^^

    0
    Comment actions Permalink
  • Avatar
    Gavin Tait

    Hi,

     

    I have just seen this error too. So far, I have not had any luck cleaning up the project/solution such that the error disappears.

     

    Any pointers would be greatly appreciated

     

     

    Cheers

     

    0
    Comment actions Permalink
  • Avatar
    Gavin Tait

    Hi again,

     

    I have just rebuilt my project from scratch and this problem still exists. I cannot connect to the STM32-Discovery via the ST-Link/V2 without the error 'DEV_TARGET_CMD_ERR'. I was able to previously and had been programming the device without issue.

     

    I am using CW 2.2 on the Mac.

     

    Please advise how this error can be removed. I am currently evaluating this tool and this issue has not provided me with the best start to this environment.

     

    Thanks in advance

     

    Gavin

    0
    Comment actions Permalink
  • Avatar
    Michael Johnson

    Did you set the target interface type to be SWD rather than JTAG - you'll need to unplug before trying to reconnect.

    0
    Comment actions Permalink
  • Avatar
    Gavin Tait

    Hi Michael,

     

    Thanks for your quick reply. Yeh, I did that, which I had to do in my previous working projects.

     

    Interestingly, I have just replaced the STM32-Discovery with another STM32-Discovery. The Link now works fine. When I drop the original device in, the link fails again.

     

    I guess that kind of suggests that the issue is on the board? Or, is there anything embedded in CW which holds info about previous connections ... something that could have been corrupted?

     

    Any thoughts?

     

     

    Thanks again

    0
    Comment actions Permalink
  • Avatar
    Michael Johnson

    Hi Gavin,

    Could be that a bad program is in the original board. STM32 has a story that the debug connection can be done with SRST asserted - but it's not supported in CrossWorks. Try using the ST-Link software to connect it may have support for this.

    Regards

    Michael

    0
    Comment actions Permalink
  • Avatar
    Gavin Tait

    HI Michael,

     

    Thanks for the info. I have just done a hard reset on the device in question and I can now talk to it again. Back in business.

     

    I guess it could have been a bad program, which I downloaded but dont understand how a change in my 'main.c' c-code for example could have upset the ST-Link/V2.

     

    Regards

    0
    Comment actions Permalink
  • Avatar
    Michael Johnson

    Going into a low power mode may turn off the debug port. This was always a problem area on ARM7/ARM9 but I haven't tried it on CM3. I'll put it on the todo list.

    0
    Comment actions Permalink

Please sign in to leave a comment.