【添加】FreeRTOS Demo

This commit is contained in:
Maofeng
2017-05-08 03:57:53 +08:00
parent 390541a413
commit 5e6d1ecfce
467 changed files with 225216 additions and 9 deletions
+4 -5
View File
@@ -253,9 +253,9 @@ static void get_cur_thread_stack_info(uint32_t sp, uint32_t *start_addr, size_t
#elif (CMB_OS_PLATFORM_TYPE == CMB_OS_PLATFORM_UCOSIII)
#error "not implemented, I hope you can do this"
//TODO 待实现
#elif (CMB_OS_PLATFORM_TYPE == CMB_OS_PLATFORM_FREERTOS)
#error "not implemented, I hope you can do this"
//TODO 待实现
#elif (CMB_OS_PLATFORM_TYPE == CMB_OS_PLATFORM_FREERTOS)
*start_addr = (uint32_t)vTaskStackAddr();
*size = vTaskStackSize() * sizeof( StackType_t );
#endif
}
@@ -278,8 +278,7 @@ static const char *get_cur_thread_name(void) {
#error "not implemented, I hope you can do this"
//TODO 待实现
#elif (CMB_OS_PLATFORM_TYPE == CMB_OS_PLATFORM_FREERTOS)
#error "not implemented, I hope you can do this"
//TODO 待实现
return vTaskName();
#endif
}
+4 -2
View File
@@ -307,8 +307,10 @@ if (!(EXPR)) \
#include <os.h>
//TODO ´ý²âÊÔ
#elif (CMB_OS_PLATFORM_TYPE == CMB_OS_PLATFORM_FREERTOS)
#error "not implemented, I hope you can do this"
//TODO ´ýʵÏÖ
#include <FreeRTOS.h>
extern uint32_t *vTaskStackAddr(void);/* need to modify the FreeRTOS/tasks source code */
extern uint32_t vTaskStackSize(void);
extern char * vTaskName(void);
#else
#error "not supported OS type"
#endif /* (CMB_OS_PLATFORM_TYPE == CMB_OS_PLATFORM_RTT) */