- https://os.mbed.com/docs/mbed-os/v6.15/build-tools/mbed-cli-2.html
- https://github.com/ARMmbed/mbed-tools
- https://github.com/ARMmbed/mbed-os-5-docs/blob/development/docs/porting/custom-target-porting.md
- https://forums.mbed.com/t/mbed-cli-2-not-configuring-project/12588
- https://os.mbed.com/docs/mbed-os/v6.15/build-tools/use.html
- https://docs.docker.com/get-docker/
- https://code.visualstudio.com/docs/devcontainers/containers
Visual Studio Code
IDE + required extensionsDocker
installed on the host
-
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
-
Start the dev container using the
Dev Containers: Open Workspace in Container...
command. -
Fetch and init dependencies
git submodule update --init --recursive
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
Use command CMake: Build
.
cmake -S . -B cmake_build/CORE2/release/GCC_ARM -GNinja
cmake --build cmake_build/CORE2/release/GCC_ARM
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
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
mbed-tools sterm -b 9600 -p <port>
https://husarion.com/manuals/core2/
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.