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

Make STM compile again and update toolchain. #2960

Merged
merged 45 commits into from
Jul 26, 2024
Merged

Make STM compile again and update toolchain. #2960

merged 45 commits into from
Jul 26, 2024

Conversation

caveman99
Copy link
Member

@caveman99 caveman99 commented Nov 23, 2023

The binary is too big for the flash. WIP

@caveman99 caveman99 changed the title Make STM compile again and update toolchain. The binary is too big fo… Make STM compile again and update toolchain. Nov 23, 2023
Copy link
Contributor

github-actions bot commented Nov 23, 2023

🤖 Pull request artifacts

file commit
pr2960-firmware-2.2.14.c7fa4fc.zip c7fa4fc

thebentern added a commit to meshtastic/artifacts that referenced this pull request Nov 23, 2023
thebentern added a commit to meshtastic/artifacts that referenced this pull request Nov 25, 2023
thebentern added a commit to meshtastic/artifacts that referenced this pull request Nov 29, 2023
@geeksville
Copy link
Member

This pull request has been mentioned on Meshtastic. There might be relevant details there:

https://meshtastic.discourse.group/t/linking-failed-to-generate-firmware-elf-cannot-find-larm-cortexm4lf-math-for-wio-e5-variant-lora-e5-branch/11050/2

@jp-bennett
Copy link
Collaborator

jp-bennett commented Mar 22, 2024

Set MAX_NUM_NODES super low in your variant.h, and see if it gives you enough headroom.
I merged locally and attempted this. Getting errors

/home/jbennett/.platformio/packages/framework-arduinoststm32/system/Drivers/CMSIS/Device/ST/STM32WLxx/Include/stm32wle5xx.h:993:47: error: expected ')' before '*' token
  993 | #define RNG                     ((RNG_TypeDef *) RNG_BASE)
      |                                  ~            ^
.pio/libdeps/rak3172/Crypto/RNG.cpp:159:10: note: in expansion of macro 'RNG'
  159 | RNGClass RNG;

@caveman99 caveman99 added help wanted Extra attention is needed requires-docs Documentation must be updated labels May 9, 2024
@goshawk22
Copy link
Contributor

Another idea for saving flash is to remove all the I2C stuff. It wouldn't be needed for a minimal build but is still included as far as I can tell.

caveman99 and others added 6 commits June 13, 2024 22:22
* Add option to exclude I2C parts

The I2C hals and related code uses a significant amount of flash space and aren't required for a basic node.

* Add option to disable Admin and NodeInfo modules

Disabled by default in minimal build. This saves a significant amount of flash

* Disable unused hals

These use up significant flash

* Add float support for printf for debugging

Makes serial look nice for debugging

* This breaks my build for some reason

* These build flags can save a bit of flash

* Don't disable NodeInfo and Admin modules in minimal build

They fit in flash

* Don't include printf float support by default

Only useful for debugging

---------

Co-authored-by: Adam Lawson <[email protected]>
@thebentern thebentern marked this pull request as ready for review July 25, 2024 21:56
@thebentern thebentern merged commit 4b0bbb8 into master Jul 26, 2024
96 checks passed
fifieldt pushed a commit to fifieldt/meshtastic-firmware that referenced this pull request Jul 29, 2024
* Make STM compile again and update toolchain. The binary is too big for the flash. WIP

* Making progress with OSFS, still WIP

* more progress, still too big. Adding RAK3172 to the equasion

* Make STM compile again and update toolchain. The binary is too big for the flash. WIP

* Making progress with OSFS, still WIP

* more progress, still too big. Adding RAK3172 to the equasion

* still too big

* minimize build

* trunk fmt

* fix a couple of symbol clashes

* trunk fmt

* down to 101% with a release vs. debug build and omitting the flash strings

* fix compilation

* fix compilation once more

* update protobufs linkage

* - Toolchain updated
- Fixed macro error

* silence compiler warning
note: do something about this assert...

* new toolkit and fix Power.cpp

* STM32WL make it fit (meshtastic#4330)

* Add option to exclude I2C parts

The I2C hals and related code uses a significant amount of flash space and aren't required for a basic node.

* Add option to disable Admin and NodeInfo modules

Disabled by default in minimal build. This saves a significant amount of flash

* Disable unused hals

These use up significant flash

* Add float support for printf for debugging

Makes serial look nice for debugging

* This breaks my build for some reason

* These build flags can save a bit of flash

* Don't disable NodeInfo and Admin modules in minimal build

They fit in flash

* Don't include printf float support by default

Only useful for debugging

---------

Co-authored-by: Adam Lawson <[email protected]>

---------

Co-authored-by: Ben Meadors <[email protected]>
Co-authored-by: Adam Lawson <[email protected]>
@caveman99 caveman99 deleted the stm32wl branch August 28, 2024 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hardware-support Add hardware support for new devices or modules help wanted Extra attention is needed requires-docs Documentation must be updated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants