Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 21

ARM-Projects

by Martin THOMAS Please: Before asking any questions by e-mail or in the forum make sure that you are using the latest version of the examples and/or tools. Some problems have already been fixed.

Available Projects and Information (Content)


You may like to visit my AVR-Projects page too. WinARM. The gnu-toolchain and several tools and samples for ARM controller/processors for MS-Windows-Platforms. (last Update of the package 28. Mar 2008 (Testing), last Update of additional information/add-ons/bugfixes 6. Feb. 2008) WinXSCALE precompiled GNU-Toolchain for xscale-elf targets (last Update 22. Sept. 2006) OpenOCD as flash-programming Software for AT91SAM7, LPC2000 and STR7 (last Update 31. Aug. 2008) Using OpenOCD with ARMv7 / Cortex-M3 / LMI Stellaris and ST STM32 (last update 30. Apr. 2009) A short introduction into ARM-JTAG debugging using Wiggler(-clones) and the gnu-Debuggers (last Update 4. June 2005) A small demo for the LPC2106 and LPC2129 (ARM7TDMI) controllers - LED and button interfaceing (GPIO) (last Update 19. March 2007) A small demo for the LPC2106 and LPC2129 (ARM7TDMI) controllers - LED and button interfaceing (GPIO) and Timer-Interrupt(via VIC) (last Update 19. March 2007) A small demo for the LPC2106 (ARM7TDMI) controller - UARTProgramming (last Update 26. Oct 2004) A small demo for the LPC2106, LPC2129, LPC2138, LPC2368 and LPC2378 (ARM7TDMI) controllers - interrupt-driven UART (last Update 2. May 2007) Controller Area Network (CAN) with Philips LPC2129 (last Update 17. May 2005) arm-elf-gcc and newlib stdio/"printf"-Interface and LPC2129 ADC example (last Update 13. March 2007)

arm-elf-gcc Example Application with some Functions in RAM ("fastrun"/"ramfunc") (last Update 17. May 2005) C++ with LPC ARM7TDMI/newlib/newlib-lpc (inheritance, polymorphism) (last Update 11. July 2006) Port of the Philips LPC213x/214x example-colletion for the gnutoolchain (last update 5. Dec. 2006) GPIO, UART and interrupt example for the NXP LPC2378 / NXP LPC2368 (last update 29. June 2007) Interfacing NXP(ex.Philips) LPC2000, LPC1700, Atmel AT91SAM and STMicroelectronics STM32 with memory-cards (SD/MMC) (last Update 11. July 2010) FreeRTOS example with LPC2138 (last Update 19. May 2006) AT91SAM7S GPIO Example (last Update 22. July 2006) AT91SAM7S Timer interrupt Example (last Update 22. July 2006) AT91SAM7S UART Example (last Update 21. Sept. 2007) AT91SAM7S GPIO/interrupt/UART Example with a lot of "gcc specials" (last Update 3. Dec. 2005) AT91SAM7S USB Examples (last Update 10. Mar. 2007) Interfacing ATMEL AT91SAM7S ARM7TDMI with memorycards (SD/MMC) (last Update 15. Sept. 2009) GNU-Port of the Atmel "MIPS" example with "gcc/as specials" (last Update 15. July 2006) AT91SAM7 SWI, Remap, GPIO, PIT and stdio Example ("gamma") (last Update 30. Aug 2007) C++ with the GNU-Toolchain on an AT91SAM7 (last Update 14. Sept. 2006) Analog Devices ADC7000 ARM7TDMI controller Examples (last Update 5. Dec. 2007) STR71x GPIO, Interrupt, Timer Example (last Update 25. Apr. 2007) STMicroelectronics ARM7 Controller Examples (last Update 22. Sept. 2006) GNU port of the STR7 UART-Bootloader (last Update 24. Sept. 2007) ARMv7 Cortex M3 examples for LMI/TI LM3S, ST-Mircoelectronics STM32 and NXP LPC17xx (last update 11. July 2010) Simple STM32 Digital Picture Frame with an STM32 conntected to a 2.8" Color-LCD-Module (last update 29. Nov. 2009) Using C++ with the GNU arm-crosstoolchain and Cortex-M3 controllers (last update 23. Dec. 2009) Interfacing Maxim/Dallas DS18x20 Temperature Sensors with an LPC2106 (ARM7TDMI) (last Update 26. Nov 2004)

