This repository was archived by the owner on Nov 30, 2022. It is now read-only.
File tree 8 files changed +23
-132
lines changed
8 files changed +23
-132
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 80
80
DO_FEATURE_MATRIX : true
81
81
run : ./contrib/test.sh
82
82
83
+ Embedded :
84
+ runs-on : ubuntu-latest
85
+ steps :
86
+ - name : Checkout
87
+ uses : actions/checkout@v2
88
+ - name : Checkout Toolchain
89
+ uses : actions-rs/toolchain@v1
90
+ with :
91
+ profile : minimal
92
+ toolchain : stable
93
+ override : true
94
+ components : rust-src
95
+ target : thumbv7m-none-eabi
96
+ - name : Build
97
+ env :
98
+ RUSTFLAGS : " -C link-arg=-Tlink.x"
99
+ run : cd embedded && cargo build --target thumbv7m-none-eabi
100
+
Original file line number Diff line number Diff line change @@ -8,4 +8,7 @@ Cargo.lock
8
8
fuzz /hfuzz_target
9
9
fuzz /hfuzz_workspace
10
10
11
+ # embedded
12
+ embedded /.cargo
13
+
11
14
* ~
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -12,20 +12,6 @@ cortex-m-semihosting = "0.3.3"
12
12
panic-halt = " 0.2.0"
13
13
bitcoin_hashes = { path =" ../" , default-features = false }
14
14
15
- # Uncomment for the panic example.
16
- # panic-itm = "0.4.1"
17
-
18
- # Uncomment for the allocator example.
19
- # alloc-cortex-m = "0.4.0"
20
-
21
- # Uncomment for the device example.
22
- # Update `memory.x`, set target to `thumbv7em-none-eabihf` in `.cargo/config`,
23
- # and then use `cargo build --examples device` to build it.
24
- # [dependencies.stm32f3]
25
- # features = ["stm32f303", "rt"]
26
- # version = "0.7.1"
27
-
28
- # this lets you use `cargo fix`!
29
15
[[bin ]]
30
16
name = " embedded"
31
17
test = false
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
MEMORY
2
2
{
3
- /* NOTE 1 K = 1 KiBi = 1024 bytes */
4
- /* TODO Adjust these memory regions to match your device memory layout */
5
- /* These values correspond to the LM3S6965, one of the few devices QEMU can emulate */
6
3
FLASH : ORIGIN = 0x00000000 , LENGTH = 256 K
7
4
RAM : ORIGIN = 0x20000000 , LENGTH = 64 K
8
5
}
9
-
10
- /* This is where the call stack will be allocated. */
11
- /* The stack is of the full descending type. */
12
- /* You may want to use this variable to locate the call stack and static
13
- variables in different memory regions. Below is shown the default value */
14
- /* _stack_start = ORIGIN (RAM) + LENGTH (RAM); */
15
-
16
- /* You can use this symbol to customize the location of the .text section */
17
- /* If omitted the .text section will be placed right after the .vector_table
18
- section */
19
- /* This is required only on microcontrollers that store some configuration right
20
- after the vector table */
21
- /* _stext = ORIGIN (FLASH) + 0x400; */
22
-
23
- /* Example of putting non-initialized variables into custom RAM locations. */
24
- /* This assumes you have defined a region RAM2 above, and in the Rust
25
- sources added the attribute `#[link_section = ".ram2bss"]` to the data
26
- you want to place there. */
27
- /* Note that the section will not be zero-initialized by the runtime! */
28
- /* SECTIONS {
29
- .ram2bss (NOLOAD) : ALIGN (4) {
30
- *(.ram2bss);
31
- . = ALIGN (4);
32
- } > RAM2
33
- } INSERT AFTER .bss;
34
- */
Original file line number Diff line number Diff line change 4
4
#[ macro_use]
5
5
extern crate bitcoin_hashes;
6
6
7
- // pick a panicking behavior
8
- use panic_halt as _; // you can put a breakpoint on `rust_begin_unwind` to catch panics
9
- // use panic_abort as _; // requires nightly
10
- // use panic_itm as _; // logs messages over ITM; requires ITM support
11
- // use panic_semihosting as _; // logs messages to the host stderr; requires a debugger
12
-
7
+ use panic_halt as _;
13
8
use cortex_m_rt:: entry;
14
9
use cortex_m_semihosting:: { debug, hprintln} ;
15
10
use bitcoin_hashes:: sha256;
@@ -23,7 +18,5 @@ fn main() -> ! {
23
18
24
19
debug:: exit ( debug:: EXIT_SUCCESS ) ;
25
20
26
- loop {
27
- // your code goes here
28
- }
21
+ loop { }
29
22
}
You can’t perform that action at this time.
0 commit comments