LPC18xx/43xx Internal Flash Support
Code Red IDE v 4.3.0 introduced support for LPC18/43 parts with internal flash, such as the LPC1857 and LPC4357.
Single Flash Bank parts
LPC18x2 / LPC43x2 parts provide a single 512KB bank Flash, located at address 0x1a000000. The appropriate default flash driver (LPC18x2_43x2_512.cfx) to program this will be selected when you create a new project using the New Project Wizard for one of these parts.
Dual Flash Bank parts
A number of LPC18/43 parts also provide dual banks of internal flash, with bank A starting at address 0x1a000000, and bank B starting at address 0x1b000000.
- LPC18x3/LPC43x3 : Flash = 2x 256KB (512 KB total)
- LPC18x5/LPC43x5 : Flash = 2x 384KB (768 KB total)
- LPC18x7/LPC43x7 : Flash = 2x 512KB ( 1 MB total)
When you create a new project using the New Project Wizard for one of these parts, an appropriate default flash driver (from LPC18x3_43x3_2x256_BootA.cfx / LPC18x5_43x5_2x384_BootA.cfx / LPC18x7_43x7_2x512_BootA.cfx) will be selected which after programming the part will also configure it to boot from Bank A flash.
If you wish to boot from Bank B flash instead, then you will need to manually configure the project to use the corresponding "BootB" flash driver (LPC18x3_43x3_2x256_BootB.cfx / LPC18x5_43x5_2x384_BootB.cfx / LPC18x7_43x7_2x512_BootB.cfx). This can be done by selecting the appropriate driver file in the "Flash driver" field of the Memory Configuration Editor. Note that in this case you will probably also need to delete Flash Bank A from the list of available memories (or at least reorder so that Flash Bank B is first).
Note about the "default" flash driver
The default flash driver selected by the project wizard when you create a project for an LPC18/43 part with internal flash, as described above, will generally not be displayed in the flash driver field in the Memory Configuration Editor. This field will typically only contain a filename if you manually override the default flash driver.
You can confirm the flash driver being used though by looking at the debug log generated when you start a debug session for your project.
For more information ...
For more information on targeting LPC18xx/LPC43xx MCUs with the Code Red IDE, please see the FAQ LPC18xx / LPC43xx Support.