A template for building firmware for the STM32L1xx
Assembly C
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
.gitignore
Makefile
README.md
stm32l1xx.ld

README.md

STM32L1xx Template

Toolchain

You will need an ARM bare-metal toolchain to build code for STM32L1 targets. You can get a toolchain from the gcc-arm-embedded project that is pre-built for your platform. Extract the package and add the bin folder to your PATH.

You will also need to download and extract the STM32L1 StdPeriphLib, which can be found here.

Writing and Building Firmware

  1. Clone the stm32l1xx-template repository (or fork it and clone your own repository).

    git clone git@github.com/uctools:stm32l1-template
    
  2. Modify the Makefile:

    • Set TARGET to the desired name of the output file (eg: TARGET = main)
    • Set SOURCES to a list of your sources (eg: SOURCES = main.c startup_gcc.c)
    • Set PERIPHLIB_PATH to the full path to where you extracted the STM32L1 peripherial library.
    • Set PART_TYPE to the type of your part. This can be md (medium density), mdp (medium density plus), or hd (high density).
  3. Run make

  4. The output files will be created in the 'build' folder

Flashing

You can flash and using your device using stlink. More information is available on the stlink project page.

Supported Hardware

This template has been tested on the STM32L Discovery development board.