Skip to content

Commit 539160c

Browse files
committedOct 11, 2024
Add SPDX License identifiers to source files rust-embedded#101
1 parent a34dd4f commit 539160c

File tree

10 files changed

+20
-0
lines changed

10 files changed

+20
-0
lines changed
 

‎build.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: MIT OR Apache-2.0
2+
13
//! This build script copies the `memory.x` file from the crate root into
24
//! a directory where the linker can always find it at build time.
35
//! For many projects this is optional, as the linker always searches the

‎examples/allocator.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: MIT OR Apache-2.0
2+
13
//! How to use the heap and a dynamic memory allocator
24
//!
35
//! This example depends on the alloc-cortex-m crate so you'll have to add it to your Cargo.toml:

‎examples/crash.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: MIT OR Apache-2.0
2+
13
//! Debugging a crash (exception)
24
//!
35
//! Most crash conditions trigger a hard fault exception, whose handler is defined via

‎examples/device.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: MIT OR Apache-2.0
2+
13
//! Using a device crate
24
//!
35
//! Crates generated using [`svd2rust`] are referred to as device crates. These crates provide an

‎examples/exception.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: MIT OR Apache-2.0
2+
13
//! Overriding an exception handler
24
//!
35
//! You can override an exception handler using the [`#[exception]`][1] attribute.

‎examples/hello.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: MIT OR Apache-2.0
2+
13
//! Prints "Hello, world!" on the host console using semihosting
24
35
#![no_main]

‎examples/itm.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: MIT OR Apache-2.0
2+
13
//! Sends "Hello, world!" through the ITM port 0
24
//!
35
//! ITM is much faster than semihosting. Like 4 orders of magnitude or so.

‎examples/panic.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: MIT OR Apache-2.0
2+
13
//! Changing the panicking behavior
24
//!
35
//! The easiest way to change the panicking behavior is to use a different [panic handler crate][0].

‎examples/test_on_host.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: MIT OR Apache-2.0
2+
13
//! Conditionally compiling tests with std and our executable with no_std.
24
//!
35
//! Rust's built in unit testing framework requires the standard library,

‎src/main.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: MIT OR Apache-2.0
2+
13
#![no_std]
24
#![no_main]
35

0 commit comments

Comments
 (0)
Please sign in to comment.