Skip to content

Commit

Permalink
Add SPDX License identifiers to source files rust-embedded#101
Browse files Browse the repository at this point in the history
  • Loading branch information
kaidokert committed Oct 11, 2024
1 parent a34dd4f commit 539160c
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

//! This build script copies the `memory.x` file from the crate root into
//! a directory where the linker can always find it at build time.
//! For many projects this is optional, as the linker always searches the
Expand Down
2 changes: 2 additions & 0 deletions examples/allocator.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

//! How to use the heap and a dynamic memory allocator
//!
//! This example depends on the alloc-cortex-m crate so you'll have to add it to your Cargo.toml:
Expand Down
2 changes: 2 additions & 0 deletions examples/crash.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

//! Debugging a crash (exception)
//!
//! Most crash conditions trigger a hard fault exception, whose handler is defined via
Expand Down
2 changes: 2 additions & 0 deletions examples/device.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

//! Using a device crate
//!
//! Crates generated using [`svd2rust`] are referred to as device crates. These crates provide an
Expand Down
2 changes: 2 additions & 0 deletions examples/exception.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

//! Overriding an exception handler
//!
//! You can override an exception handler using the [`#[exception]`][1] attribute.
Expand Down
2 changes: 2 additions & 0 deletions examples/hello.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

//! Prints "Hello, world!" on the host console using semihosting
#![no_main]
Expand Down
2 changes: 2 additions & 0 deletions examples/itm.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

//! Sends "Hello, world!" through the ITM port 0
//!
//! ITM is much faster than semihosting. Like 4 orders of magnitude or so.
Expand Down
2 changes: 2 additions & 0 deletions examples/panic.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

//! Changing the panicking behavior
//!
//! The easiest way to change the panicking behavior is to use a different [panic handler crate][0].
Expand Down
2 changes: 2 additions & 0 deletions examples/test_on_host.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

//! Conditionally compiling tests with std and our executable with no_std.
//!
//! Rust's built in unit testing framework requires the standard library,
Expand Down
2 changes: 2 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

#![no_std]
#![no_main]

Expand Down

0 comments on commit 539160c

Please sign in to comment.