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';
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();
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 \