adding code-updater service to my LPC software

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by oryo on Thu Jan 09 06:25:28 MST 2014

I'll find it a bit hard to phrase my needs, so forgive me if the headline is a bit unclear.

First thing first - my setup:
1. LPC Link 2
2. LPC1112LV/103 chipset , installed on some proprietary board
3. LPCXpresso 6.0.4
4. Linux OS

I've implemented a software for the LPC1112LV/103 device I have, that performs several procedures. Lets name it "CSW" (Controller Software).
I'd like to add a feature to my CSW: an Updater service.
Upon invocation, the Updater service will copy data to the SRAM (using SPI protocol, that I've already implemented), and then burn the Flash memory using data from SRAM, by utilizing the LPC IAP command set.
Since the code needs to be run from somewhere, some part of the flash memory must be dedicated for this Updater service. This part of the flash memory shall not be changed by the Updater.
Since the Flash memory is 4 time larger than the SRAM memory, this copy-burn transactions will have to occur several times. This doesn't seem to affect anything but I thought perhaps its worth mentioning.

So if I assume my Updater service code is smaller than 1KB - I'd like my flash memory to be mapped like this:
* Total flash size: 16KB
* 0x0000 - 0x3BFF : CSW code (15KB)
* 0x3C00 - 0x4000 : Updater code (1KB)

My question is: how can i do that, using the LPCXpresso environment?
I thought about having two separate projects (one for the CSW, one for the Updater), but I'm not sure how to burn the flash memory properly.
Also, since some code is shared between these 'projects' (the SPI driver for example), i'm not sure its the smartest way to go.
If you have any other SW 'design' for the need I've described - I'll be happy to hear it out.

thanks !