1

Is there a file or setting that I can add to my project that maps specific values to specific memory location in IAP flash when it is programmed? The device is LPC1114.

The use case is that each device needs a unique serial number that should be set at production time when the program is flashed onto the micro controller. Then, in my program I would be able to read it from IAP flash memory at run-time.

TDL
  • 439
  • 1
  • 5
  • 12
  • No such device as an NXP1114! – Leon Heller Aug 19 '14 at 16:01
  • Really? A downvote for a typo? – TDL Aug 19 '14 at 16:15
  • 1
    Toolchains vary, but either a custom section and a linker map entry, or else a pragma right after the constant, can be used to set its location. You can also just put it at the end of memory, be sure anything else stops short of that, and hard code the address you read it from. Typically you won't want to serialize *through* your compiler, but rather either modify the .hex or binary file, or else use a flashing tool which can do this as it runs. Do make sure your part isn't one which already has a unique hardware serial number. – Chris Stratton Aug 19 '14 at 16:25
  • This serial number has nothing to do with the micro-controller. It's a serial number for the device itself that will be reported on an LCD screen to the user. Do you have any links to examples for the custom section/linker map entry and/or the appropriate pragma? Thanks. – TDL Aug 19 '14 at 20:08
  • @TDL - I have a similar issue in that the company I work for make instruments with a LAN interface and so each device needs a unique MACID. I build custom hex file on the fly for each unit and program the device with that. You haven't told us what tools you are using so I can't provide more details. – Warren Hill Aug 20 '14 at 06:23
  • @WarrenHill - Thanks. Currently I am using C++ in LCPXpresso. At this point, I am interested in an example or pointers to doc on the correct PRAGMA to use. In production, I will likely be providing a custom program that directly updates the appropriate location in the hex file before it is flashed. – TDL Aug 31 '14 at 15:04

0 Answers0