This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

NXP 23xx-24xx examples for Keil

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.

Parents
  • 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.

Reply
  • 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.

Children