I try to create custom board for STM32H743IIT MCU.
I used this guide: steps to create a new STM32 platform - | Mbed
So i create folder C:\Users\Username\.platformio\packages\framework-mbed\targets\TARGET_STM\TARGET_STM32H7\TARGET_STM32H743xI\TARGET_STM32H743IITx and put there three files:
- PeripheralPins.c
- PinNames.h
- system_clock.c
Then i added board into this file: C:\Users\Username\.platformio\packages\framework-mbed\targets\targets.json
targets.json
"STM32H743IITx": {
"inherits": [
"MCU_STM32"
],
"core": "Cortex-M7FD",
"mbed_rom_start": "0x08000000",
"mbed_rom_size": "0x200000",
"mbed_ram_start": "0x24000000",
"mbed_ram_size": "0x80000",
"extra_labels_add": [
"STM32H7",
"STM32H743xI"
],
"config": {
"d11_configuration": {
"help": "Value: PB_5 for the default board configuration, PA_7 in case of solder bridge update (SB33 on/ SB35 off)",
"value": "PB_5",
"macro_name": "STM32_D11_SPI_ETHERNET_PIN"
},
"clock_source": {
"help": "Mask value : USE_PLL_HSE_EXTC | USE_PLL_HSE_XTAL (need HW patch) | USE_PLL_HSI",
"value": "USE_PLL_HSE_EXTC|USE_PLL_HSI",
"macro_name": "CLOCK_SOURCE"
},
"lpticker_lptim": {
"help": "This target supports LPTIM. Set value 1 to use LPTIM for LPTICKER, or 0 to use RTC wakeup timer",
"value": 1
},
"hse_value": {
"help": "HSE default value is 25MHz in HAL",
"value": "8000000",
"macro_name": "HSE_VALUE"
}
},
"components_add": [
"FLASHIAP"
],
"macros_add": [
"STM32H743xx",
"EXTRA_IDLE_STACK_REQUIRED",
"MBED_TICKLESS"
],
"overrides": {
"lpticker_delay_ticks": 0,
"network-default-interface-type": "ETHERNET"
},
"supported_form_factors": [
"ARDUINO"
],
"detect_code": [
"0836"
],
"device_has_add": [
"ANALOGOUT",
"CAN",
"CRC",
"TRNG",
"FLASH",
"MPU",
"EMAC"
],
"device_name": "STM32H743II",
"bootloader_supported": true
},
I added stm32h743iitx.json file into C:\Users\Username.platformio\platforms\ststm32\boards
stm32h743iitx.json
{
"build": {
"core": "stm32",
"cpu": "cortex-m7",
"extra_flags": "-DSTM32H7xx -DSTM32H743xx",
"f_cpu": "480000000L",
"mcu": "stm32h743iit",
"product_line": "STM32H743xx",
"variant": "MCU_H743II"
},
"connectivity": [
"can",
"ethernet"
],
"debug": {
"default_tools": [
"stlink"
],
"jlink_device": "STM32H743II",
"onboard_tools": [
"stlink"
],
"openocd_board": "st_nucleo_h743zi",
"svd_path": "STM32H7x3.svd"
},
"frameworks": [
"cmsis",
"stm32cube",
"mbed",
"zephyr"
],
"name": "MCU H743IITx",
"upload": {
"maximum_ram_size": 524288,
"maximum_size": 2097152,
"protocol": "stlink",
"protocols": [
"jlink",
"stlink",
"blackmagic",
"mbed"
]
},
"vendor": "ST"
}
And when i try to build my project i get an error:
Processing stm32h743iitx (platform: ststm32; framework: mbed; board: stm32h743iitx)
----------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/ststm32/stm32h743iitx.html
PLATFORM: ST STM32 (8.1.0) > MCU H743IITx
HARDWARE: STM32H743IIT 480MHz, 512KB RAM, 2MB Flash
DEBUG: Current (stlink) On-board (stlink) External (blackmagic, jlink)
PACKAGES:
- framework-mbed 6.60200.200722 (6.2.0)
- toolchain-gccarmnoneeabi 1.90201.191206 (9.2.1)
Collecting mbed sources...
Failed to extract configuration for STM32H743IITX.
It might not be supported in the this Mbed release.
UPD: i made the same for Mbed Studio and it all works there. But i want to use platformio.