Skip to content

shell v1.1

Choose a tag to compare

@BlairLeduc BlairLeduc released this 24 Oct 21:21
· 6 commits to main since this release
a842943

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 POSIX TZ in /etc/profile, and dates in ls -l and from touch.
    • DOS: DATE, TIME, the date formats that COUNTRY sets in CONFIG.SYS, dates in DIR, $D and $T in PROMPT, and COPY and XCOPY keeping the source file's date.
  • NTP on the Pico 2 W. The W builds add ntp (DOS: NTP [/F]), which runs ntp.uf2 at most once per power-on, using the network named in /ntp/ntp.cfg, to set the clock.
  • Menus. select and break for scripts in the UNIX flavour; CHOICE in the DOS flavour.
  • The clock for programs. include/picocalc_shell.h adds picocalc_shell_time() and picocalc_shell_set_time().
  • info and MEM show 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.

  1. On the SD card, rename /BOOT2350.UF2 to /BOOT2350.ORG. This keeps the loader's menu, which menu (DOS: EXIT) runs.
  2. Copy the shell you chose to the root of the card and rename it /BOOT2350.UF2.
  3. 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