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

Experimental support for rust #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[build]
target = "avr-atmega2560.json" # architecture/avr/

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

[target.'cfg(target_arch = "avr")']
# runner = "./scripts/qemu-runner.sh"
runner = "ravedude -cb 115200 mega2560"

# runner = "ravedude -cb 57600 mega2560 -P /dev/ttyACM0"

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@
*.dump
/scripts/misra-rules.txt
/misra.json

/target
42 changes: 28 additions & 14 deletions .vscode/launch.template.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,34 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) QEMU",
"type": "cppdbg",
"request": "launch",
"miDebuggerServerAddress": "127.0.0.1:1234",
"program": "${workspaceFolder}/.pio/build/Sysclock-qemu-ATmega2560/firmware.elf",
"args": [],
"stopAtEntry": true,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"miDebuggerPath": "avr-gdb",
"MIMode": "gdb"
},
{
"name": "(gdb) QEMU",
"type": "cppdbg",
"request": "launch",
"miDebuggerServerAddress": "127.0.0.1:1234",
"program": "${workspaceFolder}/.pio/build/Sysclock-qemu-ATmega2560/firmware.elf",
"args": [],
"stopAtEntry": true,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"miDebuggerPath": "avr-gdb",
"MIMode": "gdb"
},
{
"name": "rust QEMU (avr)",
"type": "cppdbg",
"request": "launch",
"miDebuggerServerAddress": "127.0.0.1:1234",
"program": "target/avr-atmega2560/release/rust-avrtos-examples.elf",
"args": [],
"stopAtEntry": true,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"miDebuggerPath": "avr-gdb",
"MIMode": "gdb"
},
{
"name": "(gdb) remote QEMU WSL",
"type": "cppdbg",
Expand Down
70 changes: 10 additions & 60 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"CMAKE_GENERATOR": "Unix Makefiles",
"CMAKE_TOOLCHAIN_FILE": "${workspaceFolder}/cmake/avr6-atmega2560.cmake",
},
"rust-analyzer.cargo.buildScripts.enable": false,
"editor.tabSize": 4,
"editor.rulers": [80],
"files.associations": {
Expand All @@ -13,67 +14,16 @@
"*.bb": "shellscript",
"*.bbclass": "shellscript",
"*.inc": "shellscript",
"multithreading_debug.h": "c",
"serial.h": "c",
"multithreading_defines.h": "c",
"schedules_items.h": "c",
"xqueue.h": "c",
"mutex.h": "c",
"pgmspace.h": "c",
"io.h": "c",
"interrupt.h": "c",
"kernel.h": "c",
"rust.h": "c",
"defines.h": "c",
"sys.h": "c",
"debug.h": "c",
"fifo.h": "c",
"assert.h": "c",
"idle.h": "c",
"canaries.h": "c",
"queue.h": "c",
"workqueue.h": "c",
"dlist.h": "c",
"stddef.h": "c",
"mem_slab.h": "c",
"avrtos.h": "c",
"tqueue.h": "c",
"slist.h": "c",
"led.h": "c",
"delay.h": "c",
"cpufunc.h": "c",
"stdint.h": "c",
"avrtos_conf.h": "c",
"time.h": "c",
"event.h": "c",
"atomic.h": "c",
"timer.h": "c",
"stack_sentinel.h": "c",
"fault.h": "c",
"iom328p.h": "c",
"stdbool.h": "c",
"usart.h": "c",
"semaphore.h": "c",
"kernel_private.h": "c",
"drivers.h": "c",
"gpio.h": "c",
"flags.h": "c",
"logging.h": "c",
"iom2560.h": "c",
"iomxx0_1.h": "c",
"typeinfo": "c",
"exti.h": "c",
"spi.h": "c",
"sleep.h": "c",
"cmath": "c",
"types.h": "c",
"errno.h": "c",
"init.h": "c",
"ring.h": "c",
"string.h": "c",
"crc16.h": "c",
"delay_basic.h": "c",
"twi.h": "c",
"i2c.h": "c",
"i2c_defs.h": "c"
"rust_helpers.h": "c",
"system_error": "c",
"array": "c",
"functional": "c",
"tuple": "c",
"type_traits": "c",
"utility": "c",
"kernel.h": "c"
},
}
Loading