Repository navigation
shell v1.3 lets a program be given a file from the command line, returns you to your directory after a program or restart, and brings each flavour closer to the system it follows.
What's new
- Giving a program a file.
pico-oric -t game.tap(DOS:PICO-ORIC /T GAME.TAP) finds the file from your directory and gives the program its full path.- A program has to declare that it takes arguments. Any other program says
takes no argumentsand isn't started. - Programs need updating to use this.
pico-oricwill support it from its next release. - Program authors can find the details in the README and
picocalc_shell.h.
- A program has to declare that it takes arguments. Any other program says
- Back to your directory. Coming back from a program, a
rebootormenu(DOS:EXIT), the shell returns to the directory you left, if it's still on the card. Afterpoweroff, or the power switch at the prompt, it starts as usual.
UNIX flavour:
- Error messages:
2>,2>>,2>&1and>&2, plus2> /dev/null,< /dev/nullandcat /dev/null. - Scripts:
./backup.sh, a file whose first line starts#!, or a name ending.shon$PATH.exit [N]ends a script. - New commands:
find,sort,uniq,tee,less,which,testand[,true,false. - Options:
rm -f,-rfand-R;cp -Rand-f;mv -f. - Line editing and directories: Ctrl-W, Ctrl-L,
~,cd -,$PWDand$OLDPWD. - Programs:
./chess, a path with no extension, andchess.uf2found on$PATH.
DOS flavour:
COPYdevices:CONandNUL, soCOPY CON NOTE.TXTwrites what you type,COPY NOTE.TXT NULtests that a file can be read, andCOPY NUL NOTE.TXTmakes an empty file.- Programs with their files: a program can live in any directory, and can be run from there, by its path, or as
NAME.UF2.
Changes that may affect you (DOS flavour)
/no longer separates names. It only starts a switch, soCD /HOMEnow saysInvalid switch - /HOME. Use\in paths, including inPATHand batch files.- The shell starts in
C:\, notC:\HOME. Put aCDinAUTOEXEC.BATto start elsewhere. - The search order has changed. In each directory, a program now comes before a batch file of the same name. Type
NAME.BATto run the batch file.
Downloads
Choose one shell for your board and flavour:
| Pico 2, Pico Plus 2 | Pico 2 W, Plus 2 W | |
|---|---|---|
| UNIX flavour | shell-unix.uf2 |
shell-unix-w.uf2 |
| DOS flavour | shell-dos.uf2 |
shell-dos-w.uf2 |
With a W build, also copy ntp.uf2 to /pico2-apps/ and write /ntp/ntp.cfg (UNIX guide, DOS guide). Either build is safe on either board; on a board with no Wi-Fi, the W build's ntp says so.
For the shell at power-on, also choose one loader for your board's flash. The loader's patch hasn't changed since v1.2, so if you installed it then, there's nothing to do.
| Loader | Flash | Boards |
|---|---|---|
bootloader_rp2350_4mb.uf2 |
4 MB | Pico 2, Pico 2 W |
bootloader_rp2350_8mb.uf2 |
8 MB | Adafruit Feather RP2350 |
bootloader_rp2350_16mb.uf2 |
16 MB | Pimoroni Pico Plus 2, Plus 2 W |
A smaller one works on a larger flash, but leaves the rest unused. Never use one for a larger flash than the board has, as programs could then be written past its end.
Installing
You need UF2 Loader 2.3 or later in flash.
- On the SD card, rename
/BOOT2350.UF2to/BOOT2350.ORG. This keeps the loader's menu, whichmenu(DOS:EXIT) runs. - Copy the shell you chose to the root of the card and rename it
/BOOT2350.UF2. - Hold Up or F1 at power-on to start the shell.
To upgrade from an earlier version, copy the new file over /BOOT2350.UF2.
For the shell at power-on, install the shell first, then copy the loader to the PicoCalc in BOOTSEL (hold Down or F3 at power-on). Your programs and the card are not touched. A shell older than v1.2 reports this loader as unknown and will not run programs. Installing pelrun's stock loader again undoes it. The README has the details.
Notes
- RP2350 only.
- Running a program rewrites the app partition, so a program that keeps its files in flash can lose them. Keep program data on the SD card.
- A program can't be run with a redirection or in a pipe.
- The loader builds are GPL-3.0, as is pelrun's UF2 Loader they are built from.
SHA-256:
eec4f246cfc88adf1bb9558e70266db35062dff0d4bc0be2b8e1d36d9c236ee1 shell-unix.uf2
629dbb31fd325b591fecba18a7025386675bd3542180442d2e040a6575ce5b65 shell-dos.uf2
0a5b2e96c5efcc6d8594889fd651a71d2bd2c0c1b67d4023656941852fefb2e8 shell-unix-w.uf2
44c93c036c95fa4c3edf83bf2cbaa7f61736ac4fc115bb18a062a4d597821b6e shell-dos-w.uf2
e8a0e92ebf465ca8d51db403e6cfccaabffcf37accde44dc52c12fe033d02589 ntp.uf2
530eb09da8a75209e2541973da2f2693a936dee79ea35cc883ef6822e17e9493 bootloader_rp2350_4mb.uf2
4a34172efb2804d4375d6af2bbaf42d50e4af4bc56173bdd92cf9fb6d1496267 bootloader_rp2350_8mb.uf2
b5096d7ee678585dd8278df616ef39d48bd9d65fe054aaf42b7a26c9db8a1588 bootloader_rp2350_16mb.uf2