Skip to content
This repository has been archived by the owner on Jul 6, 2019. It is now read-only.

LPC11xx experimental branch #318

Merged
merged 25 commits into from
Jul 18, 2015
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
9d51d7a
Added very basic cortex-m0 support
farcaller Jun 26, 2015
85e4af9
Added derive(PartialEq) for ioreg enums
farcaller Jun 26, 2015
7f5f0be
Added docattr for ioreg placement getter
farcaller Jun 26, 2015
1bba7f0
Silenced a warning in shared::NoInterrupts
farcaller Jun 26, 2015
aba3c06
Added prologue and filename to svd template
farcaller Jun 26, 2015
497b3b8
Added lpc11xx svd file
farcaller Jun 26, 2015
8034847
Updated volatile_cell to use expectext
farcaller Jun 26, 2015
bdcdfc8
Added basic lpc11xx code
farcaller Jun 26, 2015
c4aada8
volatile_cell replayer is now thread-safe
farcaller Jun 27, 2015
39b90c6
Panic is ISR are switched over to bootloader
farcaller Jun 27, 2015
539584a
Test code in volatile_cell is feature=replayer now
farcaller Jul 9, 2015
2e78f9a
Added layout.ld for lpc, based on lpc1114 values
farcaller Jul 9, 2015
fcc7439
Added software-reset support for peripherals
farcaller Jul 9, 2015
20ca3ea
Switch travis to jenkins build script
farcaller Jul 9, 2015
d6d370f
Remove feature guard from lpc11xx hal
farcaller Jul 9, 2015
cfe69ec
Switch to hackndev fork of rlibc
farcaller Jul 9, 2015
107e7fa
Require feature 'test' to pull in volatile_cell replayer
farcaller Jul 13, 2015
fb37e62
Added missing apidocs
farcaller Jul 13, 2015
43343c0
Build only lib & examples for cross-build
farcaller Jul 13, 2015
a53ab13
Refactored demo apps into crates
farcaller Jul 14, 2015
44a291f
Drop .debug_gdb_scripts section (made binaries too big)
farcaller Jul 18, 2015
1d68e91
Build examples in release mode
farcaller Jul 18, 2015
579fbd1
Fixed a typo module name
farcaller Jul 18, 2015
3ff50d3
Cleaned up layout of hal/mod.rs so feature guards are more obvious
farcaller Jul 18, 2015
8d1e1a2
Added missing isr to cortex-m0
farcaller Jul 18, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Panic is ISR are switched over to bootloader
farcaller committed Jul 9, 2015

Verified

This commit was signed with the committer’s verified signature.
droidmonkey Jonathan White
commit 39b90c6eb27d9cc30fcb92c67aa30e33f85d03e9
20 changes: 16 additions & 4 deletions src/hal/lpc11xx/syscon.rs
Original file line number Diff line number Diff line change
@@ -40,8 +40,8 @@ pub fn get_isr_location() -> ISRLocation {
/// Re-maps interrupt vectors to either RAM or Flash.
pub fn set_isr_location(loc: ISRLocation) {
regs::SYSCON().sysmemremap.ignoring_state().set_map(match loc {
ISRLocation::Bootloader => regs::SYSCON_sysmemremap_map::BOOT_LOADER_MODE_IN,
ISRLocation::RAM => regs::SYSCON_sysmemremap_map::USER_RAM_MODE_INTER,
ISRLocation::Flash => regs::SYSCON_sysmemremap_map::USER_FLASH_MODE_INT,
_ => panic!(),
});
}
@@ -75,6 +75,9 @@ mod test {
use volatile_cell::{VolatileCellReplayer, set_replayer};
use expectest::prelude::*;
use expectest;
use std::thread;
use std::string::String;
use std::convert::From;

#[test]
fn returns_isr_location() {
@@ -98,9 +101,18 @@ mod test {
expect_replayer_valid!();
}

set_isr_location(ISRLocation::Bootloader);

expect_replayer_valid!(replayer);
#[test]
fn fails_to_set_isr_location_to_bootloader() {
let j = thread::Builder::new()
.name(String::from("fails_to_set_isr_location_to_bootloader"))
.spawn(|| {
init_replayer!();
expect_volatile_write!(0x4004_8000, 0);
set_isr_location(ISRLocation::Bootloader);
}).unwrap();
let res = j.join();

expect!(res.is_err()).to(be_equal_to(true));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it can be:

expect!(res).to(be_err());

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, apart from the issue that it was a compiler error for some reason 😄

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

compiler error for some reason

Two hip-hip hoorays for having to track nightlies!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two hip-hip hoorays for having to track nightlies!

Did I tell you that we will need to fork cargo to keep the nightly going? Buy the ticket, take the ride! 🎢

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we will need to fork cargo

because of rust-lang/cargo#1796 ?

}

#[test]