Skip to content

This project gives a good starting point for developing a bare metal embedded program on the arm cortex m3/m4.

Notifications You must be signed in to change notification settings

chgroeling/arm-cortex-m4-base

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ARM Cortex-M4 Base Documentation

This project gives a good starting point for developing a bare metal embedded program on the arm cortex m3/m4. It uses the gnu c and c++ compiler for building, therefore no expenses are necessary to get it running.

Toolchain

The following programs are used for development:

Building binaries

The Makefile uses the environment variable ARM_GCC_PATH to locate the arm gcc compiler. This variable must be set to the installation directory of the compiler. On windows this path should not contain any whitespaces.

To build:

set ARM_GCC_PATH=...path-to-buildchain...
make

To get further information on the built elf file:

make info

Building the documentation

To build the documentation:

make doc

Thread safety

Depending on the enabled options during newlibc building the function malloc is able to lock and unlock interrupts. To the time of writing this locking mechanismn is disabled when using the newlibc-nano prebuilts. Therefore calls to malloc and new are not thread safe. Do not call them from different interrupts or threads.

Usefull resources

This section lists some usefull resources which I constantly use when working on an cortex m4 target.

Cortex M4 Technical Reference Manual

The "Cortex M4 Technical Reference Manual" can be found here.

Some interesting topics in this manual are:

Cortex-M4 Devices Generic User Guide

The "Cortex-M4 Devices Generic User Guide" can be found here.

Some interesting topics in this user guide are:

GCC

The "GCC Documentation (4.9.3)" can be found here. It is quite usefull as reference for the used compiler switches.

For this project the following topics in this documentation are of special interest:

Make

The "GNU Make Documentation" can be found here.

For this project the following topics in this documentation are of special interest:

Binutils

The "Binutils Documentation" can be found here.

The following tools are especially useful:

  • nm - Lists symbols from object files.
  • objdump - Display information from object files.
  • size - List section sizes.
  • addr2line - Translates addresses into file names and line numbers.

Assembler - as

The Assembler is part of the binutils package. Its documentation can be found here.

For this project the following topics in this documentation are of special interest:

Linker - ld

The Linker is part of the binutils package. Its documentation can be found here.

For this project the following topics in this documentation are of special interest:

Doxygen

The "Doxygen" documentation can be found here.

Libraries

Redhat newlibc

The "newlibc" documentation can be found here.

For this project the following topics in this documentation are of special interest:

Books

This section contains some book I found very helpful when programming on the Cortex M4:

  • "Definitive Guide to ARM Cortex-M3 and Cortex-M4 Processors" from Joseph Yiu
  • "System Interfaces and Header Issue 4 Version 2" from the open group

About

This project gives a good starting point for developing a bare metal embedded program on the arm cortex m3/m4.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages