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

Add 8MB/16MB flash configs for Heltec Lora32/lilygo T-sim7000 #113

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

bzed
Copy link
Contributor

@bzed bzed commented Nov 19, 2022

No description provided.

Targeting mainly the heltec lora32 and lilygo t-sim7000 board with 16MB
flash.
The old versiuon did not want to boot the 8MB heltec
@gereic
Copy link
Owner

gereic commented Nov 21, 2022

The Problem is, that many boards have only 4MB Flash and I want to be comatible.
So I want to leave it to 4MB Flash.
As when I switch to esp v5.0.0 the Flash is completely full.
Maybe it works, when switching from PlatformIO (Arduino-IDE) to ESP-IDF
In ESP-IDF you can switch of components, which are not used and so you can safe flash-image-size.

What do you think about it ?

@bzed
Copy link
Contributor Author

bzed commented Nov 21, 2022

@gereic yes, but the change doesn't change anything for those boards? it just adds the option to have more features on larger boards. Like I'll implement wireguard for the larger boards. Wrapping that into ifdefs and enabling it only for the boards with more flash is possible.
I've kept the spiff/data size the same on all boards, so thats also compatible.

As far as I understand the esp-idf component thing, its the same as the libraries in pio. You can't disable the library dependency finder and handle them manually in pio, too - although in theory it should not include libraries that are not in use.

But what I think you might want to set is lib_ldf_mode = chain+ (default is chain, without +), so ifdefs are actually handled properly.

@bzed
Copy link
Contributor Author

bzed commented Nov 21, 2022

lib_ldf_mode = chain+ (or deep+) doesn't work as its not able to find the include of WiFi.h deeep in the websockets header. Not sure if there is a workaround except for managing the libs manually.

@gereic
Copy link
Owner

gereic commented Nov 21, 2022

I think it will decrease the flash-size, when I unset Options for the small Boards (IPV6, BLuettoth Classic, CAN, ...)
Will Try it.

@bzed
Copy link
Contributor Author

bzed commented Nov 21, 2022

I think it will decrease the flash-size, when I unset Options for the small Boards (IPV6, BLuettoth Classic, CAN, ...) Will Try it.

I'd expect that the parts might be built by pio, but not linked into the image.

Tricking the LDF into using the wifi module for websockets doesn't change the image size.
But a large part of the image seem to be debug information:

debug_frame                                                                                                                                                                                                427116            0
.debug_info                                                                                                                                                                                               10752201            0
.debug_abbrev                                                                                                                                                                                               874442            0
.debug_loc                                                                                                                                                                                                 2648728            0
.debug_aranges                                                                                                                                                                                              158696            0
.debug_ranges                                                                                                                                                                                               251584            0
.debug_macro                                                                                                                                                                                                650315            0
.debug_line                                                                                                                                                                                                3480464            0
.debug_str                                                                                                                                                                                                 2804742            0

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.

2 participants