Hi John
I am not sure whether you mean it traps when working with the debugger or when the board is left running.
If the project works when just run and traps only when using the debugger it is very probably due to the watchdog. It is not possible to debug with the BDM when the watchdog is active - there are some simple work arounds:
1. Compile the project with disabled watchdog (not advisable)
change #define CONFIGURE_WATCHDOG ACTIVE_WATCHDOG_2_SEC
to #define CONFIGURE_WATCHDOG WATCHDOG_DISABLED [in app_hw_m5223x.h]
2. Set a break point at the line
if (!WATCHDOG_DISABLE()) { in m5223x.c and then force the PC to take the branch CWCR = WATCHDOG_DISABLED;
This actually works well and is not that much work.
3. Connect the input IRQ4 with GND - this causes the code not to enable the watchdog
This is the preferred solution since it is easy to use on an eval board and there is no risk of forgetting to reactivate the watchdog later on the real board.
This is discussed in the uTasker tutorial for the M5223x (
http://www.utasker.com/docs/M5223X/uTaskerV1.3-Tutorial-M5223X_003.PDF) on page 14/34.
If it is a problem that has nothing to do with the watchdog please tell me which board you are testing on and send me the SREC to that I can look at it here. I haven't used the newer Codesourcery version so can't exclude a new problem with it.
Regards
Mark
PS. The standard full build is the easiest way to start - it will generate a working project with all basic features enabled. The boot loader project is presently only available as a CodeWarrior project - to use it with GCC will require a GCC project set up. This is not a big job in itself but the project doesn't exist at the moment.
Tonight I in fact tested new boot loader features ready for a release of the SP5, which includes additional boot loader support using an external SPI FLASH and encrypted upload. The release may just be finalised tonight...