How to resolve the conflict between MCAL xxx_MemMap.h and the third-party MemMap.h?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to resolve the conflict between MCAL xxx_MemMap.h and the third-party MemMap.h?

1,842 Views
ou_gangxun
Contributor II

When I used S32K1xx_MCAL_421_RTM104 to integrate with the third-party BSW source code, I found that the interrupt function declaration of the third-party OS and MCAL conflicted.

This is the MCAL source code:

1.png

 

And this is the third-party OS's declaration of the interrupt function:

2.png

I checked the source code of the two and found that the configuration of new ppredefined symbol for each interrupt function in the Adc_Adc12bsarv2_Irq.c file is the smallest way to change the code content.

Like this:

3.png

Is this okay?
Or is there any other way?

 

0 Kudos
4 Replies

1,802 Views
namnguyenviet
NXP Employee
NXP Employee

Hello @ou_gangxun ,

I would suggest to ask Vector how and why the Memmap files are generated like that. Normally, Vector has implemented the memory mapping generation after the MCAL package is released, i.e. they based on the naming on MCAL file to implement their integrator package. Unfortunately, we don't have Vector integrator package to double check, in my opinion probably their was something wrong in OS configuration.

Regards,

Nam

0 Kudos

1,829 Views
namnguyenviet
NXP Employee
NXP Employee

Hello @ou_gangxun ,

We don't recommend you to modify the MCAL code like that. The integrator should take the responsibilities to generate the Memmap file and put the code into correct memory mapping, as MCAL code has indicated. 

We have rarely see the issue with Memmap file reported by integrator. Could you show me which 3rd integrator are you using for Memmap file generating? I see an probably issue, as in the 3rd party code, the Memmap file header should be "Adc_Memmap.h" instead of "Memmap.h". If  possible, can you send us the whole generation file and Memmap file from 3rd integrator?

Best Regards,

Nam

0 Kudos

1,813 Views
ou_gangxun
Contributor II

Due to our company's policy, the source code cannot be shared.
The BSW software supplier is Vector.

MemMap.h is a file defined by Vector, which contains header files such as Rte_MemMap.h, Os_MemMap.h, etc.

Since the BSW we bought has memory protection, I think the OS module will allocate a special location for its interrupt function (please refer to Annex 1).

However, MCAL puts the interrupt function and the main program function in the same memory segment mcal_text.

That's why I want to modify *_Irq.c

0 Kudos

1,816 Views
ou_gangxun
Contributor II

This reply is discarded。

0 Kudos