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.
I am trying to get any of the bundled NXP examples to work on the EA LPC2478 board. These examples are supposed to work on several boards including the EA.
These Keil projects have default devices of '2368 or '2378, and if I leave the projects unchanged, I can compile and in some cases download to RAM for debug. If I try to select the correct device (2478), I get 'entry point in non-root region' which is confusing since all these devices are very similar, and I do not see any incorrect memory definitions.
The examples are not well documented, so the following info may help.
Many of the distributed NXP examples for the 23xx-24xx will compile and run under the debugger provided you don't change any settings. The timer example is one. If you want to change settings or re-create any example from scratch specifically for the EA 2478 board, you need to know a few things.
The following assumes the NXP examples were extracted as is with the same folder tree. Some examples default to the MCB2300 board with a LPC2368 or LPC2468. This won't make a difference for some examples, but it will for others.
Make the change in target.h for the EA board. You only need to do this once.
The LPC23xx.h file provided with the examples is old. Copy the version under Keil->ARM->INC->Philips.
Open the timer example and change the device in project settings to LPC2478, but first note the target tab addresses. The examples are setup to debug from RAM, so if you change the device the target memory definitions will not be correct for RAM debug and you will get 'entry point at non-root location'. The fix is to change the target address entries to match those in the original example.
The modified project should compile & run in the debugger.
A useful exercise is to re-create this working example from scratch to help you discover all the other hidden settings. Open two separate uVision instances so you can easily compare settings in the old working example to the new one.
In a new folder, create a new project selecting the correct device (2478).
Copy over the single c source file and the RAM.ini file.
Add the C and S files to the project in the workspace window. Most are found under Common->src.
Create an Obj and Lst folder and point to them on the Output and Listing tabs.
Make sure to add the __DEBUG_RAM symbol on the C++ tab.
Make sure to add the RAM.ini file on the debug tab.
Correct the entries on the target tab to match the working example.
The new project should compile & run in the debugger.
If you have problems, walk thru the options tabs on the two open projects and see where they disagree. You need to drill down into all the options using the buttons on the tabs.
If after doing all this you get 'unable to load axf file', check the ulink settings on the debug tab. These should match those in the working example. The Jtag clock may be too fast, or some debug settings may be incorrect for your board/example.
If you create a new project, a new startup file (LPC2400.s) is created. This is probably a better, more specific version than the startup.s distributed with the examples. The pane it appears in has some wizard tabs to simplify editing of startup parameters.
If you copy a project, the ulink debug settings seem to return to defaults and will need to be re-edited. On my system, the Jtag clock jumped from 200k to 1M and I could not connect again until I changed it back.
After trying out several examples from this bundle, I found that flashmagic no longer connected over ISP, even though I had a working app in the flash. I had to use the ulink to erase the entire flash before it would connect again. If I had been relying on the ISP for programming I would have been stuck.
I think this whole ISP,IAP,bootloader topic deserves much better documentation than what I have seen. I have lots of questions about this, but maybe those are for NXP to answer.