I have the same problem with "Invalid index" error during building example models for stm32 target. I tested with Matlab 2018b, STM32MatTarget 4.4.2, Simulink 9.2 may 24 2018. Even simple model won't build. Other targets are ok. I hope this issue can...