firmware icon indicating copy to clipboard operation
firmware copied to clipboard

Make STM compile again and update toolchain.

Open caveman99 opened this issue 2 years ago • 6 comments

The binary is too big for the flash. WIP

caveman99 avatar Nov 23 '23 15:11 caveman99

🤖 Pull request artifacts

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

github-actions[bot] avatar Nov 23 '23 16:11 github-actions[bot]

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

geeksville avatar Mar 15 '24 08:03 geeksville

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;

jp-bennett avatar Mar 22 '24 00:03 jp-bennett

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...

caveman99 avatar Mar 28 '24 13:03 caveman99

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.

jp-bennett avatar Apr 12 '24 18:04 jp-bennett

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.

goshawk22 avatar Jun 10 '24 10:06 goshawk22