[grblHAL/STM32F4xx Issue#134] Compiling error with FatFS ‘_VOLUMES’ undeclared here.

未分类 bolang 6个月前 (10-15) 62次浏览

Issue #134 | 状态: 已关闭 | 作者: Am0k-GIT | 创建时间: 2023-08-17


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)

#1 – terjeio 于 2023-08-18

Add
-D _VOLUMES=1
to buildflags_ in platformio.ini.


#2 – Am0k-GIT 于 2023-08-18

Thank you very much.


原始Issue: https://github.com/grblHAL/STM32F4xx/issues/134

喜欢 (0)