bare-metal

AWS EC2: cannot get bare metal instance

北慕城南 提交于 2020-06-16 17:27:27
问题 I have tried several times in the last two weeks to log on to a c5.metal instance. Each time I get "Initializing" in the status checks field, but after 10 minutes it is still "Initializing" and I'm not able to log on. I have had success with c5.metal before, but not any more. Today I also tried to get an m5.metal instance. This time the instance successfully initialized after 10 minutes but I was not able to log on with Putty. I stopped the instance, then after about 30 minutes I tried again

AWS EC2: cannot get bare metal instance

爱⌒轻易说出口 提交于 2020-06-16 17:27:10
问题 I have tried several times in the last two weeks to log on to a c5.metal instance. Each time I get "Initializing" in the status checks field, but after 10 minutes it is still "Initializing" and I'm not able to log on. I have had success with c5.metal before, but not any more. Today I also tried to get an m5.metal instance. This time the instance successfully initialized after 10 minutes but I was not able to log on with Putty. I stopped the instance, then after about 30 minutes I tried again

How to prevent “main.o:(.eh_frame+0x1c): relocation truncated to fit: R_AARCH64_PREL32 against `.text'” when creating an aarch64 baremetal program?

三世轮回 提交于 2020-04-07 07:39:53
问题 When playing with creating baremetal executables, I hit this error: main.o:(.eh_frame+0x1c): relocation truncated to fit: R_AARCH64_PREL32 against `.text' collect2: error: ld returned 1 exit status I then managed to create a minimal reproduction example: main.c void _start(void) {} notmain.S .skip 32 link.ld ENTRY(_start) SECTIONS { .text : { */bootloader.o(.text) *(.text) *(.rodata) *(.data) *(COMMON) } .bss : { *(.bss) } heap_low = .; . = . + 0x1000000; heap_top = .; . = . + 0x1000000;

How to prevent “main.o:(.eh_frame+0x1c): relocation truncated to fit: R_AARCH64_PREL32 against `.text'” when creating an aarch64 baremetal program?

那年仲夏 提交于 2020-04-07 07:39:30
问题 When playing with creating baremetal executables, I hit this error: main.o:(.eh_frame+0x1c): relocation truncated to fit: R_AARCH64_PREL32 against `.text' collect2: error: ld returned 1 exit status I then managed to create a minimal reproduction example: main.c void _start(void) {} notmain.S .skip 32 link.ld ENTRY(_start) SECTIONS { .text : { */bootloader.o(.text) *(.text) *(.rodata) *(.data) *(COMMON) } .bss : { *(.bss) } heap_low = .; . = . + 0x1000000; heap_top = .; . = . + 0x1000000;

Remote debugging HiFive Unleashed in QEMU

丶灬走出姿态 提交于 2020-01-24 19:31:08
问题 I'm trying to get remote debugging working in QEMU for the sifive_u machine. All tools are from the Arch Linux repositories: ➜ qemu-system-riscv64 --version QEMU emulator version 4.2.0 Copyright (c) 2003-2019 Fabrice Bellard and the QEMU Project developers ➜ riscv64-linux-gnu-gdb --version GNU gdb (GDB) 8.3.1 Copyright (C) 2019 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and

llvm optimizes with library functions

女生的网名这么多〃 提交于 2019-12-30 09:51:53
问题 Starting with code like this void lib_memset( unsigned char *dest, unsigned char c, unsigned int n) { while(n--) { *dest=c; dest++; } } using llvm as a cross compiler clang -Wall -m32 -emit-llvm -fno-builtin --target=arm-none-eabi -c lib_memset.c -o lib_memset.bc opt -std-compile-opts -strip-debug -march=arm -mcpu=mpcore -mtriple=arm-none-eabi lib_memset.bc -o lib_memset.opt.bc llc -march=arm -mcpu=mpcore -disable-simplify-libcalls lib_memset.opt.bc -o lib_memset.opt.s llc -march=arm -mcpu

llvm optimizes with library functions

爷,独闯天下 提交于 2019-12-30 09:51:29
问题 Starting with code like this void lib_memset( unsigned char *dest, unsigned char c, unsigned int n) { while(n--) { *dest=c; dest++; } } using llvm as a cross compiler clang -Wall -m32 -emit-llvm -fno-builtin --target=arm-none-eabi -c lib_memset.c -o lib_memset.bc opt -std-compile-opts -strip-debug -march=arm -mcpu=mpcore -mtriple=arm-none-eabi lib_memset.bc -o lib_memset.opt.bc llc -march=arm -mcpu=mpcore -disable-simplify-libcalls lib_memset.opt.bc -o lib_memset.opt.s llc -march=arm -mcpu

Linker Script: Put a particular file at a later position

浪尽此生 提交于 2019-12-23 06:06:38
问题 I'd like to write a linker script looking something like this: SECTIONS { . = 0x0; .startup . : { startup.o(.text) } .text : { *(.text) } .data : { *(.data) } .bss : { *(.bss COMMON) } . = 0x4000; other.text : { other.o(.text) } other.data : { other.o(.data) } other.bss : { other.o(.bss) } } My intention here is to have, in this order: a section with the .text from startup.o .text , .data and .bss containing those sections from all other input files besides other.o the .text , .data and .bss

How to setup ARM interrupt vector table branches in C or inline assembly?

◇◆丶佛笑我妖孽 提交于 2019-12-22 05:26:06
问题 Can someone please show me an example of how to setup an ARM9 interrupt vector table using C or inline assembly in a bare-metal environment with no RTOS or Linux OS? Specifically how can I use inline assembly or C to set branches to my IRQ interrupt handler ISR coded in C? /// timer1 64-bit mode interrupt handler connected to TINT2 interrupt=#34 /// \todo I think I need to ACK it once I get working interrupt void interruptHandlerTimer1(void) { printf("\n [* ISR *] \n"); // ACK TINT2 interrupt

UART communication in Gem5 with ARM Bare-metal

依然范特西╮ 提交于 2019-12-20 02:35:36
问题 I am currently working with Gem5 and I have to access via UART from my Host to ARMv8 bare-metal option, so i tried lots way but i stocked yet. could you please let me know, how can i map my host's Serial port to ARMv8's Serial Port in bare-metal type programming. Any help would be appreciated 回答1: Working setups This repository contains a highly automated working example. Features: works on both QEMU and gem5 works on both arm and aarch64 newlib allows using the standard C library optionally