robertobucher / pysimCoder

Block diagram editor and real time code generator for Python
GNU General Public License v3.0
142 stars 31 forks source link

CodeGen/nuttx: more makefiles tuning to support RISC-V (ESP32C3). #41

Closed ppisa closed 2 years ago

ppisa commented 2 years ago

The pysimCoder models generation for NuttX target has been tested only for ARM based targets till now.

RISC-V does not support -mlong-calls option which is used on ARM targets to generate code which can be relocated to call NuttX system exported symbols when model is build as standalone application. Check for option availability before its use.

Then ESP32C3 environment exported by NuttX specifies multiple linker scripts which should be used. Be prepare for more than one of them.

The last, nuttx-export/startup/esp32c3_head.o file has to be included into whole NuttX image linking command. It should be specified in Make.defs HEAD_OBJ. It is missing there for now and Make.defs has to be tuned manually.

Signed-off-by: Pavel Pisa pisa@cmp.felk.cvut.cz