![](images/nxp.png)
NXP LPC54000 CPU Support Package
This package contains project templates and system files for the NXP LPC54000.
CrossWorks Version 4 Installation Instructions
- To install this support package
-
- Click the Tools > Package Manager menu option to open the package manager window.
- Right click on the NXP LPC54000 CPU Support Package entry and select Install Selected Packages.
- Click Next to take you to the summary page.
- Click Next to install the package.
- Click Finish to close the package manager window.
- Click the Tools > Show Installed Packages.
- Click on the NXP LPC54000 CPU Support Package link to view the package and its contents.
- To manually install this support package
-
- If you have not done so already, follow the CMSIS 5 CMSIS-Core(M) Support Package, CMSIS 5 CMSIS-DSP Support Package, CMSIS 5 Support Package and CrossWorks Tasking Library Package installation instructions.
- Download the file LPC54000_V4.hzq using your web browser.
- Click the Tools > Manually Install Packages menu option.
- Select the file you have just downloaded to install the package.
- Click the Tools > Show Installed Packages.
- Click on the NXP LPC54000 CPU Support Package link to view the package and its contents.
Release Notes
4.2
- Fix simulator build.
- Add support for LPC54018J2M/LPC54018J4M devices.
4.1
- Supply latest CMSIS header files.
- Add external GCC built executable project template.
- Replace FLM flash loaders with RPC loaders.
- Moved sample projects into LPCXpresso board support packages.
4.0
- Initial Release. This package replaces the LPC54000 CPU support package.
Documentation
Creating LPC54000 Projects
To create a new LPC54000 project
- Select the File > New > New Project menu item.
- Select the appropriate Generic LPC5410x from the Categories list.
- Select the required project template type from the Templates list.
- Set the required project name and location directory.
- Click OK.
To build and debug an application the runs in Flash memory
- Select the project to work on by using the Project > Set Active Project menu option.
- Select the configuration you require by using the Build > Set Active Build Configuration menu option.
- Right click on the project node in the project explorer and select the Flash placement property.
- Build the project by using the Build > Build Project menu option.
- Connect to the appropriate target in the target window.
- Download and start debugging the current project by using Debug > Start Debugging.
LPC54000 Project Specifics
Target Processor
Once a project has been created you can select different target processors by right clicking on the project node in the project explorer and selecting the Target Processor entry.
Selecting the target processor will specify the memory map that is used for the build and debug. You can view the selected memory map by right clicking on the project node in the project explorer and selecting Edit Memory Map.
Section Placement
CrossStudio for ARM supports LPC54000 projects running applications in a number of different memory configurations. You can select the memory configuration you require by setting the Section Placement property.
For LPC5410x projects the set of placements are:
- Flash application runs in internal Flash memory.
- Flash Vectors In RAM application runs in internal Flash memory, exception vectors are in RAM.
- RAM application runs in RAM memory.
- SRAMX application runs in SRAMX memory.
- SPIFlash XIP application runs in SPIFlash memory.
Stack and Heap Sizes
The default stack and heap sizes are set to be 256 and 256 bytes by default when a project is created.
Target Startup Code
The startup code $(TargetsDir)/LPC54000/Source/LPC54000_Startup.s is common to all LPC54000 processors. There are a set of preprocessor defines that configure the startup code and are documented in the startup file itself. The startup code calls out to a weak symbol SystemInit with the stack pointer set to the top of of SRAM. The SystemInit function can be used to set the CPU clock or configure any external memories prior to the C initialisation code as such it cannot access initialised static data. Note that the SystemInit() function is called with the stackpointer pointing to the end of the first block of SRAM.
The startup code declares symbolic names (and weak implementations) for each interrupt service routine, for example the GINT0_IRQHandler function will be called when the GINT interrupt occurs. If you are porting code that has different interrupt service routines names then you can use preprocessor definitions to rename the declared symbolic name for example GINT0_IRQHandler=GINT0ISR.
Target Reset Script
The reset script $(TargetsDir)/LPC54000/Scripts/LPC5410x_Target.js is used by the debugger to reset the target board.
Target Flash Loaders
The following flash loaders are supplied:
- LPC5410x_Loader.elf for internal flash memory of LPC5410x.
- LPC5411x_Loader.elf for internal flash memory of LPC5411x.
- LPC5460x_Loader.elf for internal flash memory of LPC5460x.
- LPC540xx_MT25QL128_Loader.elf for SPI flash memory of LPC540xx.
- LPC540xx_MX25L12835FM2I_Loader.elf for SPI flash memory of LPC540xx.
- LPC540xx_W25Q128JVFM_Loader.elf for SPI flash memory of LPC540xx.
- LPC5460x_MT25QL128_Loader.elf for internal and SPI flash memory of LPC5460x.
- LPC5460x_MX25L12835FM2I_Loader.elf for internal and SPI flash memory of LPC5460x.
- LPC5460x_W25Q128JVFM_Loader.elf for interal and SPI flash memory of LPC5460x.
The internal flash loaders are selected based on the Target processor selection. You can override this by setting the Loader project macro, for example Loader=$(TargetsDir)/Loader/LPC5460x_W25Q128JVFM_Loader. The SPI flash loaders are selected by setting the Placement property to SPIFlash XIP.
Memory Simulator
An LPC54000 memory simulator is provided that simulates the memories of the various LPC5410x devices. The memory simulation parameter (which is set by the Target Processor selection) specifies the device name, the size of the internal Flash and RAM memories. Note that the power api ROM is not simulated so you will have to modify the startup code by building with NO_SYSTEM_INIT defined.
CMSIS support
CMSIS header files and library are referenced as part of the new project setup.
CTL support
The file ctl_LPC54000.c implements the CTL system timer using the standard Cortex-M SysTick timer. The timer is configured to interrupt at approximately a 10 millisecond rate and increment the CTL system timer by 10 to give a millisecond timer.
The CTL interrupt support functions ctl_global_interrupts_set, ctl_set_priority, ctl_unmask_isr and ctl_mask_isr are implemented in this file. The implementation uses the lowest half of the available NVIC priorities (top bit set in the priority) for CTL interrupts.