mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-02 14:08:45 -04:00
HAL_ChibiOS: fixed build without FATFS enabled
This commit is contained in:
parent
6b187b393a
commit
29add8a880
@ -51,6 +51,7 @@ endif
|
||||
|
||||
ifeq ($(USE_FATFS),)
|
||||
USE_FATFS = yes
|
||||
FATFS_FLAGS=-DUSE_FATFS
|
||||
endif
|
||||
|
||||
#
|
||||
@ -102,9 +103,9 @@ include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
|
||||
# Other files (optional).
|
||||
#include $(CHIBIOS)/test/rt/test.mk
|
||||
include $(CHIBIOS)/os/hal/lib/streams/streams.mk
|
||||
include $(CHIBIOS)/os/various/cpp_wrappers/chcpp.mk
|
||||
|
||||
ifeq ($(USE_FATFS),yes)
|
||||
include $(CHIBIOS)/os/various/cpp_wrappers/chcpp.mk
|
||||
include $(CHIBIOS)/os/various/fatfs_bindings/fatfs.mk
|
||||
endif
|
||||
|
||||
@ -218,7 +219,7 @@ CPPWARN = -Wall -Wextra -Wundef
|
||||
#
|
||||
|
||||
# List all user C define here, like -D_DEBUG=1
|
||||
UDEFS =
|
||||
UDEFS = $(FATFS_FLAGS)
|
||||
|
||||
# Define ASM defines here
|
||||
UADEFS =
|
||||
|
@ -52,6 +52,8 @@ void *malloc_ccm(size_t size)
|
||||
if (p != NULL) {
|
||||
memset(p, 0, size);
|
||||
}
|
||||
#else
|
||||
(void)size;
|
||||
#endif
|
||||
return p;
|
||||
}
|
||||
|
@ -227,6 +227,7 @@ atob(uint32_t *vp, char *p, int base)
|
||||
}
|
||||
|
||||
|
||||
#if HAL_OS_FATFS_IO
|
||||
/*
|
||||
* vsscanf(buf,fmt,ap)
|
||||
*/
|
||||
@ -343,3 +344,4 @@ static int vfscanf (FILE *stream, const char *fmt, va_list ap)
|
||||
count = vsscanf (buf, fmt, ap);
|
||||
return (count);
|
||||
}
|
||||
#endif // HAL_OS_FATFS_IO
|
||||
|
@ -27,7 +27,9 @@ int vasprintf(char **strp, const char *fmt, va_list ap);
|
||||
int asprintf(char **strp, const char *fmt, ...);
|
||||
int vprintf(const char *fmt, va_list arg);
|
||||
int printf(const char *fmt, ...);
|
||||
#if defined(USE_FATFS) || (defined(HAL_OS_FATFS_IO) && HAL_OS_FATFS_IO)
|
||||
int fscanf ( FILE * stream, const char * format, ... );
|
||||
#endif
|
||||
|
||||
int scanf (const char *fmt, ...);
|
||||
int sscanf (const char *buf, const char *fmt, ...);
|
||||
|
Loading…
Reference in New Issue
Block a user