linux-kernel-module-cheat icon indicating copy to clipboard operation
linux-kernel-module-cheat copied to clipboard

Qemu-4.2.0 emulation for basic "hello world"

Open AbhijitInamdar5 opened this issue 4 years ago • 1 comments

Hi,

I was trying to print out "hello world" on terminal(16.04) and using qemu-4.2.0 and toolchain gcc-arm-none-eabi-6-2017-q2-update.

The startup and the linker I used was from : https://github.com/ARM-software/CMSIS_5/tree/5.8.0/Device/ARM/ARMCM3/Source/GCC and my machine on which i want to emulated has 16MB flash and RAM each.

The issue is the output is black screen. How to rectify this?

AbhijitInamdar5 avatar Jul 28 '21 12:07 AbhijitInamdar5

Hi, this is a bit hard to answer. After you got it working with this repo https://github.com/cirosantilli/linux-kernel-module-cheat/tree/32b6d036890eef954dad5b5dd480a36f14890646#baremetal-setup-getting-started start studying how it works here and bisect difference by difference with GDB. Notably, you have to ensure that entry point is correct in the linker script, and that the toolchain stdlib is putting devices at the address tey are expected (notably the TTY) to match QEMU. You have to understand how that toolchain does it. This one use newlib.

cirosantilli avatar Jul 28 '21 12:07 cirosantilli