appleshaman / CarPlayBLE

ESP32 Navigator for Google map and it's Android app
GNU General Public License v3.0
37 stars 7 forks source link

Program size greater than allowed #5

Open GAHanni opened 1 month ago

GAHanni commented 1 month ago

Dear developer, I'm very interested in your project, but I'm facing an issue I was not able to work around, due to my lack of experience. As I try to compile and assemble your program for the ESP32 part, I'm faced with this building error:

Error: The program size (1658241 bytes) is greater than maximum allowed (1572864 bytes) Flash: [==========] 105.4% (used 1658241 bytes from 1572864 bytes) *** [checkprogsize] Explicit exit, status 1

I didn't touch your source code. Any idea on how to get around that error?

Thank you in advance.

appleshaman commented 1 month ago

Hello This is due to the default FLASH allocated is not big enough; you need to change the Partition Tables, which can be found in C:\Users.platformio\packages\framework-arduinoespressif32\tools\partitions you can edit the default.csv from this image to this image (CR:https://blog.csdn.net/qq_51961498/article/details/122723544) This would give you more space for your FLASH; this is a global setting that could affect any other ESP32 project you created. If you only want to apply this change to this project, you can copy default.csv to your project folder and rename it, then add this "board_build.partitions=YourFile.csv" in your ini file.

huukhoa1412 commented 1 month ago

image

huukhoa1412 commented 1 month ago

image

appleshaman commented 1 month ago

image

I think that's the same problem, need to adjust the FLASH size

appleshaman commented 1 month ago

image

this one does not influence the program since this program does not use the touch screen

huukhoa1412 commented 1 month ago

image

I think that's the same problem, need to adjust the FLASH size

I copy my_memsettings.csv and rename default.csv save C:\Users.platformio\packages\framework-arduinoespressif32\tools\partitions . Upload failed

GAHanni commented 1 month ago

Fantastic! Worked like a charm after one more edition on the file! YET ANOTHER Learning point for a Newbie like me.

Final FLASH allocation table looks like this in the changed lines: app0, app, ota_0, 0x10000, 0x200000, app1, app, ota_1, 0x210000,0x80000,

Compiled and uploaded perfectly.

Thank you so much for sharing your knowledge.

Best regards.

huukhoa1412 commented 1 month ago

Fantastic! Worked like a charm after one more edition on the file! YET ANOTHER Learning point for a Newbie like me.

Final FLASH allocation table looks like this in the changed lines: app0, app, ota_0, 0x10000, 0x200000, app1, app, ota_1, 0x210000,0x80000,

Compiled and uploaded perfectly.

Thank you so much for sharing your knowledge.

Best regards.

thank you . i compiled and uploaded perfectly.

appleshaman commented 1 month ago

image

I think that's the same problem, need to adjust the FLASH size

I copy my_memsettings.csv and rename default.csv save C:\Users.platformio\packages\framework-arduinoespressif32\tools\partitions . Upload failed

Have you been able to put my_memsettings.csv in your project folder and add board_build.partitions=my_memsettings.csv inside of ini? my_memsettings.csv should not be put in the partitions folder

huukhoa1412 commented 1 month ago

I install app-debug-androidTest.apk image image

I not find icon app and dont open the app .I haven't experience with android, so it's possible to have an apk to test? sorry I realise now it's android 14

appleshaman commented 1 month ago

Hi, I just uploaded a new one with new code, but anyway, I only tested it with the emulator since I do not have any real devices with Android 14