Dear Sir,
I am trying to trial some basic software of LED drive for calling header file of S32K144.
I have tried follow below thread to implement, then the compilation was success.
However, the LED does not show.
https://community.nxp.com/t5/NXP-Model-Based-Design-Tools/How-to-use-your-own-C-code-in-our-Toolbox-...
The Simulink have 2 blocks for this purpose:
1) LED_Initialization : Setting up GPIO direction
-------------------------------------------------------------------------------------------------------------------
function LED_Initialization
% TODO: Update the bccPath with your project full path
bccPath = coder.const('C:\SVN_Checkout\MATLAB\devkit_S32K144_TICK\src\led');
coder.updateBuildInfo('addSourcePaths', bccPath);
if( coder.target( 'Rtw' ) )
%% Adding header information to the generated code
coder.cinclude('led_peripheries.h');
coder.cinclude('led_mbdt.h');
%% Adding source files to MakeFile
coder.updateBuildInfo( 'addSourceFiles', 'led_peripheries.c' );
coder.updateBuildInfo( 'addSourceFiles', 'led_mbdt.c' );
%% Initializing the BCC driver
coder.ceval('MBD_LED_Initialization');
end
-------------------------------------------------------------------------------------------------------------------
2) LED_On : Write GPIO to be "LOW" for pull-down "RED LED" at PTD15
-------------------------------------------------------------------------------------------------------------------
function LED_On
if( coder.target( 'Rtw' ) )
coder.ceval('MBD_LED_On');
end
end
-------------------------------------------------------------------------------------------------------------------
Can you help advising which parts of code written wrong ?
Thanks in advanced
Narudol T.