[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] QEMU user mode for cortex M
From: |
Peter Maydell |
Subject: |
Re: [Qemu-arm] QEMU user mode for cortex M |
Date: |
Sat, 16 Mar 2019 14:06:36 +0000 |
On Sat, 16 Mar 2019 at 12:01, Alex Bennée <address@hidden> wrote:
> Massimiliano Cialdi <address@hidden> writes:
> > then I try to execute qemu:
> > ~/Downloads/qemu/qemu-3.1.0/arm-softmmu/qemu-system-arm -d
> > unimp,guest_errors -machine virt -monitor null -serial null -semihosting
> > -nographic -semihosting-config enable=on,target=native -kernel
> > main.elf
>
> I don't know what the virt machine defaults to for CPU but I'm fairly
> sure it's not an m-profile CPU.
Default is Cortex-A15. "virt" cannot handle M-profile CPUs.
> > write access to unsupported AArch32 64 bit system register cp:12 opc1: 15
> > crm:8 (non-secure)
> >
> >
> > and nothing happend. Where am I wrong? I'm wrong at the compilation stage,
> > at the execution stage or both? Is there something wrong with the command
> > line parameters? Which one? How do I force a cortex-m4? How can I force the
> > Cpu without having to choose any machine?
>
> It's hard to say without seeing what your test is doing. However I can force
> a cortex-m4 on a microbit and run the following ok:
>
> ./qemu-system-arm -monitor none -display none \
> -chardev file,path=test-armv6m-undef.out,id=output \
> -semihosting -M microbit \
> -cpu cortex-m4 \
> -kernel tests/test-armv6m-undef
> -d in_asm,cpu,nochain
This is also kind of dubious, because the microbit is
really a Cortex-M0 v6M system. In fact I think it
is just ignoring the -cpu argument and giving you the M0
anyway.
thanks
-- PMM