darknao / btClubSportWheel

ClubSportWheel Bluetooth Controller
GNU General Public License v2.0
84 stars 28 forks source link

teensy 4 wont program #20

Open crookeddeebz opened 1 year ago

crookeddeebz commented 1 year ago

anyone have any clue how to program to a 4.0 board?

i tried teensyloader and also the teensyduino forked project both no go.

thanks

crookeddeebz commented 1 year ago

this is the error i get while trying to compile as per the dchote release, but on a 4.0 board. unknown type name 'usb_packet_t'

the darknao release wont work at all with tinyloader, program doesnt really do anything. auto mode says "add a 2 sec delay, bootloader happened too fast"

thoughts?

crookeddeebz commented 1 year ago

Arduino: 1.8.19 (Windows 10), TD: 1.57, Board: "Teensy 4.0, Fanatec CSW, 24 MHz, Smallest Code, US English"

C:\Users\alesona\Downloads\arduino-1.8.19-windows\arduino-1.8.19\arduino-builder -dump-prefs -logger=machine -hardware C:\Users\alesona\Downloads\arduino-1.8.19-windows\arduino-1.8.19\hardware -tools C:\Users\alesona\Downloads\arduino-1.8.19-windows\arduino-1.8.19\tools-builder -tools C:\Users\alesona\Downloads\arduino-1.8.19-windows\arduino-1.8.19\hardware\tools\avr -built-in-libraries C:\Users\alesona\Downloads\arduino-1.8.19-windows\arduino-1.8.19\libraries -libraries C:\Users\alesona\Documents\Arduino\libraries -fqbn=teensy:avr:teensy40:usb=fanatec,speed=24,opt=osstd,keys=en-us -ide-version=10819 -build-path C:\Users\alesona\AppData\Local\Temp\arduino_build_172782 -warnings=none -build-cache C:\Users\alesona\AppData\Local\Temp\arduino_cache_893714 -verbose C:\Users\alesona\Downloads\arduino-1.8.19-windows\arduino-1.8.19\examples\Teensy\fanatecWheelUSB\fanatecWheelUSB.ino

C:\Users\alesona\Downloads\arduino-1.8.19-windows\arduino-1.8.19\arduino-builder -compile -logger=machine -hardware C:\Users\alesona\Downloads\arduino-1.8.19-windows\arduino-1.8.19\hardware -tools C:\Users\alesona\Downloads\arduino-1.8.19-windows\arduino-1.8.19\tools-builder -tools C:\Users\alesona\Downloads\arduino-1.8.19-windows\arduino-1.8.19\hardware\tools\avr -built-in-libraries C:\Users\alesona\Downloads\arduino-1.8.19-windows\arduino-1.8.19\libraries -libraries C:\Users\alesona\Documents\Arduino\libraries -fqbn=teensy:avr:teensy40:usb=fanatec,speed=24,opt=osstd,keys=en-us -ide-version=10819 -build-path C:\Users\alesona\AppData\Local\Temp\arduino_build_172782 -warnings=none -build-cache C:\Users\alesona\AppData\Local\Temp\arduino_cache_893714 -verbose C:\Users\alesona\Downloads\arduino-1.8.19-windows\arduino-1.8.19\examples\Teensy\fanatecWheelUSB\fanatecWheelUSB.ino

Using board 'teensy40' from platform in folder: C:\Users\alesona\Downloads\arduino-1.8.19-windows\arduino-1.8.19\hardware\teensy\avr

Using core 'teensy4' from platform in folder: C:\Users\alesona\Downloads\arduino-1.8.19-windows\arduino-1.8.19\hardware\teensy\avr

Detecting libraries used...

"C:\Users\alesona\Downloads\arduino-1.8.19-windows\arduino-1.8.19\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -DIMXRT1062 -DTEENSYDUINO=157 -DARDUINO=10819 -DARDUINO_TEENSY40 -DF_CPU=24000000 -DFANATEC_CSW -DLAYOUT_US_ENGLISH "-IC:\Users\alesona\Downloads\arduino-1.8.19-windows\arduino-1.8.19\hardware\teensy\avr\cores\teensy4" "C:\Users\alesona\AppData\Local\Temp\arduino_build_172782\sketch\fanatecWheelUSB.ino.cpp" -o nul

