PlatformIO Community

Code uploads fine but it is not executing on the board

I’ve recently switched from windows to linux as my main os. So I think its driver related but I’m getting no errors to debug. Any help would be greatly appreciated.

Dev Board - STM32F3 Discovery
Framework - CMSIS
OS - Ubuntu 20.04
Lastest version of Vscode and Platformio
Using the provided CMSIS Blink Sketch with no changes

PS. I’m new to this forum, maybe I posted this on the wrong thread, if so tell me ill fix it right away.

Exact platformio.ini? The firmware requires that you activate the STM32F3 macro via build_flags.

You are running this on the STM32 on this exact board, yes?

YES that’s my board. Here is the ini file config (I removed the other boards)
platform = ststm32
framework = cmsis
board = disco_f303vc

Try adding

build_flags = -DSTM32F3

to the platformio.ini.

Does a upload result in “SUCCESS”?

If you have multiple projects opened in VSCode, did you use the project environment switcher to select the right one?

Yes i only have one project open and it does result in success also i added your build flag and nothing changed. Here is the log

Processing disco_f303vc (platform: ststm32; framework: cmsis; board: disco_f303vc)

Verbose mode can be enabled via -v, --verbose option
HARDWARE: STM32F303VCT6 72MHz, 48KB RAM, 256KB Flash
DEBUG: Current (stlink) On-board (stlink) External (blackmagic, cmsis-dap, jlink)

  • framework-cmsis 2.50501.200527 (5.5.1)
  • framework-cmsis-stm32f3 2.3.4
  • tool-dfuutil 1.9.200310
  • tool-ldscripts-ststm32 0.1.0
  • tool-openocd 2.1100.0 (11.0)
  • tool-stm32duino 1.0.1
  • toolchain-gccarmnoneeabi 1.70201.0 (7.2.1)
    LDF: Library Dependency Finder →
    LDF Modes: Finder ~ chain, Compatibility ~ soft
    Found 0 compatible libraries
    Scanning dependencies…
    No dependencies
    Building in release mode
    Compiling .pio/build/disco_f303vc/FrameworkCMSIS/gcc/startup_stm32f303xc.o
    Compiling .pio/build/disco_f303vc/FrameworkCMSIS/system_stm32f3xx.o
    Compiling .pio/build/disco_f303vc/src/main.o
    Linking .pio/build/disco_f303vc/firmware.elf
    Checking size .pio/build/disco_f303vc/firmware.elf
    Advanced Memory Usage is available via “PlatformIO Home > Project Inspect”
    RAM: [ ] 0.1% (used 28 bytes from 49152 bytes)
    Flash: [ ] 0.1% (used 344 bytes from 262144 bytes)
    Configuring upload protocol…
    AVAILABLE: blackmagic, cmsis-dap, jlink, mbed, stlink
    CURRENT: upload_protocol = stlink
    Uploading .pio/build/disco_f303vc/firmware.elf
    xPack OpenOCD, x86_64 Open On-Chip Debugger 0.11.0-00155-ge392e485e (2021-03-15-16:43)
    Licensed under GNU GPL v2
    For bug reports, read
    debug_level: 1

srst_only separate srst_nogate srst_open_drain connect_deassert_srst

target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x080001c8 msp: 0x2000a000
** Programming Started **
** Programming Finished **
** Verify Started **
** Verified OK **
** Resetting Target **
shutdown command invoked
==================================================================================== [SUCCESS] Took 0.99 seconds ====================================================================================

Terminal will be reused by tasks, press any key to close it.