Hi,
I need some help with RFM69 gateway on Arduino Nano + W5500. My code compiles but it is too big to fit the flash. I get the following error:
Error: The program size (33788 bytes) is greater than maximum allowed (32768 bytes)
RAM: [====== ] 57.8% (used 1183 *** [checkprogsize] Explicit exit, status 1
bytes from 2048 bytes)
Flash: [==========] 103.1% (used 33788 bytes from 32768 bytes)
My _env.ini file is defined:
[env:atmega328p]
platform = ${com.atmelavr_platform}
board = ATmega328
board_build.mcu = atmega328p
board_build.f_cpu = 16000000L
board_hardware.uart = no_bootloader
lib_deps =
${com-arduino.lib_deps}
${libraries.rfm69}
${libraries.rfm69_low-power}
build_flags =
${com-arduino-low-memory.build_flags}
‘-DGateway_Name=“rfm69”’
‘-DBase_Topic=“rfm69/”’
‘-DZgatewayRFM69=“RFM69”’
‘-UZmqttDiscovery=“HADiscovery”’
‘-DDISABLE_LOGGING’
Any ideas on how to reduce the size? I also tried with nanoatmega328new, but there results are the same as expected. I did try to define static IP by adding the following to .ini file:
‘-DNetworkAdvancedSetup=true’
‘-DNET_IP=“192.168.100.40”’
‘-DNET_MASK=“255.255.255.0”’
‘-DNET_GW=“192.168.100.111”’
‘-DNET_DNS=“192.168.100.15”’
but then I can’t compile file. I receive errors:
main.ino:1915:6: error: request for member ‘fromString’ in ‘ip’, which is of non-class type ‘const byte [4] {aka const unsigned char [4]}’
ip.fromString(NET_IP);
^~~~~~~~~~
main.ino:1916:3: error: ‘gateway’ was not declared in this scope
gateway.fromString(NET_GW);
^~~~~~~
main.ino:1917:3: error: ‘subnet’ was not declared in this scope
subnet.fromString(NET_MASK);
^~~~~~
main.ino:1917:3: note: suggested alternative: ‘signed’
subnet.fromString(NET_MASK);
^~~~~~
signed
main.ino:1918:3: error: ‘Dns’ was not declared in this scope
Dns.fromString(NET_DNS);
^~~
Any help would be appreciated.
Thanks