On Mon, 28 Apr 2025 at 18:24, 小马驹 <1353455...@qq.com> wrote:
> Peter Maydell wrote:
>> The UARTs on that board work fine. The error message means your
>> guest code took a fatal exception (i.e. it crashed). You should
>> start by debugging to find out why the crash happened, which
>> might or might not be related to the UARTs specifically.

> But I just write getchar() in the demo's main_blinky() function
> without any other order, I just keep the original UART address
> configuration in demo and annotation other codes, however, the
> error still occurred. The program can enter the main_blinky()
> successfully but can't excute getchar().

When I say "guest code" I don't mean just "the three lines
of code you wrote in the main function", I mean the entire
guest image:
 * your code
 * the RTOS/support libraries/etc
 * the configuration, e.g. which machine it was built for

Something in there is probably wrong (e.g. perhaps you're
using an RTOS setup that's configured for the wrong board
or that thinks the UART is at the wrong address, or perhaps
the RTOS is trying to use a non-UART device that QEMU
doesn't emulate). The first step is the same: you need
to debug the guest image to find out why it's hitting an
exception.

thanks
-- PMM

Reply via email to