Alternatives for SPI.h: [SPI@1.0]

ResolveLibrary(SPI.h)

-> candidates: [SPI@1.0]

"C:\Users\alesona\Downloads\arduino-1.8.19-windows\arduino-1.8.19\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -DIMXRT1062 -DTEENSYDUINO=157 -DARDUINO=10819 -DARDUINO_TEENSY40 -DF_CPU=24000000 -DFANATEC_CSW -DLAYOUT_US_ENGLISH "-IC:\Users\alesona\Downloads\arduino-1.8.19-windows\arduino-1.8.19\hardware\teensy\avr\cores\teensy4" "-IC:\Users\alesona\Downloads\arduino-1.8.19-windows\arduino-1.8.19\hardware\teensy\avr\libraries\SPI" "C:\Users\alesona\AppData\Local\Temp\arduino_build_172782\sketch\fanatecWheelUSB.ino.cpp" -o nul

"C:\Users\alesona\Downloads\arduino-1.8.19-windows\arduino-1.8.19\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -DIMXRT1062 -DTEENSYDUINO=157 -DARDUINO=10819 -DARDUINO_TEENSY40 -DF_CPU=24000000 -DFANATEC_CSW -DLAYOUT_US_ENGLISH "-IC:\Users\alesona\Downloads\arduino-1.8.19-windows\arduino-1.8.19\hardware\teensy\avr\cores\teensy4" "-IC:\Users\alesona\Downloads\arduino-1.8.19-windows\arduino-1.8.19\hardware\teensy\avr\libraries\SPI" "C:\Users\alesona\AppData\Local\Temp\arduino_build_172782\sketch\debouncer.cpp" -o nul

"C:\Users\alesona\Downloads\arduino-1.8.19-windows\arduino-1.8.19\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -DIMXRT1062 -DTEENSYDUINO=157 -DARDUINO=10819 -DARDUINO_TEENSY40 -DF_CPU=24000000 -DFANATEC_CSW -DLAYOUT_US_ENGLISH "-IC:\Users\alesona\Downloads\arduino-1.8.19-windows\arduino-1.8.19\hardware\teensy\avr\cores\teensy4" "-IC:\Users\alesona\Downloads\arduino-1.8.19-windows\arduino-1.8.19\hardware\teensy\avr\libraries\SPI" "C:\Users\alesona\AppData\Local\Temp\arduino_build_172782\sketch\fanatec.cpp" -o nul

"C:\Users\alesona\Downloads\arduino-1.8.19-windows\arduino-1.8.19\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -DIMXRT1062 -DTEENSYDUINO=157 -DARDUINO=10819 -DARDUINO_TEENSY40 -DF_CPU=24000000 -DFANATEC_CSW -DLAYOUT_US_ENGLISH "-IC:\Users\alesona\Downloads\arduino-1.8.19-windows\arduino-1.8.19\hardware\teensy\avr\cores\teensy4" "-IC:\Users\alesona\Downloads\arduino-1.8.19-windows\arduino-1.8.19\hardware\teensy\avr\libraries\SPI" "C:\Users\alesona\AppData\Local\Temp\arduino_build_172782\sketch\fanatec_joystick.c" -o nul

"C:\Users\alesona\Downloads\arduino-1.8.19-windows\arduino-1.8.19\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -DIMXRT1062 -DTEENSYDUINO=157 -DARDUINO=10819 -DARDUINO_TEENSY40 -DF_CPU=24000000 -DFANATEC_CSW -DLAYOUT_US_ENGLISH "-IC:\Users\alesona\Downloads\arduino-1.8.19-windows\arduino-1.8.19\hardware\teensy\avr\cores\teensy4" "-IC:\Users\alesona\Downloads\arduino-1.8.19-windows\arduino-1.8.19\hardware\teensy\avr\libraries\SPI" "C:\Users\alesona\Downloads\arduino-1.8.19-windows\arduino-1.8.19\hardware\teensy\avr\libraries\SPI\SPI.cpp" -o nul

Generating function prototypes...

"C:\Users\alesona\Downloads\arduino-1.8.19-windows\arduino-1.8.19\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -DIMXRT1062 -DTEENSYDUINO=157 -DARDUINO=10819 -DARDUINO_TEENSY40 -DF_CPU=24000000 -DFANATEC_CSW -DLAYOUT_US_ENGLISH "-IC:\Users\alesona\Downloads\arduino-1.8.19-windows\arduino-1.8.19\hardware\teensy\avr\cores\teensy4" "-IC:\Users\alesona\Downloads\arduino-1.8.19-windows\arduino-1.8.19\hardware\teensy\avr\libraries\SPI" "C:\Users\alesona\AppData\Local\Temp\arduino_build_172782\sketch\fanatecWheelUSB.ino.cpp" -o "C:\Users\alesona\AppData\Local\Temp\arduino_build_172782\preproc\ctags_target_for_gcc_minus_e.cpp"

"C:\Users\alesona\Downloads\arduino-1.8.19-windows\arduino-1.8.19\tools-builder\ctags\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\Users\alesona\AppData\Local\Temp\arduino_build_172782\preproc\ctags_target_for_gcc_minus_e.cpp"

Compiling sketch...

"C:\Users\alesona\Downloads\arduino-1.8.19-windows\arduino-1.8.19\hardware\teensy/../tools/precompile_helper" "C:\Users\alesona\Downloads\arduino-1.8.19-windows\arduino-1.8.19\hardware\teensy\avr/cores/teensy4" "C:\Users\alesona\AppData\Local\Temp\arduino_build_172782" "C:\Users\alesona\Downloads\arduino-1.8.19-windows\arduino-1.8.19\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -x c++-header -Os --specs=nano.specs -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -DIMXRT1062 -DTEENSYDUINO=157 -DARDUINO=10819 -DARDUINO_TEENSY40 -DF_CPU=24000000 -DFANATEC_CSW -DLAYOUT_US_ENGLISH "-IC:\Users\alesona\Downloads\arduino-1.8.19-windows\arduino-1.8.19\hardware\teensy\avr/cores/teensy4" "C:\Users\alesona\AppData\Local\Temp\arduino_build_172782/pch/Arduino.h" -o "C:\Users\alesona\AppData\Local\Temp\arduino_build_172782/pch/Arduino.h.gch"

Using previously compiled file: C:\Users\alesona\AppData\Local\Temp\arduino_build_172782\pch\Arduino.h.gch

"C:\Users\alesona\Downloads\arduino-1.8.19-windows\arduino-1.8.19\hardware\teensy/../tools/arm/bin/arm-none-eabi-gcc" -c -Os --specs=nano.specs -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -DIMXRT1062 -DTEENSYDUINO=157 -DARDUINO=10819 -DARDUINO_TEENSY40 -DF_CPU=24000000 -DFANATEC_CSW -DLAYOUT_US_ENGLISH "-IC:\Users\alesona\Downloads\arduino-1.8.19-windows\arduino-1.8.19\hardware\teensy\avr\cores\teensy4" "-IC:\Users\alesona\Downloads\arduino-1.8.19-windows\arduino-1.8.19\hardware\teensy\avr\libraries\SPI" "C:\Users\alesona\AppData\Local\Temp\arduino_build_172782\sketch\fanatec_joystick.c" -o "C:\Users\alesona\AppData\Local\Temp\arduino_build_172782\sketch\fanatec_joystick.c.o"

fanatec_joystick.c: In function 'fanatec_joystick_send':

fanatec_joystick.c:74: error: unknown type name 'usb_packet_t'

usb_packet_t *tx_packet;

^

