getting the pico usb host example compiled correctly12/01/2022 at 19:51 • 2 comments
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:
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:
Building openOCD for picoprobe on M1 mac12/01/2022 at 12:35 • 0 comments
Had some trouble compiling the openOCD version for the picoprobe on the M1 macbook. This is based on a thread on github and the official guides, plus some blog posts that basically copied from each other.
#install additional brew libraries brew install libtool automake texinfo wget gcc pkg-config libusb # some path magic so compilers know where to look for stuff export PATH="$(brew --prefix)/opt/texinfo/bin:$PATH" # download openocd files with picoprobe branch git clone https://github.com/raspberrypi/openocd.git \ --branch picoprobe --depth=1 cd openocd ./bootstrap # this enables the picoprobe and deactivates other modules that fail to compile otherwise CAPSTONE_CFLAGS="-I$(brew --prefix)/include" \ ./configure --prefix="$(brew --prefix)" \ --enable-picoprobe --disable-presto --disable-werror --disable-openjtag make -j4 # this will probably overwrite your current installation # and will break openjtag make install # optionally remove the installation folder cd ~/git rm -rf openocd
burning firmware onto an ST-Link to burn firmware onto anything else06/07/2021 at 18:37 • 0 comments
at least I'm trying to find that out. The clones from aliexpress are supposed to be only able to program st chips. But I want to use it to program some SAMD-21 chips. Never done that as well. So this is a link drop first. Figuring it out for MAC OS.
install open-OCD via homebrew
for unlocking the stm for new firmware go here
install new firmware called cmsis-dap
get this file
install with this line
openocd -f interface/stlink.cfg -f target/stm32f1x.cfg -c "init" -c "halt" \ -c "flash write_image ./CMSIS-DAP-STLINK21.hex" -c "shutdown"
doing this to flash arturos latest keyboard firmware, had to install arm gcc first. Brew doesn't work as it's not trusted. Downloading here helped.
to compile arturos fine firmware, you need to add the ARM stuff to your path, otherwise you compile and wonder why he wont find "gcc-arm-none-eabi" again.
Hey Dave ;-) Thanks for #Five Cubed dude, much appreciated.
Man was that tough not copying your #Skeleton Attiny85 Handheld , I had to breakout the old copper tape. ;-D