1. Apr 26, 2023
  2. Jan 23, 2023
    • bors[bot]'s avatar
      Merge #110 · e95dc95a
      bors[bot] authored
      
      
      110: fix: avoid rust-analyzer snake case warning r=almindor a=sethp
      
      It seems that rust-analyzer needs to operate over the expanded text of the proc macro (in order to e.g. support completion in the function body, see #11014 for way more details), so it "sees" the non-snake-case name emitted by riscv-rt's `entry` here.
      
      Without this change, rust-analyzer will show a "weak warning" on invocations of `#[entry]` with the text:
      
      ```
      Function `__risc_v_rt__main` should have snake_case name, e.g. `__risc_v_rt_main`
      ```
      
      Co-authored-by: default avatarsethp <seth@codecopse.net>
      e95dc95a
  3. Jan 22, 2023
    • sethp's avatar
      fix: avoid rust-analyzer snake case warning · c1b88da5
      sethp authored
      It seems that rust-analyzer needs to operate over the expanded text of the proc macro (in order to e.g. support completion in the function body, see #11014 for way more details), so it "sees" the non-snake-case name emitted by riscv-rt's `entry` here.
      
      Without this change, rust-analyzer will show a "weak warning" on invocations of `#[entry]` with the text:
      
      ```
      Function `__risc_v_rt__main` should have snake_case name, e.g. `__risc_v_rt_main`
      ```
      c1b88da5
  4. Jan 19, 2023
  5. Dec 27, 2022
    • bors[bot]'s avatar
      Merge #108 · 513dee15
      bors[bot] authored
      
      
      108: update to riscv 0.10 r=dkhayes117 a=tfx2001
      
      In `svd2rust` 0.24.2, require `critial-section` feature of `riscv` 0.10.0 to use the `Peripheral::take()`. So update `riscv` to 0.10 avoid link error.
      
      ```text
        = note: rust-lld: error: undefined symbol: _critical_section_1_0_release
                >>> referenced by lib.rs:197 (C:\***\.cargo\registry\src\github.com-1ecc6299db9ec823\critical-section-1.1.1\src/lib.rs:197)
                >>>               C:\***\target\riscv32imac-unknown-none-elf\debug\deps\blink-38e172683ad1eb45.21kbt3gcucoa48u6.rcgu.o:(core::ptr::drop_in_place$LT$critical_section..with..Guard$GT$::h47fa1a207a83c94b)
      
                rust-lld: error: undefined symbol: _critical_section_1_0_acquire
                >>> referenced by lib.rs:180 (C:\***\.cargo\registry\src\github.com-1ecc6299db9ec823\critical-section-1.1.1\src/lib.rs:180)
                >>>               C:\***\target\riscv32imac-unknown-none-elf\debug\deps\blink-38e172683ad1eb45.54bke7unpav17a81.rcgu.o:(critical_section::with::h3ba86eebd468f130)
      ```
      
      Co-authored-by: default avatartfx2001 <tfx2001@outlook.com>
      513dee15
  6. Dec 26, 2022
  7. Nov 05, 2022
  8. Sep 20, 2022
    • bors[bot]'s avatar
      Merge #104 · 3b4ab6f3
      bors[bot] authored
      
      
      104: SBI mode r=almindor a=pgraubner
      
      Introducing Supervisor Binary Interface (SBI) compatibility as a build-time feature. Main goal is to allow riscv-rt based implementations to be bootstrapped by a SBI-firmware (like in `qemu-system-riscv64`).
      
      * Introduce compiler switches for assembly in order to switch between machine mode / supervisor mode
      * Introduce cargo feature for conditional compilation
      * Patch lib.rs for supervisor-mode compatibility
      
      The only interface this PR is braking is `mp_hook`, which needs a mhartid replacement for smode. The hart id is passed by the caller.
      Tested with `qemu-system-riscv64`.
      
      See also documentation/features/sbi for further implementation details.
      
      Co-authored-by: default avatarPablo Graubner <2234137+pgraubner@users.noreply.github.com>
      3b4ab6f3
    • Pablo Graubner's avatar
      SMODE: remove redundand paths · 096d90a3
      Pablo Graubner authored
      096d90a3
  9. Sep 17, 2022
  10. Sep 16, 2022
  11. Sep 09, 2022
  12. Sep 08, 2022
  13. Jul 11, 2022
  14. Jul 03, 2022
  15. Jul 01, 2022
  16. Jun 30, 2022
    • bors[bot]'s avatar
      Merge #96 · a75e6b89
      bors[bot] authored
      
      
      96: Add missing changelog entries r=almindor a=Disasm
      
      
      
      Co-authored-by: default avatarVadim Kaushan <admin@disasm.info>
      a75e6b89
    • Vadim Kaushan's avatar
      Add missing changelog entries · d315cb89
      Vadim Kaushan authored
      d315cb89
    • bors[bot]'s avatar
      Merge #95 · f3244315
      bors[bot] authored
      95: Pass a0..a2 to main() r=almindor a=Disasm
      
      This PR delivers arguments stored in a0..a2 to `main`.
      
      Fixes https://github.com/rust-embedded/riscv-rt/issues/92
      
      
      
      Tested with:
      * build the `empty` example for `riscv64imac-unknown-none-elf` with a memory file which puts everything to `0x80000000`
      * run `qemu-system-riscv64 -nographic -machine virt -bios target/riscv64imac-unknown-none-elf/release/examples/empty -s -S`
      * connect to qemu with gdb (`target remote :1234`)
      * set breakpoint to main (`b main`)
      * resume execution (`continue`)
      * inspect registers (`info registers`)
      ```
      a0             0x0	0
      a1             0x87000000	2264924160
      a2             0x1028	4136
      ```
      * check header (`x/xw 0x87000000`)
      ```
      0x87000000:	0xedfe0dd0
      ```
      
      Co-authored-by: default avatarVadim Kaushan <admin@disasm.info>
      f3244315
  17. Jun 25, 2022
  18. Jun 23, 2022
  19. Jun 11, 2022
  20. Apr 27, 2022
  21. Apr 23, 2022