qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v9 00/10] 8bit AVR cores


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v9 00/10] 8bit AVR cores
Date: Tue, 5 Jul 2016 21:39:32 +0100

On 5 July 2016 at 21:31, Michael Rolnik <address@hidden> wrote:
> Hi Peter,
>
> <quote>
>     You're probably better off having the device in one
>     patch and the board model in another, rather than combining them.
>
>     Generally, device models don't live in hw/<arch>, only board
>     models. Put the device model in the appropriate subdirectory
>     of hw/, which is 'misc' for this one.
>
>     So what actually is this device? Is it something that
>     corresponds to real hardware, or to some other emulator's
>     debug/test device, or something we've just made up?
>     This is a good place to put a comment answering this kind of
>     question (with links or references to documentation if relevant).
> </quote>
>
> as far as I understand from AVR specs each board has its own mapping of IO
> registers, so this sample_io device is a part of the board itself.
> Generally a device, as I see it, can be put on any board regardless of CPU,
> here in AVR some IO registers are mapped into CPU registers.
> So it makes it a part of the architecture itself.

Do you have a link to the specs that define how this works?

> <quote>
>     If you order things the other way up you won't need all these
>     forward declarations.
> </quote>
>
> I am compiling on MAC, and gcc/clang keeps complaining that the function do
> not have declaration, regardless of their order.

This sounds like you haven't been marking functions local
to the file as "static". The compiler will complain if
you have a function that's not static and doesn't have a
prototype, because it expects you to have put a prototype
in a header so other source files can access it.

thanks
-- PMM



reply via email to

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