Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
6 years, 2 months ago.
Possibility to run mbed on MCU stmf401re on a custom PCB
Hi, I would like to design a PCB with MCU STM32F401RE (no with Nucleo Board, but only MCU). If I insert the MCU and the programmer (stm32f103cbt6 ) on my PCB, is it possible to run mbed and program the MCU with that libraries?
Waiting for your feedback, I send you my best regards.
Thank you.
Enrico
1 Answer
6 years, 2 months ago.
Hi Enrico
I'm doing roughly what you requested. I created my own target based on TARGET_NUCLEO_F401RE in my project folder. Then I modified system_clock.c, PinNames.h, PeripheralPins.c and PeripheralNames.h according to my custom board. Next step was creating "custom_targets.json"
{
"MyTarget": {
"inherits": ["FAMILY_STM32"],
"core": "Cortex-M4F",
"default_toolchain": "GCC_ARM",
"public": true,
"extra_labels_add": ["STM32F4", "STM32F401xE", "STM32F401CE"],
"OUTPUT_EXT": "bin",
"config": {
"clock_source": {
"help": "Mask value : USE_PLL_HSE_EXTC | USE_PLL_HSE_XTAL (need HW patch) | USE_PLL_HSI",
"value": "USE_PLL_HSI",
"macro_name": "CLOCK_SOURCE"
}
},
"overrides": {
"stdio_uart_tx": "PA_9",
"stdio_uart_rx": "PA_10",
"lse_available": "0"
},
"device_has_add": ["SERIAL_ASYNCH", "FLASH", "MPU" ],
"device_name": "STM32F401CE"
},
}
To flash my firmware I'm using ST-Link and not mbed cli.