Good afternoon. I’m trying to compile the firmware of the current version 20230816 with SD support. I encountered the following error:
“`
In file included from FatFs\STM\ffgendrv.c:19:0:
FatFs\STM\ffgendrv.h:59:42: error: '_VOLUMES' undeclared here (not in a function);
did you mean 'FF_VOLUMES'?
uint8t isinitialized[_VOLUMES];
Here is my configuration for PlatformIO:
`
[env:Halcyon_v1]
board = genericSTM32F401RC
boardbuild.ldscript = STM32F401RCFLASH.ld
buildflags = ${common.buildflags}
# See Inc/my_machine.h for options
-D BOARDHALCYONV1=
-D HSE_VALUE=8000000
-D USBSERIALCDC=1
-D ODOMETER_ENABLE=1
-D SDCARD_ENABLE=1
libdeps = ${common.libdeps}
eeprom
trinamic
FatFs
sdcard
libextradirs = ${common.libextradirs}
[env:Halcyonv1dfu]
extends = env:Halcyon_v1
upload_protocol = dfu
[env:Halcyonv1stlink]
extends = env:Halcyon_v1
upload_protocol = stlink
“
If I modify the file FatFs\STM\ffgendrv.h (add #define _VOLUMES 1) everything compiles.
Where should I set the _VOLUMES parameter so as not to modify the library ?
评论 (2)
#2 – Am0k-GIT 于 2023-08-18
Thank you very much.
#1 – terjeio 于 2023-08-18
Add
-D _VOLUMES=1to buildflags_ in platformio.ini.