qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Point where target instructions are read


From: BALATON Zoltan
Subject: Re: Point where target instructions are read
Date: Thu, 4 Apr 2024 00:35:48 +0200 (CEST)

On Wed, 3 Apr 2024, Gautam Bhat wrote:
On Tue, Apr 2, 2024 at 2:01 AM Richard Henderson
<richard.henderson@linaro.org> wrote:

The boot process must cooperate somehow.

When using loader, you must link the image such that it loads at the pc reset 
address
defined by the architecture manual.


r~

I changed my loading options to the following now to have better control:

./qemu-system-msp430 -machine msp430-launchpad -device
loader,file=simple_test.bin,addr=0xFFFE,cpu-num=0,force
-raw=on -d in_asm,out_asm

Check the docs on the generic loader: https://www.qemu.org/docs/master/system/generic-loader.html I think when using cpu-num it will also set the PC but I don't know much about it. Maybe you could start qemu with -S option then do info registers in QEMU monitor to check the status to find out what's happening. If real board has firmware maybe you need to use that or emulate it in the board code if the boot loader exepects it to be present.

Regards,
BALATON Zoltan

Here simple_test.bin is the raw binary file converted using objcopy.
addr=0xFFFE is the vector location where the PC will load with the
starting address.

Now how do I load the address in that reset vector location and set my
PC? Is there some example code that I can look at?

-Gautam.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]