PS D:\Dokumente\PlatformIO\Projects\LoRa-Sensor-On-LGT8F328P> pio upgrade
You're up-to-date!
PlatformIO 6.1.10a4 is currently the newest version available.
PS D:\Dokumente\PlatformIO\Projects\LoRa-Sensor-On-LGT8F328P>
Archiving .pio\build\LGT8F328P\libFrameworkArduino.a
Linking .pio\build\LGT8F328P\firmware.elf
Checking size .pio\build\LGT8F328P\firmware.elf
Building .pio\build\LGT8F328P\firmware.hex
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
Error: The program size (30212 bytes) is greater than maximum allowed (29696 bytes)
RAM: [======= ] 65.0% (used 1332 bytes from 2048 bytes)
Flash: [==========] 101.7% (used 30212 bytes from 29696 bytes)
*** [checkprogsize] Explicit exit, status 1
=========================================== [FAILED] Took 13.64 seconds ===========================================
I’ll now delete the “few lines” of code and try compiling again …
First off all, many thanks for your great support!
All problems seems to be fixed and the memory “problem” must be my fault.
Was surprised that this little project (radiohead, bmp280, Si7021) already used up all memory:
Okay so now it seems you’re able to compile regular sketches (empty ones at least) again. Can’t tell much about your full sketch, but the list of included libraries and the application code may indeed legimately exceed the flash capacity of the chip. You may be able to check the memory usage using this.
I’ve copied the complete code, that already exceeds the available memory - while several things are not even integrated now, like deep sleep, …
There is another problem - I cant communicte with the LoRa module (RFM95W) on SPI bus.
Permanently getting error -2 (not connected), while the same code works for RFM95W with WEMOS D1 mini Pro.
Is there something special with the SPI bus on LGT8F?
In any case though, in your previous full sketch, it seems like it does generate the .elf file and then just fails in the post checks (because the full 32K is not available due to a boodloader I assume). Which means you should be able to do the following:
Just a side note, “framework-lgt8fx @ 1.0.6” is over 3 years old. They did work on SPI, low power, and more. 2.0.6 is the current release for use with Arduino IDE. . GitHub - dbuezas/lgt8fx: Board Package for Logic Green LGT8F328P LGT8F328D and LGT8F88D
Tried to make a framework but never could get it to work. Might take another run at the docs and try again.
Sorry fir the interruption.
Basically, download https://github.com/dbuezas/lgt8fx/blob/master/lgt8f-2.0.6.zip, add package.json to the core’s root, point to it using platform_packages and the symlink:// protocol. You can also reupoad that 2.0.6 version with the package.json to Github to enable you to use a Github link instead.
I’ll try this later, because the code is not nearly complete, so will just need more flash or other (own?) libs.
Changed from radiohead lib to the outdated LoraLib reduced the amount of used flash to 64,9% (from 101,8% ).
I’ll try this …
How would a “platformio.ini” look like, with platform_packages and the symlink:// pointing to a local directory?
Now, with replaced Radiohead Lib, the code compiles without problems:
Compiling .pio\build\LGT8F328P\FrameworkArduino\wiring_shift.c.o
Archiving .pio\build\LGT8F328P\libFrameworkArduino.a
Linking .pio\build\LGT8F328P\firmware.elf
Building .pio\build\LGT8F328P\firmware.hex
Checking size .pio\build\LGT8F328P\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [==== ] 44.3% (used 907 bytes from 2048 bytes)
Flash: [====== ] 64.9% (used 19266 bytes from 29696 bytes)
=========================================== [SUCCESS] Took 6.86 seconds ===========================================
* Terminal will be reused by tasks, press any key to close it.
… but “inspection” fails the same way - break after about 10% memory check and the only result is
“Invalid params” (like previous screenshot).
Archiving .pio\build\LGT8F328P\libFrameworkArduino.a
Linking .pio\build\LGT8F328P\firmware.elf
Building .pio\build\LGT8F328P\firmware.hex
Checking size .pio\build\LGT8F328P\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [==== ] 44.8% (used 917 bytes from 2048 bytes)
Flash: [======= ] 67.8% (used 20124 bytes from 29696 bytes)
=========================================== [SUCCESS] Took 6.37 seconds ===========================================
* Terminal will be reused by tasks, press any key to close it.