Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: missing #[interrupt] mark for bind_interrupts! #46

Merged
merged 2 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,18 @@ env:

jobs:
build:
runs-on: macos-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use nightly Rust
# lock to 2024-08-23 and wait for embassy-executor to be updated
run: |
rustup default nightly
rustup default nightly-2024-08-23
rustup component add rust-src
rustup update
rustup target add riscv32imac-unknown-none-elf
rustup target add riscv32imafc-unknown-none-elf
rustup target add riscv32i-unknown-none-elf
# See https://github.com/rust-lang/rust/issues/12880
touch ~/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/src/rust/Cargo.lock
- name: Fetch Deps
# if this is a pull request
if: github.event_name == 'pull_request'
Expand Down
11 changes: 7 additions & 4 deletions examples/ch32v307/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@
name = "ch32v307-examples"
version = "0.1.0"
edition = "2021"
[[bin]]
name = "ch32v307-examples"
harness = false # do not use the built in cargo test harness -> resolve rust-analyzer errors

[dependencies]
ch32-hal = { path = "../../", features = ["ch32v307vct6", "embassy", "rt", "highcode", "time-driver-tim1"] }
ch32-hal = { path = "../../", features = [
"ch32v307vct6",
"embassy",
"rt",
"highcode",
"time-driver-tim1",
] }
embassy-executor = { version = "0.6.0", features = [
"nightly",
"integrated-timers",
Expand Down
1 change: 1 addition & 0 deletions examples/ch32v307/src/bin/rng.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#![no_main]
#![feature(type_alias_impl_trait)]
#![feature(impl_trait_in_assoc_type)]
#![feature(naked_functions)]

use ch32_hal as hal;
use embassy_executor::Spawner;
Expand Down
1 change: 1 addition & 0 deletions examples/ch32v307/src/bin/sdmmc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#![no_main]
#![feature(type_alias_impl_trait)]
#![feature(impl_trait_in_assoc_type)]
#![feature(naked_functions)]

use ch32_hal as hal;
use ch32_hal::sdio::Sdmmc;
Expand Down
1 change: 1 addition & 0 deletions examples/ch32x035/src/bin/uart_pms7003_async.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#![no_main]
#![feature(type_alias_impl_trait)]
#![feature(impl_trait_in_assoc_type)]
#![feature(naked_functions)]

use ch32_hal as hal;
use embassy_executor::Spawner;
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ macro_rules! bind_interrupts {

$(
#[allow(non_snake_case)]
#[no_mangle]
unsafe extern "C" fn $irq() {
#[qingke_rt::interrupt]
unsafe fn $irq() {
$(
<$handler as $crate::interrupt::typelevel::Handler<$crate::interrupt::typelevel::$irq>>::on_interrupt();
)*
Expand Down
Loading