[go: up one dir, main page]

Skip to content
/ core2-mbed6-template Public template

CORE2 board development template in Mbed OS and CLI2 in dev container

Notifications You must be signed in to change notification settings

byq77/core2-mbed6-template

Repository files navigation

CORE2 firmware template for development with mbed-os

Web resources

Prerequisites

  • Visual Studio Code IDE + required extensions
  • Docker installed on the host

Setup environment

  1. Download mbed-os library.

    git clone -b master --depth 1 --single-branch https://github.com/ARMmbed/mbed-os ~/mbed-os 

    Recommended:

    gh repo clone ARMmbed/mbed-os ~/mbed-os -- -b master --depth 1 --single-branch
  2. Start the dev container using the Dev Containers: Open Workspace in Container... command.

  3. Fetch and init dependencies

    git submodule update --init --recursive

Generate cmake configuration

Use command.: Tasks: Run Task and select GENERATE CONFIG FOR CMAKE.

mbed-tools configure -m CORE2 -t GCC_ARM -b release --mbed-os-path $MBED_OS_LIB_PATH --custom-targets-json lib/stm32customtargets/custom_targets.json

Build

Use command CMake: Build.

Build using cmake

cmake -S . -B cmake_build/CORE2/release/GCC_ARM -GNinja
cmake --build cmake_build/CORE2/release/GCC_ARM

Build using mbed-tools

mbed-tools compile -m CORE2 -t GCC_ARM -b release --mbed-os-path $MBED_OS_LIB_PATH --custom-targets-json lib/stm32customtargets/custom_targets.json

Uploading firmware using the core2-flasher tool

Connect CORE2 to your computer via micro-usb port and use the core2-flasher tool (from this repo) to upload a generated firmware.hex file.

To flash firmware using core2-flasher run:

./core2-flasher ./cmake_build/CORE2/release/GCC_ARM/firmware.hex

Serial

mbed-tools sterm -b 9600 -p <port>

CORE2

https://husarion.com/manuals/core2/

Pinout

This board pinout is described in src/TARGET_CORE2/PinNames.h file. Pin names defined in that file are similar to ones used by hFramework and should be easily identifiable. Peripheral functions available for each pin are described in the PeripheralPinMaps.h file.

About

CORE2 board development template in Mbed OS and CLI2 in dev container

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published