make freertos source unmodified to ease the upgrade process later
use CGU_GetPCLKFrequency as configCPU_CLOCK_HZ for lpc43xx using with freeRTOS move portmarco.h include to FreeRTOSConfig.h to have untouched version of freertos add a readme.md to vendor/freertos refractor usbh.c, increase POWER_STABLE_DELAY = 500, RESET_DELAY = 200 fix bug with hub, only handle 1 port at a time when reading hub status change endpoint --> other port will be handled in the next cycle
This commit is contained in:
31
vendor/freertos/FreeRTOSConfig.h
vendored
31
vendor/freertos/FreeRTOSConfig.h
vendored
@@ -10,9 +10,13 @@
|
||||
//--------------------------------------------------------------------+
|
||||
// See http://www.freertos.org/a00110.html.
|
||||
//--------------------------------------------------------------------+
|
||||
#if TUSB_CFG_MCU == MCU_LPC43XX
|
||||
#define configCPU_CLOCK_HZ CGU_GetPCLKFrequency(CGU_PERIPHERAL_M4CORE)
|
||||
#else
|
||||
#define configCPU_CLOCK_HZ SystemCoreClock
|
||||
#endif
|
||||
|
||||
#define configUSE_PREEMPTION 1
|
||||
#define configCPU_CLOCK_HZ ( SystemCoreClock )
|
||||
//#define configCPU_CLOCK_HZ ( CGU_GetPCLKFrequency(CGU_PERIPHERAL_M4CORE))
|
||||
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
|
||||
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 8 )
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 )
|
||||
@@ -100,16 +104,29 @@ to all Cortex-M ports, and do not rely on any particular library functions. */
|
||||
See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */
|
||||
#define configMAX_SYSCALL_INTERRUPT_PRIORITY ( configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )
|
||||
|
||||
#if 0
|
||||
//--------------------------------------------------------------------+
|
||||
// portmacro.h include path
|
||||
//--------------------------------------------------------------------+
|
||||
#if defined __CC_ARM
|
||||
#define TOOL_DIR RVDS
|
||||
#elif defined __GNUC__
|
||||
#define TOOL_DIR GCC
|
||||
#elif defined __ICCARM__
|
||||
#define TOOL_DIR IAR
|
||||
#else
|
||||
#error "not yet supported toolchain"
|
||||
#endif
|
||||
|
||||
#if __CORTEX_M == 4
|
||||
|
||||
#define ARCH_DIR ARM_CM4F
|
||||
#elif __CORTEX_M == 3
|
||||
|
||||
#define ARCH_DIR ARM_CM3
|
||||
#elif __CORTEX_M == 0
|
||||
|
||||
#define ARCH_DIR ARM_CM0
|
||||
#else
|
||||
#error "not yet supported MCU"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include XSTRING_(freertos/Source/portable/TOOL_DIR/ARCH_DIR/portmacro.h)
|
||||
|
||||
#endif /* __FREERTOS_CONFIG__H */
|
||||
|
||||
@@ -70,44 +70,6 @@
|
||||
#ifndef PORTABLE_H
|
||||
#define PORTABLE_H
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// TinyUSB modification
|
||||
//--------------------------------------------------------------------+
|
||||
#if defined __CC_ARM
|
||||
#if __CORTEX_M == 4 // TODO M0 M4
|
||||
#define PORTMACRO_PATH "../portable/RVDS/ARM_CM4F/portmacro.h"
|
||||
#elif __CORTEX_M == 3
|
||||
#define PORTMACRO_PATH "../portable/RVDS/ARM_CM3/portmacro.h"
|
||||
#elif __CORTEX_M == 0
|
||||
#define PORTMACRO_PATH "../portable/RVDS/ARM_CM0/portmacro.h"
|
||||
#endif
|
||||
|
||||
#elif defined __GNUC__
|
||||
#if __CORTEX_M == 4
|
||||
#define PORTMACRO_PATH "../portable/GCC/ARM_CM4F/portmacro.h"
|
||||
#elif __CORTEX_M == 3
|
||||
#define PORTMACRO_PATH "../portable/GCC/ARM_CM3/portmacro.h"
|
||||
#elif __CORTEX_M == 0
|
||||
#define PORTMACRO_PATH "../portable/GCC/ARM_CM0/portmacro.h"
|
||||
#endif
|
||||
|
||||
#elif defined __ICCARM__
|
||||
#if __CORTEX_M == 4
|
||||
#define PORTMACRO_PATH "../portable/IAR/ARM_CM4F/portmacro.h"
|
||||
#elif __CORTEX_M == 3
|
||||
#define PORTMACRO_PATH "../portable/IAR/ARM_CM3/portmacro.h"
|
||||
#elif __CORTEX_M == 0
|
||||
#define PORTMACRO_PATH "../portable/IAR/ARM_CM0/portmacro.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef PORTMACRO_PATH
|
||||
#error portmacro.h path is not defined for this toolchain and/or MCU
|
||||
#endif
|
||||
|
||||
#include PORTMACRO_PATH
|
||||
|
||||
/* Include the macro file relevant to the port being used. */
|
||||
|
||||
#ifdef OPEN_WATCOM_INDUSTRIAL_PC_PORT
|
||||
|
||||
4
vendor/freertos/readme.md
vendored
Normal file
4
vendor/freertos/readme.md
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
This folder contains
|
||||
- **FreeRTOSConfig.h** configuration file for freeRTOS
|
||||
- **freertos_hook.c** implemenation of freeRTOS to application hooks
|
||||
- **freertos** an *unmodified copy* of the popular open source FreeRTOS. This will help to ease the upgrade to later version. However, due to Keil unable to have duplicated filenames, I have to change the name of port.c in freertos/Source/portable/RVDS for example ARM_CM3/port.c to ARM_CM3/port_cm3.c to have ability to support/switch among different mcu in one project.
|
||||
Reference in New Issue
Block a user