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

LPC2378 / MDK support Integration

Hi

I am coming up to speed using a MDK-ARM / ULINK JTAG debugger system on a MCB2300 target board with the NXP LPC2378 device and am observing the following issues

I finding it somewhat unclear on how exactly to globally specify a target build specifically to be downloaded to FLASH and to user FLASH USer Memory mode such that the FLASH interrupt vector table is used instead of the boot ROM. I have a working solution but it seems much to convoluted in that

Step 1 - Project -> Options for Target 1 -> Debug Settings Button for Use ULINK Download Options - check download to flash

Step 2 - Project -> Options for Target 1 -> Debug check Load Applications at Startup

Step 3 - Debug -> Start Session

Step 4 - Peripherals -> System Control Block -> Memory Mapping Control -> User Flash Mode

If Step 1 is not selected I am assuming it downloads to internal RAM, but I didn't see any clear setting to link the target for RAM address execution, and of course the disassembly listing code dopes not sync up with the actual memory locations. I tried setting the REMAP symbol in Project -> Options for Target 1 -> ASM Define but it creates -pd REMAP SETA 1 in the assembly command line, instead of REMAP SETL {TRUE}. I agree that logically this should be the same thing but the assembler is ignoring this symbol definition since the listing file shows that the remapping code is not being generated.

In my opinion it might be worth considering making the actual target specification process a bit more obvious ie :

- generate debug target for RAM execution
- generate target for FLASH execution

At he end of the day all I want to do is generate a AXF file that downloads automatically into FLASH when I start a debug session, and automatically be looking at the correct exception table which for now will always be located in FLASH and now that the magic ROM boot code is completely out of the picture. ROM code that makes decision for me, like if the image is valid makes me somewhat nervous.

I also have a question about the Valid Code key that resides in Exception location 0x00000014. It seems that part of the linker scripts generate this key automatically such that I will never have to worry about this myself. I would appreciate a pointer to the specific sequence or linker commands that do this, as I haven't found it yet.

cheers
bob m

  • If you look at the examples, you will notice that they contain multiple targets. One target will link for flash (and will load into flash when running). One target will link for RAM, and will load into RAM before a init script is run to set the PC to the start addres in RAM.

    The flag that you found does not control if the application should be sent to flash or RAM.
    It decides if you want to run your latest build, or if you should start running the application that is already stored in the target.

    AFter you configure a project with multiple targets, you will be able to quickly change between the targets. This may be running your application in flash or RAM, or building the application for different target processors.