Close

getting the pico usb host example compiled correctly

davedarkodavedarko wrote 12/01/2022 at 19:51 • 1 min read • Like

I couldn't find the picoprobe with openOCD until I flashed it with a pre compiled picoprobe.uf2 file instead of compiling it myself. If it works, it works - I guess.

found the related issue where I got the working picoprobe.uf2 got from: https://github.com/raspberrypi/openocd/issues/71
Basically pointing to this site where you can download the probe firmware:

https://www.raspberrypi.com/documentation/microcontrollers/raspberry-pi-pico.html#debugging-using-another-raspberry-pi-pico


So apparently there's a tinyusb bug that will break the usb hid example and throw something like this at you:

assertion "ep->active" failed: file "~/Projects/pico/pico-sdk/lib/tinyusb/src/portable/raspberrypi/rp2040/hcd_rp2040.c", line 164, function: hw_trans_complete

This has something to do with the debug mode and you need a flag to run cmake first before compiling:

PICO_SDK_PATH=~/Projects/pico/pico-sdk cmake .. -DCMAKE_BUILD_TYPE=Release
make -j8

I have yet to find out what the difference between -j8 and -j4 means but hey, that up their worked.

link that helped: https://github.com/raspberrypi/pico-sdk/issues/649

video that helped: 

Like

Discussions

deʃhipu wrote 12/01/2022 at 21:42 point

The -j parameter tells Make how many threads to spawn, when it can compile things in parallel. It makes sense to set it to the number of cores your processor has, or, for some stupid magical reasons, double that on some architectures. In any case, the only thing it will affect is the speed of compilation and how high your laptop will hover on its fans.

  Are you sure? yes | no

davedarko wrote 12/01/2022 at 23:08 point

ha thanks, good to know! :) I have that magical M1 thing that doesn't seem to need fans, only when recoding blu-rays

  Are you sure? yes | no