platformio / platform-renesas-ra

Renesas RA: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/renesas-ra
Apache License 2.0
10 stars 5 forks source link

Uno R4 WiFi library doesn't build #3

Closed maxgerhardt closed 1 year ago

maxgerhardt commented 1 year ago

With example main.cpp from https://github.com/maxgerhardt/platform-renesas/blob/main/examples/arduino-uno-r4-wifi-wifi-scan/src/main.cpp and

[env]
platform = https://github.com/platformio/platform-renesas-ra.git
framework = arduino
monitor_speed = 115200

[env:uno_r4_wifi]
board = uno_r4_wifi
lib_ldf_mode = deep+
C:\Users\Max\.platformio\packages\framework-arduinorenesas-uno\libraries\WiFiS3\src\Modem.cpp:270:33: error: 'D24' was not declared in this scope; did you mean 'D4'?
  270 |   ModemClass modem = ModemClass(D24,D25);
      |                                 ^~~
      |                                 D4
C:\Users\Max\.platformio\packages\framework-arduinorenesas-uno\libraries\WiFiS3\src\Modem.cpp:270:37: error: 'D25' was not declared in this scope; did you mean 'D15'?
  270 |   ModemClass modem = ModemClass(D24,D25);
      |                                     ^~~
      |                                     D15
Archiving .pio\build\uno_r4_wifi\libFrameworkArduinoVariant.a
Compiling .pio\build\uno_r4_wifi\FrameworkArduino\SerialObj3.cpp.o
*** [.pio\build\uno_r4_wifi\libf36\WiFiS3\Modem.cpp.o] Error 1
Indexing .pio\build\uno_r4_wifi\libFrameworkArduinoVariant.a
=========== [FAILED] Took 3.94 seconds ===========

This is because the JSON board definition for the Uno R4 WiFi is missing an identifying macro, Obvious give-away:

grafik

So -DARDUINO_UNOWIFIR4 is missing in the Uno R4 WiFi's extra_flags.