mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
Avoid initializing storage to flash, reduce storage size by 8B and restore GCC 11 in CI
This commit is contained in:
5
.github/workflows/ci-workflow.yml
vendored
5
.github/workflows/ci-workflow.yml
vendored
@@ -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'
|
||||
|
||||
@@ -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");
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user