Skip to content

shiftIn + shiftOut not implemented #345

@per1234

Description

@per1234

Describe the bug

The shiftIn and shiftOut functions are part of the standardized Arduino core API:

It is expected that every core will implement these functions.

🐛 These functions have not been implemented in this core, which causes compilation of any sketch program referencing them to fail.

Target board + cli verbose compilation output

FQBN: arduino-dev:zephyr:unoq
Using board 'unoq' from platform in folder: /home/per/Arduino/hardware/arduino-dev/zephyr
Using core 'arduino' from platform in folder: /home/per/Arduino/hardware/arduino-dev/zephyr

Detecting libraries used...
/home/per/.arduino15/packages/zephyr/tools/arm-zephyr-eabi/0.16.8/bin/arm-zephyr-eabi-g++ -g -Os -std=gnu++17 -c -D_PICOLIBC_CTYPE_SMALL=1 -w -imacros/home/per/Arduino/hardware/arduino-dev/zephyr/variants/arduino_uno_q_stm32u585xx/llext-edk/include/zephyr/include/generated/zephyr/autoconf.h -imacros/home/per/Arduino/hardware/arduino-dev/zephyr/variants/arduino_uno_q_stm32u585xx/llext-edk/include/zephyr/include/zephyr/toolchain/zephyr_stdint.h @/home/per/Arduino/hardware/arduino-dev/zephyr/variants/arduino_uno_q_stm32u585xx/cxxflags.txt -fno-exceptions -fno-rtti -fno-threadsafe-statics -fno-unwind-tables -fno-use-cxa-atexit -lstdc++ -lsupc++ -lnosys -nostdlib -lstdc++ -lsupc++ -lm -fno-exceptions -fno-rtti -fdata-sections -ffunction-sections -fno-unwind-tables -mcpu=cortex-m33 -mfloat-abi=hard -mfpu=fpv5-sp-d16 -w -x c++ -E -CC -DARDUINO=10607 -DARDUINO_UNO_Q -DARDUINO_ARCH_ZEPHYR -DARDUINO_ARCH_ZEPHYR -DARDUINO_LIBRARY_DISCOVERY_PHASE=1 -I/home/per/Arduino/hardware/arduino-dev/zephyr/cores/arduino -I/home/per/Arduino/hardware/arduino-dev/zephyr/variants/arduino_uno_q_stm32u585xx -I/home/per/Arduino/hardware/arduino-dev/zephyr/cores/arduino/api/deprecated -I/home/per/Arduino/hardware/arduino-dev/zephyr/cores/arduino/api/deprecated-avr-comp -iprefix/home/per/Arduino/hardware/arduino-dev/zephyr/variants/arduino_uno_q_stm32u585xx @/home/per/Arduino/hardware/arduino-dev/zephyr/variants/arduino_uno_q_stm32u585xx/includes.txt /home/per/.cache/arduino/sketches/C2E1E84F507BEC59F3E0FE043B27681B/sketch/sketch_feb16a.ino.cpp -o /dev/null
Generating function prototypes...
/home/per/.arduino15/packages/zephyr/tools/arm-zephyr-eabi/0.16.8/bin/arm-zephyr-eabi-g++ -g -Os -std=gnu++17 -c -D_PICOLIBC_CTYPE_SMALL=1 -w -imacros/home/per/Arduino/hardware/arduino-dev/zephyr/variants/arduino_uno_q_stm32u585xx/llext-edk/include/zephyr/include/generated/zephyr/autoconf.h -imacros/home/per/Arduino/hardware/arduino-dev/zephyr/variants/arduino_uno_q_stm32u585xx/llext-edk/include/zephyr/include/zephyr/toolchain/zephyr_stdint.h @/home/per/Arduino/hardware/arduino-dev/zephyr/variants/arduino_uno_q_stm32u585xx/cxxflags.txt -fno-exceptions -fno-rtti -fno-threadsafe-statics -fno-unwind-tables -fno-use-cxa-atexit -lstdc++ -lsupc++ -lnosys -nostdlib -lstdc++ -lsupc++ -lm -fno-exceptions -fno-rtti -fdata-sections -ffunction-sections -fno-unwind-tables -mcpu=cortex-m33 -mfloat-abi=hard -mfpu=fpv5-sp-d16 -w -x c++ -E -CC -DARDUINO=10607 -DARDUINO_UNO_Q -DARDUINO_ARCH_ZEPHYR -DARDUINO_ARCH_ZEPHYR -DARDUINO_LIBRARY_DISCOVERY_PHASE=1 -I/home/per/Arduino/hardware/arduino-dev/zephyr/cores/arduino -I/home/per/Arduino/hardware/arduino-dev/zephyr/variants/arduino_uno_q_stm32u585xx -I/home/per/Arduino/hardware/arduino-dev/zephyr/cores/arduino/api/deprecated -I/home/per/Arduino/hardware/arduino-dev/zephyr/cores/arduino/api/deprecated-avr-comp -iprefix/home/per/Arduino/hardware/arduino-dev/zephyr/variants/arduino_uno_q_stm32u585xx @/home/per/Arduino/hardware/arduino-dev/zephyr/variants/arduino_uno_q_stm32u585xx/includes.txt /home/per/.cache/arduino/sketches/C2E1E84F507BEC59F3E0FE043B27681B/sketch/sketch_feb16a.ino.cpp -o /tmp/3377184631/sketch_merged.cpp
/home/per/.arduino15/packages/builtin/tools/ctags/5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives /tmp/3377184631/sketch_merged.cpp