Interfacing Graphics-LCDs with the ARM controllers (KS0108, SED1520) (last Update 17. Oct 2007) "T"-Clock: DCF77 radio-clock-receiver with Graphics-LCD display for LPC2106 (ARM7TDMI) (last Update 23. Dec 2005) Machine-to-Machine (M2M) communication A data-logger with GPRSconnection (last update 1. Mar. 2006) A patched version of the ULINK Windows-driver (last Update 7. Sept. 2005)

"Last updated" may be just additional information not always a new version of a software-package. All presented LPC2106, LPC2129 and LPC2138 projects should work with minimal modifications in the linker-scripts and source-code on all Philips LPC2xxx controllers. Most of the code should also work on other ARM7TDMI controllers after small modifications. If you think that I could help you with your projects: just send an e-mail. I'm looking for "freelance"-jobs. You may also find useful code and information on my Atmel AVR-Projects page If you send me an e-mail: Please use your full name (your _real_ full name). And it's always nice to get some kind of feedback if an answer to a question did help or did not help. I often spend a lot of time answering e-mails and would at least like to know if my suggestions did or did not help solving a problem. Questions or suggestions? Please use the support-forum for WinARM/arm-elf-gcc and the example-projects.

WinARM
WinARM is a collection of GNU and other tools to develop software for the ARMfamily of controllers/processors on MS-Windows-hosts. Unlike other collections WinARM does not depend on a cygwin or mingw-environment. All needed tools are in the distribution-package. WinARM has been tested with Philips LPC2106, Philips LPC2129, Philips LPC2138, Philips LPC2148 and Atmel AT91SAM7S64, AT91SAM7S256, AT91RM9200 ARM7TDMI(-S) controllers (the list is based on own tests and user feedback). The gnu-toolchain and the supplied tools should work with all microcontrollers based on ARM(-TDMI/Thumb etc.) architecture. WinARM has been made in the spirit of WinAVR which is a collection for Atmel AVR 8bitControllers. WinARM includes in Version 20060606:

GNU-C/C++-Compiler (cross compiler/linker/assembler arm-elf-*) Version 4.1.1 incl. stdlib3. Compiled from the FSF-Sources The configuration supports ARM-Mode, Thumb-Mode and Mixed(ARM/Thumb)-Mode, little/big-endian and floating point-emulation GNU-Binutils Version Version CVS 20060606 FSF-Sources newlib Version 1.14.0 (build for reentrant syscalls) newlib-lpc Rel.5a (reentrant syscalls for newlib and Philips LPCs) GNU-Utils to support the compiler/linker (make, sh etc. from the mingwproject) ARM header-files (register-defintions) from gnuarm.org and others Example applications with full source-code, makefiles, linker-scripts and startup-code for Philips LPC2000, ADuC7k and Atmel AT91SAM7 ARM7TDMI controllers. More Examples on my ARM-Projects pages. Programmers Notepad Editor Version 2.0.6.1 The lpc21isp in-system-programming-software for Philips LPC2xxx and the Analog Devices ADUC 70xx family by Martin Maurer. Included Versions: 1.31 and 1.37(BETA) Bray Terminal by Vlado Brajer Insight-GDB 6.5.50-20060517 - Win32-Native from devkitpro.org gdb (command-line without Insight) GNU gdb 6.4.50.20060226-cvs from Codesourcery Setup-Exe of Macraigor's OCDRemote (Wigger-gdb interface, Ver. 2.16) Open On-Chip debugger (OpenOCD, SVN Version 65) made by Dominic Rath, update available further down. H-JTAG (Ver. 0.2.1 beta 20060402) made by "twentyone" J-Link gdb-Server V1.0 from the gnuarm yahoo-group

Planned extensions:

Installer

User-Forum: A support-forum for WinARM/arm-elf-gcc and the example-projects. You are invited to visit this forum and ask questions or help others. Download by right-click->save as, please download only one of the archives either the zip or the self-extracting-archive. The contents is the same. Please respect all licenses of the included components. WinARM itself has no additional license.

Download the WinARM 20060606 zip-Archive here (ca. 95 Megabytes, "Readme.htm" of this version).

or

Download the same version but packed with a different packer (7zip) and available as self-extracting-archive here (just ca. 44 Megabytes).

Please do not use download-managers with more than 5 parallel connections! (There are people who use >30 parallel connections.) Download only one of the archives (zip orthe self-extracting archive). Both archives have the same content, which has just been packed with a different method. I will be forced to throttle the server and use traffic-shaping if this habbits do not stop. Mirror sites:

Alex Gibson kindly provides a mirror-site (winarm.alexthegeek.com) Oleg Seiljus from xVerve provides a WinARM-package with an installer and additional drivers for the Signalyzer tool (in the Support/Download-section of the xVerve Web-site).

While the WinARM package might still be useful because of the included examples and tools the GNU tools (Compiler, binutils etc) in the WinARM package are rather outdated. Packages with more recent versions of the GNU ARM-cross-toolchain for MS Windows hosts:

Codesourcery's Sourcery G++ Lite Edition for ARM Dave Murphy's devkitARM - part of devkitPro Michael Fischer's Yagarto

Updates and Add-Ons:


Grald/dupon jean has sent a ARM makefile-generator similar to Jrg Wunsch's mfile (for AVR). It can be downloaded here. Michael Fischer modified gdb to improve compatibilty with Eclipse. His gdbVersion is available here. OpenOCD (MS-Windows "native build") including an installer is available from Michael Fischer's Yagarto pages. lpc2129_adc_stdio example-update Updated AT91SAM7s-examples MS Windows-binary of lpc21isb V1.43 (beta). Test-release WinARM 20070505: release-notes, Download (self-extracting archive created with 7-zip, 118MB(!)), Download (zip-Archive, 180MB(!)) Another test-release: WinARM 20080331. Based on GNU Binutils 2.18.5, GNU gcc 4.3.0 (C/C++), newlib 1.16, GNU gdb 6.8 (with XML and TUI

support), OpenOCD SVN527. The precompiled toolchain offers thumb2 support (i.e. for Cortex-M3 like LuminaryMicro LM3S and STMicro STM32.) Again: just a test-release, preliminary tests with examples for LM3S811 and STM32F103 worked as expected. Download the 20080331 testrelease [here] (ca. 37MB, no examples included) WinARM and Keil/ARM uVision Jaroslav Ban from the Technical University Kosice kindly contributed some files which help to integrate the GNU-Tools from WinARM (arm-elf-gcc/arm-elf-as) into the Keil/ARM uVision IDE. There is a readme-file in the archive with installationand usage-instructions. (Update mthomas 20070913: objcopy-"glue" for "create hexfile"). [Download] (glue-package version 20070913). WinARM and Microsoft Vista Adriaan Beluga has sent the following e-mail: Thanks for your suggestions. With them I managed to get everything to work again under Vista ! ;-) In the end I only needed to modify the path in my batch file which starts "pn.exe". Here is what it looks like now:
@echo off set ARM=c:\WinARM set PATH=%ARM%\libexec\gcc\arm-elf\4.1.1;%ARM%\bin;%ARM%\armelf\bin;%ARM%\utils\bin; start /b pn

Thanks to Adriaan for testing WinARM with Vista (I currently do not have access to a PC running Vista). Users who do not use a batch-file to start Programmers-Notepad or another editor may add the entries to the system search-path from the Workplace properties. So where Windows NT/2K/XP users just added C:\WinARM\bin;C:\WinARM\utils\bin Vista users add C:\WinARM\libexec\gcc\arm-elf\4.1.1;C:\WinARM\bin;C:\WinARM\armelf\bin;C:\WinARM\utils\bin . Information from Michael Langfort: Im using the 20060606 version of WinARM on Vista Home Premium. When I tried to build a WinARM-based project (that builds fine on WinXp), I got an error:
1>arm-elf-objdump -h -S -C app.elf > app.lss 1>/usr/bin/sh: /c/winarm/bin/arm-elf-objdump: Invalid argument

This is related to the invalid parameter being passed to a windows api. Aaron Giles page talks about this in relation to MinGW. I went ahead and did his fix, and downloaded MinGW 5.1.3. I deleted the WinARM make and replaced it with the MinGW 5.1.3 make (Its called MinGW-make) and added all the paths spoken about on

