Hi
I feel like I’m missing something really simple. I’ve got a WeAct Blackpill with an STM32F411CE chip on it and I’m trying to get the cmsis_blink example to run on it via VSCode. I’m getting the below when trying to build:
Processing blackpill_f411ce (platform: ststm32; board: blackpill_f411ce; framework: cmsis)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/ststm32/blackpill_f411ce.html
PLATFORM: ST STM32 (17.3.0) > WeAct Studio BlackPill V2.0 (STM32F411CE)
HARDWARE: STM32F411CEU6 100MHz, 128KB RAM, 512KB Flash
DEBUG: Current (stlink) External (blackmagic, cmsis-dap, jlink, stlink)
PACKAGES:
- framework-cmsis @ 2.50501.200527 (5.5.1)
- framework-cmsis-stm32f4 @ 2.6.4
- tool-ldscripts-ststm32 @ 0.2.0
- toolchain-gccarmnoneeabi @ 1.70201.0 (7.2.1)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 0 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Compiling .pio\build\blackpill_f411ce\FrameworkCMSIS\gcc\startup_stm32f411xe.o
Compiling .pio\build\blackpill_f411ce\FrameworkCMSIS\system_stm32f4xx.o
Compiling .pio\build\blackpill_f411ce\src\main.o
src\main.c: In function 'main':
src\main.c:107:5: error: 'ENABLE_GPIO_CLOCK' undeclared (first use in this function)
ENABLE_GPIO_CLOCK; // enable the clock to GPIO
^~~~~~~~~~~~~~~~~
src\main.c:107:5: note: each undeclared identifier is reported only once for each function it appears in
src\main.c:108:5: error: 'LEDPORT' undeclared (first use in this function)
LEDPORT->_MODER |= GPIOMODER; // set pins to be general purpose output
^~~~~~~
src\main.c:108:24: error: 'GPIOMODER' undeclared (first use in this function)
LEDPORT->_MODER |= GPIOMODER; // set pins to be general purpose output
^~~~~~~~~
src\main.c:111:25: error: 'LED1' undeclared (first use in this function)
LEDPORT->ODR ^= (1<<LED1); // toggle diodes
^~~~
*** [.pio\build\blackpill_f411ce\src\main.o] Error
Which I’m taking to mean it hasn’t worked out what header file to include. I’ve tried removing all the ifdef block and just hardcoding it to include the stm32f4xx.h file and associated defines and it then complain it’s can’t find stm32f4xx.h
Shouldn’t it be installed as part of cmsis and shouldn’t my board definition make it include that anyway?
Thanks