Skip to content

picoSDK 1.4.0 #2

@kpishere

Description

@kpishere

There seems to be a change in picoSDK to accommodate CDC devices but the solution does not play nice with Rust.

Any idea how to work with this? I'm a bit of a newb to Rust.

https://forums.raspberrypi.com/viewtopic.php?t=334842

Trying to use:

Cargo.toml: tinyusb-sys = { version = "0.1", features = ["device", "cdc", "rp2040"] }

Build error :

The following warnings were emitted during compilation:

warning: tinyusb/src/class/cdc/cdc_device.c:62:21: error: 'CFG_TUD_CDC_RX_BUFSIZE' undeclared here (not in a function); did you mean 'CFG_TUD_CDC_EP_BUFSIZE'?
warning:    62 |   uint8_t rx_ff_buf[CFG_TUD_CDC_RX_BUFSIZE];
warning:       |                     ^~~~~~~~~~~~~~~~~~~~~~
warning:       |                     CFG_TUD_CDC_EP_BUFSIZE
warning: tinyusb/src/class/cdc/cdc_device.c:63:21: error: 'CFG_TUD_CDC_TX_BUFSIZE' undeclared here (not in a function); did you mean 'CFG_TUD_CDC_EP_BUFSIZE'?
warning:    63 |   uint8_t tx_ff_buf[CFG_TUD_CDC_TX_BUFSIZE];
warning:       |                     ^~~~~~~~~~~~~~~~~~~~~~
warning:       |                     CFG_TUD_CDC_EP_BUFSIZE

error: failed to run custom build command for `tinyusb-sys v0.1.0`

Caused by:
  process didn't exit successfully: `/Users/kevinpeck/Desktop/RepRap-RatRigVCore3/rp2040-project-template/target/debug/build/tinyusb-sys-210bd74e28cbde15/build-script-build` (exit status: 1)
  --- stdout
  OPT_LEVEL = Some("3")
  TARGET = Some("thumbv6m-none-eabi")
  HOST = Some("x86_64-apple-darwin")
  CC_thumbv6m-none-eabi = None
  CC_thumbv6m_none_eabi = None
  TARGET_CC = None
  CC = None
  CROSS_COMPILE = None
  CFLAGS_thumbv6m-none-eabi = None
  CFLAGS_thumbv6m_none_eabi = None
  TARGET_CFLAGS = None
  CFLAGS = None
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("true")
  CARGO_CFG_TARGET_FEATURE = Some("llvm14-builtins-abi,mclass,thumb-mode,v5te,v6")
  TARGET = Some("thumbv6m-none-eabi")
  OPT_LEVEL = Some("3")
  HOST = Some("x86_64-apple-darwin")
  CC_thumbv6m-none-eabi = None
  CC_thumbv6m_none_eabi = None
  TARGET_CC = None
  CC = None
  CROSS_COMPILE = None
  CFLAGS_thumbv6m-none-eabi = None
  CFLAGS_thumbv6m_none_eabi = None
  TARGET_CFLAGS = None
  CFLAGS = None
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("true")
  CARGO_CFG_TARGET_FEATURE = Some("llvm14-builtins-abi,mclass,thumb-mode,v5te,v6")
  running: "arm-none-eabi-gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-g" "-fno-omit-frame-pointer" "-mthumb" "-march=armv6s-m" "-I" "tinyusb/src" "-I" "/Users/kevinpeck/Desktop/RepRap-RatRigVCore3/rp2040-project-template/target/thumbv6m-none-eabi/debug/build/tinyusb-sys-b50017a813ab06a7/out" "-Wall" "-Wextra" "-o" "/Users/kevinpeck/Desktop/RepRap-RatRigVCore3/rp2040-project-template/target/thumbv6m-none-eabi/debug/build/tinyusb-sys-b50017a813ab06a7/out/tinyusb/src/class/audio/audio_device.o" "-c" "tinyusb/src/class/audio/audio_device.c"
  exit status: 0
  running: "arm-none-eabi-gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-g" "-fno-omit-frame-pointer" "-mthumb" "-march=armv6s-m" "-I" "tinyusb/src" "-I" "/Users/kevinpeck/Desktop/RepRap-RatRigVCore3/rp2040-project-template/target/thumbv6m-none-eabi/debug/build/tinyusb-sys-b50017a813ab06a7/out" "-Wall" "-Wextra" "-o" "/Users/kevinpeck/Desktop/RepRap-RatRigVCore3/rp2040-project-template/target/thumbv6m-none-eabi/debug/build/tinyusb-sys-b50017a813ab06a7/out/tinyusb/src/class/bth/bth_device.o" "-c" "tinyusb/src/class/bth/bth_device.c"
  exit status: 0
  running: "arm-none-eabi-gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-g" "-fno-omit-frame-pointer" "-mthumb" "-march=armv6s-m" "-I" "tinyusb/src" "-I" "/Users/kevinpeck/Desktop/RepRap-RatRigVCore3/rp2040-project-template/target/thumbv6m-none-eabi/debug/build/tinyusb-sys-b50017a813ab06a7/out" "-Wall" "-Wextra" "-o" "/Users/kevinpeck/Desktop/RepRap-RatRigVCore3/rp2040-project-template/target/thumbv6m-none-eabi/debug/build/tinyusb-sys-b50017a813ab06a7/out/tinyusb/src/class/cdc/cdc_device.o" "-c" "tinyusb/src/class/cdc/cdc_device.c"
  cargo:warning=tinyusb/src/class/cdc/cdc_device.c:62:21: error: 'CFG_TUD_CDC_RX_BUFSIZE' undeclared here (not in a function); did you mean 'CFG_TUD_CDC_EP_BUFSIZE'?
  cargo:warning=   62 |   uint8_t rx_ff_buf[CFG_TUD_CDC_RX_BUFSIZE];
  cargo:warning=      |                     ^~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=      |                     CFG_TUD_CDC_EP_BUFSIZE
  cargo:warning=tinyusb/src/class/cdc/cdc_device.c:63:21: error: 'CFG_TUD_CDC_TX_BUFSIZE' undeclared here (not in a function); did you mean 'CFG_TUD_CDC_EP_BUFSIZE'?
  cargo:warning=   63 |   uint8_t tx_ff_buf[CFG_TUD_CDC_TX_BUFSIZE];
  cargo:warning=      |                     ^~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=      |                     CFG_TUD_CDC_EP_BUFSIZE
  exit status: 1

  --- stderr


  error occurred: Command "arm-none-eabi-gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-g" "-fno-omit-frame-pointer" "-mthumb" "-march=armv6s-m" "-I" "tinyusb/src" "-I" "/Users/kevinpeck/Desktop/RepRap-RatRigVCore3/rp2040-project-template/target/thumbv6m-none-eabi/debug/build/tinyusb-sys-b50017a813ab06a7/out" "-Wall" "-Wextra" "-o" "/Users/kevinpeck/Desktop/RepRap-RatRigVCore3/rp2040-project-template/target/thumbv6m-none-eabi/debug/build/tinyusb-sys-b50017a813ab06a7/out/tinyusb/src/class/cdc/cdc_device.o" "-c" "tinyusb/src/class/cdc/cdc_device.c" with args "arm-none-eabi-gcc" did not execute successfully (status code exit status: 1).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions