Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 17:49 28 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Interesting page on bare metal Pico

Author Message
lew247

Guru

Joined: 23/12/2015
Location: United Kingdom
Posts: 1702
Posted: 04:20pm 31 May 2023
Copy link to clipboard 
Print this post

Raspberry RP2040 (Pico board) experiences
I don't understand it but others will I guess
and example from the page
  Quote  I wanted to be able to write to the Pico without mounting the fake filesystem or doing anything privileged, so that calls for a libusb userspace program. I started out trying to make a libusb mass storage driver, and I got most of the way there but I just felt so stupid decoding a FAT filesystem just to stream a UF2 file.

So I used the PICOBOOT protocol instead. The RP2040 bootrom supports two USB interfaces -- mass storage and PICOBOOT. PICOBOOT is nice and simple and really not that different from mass storage. So it's easy to support. So now I simply plug it in, run picoprog foo.elf, and a second later it reboots into my program...and then when my program finishes (allows WDT to elapse), it is ready to receive another one! It is so convenient!

That happens to mean I don't need UF2 anymore so this is now completely free of any Raspberry SDK components.

and another
  Quote  Spent a while discovering with the fact that the RP2040 requires 256 byte alignment for the vector table (VTOR), even though the ARMv6-M manual only says 128 byte (but it also says implementation defined). Sigh.

I worked out all the kinks in my second-stage boot loader. So now it can boot from SRAM (blink_sram.elf), a flash loader that copies .text and .rodata into SRAM and then executes from SRAM (blink_fl.elf), or in XIP mode where it accesses .text and .rodata directly from flash (blink_xip.elf). So the C blinky is now roughly a minimal complete SDK. It now has everything I wish had come in the box with the Pico:
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3804
Posted: 01:39pm 02 Jun 2023
Copy link to clipboard 
Print this post

Thanks for posting that.

John
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4247
Posted: 02:38pm 02 Jun 2023
Copy link to clipboard 
Print this post

hdmi-vga

cheaper than any pico, and you can even insert audio
PicomiteVGA PETSCII ROBOTS
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024