finally able to get freeRTOS run with current mouse + keyboard example
NOTES: print_greeting if is executed before the start of freeRTOS scheduler --> hardfault - print_greeting->vsprintf->systick -> bunch of ISR --> hardfault. printf using serial after the start of scheduler is ok though
This commit is contained in:
@@ -37,15 +37,22 @@
|
||||
|
||||
#include "board.h"
|
||||
|
||||
#if TUSB_CFG_OS == TUSB_OS_NONE
|
||||
volatile uint32_t system_ticks = 0;
|
||||
|
||||
void SysTick_Handler (void)
|
||||
{
|
||||
system_ticks++;
|
||||
#if TUSB_CFG_OS == TUSB_OS_NONE
|
||||
tusb_tick_tock(); // TODO temporarily
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
//void board_delay_blocking(uint32_t ms)
|
||||
//{
|
||||
// volatile uint32_t delay_us = 1000*ms;
|
||||
// delay_us *= (SystemCoreClock / 1000000) / 3;
|
||||
// while(delay_us--);
|
||||
//}
|
||||
|
||||
void check_failed(uint8_t *file, uint32_t line)
|
||||
{
|
||||
|
||||
@@ -68,6 +68,8 @@
|
||||
#define PRINTF_TARGET_SWO 3 // aka SWV, ITM
|
||||
#define PRINTF_TARGET_NONE 4
|
||||
|
||||
#define PRINTF(...) printf(__VA_ARGS__)
|
||||
|
||||
#if BOARD == 0
|
||||
#error BOARD is not defined or supported yet
|
||||
#elif BOARD == BOARD_NGX4330
|
||||
|
||||
Reference in New Issue
Block a user