Bump Tock kernel version (#374)
* Bump Tock kernel version * Update boards to new kernel * Update patches to new kernel * Update PR template * Bump libtock-rs * Use new layout from libtock-rs * Fix clippy warnings due to updated toolchain * Fix new toolchain file format * Bump elf2tab to v0.7.0 * Fix worklow and setup.sh script to use the TOML rust-toolchain file * New libtock-rs style of declaring the stack. * Fix padding in layout file. The layout from libtock-rs generates invalid flash padding. The value is 32-bit and therefore setting padding to 0xff yields 0xff000000 instead of 0xffffffff that we want. * adds tock patch for app break hard fault * sets in deploy, removed patch 04-mpu-fix * fixed the if deploy * fixes indentation * updates board names in install.md * fix docs and deploy style Co-authored-by: Fabian Kaczmarczyck <kaczmarczyck@google.com> Co-authored-by: kaczmarczyck <43844792+kaczmarczyck@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
c2b3aeca88
commit
c1f2551d0d
@@ -4,7 +4,8 @@ use cortexm4;
|
||||
use kernel::debug;
|
||||
use kernel::debug::IoWrite;
|
||||
use kernel::hil::led;
|
||||
use kernel::hil::uart::{self, Configure};
|
||||
use kernel::hil::uart;
|
||||
use kernel::hil::uart::Configure;
|
||||
use nrf52840::gpio::Pin;
|
||||
|
||||
use crate::CHIP;
|
||||
@@ -41,7 +42,10 @@ impl IoWrite for Writer {
|
||||
fn write(&mut self, buf: &[u8]) {
|
||||
match self {
|
||||
Writer::WriterUart(ref mut initialized) => {
|
||||
let uart = unsafe { &mut nrf52840::uart::UARTE0 };
|
||||
// Here, we create a second instance of the Uarte struct.
|
||||
// This is okay because we only call this during a panic, and
|
||||
// we will never actually process the interrupts
|
||||
let uart = nrf52840::uart::Uarte::new();
|
||||
if !*initialized {
|
||||
*initialized = true;
|
||||
uart.configure(uart::Parameters {
|
||||
@@ -88,8 +92,8 @@ impl IoWrite for Writer {
|
||||
/// Panic handler
|
||||
pub unsafe extern "C" fn panic_fmt(pi: &PanicInfo) -> ! {
|
||||
// The nRF52840DK LEDs (see back of board)
|
||||
const LED1_PIN: Pin = Pin::P0_13;
|
||||
let led = &mut led::LedLow::new(&mut nrf52840::gpio::PORT[LED1_PIN]);
|
||||
let led_kernel_pin = &nrf52840::gpio::GPIOPin::new(Pin::P0_13);
|
||||
let led = &mut led::LedLow::new(led_kernel_pin);
|
||||
let writer = &mut WRITER;
|
||||
debug::panic(
|
||||
&mut [led],
|
||||
|
||||
Reference in New Issue
Block a user