As an instructional task to understand a fairly complex C control-software tree, I’m modifying a flight simulator (autonomous underwater glider) to run on an ubuntu 20.04 laptop. The current simulator that I’m starting from is configured to run on a stm32L4xx board, and has the commercially licensed OpenRTOS running along with a Wittenstein CONNECT FAT-16/FAT-32 filesystem. The build I’m working on will remove any linking to stm32 and Wittenstein fs source or drivers. The build is executed via recursion make; I’ve modified a litany of makefiles and helper *.mk files, and have the following steps mapped to construct the build:
Customize drivers to work with FreeRTOS-linux architecture, modify gpio and uarts to accept real and simulated inputs.
Client-side simulation with a pty terminal such as posix-openpt, pts, etc. Use the drivers to replace the Hardware Abstaction Layer (HAL) with linux read/write calls.
Having done some embedded work on a beaglebone black, I understand much of the pieces-parts; I’m interested in any tips or guidance from a relative beginner-level understanding of how to bring together this kind of build. The simulator source is significantly more complex than what I’ve previously worked with.