Skip to content

Commit

Permalink
Merge pull request #67 from IvanArkhipov1999/66-add-esp32c6-examples
Browse files Browse the repository at this point in the history
Add esp32c6 examples
  • Loading branch information
IvanArkhipov1999 authored Sep 23, 2024
2 parents cf9f2be + 644be20 commit a99d6fe
Show file tree
Hide file tree
Showing 22 changed files with 1,545 additions and 0 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,73 @@ jobs:
- name: Build
run: cd ./examples/c-examples/xtensa-esp32 && . /root/esp/esp-idf/export.sh && make && esptool.py --chip esp32 elf2image --flash_mode="dio" --flash_freq "40m" --flash_size "4MB" -o main.bin main.elf


risc-v-esp32c6-rust-example-hello-world:
runs-on: ubuntu-latest
env:
CARGO_HOME: /root/.cargo
RUSTUP_HOME: /root/.rustup
container:
image: arkhipovivan1/xtensa-esp32-rust:latest
options: --user root
steps:
- uses: actions/checkout@v3
- name: Build
run: cd ./examples/rust-examples/risc-v-esp32-c6/hello-world && . /root/export-esp.sh && cargo build
- name: Fmt
run: cd ./examples/rust-examples/risc-v-esp32-c6/hello-world && cargo fmt --all -- --check

risc-v-esp32c6-rust-example-dynamic-memory:
runs-on: ubuntu-latest
env:
CARGO_HOME: /root/.cargo
RUSTUP_HOME: /root/.rustup
container:
image: arkhipovivan1/xtensa-esp32-rust:latest
options: --user root
steps:
- uses: actions/checkout@v3
- name: Build
run: cd ./examples/rust-examples/risc-v-esp32-c6/dynamic-memory && . /root/export-esp.sh && cargo build
- name: Fmt
run: cd ./examples/rust-examples/risc-v-esp32-c6/dynamic-memory && cargo fmt --all -- --check

risc-v-esp32c6-rust-example-timer:
runs-on: ubuntu-latest
env:
CARGO_HOME: /root/.cargo
RUSTUP_HOME: /root/.rustup
container:
image: arkhipovivan1/xtensa-esp32-rust:latest
options: --user root
steps:
- uses: actions/checkout@v3
- name: Build
run: cd ./examples/rust-examples/risc-v-esp32-c6/timer && . /root/export-esp.sh && cargo build
- name: Fmt
run: cd ./examples/rust-examples/risc-v-esp32-c6/timer && cargo fmt --all -- --check

risc-v-esp32c6-static-library:
runs-on: ubuntu-latest
env:
CARGO_HOME: /root/.cargo
RUSTUP_HOME: /root/.rustup
container:
image: arkhipovivan1/xtensa-esp32-rust:latest
options: --user root
steps:
- uses: actions/checkout@v3
- name: Build
run: cd ./c-library/risc-v-esp32-c6 && . /root/export-esp.sh && cargo build --release
- name: Fmt
run: cd ./c-library/risc-v-esp32-c6 && cargo fmt --all -- --check
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: risc-v-esp32c6-static-library
path: c-library/risc-v-esp32-c6/target/riscv32imac-unknown-none-elf/release/librisc_v_esp32c6_static_lib.a
retention-days: 7


mips64-rust-example-hello-world:
runs-on: ubuntu-latest
Expand Down
18 changes: 18 additions & 0 deletions c-library/risc-v-esp32-c6/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[target.riscv32imac-unknown-none-elf]
runner = "espflash flash --monitor"


[build]
rustflags = [
"-C", "link-arg=-Tlinkall.x",
"-C", "force-frame-pointers",
]

target = "riscv32imac-unknown-none-elf"

[unstable]
build-std = ["core", "alloc"]

[target.'cfg(any(target_arch = "riscv32", target_arch = "xtensa"))']
runner = "espflash flash --monitor"

Loading

0 comments on commit a99d6fe

Please sign in to comment.