Also interesting potential conflict: picotool sees Program Information none when in BootSel mode, but unplugged and replugged the Pico2 back in after and it is the same disconnect/ reconnect behaviour as yesterday.
Hi Kevin,
One final update for now - I tried plugging the flashed Pico2 into a Pi400 and it exhibited similar connect/ disconnect cycles in dmesg as before.
I went through the same install and flashing steps on the Pi400 and the result is again the same, several connect/ disconnect cycles and nothing shows up in ls.
I’m sorry, I’m not sure what more I can try or how to get past this issue.
Would you like me to ship you some of this hardware? (I assume you are in the US?)
I could send you the misbehaving Pico2 and also I can solder up one of these RP2350B Stamp XL on a carrier board, like in this pic. That way you can test and dev for yourself.
The RP2350 was announced as being available in volume by the end of the year. It looks like the form for requesting early samples was recently taken down, presumably in preparation for that.
I was able to reproduce this error locally. But only if I compile the code on older versions of gcc. Specifically, arm-none-eabi-gcc (15:8-2019-q3-1+b1) 8.3.1 20190703 (release) [gcc-8-branch revision 273027]
and arm-none-eabi-gcc (15:7-2018-q2-6) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907]
show the problem. However, arm-none-eabi-gcc (Fedora 14.1.0-1.fc40) 14.1.0
does not show the problem.
Can you recheck if the binary I uploaded before works on your boards?
sudo ~/klipper/lib/rp2040_flash/rp2040_flash /path/to/kevins/klipper.uf2
I’m still tracking down why the older versions of gcc are not working. It’s reproducible across different Kconfig options and gcc optimization levels.
-Kevin
After further testing, it seems the error only occurs with older versions of gcc when using USBSERIAL mode - I don’t see the error when compiling for UART.
It looks like something on older versions of gcc, somewhere in the USB code, causes an unhandled event of some kind, which causes the DefaultHandler()
code to run, which results in the watchdog triggering, which causes a reset loop. I have not yet tracked down the actual root cause.
-Kevin
I was able to track down the problem with older versions of gcc. It seems various versions of newlibc may deploy a memcpy()
implementation that emits unaligned memory accesses. Thus it is not valid to call memcpy()
on the USB device “dpram” memory (as that memory area does not support unaligned accesses).
I have made that fix to the rp2040/rp2350 support.
I have also committed the rp2350 support to the main Klipper repository ( Add support for rp2350 micro-controllers by KevinOConnor · Pull Request #6725 · Klipper3d/klipper · GitHub ).
-Kevin
Hi Kevin,
I believe we have success:
I grabbed a new Pico2 so I will try this with previously used hardware later.
This is using the current klipper/master and just the basic commands set, including USBSERIAL.
Thank you so much for your diligence in tracking down this truly weird issue.
-Ray
Hi Kevin,
Quick question as I could not tell from reading the new commits, have you added support for the RP2350B IC? As in, can I try to configure the higher GPIO pins and use the ADC pins on the B chip with the current code?
Thanks!
Ray
No - the current code only supports the first 30 gpio pins. As I understand it, it should be possible to bootup an RP2350B chip with the current code, but gpios>30 wont work and neither will any of the adc pins.
If you (or someone else) has access to an RP2350B and are willing to run tests, then I can probably send over development code. If interested, verify the current code flashes and boots with the current code, and then attach the full klipper log here.
Cheers,
-Kevin
Here is the RP2350B dev board I have.
I have successfully flashed the new firmware to it and see it with the ls command:
It will take me longer to get set up to run tests. Assuming you are in the US, would you like me to ship you this hardware so you can play for yourself? I’d be happy to do it, feel free to DM me.
-Ray
Hey @koconnor im trying to use a RP2350 feather from adafruit whenever i make flash it says it finished fine but it disconnects and never reconnects
I’m working on a motherboard for Klipper based on the RP2350B (RP2040 doesn’t have enough IO pins). Is there support for pins GPIO 31+ on the RP2350B?
No change since Support for rp2350 micro-controllers - #29 by koconnor . It doesn’t look too hard to add code for the rp2350b additional gpio, but code would be needed.
Cheers,
-Kevin
What can be my Problem?
Klipper is up to date. RP 3b with Pico2.
i see a difference in the number of Pages displayed.
Are you sure you actually build the firmware for the RP2350?