Commit Graph
5 Commits
Author SHA1 Message Date
Claude d9f63ad05d V10.15: VOICE's English dictionary in the Bluetooth segment
docs/BLE_FEASIBILITY.md section 10.

- LY_EN_DICT (13,346 B) and LY_EN_IDX (524 B) in the segment (gen_lyrics.py
  emits LY_DICT_SEC; sing.c makes it .btapp.rodata in the firmware), inside its
  CRC-32.
- The segment is checked in fm1_main before felucca_init (whose sing_init reads
  the dictionary), under the splash: the plain XIP window, the CRC-32;
  sing.c ly_en_ok from it. The reads (sy_en_find / ly_at only: the main loop,
  and the audio for a word not resolved there) are plain XIP data reads, as of
  the app's flash.
- Without the segment (NO SEG): sy_en_find returns before any read; English
  words by the letter rules (sy_en_rules), the generator's too; VOICE sings on.
- tests/voice_test.c: without it, all 2,095 words exactly as the rules read
  them, sing_init again; with it back, the dictionary's.
- tools/audio_layout.txt repinned (FELUCCA_REPIN=keep).

App 567,760 B of 584,336 (16,576 B free); RAM .data+.bss 95,564 B; pool spare
9,536 B; segment 47,128 B (12 of 18 sectors).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KMHk6yH4XbP1xxHYKCo9Mh
2026-10-31 21:18:18 +00:00
Claude 2abf321ecc V10.14: PROX, the Bluetooth proximity source
docs/BLE_FEASIBILITY.md stage 2 step 6 (section 9 added: as built).

- The RSSI word of every good packet on the link (ble_hw_wl82.c hw_rx_service:
  one hook, BLE_HW_RX_RSSI) into a 16-word ring in the segment (bt_seg_rssi).
- bt.c bt_prox_step (main loop, in the segment): level = (w & 63) + (w >> 8 &
  63), median of five, one pole (~50-70 ms); held without packets; eased to 0
  (~0.3 s) without a central or with BLUETOOTH OFF. FAR / NEAR in
  favorites.factory[6][22..23] (always 0 before: not calibrated, PROX 0), mapped
  to 0..1, clamped, either direction.
- mod.c MS_PROX ("PROX" after NOISE, unipolar): every SRC list, the web editor.
- MENU > SYSTEM > BLUETOOTH ON (radio running): OCT+ opens PROX's page (a meter,
  %, the level and the raw word, FAR / NEAR); OCT- stores FAR, OCT+ NEAR; SELECT
  back. The lens keeps the menu's tabs and cards for it (ui.c lz_on / lz_fam).
- ABOUT's AUDIO LOAD block in the segment too (about_load).
- tools/build.py: FELUCCA_REPIN=keep (the order recorded before, addresses anew:
  the sound stays within ~0.7 KB of V10.12's instead of the compiler's new order
  moving the engines up to 37 KB); a REPIN records the sound's tables after the
  UI's left .rodata. tools/audio_layout.txt so repinned.
- Tests: ui_test (PROX's level, page, calibration, map, outlier, gap,
  disconnect), mod_test (PROX on CUT), ui_render (menu_prox, menu_prox_off).

App 581,616 B of 584,336 (2,720 B free); RAM .data+.bss 95,564 B; pool spare
9,536 B; segment 33,260 B (9 sectors).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KMHk6yH4XbP1xxHYKCo9Mh
2026-10-31 21:11:10 +00:00
Claude 4a33ce2e3b V10.13: BLE-MIDI in/out
docs/BLE_FEASIBILITY.md stage 2 step 5 (section 8 added: as built).

