diff --git a/.github/workflows/ci-workflow.yml b/.github/workflows/ci-workflow.yml index cb76569b3..2974e9447 100644 --- a/.github/workflows/ci-workflow.yml +++ b/.github/workflows/ci-workflow.yml @@ -223,8 +223,9 @@ jobs: bootloader: runs-on: ubuntu-latest steps: - - run: sudo apt-get install build-essential imagemagick libfreetype6-dev libjpeg-dev libpng-dev pkg-config gcc-arm-none-eabi - # - uses: numworks/setup-arm-toolchain@2022-08 + # - run: sudo apt-get install build-essential imagemagick libfreetype6-dev libjpeg-dev libpng-dev pkg-config gcc-arm-none-eabi + - run: sudo apt-get install build-essential imagemagick libfreetype6-dev libjpeg-dev libpng-dev pkg-config + - uses: numworks/setup-arm-toolchain@2022-08 - uses: actions/checkout@v4 with: submodules: 'recursive' diff --git a/ion/include/ion/internal_storage.h b/ion/include/ion/internal_storage.h index 026ae5dc0..29371b320 100644 --- a/ion/include/ion/internal_storage.h +++ b/ion/include/ion/internal_storage.h @@ -25,7 +25,7 @@ public: #ifdef _FXCG constexpr static size_t k_storageSize = 65500; #else - constexpr static size_t k_storageSize = 60000; + constexpr static size_t k_storageSize = 59992; #endif static_assert(UINT16_MAX >= k_storageSize, "record_size_t not big enough"); diff --git a/ion/src/device/bootloader/boot/rt0.cpp b/ion/src/device/bootloader/boot/rt0.cpp index 90b634861..1e12db275 100644 --- a/ion/src/device/bootloader/boot/rt0.cpp +++ b/ion/src/device/bootloader/boot/rt0.cpp @@ -145,8 +145,6 @@ void __attribute__((noinline)) __attribute__((section(".recovery_boot"))) __attr uint32_t address = Ion::Device::BootloaderSharedData::sharedBootloaderData()->storageAddress(); uint32_t size = Ion::Device::BootloaderSharedData::sharedBootloaderData()->storageSize(); - size_t storageSize = (&_static_storage_end - &_static_storage_start); - memcpy(&_static_storage_start, (void*)address, size); size_t dataSectionLength = (&_data_section_end_ram - &_data_section_start_ram); diff --git a/ion/src/device/bootloader/bootloader_common.ld b/ion/src/device/bootloader/bootloader_common.ld index a196f872b..18928a73f 100644 --- a/ion/src/device/bootloader/bootloader_common.ld +++ b/ion/src/device/bootloader/bootloader_common.ld @@ -101,17 +101,6 @@ SECTIONS { _data_section_end_ram = .; } >SRAM AT> FLASH - /* - * We set the .static_storage right after the .data section, even if it's a bss region, because we need to fix it in memory. - */ - .static_storage : { - . = ALIGN(4); - _bss_section_start_ram = .; - _static_storage_start = .; - KEEP (*(.static_storage)) - _static_storage_end = .; - } > SRAM - .bss : { /* The bss section contains data for all uninitialized variables * So like the .data section, it will go in RAM, but unlike the data section @@ -120,6 +109,10 @@ SECTIONS { * Before execution, crt0 will erase that section of memory though, so we'll * need pointers to the beginning and end of this section. */ . = ALIGN(4); + _bss_section_start_ram = .; + _static_storage_start = .; + KEEP (*(.static_storage)) + _static_storage_end = .; *(.bss) *(.bss.*) /* The compiler may choose to allocate uninitialized global variables as