May 21, 2020

How the mount computer boots

Most especially, how does the simulink servo model get loaded as part of the boot process.

VxWorks supports incremental loading. So, the servo model does not get linked into the file "mount.o" as you might expect. It is kept separate and is linked separately.

Here are the sections relevant to loading:
#cd "/home/tom/VwX86/mount/src"
ld <mount.o

# simulink support libraries
ld <rtwlib.o
ld <extlib.o
ld <dsplib.o

# simulink model
# (old simulink servo)
# "use_old_raw_way" is default, and must
# be set at boot time.
#ld <el_servo5.o

# simulink model
# (NEW simulink servo)
ld <el_servo.o
use_new_raw_way

ld <rtw.o
rtw_wind 0.0

start_simulink_servos = 1

The file mount.o is loaded first and contains the bulk of the mount code. The simulink libraries and packages get loaded on top of it, and will reference symbols (routines and variables) defined in mount.o. It also references symbols in the three support libraries.

The rtw.o file is a "hack". It exists to allow a single parameter (rtw_wind) inside of el_servo.o to be modified at run time. This parameter injects simulated wind. When the parameter is 0.0, this is simply doing nothing.