fanatec_joystick.c:79: error: 'usb_configuration' undeclared (first use in this function)

 if (!usb_configuration) {

      ^

C:\Users\alesona\Downloads\arduino-1.8.19-windows\arduino-1.8.19\examples\Teensy\fanatecWheelUSB\fanatec_joystick.c:79:10: note: each undeclared identifier is reported only once for each function it appears in

fanatec_joystick.c:84: warning: implicit declaration of function 'usb_tx_packet_count'

 if (usb_tx_packet_count(JOYSTICK_ENDPOINT) < TX_PACKET_LIMIT) {

     ^

fanatec_joystick.c:84: error: 'JOYSTICK_ENDPOINT' undeclared (first use in this function)

 if (usb_tx_packet_count(JOYSTICK_ENDPOINT) < TX_PACKET_LIMIT) {

                         ^

fanatec_joystick.c:85: warning: implicit declaration of function 'usb_malloc'

   tx_packet = usb_malloc();

               ^

fanatec_joystick.c:85: warning: assignment makes pointer from integer without a cast

   tx_packet = usb_malloc();

             ^

fanatec_joystick.c:99: error: request for member 'buf' in something not a structure or union

memcpy(tx_packet->buf, fanatec_joystick_data, JOYSTICK_SIZE);

               ^

fanatec_joystick.c:99: error: 'JOYSTICK_SIZE' undeclared (first use in this function)

memcpy(tx_packet->buf, fanatec_joystick_data, JOYSTICK_SIZE);

                                             ^

fanatec_joystick.c:100: error: request for member 'len' in something not a structure or union

tx_packet->len = JOYSTICK_SIZE;

        ^

fanatec_joystick.c:102: warning: implicit declaration of function 'usb_tx'

usb_tx(JOYSTICK_ENDPOINT, tx_packet);

^

fanatec_joystick.c: In function 'fanatec_lights_recv':

fanatec_joystick.c:109: error: unknown type name 'usb_packet_t'

usb_packet_t *rx_packet;

^

fanatec_joystick.c:113: error: 'usb_configuration' undeclared (first use in this function)

 if (!usb_configuration) {

      ^

fanatec_joystick.c:117: warning: implicit declaration of function 'usb_rx'

 rx_packet = usb_rx(LIGHTS_ENDPOINT);

             ^

fanatec_joystick.c:117: error: 'LIGHTS_ENDPOINT' undeclared (first use in this function)

 rx_packet = usb_rx(LIGHTS_ENDPOINT);

                    ^

fanatec_joystick.c:125: error: request for member 'buf' in something not a structure or union

memcpy(buffer, rx_packet->buf, LIGHTS_SIZE);

                       ^

fanatec_joystick.c:125: error: 'LIGHTS_SIZE' undeclared (first use in this function)

memcpy(buffer, rx_packet->buf, LIGHTS_SIZE);

                              ^

fanatec_joystick.c:126: warning: implicit declaration of function 'usb_free'

usb_free(rx_packet);

^

fanatec_joystick.c: In function 'fanatec_lights_available':

fanatec_joystick.c:135: error: 'usb_configuration' undeclared (first use in this function)

if (!usb_configuration) {

    ^

fanatec_joystick.c:139: warning: implicit declaration of function 'usb_rx_byte_count'

count = usb_rx_byte_count(LIGHTS_ENDPOINT);

       ^

fanatec_joystick.c:139: error: 'LIGHTS_ENDPOINT' undeclared (first use in this function)

count = usb_rx_byte_count(LIGHTS_ENDPOINT);

                         ^

fanatec_joystick.c: In function 'fanatec_lights_recv':

fanatec_joystick.c:129: warning: control reaches end of non-void function

}

^

Using library SPI at version 1.0 in folder: C:\Users\alesona\Downloads\arduino-1.8.19-windows\arduino-1.8.19\hardware\teensy\avr\libraries\SPI

unknown type name 'usb_packet_t'

menekoks commented 1 year ago

hello - lak