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

SDK1.3.0 specific (requiring) changes #173

Merged
merged 2 commits into from
Oct 26, 2021
Merged

SDK1.3.0 specific (requiring) changes #173

merged 2 commits into from
Oct 26, 2021

Conversation

kilograham
Copy link
Contributor

  • Fixup TinyUSB build for 0.12.0, and add back standalone examples for device/host (copied from TinyUSB)

- Fixup TinyUSB build for 0.12.0, and add back standalone examples for device/host (copied from TinyUSB)
@kilograham kilograham added this to the SDK 1.3.0 release milestone Oct 22, 2021
@kilograham kilograham self-assigned this Oct 22, 2021
@lurch
Copy link
Contributor

lurch commented Oct 25, 2021

CI is failing to build. For some reason the build-error isn't displaying in the CI build-log, but if I try building this branch locally it tells me:

[ 98%] Building C object usb/host/host_cdc_msc_hid/CMakeFiles/host_cdc_msc_hid.dir/hid_app.c.obj
In file included from $PICO_SDK_PATH/lib/tinyusb/src/common/tusb_common.h:68:0,
                 from $PICO_SDK_PATH/lib/tinyusb/src/tusb.h:37,
                 from $PICO_SDK_PATH/lib/tinyusb/hw/bsp/board.h:42,
                 from $PICO_EXAMPLES_PATH/usb/host/host_cdc_msc_hid/hid_app.c:26:
$PICO_SDK_PATH/lib/tinyusb/src/tusb_option.h:269:6: warning: #warning CFG_TUSB_HOST_DEVICE_MAX is not defined, default value is 1 [-Wcpp]
     #warning CFG_TUSB_HOST_DEVICE_MAX is not defined, default value is 1
      ^~~~~~~
$PICO_SDK_PATH/lib/tinyusb/src/tusb_option.h:274:6: error: #error there is no benefit enable hub with max device is 1. Please disable hub or increase CFG_TUSB_HOST_DEVICE_MAX
     #error there is no benefit enable hub with max device is 1. Please disable hub or increase CFG_TUSB_HOST_DEVICE_MAX
      ^~~~~

(paths above hand-edited for clarity)

So then I tried switching my pico-sdk from develop to tinyusb_0_12 but the git submodule update failed with

fatal: remote error: upload-pack: not our ref 4bfab30c02279a0530e1a56f4a7c539f2d35a293
fatal: The remote end hung up unexpectedly
Fetched in submodule path 'lib/tinyusb', but it did not contain 4bfab30c02279a0530e1a56f4a7c539f2d35a293. Direct fetching of that commit failed.

😕

@lurch
Copy link
Contributor

lurch commented Oct 25, 2021

Ahhh, the latter part was my mistake - it was an old pico-sdk checkout which was pointing to our tinyusb fork still. With a fresh clone of pico-sdk on the tinyusb_0_12 branch (and updated submodule) this PR builds okay locally.

@liamfraser
Copy link
Contributor

The error is in the CI log, just not at the bottom because we are doing make with a lot of cores.

/opt/actions-runner/_work/pico-examples/pico-examples/pico-sdk/lib/tinyusb/src/tusb_option.h:269:6: warning: #warning CFG_TUSB_HOST_DEVICE_MAX is not defined, default value is 1 [-Wcpp]
     #warning CFG_TUSB_HOST_DEVICE_MAX is not defined, default value is 1
      ^~~~~~~
/opt/actions-runner/_work/pico-examples/pico-examples/pico-sdk/lib/tinyusb/src/tusb_option.h:274:6: error: #error there is no benefit enable hub with max device is 1. Please disable hub or increase CFG_TUSB_HOST_DEVICE_MAX
     #error there is no benefit enable hub with max device is 1. Please disable hub or increase CFG_TUSB_HOST_DEVICE_MAX
      ^~~~~
In file included from /opt/actions-runner/_work/pico-examples/pico-examples/pico-sdk/lib/tinyusb/src/common/tusb_common.h:68:0,
                 from /opt/actions-runner/_work/pico-examples/pico-examples/pico-sdk/lib/tinyusb/src/tusb.h:37,
                 from /opt/actions-runner/_work/pico-examples/pico-examples/pico-sdk/lib/tinyusb/hw/bsp/board.h:42,
                 from /opt/actions-runner/_work/pico-examples/pico-examples/pico-examples/usb/host/host_cdc_msc_hid/main.c:30:
/opt/actions-runner/_work/pico-examples/pico-examples/pico-sdk/lib/tinyusb/src/tusb_option.h:269:6: warning: #warning CFG_TUSB_HOST_DEVICE_MAX is not defined, default value is 1 [-Wcpp]
     #warning CFG_TUSB_HOST_DEVICE_MAX is not defined, default value is 1
      ^~~~~~~

Feels like we need to up CFG_TUSB_HOST_DEVICE_MAX to 5 or something like that

@liamfraser
Copy link
Contributor

Andrew is right this does indeed build okay locally. Because sdk version and examples need to change in step. My bad

@kilograham
Copy link
Contributor Author

Andrew is right this does indeed build okay locally. Because sdk version and examples need to change in step. My bad

Yeah, there is an SDK version check, however the example branch has been SDK1.3.0-develop for a while which also passes

@kilograham kilograham merged commit 845daad into develop Oct 26, 2021
@kilograham kilograham deleted the sdk130 branch October 26, 2021 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants