Prechádzať zdrojové kódy

Transition to cargo workspace

Román Cárdenas 1 rok pred
rodič
commit
c92affa472
55 zmenil súbory, kde vykonal 44 pridanie a 29 odobranie
  1. 13 4
      .github/workflows/changelog.yaml
  2. 4 25
      Cargo.toml
  3. 1 0
      riscv/CHANGELOG.md
  4. 26 0
      riscv/Cargo.toml
  5. 0 0
      riscv/build.rs
  6. 0 0
      riscv/src/asm.rs
  7. 0 0
      riscv/src/critical_section.rs
  8. 0 0
      riscv/src/delay.rs
  9. 0 0
      riscv/src/interrupt.rs
  10. 0 0
      riscv/src/lib.rs
  11. 0 0
      riscv/src/macros.rs
  12. 0 0
      riscv/src/register.rs
  13. 0 0
      riscv/src/register/cycle.rs
  14. 0 0
      riscv/src/register/cycleh.rs
  15. 0 0
      riscv/src/register/hpmcounterx.rs
  16. 0 0
      riscv/src/register/instret.rs
  17. 0 0
      riscv/src/register/instreth.rs
  18. 0 0
      riscv/src/register/macros.rs
  19. 0 0
      riscv/src/register/marchid.rs
  20. 0 0
      riscv/src/register/mcause.rs
  21. 0 0
      riscv/src/register/mcounteren.rs
  22. 0 0
      riscv/src/register/mcycle.rs
  23. 0 0
      riscv/src/register/mcycleh.rs
  24. 0 0
      riscv/src/register/medeleg.rs
  25. 0 0
      riscv/src/register/mepc.rs
  26. 0 0
      riscv/src/register/mhartid.rs
  27. 0 0
      riscv/src/register/mhpmcounterx.rs
  28. 0 0
      riscv/src/register/mhpmeventx.rs
  29. 0 0
      riscv/src/register/mideleg.rs
  30. 0 0
      riscv/src/register/mie.rs
  31. 0 0
      riscv/src/register/mimpid.rs
  32. 0 0
      riscv/src/register/minstret.rs
  33. 0 0
      riscv/src/register/minstreth.rs
  34. 0 0
      riscv/src/register/mip.rs
  35. 0 0
      riscv/src/register/misa.rs
  36. 0 0
      riscv/src/register/mscratch.rs
  37. 0 0
      riscv/src/register/mstatus.rs
  38. 0 0
      riscv/src/register/mstatush.rs
  39. 0 0
      riscv/src/register/mtval.rs
  40. 0 0
      riscv/src/register/mtvec.rs
  41. 0 0
      riscv/src/register/mvendorid.rs
  42. 0 0
      riscv/src/register/pmpaddrx.rs
  43. 0 0
      riscv/src/register/pmpcfgx.rs
  44. 0 0
      riscv/src/register/satp.rs
  45. 0 0
      riscv/src/register/scause.rs
  46. 0 0
      riscv/src/register/scounteren.rs
  47. 0 0
      riscv/src/register/sepc.rs
  48. 0 0
      riscv/src/register/sie.rs
  49. 0 0
      riscv/src/register/sip.rs
  50. 0 0
      riscv/src/register/sscratch.rs
  51. 0 0
      riscv/src/register/sstatus.rs
  52. 0 0
      riscv/src/register/stval.rs
  53. 0 0
      riscv/src/register/stvec.rs
  54. 0 0
      riscv/src/register/time.rs
  55. 0 0
      riscv/src/register/timeh.rs

+ 13 - 4
.github/workflows/changelog.yaml

@@ -1,4 +1,4 @@
-name: Check CHANGELOG.md
+name: Changelog check
 
 on:
   merge_group:
@@ -12,9 +12,18 @@ jobs:
       - name: Checkout code
         uses: actions/checkout@v4
 
