浏览代码

base-station: Create empty software project.

父节点
当前提交
dcd505b667
共有 5 个文件被更改,包括 37 次插入1 次删除
  1. 1
    0
      .gitignore
  2. 19
    1
      README.md
  3. 5
    0
      base-station/software/Cargo.lock
  4. 9
    0
      base-station/software/Cargo.toml
  5. 3
    0
      base-station/software/src/main.rs

+ 1
- 0
.gitignore 查看文件

@@ -25,3 +25,4 @@ fp-info-cache*
25 25
 
26 26
 # Rust
27 27
 display/firmware/target
28
+base-station/software/target

+ 19
- 1
README.md 查看文件

@@ -5,10 +5,28 @@ This repository contains the description of a number of smart home devices as we
5 5
 
6 6
 # Compiling
7 7
 
8
-Compiling the base station firmware requires a rust toolchain for ARMv6m:
8
+Compiling the display firmware requires a rust toolchain for ARMv6m:
9 9
 
10 10
     rustup target add thumbv6m-none-eabi
11 11
 
12
+Compiling the base station software depends on the targeted board. The following steps can be used to cross-compile the software for an ARMv7 target from a Fedora host:
13
+
14
+1. Install the toolchain:
15
+
16
+        sudo dnf copr enable lantw44/arm-linux-gnueabi-toolchain
17
+        sudo dnf install arm-linux-gnueabi-gcc.x86_64
18
+        rustup target add arm-unknown-linux-gnueabi
19
+
20
+2. Configure Rust to use the ARM GCC:
21
+
22
+        cat > ~/.cargo/config
23
+        [target.arm-unknown-linux-gnueabi]
24
+        linker = "arm-linux-gnueabi-gcc"
25
+
26
+3. Compile the software using the newly installed toolchain:
27
+
28
+        cargo build --target=arm-unknown-linux-gnueabi
29
+
12 30
 # License
13 31
 
14 32
 The hardware contained in this repository is licensed under the [CERN Open Hardware Licence Version 2 - Weakly Reciprocal](cern_ohl_w_v2.txt), and the software is licensed under the [GNU General Public License v3](gpl-3.0.md).

+ 5
- 0
base-station/software/Cargo.lock 查看文件

@@ -0,0 +1,5 @@
1
+# This file is automatically @generated by Cargo.
2
+# It is not intended for manual editing.
3
+[[package]]
4
+name = "base-station"
5
+version = "0.1.0"

+ 9
- 0
base-station/software/Cargo.toml 查看文件

@@ -0,0 +1,9 @@
1
+[package]
2
+name = "base-station"
3
+version = "0.1.0"
4
+authors = ["Mathias Gottschlag <mgottschlag@gmail.com>"]
5
+edition = "2018"
6
+
7
+# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
8
+
9
+[dependencies]

+ 3
- 0
base-station/software/src/main.rs 查看文件

@@ -0,0 +1,3 @@
1
+fn main() {
2
+    println!("Hello, world!");
3
+}

正在加载...
取消
保存