Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makefile change to support newer arm compilers #1430

Open
prismv opened this issue Mar 13, 2025 · 2 comments
Open

Makefile change to support newer arm compilers #1430

prismv opened this issue Mar 13, 2025 · 2 comments

Comments

@prismv
Copy link

prismv commented Mar 13, 2025

Please change the Makefile according to the proposed patch of @LdBeth in #1427, because it allows the usage of current versions of arm cross-compilers :

-specs=nano.specs -specs=nosys.specs added to PLATFORM_FLAGS and LINK_OPTS.

An alternative proposal might be to allow external definitions by setting these variables only with += within Makefile to allow addition of such setting on make call.

Compilation works then e.g. with:

❯ arm-none-eabi-c++ --version
arm-none-eabi-c++ (Arch Repository) 14.2.0
Copyright (C) 2024 Free Software Foundation, Inc.
@prismv
Copy link
Author

prismv commented Mar 13, 2025

Checked elf size information (and pgm size explicitely, too) of 3 variants based on 0.9.2 code:

unmodified code, arm-none-eabi-g++ (GNU Arm Embedded Toolchain 10.3-2021.10) 10.3.1 20210824 (release)
❯ arm-none-eabi-size -A build/dm42/release/db48x.elf
build/dm42/release/db48x.elf  :
section             size         addr
.qspi             279296   2415919104
.rodata            84280    134545408
.text             568320    134629696
.ARM.extab             0    135198016
.ARM                   8    135198016
.preinit_array         0    135198024
.init_array           24    135198024
.fini_array            8    135198048
.data               4584    268435456
.bss                3432    268440040
.ARM.attributes       48            0
.comment              73            0
.debug_frame        7756            0
Total             947829

pgm file size is 657252.

Makefile with nano and nosys specs, arm-none-eabi-g++ (GNU Arm Embedded Toolchain 10.3-2021.10) 10.3.1 20210824 (release)
❯ arm-none-eabi-size -A build/dm42/release/db48x.elf
build/dm42/release/db48x.elf  :
section             size         addr
.qspi             279296   2415919104
.rodata            83872    134545408
.text             542160    134629280
.ARM.extab             0    135171440
.ARM                   8    135171440
.preinit_array         0    135171448
.init_array           16    135171448
.fini_array            8    135171464
.data               3608    268435456
.bss                3424    268439064
.ARM.attributes       48            0
.comment              73            0
.debug_frame        6056            0
Total             918569

pgm file size is 629692 bytes.

Makefile with nano and nosys specs, arm-none-eabi-g++ (Arch Repository) 14.2.0
❯ arm-none-eabi-size -A build/dm42/release/db48x.elf
build/dm42/release/db48x.elf  :
section              size         addr
.qspi              279280   2415919104
.rodata             83688    134545408
.text              547848    134629104
.ARM.extab              0    135176952
.ARM                    8    135176952
.preinit_array          0    135176960
.init_array            16    135176960
.fini_array             8    135176976
.data                3592    268435456
.bss                 4136    268439048
.ARM.attributes        48            0
.comment               30            0
.debug_line         49788            0
.debug_line_str       378            0
.debug_info        117942            0
.debug_abbrev       28855            0
.debug_aranges       3248            0
.debug_str          12867            0
.debug_frame         6156            0
.debug_loclists     33638            0
.debug_rnglists      2464            0
Total             1173990

pgm file size is 635188 bytes.

raprism added a commit to prismv/db48x that referenced this issue Mar 13, 2025
@prismv
Copy link
Author

prismv commented Mar 13, 2025

Pull request: #1431

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

No branches or pull requests

1 participant