Skip to content

Example repository that shows how to use custom targets with Mbed CE

Notifications You must be signed in to change notification settings

mbed-ce/mbed-ce-custom-targets

Repository files navigation

Mbed CE Custom Targets Example

This project shows how to use Mbed OS Community Edition to create custom targets and also defines the standard structure of custom target project from Mbed CE perspective.

This repo includes three different custom targets you can use based on the NUCLEO_L452RE_P target. (No real reason it's this target in particular, it's just a board I happen to use).

  1. L452RE_SIMPLE, which is simply a clone of NUCLEO_L452RE_P with a different name and some extra compile definitions applied. This would be an example of creating a custom target for your board by simply aliasing one of the built-in Mbed targets. This target is created only by custom_targets.json and custom_targets/CMakeLists.txt. It contains no source files.
  2. L452RE_CUSTOM_PINMAP, which replaces the pinmap files included with Mbed with custom ones. This is a common task if you are e.g. using a different chip package and want to have correct pin names (for STM32 there is a generator).
  3. L452RE_CUSTOM_CLOCK, which takes it one step further and replaces the system clock configuration code in Mbed with a new source file. This is a fairly common task if you create a custom board and want to regenerate the clocking code from another source, such as STM32Cube IDE or MCUXpresso.

How to set up this project:

  1. Clone it to your machine. Don't forget to use --recursive to clone the submodules: git clone --recursive https://github.com/mbed-ce/mbed-ce-custom-targets.gitand update MbedOS with git submodule update --remote mbed-os (run this command from the mbed-ce-custom-targets folder)
  2. Set up the GNU ARM toolchain (and other programs) on your machine using the toolchain setup guide.
  3. Set up the CMake project for editing. We have three ways to do this:
  4. Use one of the target names listed above and choose an upload method according to your requirements. Default settings is target L452RE_SIMPLE and upload method STM32CUBE.

About

Example repository that shows how to use custom targets with Mbed CE

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published