his page, and now WinARM works. Please think about changing the WinARM Make to match that version. --Michael (mthomas: I will include the mentioned version in to the next WinARM-relase.)

The old WinARM Version 20060331 with gcc 4.1.0 is still available. [Download] (zip, ca. 90 Megabytes, "Readme.htm" of this version). The old WinARM Version 20060117 with gcc 4.0.2 is still available. [Download] (zip, ca. 80 Megabytes, "Readme.htm" of this version). In case
you have problems with make ("e=2", "file not found") with the old Version 20060117 please replace the complete WinARM/utils/bin directory with the one from the alternate-utilites for version 20060117. Take care: the make version 3.80 included in the archive is case sensitive even on MS-Windows systems, so filenames in the makefile have to be given in correct upper- and lowercase.

The old WinARM Version 20050209-2 with gcc 3.4.3, binutils 2.15.94, newlib 1.13 is still available. Download the old WinARM 20050202 zip-Archive here (zip, ca. 49 Megabytes) or here (tar.bz2, ca. 41 Megabytes).

LPC2106 and LPC2129 ARM7 GPIO example


This is a simple example to let a LED blink and test button-input (GPIO) on a Philips LPC2106 (ARM7TDMI-S-architecture). The demo-board LPC-P2106 from Olimex has been used. The project-setup is adapted for the arm-elf GNUtoolchain on MS-Windows "hosts" but since the GNU-tools are used, the changes needed to build the project on Unix/Linux are minimal. Please read the readme.txt and comments in the source-code and the makefile for further information. Download the complete archive here (timestamp 20060629, updated Makefile, tested with WinARM 6/2006) A blink-switch-example for the Philips LPC2129. Code prepared for a Olimex LPCP2129 demo-board(*1) but can be adapted to other hardware easily. Tested with WinARM 4/05.[Download] (Timestamp 20070319, fixed stack-align in linker-scripts) Another blink-switch-example with a little C++ support (just one class). The example has been made to verify the function of makefile, linker-scripts and startup-code. Code

prepared for a LPC2106, tested with WinARM 2/05 and 4/05. [Download] (Timestamp 20050429)

LPC2106 and LPC2129 ARM7 GPIO and timer interrupt example


This is a simple example to let a LED blink and test switch-input on a Philips LPC2106 (ARM7TDMI-architecture). The delay for the blink-routines is timed by a system-timerwhich updates a "timebase" in an interrupt service routine (very much like the Blinky_IRQ sample from Keil GmbH). The demo-board LPCP2106 from Olimex has been used. Please read the readme.txt and the comments in the source-code and the makefile for further information. The code and makefile are prepared to be built with WinARM but should be rather portable among other gccbased toolsets. Download the complete archive here (timestamp 20050514, makefile (with thumb-interwork-options), headers, linker-scripts and startup-code included). Make sure to use a new version of arm-elf-gcc (>=3.3.1?) since the interrupt-code did not compile correctly in old gcc-versions. Code has been tested with gcc V4.0.0 (WinARM 4/05). A similar example for the Philips LPC2129. Demonstrates timer-irq, VIC, thumbinterwork, linker-scripts, startup-code etc. Code prepared for the Olimex LPC-P2129 Rev A demo-board(*1) but can be adapted to other hardware easily. Tested with WinARM 4/05. [Download] (Timestamp 20070319, fixed stack-align in linkerscritps) Another Blinky-Example for the Philips LPC2129. This one is for the Keil MCB2100 evaluation board. Beside of the adaption for the Keil board this example includes an updated makefile and updated linker-scripts. The source-code has been extended and comments have been added. Tested with WinARM 1/06. [Download] (Timestamp 20060223)

LPC2106 ARM7 UART example


This sample-application demonstrates interfacing the ARM7-UART(0) in polled ("simple" non-interrupt) mode with a LPC2106 ARM7TDMI. Derived from opensource/free code by R O Software. The demo-board LPC-P2106 has been used. Please read the readme.txt and the comments in the source-code and the makefile for further information. The code and makefile are prepared to be built with WinARM but should be rather portable among other gcc-based toolsets. Download the complete

archive here (timestamp 20041214, makefile, headers, linker-scripts and startup-code included). Code has been tested with arm-elf-gcc V3.4.2. Thanks to Murray Horn for reporting a bug in the PLL-Setup. Fix applied in 20041214.

LPC2106, LPC2129, LPC2138 and LPC2378 ARM7 interrupt-driven UART


This sample-application demonstrates interfacing the ARM7-UART(0) in "interruptmode" with a LPC2106 ARM7TDMI-S. Adaption and slightly modified and extended version from open-source/free code by R O Software for the demo-board LPC-P2106. Please read the readme.txt and the comments in the source-code and the makefile for further information. The code and makefile are prepared to be built with WinARM but should be rather portable among other gcc-based toolsets. Download the complete archive here(timestamp 20041028, makefile, headers, linker-scripts and startup-code included). Code has been tested with arm-elf-gcc V3.4.2. A similar example for the Philips LPC2129 ARM7TDMI-S, tested with WinARM 4/05 (gcc 4.0.0). Download the complete source-archive here (timestamp 20050514). A similar example for the Philips LPC2138. Demonstrates interfacing both UARTs, timer-irq, VIC, thumb-interwork, linker-scripts, startup-code etc. Code prepared for the Keil MCB2130 demo-board but can be adapted to other hardware easily. Tested with WinARM 8/05. [Download] (Timestamp 20051008) An improved version of the example for the NXP LPC23xx and LPC24xx family. Beside the demonstration for interrupt-driven UART control which is still based on the R O software-code. This example also demonstrates how to configure the clocksystem in the LPC23xx/24xx controllers. The clock-system is a little different from the "older" devices. The code also demonstrates how to use the "new" vectored interrupt controller. The VIC in the LPC23xx/LPC24xx family is based on another ARM primecell than the VIC in the LPC21xx/22xx so this had to be taken into account. Additionaly the code has some functions to connect "call-backs" to a timerIRQ (not LPC specific). The code has been tested with an LPC2378 on an Olimex LPC-2378-EK using the GNU-toolchain as in my WinARM collection 6/06. [Download] (Timestamp 20070502)

LPC2129 CAN Example

This is just a port of the example "CANall V1.10" from Embedded Systems Academy to WinARM and the Olimex LPC-P2129 board(*1) (Philips LPC2129 ARM7TDMIS). Some minor cleanup has been done in the CAN-code to avoid compiler warnings. Just connect CANL/CANH of both CAN channels and the on-board LEDs will blink. Tested with WinARM 4/05 (gcc 4.0.0). Download the complete sourcearchive here (timestamp 20050514).

Newlib/StdIO-Interface and LPC ADC example


This example-application demonstrates interfacing C-standard I/O ("printf") with the ARM7-UART(0). A minimal set of reentrant support functions for newlib's stdio and malloc is included. This code does not need newlib-lpc itself (some code of newlib-lpc has been copied into the source). It may be easier to port this code to other ARMbased controllers. Additionaly the demo-application includes a small example which shows how to interface the build-in analog-digital converter (ADC) of a LPC2129 (AIN0). Download the complete archive [here] (timestamp 20070313, makefile, headers, linker-scripts and startup-code included, includes fixes from Alexey Shusharin Thanks). Code has been tested with arm-elf-gcc V4.0.0 and a Philips LPC2129 ARM7TDMI-S on a LPC-P2129-board.
old version 20060710 still available here

C++ with LPC ARM7TDMI/newlib/newlib-lpc


This example-application demonstrates C++ on ARM-controllers with the gnu/gcctoolchain. The gnu libstdc++ is in use. The newlib and newlib-lpc provide the needed "low level" functions. C++ inheritance and polymorphism are implemented in this example. Target is a Philips LPC2129 ARM7TDMI-S but the code should be rather portable as long as a gnu/gcc-toolchain is used and libstdc++ is supported for the target. Code, linker-scripts and makefile have been tested with WinARM. Download the complete source-archive here(timestamp 20060711, makefile, headers, linkerscripts and startup-code included). The newlib and newlib-lpc (syscalls for Philips LPC2000) must be provided by the build-environment as done by WinARM. (updates: added extern "C", added demo for classes from different object-files).

C++ with Cortex-M3, the GNU ARM cross-toolchain and newlib


