diff options
| author | hathach <[email protected]> | 2026-06-20 23:06:07 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2026-06-20 23:06:07 +0700 |
| commit | ea5c6fa165649cfa36d704b1852babf19d5e6bb5 (patch) | |
| tree | 84aba062f7db24aa524abf7485471d0b4df383fd /examples/device/hid_multiple_interface | |
| parent | cca6fe64e95175cbefcdae1d1306ea8765a075d9 (diff) | |
hw/bsp/ch58x: address review feedback and read the real chip unique id
Fold in the CH58x BSP review fixes:
- family.mk: drop stray trailing backslashes on the last LDFLAGS/SRC_C entries
(harmless -- GNU Make ends the list at the blank line -- but misleading).
- debug_uart.c: uart_write() spun on a full ring buffer with nothing to drain it
(only uart_sync() advances tx_consume), so a burst larger than the buffer
deadlocked. Drain the FIFO while waiting, like uart_sync() does.
- wch-riscv.cfg: move the OpenOCD work area from 0x80000000 (unmapped) to the
0x20000000 SRAM, sized to 32 KB, matching ch32v20x/wch-riscv.cfg.
- family.c: implement board_get_unique_id() from the factory MAC. CH58x is a BLE
part, so a unique 6-byte MAC lives in FlashROM at ROM_CFG_MAC_ADDR; GetMACAddress()
reads it via FLASH_EEPROM_CMD (in libISP583.a), so no extra source file is needed.
The read buffer is TU_ATTR_ALIGNED(4) and 8 bytes, per the SDK's documented
4-byte-aligned, word-granular buffer contract (CH58x_flash.c).
- test/hil/tinyusb.json: key ch582m_evt off this board's actual MAC (D443627B5450)
instead of the fixed placeholder, like every other board.
Verified on ci.lan HIL: ch582m_evt enumerates with serial D443627B5450 and all
device examples pass.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Diffstat (limited to 'examples/device/hid_multiple_interface')
0 files changed, 0 insertions, 0 deletions
