rp-rs / rp2040-pac

A Rust PAC for the RP2040 Microcontroller
142 stars 28 forks source link

Current svdtools don't work #64

Closed jannic closed 1 year ago

jannic commented 2 years ago

Current versions of svdtools (0.1.24 and 0.1.25) don't work with this pac.

0.1.25 fails with TypeError: Argument must be bytes or unicode, got 'int'. This should be fixed by https://github.com/stm32-rs/svdtools/pull/127. However, with that fix, we get another error: https://github.com/stm32-rs/svdtools/runs/8293034774?check_suite_focus=true

[ERROR svd2rust] Error rendering device

    Caused by:
        0: Rendering error at peripheral
           Name: DMA
           Description: DMA with separate read and write masters
           Group: No group name
        1: register CH0_CTRL_TRIG not found

I think this is caused by some interaction between _cluster and other patches on the same element in rp2040.yaml. Didn't look into it in detail, yet.

9names commented 2 years ago

Is this fixed by switching to the Rust version of svdtools, as #61 proposes?

jannic commented 2 years ago

I don't know. I tried the rust version of svdtools and got a different error. That might be related to the change made by #61 (replacing _derive by _copy). Yesterday I didn't have time to investigate further, so for now, all I know is that the latest working version of svdtools is 0.1.23.

jannic commented 1 year ago

As we are now successfully using the latest versions of svdtools (both rust and python work), it looks like this issue was solved by some change in the mean time.