I decided to do a small test to see if we could run NuttX on Z80.

First I download and compiled to z80sim from here:
https://www.autometer.de/unix4fun/z80pack/ftp/

Then I installed the SDCC compile:

$ sudo apt install sdcc

Then on NuttX I configured to use the z80sim profile:

$ ./tools/configure.sh z80sim:nsh

It resulted on errors in the build system that I fixed and submitted to mainline:

https://github.com/apache/incubator-nuttx/pull/5233

After that the compilation starts, but it is failing because some files are not compatible with SDCC:

$ make
...
CC: clock/clock_initialize.c
/home/user/nuttxspace/nuttx/include/signal.h:333: error 97: SDCC cannot pass structure '_value' as function argument
/home/user/nuttxspace/nuttx/include/signal.h:428: error 97: SDCC cannot pass structure '_value' as function argument
/home/user/nuttxspace/nuttx/include/signal.h:428: error 97: SDCC cannot pass structure '_value' as function argument
/home/user/nuttxspace/nuttx/include/nuttx/sched.h:405: syntax error: token -> '}' ; column 3
make[1]: *** [Makefile:57: clock_initialize.rel] Error 1
make[1]: Leaving directory '/home/user/nuttxspace/nuttx/sched'
make: *** [tools/LibTargets.mk:59: sched/libsched.lib] Error 2

Let see if we get these files fixed and eventually get NuttX running on Z80 Simulator