Hi,

On Wed, Aug 24, 2022 at 11:58 PM Xiang Xiao <xiaoxiang781...@gmail.com>
wrote:

> On Wed, Aug 24, 2022 at 11:38 AM Nathan Hartman <hartman.nat...@gmail.com>
> wrote:
>
> > On Tue, Aug 23, 2022 at 8:33 PM Alan Rosenthal <alan.rosent...@gmail.com
> >
> > wrote:
> >
> > > Hello NuttXers,
> > >
> > > I recently posted an issue to the NuttX Github page:
> > > https://github.com/apache/incubator-nuttx/issues/6896
> > >
> > > I'll summarize my thoughts here.
> > >
> > > Currently NuttX has a C89 requirement. However, there is code in the
> > > codebase today that is not C89 compliant. Rather than reworking
> > > existing code to be C89, we should reevaluate the C89 requirement.
> > >
> > > C99 and C11 have added a lot of language features, and by updating the
> C
> > > standard to a newer version, we will add more tools to the NuttX
> toolbox.
> >
> >
> >
> > Hello Alan,
> >
> > Thanks for sharing your thoughts.
> >
> > I believe one of the big reasons for C89 compliance in the codebase is
> > because NuttX supports a wide range of microcontroller chips, not all of
> > which have a C99 or newer toolchain available.
> >
> >
> Here is the arch supported by NuttX:
> C99
> arm Y
> arm64 Y
> avr Y
> ceva Y
> hc
> mips Y
> misoc
> or1k Y
> renesas Y
> risc-v Y
> sim Y
> sparc Y
> x86 Y
> x86_64 Y
> xtensa Y
> z16
> z80
> I don't know which compiler is used for hc, misoc, z16 and z80, but other
> arches support C99 very well.
> So, the question is whether the C99 requirement will impact these four
> arches.
>

All of the Zilog family CPUs (z8, z16, z80, z180, ez80) use the ZDS-II
development software released by Zilog by default. The C compiler in ZDS-II
is C89 and a C99 requirement will stop the successful build of the z16 and
z80 (z80, z180, ez80 cpu) arches.

Some time ago I contributed the necessary changes for the eZ80 target to
build using an experimental release of clang with Z80 and eZ80 support, but
it's not been sufficient priority for me to either contribute the automated
tests to have it continue to build, nor to even keep reasonably up to date
with NuttX changes, so I can't say for sure that it still builds correctly.
If it does build, then the eZ80 CPU in the z80 arch would at least still be
usable for those willing to use an experimental clang port.

-- 
bje

Reply via email to