LPC2124 from Scratch
This is a tutorial on how to start working with Olimex LPC-H2124 development board. It describes a simple pure assembly "bare-metal" project using open-source tools, with the focus on the following things:
- startup sequence;
- linker script;
- uploading the program to the device.
The tools should work both on Linux and Windows. The project is developed by Ilya Kizhvatov.
Download project code: lpc2124fromscratch.zip
- test.s - this is the main and the only program source file containing the startup sequence and some simple code executed in a loop
- link_16k_256k_rom.ld - this is the linker script
The files are somehow commented.
Quick start (Windows)
1. Get and install the recent CodeSourcery G++ Lite for ARM EABI, and the NXP LPC200 flash utility (see links below).
2. In the console, go to the project directory (test) and execute 'cs-make'. This will build the project and, among others, provide a .hex file for uploading to the device.
3. Connect the board to a PC with an RS232 cable (direct female-male), close the BSL and JRST jumpers on the board.
4. Launch the NXP LPC200 flash utility, select the test.hex file and upload it to the device.
5. Open the BSL and JRST jumpers and press RESET button on the board.
6. Observe the GPIO pin 12 (P0.12) toggling with the DSO. :)
- initialize USART in the startup sequence
- move the startup sequence into a separate file
- move all the hw-related definitions into a separate header file (in fact, use one of the already available for LPC2124 from various projects)
- proceed to C code (this will probably require to modify the linker script)
- crypto algorithm implementations (AES, RSA)
- CodeSourcery G++ Lite for ARM, we need the EABI version.
Flash memory programming tools
- LPC2000 FLash Utility , programming utility for Windows, obsoleted by FlashMagic
- FlashMagic, up-to-date programming utility (Windows)
- lpc21isp, commad line programmming utility
Datasheets and manuals
Tutorials and books
- Building bare-metal ARM Systems with GNU
- James Lynch tutorial (not sure if this is the recent one, since many versions are lying around on the web)
Misc web pages
-  - a very simple example of an assembly app for LPC 21XX