I have created a custom embedded board, but when I try to build for mbed, platformio shows this error message:
CONFIGURATION: https://docs.platformio.org/page/boards/ststm32/Clicker2_for_STM32.html
PLATFORM: ST STM32 8.0.0 > Clicker 2 for STM32
HARDWARE: STM32F407VGT6 168MHz, 128KB RAM, 1MB Flash
DEBUG: Current (stlink) External (blackmagic, jlink, stlink)
PACKAGES:
- framework-mbed 6.60200.200722 (6.2.0)
- toolchain-gccarmnoneeabi 1.90201.191206 (9.2.1)
Collecting mbed sources…
Detected custom target file
Failed to extract configuration for CLICKER2_FOR_STM32.
It might not be supported in the this Mbed release.
=========================================================================================================================================== [FAILED] Took 0.95 seconds ===========================================================================================================================================
The terminal process “C:\Users\chrigrat.platformio\penv\Scripts\platformio.exe ‘run’” terminated with exit code: 1.
platformio.ini:
[env:Clicker2_for_STM32]
platform = ststm32
board = Clicker2_for_STM32
framework = mbed
board_build.mbed.ldscript = $PROJECTSRC_DIR/TARGET_STM32F407xG/device/TOOLCHAIN_GCC_ARM/STM32F407XG.ld
build_flags =
-I$PROJECTSRC_DIR/TARGET_STM32F407xG
-I$PROJECTSRC_DIR/TARGET_STM32F407xG/device
-I$PROJECTSRC_DIR/TARGET_STM32F407xG/TARGET_CLICKER2_FOR_STM32
custom_targets.json:
{
"Clicker2_for_STM32": {
"inherits": [
"MCU_STM32"
],
"core": "Cortex-M4F",
"extra_labels_add": [
"STM32F4",
"STM32F407xG"
],
"macros_add": [
"STM32F407xG"
],
"config": {
"clock_source": {
"help": "Mask value : USE_PLL_HSE_EXTC (need HW patch) | USE_PLL_HSE_XTAL | USE_PLL_HSI",
"value": "USE_PLL_HSE_XTAL|USE_PLL_HSI",
"macro_name": "CLOCK_SOURCE"
}
},
"detect_code": [
"1234"
],
"device_has_add": [
"SERIAL_ASYNCH",
"FLASH",
"MPU"
],
"device_name": "STM32F407VG"
}
}
board/Clicker2_for_STM32.json:
{
"build": {
"core": "stm32",
"cpu": "cortex-m4",
"extra_flags": "-DSTM32F4 -DSTM32F407xx -DSTM32F40_41xxx",
"f_cpu": "168000000L",
"mcu": "stm32f407vgt6",
"variant": "CLICKER2_FOR_STM32",
"product_line": "STM32F407xx",
"zephyr": {
"variant": "stm32f407"
}
},
"debug": {
"default_tools": [
"stlink"
],
"jlink_device": "STM32F407VG",
"openocd_board": "stm32f407vg",
"openocd_target": "stm32l4x",
"svd_path": "STM32F40x.svd"
},
"frameworks": [
"arduino",
"mbed",
"cmsis",
"spl",
"libopencm3",
"stm32cube",
"zephyr"
],
"platforms": [
"ststm32"
],
"name": "Clicker 2 for STM32",
"upload": {
"maximum_ram_size": 131072,
"maximum_size": 1048576,
"protocol": "stlink",
"protocols": [
"jlink",
"stlink",
"blackmagic",
"mbed"
]
},
"url": "https://www.mikroe.com/clicker-2-stm32f4",
"vendor": "Mikroe"
}
Files in src/TARGET_STM32F407xG are copied from .platformio\packages\framework-mbed@6.51504.200716\targets\TARGET_STM\TARGET_STM32F4\TARGET_STM32F407xG (which uses the same uC) and edited to fit the new board.
the whole project can be checked out here: Bitbucket
How can this be fixed?