m-labs / dslite2svd

Converter of register descriptions from the TI DSLite format to CMSIS SVD format
BSD Zero Clause License
34 stars 8 forks source link

Tm4c123x fix flash write buffer issue #3

Closed thejpster closed 6 years ago

thejpster commented 6 years ago

The TM4C123 has a WRKEY field in FMC2, and the Flash Write Buffer is actually a 32-word array.

thejpster commented 6 years ago

Ugh, this doesn't build. The world has moved too much.

I get:

$ cargo build
    Blocking waiting for file lock on build directory
   Compiling tm4c123x v0.5.0 (file:///home/jonathan/Documents/programming/dslite2svd/crates/tm4c123x)
error[E0133]: call to unsafe function requires unsafe function or block
     --> /home/jonathan/Documents/programming/dslite2svd/crates/tm4c123x/src/lib.rs:69892:17
      |
69892 |                 self.bit(true)
      |                 ^^^^^^^^^^^^^^ call to unsafe function

error[E0133]: call to unsafe function requires unsafe function or block
     --> /home/jonathan/Documents/programming/dslite2svd/crates/tm4c123x/src/lib.rs:69896:17
      |
69896 |                 self.bit(false)
      |                 ^^^^^^^^^^^^^^^ call to unsafe function

error: aborting due to 2 previous errors

error: Could not compile `tm4c123x`.

To learn more, run the command again with --verbose.
whitequark commented 6 years ago

You could have just asked me to fix it...

thejpster commented 6 years ago

Sorry if it came across wrong, it's been a long day! I was intending to raise an issue and resubmit this at a later date when I've had a chance to get it all tested. But then I decided to close the laptop and take a break.

whitequark commented 6 years ago

This is actually a bug in svd2rust that you're hitting.

whitequark commented 6 years ago

Cherry-picked to master after using a fixed svd2rust.

thejpster commented 6 years ago

Thanks for merging this.