This is a typical problem in larger embedded projects: Data from a text file / database must be hard-coded in C code. The data will change the control flow, table size, etc. Which solution has a choice?
Background: In our (large) firmware, we need to connect hundreds of signals (outputs of state machines) with buses (for example, CAN-bus). We use Simulink / Stateflow as a model-based development tool (state machines) and autocoding.
The connection should scale, do dataype conversions, etc. Usually all information for conversion / connection is stored in a database or file (e.g. dbc-text-file).
Apparently, the usual dynamic method: reading the database and dynamic connection / conversion, respectively, is not indicated if it is necessary to provide a rigid deterministic possibility of real time. This data must be hardcoded.
We did not find a realistic and practical way, besides using the Simulink API: write an external m-code that reads data from a file and automates the "drawing image" of entangeld connections in the Simulink model! It is finally C. automatically coded. Needless to say, this painting-code script - although effective - is not very reusable, supported, etc. I can’t find an effective solution, even accepting: compiler / code generation, model-driven architecture, Autosar, model transformations, into consideration. Building for each external document data of its own compiler, which converts the data into C-code, seems unrealistic ...
? "Simulink" (.. , , modelica)?