From e119c3c27d5b5f12fd105ea716ae4256c9509999 Mon Sep 17 00:00:00 2001 From: Jukka Laitinen Date: Tue, 13 Feb 2024 15:17:07 +0200 Subject: [PATCH] platforms/nuttx/src/bootloader/common/image_toc.c: Support building bootloader without TOC If TOC_ADDRESS is not defined, assume that there is no TOC Signed-off-by: Jukka Laitinen --- platforms/nuttx/src/bootloader/common/image_toc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/platforms/nuttx/src/bootloader/common/image_toc.c b/platforms/nuttx/src/bootloader/common/image_toc.c index 01c9cf515f9c..daa2c8b58e03 100644 --- a/platforms/nuttx/src/bootloader/common/image_toc.c +++ b/platforms/nuttx/src/bootloader/common/image_toc.c @@ -41,6 +41,10 @@ #include "bl.h" +/* TOC doesn't exist if TOC_ADDRESS is not defined */ + +#ifdef TOC_ADDRESS + /* Helper macros to define flash start and end addresses, based on info from * hw_config.h */ @@ -119,3 +123,5 @@ bool find_toc(const image_toc_entry_t **toc_entries, uint8_t *len) *len = 0; return false; } + +#endif // ifdef TOC_ADDRESS