#3 HAL for Stellaris EKK-LM3S811 (cortex-M3)
This port adds eCos support for the LM3S811 evaluation board from Luminary Micro. The board comes along with an ARM cortex-M3 based microcontroller. In order to debug the target with a JTAG debugger, few simple hardware modications are required. Figure extracted from document EK-LM3S811-UM-05:
Remove R38, R19, D4 and connect the JTAG connector pin number 1 to a 3.3 Volts point.
The Stellaris LM 800 Series has 64KB of FLASH and 8KB of SRAM. The eCos HAL supports all devices of the 800 Series (LM3S800 to LM3S828). Due to limited RAM ressources, the port targets standalone ROM application using the eCos kernel in single user thread environment. The eCos IDLE thread can also be used for additional user purpose. ADC and I2C device drivers are included.
I. Compiling the standalone ROM ADC test application
The Stellaris LM 800 Series HAL includes a ADC test application located in devs/adc/cortexm/lm3s/current/tests/lm3s_adc_test.c. To compile the
test application, the steps are:
$ cd ek-lm3s811
$ ecosconfig new ek-lm3s811 minimal
$ ecosconfig import $ECOS/hal/cortexm/lm3s/ek_lm3s811/current/misc/default_ROM.ecm
$ ecosconfig add io_adc
$ econfigtool ecos.ecc (enable the ADC device and select the wanted channels and sampling rate).
$ ecosconfig tree
$ make -s tests IGNORE_LINK_ERRORS=y
The resulting elf file is: ek-lm3s811/install/tests/devs/adc/cortexm/lm3s/current/tests/lm3s_adc_test
- Create a binary file that can be programmed to FLASH using the following command:
arm-eabi-objcopy -O binary ..../lm3s/current/tests/lm3s_adc_test lm3s_adc_test.bin
- Program the binary file to the internal FLASH at address 0x0 (using OpenOCD for instance) and restart the target. Dump from the serial port (USB to Serial):
II. Current HAL (diff from the ecos public repository)
The HAL is now part of eCos public repository at:
$ cvs -z3 -d :pserver:firstname.lastname@example.org:/cvs/ecos co -P ecos
The packages are: