今天我购买了一块儿新的 stm32f407zgt6开发板,满怀期待的打开了platformIO IDE 准备写一个小程序测试一下,但当我建好工程之后,发现编译通不过,配置选用的是 stm32f407zg Arduino.请各位大神指导迷津!万分感谢!!
PLATFORM: ST STM32 (14.2.0) > Black STM32F407ZG
HARDWARE: STM32F407ZGT6 168MHz, 128KB RAM, 1MB Flash
DEBUG: Current (blackmagic) External (blackmagic, cmsis-dap, jlink, stlink)
PACKAGES:
- framework-arduinoststm32 4.20000.210603 (2.0.0)
- framework-cmsis 2.50700.210515 (5.7.0)
- toolchain-gccarmnoneeabi 1.90201.191206 (9.2.1)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 10 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Compiling .pio/build/black_f407zg/FrameworkArduinoVariant/PeripheralPins.c.o
Compiling .pio/build/black_f407zg/FrameworkArduinoVariant/PeripheralPins_BLACK_F407ZX.c.o
Compiling .pio/build/black_f407zg/FrameworkArduinoVariant/PeripheralPins_VCCGND_F407ZG_MINI.c.o
Compiling .pio/build/black_f407zg/FrameworkArduinoVariant/generic_clock.c.o
Compiling .pio/build/black_f407zg/FrameworkArduinoVariant/variant_BLACK_F407ZX.cpp.o
Compiling .pio/build/black_f407zg/FrameworkArduinoVariant/variant_VCCGND_F407ZG_MINI.cpp.o
Compiling .pio/build/black_f407zg/FrameworkArduinoVariant/variant_generic.cpp.o
Compiling .pio/build/black_f407zg/SrcWrapper/src/HAL/stm32yyxx_hal.c.o
Compiling .pio/build/black_f407zg/SrcWrapper/src/HAL/stm32yyxx_hal_adc.c.o
Compiling .pio/build/black_f407zg/SrcWrapper/src/HAL/stm32yyxx_hal_adc_ex.c.o
Compiling .pio/build/black_f407zg/SrcWrapper/src/HAL/stm32yyxx_hal_can.c.o
Compiling .pio/build/black_f407zg/SrcWrapper/src/HAL/stm32yyxx_hal_cec.c.o
/Users/cjp/.platformio/packages/framework-arduinoststm32/variants/STM32F4xx/F407Z(E-G)T_F417Z(E-G)T/variant_BLACK_F407ZX.cpp:107:3: error: expected '}' before numeric constant
107 | 89, // A14
| ^~
/Users/cjp/.platformio/packages/framework-arduinoststm32/variants/STM32F4xx/F407Z(E-G)T_F417Z(E-G)T/variant_BLACK_F407ZX.cpp:92:35: note: to match this '{'
92 | const uint32_t analogInputPin[] = {
| ^
/Users/cjp/.platformio/packages/framework-arduinoststm32/variants/STM32F4xx/F407Z(E-G)T_F417Z(E-G)T/variant_BLACK_F407ZX.cpp:107:3: error: expected ',' or ';' before numeric constant
107 | 89, // A14
| ^~
/Users/cjp/.platformio/packages/framework-arduinoststm32/variants/STM32F4xx/F407Z(E-G)T_F417Z(E-G)T/variant_BLACK_F407ZX.cpp:112:1: error: expected declaration before '}' token
112 | };
| ^
Compiling .pio/build/black_f407zg/SrcWrapper/src/HAL/stm32yyxx_hal_comp.c.o
Compiling .pio/build/black_f407zg/SrcWrapper/src/HAL/stm32yyxx_hal_comp_ex.c.o
Compiling .pio/build/black_f407zg/SrcWrapper/src/HAL/stm32yyxx_hal_cordic.c.o
Compiling .pio/build/black_f407zg/SrcWrapper/src/HAL/stm32yyxx_hal_cortex.c.o
Compiling .pio/build/black_f407zg/SrcWrapper/src/HAL/stm32yyxx_hal_crc.c.o
*** [.pio/build/black_f407zg/FrameworkArduinoVariant/variant_BLACK_F407ZX.cpp.o] Error 1
Compiling .pio/build/black_f407zg/SrcWrapper/src/HAL/stm32yyxx_hal_crc_ex.c.o
===============================================================================
Edit this in /Users/cjp/.platformio/packages/framework-arduinoststm32/variants/STM32F4xx/F407Z(E-G)T_F417Z(E-G)T/variant_BLACK_F407ZX.cpp
.
万分感谢 我找到了这个文件,看来是服务器上的文件存在的问题
Indeed, the released file has a bug. It comes from STM32Duino though, not PlatformIO.