This example-application demonstrates C++ on ARM-controllers with Cortex-M3 with the GNU cross-toolchain. The gnu libstdc++ is in use. C++ inheritance and polymorphism are implemented in this example. Target is a STM32F10x controller with ARM Cortex-M3 core but the code should be rather portable (i.e. for ARM7TDMI based controllers) as long as a GNU toolchain is used. The application has been tested with Codesourcery G++ lite for arm-eabi (Q1/2009) and a MINI STM32 board (mendium density STM32F103). The package includes full source-code with a minimal syscall implemenation, Makefile and linker-script. [Download] of the complete package (timestamp 20091223)
Changelog: 20091223: various modifications and updates, old version 20091205 should not be used anymore

Run selected Functions in RAM with arm-elf-gcc


This example-application demonstrates how to set-up the compiler and linker to execute selected functions from RAM. Shown in this example:

Declare functions in RAM (section attribute) Declare functions to be called by a "long-call" (long-call attribute) Linker-script-entries for the "function-section" Startup-code which transfers the function-code from ROM to RAM

Target for this example is a Philips LPC2129 ARM7TDMI-S but the code should be rather portable as long as a gcc-toolchain is used. Code, linker-scripts and makefile have been tested with WinARM (4/05). Download the complete sourcearchive here (timestamp 20050510, makefile, headers, linker-scripts and startup-code included).

GPIO, UART and interrupt example for the NXP LPC2378, NXP LPC2368 and other NXP LPC23xx/24xx devices
This code example demonstrates using the GNU-toolchain with the NXP LPC23xx/24xx family. It shows how to configure and use GPIO (i.e. LED blink, Button read), UART (buffered RX, interrupt) and timer-interrupts. and more. The basic C source-code is from the NXP example-collection (available from nxp.com) and has been adapted and extended a little bit. I have ported the startup assemblercode and added an interrupt-wrapper (incl. nesting) so porting of existing code for other toolchains is rather easy. Also included are scripts to upload the user-application to the internal flash with OpenOCD (testing). Download the example [here] (timestamp 20070629, makefile, headers, linker-scripts and startup-code, OpenOCD configuration and -scripts included). Code has been tested with arm-elf-gcc V4.1.2 (as in my WinARM 5/07-testing collection) with a NXP LPC2378 ARM7TDMI-S on an Olimex LPC-2378-STK board.
Changelog: 20070629: modified/fixed SWI-handler, demonstrates activation of IRQ-exceptions in user-mode thru swi-call (see startup-code and main()). The old version without swi-demo is still available [here] (timestamp 20070430)

Philips LPC213x/214x examples ported for the GNU-Toolchain


A ported version of the Philips LPC213x/LPC214x example "code bundle" to the GNU-toolchain (arm-elf-gcc) can be found on this page.

FreeRTOS example for LPC2138


An example for the LPC2106 on the Olimex LPC-P2106-board comes with the FreeRTOS-code. This is a ported version of the example to the LPC2138. The LEDhandling has been adapted to the Keil MCB2130 evaluation-board. The code has been tested with WinARM 3/06 (arm-elf-gcc 4.1.0). [Download] (timestamp 20060519, zip-Archive, ca. 200kBytes).

AT91SAM7 Examples
On my AT91 projects page you can find:

A GPIO example application for the Atmel AT91SAM7S64 (should work with all AT91SAM after minimal changes) which demonstrates usage of the general IO (LEDs/Buttons). An AT91SAM7 interrupts example which demonstrates "AIC"-interrupts by a timer and an external interrupt. An AT91SAM7 Serial-IO/UART example for the Atmel AT91SAM7S64 (should work with all AT91SAM after minimal changes) which demonstrates UART interfacing (serial I/O) in simple "polled" mode (no ISRs). An AT91SAM7 Serial-IO/UART and interrupt example for the Atmel AT91SAM7S64 (should work with all AT91SAM after minimal changes) which demonstrates UART interfacing (serial I/O), interrupt/exception-handling and lots of gcc-specials. Example application for the Atmel AT91SAM7S64 (should work with all AT91SAM7S after minimal changes) which demonstrates USB and UART interfacing (USB access via system-Driver/DLL, "pseudo modem" and virtual COM-port) An interface for the Embedded-Filesystem-Library and Chan's Filesystem Module to the AT91SAM7S-controllers (AT91SAM7S64, AT91SAM7S256 et al). To read and write data to SD/MMD memory-cards. With filesystemsupport (FAT). GNU-Port of the Atmel "MIPS" example with "gcc/as specials" AT91SAM7 SWI, Remap, GPIO, PIT and stdio Example C++ with the GNU-Toolchain on an AT91SAM7

