Closed scomx closed 9 months ago
Please ignore flash discrepancy. The difference was because of a source file from the examples that I accidentally included in the project. Correcting and re-compiling gives me expected RAM+Flash usage.
RAM: [===== ] 45.0% (used 44240 bytes from 98304 bytes)
Flash: [=== ] 30.1% (used 69004 bytes from 229376 bytes)
The binary, however, is still larger than expected and I'm not sure why -- PIO 69KB vs MRS 39KB.
PIO 69KB vs MRS 39KB.
Where do you see 39KB? Your report above says
Memory region Used Size Region Size %age Used
FLASH: 79652 B 224 KB 34.73%
so that's even circa 79KB for the needed FLASH code.
You're right, another unfortunate oversight on my part. I reviewed the MRS project and the 39 KB binary was from and older build, prior to adding wchnet library and additional code. I had switched it to build Intel-HEX only at some point so the binary was never updated. Actual size is 78 KB. IOW all good.
This is for a project ported from MRS to PlatformIO, no code changes were made.
Compiled in MRS on Windows 11:
Compiled using PIO on Mac M2:
Note the flash usage specifically is quite a bit more compared to MRS. The compiled PIO binary is 102KB vs. 39KB on MRS.
I reviewed project flags which were copied over from MRS and believe they are the same.