Compilation error when using UNO R4 WIFI and not Nano Every

I Recently tried compiling this code which compiles fine using the nano every board, but it fails when I tried to compiled it on the UNO R4 Wifi with the following error below. Any ideas what's going on?

C:\Users\Nathan\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.3.2/variants/UNOWIFIR4/includes/ra_cfg/fsp_cfg/bsp/bsp_pin_cfg.h:12:17: error: expected identifier before '(' token
 #define LED_RED (BSP_IO_PORT_00_PIN_11)
                 ^
C:\Users\Nathan\Documents\Boards\MiM-nano\mim\src\Drivers\LED.h:15:2: note: in expansion of macro 'LED_RED'
  LED_RED = 0,
  ^~~~~~~
C:\Users\Nathan\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.3.2/variants/UNOWIFIR4/includes/ra_cfg/fsp_cfg/bsp/bsp_pin_cfg.h:12:17: error: expected '}' before '(' token
 #define LED_RED (BSP_IO_PORT_00_PIN_11)
                 ^
C:\Users\Nathan\Documents\Boards\MiM-nano\mim\src\Drivers\LED.h:15:2: note: in expansion of macro 'LED_RED'
  LED_RED = 0,
  ^~~~~~~
C:\Users\Nathan\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.3.2/variants/UNOWIFIR4/includes/ra_cfg/fsp_cfg/bsp/bsp_pin_cfg.h:12:39: error: typedef 'BSP_IO_PORT_00_PIN_11' is initialized (use decltype instead)
 #define LED_RED (BSP_IO_PORT_00_PIN_11)
                                       ^
C:\Users\Nathan\Documents\Boards\MiM-nano\mim\src\Drivers\LED.h:15:2: note: in expansion of macro 'LED_RED'
  LED_RED = 0,
  ^~~~~~~
In file included from C:\Users\Nathan\Documents\Boards\MiM-nano\mim\mim.ino:8:0:
C:\Users\Nathan\Documents\Boards\MiM-nano\mim\src\Drivers\LED.h:16:2: error: typedef 'LED_GREEN' is initialized (use decltype instead)
  LED_GREEN = 1,
  ^~~~~~~~~
In file included from C:\Users\Nathan\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.3.2/variants/UNOWIFIR4/includes/ra_gen/common_data.h:13:0,
                 from C:\Users\Nathan\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.3.2\cores\arduino/Arduino.h:10,
                 from C:\Users\Nathan\Documents\Boards\MiM-nano\mim\mim.ino:5:
C:\Users\Nathan\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.3.2/variants/UNOWIFIR4/includes/ra_cfg/fsp_cfg/bsp/bsp_pin_cfg.h:14:40: error: typedef 'BSP_IO_PORT_00_PIN_13' is initialized (use decltype instead)
 #define LED_BLUE (BSP_IO_PORT_00_PIN_13)
                                        ^
C:\Users\Nathan\Documents\Boards\MiM-nano\mim\src\Drivers\LED.h:17:2: note: in expansion of macro 'LED_BLUE'
  LED_BLUE = 2,
  ^~~~~~~~
In file included from C:\Users\Nathan\Documents\Boards\MiM-nano\mim\mim.ino:8:0:
C:\Users\Nathan\Documents\Boards\MiM-nano\mim\src\Drivers\LED.h:19:1: error: expected initializer before '}' token
 } LED_LedColor;
 ^
C:\Users\Nathan\Documents\Boards\MiM-nano\mim\src\Drivers\LED.h:19:3: error: 'LED_LedColor' does not name a type
 } LED_LedColor;
   ^~~~~~~~~~~~
C:\Users\Nathan\Documents\Boards\MiM-nano\mim\src\Drivers\LED.h:23:17: error: 'LED_LedColor' was not declared in this scope
 uint8_t LED_Set(LED_LedColor LED, LED_State level);
                 ^~~~~~~~~~~~
C:\Users\Nathan\Documents\Boards\MiM-nano\mim\src\Drivers\LED.h:23:45: error: expected primary-expression before 'level'
 uint8_t LED_Set(LED_LedColor LED, LED_State level);
                                             ^~~~~
C:\Users\Nathan\Documents\Boards\MiM-nano\mim\src\Drivers\LED.h:23:50: error: expression list treated as compound expression in initializer [-fpermissive]
 uint8_t LED_Set(LED_LedColor LED, LED_State level);
                                                  ^
C:\Users\Nathan\Documents\Boards\MiM-nano\mim\src\Drivers\LED.h:24:19: error: 'LED_LedColor' was not declared in this scope
 uint8_t LED_Blink(LED_LedColor LED, uint8_t count);
                   ^~~~~~~~~~~~
C:\Users\Nathan\Documents\Boards\MiM-nano\mim\src\Drivers\LED.h:24:45: error: expected primary-expression before 'count'
 uint8_t LED_Blink(LED_LedColor LED, uint8_t count);
                                             ^~~~~
C:\Users\Nathan\Documents\Boards\MiM-nano\mim\src\Drivers\LED.h:24:50: error: expression list treated as compound expression in initializer [-fpermissive]
 uint8_t LED_Blink(LED_LedColor LED, uint8_t count);
                                                  ^
C:\Users\Nathan\Documents\Boards\MiM-nano\mim\src\Drivers\LED.h:26:1: error: expected declaration before '}' token
 }
 ^

Error during build: exit status 1

Used platform       Version Path
arduino:renesas_uno 1.3.2   C:\Users\Nathan\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.3.2
Command failed with code 1.
Compilation failed

I would have thought the first line in the README.md file at the link would have largely answered your question:

MiM firmware for Arduino Nano Every board.

You've got a sketch that's been written for the Nano Every, not the R4 WiFi. Expecting it to compile cleanly on a board it wasn't written for wasn't a good bet.

Also, on the R4, some of the sketch's names of constants collide with the names of constants and macros in the R4 core. The errors are pretty straightforward about that.

Yes, we worked on original code so just need to know what the underlying issues is before wasting time with porting effort.

Instead you waste the time of others with gotchas. Good-bye.