Skip to content

Fix build for high memory targets#51

Merged
devanlai merged 1 commit intodevanlai:masterfrom
twelho:fix-highmem
Jul 15, 2023
Merged

Fix build for high memory targets#51
devanlai merged 1 commit intodevanlai:masterfrom
twelho:fix-highmem

Conversation

@twelho
Copy link
Copy Markdown
Contributor

@twelho twelho commented Jul 8, 2023

The bootloader doesn't fit into the advertised 6.5 kB anymore, resulting in linker errors for all high-memory targets:

/usr/lib/gcc/arm-none-eabi/8.3.1/../../../arm-none-eabi/bin/ld: dapboot.elf section `.text' will not fit in region `rom'
/usr/lib/gcc/arm-none-eabi/8.3.1/../../../arm-none-eabi/bin/ld: region `rom' overflowed by 276 bytes

Increase the reserved high-memory area from 0x1A00 to 0x1C00 (7 KiB), with 236 bytes to spare.

The bootloader doesn't fit into the advertised 6.5 kB anymore, resulting in linker errors for all high-memory targets:

```
/usr/lib/gcc/arm-none-eabi/8.3.1/../../../arm-none-eabi/bin/ld: dapboot.elf section `.text' will not fit in region `rom'
/usr/lib/gcc/arm-none-eabi/8.3.1/../../../arm-none-eabi/bin/ld: region `rom' overflowed by 276 bytes
```

Increase the reserved high-memory area from 0x1A00 to 0x1C00 (7 KiB), with 236 bytes to spare.
@devanlai
Copy link
Copy Markdown
Owner

Thanks for spotting this and fixing it!

@devanlai devanlai merged commit 9af0f05 into devanlai:master Jul 15, 2023
@twelho twelho deleted the fix-highmem branch July 15, 2023 20:42
@dmsc
Copy link
Copy Markdown
Contributor

dmsc commented Jul 20, 2023

Hi!

I don´t like this, as it makes the bootloader bigger for everyone. The compilation problem is because the user is not using the proper compiler.

Using the old GCC 9, the bootloader compiles to 6564 bytes, and using the current "arm-gnu-toolchain-12.2.rel1" release, the size is only 6252 bytes.

I suspect it should be documented to use a newer (>8) compiler.

Have Fun!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants