Skip to content

Build firmware instructions #3

Closed
@vChavezB

Description

Describe the bug
I cannot build the firmware with the latest rpi-pico sdk.

To Reproduce

git clone https://github.com/raspberrypi/pico-sdk --recurse-submodules
git clone https://github.com/Staacks/gbinterceptor
cd gbinterceptor/firmware
mkdir build && cd build
cmake .. -G Ninja -DPICO_SDK_PATH=../../../pico-sdk
ninja

Expected behavior

No compiler errors when building and binary output in cmake output directory.

Error

/gbinterceptor/firmware/main.c:265:69:` error: unknown type name 'video_probe_and_commit_control_t'
  265 | int tud_video_commit_cb(uint_fast8_t ctl_idx, uint_fast8_t stm_idx, video_probe_and_commit_control_t const *parameters) {

After I add this to tusb_config.h

// RHPort max operational speed can defined by board.mk
// Default to Highspeed for MCU with internal HighSpeed PHY (can be port specific), otherwise FullSpeed
#ifndef BOARD_DEVICE_RHPORT_SPEED
  #if (CFG_TUSB_MCU == OPT_MCU_LPC18XX || CFG_TUSB_MCU == OPT_MCU_LPC43XX || CFG_TUSB_MCU == OPT_MCU_MIMXRT10XX || \
       CFG_TUSB_MCU == OPT_MCU_NUC505  || CFG_TUSB_MCU == OPT_MCU_CXD56 || CFG_TUSB_MCU == OPT_MCU_SAMX7X)
    #define BOARD_DEVICE_RHPORT_SPEED   OPT_MODE_HIGH_SPEED
  #else
    #define BOARD_DEVICE_RHPORT_SPEED   OPT_MODE_FULL_SPEED
  #endif
#endif

// Device mode with rhport and speed defined by board.mk
#if   BOARD_DEVICE_RHPORT_NUM == 0
  #define CFG_TUSB_RHPORT0_MODE     (OPT_MODE_DEVICE | BOARD_DEVICE_RHPORT_SPEED)
#elif BOARD_DEVICE_RHPORT_NUM == 1
  #define CFG_TUSB_RHPORT1_MODE     (OPT_MODE_DEVICE | BOARD_DEVICE_RHPORT_SPEED)
#else
  #error "Incorrect RHPort configuration"
#endif

It starts to compile alas I get more errors due to macros not being defined.

/gbinterceptor/firmware/usb_descriptors.h:29:86: error: 'TUD_VIDEO_DESC_CAMERA_TERM_LEN' undeclared here (not in a function); did you mean 'TUD_VIDEO_DESC_INPUT_TERM_LEN'?

I suspect the firmware was developed for an older version of the rpi-pico sdk, could you mention which tag or hash commit you used from the rpi-pico sdk to reproduce the build.

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