All AT91 projects are now on my AT91 projects page

Analog Devices ADC7000 ARM7TDMI controller Examples


Please visit my ADI ARM-controller page.

STMicroelectronics ARM controller Examples


Please visit my STR7 page for information end example-codes.

ARMv7 Cortex-M3 examples (Luminary Mirco LM3S and STmicro STM32 series)
Please visit this page for further information and examples-applications controllers with for the Cortex-M3 ARM-core.

Using OpenOCD as flashprogramming tool


A short introduction on how to use OpenOCD as flash-programming tool can be found on this page.

Patched Version of the Keil ULINK Windows-Driver


I've got the Keil ULINK debugging-inferface togehter with the MCB2100 evalation board. The ULINK-driver on the CD included with the kit and the updated version of the driver available on the Keil Web-Site (written: 7.9.2005) did not work on my development-machine (Windows2000SP4+Rollup, old Intel "BX" board, USB1.1 onboard hostchip). I've spent some hours with this and even installed an additional PCI-USB-Card with a NEC USB 2.0 controller. But the problem is not caused by the hardware. Only a modified inf-file solved this issue. With this inf-File the ULINK could be used with the 1.1 and 2.0 USB-Ports. Get the inoffical inf-File here(zipArchive, ca. 19kB, Timestamp 20050824). Update: Keil has fixed the inf-file. An official version is available from keil.com (search the knowledge base for ulink driver).

LPC2106 ARM7 Interfacing with Maxim/Dallas Onewire Temperature Sensors (DS18x20)


This sample-application demonstrates interfacing Maxim/Dallas DS1820/DS18S20/DS18B20 with a LPC2106 ARM7TDMI controller using the Onewire-interface. The code detects all DS18x20 sensors on a bus and sends information via UART/RS232. Tested with a Philips LPC2106 at FOSC=14,7MHz/CCLK=58MHz. Timing has to be very precise for Onewire. This preliminary code still has a "tuning value" (see delay.h). Based on the AVR code. Code is not very "clean" since it has just been a test during the "T-Clock" development. Download the ARM7 source code here (Timestamp 20041114, makefile for WinARM and hex-file for the LPC-P2106 board included, 1-Wire Pin: P0.4).

LPC2106 ARM7 connected to Graphics-LCD


This sample-application demonstrates interfacing a KS0108/KS0107 graphics-LCD with a LPC2106 ARM7TDMI. Based on the "LPC2106 interrupt-UART"-sample (see above) which has been extended with a glcd-module. Find out more on this page.

"T"-Clock: ARM7 Radio-ControlledClock with Graphics-LCD


This sample-application demonstrates interfacing a KS0108/KS0107 graphics-LCD, Onewire Temperature-Sensor and a DCF77 time-signal receiver with a LPC2106 ARM7TDMI. Find out more on this page.

(*) Remark about Olimex ARM Demo-Boards: Please verify that the definitions for connected hardware (like LED, Buttons etc.) in the source-code match the connections on the demo-board in use. Olimex produces different versions of the boards and sometimes the version is not obvious. If in doubt: measure the connections. I have the Olimex LPC P-1 which has been replaced by the LPC-P2106 and the LPC-P2129 which has been replaced by the LPC-P2129-B. Both successor boards differ from the old boards. I.E.: Buttons on LPC-P2129

are connected to P0.10 and P0.11 on the LPC-P2129_B they are connected to P0.15 and P0.16. (Thanks to Chris "O2" for the information about the P2129-B-Board.)

To my Atmel AVR-Projects page

Martin Thomas

Last mod.:

