debug = 2
debug-assertions = true
incremental = false
-#opt-level = 3
+opt-level = 3
overflow-checks = true
# cargo build/run --release
} INSERT BEFORE .text;
SECTIONS {
+ .kheap (NOLOAD) : ALIGN(4) {
+ *(.kheap);
+ . = ALIGN(4);
+ } > SRAM4
+} INSERT AFTER .bss;
+
+SECTIONS {
.kgram1 : {
*(.kgram1);
. = ALIGN(4);
__skgram2 = ADDR(.kgram2);
__ekgram2 = ADDR(.kgram2) + SIZEOF(.kgram2);
__lkgram2 = LOADADDR(.kgram1);
-} INSERT AFTER .bss;
-
-SECTIONS {
- .kheap (NOLOAD) : ALIGN(4) {
- *(.kheap);
- . = ALIGN(4);
- } > RAM
} INSERT AFTER .bss;
\ No newline at end of file
use allocator::init_allocator;
use bsp::entry;
use console::init_console;
-use cortex_m_rt::pre_init;
use doa_hallonbrod as bsp;
use embedded_hal::digital::v2::OutputPin;
use peripherals::{init_peripherals, with_peripherals, with_usb};
use usbd_human_interface_device::page::Keyboard;
use usbd_human_interface_device::UsbHidError;
-#[pre_init]
-unsafe fn pre_init() {
- extern "C" {
- static mut __skgram1: u32;
- static mut __ekgram1: u32;
- static mut __lkgram1: u32;
- }
-
- r0::init_data(&mut __skgram1, &mut __ekgram1, &mut __lkgram1);
+extern "C" {
+ static mut __skgram1: u32;
+ static mut __ekgram1: u32;
+ static mut __lkgram1: u32;
}
#[entry]
fn main() -> ! {
+ unsafe {
+ r0::init_data(&mut __skgram1, &mut __ekgram1, &mut __lkgram1);
+ }
+
init_allocator();
init_peripherals();
init_console();
.manufacturer("The Dominion of Awesome")
.product("Smorgasboard")
.serial_number("LOLBUTTS")
+ .composite_with_iads()
.build();
critical_section::with(|cs| {