File tree 2 files changed +26
-3
lines changed
2 files changed +26
-3
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,11 @@ fn main() {
41
41
// The `FreeRTOSConfig.h` is usually inside your main crate to match you application and target needs.
42
42
b.freertos_config("src");
43
43
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
+
44
49
// Additional "C" code may optionally compiled beside FreeRTOS using:
45
50
// b.get_cc().file("optionalAdditionCode.c");
46
51
Original file line number Diff line number Diff line change @@ -20,12 +20,30 @@ and subdirectories `include` and `portable`. The correct port is automatically d
20
20
21
21
The ` FreeRTOSConfig.h ` is usually inside your main crate to match you application and target needs.
22
22
23
+ Add this snippet to your apps ` build.rs ` :
23
24
```
25
+ use std::env;
26
+
27
+ fn main() {
24
28
let mut b = freertos_cargo_build::Builder::new();
29
+
30
+ // Path to copy of the FreeRTOS kernel "C" code
25
31
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
+ }
29
47
30
48
### Select FreeRTOS port
31
49
See: `freertos_cargo_build::Builder::freertos_port(...)`
You can’t perform that action at this time.
0 commit comments