Compiling sketch...
/home/per/.arduino15/packages/zephyr/tools/arm-zephyr-eabi/0.16.8/bin/arm-zephyr-eabi-g++ -g -Os -std=gnu++17 -c -D_PICOLIBC_CTYPE_SMALL=1 -w -imacros/home/per/Arduino/hardware/arduino-dev/zephyr/variants/arduino_uno_q_stm32u585xx/llext-edk/include/zephyr/include/generated/zephyr/autoconf.h -imacros/home/per/Arduino/hardware/arduino-dev/zephyr/variants/arduino_uno_q_stm32u585xx/llext-edk/include/zephyr/include/zephyr/toolchain/zephyr_stdint.h @/home/per/Arduino/hardware/arduino-dev/zephyr/variants/arduino_uno_q_stm32u585xx/cxxflags.txt -fno-exceptions -fno-rtti -fno-threadsafe-statics -fno-unwind-tables -fno-use-cxa-atexit -lstdc++ -lsupc++ -lnosys -nostdlib -lstdc++ -lsupc++ -lm -fno-exceptions -fno-rtti -fdata-sections -ffunction-sections -fno-unwind-tables -MMD -mcpu=cortex-m33 -mfloat-abi=hard -mfpu=fpv5-sp-d16 -DARDUINO=10607 -DARDUINO_UNO_Q -DARDUINO_ARCH_ZEPHYR -DARDUINO_ARCH_ZEPHYR -DARDUINO_LIBRARY_DISCOVERY_PHASE=0 -I/home/per/Arduino/hardware/arduino-dev/zephyr/cores/arduino -I/home/per/Arduino/hardware/arduino-dev/zephyr/variants/arduino_uno_q_stm32u585xx -I/home/per/Arduino/hardware/arduino-dev/zephyr/cores/arduino/api/deprecated -I/home/per/Arduino/hardware/arduino-dev/zephyr/cores/arduino/api/deprecated-avr-comp -iprefix/home/per/Arduino/hardware/arduino-dev/zephyr/variants/arduino_uno_q_stm32u585xx @/home/per/Arduino/hardware/arduino-dev/zephyr/variants/arduino_uno_q_stm32u585xx/includes.txt /home/per/.cache/arduino/sketches/C2E1E84F507BEC59F3E0FE043B27681B/sketch/sketch_feb16a.ino.cpp -o /home/per/.cache/arduino/sketches/C2E1E84F507BEC59F3E0FE043B27681B/sketch/sketch_feb16a.ino.cpp.o
Compiling libraries...
Compiling core...
Using previously compiled file: /home/per/.cache/arduino/sketches/C2E1E84F507BEC59F3E0FE043B27681B/core/analogReference.cpp.o
Using precompiled core: /home/per/.cache/arduino/cores/cd06985031a4388a327205bbbe5be235/core.a
/home/per/.arduino15/packages/zephyr/tools/arm-zephyr-eabi/0.16.8/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld: Linking everything together...
/home/per/.arduino15/packages/zephyr/tools/arm-zephyr-eabi/0.16.8/bin/arm-zephyr-eabi-g++ -L/home/per/.cache/arduino/sketches/C2E1E84F507BEC59F3E0FE043B27681B -L/home/per/Arduino/hardware/arduino-dev/zephyr/variants/arduino_uno_q_stm32u585xx -Wl,--gc-sections -mcpu=cortex-m33 -mfloat-abi=hard -mfpu=fpv5-sp-d16 -std=gnu++17 -fno-exceptions -fno-rtti -fno-threadsafe-statics -fno-unwind-tables -fno-use-cxa-atexit -lstdc++ -lsupc++ -lnosys -nostdlib --specs=nano.specs --specs=nosys.specs /home/per/.cache/arduino/sketches/C2E1E84F507BEC59F3E0FE043B27681B/sketch/sketch_feb16a.ino.cpp.o /home/per/.cache/arduino/sketches/C2E1E84F507BEC59F3E0FE043B27681B/core/analogReference.cpp.o -Wl,--start-group /home/per/.cache/arduino/sketches/C2E1E84F507BEC59F3E0FE043B27681B/../../cores/cd06985031a4388a327205bbbe5be235/core.a -lstdc++ -lsupc++ -lm -Wl,--end-group -e main -T/home/per/Arduino/hardware/arduino-dev/zephyr/variants/arduino_uno_q_stm32u585xx/syms-dynamic.ld -T/home/per/Arduino/hardware/arduino-dev/zephyr/variants/_ldscripts/memory-check.ld -T/home/per/Arduino/hardware/arduino-dev/zephyr/variants/_ldscripts/build-static.ld -o /home/per/.cache/arduino/sketches/C2E1E84F507BEC59F3E0FE043B27681B/sketch_feb16a.ino_check.tmp
/home/per/.cache/arduino/sketches/C2E1E84F507BEC59F3E0FE043B27681B/sketch/sketch_feb16a.ino.cpp.o: in function `setup':
/tmp/.arduinoIDE-unsaved2026116-88512-1ow9ssf.xfr/sketch_feb16a/sketch_feb16a.ino:3: undefined reference to `shiftOut'
/home/per/.arduino15/packages/zephyr/tools/arm-zephyr-eabi/0.16.8/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld: /tmp/.arduinoIDE-unsaved2026116-88512-1ow9ssf.xfr/sketch_feb16a/sketch_feb16a.ino:3: undefined reference to `shiftIn'
collect2: error: ld returned 1 exit status
exit status 1

Compilation error: exit status 1

Mandatory: attach the sketch

void setup() {
  shiftIn(2, 3, MSBFIRST);
  shiftOut(4, 5, LSBFIRST, 42);
}
void loop() {}

Additional context

Reproduced using 87421b4


Originally reported at https://forum.arduino.cc/t/74hc595-with-arduino-uno-q/1424622

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions