Skip to content

Bare Metal gnu-none-eabi CMSIS DSP_LIB CORTEX-M3 QEMU lm3s811 Startup Project

Notifications You must be signed in to change notification settings

xvan/CMSIS_LM3S

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CMSIS_LM3S

Hi There!!!

##What is This? This is a LM3S Cortex-M3 Series startup project using CMSIS DSP_Lib, NEWLIB and the arm-none-eabi-gcc toolchain.

##Why the LM3S Series? At this time is the only Cortex-M3 supported by QEMU so this is intended as a ready to run project meanwhile you get a real development board.

##What do I need? This was tested with:

  • newlib v2.1
  • arm-none-eabi-gcc v4.8.2
  • arm-none-eabi-gdb v7.6.50
  • QEMU v2.0.0

All these tools are available on debian/ubuntu standard repositories.

##How do I compile this? Edit makedefs file to point to your toolchain, then execute:

make

##How do I run this on QEMU?

cd ./examples/uart_hello_world/gcc
qemu-system-arm -M lm3s6965evb -nographic -kernel uart_hello_world.bin

Ctrl+a x to quit QEMU

##How do I debug this with GDB? Make with the DEBUG symbols

make clean
make DEBUG=1

Run QEMU stopped on the Reset_Handler with a dubugger server:

cd ./examples/uart_hello_world/gcc
qemu-system-arm -M lm3s6965evb -nographic -kernel uart_hello_world.bin -s -S

On another terminal connect GDB to QEMU:

cd ./examples/uart_hello_world/gcc
arm-none-eabi-gdb

And on the gdb prompt execute:

file uart_hello_world.axf
target remote localhost:1234

##How do I link against the DSP_LIB? You need to edit your project's Makefile:

  1. Modify the VPATH variable on the project to include the required DSP_LIB subdirectories.

  2. Add the needed objects as a requirement for the .axf task
    Make will automagically generate them.

Example: examples/arm_fir_example/Makefile
Relevant code lines for arm_fir_f32.c and arm_fir_init_f32.c:

VPATH=../../CMSIS/DSP_Lib/Source/FilteringFunctions/
${COMPILER}/arm_fir_example_f32.axf: ${COMPILER}/arm_fir_f32.o
${COMPILER}/arm_fir_example_f32.axf: ${COMPILER}/arm_fir_init_f32.o

##Licences and stuff: Linker, startup and configuration files for the lm3s were taken from Stellaris CMSIS Package
Makefiles were also taken from Stellaris CMSIS Package and slightly modified to work with CMSIS DSP_Lib examples
All conserve the original LMI lincese on the file header.

./CMSIS/DSP_Lib and ./CMSIS/Include files are released under the terms of the BSD licence.

UART hello world and QEMU debug instructions were adapted from [this blog post] (https://balau82.wordpress.com/2010/02/28/hello-world-for-bare-metal-arm-using-qemu/).

For everything else send me a cookie.

About

Bare Metal gnu-none-eabi CMSIS DSP_LIB CORTEX-M3 QEMU lm3s811 Startup Project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages