riscv-rust / fu740-pac

Peripheral access API for FU740 SoC
Apache License 2.0
7 stars 3 forks source link

Fix `fu740.yml` error #4

Open U007D opened 1 year ago

U007D commented 1 year ago

Without this fix, executing ./update.sh gives:

fu740-pac [ main][»!?][📦 v0.1.0][🦀 v1.72.0]
❯ ./update.sh
+ set -e
+ rm -rf src
+ mkdir src
+ svd patch fu740.yaml
+ svd2rust --target riscv -i fu740.svd.patched
[INFO  svd2rust] Parsing device from SVD file
[ERROR svd2rust] Error parsing SVD XML file

    Caused by:
        0: In device `Freedom U740-C000`
        1: In peripheral `PRCI`
        2: Parsing unknown usage at 1637:182
        3: Unknown usage variant for addressBlock

fu740.svd.patched at line 1637 col 182 reads:

<usage>PRCI registers</usage>

fu740.yaml reads:

PRCI:
    description: Power Reset Clocking Interrupt block
    baseAddress: 0x10000000
    addressBlock:
      offset: 0x0
      size: 0x1000
      usage: "PRCI registers"  # <- does not match `registers` name below
    registers:                 # <- does not match `PRCI registers` name above
      hfxosccfg: