qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Better Cortex-M support?


From: Alistair Francis
Subject: Re: [Qemu-devel] Better Cortex-M support?
Date: Thu, 13 Nov 2014 10:11:23 +1000

On Thu, Nov 13, 2014 at 12:23 AM, Liviu Ionescu <address@hidden> wrote:
>
> On 12 Nov 2014, at 15:51, Peter Maydell <address@hidden> wrote:
>
>> ... I'd suggest looking at Alistair's patches
>> on the list for supporting the netduino2,

I figure I will fill you in on what I am trying to do, in case it is any help.

I am trying to model the Netduino Plus 2 (STM32F4xx - Cortex-M4) board
in QEMU. I didn't want to spend time on implementing the Cortex-M4 CPU
as for my use case I don't need it, so out of tree I have the Netduino
Plus 2 with a Cortex-M3. I am trying to get as much of my work
upstreamed to mainline by using the Netduino 2 board (STM32F2xx -
Cortex-M3). There are a few submissions on list and hopefully after
the release of 2.2 it will be accepted.

All of my work can be seen at: https://github.com/alistair23/qemu.
Some of it is specific for my use case (it is aimed as a learning tool
for a University class) so if you need any help understanding what I
did just ask and I am happy to help. Support for the Cortex-M4 would
be great so I will help where I can.

Thanks,

Alistair

>
> will certainly do.
>
> and I also plan to review the patches of Andre Bechus, available from 
> https://github.com/beckus/qemu_stm32.
>
>>> for me, the plain arm-softmmu is not usable, since it forwards the
>>> semihosting calls via gdb instead of using native implementation,
>>> so I had to add a configuration variable to change this behaviour.
>>
>> That sounds like the kind of thing that other people might also
>> want to be able to do, so it would be better to make arm-softmmu
>> be runtime configurable on this, I think.
>
> for the gnuarmeclipse-qemu target, since I never need to forward semihosting 
> to gdb, the solution was to add a configuration variable and statically set 
> it at build time to always use native calls.
>
> --- gdbstub.c ---
> /* If gdb is connected when the first semihosting syscall occurs then use
>    remote gdb syscalls.  Otherwise use native file IO.  */
> int use_gdb_syscalls(void)
> {
> #if !defined(CONFIG_SEMIHOSTING_NATIVE)
>     if (gdb_syscall_mode == GDB_SYS_UNKNOWN) {
>         gdb_syscall_mode = (gdbserver_state ? GDB_SYS_ENABLED
>                                             : GDB_SYS_DISABLED);
>     }
>     return gdb_syscall_mode == GDB_SYS_ENABLED;
> #else
>     // Make semihosting always use native file IO.
>     if (gdb_syscall_mode == GDB_SYS_UNKNOWN) {
>         gdb_syscall_mode = GDB_SYS_DISABLED;
>     }
>     return FALSE;
> #endif
> }
>
> for arm-softmmu you probably need a way to configure this at run-time, which 
> would involve a new monitor command, that can be issued from the GDB client 
> via 'mon XXXX'.
>
> I guess you are not happy with a new gnuarmeclipse-qemu target, but since my 
> experience with arm-softmmu is almost null, I want to avoid breaking anything 
> there.
>
>
> regards,
>
> Liviu
>
>
>



reply via email to

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