I'm on Day 2 here so still got a lot to learn
I'm using InitializeNetworkGDB_and_Wait();
Is that what is recommended?
Breakpoints in UserMain
Re: Breakpoints in UserMain
Yes, most of the time. The "no wait" version will just let your code run freely until you stop it.
Re: Breakpoints in UserMain
You might also find it beneficial during development to put in long delays after the call to AutoUpdate. That way if you decide to run code you haven't unit tested (subtle hint) and it crashes the system you have a better chance of being able to do an update over Ethernet instead of having to drop back to MTTY and the serial loader.
Re: Breakpoints in UserMain
Great idea. I've also used a getchar() so it blocks until I hit a key, that way I can update if I need to if my code is crashing right away.
Re: Breakpoints in UserMain
>I've also used a getchar() so it blocks until I hit a key, that way I can update if I need to if my code is crashing right away.
I use that all the time. Whenever I'm developing something crashy this is the first thing that goes in the code.
I use that all the time. Whenever I'm developing something crashy this is the first thing that goes in the code.
Re: Breakpoints in UserMain
NOW I have that case where I need it to break at the top of UserMain()! I'm implementing Auto-IP and want to set some breakpoints to debug, but obviously can't as my code is at the very top of UserMain at the GetDHCPAddress() call.
Oh well, I can get around it...just being able to break at the top when it loads would be nice tho!
Scott
Oh well, I can get around it...just being able to break at the top when it loads would be nice tho!
Scott
Re: Breakpoints in UserMain
You can work around that.
The network debugger has the ability to set it to a different static IP address than the configed address.
See the definitions in
#include <networkDebug.h>
You want to define/use two macros.. above user main.
DebugIP(AsciiToIp("10.1.1.123")); //Change to the desired IP
DebugNormalArp();
This will give the debuger a fixed, but differnt IP address.
It will also have the normal ARP code process ARP requests rahter than having them shortcircuited in the debuger.
The network debugger has the ability to set it to a different static IP address than the configed address.
See the definitions in
#include <networkDebug.h>
You want to define/use two macros.. above user main.
DebugIP(AsciiToIp("10.1.1.123")); //Change to the desired IP
DebugNormalArp();
This will give the debuger a fixed, but differnt IP address.
It will also have the normal ARP code process ARP requests rahter than having them shortcircuited in the debuger.