Repository navigation
Releases
shell v1.3
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
shell v1.2
shell v1.2 adds the shell at power-on, through the shell's own build of UF2 Loader's first stage, and a few things for scripts and the DOS flavour.
What's new
- The shell at power-on (optional). A build of UF2 Loader 2.5's first stage with a small patch (
patches/uf2loader-boot-shell.patch):- switching on gives the shell, and holding Up, F1 or F5 starts the last program; Down or F3 still give BOOTSEL;
- going to a program and back skips the loader's half-second wait for a key: back from a program to the shell in about 0.85 s, where the stock loader takes about 1.55 s;
- a program that restarts itself still comes back to itself; hold Up, F1 or F5 through the restart, or switch off and on, for the shell;
- with no card, switching on starts the last program.
> /dev/null(and>> /dev/null) throws a command's output away in the UNIX flavour, as> NULdoes in the DOS flavour.- The clock at power-on. The guides show how to set the clock in
/etc/profileorAUTOEXEC.BAT: from the DS3231, from NTP, or from NTP only when the DS3231 has no time. - DOS flavour:
- In
DIR,COPY,XCOPY,DELandDELTREE, a/inside a word starts its switches, as in DOS:DIR \/WisDIR \ /W. COPY /B NAME+,,gives a file the time now without rewriting it, astouchdoes.COPYaccepts/B.
- In
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:
| 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 v1.0 or v1.1, 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.
- The loader builds are GPL-3.0, as is pelrun's UF2 Loader they are built from.
SHA-256:
a8a537dbc10dda2969f791e210e01cc176ded9393bacc70acc245a13e9b45f58 shell-unix.uf2
90219b83cafc95fc5431064fafa24b1ba58fb5218dfd654f638e6f5165c95628 shell-dos.uf2
34f89b057f51be293013be4a0ea4346cc05d738d808dcbed8f4b07499cd20f89 shell-unix-w.uf2
0794012cb2c6c2a2447d65e188bb8b35bbd5e7ccadd69ac15319bf6445ce1de4 shell-dos-w.uf2
312ca550499c1396d6457c9616725db45229418226ef4025766cf569d5445b08 ntp.uf2
4e62148889ed4164096f042c3bea3ef853ff0fe289a8745dfe018460e67c3374 bootloader_rp2350_4mb.uf2
f58fd54c5036caa25c3d78af59ed79aa6dddf25ad4831aa6733a23e1e17e23d0 bootloader_rp2350_8mb.uf2
7cfe7e85d29e0ec97452870173814836d28a647a94db7bdf04044c14a194d0e8 bootloader_rp2350_16mb.uf2
shell v1.1
shell v1.1 adds the date and time, NTP on the Pico 2 W, and menus. A big thank you to @ctorkildson-netizen for the idea to use the always-on timer to share date and time with the programs launched by the shell. Also, thank @Dzubin for the idea to introduce menus, though the final implementation came out differently.
What's new
- Date and time. The clock is kept in the RP2350's always-on timer, through reboots and program runs, and in a DS3231 on I2C when the PicoCalc has one, so it survives power-off. File dates are stamped on every write.
- UNIX:
date, a POSIXTZin/etc/profile, and dates inls -land fromtouch. - DOS:
DATE,TIME, the date formats thatCOUNTRYsets inCONFIG.SYS, dates inDIR,$Dand$TinPROMPT, andCOPYandXCOPYkeeping the source file's date.
- UNIX:
- NTP on the Pico 2 W. The W builds add
ntp(DOS:NTP [/F]), which runsntp.uf2at most once per power-on, using the network named in/ntp/ntp.cfg, to set the clock. - Menus.
selectandbreakfor scripts in the UNIX flavour;CHOICEin the DOS flavour. - The clock for programs.
include/picocalc_shell.haddspicocalc_shell_time()andpicocalc_shell_set_time(). infoandMEMshow the PSRAM.info's lines fit in 40 columns.- The UNIX flavour has a single font, the Master 512's, in 40 columns.
picocalc_shell_exit()refuses to run when UF2 Loader did not start the program.
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.
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 v1.0, copy the new file over /BOOT2350.UF2. 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.
SHA-256:
f071c7e2dcb0d2c7007f43408fc11c37b73d226b0dfd878a1d89a0901cd2c7a8 shell-unix.uf2
2ed364dbd532124c7053d43aec1138fe7ae6aa9d6e9377af632c4c653d90061e shell-dos.uf2
4fbadd732064e3c032d4c00b3e26f324e72e3d74384d3409bcebf6c86685b5aa shell-unix-w.uf2
5ed53bd8772104349a2ba367db33878e67cd3f002955f1c67623be115ef4fdb0 shell-dos-w.uf2
7441d0d89f16a7d2b13c32538cdfb1d8d3788bbd860eea944fe55876cc887601 ntp.uf2
shell v1.0
The first release of shell: a command line for the ClockworkPi PicoCalc with an RP2350 board. It manages the files on the SD card, edits text files, and runs the programs in /pico2-apps/ by name. It is installed as /BOOT2350.UF2, in place of the UF2 Loader's menu.
Downloads
Choose one flavour:
shell-unix.uf2: the UNIX flavour. It hasls,cp,mv,grep,more, pipes, scripts and/etc/profile, and edits files with vi. See the UNIX user guide.shell-dos.uf2: the DOS flavour, with driveC:,DIR,COPY,AUTOEXEC.BAT, and EDIT in 40 columns. See the DOS user guide.
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 flavour 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 change flavour, copy the other UF2 over /BOOT2350.UF2. The README has the details.
Notes
- RP2350 only (Pico 2, Pico 2 W, Plus 2 W).
- A program returns to the shell through its own exit command, or when you hold Up, F1 or F5 at power-on. Power-on with no key held starts the last program.
- Running a program rewrites the app partition. A program that keeps its files in flash can lose them; keep program data on the SD card.
SHA-256:
bb2e91511b05e376d085875ebd82fb3366b3a1251dcee66d7c96ca105ca5a44b shell-unix.uf2
b6ef7039fa69c23e38ef5d6c40bc32206a8ad7a8c664f77136e5ea80949fc0d7 shell-dos.uf2