foone , Englisch
@foone@digipres.club avatar

GAH. working with the raspi pico just makes me angry because of how confusing and unhelpful it can be. like I wrote some code, which I know works (because I've used it before!) and I copy it onto the device. I reconnect the device and... it doesn't enumerate. it doesn't even error. it just acts like there's no USB there

foone OP ,
@foone@digipres.club avatar

which would normally suggest that there's some issue with the hardware but I can push the BOOTSEL and and reconnect and get it back into programming mode just fine!

and I can flash circuitpython onto it and have that work just fine too

foone OP ,
@foone@digipres.club avatar

so there's something wrong with my code, I guess. what is it? I have no way to know, because I have no errors and no debugging feedback

foone OP ,
@foone@digipres.club avatar

ARGH my codebase has two copies of the known-working code and the code is identical but the CMakeFiles are different and one works and the other doesn't

foone OP ,
@foone@digipres.club avatar

both compile just fine without errors, but one of them apparently results in a dead pico that can't enumerate

foone OP ,
@foone@digipres.club avatar

I fixed it (god only knows how) but now the printer won't print.

A_C_McGregor ,
@A_C_McGregor@topspicy.social avatar

@foone That's just default printer behaviour. Try threatening to dismantle it with a hammer.

keithmann ,
@keithmann@mastodon.online avatar

@foone Fixed for certain values of "fixed" eh?

raptor85 ,
@raptor85@mastodon.gamedev.place avatar

@foone best guess: the one that doesn't work is likely not stripping the elf header after compilation, elf only works if you have a loader for it, if you want a raw executable(like to load as firmware) you gotta trim it off and start the code from the address of the _start symbol.

Don't know for sure obviously but that's the most likely culprit always in situations like this.

pancomputans ,
@pancomputans@norden.social avatar

@foone Always nice to have a reminder why DRY is actually useful.

ChuckMcManis ,
@ChuckMcManis@chaos.social avatar

@foone Don't suppose you have the SWD access? If so using the BlackMagic Probe is pretty straight forward. If not it is definitely tough sledding.

Jhynjhiruu ,
@Jhynjhiruu@toot.wales avatar

@foone I like to connect two of the pins to act as UART and configure the SDK to do C stdio over that (there's a CMake function for it)

vurpo ,
@vurpo@mastodon.coffee avatar

@foone pi pico uses a fully software implementation of USB (not hardware), so if the software doesn't work then it literally isn't USB and won't enumerate

  • Alle
  • Abonniert
  • Moderiert
  • Favoriten
  • random
  • haupteingang
  • Alle Magazine