Important changes to questions
We’re making some changes to Mbed Questions. From 10th December 2019 this site will be archived and new questions should be asked on our new forum site. Until that date you can continue to reply to existing questions here but can’t ask new questions.
5 years, 7 months ago.
Can I minimize the UbloxUSBModem and HTTPClient libraries?
Hi everyone!! I'm here because I need a big help. I've been working on a project based on the U-blox C027 IoT. I would like to make a tracker GPS using the kit with the modem SARA G-35-0. The system consists of two threads: GPS_T and MODEM_T. The first thread selects the RMC NMEA sentence and picks date, time, latitude and longitude then stores them into a buffer shared with the second thread. The MODEM_T thread picks the data stored into the buffer, changes them into char array and finally sends them to a remote server. I've written almost the entire firmware but I've a big problem with the memory management.
Actually the entire system WITHOUT the MODEM_T thread just occupies 6.1 Kb (RAM mem) and RUNS PERFECTLY. As soon as I add the MODEM_T thread the code occupies 39.5 Kb (always RAM mem) and the firmwares doesn’t run.
I've also used the directive attribute((section("AHBSRAM0"))) to put some variable into the AHBSRAM0 memory section, but it didn't work.
So I’m wondering if there is a way to manage the memory much better than I’m doing. Especially I’d like to know if there is a way to strip down the libraries I’ve included for the HTTPClient and the modem interface. I just need of POST, connect and disconnect function for my project, but I don’t know how to exactly isolate these from the entire libraries.
Could be handy convert the HTTPClient and UbloxUSBModem libraries into HTTPClient.a and UbloxUSBModem.a to say the linker not to link every function into the binary, even if it’s not used?
Question relating to:
You need to log in to post a question