Skip to content
This repository was archived by the owner on Jan 24, 2022. It is now read-only.

Commit 186b415

Browse files
committed
v0.1.2
1 parent a83fc5b commit 186b415

File tree

3 files changed

+28
-20
lines changed

3 files changed

+28
-20
lines changed

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased]
99

10+
## [v0.1.2] - 2017-04-22
11+
12+
### Changed
13+
14+
- Unclutter the `reset_handler` function for a better debugging experience.
15+
1016
## [v0.1.1] - 2017-04-15
1117

1218
### Changed
@@ -17,5 +23,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1723

1824
Initial release
1925

20-
[Unreleased]: https://github.com/japaric/cortex-m-rt/compare/v0.1.1...HEAD
26+
[Unreleased]: https://github.com/japaric/cortex-m-rt/compare/v0.1.2...HEAD
27+
[v0.1.2]: https://github.com/japaric/cortex-m-rt/compare/v0.1.1...v0.1.2
2128
[v0.1.1]: https://github.com/japaric/cortex-m-rt/compare/v0.1.0...v0.1.1

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ keywords = ["arm", "cortex-m", "runtime", "startup"]
66
license = "MIT OR Apache-2.0"
77
name = "cortex-m-rt"
88
repository = "https://github.com/japaric/cortex-m-rt"
9-
version = "0.1.1"
9+
version = "0.1.2"
1010

1111
[dependencies]
1212
r0 = "0.2.1"

src/lib.rs

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -163,34 +163,35 @@ mod lang_items;
163163
#[cfg(feature = "exceptions")]
164164
use cortex_m::exception;
165165

166+
extern "C" {
167+
// NOTE `rustc` forces this signature on us. See `src/lang_items.rs`
168+
fn main(argc: isize, argv: *const *const u8) -> isize;
169+
170+
// Boundaries of the .bss section
171+
static mut _ebss: u32;
172+
static mut _sbss: u32;
173+
174+
// Boundaries of the .data section
175+
static mut _edata: u32;
176+
static mut _sdata: u32;
177+
178+
// Initial values of the .data section (stored in Flash)
179+
static _sidata: u32;
180+
}
181+
166182
/// The reset handler
167183
///
168184
/// This is the entry point of all programs
169185
unsafe extern "C" fn reset_handler() -> ! {
170-
extern "C" {
171-
static mut _ebss: u32;
172-
static mut _sbss: u32;
173-
174-
static mut _edata: u32;
175-
static mut _sdata: u32;
176-
177-
static _sidata: u32;
178-
}
179-
180186
::r0::zero_bss(&mut _sbss, &mut _ebss);
181187
::r0::init_data(&mut _sdata, &mut _edata, &_sidata);
182188

183-
// NOTE `rustc` forces this signature on us. See `src/lang_items.rs`
184-
extern "C" {
185-
fn main(argc: isize, argv: *const *const u8) -> isize;
186-
}
187-
188-
// Neither `argc` or `argv` make sense in bare metal contexts so we just
189+
// Neither `argc` or `argv` make sense in bare metal context so we just
189190
// stub them
190191
main(0, ::core::ptr::null());
191192

192-
// If `main` returns, then we go into "reactive" mode and attend interrupts
193-
// as they occur.
193+
// If `main` returns, then we go into "reactive" mode and simply attend
194+
// interrupts as they occur.
194195
loop {
195196
#[cfg(target_arch = "arm")]
196197
asm!("wfi" :::: "volatile");

0 commit comments

Comments
 (0)