Skip to content

Commit fb20dc2

Browse files
committed
Clean up
1 parent d714075 commit fb20dc2

File tree

2 files changed

+34
-8
lines changed

2 files changed

+34
-8
lines changed

customer_app/sdk_app_rust_script/README.md

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,38 @@
22

33
Based 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
934
cargo 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
1238
cargo build --target wasm32-unknown-emscripten
1339
```

customer_app/sdk_app_rust_script/run.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,11 @@ set -x # Enable echo
103103
make
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
113113
cp build_out/$APP_NAME.bin $BLFLASH_PATH

0 commit comments

Comments
 (0)