Skip to content

Commit 330dbab

Browse files
committed
add freeRTOS port doc
1 parent 399f62c commit 330dbab

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ fn main() {
4141
// The `FreeRTOSConfig.h` is usually inside your main crate to match you application and target needs.
4242
b.freertos_config("src");
4343
44+
// set the freertos port dir relativ to the FreeRTOS/Source/portable directory
45+
// "GCC/ARM_CM33_NTZ/non_secure"
46+
// If not set it will be detected based on the current build target (not many targets supported yet)
47+
b.freertos_port("GCC/ARM_CM33_NTZ/non_secure");
48+
4449
// Additional "C" code may optionally compiled beside FreeRTOS using:
4550
// b.get_cc().file("optionalAdditionCode.c");
4651

freertos-cargo-build/README.md

+21-3
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,30 @@ and subdirectories `include` and `portable`. The correct port is automatically d
2020

2121
The `FreeRTOSConfig.h` is usually inside your main crate to match you application and target needs.
2222

23+
Add this snippet to your apps `build.rs`:
2324
```
25+
use std::env;
26+
27+
fn main() {
2428
let mut b = freertos_cargo_build::Builder::new();
29+
30+
// Path to copy of the FreeRTOS kernel "C" code
2531
b.freertos("FreeRTOS/Source");
26-
b.freertos_config("src/freertos");
27-
b.compile().unwrap_or_else(|e| {panic!(e.to_string())});
28-
```
32+
33+
// The `FreeRTOSConfig.h` is usually inside your main crate to match you application and target needs.
34+
b.freertos_config("src");
35+
36+
// set the freertos port dir relativ to the FreeRTOS/Source/portable directory
37+
// "GCC/ARM_CM33_NTZ/non_secure"
38+
// If not set it will be detected based on the current build target (not many targets supported yet)
39+
b.freertos_port("GCC/ARM_CM33_NTZ/non_secure");
40+
41+
// Additional "C" code may optionally compiled beside FreeRTOS using:
42+
// b.get_cc().file("optionalAdditionCode.c");
43+
44+
// Compiles the FreeRTOS "C" Code
45+
b.compile().unwrap_or_else(|e| { panic!(e.to_string()) });
46+
}
2947
3048
### Select FreeRTOS port
3149
See: `freertos_cargo_build::Builder::freertos_port(...)`

0 commit comments

Comments
 (0)