Initial commit

low_level
kirbylife 2022-11-21 00:38:10 -06:00
parent 824f57ad85
commit fd9edad00f
4 changed files with 60 additions and 0 deletions

6
.gitignore vendored
View File

@ -14,3 +14,9 @@ Cargo.lock
# MSVC Windows builds of rustc generate these, which store debugging information # MSVC Windows builds of rustc generate these, which store debugging information
*.pdb *.pdb
# hex output
*.hex
# Added by cargo
/target

9
Cargo.toml 100644
View File

@ -0,0 +1,9 @@
[package]
name = "arduino_blinkrs"
version = "0.1.0"
edition = "2021"
[dependencies]
[profile.release]
lto = true

View File

@ -0,0 +1,30 @@
{
"arch": "avr",
"cpu": "atmega328p",
"data-layout": "e-P1-p:16:8-i8:8-i16:8-i32:8-i64:8-f32:8-f64:8-n8-a:8",
"env": "",
"executables": true,
"linker": "avr-gcc",
"linker-flavor": "gcc",
"linker-is-gnu": true,
"llvm-target": "avr-unknown-unknown",
"os": "unknown",
"position-independent-executables": false,
"exe-suffix": ".elf",
"eh-frame-header": false,
"pre-link-args": {
"gcc": [
"-mmcu=atmega328p"
]
},
"late-link-args": {
"gcc": [
"-lgcc",
"-lc"
]
},
"target-c-int-width": "16",
"target-endian": "little",
"target-pointer-width": "16",
"vendor": "unknown"
}

15
src/main.rs 100644
View File

@ -0,0 +1,15 @@
#![feature(lang_items)]
#![allow(improper_ctypes_definitions)]
#![no_std]
#![no_main]
#[no_mangle]
pub extern "C" fn main() {}
#[lang = "eh_personality"]
pub unsafe extern "C" fn rust_eh_personality() -> () {}
#[lang = "panic_impl"]
fn panic(_info: &::core::panic::PanicInfo) -> ! {
loop {}
}