Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: static assertion failed: CFG_TUSB_RHPORT0_MODE/CFG_TUSB_RHPORT1_MODE must be defined on RP2040 since specific update #474

Open
doctea opened this issue Nov 19, 2024 · 3 comments
Labels
Bug Something isn't working

Comments

@doctea
Copy link

doctea commented Nov 19, 2024

Operating System

Windows 11

Arduino IDE version

VSCode+Platformio

Board

RP2040

ArduinoCore version

n/a

TinyUSB Library version

f13b57a

Sketch as ATTACHED TXT

n/a

Compiled Log as ATTACHED TXT

In file included from C:\Users\doctea\.platformio\packages\framework-arduinopico\libraries\FreeRTOS\src\variantHooks.cpp:37:
C:\Users\doctea\.platformio\packages\framework-arduinopico\libraries\FreeRTOS\src\variantHooks.cpp: In function 'void __usb(void*)':
.pio\libdeps\pcb\Adafruit TinyUSB Library\src/tusb.h:146:53: error: static assertion failed: CFG_TUSB_RHPORT0_MODE/CFG_TUSB_RHPORT1_MODE must be defined
  146 |   #define _tusb_init_arg0()        TU_VERIFY_STATIC(false, "CFG_TUSB_RHPORT0_MODE/CFG_TUSB_RHPORT1_MODE must be defined")
      |                                                     ^~~~~
.pio\libdeps\pcb\Adafruit TinyUSB Library\src/common/tusb_compiler.h:39:31: note: in expansion of macro '_tusb_init_arg0'
   39 | #define TU_STRCAT(a, b)       a##b                ///< concat without expand
      |                               ^
.pio\libdeps\pcb\Adafruit TinyUSB Library\src/common/tusb_compiler.h:42:31: note: in expansion of macro 'TU_STRCAT'
   42 | #define TU_XSTRCAT(a, b)      TU_STRCAT(a, b)     ///< expand then concat
      |                               ^~~~~~~~~
.pio\libdeps\pcb\Adafruit TinyUSB Library\src/common/tusb_compiler.h:127:43: note: in expansion of macro 'TU_XSTRCAT'
  127 | #define TU_FUNC_OPTIONAL_ARG(func, ...)   TU_XSTRCAT(func##_arg, TU_ARGS_NUM(__VA_ARGS__))(__VA_ARGS__)
      |                                           ^~~~~~~~~~
.pio\libdeps\pcb\Adafruit TinyUSB Library\src/tusb.h:151:46: note: in expansion of macro 'TU_FUNC_OPTIONAL_ARG'
  151 | #define tusb_init(...)                       TU_FUNC_OPTIONAL_ARG(_tusb_init, __VA_ARGS__)
      |                                              ^~~~~~~~~~~~~~~~~~~~
C:\Users\doctea\.platformio\packages\framework-arduinopico\libraries\FreeRTOS\src\variantHooks.cpp:468:5: note: in expansion of macro 'tusb_init'
  468 |     tusb_init();
      |     ^~~~~~~~~

What happened ?

Updated to newer version of TinyUSB on my RP2040 project, compile fails with the output below. I've done a git bisect and found that f13b57a01aaed4fe51b3000cb3ce89ad8c8c83dc is the first bad commit. Hope this helps someone!

How to reproduce ?

Compile on RP2040 with any version of TinyUSB after commit f13b57a.

Debug Log

No response

Screenshots

No response

@doctea doctea added the Bug Something isn't working label Nov 19, 2024
@hathach
Copy link
Member

hathach commented Nov 20, 2024

what is the arduino core version ?

@doctea
Copy link
Author

doctea commented Nov 20, 2024

what is the arduino core version ?

I'll check precise version and get back to you. I believe it should be the latest version of the earlephilhower arduino-pico core, though.

@doctea
Copy link
Author

doctea commented Nov 21, 2024

My platformio.ini says platform = https://github.com/maxgerhardt/platform-raspberrypi and board_build.core = earlephilhower and it was installed on the 20th November -- is that all you need to know?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants