* 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>
36 lines
1.1 KiB
Rust
36 lines
1.1 KiB
Rust
// Copyright 2020 Google LLC
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
#![no_std]
|
|
|
|
extern crate alloc;
|
|
extern crate lang_items;
|
|
|
|
libtock_core::stack_size! {0x800}
|
|
|
|
use alloc::vec::Vec;
|
|
use core::fmt::Write;
|
|
use libtock_drivers::console::Console;
|
|
|
|
fn main() {
|
|
writeln!(Console::new(), "****************************************").unwrap();
|
|
for i in 0.. {
|
|
writeln!(Console::new(), "Allocating {} bytes...", 1 << i).unwrap();
|
|
let x: Vec<u8> = Vec::with_capacity(1 << i);
|
|
writeln!(Console::new(), "Allocated!").unwrap();
|
|
drop(x);
|
|
writeln!(Console::new(), "Dropped!").unwrap();
|
|
}
|
|
}
|