Declaring constants as calibrations via Simulink.Parameter for use in FreeMaster and/or CANape

cancel
Showing results for 
Search instead for 
Did you mean: 

Declaring constants as calibrations via Simulink.Parameter for use in FreeMaster and/or CANape

Jump to solution
527 Views
chrisc1
Contributor III

Good morning,

I am looking to find a way to carry on using Simulink constant blocks as calibrations in the NXP S32K14x toolchain via MBDT. I have used the method for several platforms like dSpace, Delphi etc.

In the examples I have seen so far, FreeMaster utilises the Data Write, Store, Read blocks for signals that can be manipulated.

What I would like to understand is if the calibrations I have built via Simulink.Parameter objects and appear in the *.MAP file can be imported in FreeMaster and manipulated. I have built a model with the examples below.

    HALc_Di_IgnP2_Sw_bool_OvrVal_bool = Simulink.Parameter;
    HALc_Di_IgnP2_Sw_bool_OvrVal_bool.Value = 0;
    HALc_Di_IgnP2_Sw_bool_OvrVal_bool.Description = 'Override value';
    HALc_Di_IgnP2_Sw_bool_OvrVal_bool.DocUnits = 'bool';
    HALc_Di_IgnP2_Sw_bool_OvrVal_bool.DataType = 'boolean';
    HALc_Di_IgnP2_Sw_bool_OvrVal_bool.Max = 1;
    HALc_Di_IgnP2_Sw_bool_OvrVal_bool.Min = 0;
    HALc_Di_IgnP2_Sw_bool_OvrVal_bool.CoderInfo.StorageClass = 'Auto';

The parameter appears in the *.MAP file after the build completes:

0x2000001d                HALc_Di_IgnP2_Sw_bool_OvrVal_bool

I looked through the documentation and menu structure of FreeMaster, however I am not fully sure how to start testing with my new calibrations that are placed in the memory addresses. My objective is to retain the same models and scripts that I have used over time, as well as the models where all my calibrations are as Constant blocks. Hence I would be looking for a way in FreeMaster to import an *.ELF file or otherwise reading the addresses that are populated.

Thank you. I hope my query is well explained.

Tags (1)
0 Kudos
1 Solution
342 Views
iulian_stan
NXP Employee
NXP Employee

Hi chrisc@rmlgroup.com‌,

If I understood it right, you want to access (monitor/control) your calibration data via the FreeMASTER tool. If so, you need to do the following:

  1. load your variables via the elf/map file
  2. define FreeMASTER project variables based in the information obtained from the previous step
  3. add variables to Variable Watch widget

These steps are covered in the following video  Video Link : 8895 (starting at 2:41). 

Note: this applies if you added and configured the FreeMASTER block from MBDT toolbox.

Hope this helps,

Iulian

View solution in original post

0 Kudos
3 Replies
342 Views
chrisc1
Contributor III

Thank you for the help. Much appreciated.

The video was useful and I was quite close. I had seen the Project --> Options --> MAP files tab, but didn't know the Variables List --> New would automatically see what is imported. I will link that video in our internal documentation that I'm building up.

Now I will re-do some of my builds moving all objects from main workspace to model workspace and test from there.

Thanks

Best regards

Chris

0 Kudos
342 Views
dumitru-daniel_
NXP Employee
NXP Employee

++ iulianstan

++ MichalH

Options?

0 Kudos
343 Views
iulian_stan
NXP Employee
NXP Employee

Hi chrisc@rmlgroup.com‌,

If I understood it right, you want to access (monitor/control) your calibration data via the FreeMASTER tool. If so, you need to do the following:

  1. load your variables via the elf/map file
  2. define FreeMASTER project variables based in the information obtained from the previous step
  3. add variables to Variable Watch widget

These steps are covered in the following video  Video Link : 8895 (starting at 2:41). 

Note: this applies if you added and configured the FreeMASTER block from MBDT toolbox.

Hope this helps,

Iulian

View solution in original post

0 Kudos