This NXP LPC2148 development board features a 170-hole solderless prototyping breadboard and several built-in peripherals such as a buzzer, LEDs, potentiometer, PS/2, USB, two serial ports, SD/MMC slot, and more. No external programmer is required; the LPC2148 can be programmed from your PC via one of the DB9 serial ports. A standard 20-pin ARM JTAG interface also is provided for programming and debugging. The board has a connector for attaching an ESD-02 Bluetooth module (not included). The LPC2148 is based on a 32-bit ARM7TDMI-S CPU core with realtime emulation and embedded trace support, combining a microcontroller with 512 kB embedded high-speed Flash memory. A 128-bit wide memory interface and a unique accelerator architecture enables 32-bit code execution at the maximum clock rate. For critical code size applications, the alternative 16-bit Thumb mode reduces code by more than 30 percent with minimal performance penalty. Due to their tiny size and low power consumption, LPC2148 are ideal for applications where miniaturization is a key requirement, such as access control and point-of-sale. Serial communications interfaces ranging from a USB 2.0 Full-speed device, multiple UARTs, SPI, SSP to I2C-bus and 40 kB on-chip SRAM make these devices well suited for communication gateways and protocol converters, soft modems, voice recognition and low-end imaging, providing both large buffer size and high processing power. Various 32-bit timers, dual 10-bit ADC(s), 10-bit DAC, PWM channels and 45 fast GPIO lines with up to nine edge- or levelsensitive external interrupt pins make these microcontrollers suitable for industrial control and medical systems.

LPC2148 Development Board Features


LPC2148 ARM7 Microcontroller Standard 20-pin ARM JTAG connector USB connector Two RS232 connectors SD/MMC card connector PS/2 connector Two user buttons Potentiometer connected to ADC Two LEDs Buzzer SPI connection 2-Wire point connection 170-point mini-breadboard RESET button On-board voltage regulator 3.3V Barrel and screw-terminal power connectors (6V DC required) 12 MHz main crystal 32.768 kHz crystal RTC backup battery Socket for ESD-02 Bluetooth module (not included) Dimensions: 12.6 x 9.5 mm (5" x 3.75")

LPC2148 Development System Contents


JX-2148 Board Quick-start guide One RS232 serial cable Ten 7cm jumper wires CD-ROM with software and sample code

System Requirements

IBM-compatible PC with at least one USB and one RS232 port (2x RS232 ideally) Windows XP Operating System Keil Vision3 or Keil ARM tool kit evaluation version. Download at www.keil.com LPC2000 Flash In-System Programming Utility software from NXP DC power adapter (+9V 500mA recommended) An additional serial cable if using UARTs at the same time (or ISP and a UART) PS/2 Keyboard or mouse if you want to use the PS/2 USB cable, standard A/B type, maximum 3m length, if using USB interface ARM debugger/programmer if you need JTAG in-circuit debugging capability

Download JX-2148 user manual Country of Origin: Thailand

Optional Recommended Products for this Item


USB 2.0 Cable, 6ft., A-Male / B-Male Serial Cable, 6ft., DB9 M/F Power Supply 3-12V DC, U.S. plug, 6 connection tips Power Supply 3-12V DC, US/UK/Euro/AU Plugs, 100-240VAC

+ + + +

US$6.00 US$6.00 US$11.00 US$13.00

he following links provide useful background information for this microcontroller and using this controller board. Data Sheets LPC2148 Data Sheet: NXP - LPC2148 Data Sheet LPC214X User Manual: NXP - LPC2148 User Manual LPC2000 Series Code Examples: NXP - ADC, EINT, I2C, SPI etc Code Examples Books Compilers and Programming Tools Keil: DB-ARM Compiler Useful Websites NXP (formerly Philips): To NXP website Circuit Cellar Magazine: To Circuit Cellar Website User Tips If you have some useful tips or relevant information that would be helpful to other users, please send it totechnical@futurlec.com | Main Page | Technical Data | Accessories | Tips and Tricks |

This GPS based car speed and position logger is based on Olimex LPC2148 project board, which is wired to GPS receiver. GPS receiver is interfaced via serial port so not much of soldering.

Software is based on FreeRTOS where ChanFS file system is used for storing logged data in SD/MMC FAT16 formatted card. It also has USB serial port emulation which enables to monitor NMEA sequences or simply retrieve logs as from mass storage device without removing CD/MMC card. Project files for WinARM GCC can be downloaded here.

You might also like