Here is a command line shell that lets you manipulate the SD Card between runs of programs (uf2’s). It is a drop in replacement for BOOT2350.UF2 for @pelrun 's UF2 Loader, which needs to be installed first.
You need a RP2350-based board to run the shell.
BOOT2350.UF2runs in RAM and there in not enough room in the RP2040’s RAM for it.
There are two flavours of the shell: Unix and DOS. Please choose the flavour you are most comfortable using. There is a user guide for each: Unix User Guide and Dos User Guide.
Both support scripting (shell scripts or batch files). They also support redirection (>, >>, <), pipes (|), globs (*, ?, …), command history, and so forth.
The Unix flavour comes with vi for editing files; DOS comes with EDIT (similar to MS-DOS’s EDIT).
To start a UF2, just type it’s name. For example, to play rogue.uf2, just type: rogue. The path is initialized to /pico2-apps or C:\PICO2-APPS, but this can be set with the PATH variable.
We are still using @pelrun’s boot loader and have only replaced the menu with a shell, so you can return to the shell using UP/F1, to BOOTSEL with DOWN, just as you always have.
UNIX example:
/home>ls
notes/ todo.txt
/home>cat todo.txt
buy batteries
/home>cd /
/>
/>man cp
usage: cp [-r] from... to
Copies files, -r directories
DOS example:
C:\HOME>DIR
Volume in drive C has no label
Volume Serial Number is 5C23-0000
Directory of C:\HOME
NOTES <DIR>
TODO TXT 6
1 file(s) 6 bytes
66,040,832 bytes free
C:\HOME>CD ..
C:\>
C:\>HELP COPY
usage: COPY source [destination]
Copy one or more files
You can also implement a startup script (Unix: /etc/profile; DOS: C:\AUTOEXEC.BAT.
Unix example:
# /etc/profile
phosphor amber
font 5x10
PATH=/pico2-apps:/games
cd /home
DOS example:
@ECHO OFF
PATH C:\PICO2-APPS;C:\GAMES
PROMPT $P$G
PHOSPHOR amber
CD \HOME
Developers
Also, included is a convenience header file that shows how you can let users exit their app and return to the shell or uf2loader’s menu.