- In: what a central writes, decoded by the stack (ble_midi.c), goes into the
  one MIDI input ring as USB's does (firmware/bt/bt_midi.h bt_midi_accept:
  channel messages, F8 FA FB FC; no SysEx), source 1 = USB: notes, CC, PC,
  bend, CLK USB, LEARN, ROUT, MIDI MAP alike. src/bt.c bt_midi_rx enqueues with
  the interrupts off (the BLE interrupts at priority 2 are preempted by TIMER5,
  the ring's other producer). No change to the sound's code for input.
- Out: usb.c midi_out_event (everything MENU > CONTROL > MIDI OUT lets out)
  also fills bt_oq (64) while a central listens; the stack packs it each
  connection event (header, timestamps from TIMER4, running status). The sound's
  code moved 64 B (tools/audio_layout.txt repinned).
- Flash: the app's cold constants / code can live in the segment (bt.c
  BTAPP_RO / BTAPP_FN, app.ld .btapp.* inside the segment's CRC-32), checked once
  at power-on (bt_boot, after the splash). MENU > ABOUT's THE PROJECT, CREDITS
  and LICENSES moved there; NO SEG: ABOUT without them.
- MENU's overview tiles (the slide between tabs): a bottom tile shows seven rows
  (SYSTEM's eighth, from V10.12, ran off the panel: 595 ui_render lint findings).
- Tests: tests/ble_midi_test.c (fm1-base's codec test, credited in LICENSING.md),
  tests/bt_midi_test.c (packets as apps send them, the out ring and its packets),
  tests/ui_test.c (ABOUT's lines); run_tests.sh runs the two new ones.

App 582,140 B of 584,336 (2,196 B free); RAM .data+.bss 95,564 B (+284); pool
spare 9,568 B; segment 30,660 B (8 sectors).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KMHk6yH4XbP1xxHYKCo9Mh
2026-10-31 20:35:32 +00:00
Claude 9f0a4d81c9 V10.12: MENU > SYSTEM > BLUETOOTH (BLE-MIDI peripheral in a segment at 0xEA000)
docs/BLE_FEASIBILITY.md route C2, stage 2 step 3 (section 7 added: as built).

- firmware/bt/: Optimist's BLE stack (Henri David; the hardware-tested copy in
  charlesvestal/fm1-base bt/ble 4039a8b, GPL-3.0-only OR MPL-2.0, unchanged,
  headers kept) and bt_seg.c, its glue, built as a unit of its own. Peripheral
  only: advertises "JIANT FM-1" with the BLE-MIDI service UUID, connectable; no
  scanner, no central, no SMP pairing, no LL encryption, BLE_DIAG 0, 27-octet
  PDUs (as Melodee). MIDI is not routed yet (dropped / nothing sent).
- hal/fm1_ble.h, fm1_ble_rf.h: Melodee's (Kerem Kilic, GPL-3.0-only: the
  iterative start-up replay, the crystal ramp's burst in .ram_text);
  hal/fm1_rf_cal.h and ble_rf_tables_v15.h: felucca-bsp's (Apache-2.0).
  hal/fm1_irq.h: FM1_IRQ_EXTERN for the second unit (the crash record and the
  fault entry stay the app's).
- app.ld: BTSEG at XIP 0x020E6000 = flash 0xEA000 (72 KiB) for the segment's
  header + code + constants (27,344 B, 7 sectors); its RAM in the pool (3,336 B)
  but the 1,508 B baseband block (the radio's DMA) in .bss; .noinit.* after
  .noinit (no record moves). The PC guard's window reaches _bt_end.
- tools/build.py: compiles bt_seg.c, writes build/bt.bin (header: magic, length,
  CRC-32) and the same length / CRC-32 into the app's bt_want; refuses
  initialised data in the segment and a ramp burst outside .ram_text; the
  package carries bt.bin; the layout recorder ignores the segment.
- src/bt.c: MENU > SYSTEM > BLUETOOTH OFF (default) / ON, saved in TRIO's
  retired favourites row ([6][24..31]: a mark, ON, the static random address
  made once at the first start). ON only while stopped ("STOP FIRST"), at once
  or at power-on when saved; the value reads ADV / CONN and the connections since
  power-on, NO SEG (segment missing or of another build), FAILED. OFF stops
  advertising and closes a link. Boot guard: bt_crumb (.noinit) set across the
  start; a reset in it, or a crash / watchdog reset while it ran, turns it OFF
  at the next power-on with a message.
- src/bt_hw.c: the plain XIP window set (fl_plain_window_init, JIANT never set
  it), the segment's header and CRC-32 checked, then the start with the
  interrupts off, the second core parked and the audio buffer silent: the
  vectors (IRQ 45 / 29 at priority 2, below ALNK0 3 and TIMER5 4), the live
  calibration (records 106-108 the SDK board's constants, 187 measured), the
  stack, advertising.
- MENU > ABOUT's credits, LICENSING.md, LICENSES/MPL-2.0.txt: Optimist, Melodee,
  felucca-bsp, JieLi.
- tests/ui_test.c: SYSTEM has 8 rows (31 in all); the BLUETOOTH row, STOP
  FIRST, the saved bytes, NO SEG on the host, the boot guard.
- tools/audio_layout.txt: repinned (the UI code before the sound grew).

App 584,208 B of 584,336 (+1,096 B, 128 B free); RAM .data+.bss 95,280 B
(+1,524); pool spare 9,568 B (-3,360).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KMHk6yH4XbP1xxHYKCo9Mh
2026-10-31 19:33:17 +00:00
Claude 9fcdc0b98b docs: BLE feasibility study (stage 1, no firmware change)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KMHk6yH4XbP1xxHYKCo9Mh
2026-10-31 17:16:20 +00:00