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

risc-v support #1

Open
dkhayes117 opened this issue Aug 24, 2020 · 1 comment
Open

risc-v support #1

dkhayes117 opened this issue Aug 24, 2020 · 1 comment
Labels
difficulty: hard Fairly difficult to solve priority: low Low priority for the Knurling team status: blocked Blocked on another issue, or on upstream libraries type: enhancement Enhancement or feature request

Comments

@dkhayes117
Copy link

I'm getting linking errors during cargo build --bin hello

error: linking with `rust-lld` failed: exit code: 1
  |
  = note: "rust-lld" "-flavor" "gnu" "-L" "/home/dkhayes117/.rustup/toolchains/beta-x86_64-unknown-linux-gnu/lib/rustlib/riscv32imac-unknown-none-elf/lib" "/home/dkhayes117/IdeaProjects/defmt_test/target/riscv32imac-unknown-none-elf/debug/deps/hello-a9b45fbc99b62350.hello.1n7pvg5w-cgu.0.rcgu.o" "-o" "/home/dkhayes117/IdeaProjects/defmt_test/target/riscv32imac-unknown-none-elf/debug/deps/hello-a9b45fbc99b62350" "--gc-sections" "-L" "/home/dkhayes117/IdeaProjects/defmt_test/target/riscv32imac-unknown-none-elf/debug/deps" "-L" "/home/dkhayes117/IdeaProjects/defmt_test/target/debug/deps" "-L" "/home/dkhayes117/IdeaProjects/defmt_test/target/riscv32imac-unknown-none-elf/debug/build/defmt-786b78cb5fb56c90/out" "-L" "/home/dkhayes117/IdeaProjects/defmt_test/target/riscv32imac-unknown-none-elf/debug/build/hifive1-12e6de30a7c42179/out" "-L" "/home/dkhayes117/IdeaProjects/defmt_test/target/riscv32imac-unknown-none-elf/debug/build/e310x-c9d6b8bcdebcec36/out" "-L" "/home/dkhayes117/IdeaProjects/defmt_test/target/riscv32imac-unknown-none-elf/debug/build/riscv-b96e58c41469ec83/out" "-L" "/home/dkhayes117/IdeaProjects/defmt_test/target/riscv32imac-unknown-none-elf/debug/build/riscv-rt-7fa43864cbb5bfaa/out" "-L" "/home/dkhayes117/IdeaProjects/defmt_test/target/riscv32imac-unknown-none-elf/debug/build/riscv-rt-7fa43864cbb5bfaa/out" "-L" "/home/dkhayes117/.rustup/toolchains/beta-x86_64-unknown-linux-gnu/lib/rustlib/riscv32imac-unknown-none-elf/lib" "--start-group" "-Bstatic" "/tmp/rustcQiAIxg/libriscv_rt-c7d2a202c972997c.rlib" "/tmp/rustcQiAIxg/libriscv-6fb334952367127a.rlib" "--end-group" "/home/dkhayes117/.rustup/toolchains/beta-x86_64-unknown-linux-gnu/lib/rustlib/riscv32imac-unknown-none-elf/lib/libcompiler_builtins-c1fdd1f60c58bc16.rlib" "-Bdynamic"
  = note: rust-lld: error: undefined symbol: _mp_hook
          >>> referenced by lib.rs:301 (/home/dkhayes117/.cargo/registry/src/github.com-1ecc6299db9ec823/riscv-rt-0.6.2/src/lib.rs:301)
          >>>               /home/dkhayes117/IdeaProjects/defmt_test/target/riscv32imac-unknown-none-elf/debug/deps/hello-a9b45fbc99b62350.hello.1n7pvg5w-cgu.0.rcgu.o:(_start_rust)
          
          rust-lld: error: undefined symbol: __pre_init
          >>> referenced by lib.rs:302 (/home/dkhayes117/.cargo/registry/src/github.com-1ecc6299db9ec823/riscv-rt-0.6.2/src/lib.rs:302)
          >>>               /home/dkhayes117/IdeaProjects/defmt_test/target/riscv32imac-unknown-none-elf/debug/deps/hello-a9b45fbc99b62350.hello.1n7pvg5w-cgu.0.rcgu.o:(_start_rust)
          
          rust-lld: error: undefined symbol: _sbss
          >>> referenced by lib.rs:302 (/home/dkhayes117/.cargo/registry/src/github.com-1ecc6299db9ec823/riscv-rt-0.6.2/src/lib.rs:302)
          >>>               /home/dkhayes117/IdeaProjects/defmt_test/target/riscv32imac-unknown-none-elf/debug/deps/hello-a9b45fbc99b62350.hello.1n7pvg5w-cgu.0.rcgu.o:(_start_rust)
          >>> referenced by lib.rs:302 (/home/dkhayes117/.cargo/registry/src/github.com-1ecc6299db9ec823/riscv-rt-0.6.2/src/lib.rs:302)
          >>>               /home/dkhayes117/IdeaProjects/defmt_test/target/riscv32imac-unknown-none-elf/debug/deps/hello-a9b45fbc99b62350.hello.1n7pvg5w-cgu.0.rcgu.o:(_start_rust)
          
          rust-lld: error: undefined symbol: _ebss
          >>> referenced by lib.rs:302 (/home/dkhayes117/.cargo/registry/src/github.com-1ecc6299db9ec823/riscv-rt-0.6.2/src/lib.rs:302)
          >>>               /home/dkhayes117/IdeaProjects/defmt_test/target/riscv32imac-unknown-none-elf/debug/deps/hello-a9b45fbc99b62350.hello.1n7pvg5w-cgu.0.rcgu.o:(_start_rust)
          >>> referenced by lib.rs:302 (/home/dkhayes117/.cargo/registry/src/github.com-1ecc6299db9ec823/riscv-rt-0.6.2/src/lib.rs:302)
          >>>               /home/dkhayes117/IdeaProjects/defmt_test/target/riscv32imac-unknown-none-elf/debug/deps/hello-a9b45fbc99b62350.hello.1n7pvg5w-cgu.0.rcgu.o:(_start_rust)
          
          rust-lld: error: undefined symbol: _sdata
          >>> referenced by lib.rs:0 (/home/dkhayes117/.cargo/registry/src/github.com-1ecc6299db9ec823/r0-0.2.2/src/lib.rs:0)
          >>>               /home/dkhayes117/IdeaProjects/defmt_test/target/riscv32imac-unknown-none-elf/debug/deps/hello-a9b45fbc99b62350.hello.1n7pvg5w-cgu.0.rcgu.o:(_start_rust)
          >>> referenced by lib.rs:0 (/home/dkhayes117/.cargo/registry/src/github.com-1ecc6299db9ec823/r0-0.2.2/src/lib.rs:0)
          >>>               /home/dkhayes117/IdeaProjects/defmt_test/target/riscv32imac-unknown-none-elf/debug/deps/hello-a9b45fbc99b62350.hello.1n7pvg5w-cgu.0.rcgu.o:(_start_rust)
          
          rust-lld: error: undefined symbol: _sidata
          >>> referenced by lib.rs:0 (/home/dkhayes117/.cargo/registry/src/github.com-1ecc6299db9ec823/r0-0.2.2/src/lib.rs:0)
          >>>               /home/dkhayes117/IdeaProjects/defmt_test/target/riscv32imac-unknown-none-elf/debug/deps/hello-a9b45fbc99b62350.hello.1n7pvg5w-cgu.0.rcgu.o:(_start_rust)
          >>> referenced by lib.rs:0 (/home/dkhayes117/.cargo/registry/src/github.com-1ecc6299db9ec823/r0-0.2.2/src/lib.rs:0)
          >>>               /home/dkhayes117/IdeaProjects/defmt_test/target/riscv32imac-unknown-none-elf/debug/deps/hello-a9b45fbc99b62350.hello.1n7pvg5w-cgu.0.rcgu.o:(_start_rust)
          
          rust-lld: error: undefined symbol: trap_handler
          >>> referenced by lib.rs:329 (/home/dkhayes117/.cargo/registry/src/github.com-1ecc6299db9ec823/riscv-rt-0.6.2/src/lib.rs:329)
          >>>               /home/dkhayes117/IdeaProjects/defmt_test/target/riscv32imac-unknown-none-elf/debug/deps/hello-a9b45fbc99b62350.hello.1n7pvg5w-cgu.0.rcgu.o:(_start_trap_rust)
          
          rust-lld: error: undefined symbol: _max_hart_id
          >>> referenced by riscv-rt.o:(.init+0x52) in archive /tmp/rustcQiAIxg/libriscv_rt-c7d2a202c972997c.rlib
          >>> referenced by riscv-rt.o:(.init+0x56) in archive /tmp/rustcQiAIxg/libriscv_rt-c7d2a202c972997c.rlib
          
          rust-lld: error: undefined symbol: _stack_start
          >>> referenced by riscv-rt.o:(.init+0x5E) in archive /tmp/rustcQiAIxg/libriscv_rt-c7d2a202c972997c.rlib
          
          rust-lld: error: undefined symbol: _hart_stack_size
          >>> referenced by riscv-rt.o:(.init+0x66) in archive /tmp/rustcQiAIxg/libriscv_rt-c7d2a202c972997c.rlib
          >>> referenced by riscv-rt.o:(.init+0x6A) in archive /tmp/rustcQiAIxg/libriscv_rt-c7d2a202c972997c.rlib
          

error: aborting due to previous error

error: could not compile `defmt_test`.

To learn more, run the command again with --verbose.

@Lotterleben
Copy link

The template currently does not provide risc-v support. keeping this issue open as a reminder if/when we want to change that. :)

@jamesmunns jamesmunns added the type: enhancement Enhancement or feature request label Aug 24, 2020
@jonas-schievink jonas-schievink added difficulty: hard Fairly difficult to solve priority: low Low priority for the Knurling team status: blocked Blocked on another issue, or on upstream libraries labels Dec 21, 2020
@Urhengulas Urhengulas changed the title Hifive1 RevB defmt hello.rs risc-v support Apr 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: hard Fairly difficult to solve priority: low Low priority for the Knurling team status: blocked Blocked on another issue, or on upstream libraries type: enhancement Enhancement or feature request
Projects
None yet
Development

No branches or pull requests

4 participants