Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
+ display printer
+ onboard led blinker
+ error types
+ custom logger w/ path based log levels and better printing
+ ci files
+ (failed) adc code
+ wokwi diagram.json
+ wifi initialisation
+ wifi query webpage
+ print button state
  • Loading branch information
Sycrosity committed Apr 23, 2024
0 parents commit db856cf
Show file tree
Hide file tree
Showing 22 changed files with 2,830 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[target.riscv32imc-unknown-none-elf]
runner = "espflash flash --monitor"


[env]
ESP_LOGLEVEL="DEBUG"
ESP_LOGTARGETS="esp_wifi::compat::timer_compat=warn,esp_wifi::tasks=info"
[build]
rustflags = [
"-C", "link-arg=-Tlinkall.x",

# Required to obtain backtraces (e.g. when using the "esp-backtrace" crate.)
# NOTE: May negatively impact performance of produced code
"-C", "force-frame-pointers",
]

target = "riscv32imc-unknown-none-elf"

[unstable]
build-std = ["alloc", "core"]
40 changes: 40 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Continuous Integration

on:
push:
paths-ignore:
- "**/README.md"
pull_request:
workflow_dispatch:

env:
CARGO_TERM_COLOR: always
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
rust-checks:
name: Rust Checks
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
action:
- command: build
args: --release
- command: fmt
args: --all -- --check --color always
- command: clippy
args: --all-features --workspace -- -D warnings
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Rust
uses: esp-rs/[email protected]
with:
default: true
buildtargets: esp32
ldproxy: false
- name: Enable caching
uses: Swatinem/rust-cache@v2
- name: Run command
run: cargo ${{ matrix.action.command }} ${{ matrix.action.args }}
19 changes: 19 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Generated by Cargo
# will have compiled files and executables
debug/
target/

# these are backup files generated by rustfmt
**/*.rs.bk

# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb

# vscode workspace files
*.code-workspace

# macos fs files
**/.DS_Store

# environment variables/secrets
*.env
15 changes: 15 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Wokwi GDB",
"type": "lldb",
"request": "launch",
"program": "${workspaceFolder}/target/xtensa-esp32-none-elf/release/cansat",
"cwd": "${workspaceFolder}",
"MIMode": "gdb",
"miDebuggerPath": "${userHome}/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gdb",
"miDebuggerServerAddress": "localhost:3333"
}
]
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"rust-analyzer.checkOnSave.allTargets": true,
}
Loading

0 comments on commit db856cf

Please sign in to comment.