You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reduce LWIP flash 5.4K by cleaning debug prints (#3154)
In non-debug cases the string to `panic()` isn't actually sent to the
Serial port, or anywhere in fact.
When there is no debug port defined, replace the panic(str) of
LWIP_PLATFORM_ASSERT with panic("lwip") instead. This doesn't
effect debugging because the source line of the LWIP_ASSERT
will still show the full string (GDB shows the source).
Also, LWIP_DEBUG is a flag by definition, not value, so fix
lwipopts.h to not define it or the LWIP_X debug defines unless
LWIP_DEBUG is set by the compliation.
Saves 5480 bytes of flash for LWIP (Pico W, 2W, Ethernet) apps.
* -O2 for Pico2 builds, -O3 shows a GCC error
When -O3 is used to build LWIP, GCC emits a bogus error while compiling
DHCP.C:
> ../dhcp.c:1453:30: error: writing 1 byte into a region of size 0
DHCP_OPTIONS_LEN was verified as being DHCP_MIN_OPTIONS_LEN (68U) and not
0 using #ifs and #errors in the dhcp.h header, but GCC somehow forgets
this while doing it's checks on O3. Looks to be a bug in GCC to me,
so drop to -O2 for RP204 builds.
0 commit comments