We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello I'm working on stm32f10x but some times it hangs or jumps to unknown location or I missed my Ethernet connection abruptly. I want to know how can do full debug with keil and JTAG (I use J-link programmer and debugger)? for example I need to know 1)which function and line was the last function or line before MCu got hang? 2)how can debug network interface socket?(I have read www.keil.com/.../network_create_app.html but I can't understand how to debug)
1) If Cortex-M is faulting, then you can use Application Note 209: http://www.keil.com/appnotes/files/apnt209.pdf to find the line or at least the area (within a few lines) where the fault occurs. The call stack & locals window can also be helpful, here.
2) Go to Manage RTE window => Compiler => IO. The project stills need to retarget printf to get network debugging messages (these use a form of printf, for now). There is documentation on multiple ways to direct this output in the side link "Retarget Input/Output". I recommend using ITM, but this requires JLINK to perform a trace. The documentation for trace setup is here: http://www.keil.com/support/man/docs/jlink/jlink_stm32f10xxx.htm