This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Application and Firmware Separation in Cortex M4

Hi Guys

I'm busy with a massive project where I need write software for a control system for an automotive vehicle. Here's what I am using:

1. I'm using an STM32F4 for the micro
2. I am writing the Application (Control app) in Matlab Simulink. I then generate Cortex M4 optimised code from Matlab which I simply Include in my Keil uVision Project. (Works like a charm)
3. I manually write software for the driver layer and to interface to the Hardware abstraction Layer.

I would like to maintain separation between my Simulink Generated Code and my 'firmware' hand written code. Essentially, I want to be able to change the firmware without affecting my control application.

I would like to use a configuration file to map the variables that Matlab Simulink generates with my Hardware Registers (for GPIO, for instance). I would like to do this via a configuration file (e.g. via an xml file).

Has anyone ever done something like this and is it even possible. I'm looking for an elegant solution that does not consume a lot of RAM.

Thanks so much!

PS: Is it possible to declare variables in your code based on variables names that are stored in say an .xml or .txt file.

So if in the .txt file I have "Pressure_Sensor = 0", is it possible, perhaps using a Macro Definition, to declare a variable in the code: Pressure_Sensor = 0;

Parents Reply Children
No data