Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 7503

General • Re: BBC BASIC on the Raspberry Pi Pico?

$
0
0
I thought I'd give this project a go. I have a standard Pico.
I am building on a Pi5 and communicating with the Pico on a Pi5 USB port.
My SDK is fairly old and I'm wary of upgrading. I get a few warnings during the build process - is that to be expected.

After copying bbcbasic_console_pico.uf2 to my Pico, it sits there flashing its LED at about 1/2Hz? ... I then get the following output and it stops flashing and hangs until I reboot the Pico

Code:

LittleFS image v2.1, Size = 0KB, Origin = 0x10100000R0 = 20041620  R8  = 20001A90R1 = 6A21A000  R9  = 0005A11AR2 = 00000010  R10 = 00000000R3 = 000026BD  R11 = 20003630R4 = 5A11A000  R12 = 20041620R5 = 20003630  SP  = 200415A8R6 = 00000004  LR  = 100176BBR7 = 100176A3  PC  = 000026BCS
I have been looking in to this, and I would be interested in a bit more context. What else had your Pico been used for before trying BBC BASIC? Anything else with an LFS filesystem?

The code in PicoBB allows for different sizes of filesystem, located in different places in memory. It searches all memory above the executable image to find an LFS header (see here for the code).

I know that this is slightly risky, in that there is no guarantee as to the header format. However, in order to obtain the LittleFS image message, the code must have found a match of 16 bytes. To have not got either Invalid VFS version (typo in the error message, now fixed) or Invalid flash sector size means that the next 8 bytes were also as expected. The one case I did not allow for was the filesystem in the next four bytes being zero (fix for this now pushed).

So I am interested as to how that situation could arise.

Statistics: Posted by Memotech Bill — Sun Jun 15, 2025 10:39 am



Viewing all articles
Browse latest Browse all 7503

Trending Articles