Arduino Compile Advice

Any advice on getting rid of these compile errors in Arduino IDE?

In file included from C:\Users\atorq\AppData\Local\Arduino15\packages\sophgo\hardware\SG200X\0.2.3\variants\duo/variant.h:4,
from C:\Users\atorq\AppData\Local\Arduino15\packages\sophgo\hardware\SG200X\0.2.3/cores/sg200x/include/common.h:33,
from C:\Users\atorq\AppData\Local\Arduino15\packages\sophgo\hardware\SG200X\0.2.3/cores/sg200x/include/Arduino.h:23,
from C:\Users\atorq\AppData\Local\Temp\arduino\sketches\CEE995BB95C6FAE4AF97818AF616A592\sketch\3Dcube.ino.cpp:1:
C:\Users\atorq\AppData\Local\Arduino15\packages\sophgo\hardware\SG200X\0.2.3\variants\duo/variant_soc.h:243: warning: “PLIC_BASE” redefined
243 | #define PLIC_BASE (0x70000000UL)
|
C:\Users\atorq\AppData\Local\Arduino15\packages\sophgo\hardware\SG200X\0.2.3\variants\duo/variant_soc.h:166: note: this is the location of the previous definition
166 | #define PLIC_BASE 0x70000000
|
In file included from C:\Users\atorq\AppData\Local\Arduino15\packages\sophgo\hardware\SG200X\0.2.3/cores/sg200x/include/wiring_digital.h:22,
from C:\Users\atorq\AppData\Local\Arduino15\packages\sophgo\hardware\SG200X\0.2.3/cores/sg200x/include/Arduino.h:25:
C:\Users\atorq\AppData\Local\Arduino15\packages\sophgo\hardware\SG200X\0.2.3/cores/sg200x/include/wiring_constants.h:79: warning: “round” redefined
79 | #define round(x) ((x ) >= 0 ? (long)((x) + 0.5) : (long)((x) - 0.5))
|
C:\Users\atorq\AppData\Local\Arduino15\packages\sophgo\hardware\SG200X\0.2.3/cores/sg200x/include/common.h:86: note: this is the location of the previous definition
86 | #define round(x) ((x) >= 0 ? (long)((x) + 0.5) : (long)((x) - 0.5)) // round() comes from STL
|
C:\Users\atorq\AppData\Local\Arduino15\packages\sophgo\hardware\SG200X\0.2.3/cores/sg200x/include/wiring_constants.h:84: warning: “lowByte” redefined
84 | #define lowByte(w) ((uint8_t) ((w) & 0xff))
|
C:\Users\atorq\AppData\Local\Arduino15\packages\sophgo\hardware\SG200X\0.2.3/cores/sg200x/include/common.h:95: note: this is the location of the previous definition
95 | #define lowByte(w) ((uint8_t)((w) & 0xff))
|
C:\Users\atorq\AppData\Local\Arduino15\packages\sophgo\hardware\SG200X\0.2.3/cores/sg200x/include/wiring_constants.h:85: warning: “highByte” redefined
85 | #define highByte(w) ((uint8_t) ((w) >> 8))
|
C:\Users\atorq\AppData\Local\Arduino15\packages\sophgo\hardware\SG200X\0.2.3/cores/sg200x/include/common.h:96: note: this is the location of the previous definition
96 | #define highByte(w) ((uint8_t)((w) >> 8))
|
C:\Users\atorq\AppData\Local\Arduino15\packages\sophgo\hardware\SG200X\0.2.3/cores/sg200x/include/wiring_constants.h:90: warning: “bitWrite” redefined
90 | #define bitWrite(value, bit, bitvalue) (bitvalue ? bitSet(value, bit) : bitClear(value, bit))
|
C:\Users\atorq\AppData\Local\Arduino15\packages\sophgo\hardware\SG200X\0.2.3/cores/sg200x/include/common.h:102: note: this is the location of the previous definition
102 | #define bitWrite(value, bit, bitvalue) ((bitvalue) ? bitSet(value, bit) : bitClear(value, bit))
|
In file included from c:\Users\atorq\Documents\Arduino\libraries\GyverOLED\src/GyverOLED.h:92,
from C:\Users\atorq\AppData\Local\Temp.arduinoIDE-unsaved202453-13056-1gg0ymi.kbmk\3Dcube\3Dcube.ino:8:
C:\Users\atorq\AppData\Local\Arduino15\packages\sophgo\hardware\SG200X\0.2.3\libraries\Wire\src/Wire.h: In member function ‘void TwoWire::setWireTimeout(uint64_t, bool)’:
C:\Users\atorq\AppData\Local\Arduino15\packages\sophgo\hardware\SG200X\0.2.3\libraries\Wire\src/Wire.h:67:48: error: unused parameter ‘reset_on_timeout’ [-Werror=unused-parameter]
67 | void setWireTimeout(uint64_t timeout, bool reset_on_timeout) { _timeout = timeout / 1000; }
| ~^~~~~~~~~~~~
cc1plus.exe: some warnings being treated as errors

exit status 1

Compilation error: exit status 1

Maybe u need call this variable inside this ‘setWireTimeout’ function like

reset_on_timeout;

Can u show me your code?

I am simply using the official guide, simple blink sketch, lol.

If I switch compiler warnings off, this is what I get:

C:/Users/atorq/AppData/Local/Arduino15/packages/sophgo/tools/xpack-riscv-none-elf-gcc/13.2.0-2/bin/../lib/gcc/riscv-none-elf/13.2.0/../../../../riscv-none-elf/bin/ld.exe: C:/Users/atorq/AppData/Local/Arduino15/packages/sophgo/tools/xpack-riscv-none-elf-gcc/13.2.0-2/bin/../lib/gcc/riscv-none-elf/13.2.0/../../../../riscv-none-elf/lib/rv64imfd_zicsr/lp64d\libc_nano.a(libc_a-signalr.o): in function `_getpid_r':
signalr.c:(.text._getpid_r+0x0): warning: _getpid is not implemented and will always fail
C:/Users/atorq/AppData/Local/Arduino15/packages/sophgo/tools/xpack-riscv-none-elf-gcc/13.2.0-2/bin/../lib/gcc/riscv-none-elf/13.2.0/../../../../riscv-none-elf/bin/ld.exe: C:/Users/atorq/AppData/Local/Arduino15/packages/sophgo/tools/xpack-riscv-none-elf-gcc/13.2.0-2/bin/../lib/gcc/riscv-none-elf/13.2.0/../../../../riscv-none-elf/lib/rv64imfd_zicsr/lp64d\libc_nano.a(libc_a-signalr.o): in function `.L0 ':
signalr.c:(.text._kill_r+0x20): warning: _kill is not implemented and will always fail

I run the same environment with u,but i passed compile


may u need reinstall the package?

1 Like

I uninstalled the package. I uninstalled the Arduino IDE. I rebooted my PC. I reinstalled the IDE. I reinstalled the package. I get the exact same errors but I do pass compile. Thx for the help. Very much appreciate.

I have to set compiler warnings to none, else it fails compile, but at least it compiles when I set warnings to none. Thx again for the help mate. If you set compiler warnings to All, does your compile fail?

1 Like

I switch the compiler warnings to All, it report err now.
I tried modified the package codes, more -Werror coming.
maybe we cannot solve these problems currently, the package have too many loophole.
i’m waitting for the next update.

1 Like

Hey, thx again for helping me. Very much appreciated. :heart:

1 Like