We have a custom S32K3 FlexIO driver (C code) that we want to use from a MBDT project, but it's not entirely obvious how to import this code into the project.
The driver code is developed in S32 Design Studio, and works fine on target. But when using the Simulink Code Importer wizard to package the code as a simulink library it halts on not finding the relevant RTD and hardware headers.
I am guessing the the code need to support being built both for the S32 target and as generic hardware-independent version for simulation for the code import to work.
Is there any guidance on how this is best done?
Is there for example any standard define we can use in the code allowing the code to build different depending on the current target (generic x86_64 vs s32)? Or any way to tell Simulink to use different sets of C files during simulation and on target?