Description
Describe the bug
I am sure we have all seen this, but figured there should probably be an issue for it:
I have run into a lot of existing sketches including examples that do not build properly on zephyr
as it will give you errors saying that some function is not defined in the current scope.
Target board + cli verbose compilation output
In this case I am building for the GIGA
Full verbose compilation output, ideally with arduino-cli
invocation or from IDE 2.3.3+
FQBN: arduino-git:ArduinoCore-zephyr:giga
Using board 'giga' from platform in folder: C:\Users\kurte\Documents\Arduino\hardware\arduino-git\ArduinoCore-zephyr
Using core 'arduino' from platform in folder: C:\Users\kurte\Documents\Arduino\hardware\arduino-git\ArduinoCore-zephyr
Detecting libraries used...
C:\Users\kurte\AppData\Local\Arduino15\packages\zephyr\tools\arm-zephyr-eabi\0.16.8/bin/arm-zephyr-eabi-g++ -g -Os -std=c++17 -c -w -imacrosC:\Users\kurte\Documents\Arduino\hardware\arduino-git\ArduinoCore-zephyr\variants\arduino_giga_r1_stm32h747xx_m7/llext-edk/include/zephyr/include/generated/zephyr/autoconf.h -imacrosC:\Users\kurte\Documents\Arduino\hardware\arduino-git\ArduinoCore-zephyr\variants\arduino_giga_r1_stm32h747xx_m7/llext-edk/include/zephyr/include/zephyr/toolchain/zephyr_stdint.h @C:\Users\kurte\Documents\Arduino\hardware\arduino-git\ArduinoCore-zephyr\variants\arduino_giga_r1_stm32h747xx_m7/cxxflags.txt -fno-exceptions -fno-rtti -fno-threadsafe-statics -fno-unwind-tables -fno-use-cxa-atexit -lstdc++ -lsupc++ -lnosys -nostdlib -fdata-sections -ffunction-sections -fno-unwind-tables -DCORE_CM7 -mcpu=cortex-m7 -mfloat-abi=softfp -mfpu=fpv5-d16 -w -x c++ -E -CC -DARDUINO=10607 -DARDUINO_GIGA -DARDUINO_ARDUINO_GIGA -DARDUINO_ARCH_ARDUINOCORE-ZEPHYR -DARDUINO_ARCH_ZEPHYR -DARDUINO_LIBRARY_DISCOVERY_PHASE=1 -IC:\Users\kurte\Documents\Arduino\hardware\arduino-git\ArduinoCore-zephyr\cores\arduino -IC:\Users\kurte\Documents\Arduino\hardware\arduino-git\ArduinoCore-zephyr\variants\arduino_giga_r1_stm32h747xx_m7 -IC:\Users\kurte\Documents\Arduino\hardware\arduino-git\ArduinoCore-zephyr\cores\arduino/api/deprecated -IC:\Users\kurte\Documents\Arduino\hardware\arduino-git\ArduinoCore-zephyr\cores\arduino/api/deprecated-avr-comp -iprefixC:\Users\kurte\Documents\Arduino\hardware\arduino-git\ArduinoCore-zephyr\variants\arduino_giga_r1_stm32h747xx_m7 @C:\Users\kurte\Documents\Arduino\hardware\arduino-git\ArduinoCore-zephyr\variants\arduino_giga_r1_stm32h747xx_m7/includes.txt C:\Users\kurte\AppData\Local\arduino\sketches\29D2624DB1B20B3DE160E3F53ED1DFD0\sketch\sketch_jun13a.ino.cpp -o nul
Generating function prototypes...
C:\Users\kurte\AppData\Local\Arduino15\packages\zephyr\tools\arm-zephyr-eabi\0.16.8/bin/arm-zephyr-eabi-g++ -g -Os -std=c++17 -c -w -imacrosC:\Users\kurte\Documents\Arduino\hardware\arduino-git\ArduinoCore-zephyr\variants\arduino_giga_r1_stm32h747xx_m7/llext-edk/include/zephyr/include/generated/zephyr/autoconf.h -imacrosC:\Users\kurte\Documents\Arduino\hardware\arduino-git\ArduinoCore-zephyr\variants\arduino_giga_r1_stm32h747xx_m7/llext-edk/include/zephyr/include/zephyr/toolchain/zephyr_stdint.h @C:\Users\kurte\Documents\Arduino\hardware\arduino-git\ArduinoCore-zephyr\variants\arduino_giga_r1_stm32h747xx_m7/cxxflags.txt -fno-exceptions -fno-rtti -fno-threadsafe-statics -fno-unwind-tables -fno-use-cxa-atexit -lstdc++ -lsupc++ -lnosys -nostdlib -fdata-sections -ffunction-sections -fno-unwind-tables -DCORE_CM7 -mcpu=cortex-m7 -mfloat-abi=softfp -mfpu=fpv5-d16 -w -x c++ -E -CC -DARDUINO=10607 -DARDUINO_GIGA -DARDUINO_ARDUINO_GIGA -DARDUINO_ARCH_ARDUINOCORE-ZEPHYR -DARDUINO_ARCH_ZEPHYR -DARDUINO_LIBRARY_DISCOVERY_PHASE=1 -IC:\Users\kurte\Documents\Arduino\hardware\arduino-git\ArduinoCore-zephyr\cores\arduino -IC:\Users\kurte\Documents\Arduino\hardware\arduino-git\ArduinoCore-zephyr\variants\arduino_giga_r1_stm32h747xx_m7 -IC:\Users\kurte\Documents\Arduino\hardware\arduino-git\ArduinoCore-zephyr\cores\arduino/api/deprecated -IC:\Users\kurte\Documents\Arduino\hardware\arduino-git\ArduinoCore-zephyr\cores\arduino/api/deprecated-avr-comp -iprefixC:\Users\kurte\Documents\Arduino\hardware\arduino-git\ArduinoCore-zephyr\variants\arduino_giga_r1_stm32h747xx_m7 @C:\Users\kurte\Documents\Arduino\hardware\arduino-git\ArduinoCore-zephyr\variants\arduino_giga_r1_stm32h747xx_m7/includes.txt C:\Users\kurte\AppData\Local\arduino\sketches\29D2624DB1B20B3DE160E3F53ED1DFD0\sketch\sketch_jun13a.ino.cpp -o C:\Users\kurte\AppData\Local\Temp\817155547\sketch_merged.cpp
C:\Users\kurte\AppData\Local\Arduino15\packages\builtin\tools\ctags\5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives C:\Users\kurte\AppData\Local\Temp\817155547\sketch_merged.cpp
Compiling sketch...
"C:\\Users\\kurte\\AppData\\Local\\Arduino15\\packages\\zephyr\\tools\\arm-zephyr-eabi\\0.16.8/bin/arm-zephyr-eabi-g++" -g -Os -std=c++17 -c -Wall -Wextra "-imacrosC:\\Users\\kurte\\Documents\\Arduino\\hardware\\arduino-git\\ArduinoCore-zephyr\\variants\\arduino_giga_r1_stm32h747xx_m7/llext-edk/include/zephyr/include/generated/zephyr/autoconf.h" "-imacrosC:\\Users\\kurte\\Documents\\Arduino\\hardware\\arduino-git\\ArduinoCore-zephyr\\variants\\arduino_giga_r1_stm32h747xx_m7/llext-edk/include/zephyr/include/zephyr/toolchain/zephyr_stdint.h" "@C:\\Users\\kurte\\Documents\\Arduino\\hardware\\arduino-git\\ArduinoCore-zephyr\\variants\\arduino_giga_r1_stm32h747xx_m7/cxxflags.txt" -fno-exceptions -fno-rtti -fno-threadsafe-statics -fno-unwind-tables -fno-use-cxa-atexit -lstdc++ -lsupc++ -lnosys -nostdlib -fdata-sections -ffunction-sections -fno-unwind-tables -DCORE_CM7 -MMD -mcpu=cortex-m7 -mfloat-abi=softfp -mfpu=fpv5-d16 -DARDUINO=10607 -DARDUINO_GIGA -DARDUINO_ARDUINO_GIGA -DARDUINO_ARCH_ARDUINOCORE-ZEPHYR -DARDUINO_ARCH_ZEPHYR -DARDUINO_LIBRARY_DISCOVERY_PHASE=0 "-IC:\\Users\\kurte\\Documents\\Arduino\\hardware\\arduino-git\\ArduinoCore-zephyr\\cores\\arduino" "-IC:\\Users\\kurte\\Documents\\Arduino\\hardware\\arduino-git\\ArduinoCore-zephyr\\variants\\arduino_giga_r1_stm32h747xx_m7" "-IC:\\Users\\kurte\\Documents\\Arduino\\hardware\\arduino-git\\ArduinoCore-zephyr\\cores\\arduino/api/deprecated" "-IC:\\Users\\kurte\\Documents\\Arduino\\hardware\\arduino-git\\ArduinoCore-zephyr\\cores\\arduino/api/deprecated-avr-comp" "-iprefixC:\\Users\\kurte\\Documents\\Arduino\\hardware\\arduino-git\\ArduinoCore-zephyr\\variants\\arduino_giga_r1_stm32h747xx_m7" "@C:\\Users\\kurte\\Documents\\Arduino\\hardware\\arduino-git\\ArduinoCore-zephyr\\variants\\arduino_giga_r1_stm32h747xx_m7/includes.txt" "C:\\Users\\kurte\\AppData\\Local\\arduino\\sketches\\29D2624DB1B20B3DE160E3F53ED1DFD0\\sketch\\sketch_jun13a.ino.cpp" -o "C:\\Users\\kurte\\AppData\\Local\\arduino\\sketches\\29D2624DB1B20B3DE160E3F53ED1DFD0\\sketch\\sketch_jun13a.ino.cpp.o"
<command-line>: warning: ISO C++11 requires whitespace after the macro name
C:\Users\kurte\AppData\Local\Temp\.arduinoIDE-unsaved2025513-29624-1ai5105.3eg9\sketch_jun13a\sketch_jun13a.ino: In function 'void setup()':
C:\Users\kurte\AppData\Local\Temp\.arduinoIDE-unsaved2025513-29624-1ai5105.3eg9\sketch_jun13a\sketch_jun13a.ino:6:3: error: 'wait_for_input' was not declared in this scope
6 | wait_for_input();
| ^~~~~~~~~~~~~~
exit status 1
Compilation error: 'wait_for_input' was not declared in this scope
Mandatory: attach the sketch
//extern void wait_for_input();
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
while (!Serial && millis() < 5000) {}
wait_for_input();
}
void loop() {
// put your main code here, to run repeatedly:
}
void wait_for_input() {
Serial.println("Press any key to continue");
while (Serial.read() != -1) {};
while (Serial.read() == -1) {};
while (Serial.read() != -1) {};
}
Note: If you uncomment the first line, it compiles.
I last run into it trying to build the PDM example to see if I can get the PDM library to build and run on
Zephyr... but that is something to discuss on it's own
Metadata
Metadata
Assignees
Labels
No labels