-      - name: Check for CHANGELOG.md
+      - name: Check which component is modified 
+        uses: dorny/paths-filter@v2
+        id: changes
+        with:
+          filters: |
+            riscv:
+              - 'riscv/**'
+
+      - name: Check for CHANGELOG.md (riscv)
+        if: steps.changes.outputs.riscv == 'true'
         uses: dangoslen/changelog-enforcer@v3
         with:
+          changeLogPath: ./riscv/CHANGELOG.md
           skipLabels: 'skip changelog'
-          missingUpdateErrorMessage: 'Please add a changelog entry in the CHANGELOG.md file.'
-
+          missingUpdateErrorMessage: 'Please add a changelog entry in the riscv/CHANGELOG.md file.'

+ 4 - 25
Cargo.toml

@@ -1,26 +1,5 @@
-[package]
-name = "riscv"
-version = "0.10.1"
-edition = "2021"
-rust-version = "1.59"
-repository = "https://github.com/rust-embedded/riscv"
-authors = ["The RISC-V Team <risc-v@teams.rust-embedded.org>"]
-categories = ["embedded", "hardware-support", "no-std"]
-description = "Low level access to RISC-V processors"
-keywords = ["riscv", "register", "peripheral"]
-license = "ISC"
-
-[package.metadata.docs.rs]
-all-features = true
-default-target = "riscv64imac-unknown-none-elf"
-targets = [
-    "riscv32i-unknown-none-elf", "riscv32imc-unknown-none-elf", "riscv32imac-unknown-none-elf",
-    "riscv64imac-unknown-none-elf", "riscv64gc-unknown-none-elf",
+[workspace]
+resolver = "2"
+members = [
+    "riscv",
 ]
-
-[features]
-critical-section-single-hart = ["critical-section/restore-state-bool"]
-
-[dependencies]
-critical-section = "1.1.2"
-embedded-hal = "1.0.0-rc.1"

+ 1 - 0
CHANGELOG.md → riscv/CHANGELOG.md

@@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
 
 ### Changed
 
+- Transitioning to cargo workspace
 - Update `embedded-hal` dependency to v1.0 (bumps MSRV to 1.60)
 - `misa::MXL` renamed to `misa::XLEN`
 - Removed `bit_field` dependency

+ 26 - 0
riscv/Cargo.toml

@@ -0,0 +1,26 @@
+[package]
+name = "riscv"
+version = "0.10.1"
+edition = "2021"
+rust-version = "1.59"
+repository = "https://github.com/rust-embedded/riscv"
+authors = ["The RISC-V Team <risc-v@teams.rust-embedded.org>"]
+categories = ["embedded", "hardware-support", "no-std"]
+description = "Low level access to RISC-V processors"
+keywords = ["riscv", "register", "peripheral"]
+license = "ISC"
+
+[package.metadata.docs.rs]
+all-features = true
+default-target = "riscv64imac-unknown-none-elf"
+targets = [
+    "riscv32i-unknown-none-elf", "riscv32imc-unknown-none-elf", "riscv32imac-unknown-none-elf",
+    "riscv64imac-unknown-none-elf", "riscv64gc-unknown-none-elf",
+]
+
+[features]
+critical-section-single-hart = ["critical-section/restore-state-bool"]
+
+[dependencies]
+critical-section = "1.1.2"
+embedded-hal = "1.0.0-rc.1"

+ 0 - 0
build.rs → riscv/build.rs


+ 0 - 0
src/asm.rs → riscv/src/asm.rs


+ 0 - 0
src/critical_section.rs → riscv/src/critical_section.rs


+ 0 - 0
src/delay.rs → riscv/src/delay.rs


+ 0 - 0
src/interrupt.rs → riscv/src/interrupt.rs


+ 0 - 0
src/lib.rs → riscv/src/lib.rs


+ 0 - 0
src/macros.rs → riscv/src/macros.rs


+ 0 - 0
src/register.rs → riscv/src/register.rs


+ 0 - 0
src/register/cycle.rs → riscv/src/register/cycle.rs


+ 0 - 0
src/register/cycleh.rs → riscv/src/register/cycleh.rs


+ 0 - 0
src/register/hpmcounterx.rs → riscv/src/register/hpmcounterx.rs


+ 0 - 0
src/register/instret.rs → riscv/src/register/instret.rs


+ 0 - 0
src/register/instreth.rs → riscv/src/register/instreth.rs


+ 0 - 0
src/register/macros.rs → riscv/src/register/macros.rs


+ 0 - 0
src/register/marchid.rs → riscv/src/register/marchid.rs


+ 0 - 0
src/register/mcause.rs → riscv/src/register/mcause.rs


+ 0 - 0
src/register/mcounteren.rs → riscv/src/register/mcounteren.rs


+ 0 - 0
src/register/mcycle.rs → riscv/src/register/mcycle.rs


+ 0 - 0
src/register/mcycleh.rs → riscv/src/register/mcycleh.rs


+ 0 - 0
src/register/medeleg.rs → riscv/src/register/medeleg.rs


+ 0 - 0
src/register/mepc.rs → riscv/src/register/mepc.rs


+ 0 - 0
src/register/mhartid.rs → riscv/src/register/mhartid.rs


+ 0 - 0
src/register/mhpmcounterx.rs → riscv/src/register/mhpmcounterx.rs


+ 0 - 0
src/register/mhpmeventx.rs → riscv/src/register/mhpmeventx.rs


+ 0 - 0
src/register/mideleg.rs → riscv/src/register/mideleg.rs


+ 0 - 0
src/register/mie.rs → riscv/src/register/mie.rs


+ 0 - 0
src/register/mimpid.rs → riscv/src/register/mimpid.rs


+ 0 - 0
src/register/minstret.rs → riscv/src/register/minstret.rs


+ 0 - 0
src/register/minstreth.rs → riscv/src/register/minstreth.rs


+ 0 - 0
src/register/mip.rs → riscv/src/register/mip.rs


+ 0 - 0
src/register/misa.rs → riscv/src/register/misa.rs


+ 0 - 0
src/register/mscratch.rs → riscv/src/register/mscratch.rs


+ 0 - 0
src/register/mstatus.rs → riscv/src/register/mstatus.rs


+ 0 - 0
src/register/mstatush.rs → riscv/src/register/mstatush.rs


+ 0 - 0
src/register/mtval.rs → riscv/src/register/mtval.rs


+ 0 - 0
src/register/mtvec.rs → riscv/src/register/mtvec.rs


+ 0 - 0
src/register/mvendorid.rs → riscv/src/register/mvendorid.rs


+ 0 - 0
src/register/pmpaddrx.rs → riscv/src/register/pmpaddrx.rs


+ 0 - 0
src/register/pmpcfgx.rs → riscv/src/register/pmpcfgx.rs


+ 0 - 0
src/register/satp.rs → riscv/src/register/satp.rs


+ 0 - 0
src/register/scause.rs → riscv/src/register/scause.rs


+ 0 - 0
src/register/scounteren.rs → riscv/src/register/scounteren.rs


+ 0 - 0
src/register/sepc.rs → riscv/src/register/sepc.rs


+ 0 - 0
src/register/sie.rs → riscv/src/register/sie.rs


+ 0 - 0
src/register/sip.rs → riscv/src/register/sip.rs


+ 0 - 0
src/register/sscratch.rs → riscv/src/register/sscratch.rs


+ 0 - 0
src/register/sstatus.rs → riscv/src/register/sstatus.rs


+ 0 - 0
src/register/stval.rs → riscv/src/register/stval.rs


+ 0 - 0
src/register/stvec.rs → riscv/src/register/stvec.rs


+ 0 - 0
src/register/time.rs → riscv/src/register/time.rs


+ 0 - 0
src/register/timeh.rs → riscv/src/register/timeh.rs