ARM7 Hacking

Published on: 2006-1-3

Home | Archive

ARM7 Hacking

2006-01-03T13:46:00

The LPC2138 (member of the LPC2000 family) is a microcontroller from Philips based on the ARM7 core; SPJ Systems manufactures an experimentation board called MiniARM 2138 based on this processor. The last few days have been spent trying to get this board working on Linux - with no success. The LPC2138 has a bootloader which uses a simple serial protocol for downloading and flashing hex files - the two or three Linux programs available on the web for doing the same did not work - so I had to (shudder) install that M$ OS to use the official Philips ISP flash utility which worked fine (well, this board has a quirk - be sure to read the manufacturer's FAQ before you try flashing it or you will be disappointed). The GNU compiler has an official ARM port (some people say that the quality of the code which GCC-ARM generates is pretty bad compared to some propreitory compilers - there is a suggestion that GCC is good only for the Intel CPU's - don't know whether this is true). There is even a site dedicated to GNU tools on ARM. Getting the GNU toolchain working on a particular embedded platform is a bit of a headache as you have to figure out how to build the cross-tools, and once that is done, find out what all options are to be passed to the compiler, assembler, linker etc. You also have to write a linker script and some startup code to get C code working properly. Everything is now set up properly and I am able to run simple programs. The LPC 2138 is a really cool CPU! (some interesting stuff: conditional execution of all instructions to smooth the pipeline, on-chip PLL which generates upto 60MHz clock from a 14MHz crystal..) There is a very well written document for programming the LPC2000 family of microcontrollers - get it from here - reading this is really the best way to get started! Finally, though belated, a very Happy New Year to all readers!


monish

Wed Apr 9 02:22:54 2008

plzz tell me how to port MicroC/OS in lpc 2138 , i am not getting the required tool chain for it thanks in advance


bobby Caracus

Thu Jul 3 01:19:42 2008

MicroC/OS has been ported already. look here http://www.micrium.com/nxp/LPC21xx.html