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

Draft
wants to merge 37 commits into
base: master
Choose a base branch
from
Draft

Conversation

caveman99
Copy link
Sponsor 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
Copy link
Sponsor Member Author

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;

The RNG stuff is from a double macro definition in the used crypto lib. i might swap that out for another one. locally it builds with a modified copy. Maxnodes is a good pointer...

@jp-bennett
Copy link
Collaborator

Another flash saving potential is the unishox library. It's only actually used for ATAK packets. #ifdef it out of existence, to save a few more bytes.

@thebentern thebentern added the hardware-support Add hardware support for new devices or modules label Apr 23, 2024
@caveman99 caveman99 added help wanted Extra attention is needed requires-docs Documentation must be updated labels May 9, 2024
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.

None yet

4 participants