Re: Article: NuttX on Arm Cortex-A53 and PinePhone

2022-08-24 Thread Tomek CEDRO
On Thu, Aug 25, 2022 at 2:05 AM Lee, Lup Yuen wrote:
> NuttX now supports 64-bit Arm Cortex-A53 with Multi-Core SMP... Will it run
> on Pine64's PinePhone? This article explores how we might run NuttX on a
> real phone...
> https://lupyuen.github.io/articles/arm
> Lup

This sounds cool.. but it is relly a lot of work to make bare OS
run on this kind of hardware.. when all drivers are ready, then
application approach needs to be selected, GUI, API, and stuff like
that..

I have been testing Linux based phones for years and it did not even
got into any usable state :-(

But I keep my fingers crossed so we get away from the big tech
monopoly.. and there is Python included :-)

-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info


Article: NuttX on Arm Cortex-A53 and PinePhone

2022-08-24 Thread Lee, Lup Yuen
NuttX now supports 64-bit Arm Cortex-A53 with Multi-Core SMP... Will it run
on Pine64's PinePhone? This article explores how we might run NuttX on a
real phone...

https://lupyuen.github.io/articles/arm

Lup


Re: Reevaluate the C89 Requirement

2022-08-24 Thread Xiang Xiao
On Wed, Aug 24, 2022 at 11:38 AM Nathan Hartman 
wrote:

> On Tue, Aug 23, 2022 at 8:33 PM Alan Rosenthal 
> 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.

I think that we have been getting away with non-C89 compliance in arch- or
> board-specific code in places where it is known that the toolchain(s) used
> with that arch/board do support the newer standard.
>
> Yes, there are places in the code where non-C89 code is being used but
> shouldn't be. I just recently fixed a couple of such cases, such as PR-6853
> [1].
>
> We could find violations of C89 automatically by adding the -std=c89 switch
> when building all shared (non-arch-, non-board-specific files) with GCC
> (and probably clang). (We might need a few additional command line
> switches.)
>
>
But we found that some C99 features(e.g. inline) are very important to
generate efficient code in the recent optimization work. So it's better to
relax the rule to exclude some well supported C99 features.


> Or we could discuss and consider changing the rules. I would be okay with
> that only if we don't have to abandon users who depend on C89 conformance
> or give up support for archs/boards that depend on it because of their
> available toolchains.
>
> [1] https://github.com/apache/incubator-nuttx/pull/6853.
>
> Cheers,
> Nathan
>