-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from Neotron-Compute/release/v0.2.0
Release/v0.2.0
- Loading branch information
Showing
24 changed files
with
139 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,19 @@ | ||
# Change Log | ||
|
||
## Unreleased changes ([Source](https://github.com/neotron-compute/neotron-sdk/tree/develop) | [Changes](https://github.com/neotron-compute/neotron-sdk/compare/v0.1.0...develop)) | ||
## Unreleased changes ([Source](https://github.com/neotron-compute/neotron-sdk/tree/develop) | [Changes](https://github.com/neotron-compute/neotron-sdk/compare/v0.2.0...develop)) | ||
|
||
* None | ||
|
||
## v0.2.0 - 2024-05-19 ([Source](https://github.com/neotron-compute/neotron-sdk/tree/v0.2.0) | [Release](https://github.com/neotron-compute/neotron-sdk/releases/tag/v0.2.0)) | ||
|
||
* Adds a bare-metal target to docs.rs | ||
* Document the `init` function | ||
* Moved the Cortex-M linker script into the SDK so applications don't have to | ||
have a copy | ||
* Update GitHub Actions to avoid Node.js 16 warnings | ||
* Fixed the asmhello sample (it was crashing) | ||
* Added more docs to the linker script | ||
|
||
## v0.1.0 - 2024-05-19 ([Source](https://github.com/neotron-compute/neotron-sdk/tree/v0.1.0) | [Release](https://github.com/neotron-compute/neotron-sdk/releases/tag/v0.1.0)) | ||
|
||
First version. Supports cross-platform terminal output and some basic file APIs. | ||
* First version. Supports cross-platform terminal output and some basic file APIs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ description = "SDK for writing applications for Neotron OS" | |
edition = "2021" | ||
license = "MIT OR Apache-2.0" | ||
name = "neotron-sdk" | ||
version = "0.1.0" | ||
version = "0.2.0" | ||
authors = ["Jonathan 'theJPster' Pallant <[email protected]>"] | ||
|
||
[dependencies] | ||
|
@@ -19,3 +19,6 @@ crossterm = "0.26" | |
[features] | ||
# Prints panic info. Costs you about 14K of code. | ||
fancy-panic = [] | ||
|
||
[package.metadata.docs.rs] | ||
targets = ["x86_64-unknown-linux-gnu", "thumbv6m-none-eabi"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
//! Build script for the Neotron SDK | ||
//! | ||
//! Sets up Rust to link with a Cortex-M linker script if you are building for | ||
//! an Arm bare-metal target. | ||
use std::io::prelude::*; | ||
|
||
fn main() { | ||
let arch = std::env::var("CARGO_CFG_TARGET_ARCH").expect("CARGO_CFG_TARGET_ARCH variable"); | ||
let os = std::env::var("CARGO_CFG_TARGET_OS").expect("CARGO_CFG_TARGET_OS variable"); | ||
match (arch.as_str(), os.as_str()) { | ||
("arm", "none") => { | ||
setup_cortexm_linker(); | ||
} | ||
_ => { | ||
// no script required | ||
} | ||
} | ||
} | ||
|
||
fn setup_cortexm_linker() { | ||
// Put `neotron-cortex-m.ld` in our output directory and ensure it's | ||
// on the linker search path. | ||
let out = &std::path::PathBuf::from(std::env::var_os("OUT_DIR").unwrap()); | ||
std::fs::File::create(out.join("neotron-cortex-m.ld")) | ||
.unwrap() | ||
.write_all(include_bytes!("./neotron-cortex-m.ld")) | ||
.unwrap(); | ||
println!("cargo:rustc-link-search={}", out.display()); | ||
|
||
// By default, Cargo will re-run a build script whenever | ||
// any file in the project changes. By specifying `neotron-cortex-m.ld` | ||
// here, we ensure the build script is only re-run when | ||
// `neotron-cortex-m.ld` is changed. | ||
println!("cargo:rerun-if-changed=./neotron-cortex-m.ld"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,23 @@ | ||
[target.thumbv7em-none-eabihf] | ||
rustflags = ["-C", "link-arg=-Tneotron-cortex-m.ld", "-C", "link-arg=--nmagic"] | ||
rustflags = [ | ||
"-Clink-arg=-Tneotron-cortex-m.ld", | ||
"-Clink-arg=--nmagic" | ||
] | ||
|
||
[target.thumbv7em-none-eabi] | ||
rustflags = ["-C", "link-arg=-Tneotron-cortex-m.ld", "-C", "link-arg=--nmagic"] | ||
rustflags = [ | ||
"-Clink-arg=-Tneotron-cortex-m.ld", | ||
"-Clink-arg=--nmagic" | ||
] | ||
|
||
[target.thumbv7m-none-eabi] | ||
rustflags = ["-C", "link-arg=-Tneotron-cortex-m.ld", "-C", "link-arg=--nmagic"] | ||
rustflags = [ | ||
"-Clink-arg=-Tneotron-cortex-m.ld", | ||
"-Clink-arg=--nmagic" | ||
] | ||
|
||
[target.thumbv6m-none-eabi] | ||
rustflags = ["-C", "link-arg=-Tneotron-cortex-m.ld", "-C", "link-arg=--nmagic"] | ||
rustflags = [ | ||
"-Clink-arg=-Tneotron-cortex-m.ld", | ||
"-Clink-arg=--nmagic" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,6 @@ authors = ["Jonathan 'theJPster' Pallant <[email protected]>"] | |
description = "Hello World for Neotron systems" | ||
|
||
[dependencies] | ||
neotron-sdk = { path = "../.." } | ||
neotron-sdk = { workspace = true } | ||
|
||
# See workspace for profile settings |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,6 @@ authors = ["Jonathan 'theJPster' Pallant <[email protected]>"] | |
description = "Hello World for Neotron systems" | ||
|
||
[dependencies] | ||
neotron-sdk = { path = "../.." } | ||
neotron-sdk = { workspace = true } | ||
|
||
# See workspace for profile settings |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,6 @@ authors = ["Jonathan 'theJPster' Pallant <[email protected]>"] | |
description = "Prints information about files" | ||
|
||
[dependencies] | ||
neotron-sdk = { path = "../.." } | ||
neotron-sdk = { workspace = true } | ||
|
||
# See workspace for profile settings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.