From 1ac70cc72f1409a84c78da809f35324a426f83de Mon Sep 17 00:00:00 2001 From: David Sidrane Date: Wed, 13 Jan 2021 15:34:41 -0800 Subject: [PATCH] can-gps-v1:Correct Memory size used by app and bootloader size --- .../can-gps-v1/nuttx-config/scripts/script.ld | 16 +++++++++------- boards/cuav/can-gps-v1/src/boot_config.h | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/boards/cuav/can-gps-v1/nuttx-config/scripts/script.ld b/boards/cuav/can-gps-v1/nuttx-config/scripts/script.ld index aacb5375c0..f8ae0a69c6 100644 --- a/boards/cuav/can-gps-v1/nuttx-config/scripts/script.ld +++ b/boards/cuav/can-gps-v1/nuttx-config/scripts/script.ld @@ -71,13 +71,15 @@ SECTIONS .text : { _stext = ABSOLUTE(.); *(.vectors) - . = ALIGN(32); - /* - This signature provides the bootloader with a way to delay booting - */ - _bootdelay_signature = ABSOLUTE(.); - FILL(0xffecc2925d7d05c5) - . += 8; + . = ALIGN(8); + /* + * This section positions the app_descriptor_t used + * by the make_can_boot_descriptor.py tool to set + * the application image's descriptor so that the + * uavcan bootloader has the ability to validate the + * image crc, size etc + */ + KEEP(*(.app_descriptor)) *(.text .text.*) *(.fixup) *(.gnu.warning) diff --git a/boards/cuav/can-gps-v1/src/boot_config.h b/boards/cuav/can-gps-v1/src/boot_config.h index 504f9a8c4a..b9254946cd 100644 --- a/boards/cuav/can-gps-v1/src/boot_config.h +++ b/boards/cuav/can-gps-v1/src/boot_config.h @@ -101,7 +101,7 @@ #define OPT_RESTART_TIMEOUT_MS 20000 /* Reserved for the Booloader */ -#define OPT_BOOTLOADER_SIZE_IN_K (1024*8) +#define OPT_BOOTLOADER_SIZE_IN_K (1024*64) /* Reserved for the application out of the total * system flash minus the BOOTLOADER_SIZE_IN_K