]> rtime.felk.cvut.cz Git - pes-rpp/rpp-simulink.git/commitdiff
Added overrun flag notification. Removed includes, because will be generated by each...
authorCarlos Jenkins <carlos@jenkins.co.cr>
Wed, 15 May 2013 11:48:42 +0000 (13:48 +0200)
committerCarlos Jenkins <carlos@jenkins.co.cr>
Wed, 15 May 2013 11:48:42 +0000 (13:48 +0200)
rpp/rpp/rpp_select_callback_handler.m
rpp/rpp/rpp_srmain.tlc

index 80e33fb58e2c5447e2562ad8da399274a6fdbf48..6135df06d29a096af4c60d7ba886bdb8647003a9 100644 (file)
 
 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)');
+
+
 
index f509bc36ecf8b5e0f189cdce046da3fe12edc782..b2cd646f2c79e9372829ba55403f1d4cb757ccc3 100644 (file)
@@ -41,7 +41,6 @@
 
     /* 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