1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-20 10:54:14 +01:00

CC Module memory: Make it clean for CC to override the stack sizes of modules

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2668 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
peabody124 2011-02-01 02:18:35 +00:00 committed by peabody124
parent b1e4b65f3d
commit f93ed5f01f
5 changed files with 23 additions and 4 deletions

View File

@ -78,6 +78,9 @@
#define SERVOS_POSITION_MIN 800
#define SERVOS_POSITION_MAX 2200
#define PIOS_ACTUATOR_STACK_SIZE 992
#define PIOS_MANUAL_STACK_SIZE 624
#define PIOS_SYSTEM_STACK_SIZE 624
#endif /* PIOS_CONFIG_H */
/**

View File

@ -44,7 +44,13 @@
// Private constants
#define MAX_QUEUE_SIZE 2
#define STACK_SIZE configMINIMAL_STACK_SIZE+200
#if defined(PIOS_ACTUATOR_STACK_SIZE)
#define STACK_SIZE_BYTES PIOS_ACTUATOR_STACK_SIZE
#else
#define STACK_SIZE_BYTES 1312
#endif
#define TASK_PRIORITY (tskIDLE_PRIORITY+4)
#define FAILSAFE_TIMEOUT_MS 100
#define MAX_MIX_ACTUATORS ACTUATORCOMMAND_CHANNEL_NUMELEM
@ -96,7 +102,7 @@ int32_t ActuatorInitialize()
ActuatorSettingsConnectCallback(actuator_update_rate);
// Start main task
xTaskCreate(actuatorTask, (signed char*)"Actuator", STACK_SIZE, NULL, TASK_PRIORITY, &taskHandle);
xTaskCreate(actuatorTask, (signed char*)"Actuator", STACK_SIZE_BYTES/4, NULL, TASK_PRIORITY, &taskHandle);
TaskMonitorAdd(TASKINFO_RUNNING_ACTUATOR, taskHandle);
PIOS_WDG_RegisterFlag(PIOS_WDG_ACTUATOR);

View File

@ -43,7 +43,12 @@
#include "flighttelemetrystats.h"
// Private constants
#if defined(PIOS_MANUAL_STACK_SIZE)
#define STACK_SIZE_BYTES PIOS_MANUAL_STACK_SIZE
#else
#define STACK_SIZE_BYTES 824
#endif
#define TASK_PRIORITY (tskIDLE_PRIORITY+4)
#define UPDATE_PERIOD_MS 20
#define THROTTLE_FAILSAFE -0.1

View File

@ -53,7 +53,12 @@
#define IDLE_COUNTS_PER_SEC_AT_NO_LOAD 995998 // calibrated by running tests/test_cpuload.c
// must be updated if the FreeRTOS or compiler
// optimisation options are changed.
#if defined(PIOS_MANUAL_STACK_SIZE)
#define STACK_SIZE_BYTES PIOS_MANUAL_STACK_SIZE
#else
#define STACK_SIZE_BYTES 924
#endif
#define TASK_PRIORITY (tskIDLE_PRIORITY+2)
#define HEAP_LIMIT_WARNING 4000

View File

@ -36,8 +36,8 @@
#include "telemetrysettings.h"
// Private constants
#define MAX_QUEUE_SIZE TELEM_QUEUE_SIZE /*20*/
#define STACK_SIZE_BYTES TELEM_STACK_SIZE /*624*/
#define MAX_QUEUE_SIZE TELEM_QUEUE_SIZE
#define STACK_SIZE_BYTES TELEM_STACK_SIZE
#define TASK_PRIORITY_RX (tskIDLE_PRIORITY + 2)
#define TASK_PRIORITY_TX (tskIDLE_PRIORITY + 2)
#define TASK_PRIORITY_TXPRI (tskIDLE_PRIORITY + 2)