diff options
| author | hathach <[email protected]> | 2014-03-03 16:25:34 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2014-03-03 16:25:34 +0700 |
| commit | 22a84f744d691c3f591f212dcffb35d68d0b4076 (patch) | |
| tree | 31f6a5b63a9642aad1c0c6642d30cf62443bb496 /vendor | |
| parent | 6770a36cba547b8e9981ccb22ee159c6f2bad900 (diff) | |
able to build freeRTOS with lpc175x_6x
Diffstat (limited to 'vendor')
| -rw-r--r-- | vendor/freertos/FreeRTOSConfig.h | 8 | ||||
| -rw-r--r-- | vendor/freertos/FreeRTOSConfig_lpc175x_6x.h | 34 | ||||
| -rw-r--r-- | vendor/freertos/freertos/Source/include/portable.h | 4 | ||||
| -rw-r--r-- | vendor/freertos/lpc43xx_m4_FreeRTOSConfig.h | 3 |
4 files changed, 19 insertions, 30 deletions
diff --git a/vendor/freertos/FreeRTOSConfig.h b/vendor/freertos/FreeRTOSConfig.h index 9e395069a..e991b3424 100644 --- a/vendor/freertos/FreeRTOSConfig.h +++ b/vendor/freertos/FreeRTOSConfig.h @@ -1,10 +1,14 @@ #ifndef __FREERTOS_CONFIG__H #define __FREERTOS_CONFIG__H -#ifdef CORE_M4 +#include "hal/hal.h" + +#if __CORTEX_M == 4 #include "lpc43xx_m4_FreeRTOSConfig.h" -#elif defined(CORE_M0) +#elif __CORTEX_M == 0 #include "lpc43xx_m0_FreeRTOSConfig.h" +#elif __CORTEX_M == 3 + #include "FreeRTOSConfig_lpc175x_6x.h" #else #error "For LPC43XX one of CORE_M0 or CORE_M4 must be defined!" #endif /* ifdef CORE_M4 */ diff --git a/vendor/freertos/FreeRTOSConfig_lpc175x_6x.h b/vendor/freertos/FreeRTOSConfig_lpc175x_6x.h index 88e63f46a..a36848066 100644 --- a/vendor/freertos/FreeRTOSConfig_lpc175x_6x.h +++ b/vendor/freertos/FreeRTOSConfig_lpc175x_6x.h @@ -55,25 +55,9 @@ #define FREERTOS_CONFIG_H
#include <stdint.h>
+#include "hal/hal.h"
extern uint32_t SystemCoreClock;
-/* Priorities to assign to tasks created by this demo. */
-#define configUART_COMMAND_CONSOLE_TASK_PRIORITY ( 3U )
-#define configSPI_7_SEG_WRITE_TASK_PRIORITY ( 2U )
-#define configI2C_TASK_PRIORITY ( 0U )
-
-/* Stack sizes to assign to tasks created by this demo. */
-#define configUART_COMMAND_CONSOLE_STACK_SIZE ( configMINIMAL_STACK_SIZE * 2 )
-#define configSPI_7_SEG_WRITE_TASK_STACK_SIZE ( configMINIMAL_STACK_SIZE * 2 )
-#define configI2C_TASK_STACK_SIZE ( configMINIMAL_STACK_SIZE * 3 )
-
-/* Dimensions a buffer that can be used by the FreeRTOS+CLI command
-interpreter. Set this value to 1 to save RAM if FreeRTOS+CLI does not supply
-the output butter. See the FreeRTOS+CLI documentation for more information:
-http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_CLI/ */
-#define configCOMMAND_INT_MAX_OUTPUT_SIZE 1024
-
-
/*-----------------------------------------------------------
* Application specific definitions.
*
@@ -90,8 +74,8 @@ http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_CLI/ */ #define configCPU_CLOCK_HZ ( SystemCoreClock )
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 90 )
-#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 15 * 1024 ) ) /* Has not effect in this demo as the heap is manually pointed to AHB RAM. */
-#define configMAX_TASK_NAME_LEN ( 12 )
+#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 16 * 1024 ) )
+#define configMAX_TASK_NAME_LEN ( 32 )
#define configIDLE_SHOULD_YIELD 0
#define configQUEUE_REGISTRY_SIZE 10
#define configUSE_TRACE_FACILITY 1
@@ -111,17 +95,17 @@ http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_CLI/ */ /* Software timer related definitions. */
-#define configUSE_TIMERS 1
+#define configUSE_TIMERS 0
#define configTIMER_TASK_PRIORITY ( configMAX_PRIORITIES - 3 )
#define configTIMER_QUEUE_LENGTH 10
#define configTIMER_TASK_STACK_DEPTH configMINIMAL_STACK_SIZE
/* Run time stats gathering definitions. */
-void vMainConfigureTimerForRunTimeStats( void );
-uint32_t ulMainGetRunTimeCounterValue( void );
-#define configGENERATE_RUN_TIME_STATS 1
-#define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() vMainConfigureTimerForRunTimeStats()
-#define portGET_RUN_TIME_COUNTER_VALUE() ulMainGetRunTimeCounterValue()
+//void vMainConfigureTimerForRunTimeStats( void );
+//uint32_t ulMainGetRunTimeCounterValue( void );
+//#define configGENERATE_RUN_TIME_STATS 1
+//#define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() vMainConfigureTimerForRunTimeStats()
+//#define portGET_RUN_TIME_COUNTER_VALUE() ulMainGetRunTimeCounterValue()
/* Set the following definitions to 1 to include the API function, or zero
diff --git a/vendor/freertos/freertos/Source/include/portable.h b/vendor/freertos/freertos/Source/include/portable.h index 79919c01f..390a7793e 100644 --- a/vendor/freertos/freertos/Source/include/portable.h +++ b/vendor/freertos/freertos/Source/include/portable.h @@ -318,8 +318,10 @@ #include "tusb_option.h" #ifdef __GNUC__ - #if TUSB_CFG_MCU==MCU_LPC43XX // TODO M0 M4 + #if __CORTEX_M == 4 // TODO M0 M4 #include "../portable/GCC/ARM_CM4F/portmacro.h" + #elif __CORTEX_M == 3 + #include "../portable/GCC/ARM_CM3/portmacro.h" #else #error portmacro.h for mcu is not supported yet #endif diff --git a/vendor/freertos/lpc43xx_m4_FreeRTOSConfig.h b/vendor/freertos/lpc43xx_m4_FreeRTOSConfig.h index 3669230b2..143526c9c 100644 --- a/vendor/freertos/lpc43xx_m4_FreeRTOSConfig.h +++ b/vendor/freertos/lpc43xx_m4_FreeRTOSConfig.h @@ -120,8 +120,7 @@ to exclude the API function. */ /* Cortex-M specific definitions. */ #ifdef __NVIC_PRIO_BITS - /* __BVIC_PRIO_BITS will be specified when CMSIS is being used. */ - #define configPRIO_BITS __NVIC_PRIO_BITS + #define configPRIO_BITS __NVIC_PRIO_BITS #else #define configPRIO_BITS 5 /* 32 priority levels */ #endif |
