Hi all,
I’ve been using platformio for a long time already, but was always lucky to find already available boards for my projects. Now I have a custom board with a STM32F303RET6 , which does not have a generic board configuration.
As the NUCLEO-F303RE uses the same mcu I thought I could just use that configuration, but it isn’t that easy:
I have an external ST-LINK V2 connected. Flashing with CubeIDE works perfectly, but flashing through PlatformIO only works if I press the reset button just in the right second before flashing. I don’t have to press reset with CubeIDE at all.
During flashing I get the following output:
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
[stm32f3x.cpu] halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x0800283c msp: 0x20010000
** Programming Started **
Warn : Adding extra erase range, 0x0800394c .. 0x08003fff
** Programming Finished **
** Verify Started **
** Verified OK **
** Resetting Target **
[stm32f3x.cpu] halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x2000002e msp: 0x20010000
shutdown command invoked
After flashing the program doesn’t seem to start. I have a status LED at PA10, which I want to blink as a first sign of life (I know it’s functional, as I can make it work with CubeDE). The test program does not make it blink:
auto led_pin = pinNametoDigitalPin(PA_10);
void setup() {
pinMode(led_pin, OUTPUT);
}
void loop() {
digitalWrite(led_pin, HIGH);
delay(500);
digitalWrite(led_pin, LOW);
delay(500);
}
I also tried manually setting led_pin = 2; , but it didn’t help either.
Any hints what I’m doing wrong or what I could try instead?