ARM7/LPC2xxx Release

IAR Embedded Workbench


General

Release consists of the RTOS sources and three sample projects - see Release description for details. Each sample located in separate folder. Structure of test project folder (folders are in brackets '[]'):

[Config]          - linker scripts and other utilities
[Exe]             - executable product[s]
[List]            - listings and other temporary text files
[Obj]             - objects and other intermediate files
[settings]        - IAR IDE auxiliary files
[Src]             - test project sources
slon.ewd          - IAR IDE auxiliary file
slon.ewp          - IAR IDE project
slon.eww          - IAR IDE workspace

slon is test project name.

Structure of the RTOS folder:

scmRTOS
  Common            - common RTOS sources
  ARM7              - portable part

See Distribution section and below about release using manners.


Building

There is only one way provided to build any sample - IAR IDE.

Just launch IDE, open appropriate workspace (*.eww file), choose project target (RAM/Flash), and build the project. Default chip type, the sample project is targeted for is LPC2119. To alter chip type, three settings has to be changed:

  1. Project->Options->General Options->Target->Device
  2. Project->Options->C/C++ Compiler->Preprocessor->Defined symbols (consult device.h for appropriate value)
  3. Project->Options->Assembler->Preprocessor->Defined symbols (consult device.h for appropriate value)

If user want to use his own build system [1] he has to specify the following command-line options for various tools:

Assembler:

-DLPC2119  (or another suitable LPC2xxx chip type, consult device.h)
--cpu ARM7TDMI
--fpu None
-r
-OObj
-LList
-ISrc
-I..\scmRTOS\Common
-I..\scmRTOS\ARM7
-I$TOOLKIT_PATH$\arm\INC

Compiler:

-e
--eec++
-s9
-DLPC2119  (or another suitable LPC2xxx chip type, consult device.h)
-lCN List
-o Obj
--debug
--cpu_mode thumb
--endian little
--cpu ARM7TDMI-S
--stack_align 4
--interwork
--fpu None
--dlib_config $TOOLKIT_PATH$\arm\LIB\dl4tptinl8n.h
-ISrc
-I$TOOLKIT_PATH$\arm\INC\
-I../scmRTOS/Common
-I../scmRTOS/ARM7

Linker:

-s __program_start
-r
-xmseo
dl4tptinl8n.r79
-o Exe\slon.d79
-l List\slon.map
-I $TOOLKIT_PATH$\arm\LIB
-f Config\LPC2xxx_FLASH.xcl (or -f Config\LPC2xxx_RAM.xcl)
-Osimple-code=Exe\slon.sim

Note

where $TOOLKIT_PATH$ - path to folder with toolkit installed.


Addind support of new device

This release supports only LPC2119, LPC2129, LPC2212, LPC2214 devices. If user wants to use other LPC2xxx family device supported by compiler, two files has to be changed: device.h in Src folder and OS_Target_core.h in scmRTOS/ARM7 folder. Contence of those files is simple enought.


[1]For example, make utility or simple bat file.