Testing NuttX RTOS on Z80 Simulator

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

2 thoughts on “Testing NuttX RTOS on Z80 Simulator

  1. Most of the build breakage is a result of 67ec3d7926d871c515fb1a55a11da8630fe53649 . Support for CONFIG_CAN_PASS_STRUCT was removed because people hated it and because that was a rumor that the problem was fixed in SDCC.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s