I am trying to use the Fee APIs on S32K344. I am building my model on Simulink with MBDT version 1.4. Since there is no support for NVM in the toolbox, I am trying to call the C functions through MATLAB function blocks. I had asked a similar question here which was solved for MBDT version 1.3.
I am trying to follow similar steps but I am getting errors before I can even call the required Fee and MemAcc functions. On S32 Design Studio version 3.5 there is an example project for Fee which builds and flashes perfectly on my S32K344 board. I am replicating the configurations for the MemAcc, Mem_43_InFls and Fee components in the MCAL layer and the Cache_Ip in the Drivers since Cache is being used in one of the settings of Mem_43_InFls - specifically the "Mem Synchronize Cache" option
The error I get after I make these configurations, and without adding the MATLAB function blocks to call Fee_MainFunction() and MemAcc_MainFunction() before calling the actual FEE API calls as in the link above is as follows:
gmake: *** [C40_Ip.o] Error 1 gmake: *** Waiting for unfinished jobs.... C:\Rishikesh\NVMStuff_MBDT14\nvm_stuff_ert_rtw>echo The make command returned an error of 2 The make command returned an error of 2 C:\Rishikesh\NVMStuff_MBDT14\nvm_stuff_ert_rtw>exit /B 1 ### Build procedure for nvm_stuff aborted due to an error.
After scrolling through the diagnostics viewer quite a bit, I spotted this error:
C:/Rishikesh/NVMStuff_MBDT14/nvm_stuff_Config/RTD/src/C40_Ip.c:575:11: error: implicit declaration of function 'Cache_Ip_InvalidateByAddr' [-Werror=implicit-function-declaration] 575 | (void)Cache_Ip_InvalidateByAddr(CACHE_IP_CORE, CACHE_IP_DATA, Address, Length); | ^~~~~~~~~~~~~~~~~~~~~~~~~ C:/Rishikesh/NVMStuff_MBDT14/nvm_stuff_Config/RTD/src/C40_Ip.c:575:37: error: 'CACHE_IP_CORE' undeclared (first use in this function) 575 | (void)Cache_Ip_InvalidateByAddr(CACHE_IP_CORE, CACHE_IP_DATA, Address, Length); | ^~~~~~~~~~~~~ C:/Rishikesh/NVMStuff_MBDT14/nvm_stuff_Config/RTD/src/C40_Ip.c:575:37: note: each undeclared identifier is reported only once for each function it appears in C:/Rishikesh/NVMStuff_MBDT14/nvm_stuff_Config/RTD/src/C40_Ip.c:575:52: error: 'CACHE_IP_DATA' undeclared (first use in this function) 575 | (void)Cache_Ip_InvalidateByAddr(CACHE_IP_CORE, CACHE_IP_DATA, Address, Length);
I don't understand why this error is occurring since all the files are generated by the S32 Design Studio Config Tool I use to configure my S32K344 project in Simulink. Additionally, the configurations are identical to the ones in the Fee_example_s32k344 in Design Studio 3.5 which builds and flashes properly on my board.
What could be causing this problem?