78 lines
3.2 KiB
C
78 lines
3.2 KiB
C
|
|
/* FreeRTOSConfig.h - STM32F103RC (Cortex-M3, Keil ARMCC) <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
*
|
|||
|
|
* <EFBFBD>ڴ<EFBFBD>Ԥ<EFBFBD>㣨RAM <EFBFBD>ܼ<EFBFBD> 48KB<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ZI ~36.3KB<EFBFBD><EFBFBD>U2_CopyBuff 20K + Rx_Buf 8K + OTA<EFBFBD><EFBFBD> 3K + <EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
* FreeRTOS <EFBFBD><EFBFBD> 10KB<EFBFBD><EFBFBD>net<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ջ 3KB + app<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ջ 2KB + sys<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ջ 1KB
|
|||
|
|
* + idle<EFBFBD><EFBFBD><EFBFBD><EFBFBD> 512B + TCB/<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> + <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
* <EFBFBD>ϼ<EFBFBD> ~46.3KB < 48KB
|
|||
|
|
*
|
|||
|
|
* HAL ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>SysTick <EFBFBD><EFBFBD> FreeRTOS <EFBFBD><EFBFBD> tick<EFBFBD><EFBFBD>HAL ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> TIM2
|
|||
|
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD> Src/stm32f1xx_hal_timebase_tim.c<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߶<EFBFBD><EFBFBD><EFBFBD> 1ms<EFBFBD><EFBFBD>
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
#ifndef FREERTOS_CONFIG_H
|
|||
|
|
#define FREERTOS_CONFIG_H
|
|||
|
|
|
|||
|
|
#if defined(__ICCARM__) || defined(__CC_ARM) || defined(__GNUC__)
|
|||
|
|
#include <stdint.h>
|
|||
|
|
extern uint32_t SystemCoreClock;
|
|||
|
|
#endif
|
|||
|
|
|
|||
|
|
#define configUSE_PREEMPTION 1
|
|||
|
|
#define configSUPPORT_STATIC_ALLOCATION 0
|
|||
|
|
#define configSUPPORT_DYNAMIC_ALLOCATION 1
|
|||
|
|
#define configUSE_IDLE_HOOK 1 /* idle <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ι IWDG */
|
|||
|
|
#define configUSE_TICK_HOOK 0
|
|||
|
|
#define configCPU_CLOCK_HZ ( SystemCoreClock )
|
|||
|
|
#define configTICK_RATE_HZ ((TickType_t)1000)
|
|||
|
|
#define configMAX_PRIORITIES ( 5 )
|
|||
|
|
#define configMINIMAL_STACK_SIZE ((uint16_t)128)
|
|||
|
|
#define configTOTAL_HEAP_SIZE ((size_t)10240)
|
|||
|
|
#define configMAX_TASK_NAME_LEN ( 16 )
|
|||
|
|
#define configUSE_16_BIT_TICKS 0
|
|||
|
|
#define configUSE_MUTEXES 1
|
|||
|
|
#define configUSE_RECURSIVE_MUTEXES 1
|
|||
|
|
#define configQUEUE_REGISTRY_SIZE 8
|
|||
|
|
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 1
|
|||
|
|
#define configUSE_TIMERS 0
|
|||
|
|
#define configCHECK_FOR_STACK_OVERFLOW 2
|
|||
|
|
#define configUSE_MALLOC_FAILED_HOOK 1
|
|||
|
|
|
|||
|
|
/* Co-routine definitions. */
|
|||
|
|
#define configUSE_CO_ROUTINES 0
|
|||
|
|
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
|
|||
|
|
|
|||
|
|
/* Set the following definitions to 1 to include the API function, or zero
|
|||
|
|
to exclude the API function. */
|
|||
|
|
#define INCLUDE_vTaskPrioritySet 0
|
|||
|
|
#define INCLUDE_uxTaskPriorityGet 0
|
|||
|
|
#define INCLUDE_vTaskDelete 0
|
|||
|
|
#define INCLUDE_vTaskCleanUpResources 0
|
|||
|
|
#define INCLUDE_vTaskSuspend 1
|
|||
|
|
#define INCLUDE_vTaskDelayUntil 1
|
|||
|
|
#define INCLUDE_vTaskDelay 1
|
|||
|
|
#define INCLUDE_xTaskGetSchedulerState 1
|
|||
|
|
|
|||
|
|
/* Cortex-M specific definitions. */
|
|||
|
|
#ifdef __NVIC_PRIO_BITS
|
|||
|
|
#define configPRIO_BITS __NVIC_PRIO_BITS
|
|||
|
|
#else
|
|||
|
|
#define configPRIO_BITS 4
|
|||
|
|
#endif
|
|||
|
|
|
|||
|
|
/* <20>ɵ<EFBFBD><C9B5><EFBFBD><EFBFBD>жϰ<D0B6>ȫ FreeRTOS API <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD><D0B6><EFBFBD><EFBFBD>ȼ<EFBFBD><C8BC><EFBFBD><EFBFBD><EFBFBD>ֵԽС<D4BD><D0A1><EFBFBD>ȼ<EFBFBD>Խ<EFBFBD>ߣ<EFBFBD><DFA3><EFBFBD>
|
|||
|
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> UART/DMA <EFBFBD>ж<EFBFBD>(0~3<EFBFBD><EFBFBD>)<EFBFBD><EFBFBD><EFBFBD><EFBFBD> RTOS API<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ķ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȼ<EFBFBD><EFBFBD><EFBFBD> */
|
|||
|
|
#define configLIBRARY_LOWEST_INTERRUPT_PRIORITY 15
|
|||
|
|
#define configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY 5
|
|||
|
|
#define configKERNEL_INTERRUPT_PRIORITY ( configLIBRARY_LOWEST_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )
|
|||
|
|
#define configMAX_SYSCALL_INTERRUPT_PRIORITY ( configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )
|
|||
|
|
|
|||
|
|
#define configASSERT( x ) if ((x) == 0) {taskDISABLE_INTERRUPTS(); for( ;; );}
|
|||
|
|
|
|||
|
|
/* <20>ж<EFBFBD><D0B6><EFBFBD><EFBFBD><EFBFBD>ӳ<EFBFBD>䵽 CMSIS <20><><EFBFBD><D7BC><EFBFBD><EFBFBD>it.c <20>ﲻ<EFBFBD><EFB2BB><EFBFBD>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Handler */
|
|||
|
|
#define vPortSVCHandler SVC_Handler
|
|||
|
|
#define xPortPendSVHandler PendSV_Handler
|
|||
|
|
#define xPortSysTickHandler SysTick_Handler
|
|||
|
|
|
|||
|
|
#endif /* FREERTOS_CONFIG_H */
|