Carry-over Infineon basis
This commit is contained in:
parent
7bdbb13177
commit
b2152284dd
8 changed files with 567 additions and 2 deletions
46
src/main.rs
46
src/main.rs
|
|
@ -1,3 +1,45 @@
|
|||
fn main() {
|
||||
println!("Hello, world!");
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
// Import necessary items from cortex-m-rt and other crates
|
||||
use cortex_m_rt::entry;
|
||||
use panic_halt as _;
|
||||
|
||||
// Optional: Enable semihosting for debugging
|
||||
// #[cfg(feature = "semihosting")]
|
||||
// use cortex_m_semihosting::{debug, println};
|
||||
|
||||
// Entry point for the application
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
// Application initialization code goes here
|
||||
|
||||
// Example: Basic LED blink or other initialization
|
||||
// This is where you would initialize peripherals, clocks, etc.
|
||||
|
||||
// For now, just loop indefinitely
|
||||
loop {
|
||||
// Main application loop
|
||||
|
||||
// Optional: Semihosting debug output (only if feature is enabled)
|
||||
// #[cfg(feature = "semihosting")]
|
||||
// println!("Traveo II application running...");
|
||||
|
||||
// Add a small delay (cortex-m does not have built-in delay)
|
||||
// You would typically use a timer peripheral for this
|
||||
|
||||
// Safety: Continue running indefinitely
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// Optional: Exception handlers for better error handling
|
||||
// #[exception]
|
||||
// fn HardFault(_ef: &ExceptionFrame) -> ! {
|
||||
// loop {}
|
||||
// }
|
||||
|
||||
// #[exception]
|
||||
// fn DefaultHandler(_irqn: i16) {
|
||||
// loop {}
|
||||
// }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue