]> rtime.felk.cvut.cz Git - jenkicar/rpp-simulink.git/commitdiff
Test and fixed LOUT Simulink compilation.
authorCarlos Jenkins <carlos@jenkins.co.cr>
Mon, 10 Jun 2013 20:33:45 +0000 (22:33 +0200)
committerCarlos Jenkins <carlos@jenkins.co.cr>
Mon, 10 Jun 2013 20:33:45 +0000 (22:33 +0200)
rpp/blocks/tlc_c/common.tlc
rpp/blocks/tlc_c/sfunction_lout.tlc
rpp/demos/led_blink.slx
rpp/rpp/rpp_srmain.tlc
rpp/rpp/target_tools.mk

index b0d945270b48bc2d60f5ed068a5573cfdbf812ab..db995080bd59c24e9835c3f86253f3d29f530a8e 100644 (file)
 
         %if !SLibCodeGenForSim()
 
-            %<LibAddToCommonIncludes("rpp.h")>
-
-        %endif
-    %endif
-
-%endfunction
-
-
-%function RppCommonStart(block, system) void
-
-    %if EXISTS("_DONE_COMMON_START_") == 0
-        %assign _DONE_COMMON_START_ = 1
-
-        %if !SLibCodeGenForSim()
-
-            /* Initialize RPP board */
-            rpp_init();
+            %<LibAddToCommonIncludes("rpp/rpp.h")>
 
         %endif
     %endif
index ae2f8ce3e27ec2f4b3ce1b0c60d61519ec9efed9..bba5ea7f556cb55e1664f0ba25e982de6e951dfb 100644 (file)
@@ -21,9 +21,9 @@
 %%     TLC file for inlining RPP digital output block.
 %%
 %% References:
-%%     BlockTypeSetup() : rtw_tlc.pdf p. 277
-%%     Start()          : rtw_tlc.pdf p. 279
-%%     Outputs()        : rtw_tlc.pdf p. 281
+%%     BlockTypeSetup() : refs/rtw_tlc.pdf p. 277
+%%     Start()          : refs/rtw_tlc.pdf p. 279
+%%     Outputs()        : refs/rtw_tlc.pdf p. 281
 
 
 %implements sfunction_lout "C"
@@ -44,7 +44,7 @@
 %function Start(block, system) Output
 
     %if !SLibCodeGenForSim()
-        %<RppCommonStart(block, system)>
+        %%No initialization needed for this block
     %endif
 
 %endfunction
index 38b49024fcfa9b544b25f8aa77ad939052244423..847e385be7a1a162d1ec486ce9c43cf2dba7019c 100644 (file)
Binary files a/rpp/demos/led_blink.slx and b/rpp/demos/led_blink.slx differ
index a67a6501ddfae812c982cb4151740e15f0162023..e2f1a73740f1f13fe3e0479716f3ac3d01f5f79c 100644 (file)
@@ -56,7 +56,8 @@
     %%%%%%%%
     %openfile tmpBuf
 
-    #define STEP_SIZE_MILLIS (%<CompiledModel.FundamentalStepSize>*1000.0)
+    /* Definitions */
+    #define STEP_SIZE_MILLIS %<CompiledModel.FundamentalStepSize>*1000.0
     #define CONTROL_PRIORITY 2
     #define WORKING_PRIORITY 1
 
      */
     void main(void)
     {
+        /* Initialize RPP board */
+        rpp_init();
+
         /* Initialize model */
         %<LibCallModelInitialize()>\
 
index 73ca327ee394054030585ecb8e57d32ec14b3d13..7928145aaf4c1a25079f35920a541a305c862ed3 100644 (file)
@@ -26,7 +26,7 @@
 #
 # References:
 #     "Include a tool specification settings" comment block in rpp.tmf
-#      Compiler options documentation available in armcl.pdf
+#      Compiler options documentation available in refs/armcl.pdf
 
 
 include $(START_DIR)/slprj/target_paths.mk