]> rtime.felk.cvut.cz Git - pes-rpp/rpp-simulink.git/commitdiff
Implemented heap and stack configuration options with more sane defaults.
authorCarlos Jenkins <carlos@jenkins.co.cr>
Fri, 17 May 2013 12:49:02 +0000 (14:49 +0200)
committerCarlos Jenkins <carlos@jenkins.co.cr>
Fri, 17 May 2013 12:49:02 +0000 (14:49 +0200)
rpp/lib/drv/hal/.gitignore [deleted file]
rpp/lib/os/README.txt
rpp/rpp/rpp.tlc
rpp/rpp/rpp_srmain.tlc
rpp/rpp/target_tools.mk

diff --git a/rpp/lib/drv/hal/.gitignore b/rpp/lib/drv/hal/.gitignore
deleted file mode 100644 (file)
index e69de29..0000000
index 2fe451464a6180c87389883326b177570dfe51e5..fc0b433e39c5bed5b3377c4ba3fccac1908673f2 100644 (file)
@@ -23,7 +23,7 @@ where they come from.
     include/FreeRTOS.h
     include/list.h
     include/mpu_wrappers.h
-    include/portable.h
+    include/portable.h (with minor editions)
     include/projdefs.h
     include/queue.h
     include/semphr.h
index d2ff9554a45946e054e6cec688ec4e3762899c60..4a1638b5d11c5ead7eb1bc7c83b354155f36d421 100644 (file)
@@ -50,7 +50,7 @@
   rtwoptions(oIdx).prompt          = 'RPP Options';
   rtwoptions(oIdx).type            = 'Category';
   rtwoptions(oIdx).enable          = 'on';
-  rtwoptions(oIdx).default         = 2;   % number of items under this category
+  rtwoptions(oIdx).default         = 4;   % number of items under this category
                                        % excluding this one.
   rtwoptions(oIdx).popupstrings    = '';
   rtwoptions(oIdx).tlcvariable     = '';
   oIdx = oIdx + 1;
 
 
+  rtwoptions(oIdx).prompt         = 'C system stack size';
+  rtwoptions(oIdx).type           = 'Edit';
+  rtwoptions(oIdx).default        = '4096';
+  rtwoptions(oIdx).tlcvariable    = 'rppStackSize';
+  rtwoptions(oIdx).makevariable   = 'RPP_STACK_SIZE';
+  rtwoptions(oIdx).tooltip        = ['Size of the C system stack (in bytes, default 4096).'];
+
+  oIdx = oIdx + 1;
+
+
+  rtwoptions(oIdx).prompt         = 'C system heap size';
+  rtwoptions(oIdx).type           = 'Edit';
+  rtwoptions(oIdx).default        = '4096';
+  rtwoptions(oIdx).tlcvariable    = 'rppHeapSize';
+  rtwoptions(oIdx).makevariable   = 'RPP_HEAP_SIZE';
+  rtwoptions(oIdx).tooltip        = ['Size of the C system heap (in bytes, default 4096).'];
+
+  oIdx = oIdx + 1;
+
+
+  rtwoptions(oIdx).prompt         = 'Model step task stack size';
+  rtwoptions(oIdx).type           = 'Edit';
+  rtwoptions(oIdx).default        = '2048';
+  rtwoptions(oIdx).tlcvariable    = 'rppModelTaskStack';
+  rtwoptions(oIdx).makevariable   = 'RPP_MODEL_TASK_STACK';
+  rtwoptions(oIdx).tooltip        = ['Stack size for the model task (in bytes, default 2048).'];
+
+  oIdx = oIdx + 1;
+
+
   rtwoptions(oIdx).prompt          = 'Download compiled binary to RPP';
   rtwoptions(oIdx).type            = 'Checkbox';
   rtwoptions(oIdx).default         = 'off';
-  rtwoptions(oIdx).tlcvariable     = 'RppDownload';
+  rtwoptions(oIdx).tlcvariable     = 'rppDownload';
   rtwoptions(oIdx).makevariable    = 'RPP_DOWNLOAD';
   rtwoptions(oIdx).tooltip         = ['Download code to RPP board after build.'];
   rtwoptions(oIdx).callback        = '';
   oIdx = oIdx + 1;
 
 
-  rtwoptions(oIdx).prompt         = 'Stack size';
-  rtwoptions(oIdx).type           = 'Edit';
-  rtwoptions(oIdx).default        = '800H';
-  rtwoptions(oIdx).tlcvariable    = 'RppStackSize';
-  rtwoptions(oIdx).makevariable   = 'RPP_STACK_SIZE';
-  rtwoptions(oIdx).tooltip        = ['Size of the stack (default 2K = 800H).'];
-
-
   % Configure code generation settings
   rtwgensettings.BuildDirSuffix = '_rpp';
   rtwgensettings.Version        = '1';
index 028a398f05c58331d054ac0ea2f1da874e224352..6659d0002af86ff83587897e638aba8ce73f7a96 100644 (file)
         xSemaphoreTake(step_signal, 0);
 
         /* Create tasks to step model and start scheduler */
-        // FIXME: How to calculate / policy about model stack size
-        xTaskCreate(control_task, (signed char*) "control_task", 128,  NULL,
+        xTaskCreate(control_task, (signed char*) "control_task", 128, NULL,
             CONTROL_PRIORITY, NULL);
-        xTaskCreate(working_task, (signed char*) "working_task", 4096, NULL,
+        xTaskCreate(working_task, (signed char*) "working_task", %<rppModelTaskStack>, NULL,
             WORKING_PRIORITY, NULL);
         vTaskStartScheduler();
 
index 8d8c05dc226dc2b4eee810947019e55005aaebdd..6b7e33afdd555549a135f09aff0f4a124457a956 100644 (file)
@@ -53,7 +53,8 @@ CXXDEBUG         =
 LD      = $(CC)
 LDFLAGS = -mv7R4 --code_state=32 --float_support=VFPv3D16 --abi=eabi \
           -O2 --diag_warning=225 --display_error_number --enum_type=packed \
-          --run_linker -m"$(MODEL).map" --be32 --stack_size=$(RPP_STACK_SIZE) \
+          --run_linker -m"$(MODEL).map" --be32 \
+          --stack_size=$(RPP_STACK_SIZE) --heap_size=$(RPP_HEAP_SIZE) \
           --reread_libs --warn_sections --display_error_number --rom_model \
           -i"$(COMPILER_ROOT)/lib" -i"$(COMPILER_ROOT)/include" \
           --library=rtsv7R4_T_be_v3D16_eabi.lib \