[sync] sync from internal repo

* use nuttx libc, disable system libc
* use tlsf as default
* update lhal flash driver
* add example readme
* add flash ini for new flash tool
* add fw header for new flash tool
This commit is contained in:
jzlv 2023-01-17 20:54:15 +08:00
parent 89592fc9a3
commit 356f258e83
554 changed files with 79150 additions and 46596 deletions

View file

@ -1,16 +1,14 @@
#define DBG_TAG "MAIN"
#include "bflb_mtimer.h"
#include <FreeRTOS.h>
#include "semphr.h"
#include "log.h"
#include "board.h"
static uint8_t freertos_heap[configTOTAL_HEAP_SIZE];
static HeapRegion_t xHeapRegions[] = {
{ (uint8_t *)freertos_heap, 0 },
{ NULL, 0 }, /* Terminates the array. */
{ NULL, 0 } /* Terminates the array. */
};
BFLOG_DEFINE_TAG(MAIN, DBG_TAG, true);
#undef BFLOG_TAG
#define BFLOG_TAG BFLOG_GET_TAG(MAIN)
static TaskHandle_t consumer_handle;
static TaskHandle_t producer_handle;
@ -69,8 +67,6 @@ static void producer_task(void *pvParameters)
int main(void)
{
board_init();
xHeapRegions[0].xSizeInBytes = configTOTAL_HEAP_SIZE;
vPortDefineHeapRegions(xHeapRegions);
configASSERT((configMAX_PRIORITIES > 4));
@ -88,6 +84,10 @@ int main(void)
LOG_I("[OS] Starting producer task...\r\n");
xTaskCreate(producer_task, (char *)"producer_task", 512, NULL, configMAX_PRIORITIES - 3, &producer_handle);
#ifdef CONFIG_BFLOG
log_restart();
#endif
vTaskStartScheduler();
while (1) {