as i got the wrong RGB led (common anode instead of cathode), i try my best to try to tweak the code to fix color issue that change involve.
I try first without any change on your 1.01 version to compile on Windows without success. I try on Lubuntu after without success too ... My environement seems ok, because i can compile pico example without any issue !
Maybe you have an idea ? In which environement did you compile ?
`
lubuntu@lubuntu-virtualbox:~/pico/Busylight/build$ cmake ..
Using PICO_SDK_PATH from environment ('../../pico-sdk')
PICO_SDK_PATH is /home/lubuntu/pico/pico-sdk
Defaulting PICO_PLATFORM to rp2040 since not specified.
Defaulting PICO platform compiler to pico_arm_gcc since not specified.
-- Defaulting build type to 'Release' since not specified.
PICO compiler is pico_arm_gcc
-- The C compiler identification is GNU 9.2.1
-- The CXX compiler identification is GNU 9.2.1
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/arm-none-eabi-gcc
Defaulting PICO target board to pico since not specified.
Using board configuration from /home/lubuntu/pico/pico-sdk/src/boards/include/boards/pico.h
-- Found Python3: /usr/bin/python3.8 (found version "3.8.10") found components: Interpreter
TinyUSB available at /home/lubuntu/pico/pico-sdk/lib/tinyusb/src/portable/raspberrypi/rp2040; adding USB support.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/lubuntu/pico/Busylight/build
lubuntu@lubuntu-virtualbox:~/pico/Busylight/build$ make -j4
Scanning dependencies of target bs2_default
Scanning dependencies of target ELF2UF2Build
[ 1%] Creating directories for 'ELF2UF2Build'
[ 2%] Building ASM object pico-sdk/src/rp2_common/boot_stage2/CMakeFiles/bs2_default.dir/compile_time_choice.S.obj
[ 3%] Linking ASM executable bs2_default.elf
[ 3%] Built target bs2_default
[ 5%] No download step for 'ELF2UF2Build'
Scanning dependencies of target bs2_default_padded_checksummed_asm
[ 6%] Generating bs2_default.bin
[ 7%] No patch step for 'ELF2UF2Build'
[ 8%] Generating bs2_default_padded_checksummed.S
[ 10%] No update step for 'ELF2UF2Build'
[ 11%] Performing configure step for 'ELF2UF2Build'
[ 11%] Built target bs2_default_padded_checksummed_asm
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/lubuntu/pico/Busylight/build/elf2uf2
[ 12%] Performing build step for 'ELF2UF2Build'
Scanning dependencies of target elf2uf2
[ 50%] Building CXX object CMakeFiles/elf2uf2.dir/main.cpp.o
[100%] Linking CXX executable elf2uf2
[100%] Built target elf2uf2
[ 14%] No install step for 'ELF2UF2Build'
[ 15%] Completed 'ELF2UF2Build'
[ 15%] Built target ELF2UF2Build
Scanning dependencies of target main
[ 16%] Building C object CMakeFiles/main.dir/home/lubuntu/pico/pico-sdk/src/rp2_common/pico_stdlib/stdlib.c.obj
[ 17%] Building C object CMakeFiles/main.dir/home/lubuntu/pico/pico-sdk/src/rp2_common/hardware_gpio/gpio.c.obj
[ 19%] Building C object CMakeFiles/main.dir/usb_descriptors.c.obj
[ 20%] Building C object CMakeFiles/main.dir/main.c.obj
: warning: "CFG_TUSB_DEBUG" redefined
: warning: "CFG_TUSB_DEBUG" redefined
: note: this is the location of the previous definition
: warning: "CFG_TUSB_DEBUG" redefined
: note: this is the location of the previous definition
: note: this is the location of the previous definition
: warning: "CFG_TUSB_DEBUG" redefined
: note: this is the location of the previous definition
/home/lubuntu/pico/Busylight/usb_descriptors.c:94:16: error: conflicting types for 'tud_hid_descriptor_report_cb'
94 | uint8_t const *tud_hid_descriptor_report_cb(void) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/lubuntu/pico/pico-sdk/lib/tinyusb/src/tusb.h:68,
from /home/lubuntu/pico/Busylight/usb_descriptors.c:26:
/home/lubuntu/pico/pico-sdk/lib/tinyusb/src/class/hid/hid_device.h:96:17: note: previous declaration of 'tud_hid_descriptor_report_cb' was here
96 | uint8_t const * tud_hid_descriptor_report_cb(uint8_t instance);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/lubuntu/pico/pico-sdk/lib/tinyusb/src/tusb.h:65,
from /home/lubuntu/pico/Busylight/usb_descriptors.c:26:
/home/lubuntu/pico/Busylight/usb_descriptors.c:116:52: error: 'HID_PROTOCOL_NONE' undeclared here (not in a function); did you mean 'HID_PROTOCOL_BOOT'?
116 | TUD_HID_DESCRIPTOR(ITF_NUM_HID, 0, HID_PROTOCOL_NONE, sizeof(desc_hid_report), EPNUM_HID,
| ^~~~~~~~~~~~~~~~~
/home/lubuntu/pico/pico-sdk/lib/tinyusb/src/device/usbd.h:239:69: note: in definition of macro 'TUD_HID_DESCRIPTOR'
239 | 9, TUSB_DESC_INTERFACE, _itfnum, 0, 1, TUSB_CLASS_HID, (uint8_t)((_boot_protocol) ? HID_SUBCLASS_BOOT : 0), _boot_protocol, _stridx,\
| ^~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/main.dir/build.make:76 : CMakeFiles/main.dir/usb_descriptors.c.obj] Erreur 1
make[2]: *** Attente des tâches non terminées....
/home/lubuntu/pico/Busylight/main.c:124:10: error: conflicting types for 'tud_hid_get_report_cb'
124 | uint16_t tud_hid_get_report_cb(uint8_t report_id, hid_report_type_t report_type, uint8_t *buffer, uint16_t reqlen) {
| ^~~~~~~~~~~~~~~~~~~~~
In file included from /home/lubuntu/pico/pico-sdk/lib/tinyusb/src/tusb.h:68,
from /home/lubuntu/pico/pico-sdk/lib/tinyusb/hw/bsp/board.h:42,
from /home/lubuntu/pico/Busylight/main.c:9:
/home/lubuntu/pico/pico-sdk/lib/tinyusb/src/class/hid/hid_device.h:101:10: note: previous declaration of 'tud_hid_get_report_cb' was here
101 | uint16_t tud_hid_get_report_cb(uint8_t instance, uint8_t report_id, hid_report_type_t report_type, uint8_t* buffer, uint16_t reqlen);
| ^~~~~~~~~~~~~~~~~~~~~
/home/lubuntu/pico/Busylight/main.c:136:6: error: conflicting types for 'tud_hid_set_report_cb'
136 | void tud_hid_set_report_cb(uint8_t report_id, hid_report_type_t report_type, uint8_t const *buffer, uint16_t bufsize) {
| ^~~~~~~~~~~~~~~~~~~~~
In file included from /home/lubuntu/pico/pico-sdk/lib/tinyusb/src/tusb.h:68,
from /home/lubuntu/pico/pico-sdk/lib/tinyusb/hw/bsp/board.h:42,
from /home/lubuntu/pico/Busylight/main.c:9:
/home/lubuntu/pico/pico-sdk/lib/tinyusb/src/class/hid/hid_device.h:105:6: note: previous declaration of 'tud_hid_set_report_cb' was here
105 | void tud_hid_set_report_cb(uint8_t instance, uint8_t report_id, hid_report_type_t report_type, uint8_t const* buffer, uint16_t bufsize);
| ^~~~~~~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/main.dir/build.make:63 : CMakeFiles/main.dir/main.c.obj] Erreur 1
make[1]: *** [CMakeFiles/Makefile2:1538 : CMakeFiles/main.dir/all] Erreur 2
make: *** [Makefile:84 : all] Erreur 2
`
I have maybe a clue, @buildcomics can you please share with us which version of cmake and pico sdk did you use to compile ? It is look like newer version may have some breaking update ! Thank you
Hello,
as i got the wrong RGB led (common anode instead of cathode), i try my best to try to tweak the code to fix color issue that change involve.
I try first without any change on your 1.01 version to compile on Windows without success. I try on Lubuntu after without success too ... My environement seems ok, because i can compile pico example without any issue ! Maybe you have an idea ? In which environement did you compile ?
` lubuntu@lubuntu-virtualbox:~/pico/Busylight/build$ cmake .. Using PICO_SDK_PATH from environment ('../../pico-sdk') PICO_SDK_PATH is /home/lubuntu/pico/pico-sdk Defaulting PICO_PLATFORM to rp2040 since not specified. Defaulting PICO platform compiler to pico_arm_gcc since not specified. -- Defaulting build type to 'Release' since not specified. PICO compiler is pico_arm_gcc -- The C compiler identification is GNU 9.2.1 -- The CXX compiler identification is GNU 9.2.1 -- The ASM compiler identification is GNU -- Found assembler: /usr/bin/arm-none-eabi-gcc Defaulting PICO target board to pico since not specified. Using board configuration from /home/lubuntu/pico/pico-sdk/src/boards/include/boards/pico.h -- Found Python3: /usr/bin/python3.8 (found version "3.8.10") found components: Interpreter TinyUSB available at /home/lubuntu/pico/pico-sdk/lib/tinyusb/src/portable/raspberrypi/rp2040; adding USB support. -- Configuring done -- Generating done -- Build files have been written to: /home/lubuntu/pico/Busylight/build lubuntu@lubuntu-virtualbox:~/pico/Busylight/build$ make -j4 Scanning dependencies of target bs2_default Scanning dependencies of target ELF2UF2Build [ 1%] Creating directories for 'ELF2UF2Build' [ 2%] Building ASM object pico-sdk/src/rp2_common/boot_stage2/CMakeFiles/bs2_default.dir/compile_time_choice.S.obj
[ 3%] Linking ASM executable bs2_default.elf [ 3%] Built target bs2_default [ 5%] No download step for 'ELF2UF2Build' Scanning dependencies of target bs2_default_padded_checksummed_asm [ 6%] Generating bs2_default.bin [ 7%] No patch step for 'ELF2UF2Build' [ 8%] Generating bs2_default_padded_checksummed.S [ 10%] No update step for 'ELF2UF2Build' [ 11%] Performing configure step for 'ELF2UF2Build' [ 11%] Built target bs2_default_padded_checksummed_asm -- The C compiler identification is GNU 9.3.0 -- The CXX compiler identification is GNU 9.3.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Configuring done -- Generating done -- Build files have been written to: /home/lubuntu/pico/Busylight/build/elf2uf2 [ 12%] Performing build step for 'ELF2UF2Build' Scanning dependencies of target elf2uf2 [ 50%] Building CXX object CMakeFiles/elf2uf2.dir/main.cpp.o [100%] Linking CXX executable elf2uf2 [100%] Built target elf2uf2 [ 14%] No install step for 'ELF2UF2Build' [ 15%] Completed 'ELF2UF2Build' [ 15%] Built target ELF2UF2Build Scanning dependencies of target main [ 16%] Building C object CMakeFiles/main.dir/home/lubuntu/pico/pico-sdk/src/rp2_common/pico_stdlib/stdlib.c.obj
[ 17%] Building C object CMakeFiles/main.dir/home/lubuntu/pico/pico-sdk/src/rp2_common/hardware_gpio/gpio.c.obj
[ 19%] Building C object CMakeFiles/main.dir/usb_descriptors.c.obj [ 20%] Building C object CMakeFiles/main.dir/main.c.obj