You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 6, 2019. It is now read-only.
[](https://travis-ci.org/hackndev/zinc)[](https://waffle.io/hackndev/zinc)
[](https://waffle.io/hackndev/zinc)
2
3
Zinc, the bare metal stack for rust
3
4
===================================
4
5
5
6
## About zinc.rs
6
7
7
-
Zinc is an experimental attempt to write an ARM stack that would be similar to CMSIS or mbed in capabilities but would show rust's best safety features applied to embedded development.
8
+
Zinc is an experimental attempt to write an ARM stack that would be
9
+
similar to CMSIS or mbed in capabilities but would show rust's best
10
+
safety features applied to embedded development.
8
11
9
-
Zinc is mostly assembly-free and completely C-free at the moment. One of the goals of zinc is to figure out, how much of the usual RTOS stack is it possible to write in rust in a safe manner, while keeping the resource usage profile low enough (comparable to C/C++ code).
12
+
Zinc is mostly assembly-free and completely C-free at the moment. One
13
+
of the goals of zinc is to figure out, how much of the usual RTOS
14
+
stack is it possible to write in rust in a safe manner, while keeping
15
+
the resource usage profile low enough (comparable to C/C++ code).
10
16
11
17
Useful links:
12
18
13
19
*[blog](http://zinc.rs/blog)
14
-
*[build stats](http://zinc.rs/stats) (output binary size change over time)
20
+
*[build stats](http://zinc.rs/stats) (output binary size change over
21
+
time)
15
22
*[api docs](http://zinc.rs/apidocs/zinc)
16
23
17
24
## Main features
18
25
19
-
Zinc provides you with *safe* code in terms of rust code safety; accessing hardware directly is *unsafe*, but you can do that as well if you want.
26
+
Zinc provides you with *safe* code in terms of rust code safety;
27
+
accessing hardware directly is *unsafe*, but you can do that as well
28
+
if you want.
20
29
21
-
In addition to *software safety*, zinc provides *hardware safety* with Platform Tree specification; you define the hardware configuration right in the code in simple key-value DSL and compiler verifies that all hardware is configured properly; that also allows to optimize the code to much bigger extent than with conventional RTOSes.
30
+
In addition to *software safety*, zinc provides *hardware safety* with
31
+
Platform Tree specification; you define the hardware configuration
32
+
right in the code in simple key-value DSL and compiler verifies that
33
+
all hardware is configured properly; that also allows to optimize the
34
+
code to much bigger extent than with conventional RTOSes.
35
+
36
+
There is also an effort to generate platform tree specifications for
Zinc supports only ARM at the moment. The primary development is focused on two test boards with NXP LPC1768 and ST STM32F407. Other MCUs will follow when core API is stabilized.
45
+
Some level of support is currently provided for the following
46
+
processor families. Not all peripherals are supported for all
47
+
processors at this time.
48
+
49
+
* NXP lpc11xx
50
+
* NXP lpc17xx
51
+
* Freescale k20
52
+
* ST STM32f4
53
+
* ST STM32l1
54
+
55
+
In the future, a better story will be available that will allow for
56
+
additional processor families, procesors, and boards using those
57
+
processors to be defined more easily.
26
58
27
59
## License
28
60
@@ -32,21 +64,63 @@ Zinc is distributed under Apache-2.0, see LICENSE for more details.
32
64
33
65
### Environment Setup
34
66
35
-
Get a gcc cross-toolchain for arm and make sure it is accessible.
67
+
For the time being, Zinc makes use unstable features of the Rust
68
+
language. As such, we recommend using the latest nightly version of
69
+
Rust for development. As features of the language stabilize over
70
+
time, it is the goal of Zinc to eventually be able to target stable
71
+
versions of the compiler.
72
+
[Multirust](https://github.com/brson/multirust) may be used to manage
73
+
installations of multiple versions of rust on single machine.
74
+
75
+
In addition to rust itself, a GCC cross-toolchain for ARM must be
76
+
installed. Although LLVM is used for a majority of compilation, the
77
+
GCC Linker is still used at this time. The
78
+
[GCCM ARM Embedded toolchain](https://launchpad.net/gcc-arm-embedded/+download)
79
+
works well for most people.
80
+
81
+
### Building Examples Within Zinc
82
+
83
+
There are several examples available within the Zinc source itself.
84
+
Zinc makes use of Cargo for its build system, but it is still necesary
85
+
to provide the build system with a few pieces of information for it to
86
+
properly compile for your target.
36
87
37
-
### Examples
88
+
Namely, cargo must know about and have access to:
38
89
39
-
First, generate a `Makefile` and `.cargo/config` with `configure` so cargo
40
-
can find your toolchain. Your toolchain triple is probably `arm-none-eabi`
0 commit comments