File tree Expand file tree Collapse file tree 2 files changed +34
-8
lines changed
customer_app/sdk_app_rust_script Expand file tree Collapse file tree 2 files changed +34
-8
lines changed Original file line number Diff line number Diff line change 22
33Based on Rhai Scripting Engine.
44
5- Sorry it doesn't work on BL602, seems to run out of stack space.
5+ Sorry it doesn't work on BL602, seems to run out of stack space...
6+
7+ ``` text
8+ # rust_main
9+ Hello from Rust!
10+ Exception Entry--->>>
11+ mcause 38000002, mepc 23035e68, mtval 00000000
12+ Exception code: 2
13+ msg: Illegal instruction
14+ === backtrace start ===
15+ backtrace: 0x23009466
16+ backtrace: 0x23008252
17+ backtrace: 0x23035e6c <--- TRAP
18+ backtrace: 0x231e7000
19+ Exception Entry--->>>
20+ mcause 30000005, mepc 2305955c, mtval fffffffd
21+ Exception code: 5
22+ msg: Load access fault
23+ backtrace nested...
24+ ```
25+
26+ To build, flash and run the firmware...
627
728``` bash
8- # For BL602
29+ # Build, flash and run the firmware
30+ ./run.sh
31+
32+ # To build the Rust Project for BL602:
33+ cd rust
934cargo build --target ../riscv32imacf-unknown-none-elf.json -Z build-std=core,alloc
1035
11- # For WebAssembly
36+ # To build the Rust Project for WebAssembly:
37+ cd rust
1238cargo build --target wasm32-unknown-emscripten
1339```
Original file line number Diff line number Diff line change @@ -103,11 +103,11 @@ set -x # Enable echo
103103make
104104
105105# Generate the disassembly
106- # $GCC_PATH/bin/riscv-none-embed-objdump \
107- # -t -S --demangle --line-numbers --wide \
108- # build_out/$APP_NAME.elf \
109- # >build_out/$APP_NAME.S \
110- # 2>&1
106+ $GCC_PATH /bin/riscv-none-embed-objdump \
107+ -t -S --demangle --line-numbers --wide \
108+ build_out/$APP_NAME .elf \
109+ > build_out/$APP_NAME .S \
110+ 2>&1
111111
112112# Copy firmware to blflash
113113cp build_out/$APP_NAME .bin $BLFLASH_PATH
You can’t perform that action at this time.
0 commit comments