-
Notifications
You must be signed in to change notification settings - Fork 100
Conversation
Refactor LPC17xx to use `ioregs!` Reviewed-by:
Refactor LPC17xx to use `ioregs!` Reviewed-by:
Refactor LPC17xx to use `ioregs!` Reviewed-by:
Refactor LPC17xx to use `ioregs!` Reviewed-by:
Refactor LPC17xx to use `ioregs!` Reviewed-by:
Refactor LPC17xx to use `ioregs!` Reviewed-by:
Maybe this is where bors died? |
4d8b54c
to
a3d00c6
Compare
@bharrisau despite the fact that we never asked bors to do anything with this branch? |
Don't know - the last commit had a pile of bors messages. |
This is still in-progress, correct? |
@bharrisau yeah, I was planning on focusing my energies on the K20 port which I can more easily test. This can serve as a starting point for someone with LPC17xx hardware though. |
Looking at the size stats the binaries are getting bigger, ioregs!() is not getting optimised enough? |
@farcaller hmm, that's concerning. Let me have a look. |
Consider the following example, #![feature(phase, asm)]
#![crate_type="staticlib"]
#![no_std]
extern crate core;
extern crate zinc;
use core::option::Some;
use zinc::hal::lpc17xx::pin;
use zinc::hal::pin::GPIO;
#[no_split_stack]
#[no_mangle]
pub fn main() {
let led = pin::Pin::new(pin::Port0, 16, pin::GPIO, Some(zinc::hal::pin::Out));
led.set_high();
led.set_low();
unsafe { asm!("nop") }
} Before
After
Note the repeated |
wanted to dump line numbers, figured out that debug info is broken once again in rust-lang/rust#15156 |
Ok, the split is what I've expected:
vs.
You do read-modify-write where you don't need it, the reg is write-only. |
@farcaller ahhh, of course. Silly me. Indeed marking them |
I'll close this one as lpc17xx ioregs will be based on svd |
This is the beginning of the port of LPC17xx to the new
ioregs!
infrastructure.