5 years, 1 month ago.

Creating a custom target

I would like to use the LPC11U67 instead of the LPC11U68. I can import mbed-src and change the .s file to set the top of RAM. I don't think I really need to change the .sct file (which is locked). My platform would remain as LPC11U68. Instead, if I create a new folder for LPC11U67 at the same level as the LPC11U68, is there any way for me to tell the compiler that my device is a LPC11U67? Of course, I can export to an offline compiler as an alternative.

Thanks, Tom

1 Answer

5 years, 1 month ago.

Nop, the target you will need in the online compiler is the LPC11u68, you cannot change for which one it compiles.

In that case, is it adequate to just change the .s file to define the top of RAM, as long as the program does not exceed the flash or RAM size limits?

I would like to suggest to the mbed compiler team that they add a simple pre-processor option to set flash and RAM size. In that way, you could compile for pretty much every variant of the base processor since the start of flash and RAM remain the same. I am sure that many mbed developers will select a chip with less flash and RAM when they go to production so this would be a very desirable feature.

Of course, even better would be to have a pre-processor directive to also allow changing the start of flash for relocating code, but that would also require the CMSIS-DAP interface to understand the offset.

posted by Tom Russell 26 Oct 2014

Not always each variant of base processor is the same, if we consider pinouts (=package). And as I understand, adding tool like a preprocessor macros can mess up the user space.

posted by Martin Kojtal 27 Oct 2014