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

Best way to gain flash memory #50

Closed
eben80 opened this issue Dec 29, 2020 · 5 comments
Closed

Best way to gain flash memory #50

eben80 opened this issue Dec 29, 2020 · 5 comments

Comments

@eben80
Copy link

eben80 commented Dec 29, 2020

I would like to try and write the output that you get in the Data screen on the web interface to SDcard for when I'm outside with only the tracker.

I want to implement the SD_MMC library but it's already exceeding the available flash.

Is it possible to comment out some code, ie. fonts or display drivers that are not used to free up some flash memory?

Thank you.

@dl9rdz
Copy link
Owner

dl9rdz commented Dec 29, 2020

For the main branch I intend to keep things as they are for now, but of course you can create your version with only the features you need. I can put "add #ifdefs to customize which features are included" on my TODO list, but not with high priority.... Probably you can remove those features with little effort:

  • MQTT support
  • RS92 support (relatively large because it includes a FTP client for fetching satellite data and a gzip decompressor for that)
  • Display driver and fonts for one of the two display types (TFT or LCD) if you only use that. Probably will be quite invasive in Display.cpp

You can also change the flash layout to get more flash space. Currently it is OTA-enabled (basically this means that it uses twice the space, so you can run on version of the software and upload a newer image while the software is running, and then boot the new image). Never done this myself, so you'll have to google for how to do it. Something like this: espressif/arduino-esp32#703, just remove "app1" and make "app0" twice as big.

@eben80
Copy link
Author

eben80 commented Dec 29, 2020

Thank you very much for your help. I'll give it a go and see how far I get.

@eben80 eben80 closed this as completed Dec 29, 2020
@eben80
Copy link
Author

eben80 commented Dec 30, 2020

Thank you. I think I managed to use #ifdefs for RS92 and MQTT so now I managed to mount the SDCard successfully
Sonde::setup() on sonde index 0 RS41: setting RX frequency to 400600000.00 AFC BW: 12500.000000 RX BW: 6250.000000 SD Card Type: SDHC SD Card Size: 7624MB Total space: 7618MB Used space: 0MB

@Piter-NS
Copy link
Contributor

Thank you. I think I managed to use #ifdefs for RS92 and MQTT so now I managed to mount the SDCard successfully
Sonde::setup() on sonde index 0 RS41: setting RX frequency to 400600000.00 AFC BW: 12500.000000 RX BW: 6250.000000 SD Card Type: SDHC SD Card Size: 7624MB Total space: 7618MB Used space: 0MB

Can you share your version with SD Card support?

@eben80
Copy link
Author

eben80 commented Jan 23, 2021

Thank you. I think I managed to use #ifdefs for RS92 and MQTT so now I managed to mount the SDCard successfully
Sonde::setup() on sonde index 0 RS41: setting RX frequency to 400600000.00 AFC BW: 12500.000000 RX BW: 6250.000000 SD Card Type: SDHC SD Card Size: 7624MB Total space: 7618MB Used space: 0MB

Can you share your version with SD Card support?

While I could mount the SD Card, I ran into issues with the coexistence of SPIFFS and SDCARD filesystems so I abandoned it. Probably the way to go would be to use only SDCard instead of SPIFFS but I didn't get around to that yet.
I was only able to mount the SDCARD in setup() but wasn't able to log anything yet. I might give it another go later. Bear in mind, if you use SDCARD, you lose most of the touch pins.

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

3 participants