File, band and preset names could only be typed and erased at the end.
The text keypad now has a cursor where characters are inserted and
deleted.
- Touching the text line moves the cursor to the nearest character
boundary and it follows the finger while touched (remote touch too).
- Keys insert at the cursor (still at most TXTINPUT_LEN characters),
backspace deletes the character before it and does nothing at the
start; a long backspace still erases the whole name and backspace on
an empty name still cancels.
- The cursor is a blue 2 pixel bar in its own 3 pixel gap that sticks
out 4 pixels above and below the letters, so it is never read as an
I (the glyphs are only 1 pixel apart). The input line is now cleared
up to the screen edge, so a shorter name leaves nothing behind.
- The text keypad exists only with __USE_SD_CARD__: IS_TXT_KEYBOARD is
a constant false without it, which drops the text keypad code from
the tinySA (BASIC).
Tested on HW V0.4.6 with remote touch and screen captures: insert,
backspace, drag to the end, edits at the start, long press, cancel and
a full 27 character name edited in the middle; the edit logic also in a
host build with AddressSanitizer. Flash: ULTRA +376 bytes, BASIC -164.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- 'reset dfu' and enter_dfu() are now also built for the tinySA4 (the
DFU menu stays tinySA3 only); the reply is sent before the reset
- F303 __early_init(): the jump to the system bootloader failed and the
bootloader reset the MCU. crt0 calls __early_init() on the process
stack with interrupts disabled, so switch to the main stack
(CONTROL = 0) and enable interrupts before the jump, as in the F072
board.c. Also enable the SYSCFG clock for the system memory remap and
replace the logical || that made it write 1 to SYSCFG_CFGR1
Tested on HW V0.4.5.1: 'reset dfu' enters the STM32 BOOTLOADER and
dfu-util can flash it.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Found by an adversarial review of last week's changes.
- disk_ioctl(GET_SECTOR_COUNT): add READ_BL_LEN and C_SIZE_MULT of CSD v1
cards (<= 2 GB) instead of ORing them. USB DISK mode reported half or a
quarter of the card size. Mask the reserved bits of C_SIZE for CSD v2.
- fw_update_ui() is not inlined into browser_open_file(): its locals
enlarged the browser's stack frame from 280 to 416 bytes for every file
type, leaving little headroom on the sweep thread stack.
- Firmware update: the image trailer is a C constant built from the
fw_update.h values, the linker script only places it; the RAM range check
uses the linker's RAM symbols; SD_SPI_SPEED and SD_INIT_SPI_SPEED move to
spi.h and are shared with the flasher, with a build check that the LCD
uses the same speed; the linker script checks that the flasher's write
limit (SAVE_CONFIG_ADDR) is the end of flash0.
STORAGE -> UPDATE FIRMWARE installs a firmware .bin from the SD card.
The shell command "fwupdate {file}" checks a file, "fwupdate {file} flash"
installs it. Config, calibration and presets (0x0803C000 and up) are never
touched; ROM DFU (jog held at power-on) stays the recovery.
- Image format: STM32F303xC.ld inlines the code rules to place a header
(magic, model, size, version) directly after the vector table and a
trailer (end magic, size, CRC field left unset) at the end of the image.
Only images with the header are accepted.
- Before anything is erased, the running firmware reads the whole file with
FatFs (page CRCs, image CRC, card sector map from FIL.clust) and reads it
again with the raw sector reader used by the update (dry run).
- The flasher runs from CCM RAM with interrupts off and VTOR in CCM. It keeps
page 0 in RAM, erases page 0 first and programs it last after a full image
CRC check, skips unchanged pages, retries errors without user input and
initializes the SD card again after it was removed or keeps failing.
It draws a progress bar and resets only after jog is released, because
jog pressed at reset starts the ROM bootloader.
The tinySA ULTRA now enumerates as a composite device: the CDC serial
port plus a mass storage interface (Bulk-Only Transport, SCSI). The SD
card is only presented to the PC in USB DISK mode (STORAGE menu or shell
command 'usbdisk on|off'), which stops sweeping and screen updates so the
mass storage thread owns SPI1 and spi_buffer. Outside the mode the PC
sees an empty card reader, so the serial port never re-enumerates. The
mode ends on touch, jog button, eject from the PC, card removal or
'usbdisk off'.
- usb_msc.c/h: mass storage thread, BOT state machine, SCSI commands
- usbcfg.c: composite descriptors (IAD, bcdDevice 0x0201), bulk EP3,
requests hook, packet memory reuse on a repeated SET_CONFIGURATION and
data toggle reset on CLEAR_FEATURE (both specific to this ChibiOS fork)
- ui.c: USB DISK menu item and mode screen
- main.c: 'usbdisk' command; shell commands that could use SPI1 are
refused while the mode is active
F072 builds are unchanged. Tested on HW V0.5.4 with Windows 11: about
620 KB/s read and 370 KB/s write, data verified against FatFs reads.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- ChibiOS: send a zero length packet after any multiple of the bulk IN
packet size (backport from ChibiOS 21.11)
- halconf.h: name the serial buffer settings the way this ChibiOS fork
reads them (values equal to the defaults in use)
- shell_reset_console(): call the I-class queue functions locked
- VNAShell_executeLine(): enqueue the shell thread locked and only while
the command is still pending
- btn_wait_release(): wrap-safe repeat timing
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
It's now possible to save capture, traces, or both by clicking SD card icon
Disabling both options hides SD card icon
Config submenu was added to Storage menu, and all settings were moved there
Existing config remains valid, and default behavior with saving a capture is kept
added run "file.name" console command, only for in cmd file
added AUTO SAVE to trigger menu
added wait {seconds} console command
added 3rd waterfall size