function rpp_select_callback_handler(hDlg, hSrc)
+ % Setup the hardware configuration
+ %slConfigUISetVal(hDlg, hSrc, 'ProdHWDeviceType', 'Texas Instruments->TMS570');
+
% The target is model reference compliant
slConfigUISetVal(hDlg, hSrc, 'ModelReferenceCompliant', 'on');
slConfigUISetEnabled(hDlg, hSrc, 'ModelReferenceCompliant', false);
- % Setup the hardware configuration
- %slConfigUISetVal(hDlg, hSrc, 'ProdHWDeviceType', 'Texas Instruments->TMS570');
-
- % Hardware being used is the production hardware
- slConfigUISetVal(hDlg, hSrc, 'ProdEqTarget', 'on');
+ % Set the target language to C and disable modification
+ slConfigUISetVal(hDlg, hSrc, 'TargetLang', 'C');
+ slConfigUISetEnabled(hDlg, hSrc, 'TargetLang', false);
% Configure solver
slConfigUISetVal(hDlg, hSrc, 'SolverType', 'Fixed-step');
slConfigUISetVal(hDlg, hSrc, 'Solver', 'FixedStepDiscrete');
- % Set the target language to C and disable modification
- slConfigUISetVal(hDlg, hSrc, 'TargetLang', 'C');
- slConfigUISetEnabled(hDlg, hSrc, 'TargetLang', false);
+ % Hardware being used is the production hardware
+ slConfigUISetVal(hDlg, hSrc, 'ProdEqTarget', 'on');
+
+ % For real-time builds, we must generate ert_main.c
+ slConfigUISetVal(hDlg, hSrc, 'ERTCustomFileTemplate', 'rpp_file_process.tlc');
+ slConfigUISetVal(hDlg, hSrc, 'GenerateSampleERTMain', 'off');
+ slConfigUISetEnabled(hDlg, hSrc, 'GenerateSampleERTMain', false);
% Set the TargetLibSuffix
slConfigUISetVal(hDlg, hSrc, 'TargetLibSuffix', '.a');
- % For real-time builds, we must generate ert_main.c
- slConfigUISetVal(hDlg, hSrc, 'ERTCustomFileTemplate', 'rpp_file_process.tlc');
+ % Configure PostCodeGen Command to execute (library code inclusion for compilation)
+ %slConfigUISetVal(hDlg, hSrc, 'PostCodeGenCommand', 'rpp_include_lib(buildInfo)');
+
+
/* Standard includes */
#include <stdbool.h>
- #include <math.h>
/* Kernel includes */
#include "FreeRTOS.h"
%%#include "task.h"
%%#include "semphr.h"
- /* System includes */
- #include "sys_common.h"
- #include "system.h"
-
- /* Library includes */
- // FIXME: Implement conditional #include's
- %% IF GIO (General Input/Outputs)
- %% IF HOUT (PWM outputs)
- %% IF MOUT (Motor outputs)
- %% IF ADC (Analog to Digital Converter)
- %% IF SCI (Serial Communication Interface)
- %% IF CAN (CAN Bus)
- %% IF SDRAM
-
/* Model includes */
#include "%<LibGetMdlPubHdrBaseName()>.h"
if(WORKING) {
// Overrun detected
+ %<LibSetRTModelErrorStatus("\"Overrun\"")>;
// FIXME: Call overrun routine
} else {
// Release semaphore