ch32-rs / ch32-metapac

Device support crate for WCH's CH32V MCUs: CH32V003, CH32V103, CH32V203, CH32V208, CH32V307, ...
Apache License 2.0
0 stars 1 forks source link

DMA1_CHANNEL8 and crate::timer different between releases. Causes compilation errors with ch32-hal examples #1

Closed Cydget closed 3 months ago

Cydget commented 4 months ago

It appears like the latest commit broke the ability to build the examples in ch32-hal for the ch32v002 and other chip examples.

When checking out commit of ch32-hal, it goes to only the DMA1_CHANNEL issue, but latest version of ch32-hal has both the DMA1 and crate::timer issues. I'm a rust novice and don't know if/how I can override these two issues with reexporting the timer module from crate::tiemr to ch32_metapac::timer.

Is it possible to keep revision history for this github and not have it wiped every commit? I think that would allow us with issues to downgrade as needed. I did attempt to build this metapack with an older checkout of ch32-data but I think there may be a required svd folder that is missing.

cydget@Kubuntu-Cloud:~/Desktop/test/ch32-hal/examples/ch32v003$ cargo build -r Compiling ch32-hal v0.1.0 (/home/cydget/Desktop/test/ch32-hal) error[E0412]: cannot find typeDMA1_CHANNEL8in modulecrate::interrupt::typelevel` --> /home/cydget/Desktop/test/ch32-hal/examples/ch32v003/target/riscv32ec-unknown-none-elf/release/build/ch32-hal-7be48bcc9ae895f5/out/_generated.rs:1:11295 1 ... type CH8 = crate :: interrupt :: typelevel :: DMA1_CHANNEL8 ; } pub mod AFIO { } pub mod GPIOA { } pub mod GPIOC { } pub mod GPIOD { } pub mod TIM1 { pub type UP = ... ^^^^^^^^^^^^^ help: an enum with a similar name exists: DMA1_CHANNEL1

::: /home/cydget/Desktop/test/ch32-hal/src/interrupt_ext.rs:105:21 | 105 | pub enum $irqs {} | -------------- similarly named enum DMA1_CHANNEL1 defined here

warning: unused import: FLASH --> /home/cydget/Desktop/test/ch32-hal/src/rcc/v0.rs:4:24 4 use crate::pac::{AFIO, FLASH, RCC}; ^^^^^

`

`dget@Kubuntu-Cloud:~/Desktop/test/ch32-hal/examples/ch32v003$ cargo build -r Compiling ch32-hal v0.1.0 (/home/cydget/Desktop/test/ch32-hal) error[E0433]: failed to resolve: unresolved import --> /home/cydget/Desktop/test/ch32-hal/examples/ch32v003/target/riscv32ec-unknown-none-elf/release/build/ch32-hal-7be48bcc9ae895f5/out/_generated.rs:1:8017 1 ... w . set_iopden (true)) ; } pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM1 , PC5 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM1 , PD2 ... ^^^^^
unresolved import
help: a similar path exists: ch32_metapac::timer

note: found an item that was configured out --> /home/cydget/Desktop/test/ch32-hal/src/lib.rs:40:9 | 40 | pub mod timer; | ^^^^^

error[E0433]: failed to resolve: unresolved import

` I dont want to deal with formatting issues so here is screenshots:. image image

andelf commented 4 months ago

Thanks for the report. It should be fixed now.

andelf commented 3 months ago

Close as fixed