Skip to content

Latest commit

 

History

History
108 lines (78 loc) · 3.7 KB

File metadata and controls

108 lines (78 loc) · 3.7 KB

Hardware validation — NiusCrypto

What has been verified on real hardware, and how to reproduce it. Reference board: AliExpress ProMicro nRF52840 clone (app @ 0x1000, MBR-only UF2/DFU). board1 in the lab has a SEGGER J-Link on SWD for J-Link upload at the correct link address.

Seeed XIAO nRF52840 is compile-only locally until hardware is available.

Verified (board1, CC310 backend)

v0.6.0 (latest)

Test Result Notes
examples/CryptoSelfTest 23/23 PASS incl. supports(), streaming hash, runSelfTest(), RSA import/PSS, OnChip fallbacks
examples/BleCryptoStress RESULT: OK NimBLE + 3000× SHA-256/HMAC
SdCryptoSmoke RESULT: OK MBR-only @ 0x1000
CC310Smoke (shim) RESULT: OK incl. SHA-512 KAT

Expected CryptoSelfTest tail:

summary: 23 passed, 0 failed, 0 skipped
RESULT: OK

Earlier releases

Version CryptoSelfTest Notes
v0.5.2 23/23 PASS EcdsaMessage / Ed25519Message, reset()
v0.5.1 21/21 PASS packet structs, rsaRelease
v0.4.0 20/20 PASS Ed25519, RSA export/VerifyPub

See API_REFERENCE.md for the APIs exercised by each test.

Local bring-up (vendor/hwverify/ — not in git)

J-Link scripts, build output, and machine-specific arduino-cli.yaml live under vendor/hwverify/ on your machine. That entire folder is git-ignored and must not be pushed.

Typical contents (create/maintain locally):

File Purpose
verify_board1.ps1 Compile + J-Link flash + serial capture
capture_serial.py J-Link reset + read until RESULT: OK
arduino-cli.yaml Local core path (directories.user → ArduinoNRF)
justreset.jlink, flashbl.jlink, … J-Link commander snippets
_verify_board1/ arduino-cli build output (disposable)

Example one-shot (after vendoring CC310 blobs and creating the scripts locally):

$env:NIUS_BOARD1_COM = 'COM18'   # your data CDC port
powershell -File vendor\hwverify\verify_board1.ps1

Default FQBN inside the script: uploadmode=jlink,bootloader=autonosd (app @ 0x1000).

How to reproduce (manual)

1. Vendor binaries (once per machine)

python vendor/tools/setup_vendored.py

2. Compile

arduino-cli compile `
  --fqbn arduinonrf:nrf52:promicro_nrf52840:bootloader=autonosd,usbcdc=enabled `
  --library F:\path\to\ArduinoNRF-Crypto `
  --build-path F:\path\to\_build `
  F:\path\to\ArduinoNRF-Crypto\examples\CryptoSelfTest

3. Flash over UF2

See BOARD_BRINGUP.md. Quick path: 1200-bps touch on the app COM → copy .uf2 to the bootloader drive → open data COM at 115200.

4. CC310 shim smoke

arduino-cli compile `
  --fqbn arduinonrf:nrf52:promicro_nrf52840:bootloader=autonosd `
  --library F:\path\to\ArduinoNRF-Crypto `
  F:\path\to\ArduinoNRF\hardware\arduinonrf\nrf52\libraries\CC310\examples\CC310Smoke

Known bring-up gotcha

If the SoftDevice is missing or flash is corrupted, the app can HardFault before USB enumerates (symptoms: no COM ports, no UF2). Fix: J-Link full erase + reflash the factory combined bootloader image (MBR + s140 + UF2 bootloader). See BOARD_BRINGUP.md.

If compile fails with cannot find -lnrf_cc310 after a Library Manager install, run setup_vendored.py or remove the precompiled / ldflags lines from library.properties for OnChip-only builds.

If USB serial vanished after a J-Link session, you likely flashed a 0x26000 hex onto a 0x1000 board — recompile with bootloader=autonosd before blaming hardware.