AnsweredAssumed Answered

ADuC7026 IAP boot-loader JTAG debug run-to-main problem.

Question asked by Circuitcode on Jun 6, 2011
Latest reply on Jun 8, 2011 by MMA

When debugging the ADuC7026 demonstration board with the RDI, JTAG, emulator in the IAR program development environment (supplied with development system) the final project link is dictated by the ADIFlash.xcl text script file which normally describes the FLASH START and END addresses for the linked code as follows:

 

-DROMSTART = 080000

-DROMEND = 08F7FF

 

An IN-APPLICATION-PROGRAM boot-loader is going to have ADIFlash.xcl START and END addresses that are smaller than the ADIFlash.xcl START and END addresses for follow-on application programs.

 

As an experiment, we took an existing example project, "MultInterrupt", from the "IAR Code Examples" demonstration software folder and changed its ...........IAR Code Examples\Required Files folder file, ADIFlash.xcl, to reflect a -DROMSTART = 080100.

 

As soon as we did that we could no longer get the JTAG, RDI debugger to run to main() and STOP. If we power cycle after the unsuccessful debug session, MultInterrupt is running correctly - so it loaded OK - it just was not in address-sync with the RDI hardware Debugger when we initially loaded it with the debugger icon.

 

After we power cycle the demonstartion board we may get the JTAG, RDI debugger to run to main() and STOP - but only maybe. When we look at the loaded memory addresses (when run to main() and STOP works) they all look good and MultInterrupt works. When the JTAG debugger does not run to main() and STOP, if we click on the RED STOP DEBUG HAND, the process stops and we can set and hit breakpoints in the ISR's and we can set breakpoints in the background code but the background breakpoints are never hit at runtime even though the contents of the loaded background addresses look correct.

 

After reading the last entry to the Forum regarding JTAG debugging problems we are going to try the ARMWSD.exe mass erase of the Flash before our next DBUG session and see if that clears up our problem - if it does not - does anyone have any other ideas as to what we have overlooked or what the problem is.

 

Our IAP boot-loader with a -DROMSTART = 080040 and -DROMEND = 0817FF - does the same thing with the JTAG debugger - it does not run to main() and STOP and I am therefor concerned that it reflects an oversight on our part and am reluctent to release it to the field.

 

Attached are three files, the original ADIFlash.xcl, the MultInterrupt Test ADIFlash.xcl, and the IAP loader ADIFlash.xcl.

 

Except for the original ADIFlash.xcl all of the above IAR XCL files have been modified to insure that the FLASH IRQ vector tables get moved from FLASH to SRAM at run time. That is why we thought it was safe to change the original JTAG FLASH START address from 080000 to 08xxxx.

Outcomes