Skip to content

refactor: serial params rename + 3-phase throughput test#8

Merged
FASTSHIFT merged 8 commits intomainfrom
refact_auto_chunk_size
Mar 13, 2026
Merged

refactor: serial params rename + 3-phase throughput test#8
FASTSHIFT merged 8 commits intomainfrom
refact_auto_chunk_size

Conversation

@FASTSHIFT
Copy link
Owner

Phase 1 - Parameter Renaming:

  • chunk_size → upload_chunk_size + download_chunk_size (split)
  • tx_chunk_size → serial_tx_fragment_size
  • tx_chunk_delay → serial_tx_fragment_delay (default 2ms)
  • verify_crc removed (always verify)

Phase 2 - 3-Phase Serial Throughput Test:

  • Phase 1: TX fragment probe (detect if fragmentation needed)
  • Phase 2: Upload chunk probe (find shell buffer limit)
  • Phase 3: Download chunk probe via new echoback command

Device firmware (fl.c):

  • Add echoback command: fills send buffer with pattern, returns base64+CRC for download direction testing

Frontend:

  • Simplified test result dialog (confirm with recommended params)
  • Remove unused i18n keys (current_chunk_size, etc.)

All 1941 tests pass, format/lint clean.

Phase 1 - Parameter Renaming:
- chunk_size → upload_chunk_size + download_chunk_size (split)
- tx_chunk_size → serial_tx_fragment_size
- tx_chunk_delay → serial_tx_fragment_delay (default 2ms)
- verify_crc removed (always verify)

Phase 2 - 3-Phase Serial Throughput Test:
- Phase 1: TX fragment probe (detect if fragmentation needed)
- Phase 2: Upload chunk probe (find shell buffer limit)
- Phase 3: Download chunk probe via new echoback command

Device firmware (fl.c):
- Add echoback command: fills send buffer with pattern, returns
  base64+CRC for download direction testing

Frontend:
- Simplified test result dialog (confirm with recommended params)
- Remove unused i18n keys (current_chunk_size, etc.)

All 1941 tests pass, format/lint clean.
- Add cmd_args_t struct to consolidate all parsed arguments
- Add cmd_handler_t function pointer type
- Change all cmd_* signatures to int cmd_xxx(fl_context_t*, const cmd_args_t*)
- Move argument validation into each cmd_* (no more handle_* wrappers)
- Replace if-else command dispatch with s_cmd_table[] lookup
- Print available commands when --cmd is missing
- Add echoback command tests (8 cases) in test_fl.c
- Add verify_crc case to onConfigItemChange dispatch
- Add 'Max working size' output to fpbTestSerial results
- Update test element IDs: chunkSize -> uploadChunkSize
- Fix stale schema key: tx_chunk_delay -> serial_tx_fragment_delay
- Align test expectations with current output messages
Replace hardcoded FL_B64_BUF_SIZE=2048 with computed
((FL_BUF_SIZE + 2) / 3 * 4 + 1), saving 679 bytes when
FL_BUF_SIZE=1024 (1369 vs 2048).
Add max_retries=3 to _phase_fragment_probe, _phase_upload_probe,
and _phase_download_probe. Each test size is retried on failure to
reduce false negatives from transient serial errors.
Reduce upload probe max_size from 4096 to 1024 to avoid triggering
UART DMA Bus Fault on BES O62 when buffer is near capacity.

Signed-off-by: VIFEX <vifextech@foxmail.com>
@FASTSHIFT FASTSHIFT force-pushed the refact_auto_chunk_size branch from 904be3d to 198db4b Compare March 13, 2026 08:35
@FASTSHIFT FASTSHIFT merged commit cfc762e into main Mar 13, 2026
3 checks passed
@FASTSHIFT FASTSHIFT deleted the refact_auto_chunk_size branch March 13, 2026 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant