![Techno-innov LPC1224 Скачать руководство пользователя страница 13](http://html1.mh-extra.com/html/techno-innov/lpc1224/lpc1224_reference-manual_1070062013.webp)
LPC1224_BO_SRM
Board v0.3
5 Software
The LPC micro-controller family uses ARM cores, which make them very easy to use. Apart from a few wrappers,
all the code can be written in C and compiled using gcc.
ARM, NXP and other vendors provide sample code, but published under many different licences. The code we
provide for the LPC1224 break-out board is published under the well known GPLv3 licence.
5.1 Sample Source Code
5.1.1 Grab the sources
An example application code can be downloaded from
our git repository
6
using the following clone command :
user@host:
˜
/sw$
git clone http://gitclone.techno-innov.fr/modules
The LPC1224 break-out board can use the code from the
apps/base
sub-directory as there are very few
differences between the LPC1224 break-out board and the GPIO Demo module. The only differences are the lack
of EEPROM memory and temperature sensor on the I2C bus and the SPI CS pin which is not used for I2C clock
activation for the EEPROM and thus fully available to the user.
5.1.2 Sample code content
This code provides the micro-controller definitions (Cortex-M0 specific definitions, registers, interrupts ...) and
the routines required to start the micro-controller (bootstrap, vector table, power state, flash, clocks).
At the time of writing it also provides a basic set of library functions and the drivers for the interfaces found
on the module. The list of supported features and interfaces is updated as the development goes on, so read the
README file for the full list of supported features and interfaces.
The code has been split in five parts :
core/
,
drivers/
,
extdrv/
,
apps/
and
lib/
(with the associated
directories under
include/
for the headers) :
•
core
: Contains all the required parts and system initialisations. Many functions in there are defined as
weak aliases of dummy functions, so the code compiles even if no drivers are used. When these functions are
redefined in the driver code they override the weak definition.
•
lib
: Contains the implemented parts of the small C library for our code. The micro-controller does not run
a full Linux system, so the gnu libc must not be used, and even a µClibc is much more than what’s required.
Most of the code in these files come from the kernel implementations of libc parts.
•
drivers
: Contains the drivers for the different interfaces found on the module.
•
extdrv
: Provides drivers for external components, either on the module (EEPROM, status led, tmp101
temperature sensor), or to be purshased separately and connected to the module.
The number of external parts supported will grow with time. Note that it may not be possible to use all of
them at the same time.
•
apps
: Provides sample applications for the different modules made by Techno-Innov which demonstrate
either LPC1224 interfaces or external drivers, which can be used as base for your own developments.
Most modules will have their own directory under
apps/
. The LPC1224 break-out board uses the
base/
6.
http://git.techno-innov.fr/?p=modules;a=summary
Techno-Innov - DomoTab
http://www.techno-innov.fr
page 13 /
22