Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No longer requires cmake or ninja. #9

Merged
merged 3 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add some additional notes.
  • Loading branch information
jonathanpallant committed Jul 23, 2024
commit 0d4e931e31be528cf3f71610f003b8d1cf07f0a3
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
This repository shows how to compile a Rust application which runs on the
ThreadX RTOS.

Note this project uses Git submodules, so you should run:

```bash
git submodule update --init
```

## Licence

* Copyright (c) 2023 Ferrous Systems
* Copyright (c) 2024 Ferrous Systems
* SPDX-License-Identifier: MIT OR Apache-2.0
50 changes: 50 additions & 0 deletions demo-app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Rust on ThreadX on nRF52 Example Binary

This is a Rust application which uses ThreadX and runs on an nRF52840-DK board.

You can compile it with Rust, or with Ferrocene. You will need
`arm-none-eabi-gcc` installed to compile ThreadX, which this application does
automatically. You will also need `probe-rs` from <https://probe.rs>.

```console
$ cargo run --release
Compiling demo-app v0.0.0 (/Users/jonathan/Documents/ferrous-systems/threadx-experiments/demo-app)
Finished `dev` profile [optimized + debuginfo] target(s) in 4.81s
Running `probe-rs run --chip nRF52840_xxAA target/thumbv7em-none-eabi/debug/demo-app`
Erasing ✔ [00:00:00] [####################################] 12.00 KiB/12.00 KiB @ 33.03 KiB/s (eta 0s )
Programming ✔ [00:00:00] [####################################] 12.00 KiB/12.00 KiB @ 42.84 KiB/s (eta 0s ) Finished in 0.661s
<lvl> Hello, this is version unknown!
└─ demo_app::__cortex_m_rt_main @ src/main.rs:151
<lvl> Entering ThreadX kernel...
└─ demo_app::__cortex_m_rt_main @ src/main.rs:186
<lvl> In tx_application_define()...
└─ demo_app::tx_application_define @ src/main.rs:26
<lvl> Stack allocated @ 0x20037444
└─ demo_app::tx_application_define @ src/main.rs:59
<lvl> Thread spawned (entry=12345678) @ 0x2003f440
└─ demo_app::tx_application_define @ src/main.rs:85
<lvl> Stack allocated @ 0x2003944c
└─ demo_app::tx_application_define @ src/main.rs:102
<lvl> Thread spawned (entry=aabbccdd) @ 0x2003f4f8
└─ demo_app::tx_application_define @ src/main.rs:128
<lvl> I am my_thread(12345678)
└─ demo_app::my_thread @ src/main.rs:136
<lvl> I am my_thread(aabbccdd)
└─ demo_app::my_thread @ src/main.rs:136
<lvl> I am my_thread(12345678), count = 1
└─ demo_app::my_thread @ src/main.rs:145
<lvl> I am my_thread(aabbccdd), count = 1
└─ demo_app::my_thread @ src/main.rs:145
<lvl> I am my_thread(12345678), count = 2
└─ demo_app::my_thread @ src/main.rs:145
<lvl> I am my_thread(aabbccdd), count = 2
└─ demo_app::my_thread @ src/main.rs:145
<lvl> I am my_thread(12345678), count = 3
└─ demo_app::my_thread @ src/main.rs:145
...
```

## Licence

* Copyright (c) 2024 Ferrous Systems
* SPDX-License-Identifier: MIT OR Apache-2.0