diff --git a/Kconfig b/Kconfig index 1ea89052497f9849211da9ce6c3ad8fde9d5fbcc..e9a6a158e9a221a7e91115768f5bbed7adfd1a31 100644 --- a/Kconfig +++ b/Kconfig @@ -27,6 +27,10 @@ menu "Component Configuration" source "$(FREERTOS_SDK_ROOT)/drivers/Kconfig" endmenu -menu "FreeRTOS Setting" +menu "Third-Party Configuration" source "$(FREERTOS_SDK_ROOT)/third-party/Kconfig" +endmenu + +menu "Kernel Configuration" + source "$(FREERTOS_SDK_ROOT)/third-party/freertos/Kconfig" endmenu \ No newline at end of file diff --git a/docs/ChangeLog.md b/docs/ChangeLog.md index 7a59ee87e406d6cf13de7b4b0c30109ee7e42155..1140269938fe735be0516582431aec37d0427f53 100644 --- a/docs/ChangeLog.md +++ b/docs/ChangeLog.md @@ -1,4 +1,54 @@ -# Phytium FreeRTOS SDK 2022-11-11 ChangeLog +# Phytium FreeRTOS SDK 2022-12-6 ChangeLog + +Change Log sinc 2022-12-6 + +## example +## driver + +- Adapt fparameters.h in standalone sdk + +# Phytium FreeRTOS SDK 2022-11-28 ChangeLog + +Change Log since 2022-11-25 + +## example + +- add fatfs tests (usb/sdio) + +## driver + +- remove mmc driver, its implementation has been moved to sdmmc ports + +## third-party + +- add fatfs 0.1.4 freertos port +- add sdmmc 1.0 freertos port + +# Phytium FreeRTOS SDK 2022-11-25 ChangeLog + +Change Log sinc 2022-11-17 + +## example + +- add i2c example +- add timer_tacho example + +## driver + +- add i2c os driver +- add timer_tacho driver + +# Phytium FreeRTOS SDK 2022-11-17 ChangeLog + +Change Log sinc 2022-11-16 + +## third-party + +- Add kernel configuration in menuconfig +- Rename the "FreeRTOS Setting" to "Third-Party Configuration" in menuconfig +- Rename cmd_os_stats.c to cmd_ps.c + +# Phytium FreeRTOS SDK 2022-11-11 0.3.0 ChangeLog Change Log sinc 2022-11-11 diff --git a/drivers/Kconfig b/drivers/Kconfig index b7b47d228e45d5103fd35dff7e21b47bfbd2976e..4e97b00bf4d8dcb252e6dd519d5a83d65d7a6492 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -67,13 +67,6 @@ menu "Freertos DMA Drivers" default n endmenu -menu "Freertos MMC Drivers" - config FREERTOS_USE_FSDIO - bool - prompt "Use Freertos sdio driver" - default n -endmenu - menu "Freertos Adc Drivers" config FREERTOS_USE_ADC bool @@ -90,4 +83,25 @@ menu "Freertos Can Drivers" default n select USE_CAN select USE_FCAN +endmenu + +menu "Freertos I2c Drivers" + config FREERTOS_USE_I2C + bool + prompt "Use Freertos i2c driver" + default n +endmenu + +menu "Freertos Mio Drivers" + config FREERTOS_USE_MIO + bool + prompt "Use Freertos mio driver" + default n +endmenu + +menu "Freertos Timer Drivers" + config FREERTOS_USE_TIMER + bool + prompt "Use Freertos timer driver" + default n endmenu \ No newline at end of file diff --git a/drivers/adc/fadc_os.c b/drivers/adc/fadc_os.c index 4678a9fee4b795a539f6fa3fa293c834a8aec39f..896549c59f009aad6aae9f6b97bca0cf07e52bb0 100644 --- a/drivers/adc/fadc_os.c +++ b/drivers/adc/fadc_os.c @@ -50,7 +50,7 @@ #define FREERTOS_ADC_CTRL_INTR_ENABLE (8) /* enable adc interrupt */ #define FREERTOS_ADC_CTRL_INTR_DISABLE (9) /* disable adc interrupt */ -static FFreeRTOSAdc os_adc[FADC_INSTANCE_NUM] = {0}; +static FFreeRTOSAdc os_adc[FADC_NUM] = {0}; /** * @name: FFreeRTOSAdcControl @@ -271,7 +271,7 @@ static FError FFreeRTOSAdcInterruptEnable(FFreeRTOSAdc *os_adc_p, FAdcChannel ch */ FFreeRTOSAdc *FFreeRTOSAdcInit(u32 instance_id) { - FASSERT(instance_id < FADC_INSTANCE_NUM); + FASSERT(instance_id < FADC_NUM); FASSERT(FT_COMPONENT_IS_READY != os_adc[instance_id].adc_ctrl.is_ready); FAdcConfig pconfig; diff --git a/drivers/can/fcan_os.c b/drivers/can/fcan_os.c index 79ccc47dd274af805b90c3f8959d528de40a05ce..fa96d29f5e6e961829bb03911805086fb3666728 100644 --- a/drivers/can/fcan_os.c +++ b/drivers/can/fcan_os.c @@ -39,7 +39,7 @@ #define FCAN_INFO(format, ...) FT_DEBUG_PRINT_I(FCAN_DEBUG_TAG, format, ##__VA_ARGS__) #define FCAN_DEBUG(format, ...) FT_DEBUG_PRINT_D(FCAN_DEBUG_TAG, format, ##__VA_ARGS__) -static FFreeRTOSCan os_can[FCAN_INSTANCE_NUM] = {0}; +static FFreeRTOSCan os_can[FCAN_NUM] = {0}; /** * @name: FFreeRTOSCanInit @@ -49,7 +49,7 @@ static FFreeRTOSCan os_can[FCAN_INSTANCE_NUM] = {0}; */ FFreeRTOSCan *FFreeRTOSCanInit(u32 instance_id) { - FASSERT(instance_id < FCAN_INSTANCE_NUM); + FASSERT(instance_id < FCAN_NUM); FASSERT(FT_COMPONENT_IS_READY != os_can[instance_id].can_ctrl.is_ready); FCanConfig pconfig; diff --git a/drivers/drivers.mk b/drivers/drivers.mk index b169cfe0a90b548d111dae666db2e2fe36ee74db..47988ee37e21c4bd856dc1dc2662951d578e1d86 100644 --- a/drivers/drivers.mk +++ b/drivers/drivers.mk @@ -25,6 +25,21 @@ ifdef CONFIG_FREERTOS_USE_XMAC INC_DIR += $(OS_DRIVER_CUR_DIR)/eth/xmac endif +ifdef CONFIG_FREERTOS_USE_I2C + SRC_DIR += $(OS_DRIVER_CUR_DIR)/i2c + INC_DIR += $(OS_DRIVER_CUR_DIR)/i2c +endif + +ifdef CONFIG_FREERTOS_USE_MIO + SRC_DIR += $(OS_DRIVER_CUR_DIR)/mio + INC_DIR += $(OS_DRIVER_CUR_DIR)/mio +endif + +ifdef CONFIG_FREERTOS_USE_TIMER + SRC_DIR += $(OS_DRIVER_CUR_DIR)/timer + INC_DIR += $(OS_DRIVER_CUR_DIR)/timer +endif + ifdef CONFIG_FREERTOS_USE_GPIO SRC_DIR += $(OS_DRIVER_CUR_DIR)/gpio/fgpio INC_DIR += $(OS_DRIVER_CUR_DIR)/gpio/fgpio diff --git a/drivers/eth/xmac/ft_os_xmac.c b/drivers/eth/xmac/ft_os_xmac.c index 8f3f5c11b6484bfe0f62ec28d7a7328ef78a839c..d633c69239452832d1007bed501478a93f48d6df 100644 --- a/drivers/eth/xmac/ft_os_xmac.c +++ b/drivers/eth/xmac/ft_os_xmac.c @@ -55,18 +55,18 @@ static void FXmacInitOnError(FXmacOs *instance_p); static void FXmacSetupIsr(FXmacOs *instance_p); extern void sys_sem_signal(sys_sem_t *sem); -static FXmacOs fxmac_os_instace[FT_XMAC_NUM] = +static FXmacOs fxmac_os_instace[FXMAC_NUM] = { - [FT_XMAC0_ID] = { + [FXMAC0_ID] = { .config =( 0) }, - [FT_XMAC1_ID] = { + [FXMAC1_ID] = { .config =( 0) }, - [FT_XMAC2_ID] = { + [FXMAC2_ID] = { .config =( 0) }, - [FT_XMAC3_ID] = { + [FXMAC3_ID] = { .config =( 0 ) }, }; @@ -1122,7 +1122,7 @@ FError FXmacOsInit(FXmacOs *instance_p) u32 dmacrreg; FError status; FASSERT(instance_p != NULL); - FASSERT( instance_p->mac_config.instance_id < FT_XMAC_NUM); + FASSERT( instance_p->mac_config.instance_id < FXMAC_NUM); xmac_p = &instance_p->instance; FXMAC_OS_XMAC_PRINT_I("instance_id IS %d \r\n",instance_p->mac_config.instance_id); @@ -1329,7 +1329,7 @@ FXmacOs *FXmacOsGetInstancePointer(FXmacOsControl *config_p) { FXmacOs *instance_p; FASSERT(config_p != NULL); - FASSERT(config_p->instance_id < FT_XMAC_NUM); + FASSERT(config_p->instance_id < FXMAC_NUM); FASSERT_MSG(config_p->interface < FXMAC_OS_INTERFACE_LENGTH ,"config_p->interface %d is over %d",config_p->interface ,FXMAC_OS_INTERFACE_LENGTH); FASSERT_MSG(config_p->autonegotiation <= 1 ,"config_p->autonegotiation %d is over 1",config_p->autonegotiation ); FASSERT_MSG(config_p->phy_speed <= FXMAC_PHY_SPEED_1000M ,"config_p->phy_speed %d is over 1000",config_p->phy_speed ); diff --git a/drivers/i2c/fi2c_os.c b/drivers/i2c/fi2c_os.c new file mode 100644 index 0000000000000000000000000000000000000000..02a4e2a7390ed926217c7a419047e7e7e4c73626 --- /dev/null +++ b/drivers/i2c/fi2c_os.c @@ -0,0 +1,383 @@ +/* + * Copyright : (C) 2022 Phytium Information Technology, Inc. + * All Rights Reserved. + * + * This program is OPEN SOURCE software: you can redistribute it and/or modify it + * under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd, + * either version 1.0 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the Phytium Public License for more details. + * + * + * FilePath: fi2c_os.c + * Date: 2022-07-15 10:43:29 + * LastEditTime: 2022-07-15 10:43:29 + * Description:  This file is for + * + * Modify History: + * Ver   Who        Date         Changes + * ----- ------     --------    -------------------------------------- + */ + +#include +#include +#include "fi2c_os.h" +#include "finterrupt.h" +#include "ftypes.h" +#include "sdkconfig.h" +#include "fcpu_info.h" +#include "fparameters.h" +#include "fi2c.h" +#include "fi2c_hw.h" +#include "fdebug.h" +#include "fpinctrl.h" +#if defined(CONFIG_TARGET_E2000) +#include "fmio_hw.h" +#include "fmio.h" +#include "fiopad.h" +#endif + +#if defined(CONFIG_TARGET_E2000) +static FMioCtrl i2c_master; +static FMioCtrl i2c_slave; +static FFreeRTOSI2c os_i2c[FMIO_NUM] = {0}; +#endif + +#if defined(CONFIG_TARGET_D2000) || defined(CONFIG_TARGET_F2000_4) +static FFreeRTOSI2c os_i2c[FI2C_NUM] = {0}; +#endif +/* virtual eeprom memory */ + + +static void FI2cMasterSlaveSetIoMux(u32 instance_id) +{ + /* D2000 use */ +#if defined(CONFIG_TARGET_D2000) + switch (instance_id) + { + case FI2C0_ID: + FPinSetFunc(FIOCTRL_I2C0_SCL_PAD, FPIN_FUNC0); + FPinSetFunc(FIOCTRL_I2C0_SDA_PAD, FPIN_FUNC0); + break; + case FI2C1_ID: + FPinSetFunc(FIOCTRL_ALL_PLL_LOCK_PAD, FPIN_FUNC2); + FPinSetFunc(FIOCTRL_CRU_CLK_OBV_PAD, FPIN_FUNC2); + break; + case FI2C2_ID: + FPinSetFunc(FIOCTRL_SWDO_SWJ_PAD, FPIN_FUNC2); + FPinSetFunc(FIOCTRL_TDO_SWJ_IN_PAD, FPIN_FUNC2); + break; + case FI2C3_ID: + FPinSetFunc(FIOCTRL_HDT_MB_DONE_STATE_PAD, FPIN_FUNC2); + FPinSetFunc(FIOCTRL_HDT_MB_FAIL_STATE_PAD, FPIN_FUNC2); + break; + default: + FASSERT(0); + break; + } +#endif +#if defined(CONFIG_TARGET_F2000_4) + FPinIndex sclpad_off, sdapad_off; + FPinFunc scl_fun, sda_fun; + switch (instance_id) + { + case FI2C0_ID: + sclpad_off = FIOCTRL_I2C0_SCL_PAD; /* i2c0-scl: func 0 */ + sdapad_off = FIOCTRL_I2C0_SDA_PAD; /* i2c0-sda: func 0 */ + scl_fun = FPIN_FUNC0; + sda_fun = FPIN_FUNC0; + break; + case FI2C1_ID: + sclpad_off = FIOCTRL_ALL_PLL_LOCK_PAD; /* i2c1-scl: func 2 */ + sdapad_off = FIOCTRL_CRU_CLK_OBV_PAD; /* i2c1-sda: func 2 */ + scl_fun = FPIN_FUNC2; + sda_fun = FPIN_FUNC2; + break; + case FI2C2_ID: + sclpad_off = FIOCTRL_SWDO_SWJ_PAD; /* i2c2-scl: func 2 */ + sdapad_off = FIOCTRL_TDO_SWJ_IN_PAD; /* i2c2-sda: func 2 */ + scl_fun = FPIN_FUNC2; + sda_fun = FPIN_FUNC2; + break; + case FI2C3_ID: + sclpad_off = FIOCTRL_HDT_MB_DONE_STATE_PAD; /* i2c3-scl: func 2 */ + sdapad_off = FIOCTRL_HDT_MB_FAIL_STATE_PAD; /* i2c3-sda: func 2 */ + scl_fun = FPIN_FUNC2; + sda_fun = FPIN_FUNC2; + break; + default: + FASSERT(0); + break; + } + FPinSetFunc(sclpad_off, scl_fun); + FPinSetFunc(sdapad_off, sda_fun); +#endif +} + + +/** + * @name: FI2cOsSetupInterrupt + * @msg: 设置i2c中断 + * @return {*} + * @param {FI2c} *pctrl + */ +static void FI2cOsSetupInterrupt(FI2c *pctrl) +{ + FASSERT(pctrl); + FI2cConfig *pconfig = &pctrl->config; + u32 cpu_id; + FError err = FREERTOS_I2C_SUCCESS; + + GetCpuId(&cpu_id); + vPrintf("cpu_id is %d \r\n",cpu_id); + InterruptSetTargetCpus(pconfig->irq_num, cpu_id); + + /* interrupt init */ + /* umask i2c irq */ + InterruptSetPriority(pconfig->irq_num, pconfig->irq_prority); + /* enable irq */ + InterruptUmask(pconfig->irq_num); +} + +static void FI2cOsResetInterrupt(FI2c *pctrl) +{ + FASSERT(pctrl); + /* disable irq */ + InterruptMask(pctrl->config.irq_num); +} + +/** + * @name: FFreeRTOSI2cInit + * @msg: init freeRTOS i2c instance + * @return {FFreeRTOSI2c *}pointer to os i2c instance + * @param {u32} instance_id,i2c instance_id + */ +FFreeRTOSI2c *FFreeRTOSI2cInit(u32 instance_id,u32 work_mode,u32 slave_address,u32 speed_rate) +{ + FASSERT((os_i2c[instance_id].wr_semaphore = xSemaphoreCreateMutex()) != NULL); + FASSERT((os_i2c[instance_id].trx_event = xEventGroupCreate()) != NULL); + + FError err = FREERTOS_I2C_SUCCESS; + + FI2cConfig i2c_config; + + /* E2000 use MIO -> I2C */ +#if defined(CONFIG_TARGET_E2000) + FASSERT(instance_id < FMIO_NUM); + + if(FT_COMPONENT_IS_READY == os_i2c[instance_id].i2c_device.is_ready) + { + vPrintf("I2c device %d is already initialized.\r\n",instance_id); + return NULL; + } + + const FMioConfig *mio_config_p ; + FMioCtrl *pctrl; + if (work_mode == FI2C_MASTER) + { + pctrl = &i2c_master; + } + else + { + pctrl = &i2c_slave; + } + + i2c_config = *FI2cLookupConfig(0); + /* Setup iomux */ + mio_config_p = FMioLookupConfig(instance_id); + if (NULL == mio_config_p) + { + vPrintf("config of mio_i2c instance %d non found\r\n", instance_id); + return NULL; + } + + + pctrl->config = *mio_config_p; + + err = FMioFuncInit(pctrl, FMIO_FUNC_SET_I2C); + if(err != FREERTOS_I2C_SUCCESS) + { + vPrintf("Mio I2c initialize is error.\r\n "); + return NULL; + } + + /* Modify configuration */ + i2c_config.work_mode = work_mode; + i2c_config.slave_addr = slave_address; + i2c_config.speed_rate = speed_rate; + + if (work_mode == FI2C_MASTER)/* 主机中断优先级低于从机接收 */ + { + i2c_config.instance_id = i2c_master.config.instance_id; + i2c_config.base_addr = i2c_master.config.func_base_addr; + i2c_config.irq_num = i2c_master.config.irq_num; + i2c_config.irq_prority = I2C_MASTER_IRQ_PRORITY; + } + else + { + i2c_config.instance_id = i2c_slave.config.instance_id; + i2c_config.base_addr = i2c_slave.config.func_base_addr; + i2c_config.irq_num = i2c_slave.config.irq_num; + i2c_config.irq_prority = I2C_SLAVE_IRQ_PRORITY; + } + FIOPadSetMioMux(i2c_config.instance_id); +#endif +#if defined(CONFIG_TARGET_D2000) + FASSERT(instance_id < FI2C_NUM); + + if(FT_COMPONENT_IS_READY == os_i2c[instance_id].i2c_device.is_ready) + { + vPrintf("I2c device %d is already initialized.\r\n",instance_id); + return NULL; + } + + i2c_config = *FI2cLookupConfig(instance_id); + if (work_mode == FI2C_MASTER) /* 主机中断优先级低于从机接收 */ + { + i2c_config.irq_prority = I2C_MASTER_IRQ_PRORITY; + } + else + { + i2c_config.irq_prority = I2C_SLAVE_IRQ_PRORITY; + } + /* Modify configuration */ + i2c_config.work_mode = work_mode; + i2c_config.slave_addr = slave_address; + i2c_config.speed_rate = speed_rate; + /* Setup iomux */ + FI2cMasterSlaveSetIoMux(instance_id); +#endif + err = FI2cCfgInitialize(&os_i2c[instance_id].i2c_device, &i2c_config); + if (err != FREERTOS_I2C_SUCCESS) + { + vPrintf("I2c Init failed.\r\n"); + return NULL; + } + /* 从机模式,开中断接收数据 */ + if (work_mode == FI2C_SLAVE) + { + FI2cOsSetupInterrupt(&os_i2c[instance_id].i2c_device); + } + return (&os_i2c[instance_id]); +} + +/** + * @name: FFreeRTOSI2cDeinit + * @msg: deinit freeRTOS i2c instance, include deinit i2c and delete mutex semaphore + * @return {*}无 + * @param {FFreeRTOSI2c} *os_i2c_p,pointer to os i2c instance + */ +void FFreeRTOSI2cDeinit(FFreeRTOSI2c *os_i2c_p) +{ + FASSERT(os_i2c_p); + FASSERT(os_i2c_p->wr_semaphore != NULL); +#if defined(CONFIG_TARGET_E2000) + FMioCtrl *pctrl = &i2c_master; + FMioFuncDeinit(pctrl); +#endif + /* 避免没有关闭中断,存在触发 */ + InterruptMask(os_i2c_p->i2c_device.config.irq_num); + FI2cDeInitialize(&os_i2c_p->i2c_device); + + FASSERT_MSG(NULL != os_i2c_p->wr_semaphore, "semaphore not exists !!!"); + vSemaphoreDelete(os_i2c_p->wr_semaphore); + os_i2c_p->wr_semaphore = NULL; + + FASSERT_MSG(NULL != os_i2c_p->trx_event, "event group not exists !!!"); + vEventGroupDelete(os_i2c_p->trx_event); + os_i2c_p->trx_event = NULL; +} + +/** + * @name: FFreeRTOSI2cTransfer + * @msg: tranfer i2c mesage + * @return {*} + * @param {u32} instance_id + * @param {FFreeRTOSI2cMessage} *message + * @param {u8} mode + */ +FError FFreeRTOSI2cTransfer(FFreeRTOSI2c *os_i2c_p, FFreeRTOSI2cMessage *message) +{ + FASSERT(os_i2c_p); + FASSERT(message); + FASSERT(os_i2c_p->wr_semaphore != NULL); + FASSERT(message->mode < FI2C_READ_DATA_MODE_NUM); + + if (pdFALSE == xSemaphoreTake(os_i2c_p->wr_semaphore, portMAX_DELAY)) + { + vPrintf("I2c xSemaphoreTake failed.\r\n"); + return FREERTOS_I2C_MESG_ERROR; + } + + FError ret = FREERTOS_I2C_SUCCESS; + FI2c *instance_p = &os_i2c_p->i2c_device; + EventBits_t ev; + + /* Judge whether the slave address has changed */ + if (instance_p->config.slave_addr != message->slave_addr) + { + instance_p->config.slave_addr = message->slave_addr; + } + + if (message->mode == FI2C_READ_DATA_POLL) + { + memset(message->buf, 0, message->buf_length); + ret = FI2cMasterReadPoll(instance_p, message->mem_addr, message->mem_byte_len, message->buf, message->buf_length); + } + else if (message->mode == FI2C_READ_DATA_INTR) + { + FI2cOsSetupInterrupt(instance_p); + memset(message->buf, 0, message->buf_length); + ret = FI2cMasterReadIntr(instance_p, message->mem_addr, message->mem_byte_len, message->buf, message->buf_length); + ev = xEventGroupWaitBits(os_i2c_p->trx_event,RTOS_I2C_TRANS_ABORTED | RTOS_I2C_READ_DONE,pdTRUE, pdFALSE, portMAX_DELAY); + if (ev & RTOS_I2C_TRANS_ABORTED) + { + vPrintf( "RTOS_I2C_TRANS_ABORTED "); + ret = FREERTOS_I2C_TASK_ERROR; + } + else if(ev & RTOS_I2C_READ_DONE) + { + vPrintf("RTOS_I2C_READ_DONE,data_lenth:0d%d.\r\n", message->buf_length); + } + FI2cOsResetInterrupt(instance_p); + } + else if (message->mode == FI2C_WRITE_DATA_POLL) + { + ret = FI2cMasterWritePoll(instance_p, message->mem_addr, message->mem_byte_len, message->buf, message->buf_length); + } + else if (message->mode == FI2C_WRITE_DATA_INTR) + { + FI2cOsSetupInterrupt(instance_p); + ret = FI2cMasterWriteIntr(instance_p, message->mem_addr, message->mem_byte_len, message->buf, message->buf_length); + /* wait intr is finish */ + ev = xEventGroupWaitBits(os_i2c_p->trx_event,RTOS_I2C_TRANS_ABORTED | RTOS_I2C_WRITE_DONE,pdTRUE, pdFALSE, portMAX_DELAY); + if (ev & RTOS_I2C_TRANS_ABORTED) + { + vPrintf("RTOS_I2C_TRANS_ABORTED "); + ret = FREERTOS_I2C_TASK_ERROR; + } + else if(ev & RTOS_I2C_WRITE_DONE) + { + vPrintf("RTOS_I2C_WRITE_DONE,data_lenth:0d%d.\r\n", message->buf_length); + } + FI2cOsResetInterrupt(instance_p); + } + + /* Enable next transfer. Current one is finished */ + if (pdFALSE == xSemaphoreGive(os_i2c_p->wr_semaphore)) + { + /* We could not post the semaphore, exit with error */ + vPrintf("FFreeRTOSI2cTransfer function xSemaphoreGive failed.\r\n"); + return FREERTOS_I2C_MESG_ERROR; + } + + if (ret != FREERTOS_I2C_SUCCESS) + { + vPrintf("FFreeRTOSI2cTransfer error,id:%d.\r\n",instance_p->config.instance_id); + return FREERTOS_I2C_TASK_ERROR; + } + return ret; +} + diff --git a/drivers/i2c/fi2c_os.h b/drivers/i2c/fi2c_os.h new file mode 100644 index 0000000000000000000000000000000000000000..200a1d0f061cf878e1fb8cc0a2fc7ceebca865b6 --- /dev/null +++ b/drivers/i2c/fi2c_os.h @@ -0,0 +1,120 @@ +/* + * Copyright : (C) 2022 Phytium Information Technology, Inc. + * All Rights Reserved. + * + * This program is OPEN SOURCE software: you can redistribute it and/or modify it + * under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd, + * either version 1.0 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the Phytium Public License for more details. + * + * + * FilePath: fi2c_os.h + * Date: 2022-07-15 10:43:51 + * LastEditTime: 2022-07-15 10:43:51 + * Description:  This file is for + * + * Modify History: + * Ver   Who        Date         Changes + * ----- ------     --------    -------------------------------------- + * 0.0.1 liushengming 2022/07/15 init + */ +#ifndef DRIVERS_FI2C_OS_H +#define DRIVERS_FI2C_OS_H + +#ifdef __cplusplus +extern "C" +{ +#endif + +/***************************** Include Files *********************************/ +#include +#include +#include +#include "ferror_code.h" +#include "fi2c.h" +#include "fi2c_hw.h" +#include "ftypes.h" + +/************************** Constant Definitions *****************************/ +/*Error code from standalone i2c driver*/ +#define FREERTOS_I2C_SUCCESS FI2C_SUCCESS +#define FREERTOS_I2C_INVAILD_PARAM_ERROR FI2C_ERR_INVAL_PARM +#define FREERTOS_I2C_NOT_READY_ERROR FI2C_ERR_NOT_READY +#define FREERTOS_I2C_TIMEOUT_ERROR FI2C_ERR_TIMEOUT +#define FREERTOS_I2C_NOT_SUPPORT_ERROR FI2C_ERR_NOT_SUPPORT +#define FREERTOS_I2C_INVAL_STATE_ERROR FI2C_ERR_INVAL_STATE + +/*Error code depend on OS standard*/ +#define FREERTOS_I2C_TASK_ERROR FT_CODE_ERR(ErrModPort, ErrBspI2c, 0x1) +#define FREERTOS_I2C_MESG_ERROR FT_CODE_ERR(ErrModPort, ErrBspI2c, 0x2) +#define FREERTOS_I2C_TIME_ERROR FT_CODE_ERR(ErrModPort, ErrBspI2c, 0x3) +#define FREERTOS_I2C_MEMY_ERROR FT_CODE_ERR(ErrModPort, ErrBspI2c, 0x4) + +/*! +* @cond RTOS_PRIVATE +* @name I2C FreeRTOS handler +* +* These are the only valid states for txEvent and rxEvent +*/ +/*@{*/ +/*! @brief Event flag - transfer complete. */ +#define RTOS_I2C_READ_DONE 0x1 +/*! @brief Event flag - hardware buffer overrun. */ +#define RTOS_I2C_WRITE_DONE 0x2 +/*! @brief Event flag Receive is error */ +#define RTOS_I2C_TRANS_ABORTED 0x4 + +#define I2C_MASTER_IRQ_PRORITY 0xc +#define I2C_SLAVE_IRQ_PRORITY 0xb + +#define IO_BUF_LEN 256 + +/************************** Variable Definitions *****************************/ +/** + * iic message structure + */ +typedef struct +{ + void *buf; /* i2c read or write buffer */ + size_t buf_length; /* i2c read or write buffer length */ + u32 slave_addr; /* i2c slave addr,you can change slave_addr to send different device in the bus*/ + u32 mem_addr; /* i2c slave address offset to read or write */ + u8 mem_byte_len; /* sizeof slave address */ + volatile u8 mode; /* transport mode */ +} FFreeRTOSI2cMessage; + +typedef struct +{ + FI2c i2c_device; + SemaphoreHandle_t wr_semaphore; /* i2c read and write semaphore for resource sharing */ + EventGroupHandle_t trx_event; /* i2c TX/RX completion event */ +}FFreeRTOSI2c; + +enum /*选择操作I2C的方式*/ +{ + FI2C_READ_DATA_POLL, + FI2C_READ_DATA_INTR, + FI2C_WRITE_DATA_POLL, + FI2C_WRITE_DATA_INTR, + + FI2C_READ_DATA_MODE_NUM +}; + +/************************** Function Prototypes ******************************/ +/* init freeRTOS i2c instance */ +FFreeRTOSI2c *FFreeRTOSI2cInit(u32 instance_id,u32 work_mode,u32 slave_address,u32 speed_rate); + +/* deinit freeRTOS i2c instance */ +void FFreeRTOSI2cDeinit(FFreeRTOSI2c *os_i2c_p); + +/* tranfer i2c mesage */ +FError FFreeRTOSI2cTransfer(FFreeRTOSI2c *os_i2c_p, FFreeRTOSI2cMessage *message); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/drivers/mmc/fsdio/fsdio_os.h b/drivers/mmc/fsdio/fsdio_os.h deleted file mode 100644 index 52836e70363230d1315753125eb47936a6a083a7..0000000000000000000000000000000000000000 --- a/drivers/mmc/fsdio/fsdio_os.h +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright : (C) 2022 Phytium Information Technology, Inc. - * All Rights Reserved. - * - * This program is OPEN SOURCE software: you can redistribute it and/or modify it - * under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd, - * either version 1.0 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the Phytium Public License for more details. - * - * - * FilePath: fsdio_os.h - * Date: 2022-07-25 09:14:34 - * LastEditTime: 2022-07-25 09:14:34 - * Description:  This files is for - * - * Modify History: - * Ver   Who        Date         Changes - * ----- ------     --------    -------------------------------------- - * 1.0 zhugengyu 2022/7/27 init commit - */ -#ifndef DRIVERS_FSDIO_OS_H -#define DRIVERS_FSDIO_OS_H - -#ifdef __cplusplus -extern "C" -{ -#endif - -/***************************** Include Files *********************************/ -#include -#include -#include - -#include "fkernel.h" -#include "fparameters.h" -#include "fsdio.h" - -/************************** Constant Definitions *****************************/ -#define FFREERTOS_SDIO_OK FT_SUCCESS -#define FFREERTOS_SDIO_SEMA_ERR FT_CODE_ERR(ErrModPort, ErrBspMmc, 1) -#define FFREERTOS_SDIO_HOST_ERR FT_CODE_ERR(ErrModPort, ErrBspMmc, 2) -#define FFREERTOS_SDIO_EVT_ERR FT_CODE_ERR(ErrModPort, ErrBspMmc, 3) -#define FFREERTOS_SDIO_READ_ERR FT_CODE_ERR(ErrModPort, ErrBspMmc, 4) -#define FFREERTOS_SDIO_WRITE_ERR FT_CODE_ERR(ErrModPort, ErrBspMmc, 5) - -#define FFREERTOS_SDIO_IRQ_PRIORITY IRQ_PRIORITY_VALUE_12 - -#define FFREERTOS_SDIO_MEDIUM_TF 0U /* sdio medium is tf card */ -#define FFREERTOS_SDIO_MEDIUM_EMMC 1U /* sdio medium is emmc */ - -#define FFREERTOS_SDIO_TRANS_READ 0U /* sdio trans direction is read */ -#define FFREERTOS_SDIO_TRANS_WRITE 1U /* sdio trans direction is write */ - -#define FFREERTOS_SDIO_MAX_TRANS_BLOCK 64U /* max num of block involved in one transfer */ -#define FFREERTOS_SDIO_BLOCK_SIZE FSDIO_DEFAULT_BLOCK_SZ - -#define FFREERTOS_SDIO_CMD_TIMEOUT 5000U -/**************************** Type Definitions *******************************/ -typedef struct -{ - boolean en_dma; /* TRUE: data transfer in DMA mode, FALSE: PIO mode */ - u32 medium_type; /* use FFREERTOS_SDIO_MEDIUM_* */ - FSdioEvtHandler card_detect_handler; /* callback for card detect status change */ - void *card_detect_args; -} FFreeRTOSSdioConifg; /* freertos sdio config */ - -typedef struct -{ - FSdio ctrl; - FFreeRTOSSdioConifg config; - SemaphoreHandle_t locker; - EventGroupHandle_t evt; -#define FFREERTOS_SDIO_CMD_TRANS_DONE (0x1 << 0) /* evt bit when command / data finished */ -#define FFREERTOS_SDIO_DAT_TRANS_DONE (0x1 << 1) -#define FFREERTOS_SDIO_ERROR_OCCURRED (0x1 << 2) /* evt bit when ctrl in error occurred */ - void *host_data; /* store private data of card and host */ - volatile FSdioIDmaDesc rw_desc[FFREERTOS_SDIO_MAX_TRANS_BLOCK]; /* dma descriptor entry */ - FSdioCmdData cmd_data; /* command information */ - FSdioData trans_data; /* data information */ -} FFreeRTOSSdio; /* freertos sdio instance */ - -typedef struct -{ - uintptr start_block; /* block to start read/write */ - fsize_t block_num; /* num of block to read/write */ - u8 *buf; /* buffer read from / write to */ - fsize_t buf_len; /* bytes of buffer contents */ - u32 trans_type; /* use FFREERTOS_SDIO_TRANS_* */ -} FFreeRTOSSdioMessage; /* freertos sdio transfer message */ - -/************************** Variable Definitions *****************************/ - -/***************** Macros (Inline Functions) Definitions *********************/ - -/************************** Function Prototypes ******************************/ - -/*****************************************************************************/ -/* init and get sdio instance */ -FFreeRTOSSdio *FFreeRTOSSdioInit(u32 instance_id, const FFreeRTOSSdioConifg *config); - -/* deinit sdio instance */ -FError FFreeRTOSSdioDeInit(FFreeRTOSSdio *const instance); - -/* start sdio transfer and wait transfer done in this function */ -FError FFreeRTOSSdioTransfer(FFreeRTOSSdio *const instance, const FFreeRTOSSdioMessage *message); - - -#ifdef __cplusplus -} -#endif - -#endif \ No newline at end of file diff --git a/drivers/pwm/fpwm_os.c b/drivers/pwm/fpwm_os.c index 37f42fef2eb91d83d79203d63d9312d212f8367d..233b1a88a526def356b89931226b61a410635beb 100644 --- a/drivers/pwm/fpwm_os.c +++ b/drivers/pwm/fpwm_os.c @@ -39,7 +39,7 @@ #define FPWM_INFO(format, ...) FT_DEBUG_PRINT_I(FPWM_DEBUG_TAG, format, ##__VA_ARGS__) #define FPWM_DEBUG(format, ...) FT_DEBUG_PRINT_D(FPWM_DEBUG_TAG, format, ##__VA_ARGS__) -static FFreeRTOSPwm os_pwm[FPWM_INSTANCE_NUM] = {0}; +static FFreeRTOSPwm os_pwm[FPWM_NUM] = {0}; /** * @name: FFreeRTOSPwmInit @@ -49,7 +49,7 @@ static FFreeRTOSPwm os_pwm[FPWM_INSTANCE_NUM] = {0}; */ FFreeRTOSPwm *FFreeRTOSPwmInit(u32 instance_id) { - FASSERT(instance_id < FPWM_INSTANCE_NUM); + FASSERT(instance_id < FPWM_NUM); FASSERT(FT_COMPONENT_IS_READY != os_pwm[instance_id].pwm_ctrl.is_ready); FPwmConfig pconfig; diff --git a/drivers/qspi/fqspi_os.c b/drivers/qspi/fqspi_os.c index 25b97b86562b74930c93349dad21528890fea020..e005b5bed6998e762efe7e5b23baaeb20e092b6d 100644 --- a/drivers/qspi/fqspi_os.c +++ b/drivers/qspi/fqspi_os.c @@ -32,17 +32,17 @@ #include "fqspi_hw.h" #include "fqspi_flash.h" -static FFreeRTOSQspi os_qspi[FQSPI_INSTANCE_NUM] = {0}; +static FFreeRTOSQspi os_qspi[FQSPI_NUM] = {0}; /** * @name: FFreeRTOSQspiInit * @msg: init freertos qspi instance, include init qspi and create mutex - * @param {u32} instance_id, qspi instance id, such as FQSPI_INSTANCE_0 + * @param {u32} instance_id, qspi instance id, such as FQSPI0_ID * @return {FFreeRTOSQspi *} pointer to os qspi instance */ FFreeRTOSQspi *FFreeRTOSQspiInit(u32 instance_id) { - FASSERT(instance_id < FQSPI_INSTANCE_NUM); + FASSERT(instance_id < FQSPI_NUM); FASSERT(FT_COMPONENT_IS_READY != os_qspi[instance_id].qspi_ctrl.is_ready); /* qspi initialize */ diff --git a/drivers/spi/fspim/fspim_os.c b/drivers/spi/fspim/fspim_os.c index e5bd91b3cd5ea46645807719922e0a93437a90fb..1aed7481a22dc28f8db1624624ecd6a391f8add3 100644 --- a/drivers/spi/fspim/fspim_os.c +++ b/drivers/spi/fspim/fspim_os.c @@ -42,7 +42,7 @@ /**************************** Type Definitions *******************************/ /************************** Variable Definitions *****************************/ -static FFreeRTOSSpim spim[FSPI_DEVICE_NUM]; +static FFreeRTOSSpim spim[FSPI_NUM]; /***************** Macros (Inline Functions) Definitions *********************/ #define FSPIM_DEBUG_TAG "FSPIM-OS" @@ -118,7 +118,7 @@ static void FSpimOSSetupInterrupt(FSpim *ctrl) FFreeRTOSSpim *FFreeRTOSSpimInit(u32 id, const FFreeRTOSSpimConifg *input_config) { FASSERT(input_config); - FASSERT_MSG(id < FSPI_DEVICE_NUM, "invalid spim id"); + FASSERT_MSG(id < FSPI_NUM, "invalid spim id"); FFreeRTOSSpim *instance = &spim[id]; FSpim *ctrl = &instance->ctrl; FSpimConfig config; diff --git a/drivers/timer/ftimer_tacho_os.c b/drivers/timer/ftimer_tacho_os.c new file mode 100644 index 0000000000000000000000000000000000000000..976577821ed712982ec2840aa06ca96cfdc7f51b --- /dev/null +++ b/drivers/timer/ftimer_tacho_os.c @@ -0,0 +1,481 @@ +/* + * Copyright : (C) 2022 Phytium Information Technology, Inc. + * All Rights Reserved. + * + * This program is OPEN SOURCE software: you can redistribute it and/or modify it + * under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd, + * either version 1.0 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the Phytium Public License for more details. + * + * + * FilePath: ftimer_tacho_os.c + * Date: 2022-08-23 17:20:51 + * LastEditTime: 2022-08-23 17:20:51 + * Description:  This file is for + * + * Modify History: + * Ver   Who        Date         Changes + * ----- ------     --------    -------------------------------------- + */ + +#include +#include "fkernel.h" +#include "ftimer_tacho.h" +#include "ftimer_tacho_os.h" +#include "fparameters.h" +#include "finterrupt.h" +#include "fsleep.h" +#include "fassert.h" +#include "fpinctrl.h" +#include "fpinctrl.h" + +#define FTACHO_OS_DEBUG_TAG "FFreeRTOSTacho" +#define FTACHO_OS_ERROR(format, ...) FT_DEBUG_PRINT_E(FTACHO_OS_DEBUG_TAG, format, ##__VA_ARGS__) +#define FTACHO_OS_WARN(format, ...) FT_DEBUG_PRINT_W(FTACHO_OS_DEBUG_TAG, format, ##__VA_ARGS__) +#define FTACHO_OS_INFO(format, ...) FT_DEBUG_PRINT_I(FTACHO_OS_DEBUG_TAG, format, ##__VA_ARGS__) +#define FTACHO_OS_DEBUG(format, ...) FT_DEBUG_PRINT_D(FTACHO_OS_DEBUG_TAG, format, ##__VA_ARGS__) + +#define FTIMER_OS_DEBUG_TAG "FFreeRTOSTimer" +#define FTIMER_OS_ERROR(format, ...) FT_DEBUG_PRINT_E(FTIMER_OS_DEBUG_TAG, format, ##__VA_ARGS__) +#define FTIMER_OS_WARN(format, ...) FT_DEBUG_PRINT_W(FTIMER_OS_DEBUG_TAG, format, ##__VA_ARGS__) +#define FTIMER_OS_INFO(format, ...) FT_DEBUG_PRINT_I(FTIMER_OS_DEBUG_TAG, format, ##__VA_ARGS__) +#define FTIMER_OS_DEBUG(format, ...) FT_DEBUG_PRINT_D(FTIMER_OS_DEBUG_TAG, format, ##__VA_ARGS__) + +/************************** Constant Definitions *****************************/ +/*Notice:timer are 38U,tacho nums only FTACHO_NUM = 16U,but they use the same controller num 0~15. */ +static FFreeRTOSTimerTacho os_timer_tacho[38] = {0}; + +#define MAX_32_VAL GENMASK(31, 0) +#define MAX_64_VAL GENMASK_ULL(63, 0) +#define TACHO_MAX 10000 +#define TACHO_MIN 10 +#define TACHO_PERIOD 1000000 /* 1000000/50000000 = 0.02s 20ms ticks period at 50Mhz pclk*/ + +#define US2TICKS(us) ((FTIMER_CLK_FREQ_HZ * (us) / 1000000ULL ) + 1ULL) +#define MS2TICKS(ms) (US2TICKS(1000ULL) * (ms)) + +/************************** Variable Definitions *****************************/ + +typedef struct +{ + u32 id; /* id of tacho */ + boolean work_mode; /*tacho or capture*/ + boolean bits32; /*otherwise 64 bit*/ + boolean restart_mode; /*otherwise free-run*/ + u8 edge_mode; /* rising falling or double edge*/ + u8 jitter_level; /* anti_jitter_number 0~3 */ + u32 plus_num; /* plus_num of period to calculate rpm */ +} FFreeRTOSTachoConfigs; + +typedef struct +{ + u32 id; /* id of timer */ + boolean bits32; /*otherwise 64 bit*/ + boolean restartmode; /*otherwise free-run*/ + boolean cyc_cmp; /*otherwise once cmp*/ + boolean clear_cnt; /*otherwise not clear*/ + boolean forceload; /*otherwise not force-load*/ + u32 startcnt; /*start cnt num*/ + u32 cmptick32; /*32bit cnt num*/ + u64 cmptick64; /*64bit cnt num*/ +} FFreeRTOSTimerConfigs; + +static FFreeRTOSTimerConfigs timercfg; +static FFreeRTOSTachoConfigs tachocfg; + +/************************** Function Prototypes ******************************/ + +/** + * @name: FTimerCfgInit + * @msg: 加载转换后配置项,并完成初始化操作,定时器处于就绪状态 + * @return {FError} 驱动初始化的错误码信息,FTIMER_TACHO_SUCCESS 表示初始化成功,其它返回值表示初始化失败 + * @param {TimerTestConfigs} *timercfg_p 可操作的配置参数结构体 + */ +static FError FTimerCfgInit(const FFreeRTOSTimerConfigs *timercfg_p,FTimerTachoCtrl *timer) +{ + FASSERT(timercfg_p); + FASSERT(timer); + FError ret = FREERTOS_TIMER_TACHO_SUCCESS; + + FTimerTachoConfig *pconfig = &timer->config; + + FTimerGetDefConfig(timercfg_p->id, pconfig); + + if (timercfg_p->restartmode) + { + pconfig->timer_mode = FTIMER_RESTART; + } + else + { + pconfig->timer_mode = FTIMER_FREE_RUN; + } + + if (timercfg_p->bits32) + { + pconfig->timer_bits = FTIMER_32_BITS; + } + else + { + pconfig->timer_bits = FTIMER_64_BITS; + } + + if (timercfg_p->cyc_cmp) + { + pconfig->cmp_type = FTIMER_CYC_CMP; + } + else + { + pconfig->cmp_type = FTIMER_ONCE_CMP; + } + + ret = FTimerInit(timer, pconfig); + if(FREERTOS_TIMER_TACHO_SUCCESS != ret) + { + return ret; + } + + /*将时间参数us装换成计时器的ticks,我们设置StartTick,将CmpTick设置为最大*/ + ret = FTimerSetStartVal(timer, timercfg.startcnt); + if(FREERTOS_TIMER_TACHO_SUCCESS != ret) + { + return ret; + } + + if (timercfg_p->bits32) + ret |= FTimerSetPeriod32(timer, timercfg.cmptick32); + else + ret |= FTimerSetPeriod64(timer, timercfg.cmptick64); + + printf("Timer Init finished.\r\n"); + + return ret; +} + +/** + * @name: FTimerFunctionInit + * @msg: timer init. + * @param {u8}id :use 0~37 timer + * @param {boolean}timer_mode:单次定时还是循环定时 + * @param {u64}times:定时时间,单位us + * @return {FFreeRTOSSpim *} return + */ +FFreeRTOSTimerTacho* FFreeRTOSTimerInit(u32 id, boolean timer_mode, u64 times) +{ + FASSERT_MSG(id < FTIMER_NUM, "invalid timer id"); + FASSERT_MSG(FT_COMPONENT_IS_READY != os_timer_tacho[id].ctrl.isready,"timer_tacho ready"); + FFreeRTOSTimerTacho *instance = &os_timer_tacho[id]; + + FASSERT(FT_COMPONENT_IS_READY != os_timer_tacho[id].ctrl.isready); + FASSERT((instance->locker = xSemaphoreCreateMutex()) != NULL); + + u64 cnttick = 0; + FTimerTachoCtrl *timer = &instance->ctrl; + timercfg.id = id; + timercfg.cyc_cmp = timer_mode; + cnttick = US2TICKS(times); + FTIMER_OS_INFO("\n***cnttick:%llu.\r\n",cnttick); + if (cnttick > 0xffffffff) + { + timercfg.bits32 = FALSE; + timercfg.startcnt =MAX_64_VAL - cnttick; + } + else + { + timercfg.bits32 = TRUE; + timercfg.startcnt =MAX_32_VAL - cnttick; + } + /* Set CmpTick max value ,that we can easy to trigger RolloverIntr. */ + timercfg.cmptick32 = MAX_32_VAL; + timercfg.cmptick64 = MAX_64_VAL; + + if(FREERTOS_TIMER_TACHO_SUCCESS != FTimerCfgInit(&timercfg,timer)) + { + FTIMER_OS_ERROR("Timer config init failed.\r\n"); + return NULL; + } + return (&os_timer_tacho[id]); +} + +/** + * @name: FFTimerStartTest + * @msg: start timer. + * @param {u64 times,boolean forceLoad} + * @return {FError} + */ +FError FFreeRTOSTimerStart(FFreeRTOSTimerTacho *os_timer_p) +{ + FASSERT(NULL != os_timer_p->locker); + FError ret = FREERTOS_TIMER_TACHO_SUCCESS; + + FTimerTachoCtrl *timer = &os_timer_p->ctrl; + + if (pdFALSE == xSemaphoreTake(os_timer_p->locker, portMAX_DELAY)) + { + FTIMER_OS_ERROR("Timer xSemaphoreTake failed\r\n"); + /* We could not take the semaphore, exit with 0 data received */ + return FREERTOS_TIMER_TACHO_SEMA_ERROR; + } + + ret = FTimerStart(timer); + if(FREERTOS_TIMER_TACHO_SUCCESS != ret) + { + return ret; + } + return ret; +} + + +/** + * @name: FFreeRTOSTimerStop + * @msg: + * @return {*} + * @param {FFreeRTOSTimerTacho} *os_timer_p + */ +FError FFreeRTOSTimerStop(FFreeRTOSTimerTacho *os_timer_p) +{ + FASSERT(NULL != os_timer_p->locker); + + if (pdFALSE == xSemaphoreGive(os_timer_p->locker)) + { + /* We could not post the semaphore, exit with error */ + FTIMER_OS_ERROR("Timer xSemaphoreGive failed.\r\n"); + return FREERTOS_TIMER_TACHO_SEMA_ERROR; + } + FTimerTachoCtrl *timer = &os_timer_p->ctrl; + + return FTimerStop(timer); +} + + +/** + * @name: FFreeRTOSTimerDeinit + * @msg: + * @return {*} void + * @param {FFreeRTOSTimerTacho} *os_timer_p + */ +void FFreeRTOSTimerDeinit(FFreeRTOSTimerTacho *os_timer_p) +{ + FASSERT(NULL != os_timer_p->locker); + + FTimerDeInit(&os_timer_p->ctrl); + vSemaphoreDelete(os_timer_p->locker); + memset(os_timer_p, 0, sizeof(*os_timer_p)); + return; +} + + +/** + * @name: FFreeRTOSTimerDebug + * @msg: Dump timer reg message + * @return {*} + * @param {FFreeRTOSTimerTacho} *os_timer_p + */ +void FFreeRTOSTimerDebug(FFreeRTOSTimerTacho *os_timer_p) +{ + FASSERT(NULL != os_timer_p); + FTimeSettingDump(&os_timer_p->ctrl); + return; +} + + + +/**********************************************************************************************************/ +/***********************************************tacho******************************************************/ +/**********************************************************************************************************/ + +/** + * @name: FTachoCfgInit + * @msg: 添加配置 + * @return {*} + * @param {FFreeRTOSTachoConfigs} *tachocfg_p + * @param {FTimerTachoCtrl} *tacho + */ +static FError FTachoCfgInit(const FFreeRTOSTachoConfigs *tachocfg_p,FTimerTachoCtrl *tacho) +{ + FASSERT(tachocfg_p); + FASSERT(tacho); + FError ret = FREERTOS_TIMER_TACHO_SUCCESS; + + FTimerTachoConfig *pconfig = &tacho->config; + memset(tacho, 0, sizeof(tacho)); + /* tacho */ + FTachoGetDefConfig(tachocfg_p->id,pconfig); + + if (tachocfg_p->work_mode == FTIMER_WORK_MODE_TACHO) + { + pconfig->work_mode = FTIMER_WORK_MODE_TACHO; + + if (tachocfg_p->bits32 == FTIMER_32_BITS) + { + pconfig->timer_bits = FTIMER_32_BITS; + } + else + { + pconfig->timer_bits = FTIMER_64_BITS; + } + + if(tachocfg_p->restart_mode) + { + pconfig->timer_mode = FTIMER_RESTART; + } + else + { + pconfig->timer_mode = FTIMER_FREE_RUN; + } + } + else + { + pconfig->work_mode = FTIMER_WORK_MODE_CAPTURE; + pconfig->captue_cnt = 0x7f;/* 边沿检测计数默认值 */ + } + + if(tachocfg_p->edge_mode == FTACHO_RISING_EDGE) + { + pconfig->edge_mode = FTACHO_RISING_EDGE; + } + else if(tachocfg_p->edge_mode == FTACHO_FALLING_EDGE) + { + pconfig->edge_mode = FTACHO_FALLING_EDGE; + } + else + { + pconfig->edge_mode = FTACHO_DOUBLE_EDGE; + } + + switch (tachocfg_p->jitter_level) + { + case FTACHO_JITTER_LEVEL0: + pconfig->jitter_level = FTACHO_JITTER_LEVEL0; + break; + case FTACHO_JITTER_LEVEL1: + pconfig->jitter_level = FTACHO_JITTER_LEVEL1; + break; + case FTACHO_JITTER_LEVEL2: + pconfig->jitter_level = FTACHO_JITTER_LEVEL2; + break; + case FTACHO_JITTER_LEVEL3: + pconfig->jitter_level = FTACHO_JITTER_LEVEL3; + break; + default: + pconfig->jitter_level = FTACHO_JITTER_LEVEL0; + break; + } + + if (tachocfg_p->plus_num != 0) + { + pconfig->plus_num = tachocfg_p->plus_num; + } + + ret = FTachoInit(tacho, pconfig); +} + +/** + * @name: FFreeRTOSTachoInit + * @msg: tacho or capture init function + * @return {*} + * @param {u32} id + * @param {boolean} tacho_mode + */ +FFreeRTOSTimerTacho* FFreeRTOSTachoInit(u32 id, boolean tacho_mode) +{ + FASSERT_MSG(id < FTACHO_NUM, "invalid timer id"); + FASSERT_MSG(FT_COMPONENT_IS_READY != os_timer_tacho[id].ctrl.isready,"timer_tacho ready"); + + FFreeRTOSTimerTacho *instance = &os_timer_tacho[id]; + FTimerTachoCtrl *tacho = &os_timer_tacho[id].ctrl; + + FASSERT((instance->locker = xSemaphoreCreateMutex()) != NULL); + + FError ret = FREERTOS_TIMER_TACHO_SUCCESS; + tachocfg.id = id; + tachocfg.edge_mode = FTACHO_RISING_EDGE;/* Not open operation interface for cmd */ + tachocfg.jitter_level = FTACHO_JITTER_LEVEL0;/* Not open operation interface for cmd */ + tachocfg.bits32 = FTIMER_32_BITS;/* Use capture mode, Not open operation interface for cmd.*/ + tachocfg.restart_mode = FTIMER_RESTART;/* Use capture mode, Not open operation interface for cmd.*/ + tachocfg.plus_num = TACHO_PERIOD; + if (tacho_mode == FTIMER_WORK_MODE_TACHO) + { + tachocfg.work_mode = FTIMER_WORK_MODE_TACHO; + } + else + { + tachocfg.work_mode = FTIMER_WORK_MODE_CAPTURE; + } + + FIOPadSetTachoMux(tachocfg.id); + + ret = FTachoCfgInit(&tachocfg,tacho); + if (ret != FREERTOS_TIMER_TACHO_SUCCESS) + { + FTACHO_OS_ERROR("Tacho config init failed.\r\n"); + return NULL; + } + + if (tacho_mode == FTIMER_WORK_MODE_TACHO) + { + /* Not open operation interface for cmd */ + FTachoSetOverLimit(tacho, TACHO_MAX); + FTachoSetUnderLimit(tacho, TACHO_MIN); + } + + return (&os_timer_tacho[id]); +} + +/** + * @name: FFreeRTOSTachoGetRPM + * @msg: get tacho RPM + * @return {*} + * @param {FFreeRTOSTimerTacho} *os_tacho_p + * @param {u32} *rpm + */ +FError FFreeRTOSTachoGetRPM(FFreeRTOSTimerTacho *os_tacho_p,u32 *rpm) +{ + FASSERT(NULL != os_tacho_p->locker); + FError ret = FREERTOS_TIMER_TACHO_SUCCESS; + + FTimerTachoCtrl *tacho = &os_tacho_p->ctrl; + + + ret = FTachoGetFanRPM(tacho,rpm); + if (ret != FREERTOS_TIMER_TACHO_SUCCESS) + { + FTIMER_OS_ERROR("Tachometer get error,please check init.\r\n"); + return ret; + } + return ret; +} + +/** + * @name: FFreeRTOSTachoGetCNT + * @msg: get capture value + * @return {*} + * @param {FFreeRTOSTimerTacho} *os_tacho_p + */ +u32 FFreeRTOSTachoGetCNT(FFreeRTOSTimerTacho *os_tacho_p) +{ + FASSERT(NULL != os_tacho_p->locker); + + FTimerTachoCtrl *tacho = &os_tacho_p->ctrl; + + return FTachoGetCaptureCnt(tacho); +} + +/** + * @name: FFreeRTOSTachoDeinit + * @msg: deinit tacho or capture + * @return {*} + * @param {FFreeRTOSTimerTacho} *os_tacho_p + */ +void FFreeRTOSTachoDeinit(FFreeRTOSTimerTacho *os_tacho_p) +{ + FASSERT(NULL != os_tacho_p->locker); + + FTachoDeInit(&os_tacho_p->ctrl); + vSemaphoreDelete(os_tacho_p->locker); + memset(os_tacho_p, 0, sizeof(*os_tacho_p)); + return; +} + diff --git a/third-party/sdmmc-1.0/port/fsdio/sdmmc_port.c b/drivers/timer/ftimer_tacho_os.h similarity index 37% rename from third-party/sdmmc-1.0/port/fsdio/sdmmc_port.c rename to drivers/timer/ftimer_tacho_os.h index 82056595f93b42a989816c50ca9f68d14bf24294..a891d0a2d51101dc9cd2008949ba988a70c4f040 100644 --- a/third-party/sdmmc-1.0/port/fsdio/sdmmc_port.c +++ b/drivers/timer/ftimer_tacho_os.h @@ -11,107 +11,78 @@ * See the Phytium Public License for more details. * * - * FilePath: sdmmc_port.c - * Date: 2022-07-25 09:58:29 - * LastEditTime: 2022-07-25 09:58:30 - * Description:  This files is for + * FilePath: ftimer_tacho_os.h + * Date: 2022-08-23 17:20:58 + * LastEditTime: 2022-08-23 17:20:58 + * Description:  This file is for * * Modify History: * Ver   Who        Date         Changes * ----- ------     --------    -------------------------------------- + * v0.1.0 liushengming 2022.08.24 init */ +#ifndef TACHO_H +#define TACHO_H + +#ifdef __cplusplus +extern "C" +{ +#endif + /***************************** Include Files *********************************/ + #include #include #include -#include "fmemory_pool.h" #include "fparameters.h" - -#include "sdmmc_port.h" -#include "sdmmc_cmd.h" -#include "sdmmc_defs.h" - +#include "ftimer_tacho.h" +#include "ftimer_tacho_hw.h" +#include "ftypes.h" /************************** Constant Definitions *****************************/ -#define SDMMC_ALIGNMENT 32U -#define SDMMC_DMA_BUF_SIZE 512U - -/* reserve more bytes for 64-bit */ -#if defined(__aarch64__) -#define SDMMC_MEM_BUF_SIZE 8192U * 2U -#else -#define SDMMC_MEM_BUF_SIZE 8192U -#endif -/**************************** Type Definitions *******************************/ +/*Error code from standalone tacho driver*/ +#define FREERTOS_TIMER_TACHO_SUCCESS FTIMER_TACHO_SUCCESS +#define FREERTOS_TIMER_TACHO_INVAILD_PARAM_ERROR FTIMER_TACHO_ERR_INVAL_PARM +#define FREERTOS_TIMER_TACHO_NOT_READY_ERROR FTIMER_TACHO_ERR_NOT_READY +#define FREERTOS_TIMER_TACHO_TIMEOUT_ERROR FTIMER_TACHO_ERR_INIT_FAILED +#define FREERTOS_TIMER_TACHO_NOT_SUPPORT_ERROR FTIMER_TACHO_ERR_NOT_SUPPORT +#define FREERTOS_TIMER_TACHO_IS_READ_ERROR FTIMER_TACHO_ERR_IS_READ +#define FREERTOS_TIMER_TACHO_ABORT_ERROR FTIMER_TACHO_ERR_ABORT +#define FREERTOS_TIMER_TACHO_FAILED_ERROR FTIMER_TACHO_ERR_FAILED + +/*Error code depend on OS standard*/ +#define FREERTOS_TIMER_TACHO_TASK_ERROR FT_CODE_ERR(ErrModPort, ErrBspTimer, 0x1) +#define FREERTOS_TIMER_TACHO_MESG_ERROR FT_CODE_ERR(ErrModPort, ErrBspTimer, 0x2) +#define FREERTOS_TIMER_TACHO_TIME_ERROR FT_CODE_ERR(ErrModPort, ErrBspTimer, 0x3) +#define FREERTOS_TIMER_TACHO_MEMY_ERROR FT_CODE_ERR(ErrModPort, ErrBspTimer, 0x4) +#define FREERTOS_TIMER_TACHO_SEMA_ERROR FT_CODE_ERR(ErrModPort, ErrBspTimer, 0x5) /************************** Variable Definitions *****************************/ -static FMemp sdmmc_mem_pool; -static u8 mem_buf[SDMMC_MEM_BUF_SIZE]; +typedef struct +{ + FTimerTachoCtrl ctrl; + SemaphoreHandle_t locker; +}FFreeRTOSTimerTacho; + /***************** Macros (Inline Functions) Definitions *********************/ /************************** Function Prototypes ******************************/ +/*timer*/ +FFreeRTOSTimerTacho *FFreeRTOSTimerInit(u32 id, boolean timer_mode, u64 times); +FError FFreeRTOSTimerStart(FFreeRTOSTimerTacho *os_timer_p); +FError FFreeRTOSTimerStop(FFreeRTOSTimerTacho *os_timer_p); +void FFreeRTOSTimerDeinit(FFreeRTOSTimerTacho *os_timer_p); +void FFreeRTOSTimerDebug(FFreeRTOSTimerTacho *os_timer_p); +/*tacho*/ +FFreeRTOSTimerTacho *FFreeRTOSTachoInit(u32 id, boolean tacho_mode); +FError FFreeRTOSTachoGetRPM(FFreeRTOSTimerTacho *os_timer_p,u32 *rpm); +u32 FFreeRTOSTachoGetCNT(FFreeRTOSTimerTacho *os_timer_p); +void FFreeRTOSTachoDeinit(FFreeRTOSTimerTacho *os_timer_p); /*****************************************************************************/ -sdmmc_err_t sdmmc_port_init(void) -{ - FError err = FT_SUCCESS; - if (FT_COMPONENT_IS_READY == sdmmc_mem_pool.is_ready) - return err; - - taskENTER_CRITICAL(); /* no schedule when init */ - - err = FMempInit(&sdmmc_mem_pool, mem_buf, mem_buf + sizeof(mem_buf)); /* init memory pool */; - - taskEXIT_CRITICAL(); /* allow schedule after init */ - - return (FT_SUCCESS == err) ? SDMMC_OK : SDMMC_FAIL; -} - -sdmmc_err_t sdmmc_port_deinit(void) -{ - FError err = FT_SUCCESS; - if (FT_COMPONENT_IS_READY != sdmmc_mem_pool.is_ready) - return err; - - taskENTER_CRITICAL(); /* no schedule when deinit */ - - FMempDeinit(&sdmmc_mem_pool); /* remove memroy pool */ - - taskEXIT_CRITICAL(); /* allow schedule after deinit */ - - return (FT_SUCCESS == err) ? SDMMC_OK : SDMMC_FAIL; -} - -void *sdmmc_port_align_malloc(size_t want_size, boolean dma_capable) -{ - void *pv = NULL; - FASSERT(FT_COMPONENT_IS_READY == sdmmc_mem_pool.is_ready); - - if (dma_capable) - { - if (want_size < SDMMC_DMA_BUF_SIZE) /* if allocated memory is needed by DMA, allocate at leaset 512 bytes */ - { - want_size = SDMMC_DMA_BUF_SIZE; - } - else if (want_size % SDMMC_DMA_BUF_SIZE) /* round up size to 512 */ - { - want_size = roundup(want_size, (size_t)SDMMC_DMA_BUF_SIZE); - } - } - - pv = FMempMallocAlign(&sdmmc_mem_pool, want_size, SDMMC_ALIGNMENT); /* allocate aligned memory */ - return pv; -} - -void sdmmc_port_align_free(void *pv) -{ - FASSERT(FT_COMPONENT_IS_READY == sdmmc_mem_pool.is_ready); - - FMempFree(&sdmmc_mem_pool, pv); +#ifdef __cplusplus } +#endif -boolean sdmmc_port_is_aligned_memory(const void *buf_p) -{ - return ((uintptr)buf_p % SDMMC_ALIGNMENT == 0); -} \ No newline at end of file +#endif \ No newline at end of file diff --git a/drivers/wdt/fwdt_os.c b/drivers/wdt/fwdt_os.c index 906d7f6e878f14fb22e0897bbf5d47fc9f506665..4f297362a7693f0840007edd9bacc7397966129a 100644 --- a/drivers/wdt/fwdt_os.c +++ b/drivers/wdt/fwdt_os.c @@ -40,7 +40,7 @@ #define FWDT_INFO(format, ...) FT_DEBUG_PRINT_I(FWDT_DEBUG_TAG, format, ##__VA_ARGS__) #define FWDT_DEBUG(format, ...) FT_DEBUG_PRINT_D(FWDT_DEBUG_TAG, format, ##__VA_ARGS__) -static FFreeRTOSWdt os_wdt[FWDT_INSTANCE_NUM] = {0}; +static FFreeRTOSWdt os_wdt[FWDT_NUM] = {0}; /** * @name: FFreeRTOSWdtInit @@ -50,7 +50,7 @@ static FFreeRTOSWdt os_wdt[FWDT_INSTANCE_NUM] = {0}; */ FFreeRTOSWdt *FFreeRTOSWdtInit(u32 instance_id) { - FASSERT(instance_id < FWDT_INSTANCE_NUM); + FASSERT(instance_id < FWDT_NUM); FASSERT(FT_COMPONENT_IS_READY != os_wdt[instance_id].wdt_ctrl.is_ready); FWdtConfig pconfig; diff --git a/example/amp/openamp/core0/configs/d2000_aarch32_eg_configs b/example/amp/openamp/core0/configs/d2000_aarch32_eg_configs index f834bd72420687bd47e841c249987cd0e2b17df5..639fc072832df3bdb7d1b8d5dd957d2d09f41295 100644 --- a/example/amp/openamp/core0/configs/d2000_aarch32_eg_configs +++ b/example/amp/openamp/core0/configs/d2000_aarch32_eg_configs @@ -72,6 +72,7 @@ CONFIG_ENABLE_Pl011_UART=y # CONFIG_USE_CAN is not set # CONFIG_USE_I2C is not set # CONFIG_USE_TIMER is not set +# CONFIG_USE_MIO is not set # CONFIG_USE_SDMMC is not set # CONFIG_USE_PCIE is not set # CONFIG_USE_WDT is not set @@ -127,6 +128,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + # CONFIG_OUTPUT_BINARY is not set # end of Compiler Options # end of Building Option @@ -136,17 +146,94 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # -# Freertos Drivers +# Freertos Uart Drivers # CONFIG_FREERTOS_USE_UART=y -# end of Freertos Drivers +# end of Freertos Uart Drivers + +# +# Freertos Pwm Drivers +# +# CONFIG_FREERTOS_USE_PWM is not set +# end of Freertos Pwm Drivers + +# +# Freertos Qspi Drivers +# +# CONFIG_FREERTOS_USE_QSPI is not set +# end of Freertos Qspi Drivers + +# +# Freertos Wdt Drivers +# +# CONFIG_FREERTOS_USE_WDT is not set +# end of Freertos Wdt Drivers + +# +# Freertos Eth Drivers +# +# CONFIG_FREERTOS_USE_XMAC is not set +# end of Freertos Eth Drivers + +# +# Freertos Gpio Drivers +# +# CONFIG_FREERTOS_USE_GPIO is not set +# end of Freertos Gpio Drivers + +# +# Freertos Spim Drivers +# +# CONFIG_FREERTOS_USE_FSPIM is not set +# end of Freertos Spim Drivers + +# +# Freertos DMA Drivers +# +# CONFIG_FREERTOS_USE_FDDMA is not set +# CONFIG_FREERTOS_USE_FGDMA is not set +# end of Freertos DMA Drivers + +# +# Freertos Adc Drivers +# +# CONFIG_FREERTOS_USE_ADC is not set +# end of Freertos Adc Drivers + +# +# Freertos Can Drivers +# +# CONFIG_FREERTOS_USE_CAN is not set +# end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y +# CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set +# CONFIG_USE_SFUD is not set +# CONFIG_USE_SPIFFS is not set CONFIG_USE_AMP=y CONFIG_USE_LIBMETAL=y @@ -182,4 +269,30 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_DEFAULT_LETTER_SHELL_USE_UART0 is not set # CONFIG_DEFAULT_LETTER_SHELL_USE_UART2 is not set # end of Letter Shell Configuration -# end of FreeRTOS Setting + +# CONFIG_USE_TLSF is not set +# CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/amp/openamp/core0/configs/d2000_aarch64_eg_configs b/example/amp/openamp/core0/configs/d2000_aarch64_eg_configs index c8b7f68b570af7b2683b63d48daf7be065d2947d..1f8d9c2462c02d549a64e461aa58eec6429cf1dd 100644 --- a/example/amp/openamp/core0/configs/d2000_aarch64_eg_configs +++ b/example/amp/openamp/core0/configs/d2000_aarch64_eg_configs @@ -72,6 +72,7 @@ CONFIG_ENABLE_Pl011_UART=y # CONFIG_USE_CAN is not set # CONFIG_USE_I2C is not set # CONFIG_USE_TIMER is not set +# CONFIG_USE_MIO is not set # CONFIG_USE_SDMMC is not set # CONFIG_USE_PCIE is not set # CONFIG_USE_WDT is not set @@ -123,6 +124,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + # CONFIG_OUTPUT_BINARY is not set # end of Compiler Options # end of Building Option @@ -132,17 +142,94 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # -# Freertos Drivers +# Freertos Uart Drivers # CONFIG_FREERTOS_USE_UART=y -# end of Freertos Drivers +# end of Freertos Uart Drivers + +# +# Freertos Pwm Drivers +# +# CONFIG_FREERTOS_USE_PWM is not set +# end of Freertos Pwm Drivers + +# +# Freertos Qspi Drivers +# +# CONFIG_FREERTOS_USE_QSPI is not set +# end of Freertos Qspi Drivers + +# +# Freertos Wdt Drivers +# +# CONFIG_FREERTOS_USE_WDT is not set +# end of Freertos Wdt Drivers + +# +# Freertos Eth Drivers +# +# CONFIG_FREERTOS_USE_XMAC is not set +# end of Freertos Eth Drivers + +# +# Freertos Gpio Drivers +# +# CONFIG_FREERTOS_USE_GPIO is not set +# end of Freertos Gpio Drivers + +# +# Freertos Spim Drivers +# +# CONFIG_FREERTOS_USE_FSPIM is not set +# end of Freertos Spim Drivers + +# +# Freertos DMA Drivers +# +# CONFIG_FREERTOS_USE_FDDMA is not set +# CONFIG_FREERTOS_USE_FGDMA is not set +# end of Freertos DMA Drivers + +# +# Freertos Adc Drivers +# +# CONFIG_FREERTOS_USE_ADC is not set +# end of Freertos Adc Drivers + +# +# Freertos Can Drivers +# +# CONFIG_FREERTOS_USE_CAN is not set +# end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y +# CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set +# CONFIG_USE_SFUD is not set +# CONFIG_USE_SPIFFS is not set CONFIG_USE_AMP=y CONFIG_USE_LIBMETAL=y @@ -178,4 +265,30 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_DEFAULT_LETTER_SHELL_USE_UART0 is not set # CONFIG_DEFAULT_LETTER_SHELL_USE_UART2 is not set # end of Letter Shell Configuration -# end of FreeRTOS Setting + +# CONFIG_USE_TLSF is not set +# CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/amp/openamp/core0/configs/ft2004_aarch32_eg_configs b/example/amp/openamp/core0/configs/ft2004_aarch32_eg_configs index 435638022be7be3a0fca5603a01879d33ffb1114..02de5603fe6eebbef91b29c9863f4025cf75ab35 100644 --- a/example/amp/openamp/core0/configs/ft2004_aarch32_eg_configs +++ b/example/amp/openamp/core0/configs/ft2004_aarch32_eg_configs @@ -72,6 +72,7 @@ CONFIG_ENABLE_Pl011_UART=y # CONFIG_USE_CAN is not set # CONFIG_USE_I2C is not set # CONFIG_USE_TIMER is not set +# CONFIG_USE_MIO is not set # CONFIG_USE_SDMMC is not set # CONFIG_USE_PCIE is not set # CONFIG_USE_WDT is not set @@ -127,6 +128,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + # CONFIG_OUTPUT_BINARY is not set # end of Compiler Options # end of Building Option @@ -136,17 +146,94 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # -# Freertos Drivers +# Freertos Uart Drivers # CONFIG_FREERTOS_USE_UART=y -# end of Freertos Drivers +# end of Freertos Uart Drivers + +# +# Freertos Pwm Drivers +# +# CONFIG_FREERTOS_USE_PWM is not set +# end of Freertos Pwm Drivers + +# +# Freertos Qspi Drivers +# +# CONFIG_FREERTOS_USE_QSPI is not set +# end of Freertos Qspi Drivers + +# +# Freertos Wdt Drivers +# +# CONFIG_FREERTOS_USE_WDT is not set +# end of Freertos Wdt Drivers + +# +# Freertos Eth Drivers +# +# CONFIG_FREERTOS_USE_XMAC is not set +# end of Freertos Eth Drivers + +# +# Freertos Gpio Drivers +# +# CONFIG_FREERTOS_USE_GPIO is not set +# end of Freertos Gpio Drivers + +# +# Freertos Spim Drivers +# +# CONFIG_FREERTOS_USE_FSPIM is not set +# end of Freertos Spim Drivers + +# +# Freertos DMA Drivers +# +# CONFIG_FREERTOS_USE_FDDMA is not set +# CONFIG_FREERTOS_USE_FGDMA is not set +# end of Freertos DMA Drivers + +# +# Freertos Adc Drivers +# +# CONFIG_FREERTOS_USE_ADC is not set +# end of Freertos Adc Drivers + +# +# Freertos Can Drivers +# +# CONFIG_FREERTOS_USE_CAN is not set +# end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y +# CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set +# CONFIG_USE_SFUD is not set +# CONFIG_USE_SPIFFS is not set CONFIG_USE_AMP=y CONFIG_USE_LIBMETAL=y @@ -182,4 +269,30 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_DEFAULT_LETTER_SHELL_USE_UART0 is not set # CONFIG_DEFAULT_LETTER_SHELL_USE_UART2 is not set # end of Letter Shell Configuration -# end of FreeRTOS Setting + +# CONFIG_USE_TLSF is not set +# CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/amp/openamp/core0/configs/ft2004_aarch64_eg_configs b/example/amp/openamp/core0/configs/ft2004_aarch64_eg_configs index 92d97b6791d3fc05e0560fcb04a2ac3fb490063d..bd29bf021078d1fc689ca35c92a0241ec0d53af1 100644 --- a/example/amp/openamp/core0/configs/ft2004_aarch64_eg_configs +++ b/example/amp/openamp/core0/configs/ft2004_aarch64_eg_configs @@ -72,6 +72,7 @@ CONFIG_ENABLE_Pl011_UART=y # CONFIG_USE_CAN is not set # CONFIG_USE_I2C is not set # CONFIG_USE_TIMER is not set +# CONFIG_USE_MIO is not set # CONFIG_USE_SDMMC is not set # CONFIG_USE_PCIE is not set # CONFIG_USE_WDT is not set @@ -123,6 +124,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + # CONFIG_OUTPUT_BINARY is not set # end of Compiler Options # end of Building Option @@ -132,17 +142,94 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # -# Freertos Drivers +# Freertos Uart Drivers # CONFIG_FREERTOS_USE_UART=y -# end of Freertos Drivers +# end of Freertos Uart Drivers + +# +# Freertos Pwm Drivers +# +# CONFIG_FREERTOS_USE_PWM is not set +# end of Freertos Pwm Drivers + +# +# Freertos Qspi Drivers +# +# CONFIG_FREERTOS_USE_QSPI is not set +# end of Freertos Qspi Drivers + +# +# Freertos Wdt Drivers +# +# CONFIG_FREERTOS_USE_WDT is not set +# end of Freertos Wdt Drivers + +# +# Freertos Eth Drivers +# +# CONFIG_FREERTOS_USE_XMAC is not set +# end of Freertos Eth Drivers + +# +# Freertos Gpio Drivers +# +# CONFIG_FREERTOS_USE_GPIO is not set +# end of Freertos Gpio Drivers + +# +# Freertos Spim Drivers +# +# CONFIG_FREERTOS_USE_FSPIM is not set +# end of Freertos Spim Drivers + +# +# Freertos DMA Drivers +# +# CONFIG_FREERTOS_USE_FDDMA is not set +# CONFIG_FREERTOS_USE_FGDMA is not set +# end of Freertos DMA Drivers + +# +# Freertos Adc Drivers +# +# CONFIG_FREERTOS_USE_ADC is not set +# end of Freertos Adc Drivers + +# +# Freertos Can Drivers +# +# CONFIG_FREERTOS_USE_CAN is not set +# end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y +# CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set +# CONFIG_USE_SFUD is not set +# CONFIG_USE_SPIFFS is not set CONFIG_USE_AMP=y CONFIG_USE_LIBMETAL=y @@ -178,4 +265,30 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_DEFAULT_LETTER_SHELL_USE_UART0 is not set # CONFIG_DEFAULT_LETTER_SHELL_USE_UART2 is not set # end of Letter Shell Configuration -# end of FreeRTOS Setting + +# CONFIG_USE_TLSF is not set +# CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/amp/openamp/core0/sdkconfig b/example/amp/openamp/core0/sdkconfig index 435638022be7be3a0fca5603a01879d33ffb1114..02de5603fe6eebbef91b29c9863f4025cf75ab35 100644 --- a/example/amp/openamp/core0/sdkconfig +++ b/example/amp/openamp/core0/sdkconfig @@ -72,6 +72,7 @@ CONFIG_ENABLE_Pl011_UART=y # CONFIG_USE_CAN is not set # CONFIG_USE_I2C is not set # CONFIG_USE_TIMER is not set +# CONFIG_USE_MIO is not set # CONFIG_USE_SDMMC is not set # CONFIG_USE_PCIE is not set # CONFIG_USE_WDT is not set @@ -127,6 +128,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + # CONFIG_OUTPUT_BINARY is not set # end of Compiler Options # end of Building Option @@ -136,17 +146,94 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # -# Freertos Drivers +# Freertos Uart Drivers # CONFIG_FREERTOS_USE_UART=y -# end of Freertos Drivers +# end of Freertos Uart Drivers + +# +# Freertos Pwm Drivers +# +# CONFIG_FREERTOS_USE_PWM is not set +# end of Freertos Pwm Drivers + +# +# Freertos Qspi Drivers +# +# CONFIG_FREERTOS_USE_QSPI is not set +# end of Freertos Qspi Drivers + +# +# Freertos Wdt Drivers +# +# CONFIG_FREERTOS_USE_WDT is not set +# end of Freertos Wdt Drivers + +# +# Freertos Eth Drivers +# +# CONFIG_FREERTOS_USE_XMAC is not set +# end of Freertos Eth Drivers + +# +# Freertos Gpio Drivers +# +# CONFIG_FREERTOS_USE_GPIO is not set +# end of Freertos Gpio Drivers + +# +# Freertos Spim Drivers +# +# CONFIG_FREERTOS_USE_FSPIM is not set +# end of Freertos Spim Drivers + +# +# Freertos DMA Drivers +# +# CONFIG_FREERTOS_USE_FDDMA is not set +# CONFIG_FREERTOS_USE_FGDMA is not set +# end of Freertos DMA Drivers + +# +# Freertos Adc Drivers +# +# CONFIG_FREERTOS_USE_ADC is not set +# end of Freertos Adc Drivers + +# +# Freertos Can Drivers +# +# CONFIG_FREERTOS_USE_CAN is not set +# end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y +# CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set +# CONFIG_USE_SFUD is not set +# CONFIG_USE_SPIFFS is not set CONFIG_USE_AMP=y CONFIG_USE_LIBMETAL=y @@ -182,4 +269,30 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_DEFAULT_LETTER_SHELL_USE_UART0 is not set # CONFIG_DEFAULT_LETTER_SHELL_USE_UART2 is not set # end of Letter Shell Configuration -# end of FreeRTOS Setting + +# CONFIG_USE_TLSF is not set +# CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/amp/openamp/core0/sdkconfig.h b/example/amp/openamp/core0/sdkconfig.h index 3734019cf9d48d4b45806d4098577b6abdbbb153..2affe844dec4bee635b7a1abb65f360694b7ff58 100644 --- a/example/amp/openamp/core0/sdkconfig.h +++ b/example/amp/openamp/core0/sdkconfig.h @@ -64,6 +64,7 @@ /* CONFIG_USE_CAN is not set */ /* CONFIG_USE_I2C is not set */ /* CONFIG_USE_TIMER is not set */ +/* CONFIG_USE_MIO is not set */ /* CONFIG_USE_SDMMC is not set */ /* CONFIG_USE_PCIE is not set */ /* CONFIG_USE_WDT is not set */ @@ -115,22 +116,93 @@ /* Compiler Options */ +/* Cross-Compiler Setting */ + +#define CONFIG_GCC_OPTIMIZE_LEVEL 0 +/* CONFIG_USE_EXT_COMPILER is not set */ +/* CONFIG_USE_KLIN_SYS is not set */ +/* end of Cross-Compiler Setting */ /* CONFIG_OUTPUT_BINARY is not set */ /* end of Compiler Options */ /* end of Building Option */ /* Component Configuration */ -/* Freertos Drivers */ +/* Freertos Uart Drivers */ #define CONFIG_FREERTOS_USE_UART -/* end of Freertos Drivers */ +/* end of Freertos Uart Drivers */ + +/* Freertos Pwm Drivers */ + +/* CONFIG_FREERTOS_USE_PWM is not set */ +/* end of Freertos Pwm Drivers */ + +/* Freertos Qspi Drivers */ + +/* CONFIG_FREERTOS_USE_QSPI is not set */ +/* end of Freertos Qspi Drivers */ + +/* Freertos Wdt Drivers */ + +/* CONFIG_FREERTOS_USE_WDT is not set */ +/* end of Freertos Wdt Drivers */ + +/* Freertos Eth Drivers */ + +/* CONFIG_FREERTOS_USE_XMAC is not set */ +/* end of Freertos Eth Drivers */ + +/* Freertos Gpio Drivers */ + +/* CONFIG_FREERTOS_USE_GPIO is not set */ +/* end of Freertos Gpio Drivers */ + +/* Freertos Spim Drivers */ + +/* CONFIG_FREERTOS_USE_FSPIM is not set */ +/* end of Freertos Spim Drivers */ + +/* Freertos DMA Drivers */ + +/* CONFIG_FREERTOS_USE_FDDMA is not set */ +/* CONFIG_FREERTOS_USE_FGDMA is not set */ +/* end of Freertos DMA Drivers */ + +/* Freertos Adc Drivers */ + +/* CONFIG_FREERTOS_USE_ADC is not set */ +/* end of Freertos Adc Drivers */ + +/* Freertos Can Drivers */ + +/* CONFIG_FREERTOS_USE_CAN is not set */ +/* end of Freertos Can Drivers */ + +/* Freertos I2c Drivers */ + +/* CONFIG_FREERTOS_USE_I2C is not set */ +/* end of Freertos I2c Drivers */ + +/* Freertos Mio Drivers */ + +/* CONFIG_FREERTOS_USE_MIO is not set */ +/* end of Freertos Mio Drivers */ + +/* Freertos Timer Drivers */ + +/* CONFIG_FREERTOS_USE_TIMER is not set */ +/* end of Freertos Timer Drivers */ /* end of Component Configuration */ -/* FreeRTOS Setting */ +/* Third-Party Configuration */ /* CONFIG_USE_LWIP is not set */ #define CONFIG_USE_BACKTRACE +/* CONFIG_USE_FATFS is not set */ +/* CONFIG_USE_FATFS_0_1_4 is not set */ +/* CONFIG_USE_SFUD is not set */ +/* CONFIG_USE_SPIFFS is not set */ #define CONFIG_USE_AMP #define CONFIG_USE_LIBMETAL @@ -162,6 +234,30 @@ /* CONFIG_DEFAULT_LETTER_SHELL_USE_UART0 is not set */ /* CONFIG_DEFAULT_LETTER_SHELL_USE_UART2 is not set */ /* end of Letter Shell Configuration */ -/* end of FreeRTOS Setting */ +/* CONFIG_USE_TLSF is not set */ +/* CONFIG_USE_SDMMC_CMD is not set */ +/* CONFIG_USE_CHERRY_USB is not set */ +/* end of Third-Party Configuration */ + +/* Kernel Configuration */ + +#define CONFIG_FREERTOS_OPTIMIZED_SCHEDULER +#define CONFIG_FREERTOS_HZ 1000 +#define CONFIG_FREERTOS_MAX_PRIORITIES 32 +#define CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES 13 +#define CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES 11 +#define CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS 1 +#define CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE 1024 +#define CONFIG_FREERTOS_MAX_TASK_NAME_LEN 32 +#define CONFIG_FREERTOS_TIMER_TASK_PRIORITY 1 +#define CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH 2048 +#define CONFIG_FREERTOS_TIMER_QUEUE_LENGTH 10 +#define CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE 0 +#define CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS +#define CONFIG_FREERTOS_USE_TRACE_FACILITY +#define CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS +/* CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set */ +#define CONFIG_FREERTOS_TOTAL_HEAP_SIZE 10240 +/* end of Kernel Configuration */ #endif diff --git a/example/amp/openamp/core1/configs/d2000_aarch32_eg_configs b/example/amp/openamp/core1/configs/d2000_aarch32_eg_configs index 3797f2dca650a4367081e4cb192e9696baf7d78c..6dee8a01db89237fc65a8890bfa311f6fdf8d5e3 100644 --- a/example/amp/openamp/core1/configs/d2000_aarch32_eg_configs +++ b/example/amp/openamp/core1/configs/d2000_aarch32_eg_configs @@ -71,6 +71,7 @@ CONFIG_ENABLE_Pl011_UART=y # CONFIG_USE_CAN is not set # CONFIG_USE_I2C is not set # CONFIG_USE_TIMER is not set +# CONFIG_USE_MIO is not set # CONFIG_USE_SDMMC is not set # CONFIG_USE_PCIE is not set # CONFIG_USE_WDT is not set @@ -126,6 +127,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + # CONFIG_OUTPUT_BINARY is not set # end of Compiler Options # end of Building Option @@ -135,17 +145,94 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # -# Freertos Drivers +# Freertos Uart Drivers # CONFIG_FREERTOS_USE_UART=y -# end of Freertos Drivers +# end of Freertos Uart Drivers + +# +# Freertos Pwm Drivers +# +# CONFIG_FREERTOS_USE_PWM is not set +# end of Freertos Pwm Drivers + +# +# Freertos Qspi Drivers +# +# CONFIG_FREERTOS_USE_QSPI is not set +# end of Freertos Qspi Drivers + +# +# Freertos Wdt Drivers +# +# CONFIG_FREERTOS_USE_WDT is not set +# end of Freertos Wdt Drivers + +# +# Freertos Eth Drivers +# +# CONFIG_FREERTOS_USE_XMAC is not set +# end of Freertos Eth Drivers + +# +# Freertos Gpio Drivers +# +# CONFIG_FREERTOS_USE_GPIO is not set +# end of Freertos Gpio Drivers + +# +# Freertos Spim Drivers +# +# CONFIG_FREERTOS_USE_FSPIM is not set +# end of Freertos Spim Drivers + +# +# Freertos DMA Drivers +# +# CONFIG_FREERTOS_USE_FDDMA is not set +# CONFIG_FREERTOS_USE_FGDMA is not set +# end of Freertos DMA Drivers + +# +# Freertos Adc Drivers +# +# CONFIG_FREERTOS_USE_ADC is not set +# end of Freertos Adc Drivers + +# +# Freertos Can Drivers +# +# CONFIG_FREERTOS_USE_CAN is not set +# end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y +# CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set +# CONFIG_USE_SFUD is not set +# CONFIG_USE_SPIFFS is not set CONFIG_USE_AMP=y CONFIG_USE_LIBMETAL=y @@ -172,4 +259,29 @@ CONFIG_MEM_NO_CACHE=y # end of OpenAmp # CONFIG_USE_LETTER_SHELL is not set -# end of FreeRTOS Setting +# CONFIG_USE_TLSF is not set +# CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/amp/openamp/core1/configs/d2000_aarch64_eg_configs b/example/amp/openamp/core1/configs/d2000_aarch64_eg_configs index 8892fb446bb05c70b8938f585598892c9574b5bb..3f7451d64a28747014563dffaff35c33155d86ef 100644 --- a/example/amp/openamp/core1/configs/d2000_aarch64_eg_configs +++ b/example/amp/openamp/core1/configs/d2000_aarch64_eg_configs @@ -71,6 +71,7 @@ CONFIG_ENABLE_Pl011_UART=y # CONFIG_USE_CAN is not set # CONFIG_USE_I2C is not set # CONFIG_USE_TIMER is not set +# CONFIG_USE_MIO is not set # CONFIG_USE_SDMMC is not set # CONFIG_USE_PCIE is not set # CONFIG_USE_WDT is not set @@ -122,6 +123,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + # CONFIG_OUTPUT_BINARY is not set # end of Compiler Options # end of Building Option @@ -131,17 +141,94 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # -# Freertos Drivers +# Freertos Uart Drivers # CONFIG_FREERTOS_USE_UART=y -# end of Freertos Drivers +# end of Freertos Uart Drivers + +# +# Freertos Pwm Drivers +# +# CONFIG_FREERTOS_USE_PWM is not set +# end of Freertos Pwm Drivers + +# +# Freertos Qspi Drivers +# +# CONFIG_FREERTOS_USE_QSPI is not set +# end of Freertos Qspi Drivers + +# +# Freertos Wdt Drivers +# +# CONFIG_FREERTOS_USE_WDT is not set +# end of Freertos Wdt Drivers + +# +# Freertos Eth Drivers +# +# CONFIG_FREERTOS_USE_XMAC is not set +# end of Freertos Eth Drivers + +# +# Freertos Gpio Drivers +# +# CONFIG_FREERTOS_USE_GPIO is not set +# end of Freertos Gpio Drivers + +# +# Freertos Spim Drivers +# +# CONFIG_FREERTOS_USE_FSPIM is not set +# end of Freertos Spim Drivers + +# +# Freertos DMA Drivers +# +# CONFIG_FREERTOS_USE_FDDMA is not set +# CONFIG_FREERTOS_USE_FGDMA is not set +# end of Freertos DMA Drivers + +# +# Freertos Adc Drivers +# +# CONFIG_FREERTOS_USE_ADC is not set +# end of Freertos Adc Drivers + +# +# Freertos Can Drivers +# +# CONFIG_FREERTOS_USE_CAN is not set +# end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y +# CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set +# CONFIG_USE_SFUD is not set +# CONFIG_USE_SPIFFS is not set CONFIG_USE_AMP=y CONFIG_USE_LIBMETAL=y @@ -168,4 +255,29 @@ CONFIG_MEM_NO_CACHE=y # end of OpenAmp # CONFIG_USE_LETTER_SHELL is not set -# end of FreeRTOS Setting +# CONFIG_USE_TLSF is not set +# CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/amp/openamp/core1/configs/ft2004_aarch32_eg_configs b/example/amp/openamp/core1/configs/ft2004_aarch32_eg_configs index 4bd8309b8754711de58d7c9c429c12378eba38f8..ba3305fd6d67004f22475a692c034c6dd1572395 100644 --- a/example/amp/openamp/core1/configs/ft2004_aarch32_eg_configs +++ b/example/amp/openamp/core1/configs/ft2004_aarch32_eg_configs @@ -71,6 +71,7 @@ CONFIG_ENABLE_Pl011_UART=y # CONFIG_USE_CAN is not set # CONFIG_USE_I2C is not set # CONFIG_USE_TIMER is not set +# CONFIG_USE_MIO is not set # CONFIG_USE_SDMMC is not set # CONFIG_USE_PCIE is not set # CONFIG_USE_WDT is not set @@ -126,6 +127,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + # CONFIG_OUTPUT_BINARY is not set # end of Compiler Options # end of Building Option @@ -135,17 +145,94 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # -# Freertos Drivers +# Freertos Uart Drivers # CONFIG_FREERTOS_USE_UART=y -# end of Freertos Drivers +# end of Freertos Uart Drivers + +# +# Freertos Pwm Drivers +# +# CONFIG_FREERTOS_USE_PWM is not set +# end of Freertos Pwm Drivers + +# +# Freertos Qspi Drivers +# +# CONFIG_FREERTOS_USE_QSPI is not set +# end of Freertos Qspi Drivers + +# +# Freertos Wdt Drivers +# +# CONFIG_FREERTOS_USE_WDT is not set +# end of Freertos Wdt Drivers + +# +# Freertos Eth Drivers +# +# CONFIG_FREERTOS_USE_XMAC is not set +# end of Freertos Eth Drivers + +# +# Freertos Gpio Drivers +# +# CONFIG_FREERTOS_USE_GPIO is not set +# end of Freertos Gpio Drivers + +# +# Freertos Spim Drivers +# +# CONFIG_FREERTOS_USE_FSPIM is not set +# end of Freertos Spim Drivers + +# +# Freertos DMA Drivers +# +# CONFIG_FREERTOS_USE_FDDMA is not set +# CONFIG_FREERTOS_USE_FGDMA is not set +# end of Freertos DMA Drivers + +# +# Freertos Adc Drivers +# +# CONFIG_FREERTOS_USE_ADC is not set +# end of Freertos Adc Drivers + +# +# Freertos Can Drivers +# +# CONFIG_FREERTOS_USE_CAN is not set +# end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y +# CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set +# CONFIG_USE_SFUD is not set +# CONFIG_USE_SPIFFS is not set CONFIG_USE_AMP=y CONFIG_USE_LIBMETAL=y @@ -172,4 +259,29 @@ CONFIG_MEM_NO_CACHE=y # end of OpenAmp # CONFIG_USE_LETTER_SHELL is not set -# end of FreeRTOS Setting +# CONFIG_USE_TLSF is not set +# CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/amp/openamp/core1/configs/ft2004_aarch64_eg_configs b/example/amp/openamp/core1/configs/ft2004_aarch64_eg_configs index e4c5ab4b2e336aacec7bd578aa856fecfa4dab59..537cff94e2f405c1873e99ff90284a7eb6b0c3e7 100644 --- a/example/amp/openamp/core1/configs/ft2004_aarch64_eg_configs +++ b/example/amp/openamp/core1/configs/ft2004_aarch64_eg_configs @@ -71,6 +71,7 @@ CONFIG_ENABLE_Pl011_UART=y # CONFIG_USE_CAN is not set # CONFIG_USE_I2C is not set # CONFIG_USE_TIMER is not set +# CONFIG_USE_MIO is not set # CONFIG_USE_SDMMC is not set # CONFIG_USE_PCIE is not set # CONFIG_USE_WDT is not set @@ -122,6 +123,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + # CONFIG_OUTPUT_BINARY is not set # end of Compiler Options # end of Building Option @@ -131,17 +141,94 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # -# Freertos Drivers +# Freertos Uart Drivers # CONFIG_FREERTOS_USE_UART=y -# end of Freertos Drivers +# end of Freertos Uart Drivers + +# +# Freertos Pwm Drivers +# +# CONFIG_FREERTOS_USE_PWM is not set +# end of Freertos Pwm Drivers + +# +# Freertos Qspi Drivers +# +# CONFIG_FREERTOS_USE_QSPI is not set +# end of Freertos Qspi Drivers + +# +# Freertos Wdt Drivers +# +# CONFIG_FREERTOS_USE_WDT is not set +# end of Freertos Wdt Drivers + +# +# Freertos Eth Drivers +# +# CONFIG_FREERTOS_USE_XMAC is not set +# end of Freertos Eth Drivers + +# +# Freertos Gpio Drivers +# +# CONFIG_FREERTOS_USE_GPIO is not set +# end of Freertos Gpio Drivers + +# +# Freertos Spim Drivers +# +# CONFIG_FREERTOS_USE_FSPIM is not set +# end of Freertos Spim Drivers + +# +# Freertos DMA Drivers +# +# CONFIG_FREERTOS_USE_FDDMA is not set +# CONFIG_FREERTOS_USE_FGDMA is not set +# end of Freertos DMA Drivers + +# +# Freertos Adc Drivers +# +# CONFIG_FREERTOS_USE_ADC is not set +# end of Freertos Adc Drivers + +# +# Freertos Can Drivers +# +# CONFIG_FREERTOS_USE_CAN is not set +# end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y +# CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set +# CONFIG_USE_SFUD is not set +# CONFIG_USE_SPIFFS is not set CONFIG_USE_AMP=y CONFIG_USE_LIBMETAL=y @@ -168,4 +255,29 @@ CONFIG_MEM_NO_CACHE=y # end of OpenAmp # CONFIG_USE_LETTER_SHELL is not set -# end of FreeRTOS Setting +# CONFIG_USE_TLSF is not set +# CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/amp/openamp/core1/sdkconfig b/example/amp/openamp/core1/sdkconfig index 4bd8309b8754711de58d7c9c429c12378eba38f8..ba3305fd6d67004f22475a692c034c6dd1572395 100644 --- a/example/amp/openamp/core1/sdkconfig +++ b/example/amp/openamp/core1/sdkconfig @@ -71,6 +71,7 @@ CONFIG_ENABLE_Pl011_UART=y # CONFIG_USE_CAN is not set # CONFIG_USE_I2C is not set # CONFIG_USE_TIMER is not set +# CONFIG_USE_MIO is not set # CONFIG_USE_SDMMC is not set # CONFIG_USE_PCIE is not set # CONFIG_USE_WDT is not set @@ -126,6 +127,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + # CONFIG_OUTPUT_BINARY is not set # end of Compiler Options # end of Building Option @@ -135,17 +145,94 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # -# Freertos Drivers +# Freertos Uart Drivers # CONFIG_FREERTOS_USE_UART=y -# end of Freertos Drivers +# end of Freertos Uart Drivers + +# +# Freertos Pwm Drivers +# +# CONFIG_FREERTOS_USE_PWM is not set +# end of Freertos Pwm Drivers + +# +# Freertos Qspi Drivers +# +# CONFIG_FREERTOS_USE_QSPI is not set +# end of Freertos Qspi Drivers + +# +# Freertos Wdt Drivers +# +# CONFIG_FREERTOS_USE_WDT is not set +# end of Freertos Wdt Drivers + +# +# Freertos Eth Drivers +# +# CONFIG_FREERTOS_USE_XMAC is not set +# end of Freertos Eth Drivers + +# +# Freertos Gpio Drivers +# +# CONFIG_FREERTOS_USE_GPIO is not set +# end of Freertos Gpio Drivers + +# +# Freertos Spim Drivers +# +# CONFIG_FREERTOS_USE_FSPIM is not set +# end of Freertos Spim Drivers + +# +# Freertos DMA Drivers +# +# CONFIG_FREERTOS_USE_FDDMA is not set +# CONFIG_FREERTOS_USE_FGDMA is not set +# end of Freertos DMA Drivers + +# +# Freertos Adc Drivers +# +# CONFIG_FREERTOS_USE_ADC is not set +# end of Freertos Adc Drivers + +# +# Freertos Can Drivers +# +# CONFIG_FREERTOS_USE_CAN is not set +# end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y +# CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set +# CONFIG_USE_SFUD is not set +# CONFIG_USE_SPIFFS is not set CONFIG_USE_AMP=y CONFIG_USE_LIBMETAL=y @@ -172,4 +259,29 @@ CONFIG_MEM_NO_CACHE=y # end of OpenAmp # CONFIG_USE_LETTER_SHELL is not set -# end of FreeRTOS Setting +# CONFIG_USE_TLSF is not set +# CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/amp/openamp/core1/sdkconfig.h b/example/amp/openamp/core1/sdkconfig.h index 08fe8d08c0b332bad4ca6d26e5019623ca41d249..6286cd2cff663a87b097272dd626b448c20dc0a2 100644 --- a/example/amp/openamp/core1/sdkconfig.h +++ b/example/amp/openamp/core1/sdkconfig.h @@ -63,6 +63,7 @@ /* CONFIG_USE_CAN is not set */ /* CONFIG_USE_I2C is not set */ /* CONFIG_USE_TIMER is not set */ +/* CONFIG_USE_MIO is not set */ /* CONFIG_USE_SDMMC is not set */ /* CONFIG_USE_PCIE is not set */ /* CONFIG_USE_WDT is not set */ @@ -114,22 +115,93 @@ /* Compiler Options */ +/* Cross-Compiler Setting */ + +#define CONFIG_GCC_OPTIMIZE_LEVEL 0 +/* CONFIG_USE_EXT_COMPILER is not set */ +/* CONFIG_USE_KLIN_SYS is not set */ +/* end of Cross-Compiler Setting */ /* CONFIG_OUTPUT_BINARY is not set */ /* end of Compiler Options */ /* end of Building Option */ /* Component Configuration */ -/* Freertos Drivers */ +/* Freertos Uart Drivers */ #define CONFIG_FREERTOS_USE_UART -/* end of Freertos Drivers */ +/* end of Freertos Uart Drivers */ + +/* Freertos Pwm Drivers */ + +/* CONFIG_FREERTOS_USE_PWM is not set */ +/* end of Freertos Pwm Drivers */ + +/* Freertos Qspi Drivers */ + +/* CONFIG_FREERTOS_USE_QSPI is not set */ +/* end of Freertos Qspi Drivers */ + +/* Freertos Wdt Drivers */ + +/* CONFIG_FREERTOS_USE_WDT is not set */ +/* end of Freertos Wdt Drivers */ + +/* Freertos Eth Drivers */ + +/* CONFIG_FREERTOS_USE_XMAC is not set */ +/* end of Freertos Eth Drivers */ + +/* Freertos Gpio Drivers */ + +/* CONFIG_FREERTOS_USE_GPIO is not set */ +/* end of Freertos Gpio Drivers */ + +/* Freertos Spim Drivers */ + +/* CONFIG_FREERTOS_USE_FSPIM is not set */ +/* end of Freertos Spim Drivers */ + +/* Freertos DMA Drivers */ + +/* CONFIG_FREERTOS_USE_FDDMA is not set */ +/* CONFIG_FREERTOS_USE_FGDMA is not set */ +/* end of Freertos DMA Drivers */ + +/* Freertos Adc Drivers */ + +/* CONFIG_FREERTOS_USE_ADC is not set */ +/* end of Freertos Adc Drivers */ + +/* Freertos Can Drivers */ + +/* CONFIG_FREERTOS_USE_CAN is not set */ +/* end of Freertos Can Drivers */ + +/* Freertos I2c Drivers */ + +/* CONFIG_FREERTOS_USE_I2C is not set */ +/* end of Freertos I2c Drivers */ + +/* Freertos Mio Drivers */ + +/* CONFIG_FREERTOS_USE_MIO is not set */ +/* end of Freertos Mio Drivers */ + +/* Freertos Timer Drivers */ + +/* CONFIG_FREERTOS_USE_TIMER is not set */ +/* end of Freertos Timer Drivers */ /* end of Component Configuration */ -/* FreeRTOS Setting */ +/* Third-Party Configuration */ /* CONFIG_USE_LWIP is not set */ #define CONFIG_USE_BACKTRACE +/* CONFIG_USE_FATFS is not set */ +/* CONFIG_USE_FATFS_0_1_4 is not set */ +/* CONFIG_USE_SFUD is not set */ +/* CONFIG_USE_SPIFFS is not set */ #define CONFIG_USE_AMP #define CONFIG_USE_LIBMETAL @@ -153,6 +225,30 @@ /* end of Baremetal config */ /* end of OpenAmp */ /* CONFIG_USE_LETTER_SHELL is not set */ -/* end of FreeRTOS Setting */ +/* CONFIG_USE_TLSF is not set */ +/* CONFIG_USE_SDMMC_CMD is not set */ +/* CONFIG_USE_CHERRY_USB is not set */ +/* end of Third-Party Configuration */ + +/* Kernel Configuration */ + +#define CONFIG_FREERTOS_OPTIMIZED_SCHEDULER +#define CONFIG_FREERTOS_HZ 1000 +#define CONFIG_FREERTOS_MAX_PRIORITIES 32 +#define CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES 13 +#define CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES 11 +#define CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS 1 +#define CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE 1024 +#define CONFIG_FREERTOS_MAX_TASK_NAME_LEN 32 +#define CONFIG_FREERTOS_TIMER_TASK_PRIORITY 1 +#define CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH 2048 +#define CONFIG_FREERTOS_TIMER_QUEUE_LENGTH 10 +#define CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE 0 +#define CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS +#define CONFIG_FREERTOS_USE_TRACE_FACILITY +#define CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS +/* CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set */ +#define CONFIG_FREERTOS_TOTAL_HEAP_SIZE 10240 +/* end of Kernel Configuration */ #endif diff --git a/example/freertos_feature/eventgroup/configs/d2000_aarch32_eg_configs b/example/freertos_feature/eventgroup/configs/d2000_aarch32_eg_configs index 464a31af9bb3111d91fad1699c91b41de9317519..167c80fe89f367062340c5a2c767770550b8d604 100644 --- a/example/freertos_feature/eventgroup/configs/d2000_aarch32_eg_configs +++ b/example/freertos_feature/eventgroup/configs/d2000_aarch32_eg_configs @@ -111,6 +111,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -168,12 +177,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -185,14 +188,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -210,4 +232,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/eventgroup/configs/d2000_aarch64_eg_configs b/example/freertos_feature/eventgroup/configs/d2000_aarch64_eg_configs index 64e6b4b7a6ae1664e07af0d9c84a440dabc972c1..dd6e043e88a26d71be46723e32b61cf8592c0b8b 100644 --- a/example/freertos_feature/eventgroup/configs/d2000_aarch64_eg_configs +++ b/example/freertos_feature/eventgroup/configs/d2000_aarch64_eg_configs @@ -107,6 +107,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -164,12 +173,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -181,14 +184,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -206,4 +228,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/eventgroup/configs/e2000d_aarch32_eg_configs b/example/freertos_feature/eventgroup/configs/e2000d_aarch32_eg_configs index fc31cd0b27be11b5e09995278c509299162fa4e9..b8357655abba933759b61900ba9607e412b6912a 100644 --- a/example/freertos_feature/eventgroup/configs/e2000d_aarch32_eg_configs +++ b/example/freertos_feature/eventgroup/configs/e2000d_aarch32_eg_configs @@ -111,6 +111,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -168,12 +177,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -185,14 +188,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -210,4 +232,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/eventgroup/configs/e2000d_aarch64_eg_configs b/example/freertos_feature/eventgroup/configs/e2000d_aarch64_eg_configs index 7e2efa4fba523e780f910a826b7f13a9552e4bbe..36fa9186b22fd962edaf23fd12bbc16106d9f4d1 100644 --- a/example/freertos_feature/eventgroup/configs/e2000d_aarch64_eg_configs +++ b/example/freertos_feature/eventgroup/configs/e2000d_aarch64_eg_configs @@ -107,6 +107,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -164,12 +173,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -181,14 +184,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -206,4 +228,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/eventgroup/configs/e2000q_aarch32_eg_configs b/example/freertos_feature/eventgroup/configs/e2000q_aarch32_eg_configs index 1b53ed9171a1fca357a6362a54b3f83039f9a6fd..d7c90e62756ad1180e396a98aac69b780874f6e7 100644 --- a/example/freertos_feature/eventgroup/configs/e2000q_aarch32_eg_configs +++ b/example/freertos_feature/eventgroup/configs/e2000q_aarch32_eg_configs @@ -111,6 +111,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -168,12 +177,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -185,14 +188,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -210,4 +232,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/eventgroup/configs/e2000q_aarch64_eg_configs b/example/freertos_feature/eventgroup/configs/e2000q_aarch64_eg_configs index 506efc21145e3c62ebe1b565aaebe9ed68d02d8b..b0b533c1776fbfdc0f11c5ff7982e9d813176460 100644 --- a/example/freertos_feature/eventgroup/configs/e2000q_aarch64_eg_configs +++ b/example/freertos_feature/eventgroup/configs/e2000q_aarch64_eg_configs @@ -107,6 +107,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -164,12 +173,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -181,14 +184,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -206,4 +228,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/eventgroup/configs/ft2004_aarch32_eg_configs b/example/freertos_feature/eventgroup/configs/ft2004_aarch32_eg_configs index 4c5b2c49d6edae2d8456f3d083606aa9f62a3361..f9c0f856ae471442cfa41d5306f7d4d8ad54214f 100644 --- a/example/freertos_feature/eventgroup/configs/ft2004_aarch32_eg_configs +++ b/example/freertos_feature/eventgroup/configs/ft2004_aarch32_eg_configs @@ -111,6 +111,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -168,12 +177,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -185,14 +188,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -210,4 +232,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/eventgroup/configs/ft2004_aarch64_eg_configs b/example/freertos_feature/eventgroup/configs/ft2004_aarch64_eg_configs index da9c1f8182b98ecf314c436f79ccbf0a31c79673..3a613a71d2c89fd2a7dcb81d65abcdaa2ae34f8a 100644 --- a/example/freertos_feature/eventgroup/configs/ft2004_aarch64_eg_configs +++ b/example/freertos_feature/eventgroup/configs/ft2004_aarch64_eg_configs @@ -107,6 +107,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -164,12 +173,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -181,14 +184,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -206,4 +228,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/eventgroup/sdkconfig b/example/freertos_feature/eventgroup/sdkconfig index 506efc21145e3c62ebe1b565aaebe9ed68d02d8b..b0b533c1776fbfdc0f11c5ff7982e9d813176460 100644 --- a/example/freertos_feature/eventgroup/sdkconfig +++ b/example/freertos_feature/eventgroup/sdkconfig @@ -107,6 +107,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -164,12 +173,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -181,14 +184,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -206,4 +228,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/eventgroup/sdkconfig.h b/example/freertos_feature/eventgroup/sdkconfig.h index 2ccaa5366aa6f3e1d5c66ad7cf530e14cd54c5cb..b8f4b3835d2348aca0d7e01c34e2e544125085c9 100644 --- a/example/freertos_feature/eventgroup/sdkconfig.h +++ b/example/freertos_feature/eventgroup/sdkconfig.h @@ -98,6 +98,12 @@ /* Compiler Options */ +/* Cross-Compiler Setting */ + +#define CONFIG_GCC_OPTIMIZE_LEVEL 0 +/* CONFIG_USE_EXT_COMPILER is not set */ +/* CONFIG_USE_KLIN_SYS is not set */ +/* end of Cross-Compiler Setting */ #define CONFIG_OUTPUT_BINARY /* end of Compiler Options */ /* end of Building Option */ @@ -145,11 +151,6 @@ /* CONFIG_FREERTOS_USE_FGDMA is not set */ /* end of Freertos DMA Drivers */ -/* Freertos MMC Drivers */ - -/* CONFIG_FREERTOS_USE_FSDIO is not set */ -/* end of Freertos MMC Drivers */ - /* Freertos Adc Drivers */ /* CONFIG_FREERTOS_USE_ADC is not set */ @@ -159,13 +160,29 @@ /* CONFIG_FREERTOS_USE_CAN is not set */ /* end of Freertos Can Drivers */ + +/* Freertos I2c Drivers */ + +/* CONFIG_FREERTOS_USE_I2C is not set */ +/* end of Freertos I2c Drivers */ + +/* Freertos Mio Drivers */ + +/* CONFIG_FREERTOS_USE_MIO is not set */ +/* end of Freertos Mio Drivers */ + +/* Freertos Timer Drivers */ + +/* CONFIG_FREERTOS_USE_TIMER is not set */ +/* end of Freertos Timer Drivers */ /* end of Component Configuration */ -/* FreeRTOS Setting */ +/* Third-Party Configuration */ /* CONFIG_USE_LWIP is not set */ #define CONFIG_USE_BACKTRACE /* CONFIG_USE_FATFS is not set */ +/* CONFIG_USE_FATFS_0_1_4 is not set */ /* CONFIG_USE_SFUD is not set */ /* CONFIG_USE_SPIFFS is not set */ /* CONFIG_USE_AMP is not set */ @@ -181,6 +198,27 @@ #define CONFIG_USE_TLSF /* CONFIG_USE_SDMMC_CMD is not set */ /* CONFIG_USE_CHERRY_USB is not set */ -/* end of FreeRTOS Setting */ +/* end of Third-Party Configuration */ + +/* Kernel Configuration */ + +#define CONFIG_FREERTOS_OPTIMIZED_SCHEDULER +#define CONFIG_FREERTOS_HZ 1000 +#define CONFIG_FREERTOS_MAX_PRIORITIES 32 +#define CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES 13 +#define CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES 11 +#define CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS 1 +#define CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE 1024 +#define CONFIG_FREERTOS_MAX_TASK_NAME_LEN 32 +#define CONFIG_FREERTOS_TIMER_TASK_PRIORITY 1 +#define CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH 2048 +#define CONFIG_FREERTOS_TIMER_QUEUE_LENGTH 10 +#define CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE 0 +#define CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS +#define CONFIG_FREERTOS_USE_TRACE_FACILITY +#define CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS +/* CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set */ +#define CONFIG_FREERTOS_TOTAL_HEAP_SIZE 10240 +/* end of Kernel Configuration */ #endif diff --git a/example/freertos_feature/interrupt/configs/d2000_aarch32_eg_configs b/example/freertos_feature/interrupt/configs/d2000_aarch32_eg_configs index 464a31af9bb3111d91fad1699c91b41de9317519..167c80fe89f367062340c5a2c767770550b8d604 100644 --- a/example/freertos_feature/interrupt/configs/d2000_aarch32_eg_configs +++ b/example/freertos_feature/interrupt/configs/d2000_aarch32_eg_configs @@ -111,6 +111,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -168,12 +177,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -185,14 +188,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -210,4 +232,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/interrupt/configs/d2000_aarch64_eg_configs b/example/freertos_feature/interrupt/configs/d2000_aarch64_eg_configs index 64e6b4b7a6ae1664e07af0d9c84a440dabc972c1..dd6e043e88a26d71be46723e32b61cf8592c0b8b 100644 --- a/example/freertos_feature/interrupt/configs/d2000_aarch64_eg_configs +++ b/example/freertos_feature/interrupt/configs/d2000_aarch64_eg_configs @@ -107,6 +107,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -164,12 +173,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -181,14 +184,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -206,4 +228,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/interrupt/configs/e2000d_aarch32_eg_configs b/example/freertos_feature/interrupt/configs/e2000d_aarch32_eg_configs index fc31cd0b27be11b5e09995278c509299162fa4e9..b8357655abba933759b61900ba9607e412b6912a 100644 --- a/example/freertos_feature/interrupt/configs/e2000d_aarch32_eg_configs +++ b/example/freertos_feature/interrupt/configs/e2000d_aarch32_eg_configs @@ -111,6 +111,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -168,12 +177,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -185,14 +188,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -210,4 +232,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/interrupt/configs/e2000d_aarch64_eg_configs b/example/freertos_feature/interrupt/configs/e2000d_aarch64_eg_configs index 7e2efa4fba523e780f910a826b7f13a9552e4bbe..36fa9186b22fd962edaf23fd12bbc16106d9f4d1 100644 --- a/example/freertos_feature/interrupt/configs/e2000d_aarch64_eg_configs +++ b/example/freertos_feature/interrupt/configs/e2000d_aarch64_eg_configs @@ -107,6 +107,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -164,12 +173,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -181,14 +184,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -206,4 +228,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/interrupt/configs/e2000q_aarch32_eg_configs b/example/freertos_feature/interrupt/configs/e2000q_aarch32_eg_configs index 2fe965a523e72eb1736dfda348ff99451b89d666..8f410c5e35a13dd8a2af7ca1aa3baa3da627c8e5 100644 --- a/example/freertos_feature/interrupt/configs/e2000q_aarch32_eg_configs +++ b/example/freertos_feature/interrupt/configs/e2000q_aarch32_eg_configs @@ -111,6 +111,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -168,12 +177,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -185,14 +188,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -210,4 +232,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/interrupt/configs/e2000q_aarch64_eg_configs b/example/freertos_feature/interrupt/configs/e2000q_aarch64_eg_configs index 9c50f2b0368b0cb7549298c291755806fc32ae00..8d9d270c7b7ffcb25edb6a8a9cbae6a23aeee571 100644 --- a/example/freertos_feature/interrupt/configs/e2000q_aarch64_eg_configs +++ b/example/freertos_feature/interrupt/configs/e2000q_aarch64_eg_configs @@ -107,6 +107,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -164,12 +173,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -181,14 +184,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -206,4 +228,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/interrupt/configs/ft2004_aarch32_eg_configs b/example/freertos_feature/interrupt/configs/ft2004_aarch32_eg_configs index 4c5b2c49d6edae2d8456f3d083606aa9f62a3361..f9c0f856ae471442cfa41d5306f7d4d8ad54214f 100644 --- a/example/freertos_feature/interrupt/configs/ft2004_aarch32_eg_configs +++ b/example/freertos_feature/interrupt/configs/ft2004_aarch32_eg_configs @@ -111,6 +111,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -168,12 +177,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -185,14 +188,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -210,4 +232,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/interrupt/configs/ft2004_aarch64_eg_configs b/example/freertos_feature/interrupt/configs/ft2004_aarch64_eg_configs index da9c1f8182b98ecf314c436f79ccbf0a31c79673..3a613a71d2c89fd2a7dcb81d65abcdaa2ae34f8a 100644 --- a/example/freertos_feature/interrupt/configs/ft2004_aarch64_eg_configs +++ b/example/freertos_feature/interrupt/configs/ft2004_aarch64_eg_configs @@ -107,6 +107,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -164,12 +173,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -181,14 +184,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -206,4 +228,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/interrupt/sdkconfig b/example/freertos_feature/interrupt/sdkconfig index 9c50f2b0368b0cb7549298c291755806fc32ae00..8d9d270c7b7ffcb25edb6a8a9cbae6a23aeee571 100644 --- a/example/freertos_feature/interrupt/sdkconfig +++ b/example/freertos_feature/interrupt/sdkconfig @@ -107,6 +107,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -164,12 +173,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -181,14 +184,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -206,4 +228,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/interrupt/sdkconfig.h b/example/freertos_feature/interrupt/sdkconfig.h index 2e55f772e76d53ec6d106cb6e89fa66f67702aa0..dcec26b8aea2f9ddb037b7d2df2da2d39629b3d0 100644 --- a/example/freertos_feature/interrupt/sdkconfig.h +++ b/example/freertos_feature/interrupt/sdkconfig.h @@ -98,6 +98,12 @@ /* Compiler Options */ +/* Cross-Compiler Setting */ + +#define CONFIG_GCC_OPTIMIZE_LEVEL 0 +/* CONFIG_USE_EXT_COMPILER is not set */ +/* CONFIG_USE_KLIN_SYS is not set */ +/* end of Cross-Compiler Setting */ #define CONFIG_OUTPUT_BINARY /* end of Compiler Options */ /* end of Building Option */ @@ -145,11 +151,6 @@ /* CONFIG_FREERTOS_USE_FGDMA is not set */ /* end of Freertos DMA Drivers */ -/* Freertos MMC Drivers */ - -/* CONFIG_FREERTOS_USE_FSDIO is not set */ -/* end of Freertos MMC Drivers */ - /* Freertos Adc Drivers */ /* CONFIG_FREERTOS_USE_ADC is not set */ @@ -159,13 +160,29 @@ /* CONFIG_FREERTOS_USE_CAN is not set */ /* end of Freertos Can Drivers */ + +/* Freertos I2c Drivers */ + +/* CONFIG_FREERTOS_USE_I2C is not set */ +/* end of Freertos I2c Drivers */ + +/* Freertos Mio Drivers */ + +/* CONFIG_FREERTOS_USE_MIO is not set */ +/* end of Freertos Mio Drivers */ + +/* Freertos Timer Drivers */ + +/* CONFIG_FREERTOS_USE_TIMER is not set */ +/* end of Freertos Timer Drivers */ /* end of Component Configuration */ -/* FreeRTOS Setting */ +/* Third-Party Configuration */ /* CONFIG_USE_LWIP is not set */ #define CONFIG_USE_BACKTRACE /* CONFIG_USE_FATFS is not set */ +/* CONFIG_USE_FATFS_0_1_4 is not set */ /* CONFIG_USE_SFUD is not set */ /* CONFIG_USE_SPIFFS is not set */ /* CONFIG_USE_AMP is not set */ @@ -181,6 +198,27 @@ /* CONFIG_USE_TLSF is not set */ /* CONFIG_USE_SDMMC_CMD is not set */ /* CONFIG_USE_CHERRY_USB is not set */ -/* end of FreeRTOS Setting */ +/* end of Third-Party Configuration */ + +/* Kernel Configuration */ + +#define CONFIG_FREERTOS_OPTIMIZED_SCHEDULER +#define CONFIG_FREERTOS_HZ 1000 +#define CONFIG_FREERTOS_MAX_PRIORITIES 32 +#define CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES 13 +#define CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES 11 +#define CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS 1 +#define CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE 1024 +#define CONFIG_FREERTOS_MAX_TASK_NAME_LEN 32 +#define CONFIG_FREERTOS_TIMER_TASK_PRIORITY 1 +#define CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH 2048 +#define CONFIG_FREERTOS_TIMER_QUEUE_LENGTH 10 +#define CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE 0 +#define CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS +#define CONFIG_FREERTOS_USE_TRACE_FACILITY +#define CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS +/* CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set */ +#define CONFIG_FREERTOS_TOTAL_HEAP_SIZE 10240 +/* end of Kernel Configuration */ #endif diff --git a/example/freertos_feature/queue/configs/d2000_aarch32_eg_configs b/example/freertos_feature/queue/configs/d2000_aarch32_eg_configs index 464a31af9bb3111d91fad1699c91b41de9317519..167c80fe89f367062340c5a2c767770550b8d604 100644 --- a/example/freertos_feature/queue/configs/d2000_aarch32_eg_configs +++ b/example/freertos_feature/queue/configs/d2000_aarch32_eg_configs @@ -111,6 +111,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -168,12 +177,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -185,14 +188,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -210,4 +232,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/queue/configs/d2000_aarch64_eg_configs b/example/freertos_feature/queue/configs/d2000_aarch64_eg_configs index 64e6b4b7a6ae1664e07af0d9c84a440dabc972c1..dd6e043e88a26d71be46723e32b61cf8592c0b8b 100644 --- a/example/freertos_feature/queue/configs/d2000_aarch64_eg_configs +++ b/example/freertos_feature/queue/configs/d2000_aarch64_eg_configs @@ -107,6 +107,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -164,12 +173,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -181,14 +184,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -206,4 +228,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/queue/configs/e2000d_aarch32_eg_configs b/example/freertos_feature/queue/configs/e2000d_aarch32_eg_configs index fc31cd0b27be11b5e09995278c509299162fa4e9..b8357655abba933759b61900ba9607e412b6912a 100644 --- a/example/freertos_feature/queue/configs/e2000d_aarch32_eg_configs +++ b/example/freertos_feature/queue/configs/e2000d_aarch32_eg_configs @@ -111,6 +111,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -168,12 +177,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -185,14 +188,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -210,4 +232,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/queue/configs/e2000d_aarch64_eg_configs b/example/freertos_feature/queue/configs/e2000d_aarch64_eg_configs index 7e2efa4fba523e780f910a826b7f13a9552e4bbe..36fa9186b22fd962edaf23fd12bbc16106d9f4d1 100644 --- a/example/freertos_feature/queue/configs/e2000d_aarch64_eg_configs +++ b/example/freertos_feature/queue/configs/e2000d_aarch64_eg_configs @@ -107,6 +107,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -164,12 +173,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -181,14 +184,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -206,4 +228,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/queue/configs/e2000q_aarch32_eg_configs b/example/freertos_feature/queue/configs/e2000q_aarch32_eg_configs index 2fe965a523e72eb1736dfda348ff99451b89d666..8f410c5e35a13dd8a2af7ca1aa3baa3da627c8e5 100644 --- a/example/freertos_feature/queue/configs/e2000q_aarch32_eg_configs +++ b/example/freertos_feature/queue/configs/e2000q_aarch32_eg_configs @@ -111,6 +111,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -168,12 +177,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -185,14 +188,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -210,4 +232,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/queue/configs/e2000q_aarch64_eg_configs b/example/freertos_feature/queue/configs/e2000q_aarch64_eg_configs index 9c50f2b0368b0cb7549298c291755806fc32ae00..8d9d270c7b7ffcb25edb6a8a9cbae6a23aeee571 100644 --- a/example/freertos_feature/queue/configs/e2000q_aarch64_eg_configs +++ b/example/freertos_feature/queue/configs/e2000q_aarch64_eg_configs @@ -107,6 +107,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -164,12 +173,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -181,14 +184,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -206,4 +228,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/queue/configs/ft2004_aarch32_eg_configs b/example/freertos_feature/queue/configs/ft2004_aarch32_eg_configs index 4c5b2c49d6edae2d8456f3d083606aa9f62a3361..f9c0f856ae471442cfa41d5306f7d4d8ad54214f 100644 --- a/example/freertos_feature/queue/configs/ft2004_aarch32_eg_configs +++ b/example/freertos_feature/queue/configs/ft2004_aarch32_eg_configs @@ -111,6 +111,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -168,12 +177,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -185,14 +188,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -210,4 +232,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/queue/configs/ft2004_aarch64_eg_configs b/example/freertos_feature/queue/configs/ft2004_aarch64_eg_configs index da9c1f8182b98ecf314c436f79ccbf0a31c79673..3a613a71d2c89fd2a7dcb81d65abcdaa2ae34f8a 100644 --- a/example/freertos_feature/queue/configs/ft2004_aarch64_eg_configs +++ b/example/freertos_feature/queue/configs/ft2004_aarch64_eg_configs @@ -107,6 +107,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -164,12 +173,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -181,14 +184,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -206,4 +228,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/queue/sdkconfig b/example/freertos_feature/queue/sdkconfig index 9c50f2b0368b0cb7549298c291755806fc32ae00..8d9d270c7b7ffcb25edb6a8a9cbae6a23aeee571 100644 --- a/example/freertos_feature/queue/sdkconfig +++ b/example/freertos_feature/queue/sdkconfig @@ -107,6 +107,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -164,12 +173,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -181,14 +184,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -206,4 +228,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/queue/sdkconfig.h b/example/freertos_feature/queue/sdkconfig.h index 2e55f772e76d53ec6d106cb6e89fa66f67702aa0..dcec26b8aea2f9ddb037b7d2df2da2d39629b3d0 100644 --- a/example/freertos_feature/queue/sdkconfig.h +++ b/example/freertos_feature/queue/sdkconfig.h @@ -98,6 +98,12 @@ /* Compiler Options */ +/* Cross-Compiler Setting */ + +#define CONFIG_GCC_OPTIMIZE_LEVEL 0 +/* CONFIG_USE_EXT_COMPILER is not set */ +/* CONFIG_USE_KLIN_SYS is not set */ +/* end of Cross-Compiler Setting */ #define CONFIG_OUTPUT_BINARY /* end of Compiler Options */ /* end of Building Option */ @@ -145,11 +151,6 @@ /* CONFIG_FREERTOS_USE_FGDMA is not set */ /* end of Freertos DMA Drivers */ -/* Freertos MMC Drivers */ - -/* CONFIG_FREERTOS_USE_FSDIO is not set */ -/* end of Freertos MMC Drivers */ - /* Freertos Adc Drivers */ /* CONFIG_FREERTOS_USE_ADC is not set */ @@ -159,13 +160,29 @@ /* CONFIG_FREERTOS_USE_CAN is not set */ /* end of Freertos Can Drivers */ + +/* Freertos I2c Drivers */ + +/* CONFIG_FREERTOS_USE_I2C is not set */ +/* end of Freertos I2c Drivers */ + +/* Freertos Mio Drivers */ + +/* CONFIG_FREERTOS_USE_MIO is not set */ +/* end of Freertos Mio Drivers */ + +/* Freertos Timer Drivers */ + +/* CONFIG_FREERTOS_USE_TIMER is not set */ +/* end of Freertos Timer Drivers */ /* end of Component Configuration */ -/* FreeRTOS Setting */ +/* Third-Party Configuration */ /* CONFIG_USE_LWIP is not set */ #define CONFIG_USE_BACKTRACE /* CONFIG_USE_FATFS is not set */ +/* CONFIG_USE_FATFS_0_1_4 is not set */ /* CONFIG_USE_SFUD is not set */ /* CONFIG_USE_SPIFFS is not set */ /* CONFIG_USE_AMP is not set */ @@ -181,6 +198,27 @@ /* CONFIG_USE_TLSF is not set */ /* CONFIG_USE_SDMMC_CMD is not set */ /* CONFIG_USE_CHERRY_USB is not set */ -/* end of FreeRTOS Setting */ +/* end of Third-Party Configuration */ + +/* Kernel Configuration */ + +#define CONFIG_FREERTOS_OPTIMIZED_SCHEDULER +#define CONFIG_FREERTOS_HZ 1000 +#define CONFIG_FREERTOS_MAX_PRIORITIES 32 +#define CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES 13 +#define CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES 11 +#define CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS 1 +#define CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE 1024 +#define CONFIG_FREERTOS_MAX_TASK_NAME_LEN 32 +#define CONFIG_FREERTOS_TIMER_TASK_PRIORITY 1 +#define CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH 2048 +#define CONFIG_FREERTOS_TIMER_QUEUE_LENGTH 10 +#define CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE 0 +#define CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS +#define CONFIG_FREERTOS_USE_TRACE_FACILITY +#define CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS +/* CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set */ +#define CONFIG_FREERTOS_TOTAL_HEAP_SIZE 10240 +/* end of Kernel Configuration */ #endif diff --git a/example/freertos_feature/resource/configs/d2000_aarch32_eg_configs b/example/freertos_feature/resource/configs/d2000_aarch32_eg_configs index 464a31af9bb3111d91fad1699c91b41de9317519..167c80fe89f367062340c5a2c767770550b8d604 100644 --- a/example/freertos_feature/resource/configs/d2000_aarch32_eg_configs +++ b/example/freertos_feature/resource/configs/d2000_aarch32_eg_configs @@ -111,6 +111,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -168,12 +177,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -185,14 +188,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -210,4 +232,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/resource/configs/d2000_aarch64_eg_configs b/example/freertos_feature/resource/configs/d2000_aarch64_eg_configs index 64e6b4b7a6ae1664e07af0d9c84a440dabc972c1..dd6e043e88a26d71be46723e32b61cf8592c0b8b 100644 --- a/example/freertos_feature/resource/configs/d2000_aarch64_eg_configs +++ b/example/freertos_feature/resource/configs/d2000_aarch64_eg_configs @@ -107,6 +107,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -164,12 +173,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -181,14 +184,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -206,4 +228,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/resource/configs/e2000d_aarch32_eg_configs b/example/freertos_feature/resource/configs/e2000d_aarch32_eg_configs index fc31cd0b27be11b5e09995278c509299162fa4e9..b8357655abba933759b61900ba9607e412b6912a 100644 --- a/example/freertos_feature/resource/configs/e2000d_aarch32_eg_configs +++ b/example/freertos_feature/resource/configs/e2000d_aarch32_eg_configs @@ -111,6 +111,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -168,12 +177,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -185,14 +188,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -210,4 +232,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/resource/configs/e2000d_aarch64_eg_configs b/example/freertos_feature/resource/configs/e2000d_aarch64_eg_configs index 7e2efa4fba523e780f910a826b7f13a9552e4bbe..36fa9186b22fd962edaf23fd12bbc16106d9f4d1 100644 --- a/example/freertos_feature/resource/configs/e2000d_aarch64_eg_configs +++ b/example/freertos_feature/resource/configs/e2000d_aarch64_eg_configs @@ -107,6 +107,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -164,12 +173,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -181,14 +184,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -206,4 +228,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/resource/configs/e2000q_aarch32_eg_configs b/example/freertos_feature/resource/configs/e2000q_aarch32_eg_configs index 2fe965a523e72eb1736dfda348ff99451b89d666..8f410c5e35a13dd8a2af7ca1aa3baa3da627c8e5 100644 --- a/example/freertos_feature/resource/configs/e2000q_aarch32_eg_configs +++ b/example/freertos_feature/resource/configs/e2000q_aarch32_eg_configs @@ -111,6 +111,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -168,12 +177,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -185,14 +188,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -210,4 +232,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/resource/configs/e2000q_aarch64_eg_configs b/example/freertos_feature/resource/configs/e2000q_aarch64_eg_configs index 9c50f2b0368b0cb7549298c291755806fc32ae00..8d9d270c7b7ffcb25edb6a8a9cbae6a23aeee571 100644 --- a/example/freertos_feature/resource/configs/e2000q_aarch64_eg_configs +++ b/example/freertos_feature/resource/configs/e2000q_aarch64_eg_configs @@ -107,6 +107,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -164,12 +173,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -181,14 +184,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -206,4 +228,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/resource/configs/ft2004_aarch32_eg_configs b/example/freertos_feature/resource/configs/ft2004_aarch32_eg_configs index 4c5b2c49d6edae2d8456f3d083606aa9f62a3361..f9c0f856ae471442cfa41d5306f7d4d8ad54214f 100644 --- a/example/freertos_feature/resource/configs/ft2004_aarch32_eg_configs +++ b/example/freertos_feature/resource/configs/ft2004_aarch32_eg_configs @@ -111,6 +111,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -168,12 +177,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -185,14 +188,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -210,4 +232,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/resource/configs/ft2004_aarch64_eg_configs b/example/freertos_feature/resource/configs/ft2004_aarch64_eg_configs index da9c1f8182b98ecf314c436f79ccbf0a31c79673..3a613a71d2c89fd2a7dcb81d65abcdaa2ae34f8a 100644 --- a/example/freertos_feature/resource/configs/ft2004_aarch64_eg_configs +++ b/example/freertos_feature/resource/configs/ft2004_aarch64_eg_configs @@ -107,6 +107,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -164,12 +173,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -181,14 +184,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -206,4 +228,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/resource/sdkconfig b/example/freertos_feature/resource/sdkconfig index 9c50f2b0368b0cb7549298c291755806fc32ae00..8d9d270c7b7ffcb25edb6a8a9cbae6a23aeee571 100644 --- a/example/freertos_feature/resource/sdkconfig +++ b/example/freertos_feature/resource/sdkconfig @@ -107,6 +107,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -164,12 +173,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -181,14 +184,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -206,4 +228,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/resource/sdkconfig.h b/example/freertos_feature/resource/sdkconfig.h index 2e55f772e76d53ec6d106cb6e89fa66f67702aa0..dcec26b8aea2f9ddb037b7d2df2da2d39629b3d0 100644 --- a/example/freertos_feature/resource/sdkconfig.h +++ b/example/freertos_feature/resource/sdkconfig.h @@ -98,6 +98,12 @@ /* Compiler Options */ +/* Cross-Compiler Setting */ + +#define CONFIG_GCC_OPTIMIZE_LEVEL 0 +/* CONFIG_USE_EXT_COMPILER is not set */ +/* CONFIG_USE_KLIN_SYS is not set */ +/* end of Cross-Compiler Setting */ #define CONFIG_OUTPUT_BINARY /* end of Compiler Options */ /* end of Building Option */ @@ -145,11 +151,6 @@ /* CONFIG_FREERTOS_USE_FGDMA is not set */ /* end of Freertos DMA Drivers */ -/* Freertos MMC Drivers */ - -/* CONFIG_FREERTOS_USE_FSDIO is not set */ -/* end of Freertos MMC Drivers */ - /* Freertos Adc Drivers */ /* CONFIG_FREERTOS_USE_ADC is not set */ @@ -159,13 +160,29 @@ /* CONFIG_FREERTOS_USE_CAN is not set */ /* end of Freertos Can Drivers */ + +/* Freertos I2c Drivers */ + +/* CONFIG_FREERTOS_USE_I2C is not set */ +/* end of Freertos I2c Drivers */ + +/* Freertos Mio Drivers */ + +/* CONFIG_FREERTOS_USE_MIO is not set */ +/* end of Freertos Mio Drivers */ + +/* Freertos Timer Drivers */ + +/* CONFIG_FREERTOS_USE_TIMER is not set */ +/* end of Freertos Timer Drivers */ /* end of Component Configuration */ -/* FreeRTOS Setting */ +/* Third-Party Configuration */ /* CONFIG_USE_LWIP is not set */ #define CONFIG_USE_BACKTRACE /* CONFIG_USE_FATFS is not set */ +/* CONFIG_USE_FATFS_0_1_4 is not set */ /* CONFIG_USE_SFUD is not set */ /* CONFIG_USE_SPIFFS is not set */ /* CONFIG_USE_AMP is not set */ @@ -181,6 +198,27 @@ /* CONFIG_USE_TLSF is not set */ /* CONFIG_USE_SDMMC_CMD is not set */ /* CONFIG_USE_CHERRY_USB is not set */ -/* end of FreeRTOS Setting */ +/* end of Third-Party Configuration */ + +/* Kernel Configuration */ + +#define CONFIG_FREERTOS_OPTIMIZED_SCHEDULER +#define CONFIG_FREERTOS_HZ 1000 +#define CONFIG_FREERTOS_MAX_PRIORITIES 32 +#define CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES 13 +#define CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES 11 +#define CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS 1 +#define CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE 1024 +#define CONFIG_FREERTOS_MAX_TASK_NAME_LEN 32 +#define CONFIG_FREERTOS_TIMER_TASK_PRIORITY 1 +#define CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH 2048 +#define CONFIG_FREERTOS_TIMER_QUEUE_LENGTH 10 +#define CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE 0 +#define CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS +#define CONFIG_FREERTOS_USE_TRACE_FACILITY +#define CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS +/* CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set */ +#define CONFIG_FREERTOS_TOTAL_HEAP_SIZE 10240 +/* end of Kernel Configuration */ #endif diff --git a/example/freertos_feature/software_timer/configs/d2000_aarch32_eg_configs b/example/freertos_feature/software_timer/configs/d2000_aarch32_eg_configs index 464a31af9bb3111d91fad1699c91b41de9317519..167c80fe89f367062340c5a2c767770550b8d604 100644 --- a/example/freertos_feature/software_timer/configs/d2000_aarch32_eg_configs +++ b/example/freertos_feature/software_timer/configs/d2000_aarch32_eg_configs @@ -111,6 +111,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -168,12 +177,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -185,14 +188,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -210,4 +232,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/software_timer/configs/d2000_aarch64_eg_configs b/example/freertos_feature/software_timer/configs/d2000_aarch64_eg_configs index 64e6b4b7a6ae1664e07af0d9c84a440dabc972c1..dd6e043e88a26d71be46723e32b61cf8592c0b8b 100644 --- a/example/freertos_feature/software_timer/configs/d2000_aarch64_eg_configs +++ b/example/freertos_feature/software_timer/configs/d2000_aarch64_eg_configs @@ -107,6 +107,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -164,12 +173,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -181,14 +184,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -206,4 +228,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/software_timer/configs/e2000d_aarch32_eg_configs b/example/freertos_feature/software_timer/configs/e2000d_aarch32_eg_configs index fc31cd0b27be11b5e09995278c509299162fa4e9..b8357655abba933759b61900ba9607e412b6912a 100644 --- a/example/freertos_feature/software_timer/configs/e2000d_aarch32_eg_configs +++ b/example/freertos_feature/software_timer/configs/e2000d_aarch32_eg_configs @@ -111,6 +111,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -168,12 +177,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -185,14 +188,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -210,4 +232,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/software_timer/configs/e2000d_aarch64_eg_configs b/example/freertos_feature/software_timer/configs/e2000d_aarch64_eg_configs index 7e2efa4fba523e780f910a826b7f13a9552e4bbe..36fa9186b22fd962edaf23fd12bbc16106d9f4d1 100644 --- a/example/freertos_feature/software_timer/configs/e2000d_aarch64_eg_configs +++ b/example/freertos_feature/software_timer/configs/e2000d_aarch64_eg_configs @@ -107,6 +107,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -164,12 +173,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -181,14 +184,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -206,4 +228,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/software_timer/configs/e2000q_aarch32_eg_configs b/example/freertos_feature/software_timer/configs/e2000q_aarch32_eg_configs index 2fe965a523e72eb1736dfda348ff99451b89d666..8f410c5e35a13dd8a2af7ca1aa3baa3da627c8e5 100644 --- a/example/freertos_feature/software_timer/configs/e2000q_aarch32_eg_configs +++ b/example/freertos_feature/software_timer/configs/e2000q_aarch32_eg_configs @@ -111,6 +111,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -168,12 +177,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -185,14 +188,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -210,4 +232,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/software_timer/configs/e2000q_aarch64_eg_configs b/example/freertos_feature/software_timer/configs/e2000q_aarch64_eg_configs index 9c50f2b0368b0cb7549298c291755806fc32ae00..8d9d270c7b7ffcb25edb6a8a9cbae6a23aeee571 100644 --- a/example/freertos_feature/software_timer/configs/e2000q_aarch64_eg_configs +++ b/example/freertos_feature/software_timer/configs/e2000q_aarch64_eg_configs @@ -107,6 +107,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -164,12 +173,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -181,14 +184,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -206,4 +228,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/software_timer/configs/ft2004_aarch32_eg_configs b/example/freertos_feature/software_timer/configs/ft2004_aarch32_eg_configs index 4c5b2c49d6edae2d8456f3d083606aa9f62a3361..f9c0f856ae471442cfa41d5306f7d4d8ad54214f 100644 --- a/example/freertos_feature/software_timer/configs/ft2004_aarch32_eg_configs +++ b/example/freertos_feature/software_timer/configs/ft2004_aarch32_eg_configs @@ -111,6 +111,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -168,12 +177,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -185,14 +188,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -210,4 +232,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/software_timer/configs/ft2004_aarch64_eg_configs b/example/freertos_feature/software_timer/configs/ft2004_aarch64_eg_configs index da9c1f8182b98ecf314c436f79ccbf0a31c79673..3a613a71d2c89fd2a7dcb81d65abcdaa2ae34f8a 100644 --- a/example/freertos_feature/software_timer/configs/ft2004_aarch64_eg_configs +++ b/example/freertos_feature/software_timer/configs/ft2004_aarch64_eg_configs @@ -107,6 +107,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -164,12 +173,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -181,14 +184,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -206,4 +228,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/software_timer/sdkconfig b/example/freertos_feature/software_timer/sdkconfig index 9c50f2b0368b0cb7549298c291755806fc32ae00..8d9d270c7b7ffcb25edb6a8a9cbae6a23aeee571 100644 --- a/example/freertos_feature/software_timer/sdkconfig +++ b/example/freertos_feature/software_timer/sdkconfig @@ -107,6 +107,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -164,12 +173,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -181,14 +184,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -206,4 +228,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/software_timer/sdkconfig.h b/example/freertos_feature/software_timer/sdkconfig.h index 2e55f772e76d53ec6d106cb6e89fa66f67702aa0..dcec26b8aea2f9ddb037b7d2df2da2d39629b3d0 100644 --- a/example/freertos_feature/software_timer/sdkconfig.h +++ b/example/freertos_feature/software_timer/sdkconfig.h @@ -98,6 +98,12 @@ /* Compiler Options */ +/* Cross-Compiler Setting */ + +#define CONFIG_GCC_OPTIMIZE_LEVEL 0 +/* CONFIG_USE_EXT_COMPILER is not set */ +/* CONFIG_USE_KLIN_SYS is not set */ +/* end of Cross-Compiler Setting */ #define CONFIG_OUTPUT_BINARY /* end of Compiler Options */ /* end of Building Option */ @@ -145,11 +151,6 @@ /* CONFIG_FREERTOS_USE_FGDMA is not set */ /* end of Freertos DMA Drivers */ -/* Freertos MMC Drivers */ - -/* CONFIG_FREERTOS_USE_FSDIO is not set */ -/* end of Freertos MMC Drivers */ - /* Freertos Adc Drivers */ /* CONFIG_FREERTOS_USE_ADC is not set */ @@ -159,13 +160,29 @@ /* CONFIG_FREERTOS_USE_CAN is not set */ /* end of Freertos Can Drivers */ + +/* Freertos I2c Drivers */ + +/* CONFIG_FREERTOS_USE_I2C is not set */ +/* end of Freertos I2c Drivers */ + +/* Freertos Mio Drivers */ + +/* CONFIG_FREERTOS_USE_MIO is not set */ +/* end of Freertos Mio Drivers */ + +/* Freertos Timer Drivers */ + +/* CONFIG_FREERTOS_USE_TIMER is not set */ +/* end of Freertos Timer Drivers */ /* end of Component Configuration */ -/* FreeRTOS Setting */ +/* Third-Party Configuration */ /* CONFIG_USE_LWIP is not set */ #define CONFIG_USE_BACKTRACE /* CONFIG_USE_FATFS is not set */ +/* CONFIG_USE_FATFS_0_1_4 is not set */ /* CONFIG_USE_SFUD is not set */ /* CONFIG_USE_SPIFFS is not set */ /* CONFIG_USE_AMP is not set */ @@ -181,6 +198,27 @@ /* CONFIG_USE_TLSF is not set */ /* CONFIG_USE_SDMMC_CMD is not set */ /* CONFIG_USE_CHERRY_USB is not set */ -/* end of FreeRTOS Setting */ +/* end of Third-Party Configuration */ + +/* Kernel Configuration */ + +#define CONFIG_FREERTOS_OPTIMIZED_SCHEDULER +#define CONFIG_FREERTOS_HZ 1000 +#define CONFIG_FREERTOS_MAX_PRIORITIES 32 +#define CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES 13 +#define CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES 11 +#define CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS 1 +#define CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE 1024 +#define CONFIG_FREERTOS_MAX_TASK_NAME_LEN 32 +#define CONFIG_FREERTOS_TIMER_TASK_PRIORITY 1 +#define CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH 2048 +#define CONFIG_FREERTOS_TIMER_QUEUE_LENGTH 10 +#define CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE 0 +#define CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS +#define CONFIG_FREERTOS_USE_TRACE_FACILITY +#define CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS +/* CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set */ +#define CONFIG_FREERTOS_TOTAL_HEAP_SIZE 10240 +/* end of Kernel Configuration */ #endif diff --git a/example/freertos_feature/task/configs/d2000_aarch32_eg_configs b/example/freertos_feature/task/configs/d2000_aarch32_eg_configs index 464a31af9bb3111d91fad1699c91b41de9317519..167c80fe89f367062340c5a2c767770550b8d604 100644 --- a/example/freertos_feature/task/configs/d2000_aarch32_eg_configs +++ b/example/freertos_feature/task/configs/d2000_aarch32_eg_configs @@ -111,6 +111,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -168,12 +177,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -185,14 +188,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -210,4 +232,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/task/configs/d2000_aarch64_eg_configs b/example/freertos_feature/task/configs/d2000_aarch64_eg_configs index 64e6b4b7a6ae1664e07af0d9c84a440dabc972c1..dd6e043e88a26d71be46723e32b61cf8592c0b8b 100644 --- a/example/freertos_feature/task/configs/d2000_aarch64_eg_configs +++ b/example/freertos_feature/task/configs/d2000_aarch64_eg_configs @@ -107,6 +107,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -164,12 +173,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -181,14 +184,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -206,4 +228,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/task/configs/e2000d_aarch32_eg_configs b/example/freertos_feature/task/configs/e2000d_aarch32_eg_configs index fc31cd0b27be11b5e09995278c509299162fa4e9..b8357655abba933759b61900ba9607e412b6912a 100644 --- a/example/freertos_feature/task/configs/e2000d_aarch32_eg_configs +++ b/example/freertos_feature/task/configs/e2000d_aarch32_eg_configs @@ -111,6 +111,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -168,12 +177,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -185,14 +188,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -210,4 +232,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/task/configs/e2000d_aarch64_eg_configs b/example/freertos_feature/task/configs/e2000d_aarch64_eg_configs index 7e2efa4fba523e780f910a826b7f13a9552e4bbe..36fa9186b22fd962edaf23fd12bbc16106d9f4d1 100644 --- a/example/freertos_feature/task/configs/e2000d_aarch64_eg_configs +++ b/example/freertos_feature/task/configs/e2000d_aarch64_eg_configs @@ -107,6 +107,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -164,12 +173,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -181,14 +184,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -206,4 +228,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/task/configs/e2000q_aarch32_eg_configs b/example/freertos_feature/task/configs/e2000q_aarch32_eg_configs index 1b53ed9171a1fca357a6362a54b3f83039f9a6fd..1d648fdfc78c4c56a0a0492dadc9d50c15a1f45d 100644 --- a/example/freertos_feature/task/configs/e2000q_aarch32_eg_configs +++ b/example/freertos_feature/task/configs/e2000q_aarch32_eg_configs @@ -2,7 +2,7 @@ # # Freertos Configuration # -CONFIG_TARGET_NAME="e2000d_freertos_a32" +CONFIG_TARGET_NAME="e2000q_freertos_a32" # end of Freertos Configuration # @@ -111,6 +111,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -168,12 +177,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -185,14 +188,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -210,4 +232,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/task/configs/e2000q_aarch64_eg_configs b/example/freertos_feature/task/configs/e2000q_aarch64_eg_configs index 506efc21145e3c62ebe1b565aaebe9ed68d02d8b..bf644ffae2d5c09c9196792962f04e31101c3db6 100644 --- a/example/freertos_feature/task/configs/e2000q_aarch64_eg_configs +++ b/example/freertos_feature/task/configs/e2000q_aarch64_eg_configs @@ -2,7 +2,7 @@ # # Freertos Configuration # -CONFIG_TARGET_NAME="e2000d_freertos_a64" +CONFIG_TARGET_NAME="e2000q_freertos_a64" # end of Freertos Configuration # @@ -107,6 +107,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -164,12 +173,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -181,14 +184,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -206,4 +228,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/task/configs/ft2004_aarch32_eg_configs b/example/freertos_feature/task/configs/ft2004_aarch32_eg_configs index 4c5b2c49d6edae2d8456f3d083606aa9f62a3361..f9c0f856ae471442cfa41d5306f7d4d8ad54214f 100644 --- a/example/freertos_feature/task/configs/ft2004_aarch32_eg_configs +++ b/example/freertos_feature/task/configs/ft2004_aarch32_eg_configs @@ -111,6 +111,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -168,12 +177,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -185,14 +188,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -210,4 +232,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/task/configs/ft2004_aarch64_eg_configs b/example/freertos_feature/task/configs/ft2004_aarch64_eg_configs index da9c1f8182b98ecf314c436f79ccbf0a31c79673..3a613a71d2c89fd2a7dcb81d65abcdaa2ae34f8a 100644 --- a/example/freertos_feature/task/configs/ft2004_aarch64_eg_configs +++ b/example/freertos_feature/task/configs/ft2004_aarch64_eg_configs @@ -107,6 +107,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -164,12 +173,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -181,14 +184,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -206,4 +228,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/task/sdkconfig b/example/freertos_feature/task/sdkconfig index 506efc21145e3c62ebe1b565aaebe9ed68d02d8b..bf644ffae2d5c09c9196792962f04e31101c3db6 100644 --- a/example/freertos_feature/task/sdkconfig +++ b/example/freertos_feature/task/sdkconfig @@ -2,7 +2,7 @@ # # Freertos Configuration # -CONFIG_TARGET_NAME="e2000d_freertos_a64" +CONFIG_TARGET_NAME="e2000q_freertos_a64" # end of Freertos Configuration # @@ -107,6 +107,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -164,12 +173,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -181,14 +184,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -206,4 +228,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/task/sdkconfig.h b/example/freertos_feature/task/sdkconfig.h index 2ccaa5366aa6f3e1d5c66ad7cf530e14cd54c5cb..e17b230a4234cadccd56a3254cfc15dc58571194 100644 --- a/example/freertos_feature/task/sdkconfig.h +++ b/example/freertos_feature/task/sdkconfig.h @@ -3,7 +3,7 @@ /* Freertos Configuration */ -#define CONFIG_TARGET_NAME "e2000d_freertos_a64" +#define CONFIG_TARGET_NAME "e2000q_freertos_a64" /* end of Freertos Configuration */ /* Standalone Setting */ @@ -98,6 +98,12 @@ /* Compiler Options */ +/* Cross-Compiler Setting */ + +#define CONFIG_GCC_OPTIMIZE_LEVEL 0 +/* CONFIG_USE_EXT_COMPILER is not set */ +/* CONFIG_USE_KLIN_SYS is not set */ +/* end of Cross-Compiler Setting */ #define CONFIG_OUTPUT_BINARY /* end of Compiler Options */ /* end of Building Option */ @@ -145,11 +151,6 @@ /* CONFIG_FREERTOS_USE_FGDMA is not set */ /* end of Freertos DMA Drivers */ -/* Freertos MMC Drivers */ - -/* CONFIG_FREERTOS_USE_FSDIO is not set */ -/* end of Freertos MMC Drivers */ - /* Freertos Adc Drivers */ /* CONFIG_FREERTOS_USE_ADC is not set */ @@ -159,13 +160,29 @@ /* CONFIG_FREERTOS_USE_CAN is not set */ /* end of Freertos Can Drivers */ + +/* Freertos I2c Drivers */ + +/* CONFIG_FREERTOS_USE_I2C is not set */ +/* end of Freertos I2c Drivers */ + +/* Freertos Mio Drivers */ + +/* CONFIG_FREERTOS_USE_MIO is not set */ +/* end of Freertos Mio Drivers */ + +/* Freertos Timer Drivers */ + +/* CONFIG_FREERTOS_USE_TIMER is not set */ +/* end of Freertos Timer Drivers */ /* end of Component Configuration */ -/* FreeRTOS Setting */ +/* Third-Party Configuration */ /* CONFIG_USE_LWIP is not set */ #define CONFIG_USE_BACKTRACE /* CONFIG_USE_FATFS is not set */ +/* CONFIG_USE_FATFS_0_1_4 is not set */ /* CONFIG_USE_SFUD is not set */ /* CONFIG_USE_SPIFFS is not set */ /* CONFIG_USE_AMP is not set */ @@ -181,6 +198,27 @@ #define CONFIG_USE_TLSF /* CONFIG_USE_SDMMC_CMD is not set */ /* CONFIG_USE_CHERRY_USB is not set */ -/* end of FreeRTOS Setting */ +/* end of Third-Party Configuration */ + +/* Kernel Configuration */ + +#define CONFIG_FREERTOS_OPTIMIZED_SCHEDULER +#define CONFIG_FREERTOS_HZ 1000 +#define CONFIG_FREERTOS_MAX_PRIORITIES 32 +#define CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES 13 +#define CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES 11 +#define CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS 1 +#define CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE 1024 +#define CONFIG_FREERTOS_MAX_TASK_NAME_LEN 32 +#define CONFIG_FREERTOS_TIMER_TASK_PRIORITY 1 +#define CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH 2048 +#define CONFIG_FREERTOS_TIMER_QUEUE_LENGTH 10 +#define CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE 0 +#define CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS +#define CONFIG_FREERTOS_USE_TRACE_FACILITY +#define CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS +/* CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set */ +#define CONFIG_FREERTOS_TOTAL_HEAP_SIZE 10240 +/* end of Kernel Configuration */ #endif diff --git a/example/freertos_feature/task_notify/configs/d2000_aarch32_eg_configs b/example/freertos_feature/task_notify/configs/d2000_aarch32_eg_configs index 464a31af9bb3111d91fad1699c91b41de9317519..167c80fe89f367062340c5a2c767770550b8d604 100644 --- a/example/freertos_feature/task_notify/configs/d2000_aarch32_eg_configs +++ b/example/freertos_feature/task_notify/configs/d2000_aarch32_eg_configs @@ -111,6 +111,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -168,12 +177,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -185,14 +188,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -210,4 +232,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/task_notify/configs/d2000_aarch64_eg_configs b/example/freertos_feature/task_notify/configs/d2000_aarch64_eg_configs index 64e6b4b7a6ae1664e07af0d9c84a440dabc972c1..dd6e043e88a26d71be46723e32b61cf8592c0b8b 100644 --- a/example/freertos_feature/task_notify/configs/d2000_aarch64_eg_configs +++ b/example/freertos_feature/task_notify/configs/d2000_aarch64_eg_configs @@ -107,6 +107,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -164,12 +173,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -181,14 +184,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -206,4 +228,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/task_notify/configs/e2000d_aarch32_eg_configs b/example/freertos_feature/task_notify/configs/e2000d_aarch32_eg_configs index fc31cd0b27be11b5e09995278c509299162fa4e9..b8357655abba933759b61900ba9607e412b6912a 100644 --- a/example/freertos_feature/task_notify/configs/e2000d_aarch32_eg_configs +++ b/example/freertos_feature/task_notify/configs/e2000d_aarch32_eg_configs @@ -111,6 +111,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -168,12 +177,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -185,14 +188,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -210,4 +232,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/task_notify/configs/e2000d_aarch64_eg_configs b/example/freertos_feature/task_notify/configs/e2000d_aarch64_eg_configs index 7e2efa4fba523e780f910a826b7f13a9552e4bbe..36fa9186b22fd962edaf23fd12bbc16106d9f4d1 100644 --- a/example/freertos_feature/task_notify/configs/e2000d_aarch64_eg_configs +++ b/example/freertos_feature/task_notify/configs/e2000d_aarch64_eg_configs @@ -107,6 +107,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -164,12 +173,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -181,14 +184,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -206,4 +228,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/task_notify/configs/e2000q_aarch32_eg_configs b/example/freertos_feature/task_notify/configs/e2000q_aarch32_eg_configs index 1b53ed9171a1fca357a6362a54b3f83039f9a6fd..d7c90e62756ad1180e396a98aac69b780874f6e7 100644 --- a/example/freertos_feature/task_notify/configs/e2000q_aarch32_eg_configs +++ b/example/freertos_feature/task_notify/configs/e2000q_aarch32_eg_configs @@ -111,6 +111,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -168,12 +177,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -185,14 +188,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -210,4 +232,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/task_notify/configs/e2000q_aarch64_eg_configs b/example/freertos_feature/task_notify/configs/e2000q_aarch64_eg_configs index 9c50f2b0368b0cb7549298c291755806fc32ae00..8d9d270c7b7ffcb25edb6a8a9cbae6a23aeee571 100644 --- a/example/freertos_feature/task_notify/configs/e2000q_aarch64_eg_configs +++ b/example/freertos_feature/task_notify/configs/e2000q_aarch64_eg_configs @@ -107,6 +107,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -164,12 +173,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -181,14 +184,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -206,4 +228,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/task_notify/configs/ft2004_aarch32_eg_configs b/example/freertos_feature/task_notify/configs/ft2004_aarch32_eg_configs index 4c5b2c49d6edae2d8456f3d083606aa9f62a3361..f9c0f856ae471442cfa41d5306f7d4d8ad54214f 100644 --- a/example/freertos_feature/task_notify/configs/ft2004_aarch32_eg_configs +++ b/example/freertos_feature/task_notify/configs/ft2004_aarch32_eg_configs @@ -111,6 +111,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -168,12 +177,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -185,14 +188,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -210,4 +232,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/task_notify/configs/ft2004_aarch64_eg_configs b/example/freertos_feature/task_notify/configs/ft2004_aarch64_eg_configs index da9c1f8182b98ecf314c436f79ccbf0a31c79673..3a613a71d2c89fd2a7dcb81d65abcdaa2ae34f8a 100644 --- a/example/freertos_feature/task_notify/configs/ft2004_aarch64_eg_configs +++ b/example/freertos_feature/task_notify/configs/ft2004_aarch64_eg_configs @@ -107,6 +107,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -164,12 +173,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -181,14 +184,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -206,4 +228,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/task_notify/sdkconfig b/example/freertos_feature/task_notify/sdkconfig index 9c50f2b0368b0cb7549298c291755806fc32ae00..8d9d270c7b7ffcb25edb6a8a9cbae6a23aeee571 100644 --- a/example/freertos_feature/task_notify/sdkconfig +++ b/example/freertos_feature/task_notify/sdkconfig @@ -107,6 +107,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -164,12 +173,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -181,14 +184,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -206,4 +228,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/freertos_feature/task_notify/sdkconfig.h b/example/freertos_feature/task_notify/sdkconfig.h index 2e55f772e76d53ec6d106cb6e89fa66f67702aa0..dcec26b8aea2f9ddb037b7d2df2da2d39629b3d0 100644 --- a/example/freertos_feature/task_notify/sdkconfig.h +++ b/example/freertos_feature/task_notify/sdkconfig.h @@ -98,6 +98,12 @@ /* Compiler Options */ +/* Cross-Compiler Setting */ + +#define CONFIG_GCC_OPTIMIZE_LEVEL 0 +/* CONFIG_USE_EXT_COMPILER is not set */ +/* CONFIG_USE_KLIN_SYS is not set */ +/* end of Cross-Compiler Setting */ #define CONFIG_OUTPUT_BINARY /* end of Compiler Options */ /* end of Building Option */ @@ -145,11 +151,6 @@ /* CONFIG_FREERTOS_USE_FGDMA is not set */ /* end of Freertos DMA Drivers */ -/* Freertos MMC Drivers */ - -/* CONFIG_FREERTOS_USE_FSDIO is not set */ -/* end of Freertos MMC Drivers */ - /* Freertos Adc Drivers */ /* CONFIG_FREERTOS_USE_ADC is not set */ @@ -159,13 +160,29 @@ /* CONFIG_FREERTOS_USE_CAN is not set */ /* end of Freertos Can Drivers */ + +/* Freertos I2c Drivers */ + +/* CONFIG_FREERTOS_USE_I2C is not set */ +/* end of Freertos I2c Drivers */ + +/* Freertos Mio Drivers */ + +/* CONFIG_FREERTOS_USE_MIO is not set */ +/* end of Freertos Mio Drivers */ + +/* Freertos Timer Drivers */ + +/* CONFIG_FREERTOS_USE_TIMER is not set */ +/* end of Freertos Timer Drivers */ /* end of Component Configuration */ -/* FreeRTOS Setting */ +/* Third-Party Configuration */ /* CONFIG_USE_LWIP is not set */ #define CONFIG_USE_BACKTRACE /* CONFIG_USE_FATFS is not set */ +/* CONFIG_USE_FATFS_0_1_4 is not set */ /* CONFIG_USE_SFUD is not set */ /* CONFIG_USE_SPIFFS is not set */ /* CONFIG_USE_AMP is not set */ @@ -181,6 +198,27 @@ /* CONFIG_USE_TLSF is not set */ /* CONFIG_USE_SDMMC_CMD is not set */ /* CONFIG_USE_CHERRY_USB is not set */ -/* end of FreeRTOS Setting */ +/* end of Third-Party Configuration */ + +/* Kernel Configuration */ + +#define CONFIG_FREERTOS_OPTIMIZED_SCHEDULER +#define CONFIG_FREERTOS_HZ 1000 +#define CONFIG_FREERTOS_MAX_PRIORITIES 32 +#define CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES 13 +#define CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES 11 +#define CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS 1 +#define CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE 1024 +#define CONFIG_FREERTOS_MAX_TASK_NAME_LEN 32 +#define CONFIG_FREERTOS_TIMER_TASK_PRIORITY 1 +#define CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH 2048 +#define CONFIG_FREERTOS_TIMER_QUEUE_LENGTH 10 +#define CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE 0 +#define CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS +#define CONFIG_FREERTOS_USE_TRACE_FACILITY +#define CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS +/* CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set */ +#define CONFIG_FREERTOS_TOTAL_HEAP_SIZE 10240 +/* end of Kernel Configuration */ #endif diff --git a/example/network/gmac_lwip_test/configs/d2000_aarch32_eg_configs b/example/network/gmac_lwip_test/configs/d2000_aarch32_eg_configs index a0b4722fc0ba86d5336a9b9c072c99f41747c489..0c6f3c0332d6082291cd59af0366ba6154a81508 100644 --- a/example/network/gmac_lwip_test/configs/d2000_aarch32_eg_configs +++ b/example/network/gmac_lwip_test/configs/d2000_aarch32_eg_configs @@ -127,6 +127,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + # CONFIG_OUTPUT_BINARY is not set # end of Compiler Options # end of Building Option @@ -184,12 +193,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -201,10 +204,28 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # CONFIG_USE_LWIP=y @@ -391,6 +412,7 @@ CONFIG_LWIP_IP6_FRAG=y CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -408,4 +430,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/network/gmac_lwip_test/configs/d2000_aarch64_eg_configs b/example/network/gmac_lwip_test/configs/d2000_aarch64_eg_configs index b4dd0538e9dd1f344d719faa6d2faf2beef027f6..dd09077cd97f46cb0db467183dee69c7219daffd 100644 --- a/example/network/gmac_lwip_test/configs/d2000_aarch64_eg_configs +++ b/example/network/gmac_lwip_test/configs/d2000_aarch64_eg_configs @@ -123,6 +123,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + # CONFIG_OUTPUT_BINARY is not set # end of Compiler Options # end of Building Option @@ -180,12 +189,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -197,10 +200,28 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # CONFIG_USE_LWIP=y @@ -387,6 +408,7 @@ CONFIG_LWIP_IP6_FRAG=y CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -404,4 +426,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/network/gmac_lwip_test/configs/ft2004_aarch32_eg_configs b/example/network/gmac_lwip_test/configs/ft2004_aarch32_eg_configs index 366e33e6ed3e018163a1e1ea359632d030429b0b..3dc068dfdcef85c0d427ab2078b29fe9e503202d 100644 --- a/example/network/gmac_lwip_test/configs/ft2004_aarch32_eg_configs +++ b/example/network/gmac_lwip_test/configs/ft2004_aarch32_eg_configs @@ -127,6 +127,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + # CONFIG_OUTPUT_BINARY is not set # end of Compiler Options # end of Building Option @@ -184,12 +193,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -201,10 +204,28 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # CONFIG_USE_LWIP=y @@ -391,6 +412,7 @@ CONFIG_LWIP_IP6_FRAG=y CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -408,4 +430,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/network/gmac_lwip_test/configs/ft2004_aarch64_eg_configs b/example/network/gmac_lwip_test/configs/ft2004_aarch64_eg_configs index da6f3c910bdebccaec96c5e09c8997c38c85381f..8d95177e04d96a94410be2092c9146da9c6f7ad2 100644 --- a/example/network/gmac_lwip_test/configs/ft2004_aarch64_eg_configs +++ b/example/network/gmac_lwip_test/configs/ft2004_aarch64_eg_configs @@ -123,6 +123,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + # CONFIG_OUTPUT_BINARY is not set # end of Compiler Options # end of Building Option @@ -180,12 +189,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -197,10 +200,28 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # CONFIG_USE_LWIP=y @@ -387,6 +408,7 @@ CONFIG_LWIP_IP6_FRAG=y CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -404,4 +426,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/network/gmac_lwip_test/sdkconfig b/example/network/gmac_lwip_test/sdkconfig index b4dd0538e9dd1f344d719faa6d2faf2beef027f6..dd09077cd97f46cb0db467183dee69c7219daffd 100644 --- a/example/network/gmac_lwip_test/sdkconfig +++ b/example/network/gmac_lwip_test/sdkconfig @@ -123,6 +123,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + # CONFIG_OUTPUT_BINARY is not set # end of Compiler Options # end of Building Option @@ -180,12 +189,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -197,10 +200,28 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # CONFIG_USE_LWIP=y @@ -387,6 +408,7 @@ CONFIG_LWIP_IP6_FRAG=y CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -404,4 +426,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/network/gmac_lwip_test/sdkconfig.h b/example/network/gmac_lwip_test/sdkconfig.h index 985d2d5055d0c9b03c41de585582457410f4bb73..bc1c673b8604fb4dc722437cff08b4eb4a3fdf1b 100644 --- a/example/network/gmac_lwip_test/sdkconfig.h +++ b/example/network/gmac_lwip_test/sdkconfig.h @@ -112,6 +112,12 @@ /* Compiler Options */ +/* Cross-Compiler Setting */ + +#define CONFIG_GCC_OPTIMIZE_LEVEL 0 +/* CONFIG_USE_EXT_COMPILER is not set */ +/* CONFIG_USE_KLIN_SYS is not set */ +/* end of Cross-Compiler Setting */ /* CONFIG_OUTPUT_BINARY is not set */ /* end of Compiler Options */ /* end of Building Option */ @@ -159,11 +165,6 @@ /* CONFIG_FREERTOS_USE_FGDMA is not set */ /* end of Freertos DMA Drivers */ -/* Freertos MMC Drivers */ - -/* CONFIG_FREERTOS_USE_FSDIO is not set */ -/* end of Freertos MMC Drivers */ - /* Freertos Adc Drivers */ /* CONFIG_FREERTOS_USE_ADC is not set */ @@ -173,9 +174,24 @@ /* CONFIG_FREERTOS_USE_CAN is not set */ /* end of Freertos Can Drivers */ + +/* Freertos I2c Drivers */ + +/* CONFIG_FREERTOS_USE_I2C is not set */ +/* end of Freertos I2c Drivers */ + +/* Freertos Mio Drivers */ + +/* CONFIG_FREERTOS_USE_MIO is not set */ +/* end of Freertos Mio Drivers */ + +/* Freertos Timer Drivers */ + +/* CONFIG_FREERTOS_USE_TIMER is not set */ +/* end of Freertos Timer Drivers */ /* end of Component Configuration */ -/* FreeRTOS Setting */ +/* Third-Party Configuration */ #define CONFIG_USE_LWIP @@ -334,6 +350,7 @@ /* end of LWIP Configuration */ #define CONFIG_USE_BACKTRACE /* CONFIG_USE_FATFS is not set */ +/* CONFIG_USE_FATFS_0_1_4 is not set */ /* CONFIG_USE_SFUD is not set */ /* CONFIG_USE_SPIFFS is not set */ /* CONFIG_USE_AMP is not set */ @@ -349,6 +366,27 @@ #define CONFIG_USE_TLSF /* CONFIG_USE_SDMMC_CMD is not set */ /* CONFIG_USE_CHERRY_USB is not set */ -/* end of FreeRTOS Setting */ +/* end of Third-Party Configuration */ + +/* Kernel Configuration */ + +#define CONFIG_FREERTOS_OPTIMIZED_SCHEDULER +#define CONFIG_FREERTOS_HZ 1000 +#define CONFIG_FREERTOS_MAX_PRIORITIES 32 +#define CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES 13 +#define CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES 11 +#define CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS 1 +#define CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE 1024 +#define CONFIG_FREERTOS_MAX_TASK_NAME_LEN 32 +#define CONFIG_FREERTOS_TIMER_TASK_PRIORITY 1 +#define CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH 2048 +#define CONFIG_FREERTOS_TIMER_QUEUE_LENGTH 10 +#define CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE 0 +#define CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS +#define CONFIG_FREERTOS_USE_TRACE_FACILITY +#define CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS +/* CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set */ +#define CONFIG_FREERTOS_TOTAL_HEAP_SIZE 10240 +/* end of Kernel Configuration */ #endif diff --git a/example/network/gmac_lwip_test/src/lwip_test.c b/example/network/gmac_lwip_test/src/lwip_test.c index fa4bbc18cd064287ad7fe673076ccdbc9462f70a..494a07740cbc5d049543a8cb2a6096a57f598a11 100644 --- a/example/network/gmac_lwip_test/src/lwip_test.c +++ b/example/network/gmac_lwip_test/src/lwip_test.c @@ -59,17 +59,17 @@ #if defined(CONFIG_ENABLE_FGMAC) #include "ft_os_gmac.h" -static FtOsGmac os_gmac[GMAC_INSTANCE_NUM] = {0}; +static FtOsGmac os_gmac[FGMAC_NUM] = {0}; static u32 gmac_id = FT_OS_GMAC0_ID; /* the mac address of the board. this should be unique per board */ - unsigned char mac_ethernet_address[GMAC_INSTANCE_NUM][NETIF_MAX_HWADDR_LEN] = { + unsigned char mac_ethernet_address[FGMAC_NUM][NETIF_MAX_HWADDR_LEN] = { {0x0, 0x0, 0x1, 0x11, 0x1, 0x21}, {0x0, 0x0, 0x2, 0x22, 0x2, 0x23} }; #if !LWIP_IPV6 -ip4_addr_t ipaddr[GMAC_INSTANCE_NUM], netmask[GMAC_INSTANCE_NUM], gw[GMAC_INSTANCE_NUM]; +ip4_addr_t ipaddr[FGMAC_NUM], netmask[FGMAC_NUM], gw[FGMAC_NUM]; #if LWIP_DHCP static TaskHandle_t appTaskCreateHandle = NULL; void LwipDhcpTest(FtOsGmac *os_gmac) @@ -211,7 +211,7 @@ void LwipRawInit(FtOsGmac *os_gmac) void LwipTestCreate(void * args) { - FtOsGmacConfig os_config[GMAC_INSTANCE_NUM] = + FtOsGmacConfig os_config[FGMAC_NUM] = { { .gmac_instance = 0, diff --git a/example/network/sockets/udp_multicast/configs/e2000d_aarch32_eg_configs b/example/network/sockets/udp_multicast/configs/e2000d_aarch32_eg_configs index 6417f2c5c476931ee6317cf7dcaffab3b2f0d8de..62ea27ba997f39af785e0c568fb269c8a4863344 100644 --- a/example/network/sockets/udp_multicast/configs/e2000d_aarch32_eg_configs +++ b/example/network/sockets/udp_multicast/configs/e2000d_aarch32_eg_configs @@ -144,6 +144,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -201,12 +210,6 @@ CONFIG_FREERTOS_USE_XMAC=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -218,10 +221,28 @@ CONFIG_FREERTOS_USE_XMAC=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # CONFIG_USE_LWIP=y @@ -414,6 +435,7 @@ CONFIG_LWIP_NETIF_DEBUG=y CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -431,4 +453,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/network/sockets/udp_multicast/configs/e2000d_aarch64_eg_configs b/example/network/sockets/udp_multicast/configs/e2000d_aarch64_eg_configs index beb1c22b80c9daa166ed9f4da8dd5565f40fa9f4..3f7b0a8c034950df3277958e55e79a679a36cf61 100644 --- a/example/network/sockets/udp_multicast/configs/e2000d_aarch64_eg_configs +++ b/example/network/sockets/udp_multicast/configs/e2000d_aarch64_eg_configs @@ -139,6 +139,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -196,12 +205,6 @@ CONFIG_FREERTOS_USE_XMAC=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -213,10 +216,28 @@ CONFIG_FREERTOS_USE_XMAC=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # CONFIG_USE_LWIP=y @@ -416,6 +437,7 @@ CONFIG_LWIP_NETIF_DEBUG=y CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -433,4 +455,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/network/sockets/udp_multicast/configs/e2000q_aarch32_eg_configs b/example/network/sockets/udp_multicast/configs/e2000q_aarch32_eg_configs index c82eb6f4cddf1e3f57172cba5e774e10ba7580ae..0ca0c8a68004aa42ab795b6441900d61c0eb0541 100644 --- a/example/network/sockets/udp_multicast/configs/e2000q_aarch32_eg_configs +++ b/example/network/sockets/udp_multicast/configs/e2000q_aarch32_eg_configs @@ -144,6 +144,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -201,12 +210,6 @@ CONFIG_FREERTOS_USE_XMAC=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -218,10 +221,28 @@ CONFIG_FREERTOS_USE_XMAC=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # CONFIG_USE_LWIP=y @@ -421,6 +442,7 @@ CONFIG_LWIP_NETIF_DEBUG=y CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -438,4 +460,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/network/sockets/udp_multicast/configs/e2000q_aarch64_eg_configs b/example/network/sockets/udp_multicast/configs/e2000q_aarch64_eg_configs index 553b290de3e358200acc919572597c3a8fd36b8d..58938629d8f3298ea7e2ea4157cbee000f3a6a81 100644 --- a/example/network/sockets/udp_multicast/configs/e2000q_aarch64_eg_configs +++ b/example/network/sockets/udp_multicast/configs/e2000q_aarch64_eg_configs @@ -139,6 +139,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -196,12 +205,6 @@ CONFIG_FREERTOS_USE_XMAC=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -213,10 +216,28 @@ CONFIG_FREERTOS_USE_XMAC=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # CONFIG_USE_LWIP=y @@ -416,6 +437,7 @@ CONFIG_LWIP_NETIF_DEBUG=y CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -433,4 +455,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/network/sockets/udp_multicast/sdkconfig b/example/network/sockets/udp_multicast/sdkconfig index 553b290de3e358200acc919572597c3a8fd36b8d..58938629d8f3298ea7e2ea4157cbee000f3a6a81 100644 --- a/example/network/sockets/udp_multicast/sdkconfig +++ b/example/network/sockets/udp_multicast/sdkconfig @@ -139,6 +139,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -196,12 +205,6 @@ CONFIG_FREERTOS_USE_XMAC=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -213,10 +216,28 @@ CONFIG_FREERTOS_USE_XMAC=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # CONFIG_USE_LWIP=y @@ -416,6 +437,7 @@ CONFIG_LWIP_NETIF_DEBUG=y CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -433,4 +455,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/network/sockets/udp_multicast/sdkconfig.h b/example/network/sockets/udp_multicast/sdkconfig.h index be41343683618852a3345e70976c59bb7c67120b..766a50b3a464daa8b9a8d908098cbb6104e12b6f 100644 --- a/example/network/sockets/udp_multicast/sdkconfig.h +++ b/example/network/sockets/udp_multicast/sdkconfig.h @@ -126,6 +126,12 @@ /* Compiler Options */ +/* Cross-Compiler Setting */ + +#define CONFIG_GCC_OPTIMIZE_LEVEL 0 +/* CONFIG_USE_EXT_COMPILER is not set */ +/* CONFIG_USE_KLIN_SYS is not set */ +/* end of Cross-Compiler Setting */ #define CONFIG_OUTPUT_BINARY /* end of Compiler Options */ /* end of Building Option */ @@ -173,11 +179,6 @@ /* CONFIG_FREERTOS_USE_FGDMA is not set */ /* end of Freertos DMA Drivers */ -/* Freertos MMC Drivers */ - -/* CONFIG_FREERTOS_USE_FSDIO is not set */ -/* end of Freertos MMC Drivers */ - /* Freertos Adc Drivers */ /* CONFIG_FREERTOS_USE_ADC is not set */ @@ -187,9 +188,24 @@ /* CONFIG_FREERTOS_USE_CAN is not set */ /* end of Freertos Can Drivers */ + +/* Freertos I2c Drivers */ + +/* CONFIG_FREERTOS_USE_I2C is not set */ +/* end of Freertos I2c Drivers */ + +/* Freertos Mio Drivers */ + +/* CONFIG_FREERTOS_USE_MIO is not set */ +/* end of Freertos Mio Drivers */ + +/* Freertos Timer Drivers */ + +/* CONFIG_FREERTOS_USE_TIMER is not set */ +/* end of Freertos Timer Drivers */ /* end of Component Configuration */ -/* FreeRTOS Setting */ +/* Third-Party Configuration */ #define CONFIG_USE_LWIP @@ -361,6 +377,7 @@ /* end of LWIP Configuration */ #define CONFIG_USE_BACKTRACE /* CONFIG_USE_FATFS is not set */ +/* CONFIG_USE_FATFS_0_1_4 is not set */ /* CONFIG_USE_SFUD is not set */ /* CONFIG_USE_SPIFFS is not set */ /* CONFIG_USE_AMP is not set */ @@ -376,6 +393,27 @@ #define CONFIG_USE_TLSF /* CONFIG_USE_SDMMC_CMD is not set */ /* CONFIG_USE_CHERRY_USB is not set */ -/* end of FreeRTOS Setting */ +/* end of Third-Party Configuration */ + +/* Kernel Configuration */ + +#define CONFIG_FREERTOS_OPTIMIZED_SCHEDULER +#define CONFIG_FREERTOS_HZ 1000 +#define CONFIG_FREERTOS_MAX_PRIORITIES 32 +#define CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES 13 +#define CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES 11 +#define CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS 1 +#define CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE 1024 +#define CONFIG_FREERTOS_MAX_TASK_NAME_LEN 32 +#define CONFIG_FREERTOS_TIMER_TASK_PRIORITY 1 +#define CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH 2048 +#define CONFIG_FREERTOS_TIMER_QUEUE_LENGTH 10 +#define CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE 0 +#define CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS +#define CONFIG_FREERTOS_USE_TRACE_FACILITY +#define CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS +/* CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set */ +#define CONFIG_FREERTOS_TOTAL_HEAP_SIZE 10240 +/* end of Kernel Configuration */ #endif diff --git a/example/network/xmac_lwip_test/configs/e2000d_aarch32_eg_configs b/example/network/xmac_lwip_test/configs/e2000d_aarch32_eg_configs index c11555f1df43eacd2383ebb7c837d2b7215c5a25..cd101430d90b6e7d12551aa1a88f964077f84c6d 100644 --- a/example/network/xmac_lwip_test/configs/e2000d_aarch32_eg_configs +++ b/example/network/xmac_lwip_test/configs/e2000d_aarch32_eg_configs @@ -133,6 +133,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -190,12 +199,6 @@ CONFIG_FREERTOS_USE_XMAC=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -207,10 +210,28 @@ CONFIG_FREERTOS_USE_XMAC=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # CONFIG_USE_LWIP=y @@ -410,6 +431,7 @@ CONFIG_LWIP_NETIF_DEBUG=y CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -427,4 +449,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/network/xmac_lwip_test/configs/e2000d_aarch64_eg_configs b/example/network/xmac_lwip_test/configs/e2000d_aarch64_eg_configs index 31ac52cbc6d0513a5fbcf778956ff1aca3154ae8..3ea66f91c022a091a04557d604fd7594271c5c91 100644 --- a/example/network/xmac_lwip_test/configs/e2000d_aarch64_eg_configs +++ b/example/network/xmac_lwip_test/configs/e2000d_aarch64_eg_configs @@ -129,6 +129,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -186,12 +195,6 @@ CONFIG_FREERTOS_USE_XMAC=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -203,10 +206,28 @@ CONFIG_FREERTOS_USE_XMAC=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # CONFIG_USE_LWIP=y @@ -406,6 +427,7 @@ CONFIG_LWIP_NETIF_DEBUG=y CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -423,4 +445,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/network/xmac_lwip_test/configs/e2000q_aarch32_eg_configs b/example/network/xmac_lwip_test/configs/e2000q_aarch32_eg_configs index 04aefcdc045fb2a23782d7edd7beb862c0bc3893..aeb87d35f46140b1cc55889fa5142c82eacad8d1 100644 --- a/example/network/xmac_lwip_test/configs/e2000q_aarch32_eg_configs +++ b/example/network/xmac_lwip_test/configs/e2000q_aarch32_eg_configs @@ -133,6 +133,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -190,12 +199,6 @@ CONFIG_FREERTOS_USE_XMAC=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -207,10 +210,28 @@ CONFIG_FREERTOS_USE_XMAC=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # CONFIG_USE_LWIP=y @@ -410,6 +431,7 @@ CONFIG_LWIP_NETIF_DEBUG=y CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -427,4 +449,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/network/xmac_lwip_test/configs/e2000q_aarch64_eg_configs b/example/network/xmac_lwip_test/configs/e2000q_aarch64_eg_configs index 9ee6c5008e326b2075a1eebac6ecb39c42005d05..37040a6131c9dd56727e47ebb155fcef89f0b15f 100644 --- a/example/network/xmac_lwip_test/configs/e2000q_aarch64_eg_configs +++ b/example/network/xmac_lwip_test/configs/e2000q_aarch64_eg_configs @@ -129,6 +129,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -186,12 +195,6 @@ CONFIG_FREERTOS_USE_XMAC=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -203,10 +206,28 @@ CONFIG_FREERTOS_USE_XMAC=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # CONFIG_USE_LWIP=y @@ -406,6 +427,7 @@ CONFIG_LWIP_NETIF_DEBUG=y CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -423,4 +445,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/network/xmac_lwip_test/sdkconfig b/example/network/xmac_lwip_test/sdkconfig index 9ee6c5008e326b2075a1eebac6ecb39c42005d05..37040a6131c9dd56727e47ebb155fcef89f0b15f 100644 --- a/example/network/xmac_lwip_test/sdkconfig +++ b/example/network/xmac_lwip_test/sdkconfig @@ -129,6 +129,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -186,12 +195,6 @@ CONFIG_FREERTOS_USE_XMAC=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -203,10 +206,28 @@ CONFIG_FREERTOS_USE_XMAC=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # CONFIG_USE_LWIP=y @@ -406,6 +427,7 @@ CONFIG_LWIP_NETIF_DEBUG=y CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -423,4 +445,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/network/xmac_lwip_test/sdkconfig.h b/example/network/xmac_lwip_test/sdkconfig.h index ae529bef514c0ae173f6b978a218eea045ef33e8..5381836e095492d786f36bc81cccdb19889eec33 100644 --- a/example/network/xmac_lwip_test/sdkconfig.h +++ b/example/network/xmac_lwip_test/sdkconfig.h @@ -117,6 +117,12 @@ /* Compiler Options */ +/* Cross-Compiler Setting */ + +#define CONFIG_GCC_OPTIMIZE_LEVEL 0 +/* CONFIG_USE_EXT_COMPILER is not set */ +/* CONFIG_USE_KLIN_SYS is not set */ +/* end of Cross-Compiler Setting */ #define CONFIG_OUTPUT_BINARY /* end of Compiler Options */ /* end of Building Option */ @@ -164,11 +170,6 @@ /* CONFIG_FREERTOS_USE_FGDMA is not set */ /* end of Freertos DMA Drivers */ -/* Freertos MMC Drivers */ - -/* CONFIG_FREERTOS_USE_FSDIO is not set */ -/* end of Freertos MMC Drivers */ - /* Freertos Adc Drivers */ /* CONFIG_FREERTOS_USE_ADC is not set */ @@ -178,9 +179,24 @@ /* CONFIG_FREERTOS_USE_CAN is not set */ /* end of Freertos Can Drivers */ + +/* Freertos I2c Drivers */ + +/* CONFIG_FREERTOS_USE_I2C is not set */ +/* end of Freertos I2c Drivers */ + +/* Freertos Mio Drivers */ + +/* CONFIG_FREERTOS_USE_MIO is not set */ +/* end of Freertos Mio Drivers */ + +/* Freertos Timer Drivers */ + +/* CONFIG_FREERTOS_USE_TIMER is not set */ +/* end of Freertos Timer Drivers */ /* end of Component Configuration */ -/* FreeRTOS Setting */ +/* Third-Party Configuration */ #define CONFIG_USE_LWIP @@ -352,6 +368,7 @@ /* end of LWIP Configuration */ #define CONFIG_USE_BACKTRACE /* CONFIG_USE_FATFS is not set */ +/* CONFIG_USE_FATFS_0_1_4 is not set */ /* CONFIG_USE_SFUD is not set */ /* CONFIG_USE_SPIFFS is not set */ /* CONFIG_USE_AMP is not set */ @@ -367,6 +384,27 @@ #define CONFIG_USE_TLSF /* CONFIG_USE_SDMMC_CMD is not set */ /* CONFIG_USE_CHERRY_USB is not set */ -/* end of FreeRTOS Setting */ +/* end of Third-Party Configuration */ + +/* Kernel Configuration */ + +#define CONFIG_FREERTOS_OPTIMIZED_SCHEDULER +#define CONFIG_FREERTOS_HZ 1000 +#define CONFIG_FREERTOS_MAX_PRIORITIES 32 +#define CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES 13 +#define CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES 11 +#define CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS 1 +#define CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE 1024 +#define CONFIG_FREERTOS_MAX_TASK_NAME_LEN 32 +#define CONFIG_FREERTOS_TIMER_TASK_PRIORITY 1 +#define CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH 2048 +#define CONFIG_FREERTOS_TIMER_QUEUE_LENGTH 10 +#define CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE 0 +#define CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS +#define CONFIG_FREERTOS_USE_TRACE_FACILITY +#define CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS +/* CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set */ +#define CONFIG_FREERTOS_TOTAL_HEAP_SIZE 10240 +/* end of Kernel Configuration */ #endif diff --git a/example/peripheral/adc/configs/e2000d_aarch32_eg_configs b/example/peripheral/adc/configs/e2000d_aarch32_eg_configs index f0bf9f4afc2ae2fc03c9731fa7ddb95ce5083701..f1cd295931cf8856123d0e5aac7a83c9a7e91aa0 100644 --- a/example/peripheral/adc/configs/e2000d_aarch32_eg_configs +++ b/example/peripheral/adc/configs/e2000d_aarch32_eg_configs @@ -118,6 +118,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -175,12 +184,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -192,14 +195,33 @@ CONFIG_FREERTOS_USE_ADC=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -217,4 +239,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/adc/configs/e2000d_aarch64_eg_configs b/example/peripheral/adc/configs/e2000d_aarch64_eg_configs index 4e2e0dfec4ef3a32f2dbeba38ca8486a12998648..ecb9124ded16d240f3e5eee479d0c8fb5e69ea13 100644 --- a/example/peripheral/adc/configs/e2000d_aarch64_eg_configs +++ b/example/peripheral/adc/configs/e2000d_aarch64_eg_configs @@ -114,6 +114,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -171,12 +180,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -188,14 +191,33 @@ CONFIG_FREERTOS_USE_ADC=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -213,4 +235,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/adc/sdkconfig b/example/peripheral/adc/sdkconfig index 4e2e0dfec4ef3a32f2dbeba38ca8486a12998648..ecb9124ded16d240f3e5eee479d0c8fb5e69ea13 100644 --- a/example/peripheral/adc/sdkconfig +++ b/example/peripheral/adc/sdkconfig @@ -114,6 +114,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -171,12 +180,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -188,14 +191,33 @@ CONFIG_FREERTOS_USE_ADC=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -213,4 +235,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/adc/sdkconfig.h b/example/peripheral/adc/sdkconfig.h index 5a057cb72e85731a15cdd86bf1e5c90d3fb6d341..ec5c9d0edc72d3da5a1ac1a33e364d919184b44c 100644 --- a/example/peripheral/adc/sdkconfig.h +++ b/example/peripheral/adc/sdkconfig.h @@ -103,6 +103,12 @@ /* Compiler Options */ +/* Cross-Compiler Setting */ + +#define CONFIG_GCC_OPTIMIZE_LEVEL 0 +/* CONFIG_USE_EXT_COMPILER is not set */ +/* CONFIG_USE_KLIN_SYS is not set */ +/* end of Cross-Compiler Setting */ #define CONFIG_OUTPUT_BINARY /* end of Compiler Options */ /* end of Building Option */ @@ -150,11 +156,6 @@ /* CONFIG_FREERTOS_USE_FGDMA is not set */ /* end of Freertos DMA Drivers */ -/* Freertos MMC Drivers */ - -/* CONFIG_FREERTOS_USE_FSDIO is not set */ -/* end of Freertos MMC Drivers */ - /* Freertos Adc Drivers */ #define CONFIG_FREERTOS_USE_ADC @@ -164,13 +165,29 @@ /* CONFIG_FREERTOS_USE_CAN is not set */ /* end of Freertos Can Drivers */ + +/* Freertos I2c Drivers */ + +/* CONFIG_FREERTOS_USE_I2C is not set */ +/* end of Freertos I2c Drivers */ + +/* Freertos Mio Drivers */ + +/* CONFIG_FREERTOS_USE_MIO is not set */ +/* end of Freertos Mio Drivers */ + +/* Freertos Timer Drivers */ + +/* CONFIG_FREERTOS_USE_TIMER is not set */ +/* end of Freertos Timer Drivers */ /* end of Component Configuration */ -/* FreeRTOS Setting */ +/* Third-Party Configuration */ /* CONFIG_USE_LWIP is not set */ #define CONFIG_USE_BACKTRACE /* CONFIG_USE_FATFS is not set */ +/* CONFIG_USE_FATFS_0_1_4 is not set */ /* CONFIG_USE_SFUD is not set */ /* CONFIG_USE_SPIFFS is not set */ /* CONFIG_USE_AMP is not set */ @@ -186,6 +203,27 @@ /* CONFIG_USE_TLSF is not set */ /* CONFIG_USE_SDMMC_CMD is not set */ /* CONFIG_USE_CHERRY_USB is not set */ -/* end of FreeRTOS Setting */ +/* end of Third-Party Configuration */ + +/* Kernel Configuration */ + +#define CONFIG_FREERTOS_OPTIMIZED_SCHEDULER +#define CONFIG_FREERTOS_HZ 1000 +#define CONFIG_FREERTOS_MAX_PRIORITIES 32 +#define CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES 13 +#define CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES 11 +#define CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS 1 +#define CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE 1024 +#define CONFIG_FREERTOS_MAX_TASK_NAME_LEN 32 +#define CONFIG_FREERTOS_TIMER_TASK_PRIORITY 1 +#define CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH 2048 +#define CONFIG_FREERTOS_TIMER_QUEUE_LENGTH 10 +#define CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE 0 +#define CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS +#define CONFIG_FREERTOS_USE_TRACE_FACILITY +#define CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS +/* CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set */ +#define CONFIG_FREERTOS_TOTAL_HEAP_SIZE 10240 +/* end of Kernel Configuration */ #endif diff --git a/example/peripheral/adc/src/adc_example.c b/example/peripheral/adc/src/adc_example.c index 6387d65c4d40daba232fb136267c46f4b96fc35f..bc48e3d69c7ec59542a74809a2c6f8ad64967a9a 100644 --- a/example/peripheral/adc/src/adc_example.c +++ b/example/peripheral/adc/src/adc_example.c @@ -169,7 +169,7 @@ static void prvOneShotTimerCallback( TimerHandle_t xTimer ) /* create adc test, id is adc module number */ BaseType_t FFreeRTOSAdcCreate(u32 id) { - FASSERT(id < FADC_INSTANCE_NUM); + FASSERT(id < FADC_NUM); BaseType_t xReturn = pdPASS;/* 定义一个创建信息返回值,默认为 pdPASS */ BaseType_t timer_started = pdPASS; diff --git a/example/peripheral/can/configs/d2000_aarch32_eg_configs b/example/peripheral/can/configs/d2000_aarch32_eg_configs index 21df156565e2e19858ac7e7134e1b32f3f90ef1d..058b1396e5c7b0b8ad8a33a3a6d3549dd23540f0 100644 --- a/example/peripheral/can/configs/d2000_aarch32_eg_configs +++ b/example/peripheral/can/configs/d2000_aarch32_eg_configs @@ -118,6 +118,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -175,12 +184,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -192,14 +195,33 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_CAN=y # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -217,4 +239,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/can/configs/d2000_aarch64_eg_configs b/example/peripheral/can/configs/d2000_aarch64_eg_configs index 4f6cc9f82e64bea75659a3f010c254d51391c0dd..b5e78cc64c00b5ee952e6d04d9d0af9c498d3581 100644 --- a/example/peripheral/can/configs/d2000_aarch64_eg_configs +++ b/example/peripheral/can/configs/d2000_aarch64_eg_configs @@ -114,6 +114,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -171,12 +180,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -188,14 +191,33 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_CAN=y # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -213,4 +235,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/can/configs/e2000d_aarch32_eg_configs b/example/peripheral/can/configs/e2000d_aarch32_eg_configs index 3cd7acf3de64693ee3a3363152f0580c7f2392ef..7ebe6a7d521488730b37086c076c89c1517116e3 100644 --- a/example/peripheral/can/configs/e2000d_aarch32_eg_configs +++ b/example/peripheral/can/configs/e2000d_aarch32_eg_configs @@ -119,6 +119,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -176,12 +185,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -193,14 +196,33 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_CAN=y # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -218,4 +240,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/can/configs/e2000d_aarch64_eg_configs b/example/peripheral/can/configs/e2000d_aarch64_eg_configs index 6a693a60e600129bdda400967365491c6edb743a..837103314576cee2428c875f24d26e9a172bcd00 100644 --- a/example/peripheral/can/configs/e2000d_aarch64_eg_configs +++ b/example/peripheral/can/configs/e2000d_aarch64_eg_configs @@ -115,6 +115,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -172,12 +181,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -189,14 +192,33 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_CAN=y # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -214,4 +236,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/can/configs/e2000q_aarch32_eg_configs b/example/peripheral/can/configs/e2000q_aarch32_eg_configs index 8594079b22fc50c818cef68986187d736025828e..8faf40197fe7d096f382a69bb148edbcedca2575 100644 --- a/example/peripheral/can/configs/e2000q_aarch32_eg_configs +++ b/example/peripheral/can/configs/e2000q_aarch32_eg_configs @@ -119,6 +119,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -176,12 +185,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -193,14 +196,33 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_CAN=y # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -218,4 +240,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/can/configs/e2000q_aarch64_eg_configs b/example/peripheral/can/configs/e2000q_aarch64_eg_configs index d4e4e1f6e5ce65e05b2fb79d3e9f5e291e817c51..651e30fa92611296be60cb6e83fddb3d7892b8b1 100644 --- a/example/peripheral/can/configs/e2000q_aarch64_eg_configs +++ b/example/peripheral/can/configs/e2000q_aarch64_eg_configs @@ -115,6 +115,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -172,12 +181,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -189,14 +192,33 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_CAN=y # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -214,4 +236,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/can/configs/ft2004_aarch32_eg_configs b/example/peripheral/can/configs/ft2004_aarch32_eg_configs index db34ea5bf4e30a7bba307d80736056112ad21636..f2abf0f7d18de994502d5cb19223e8c05bdfa81e 100644 --- a/example/peripheral/can/configs/ft2004_aarch32_eg_configs +++ b/example/peripheral/can/configs/ft2004_aarch32_eg_configs @@ -118,6 +118,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -175,12 +184,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -192,14 +195,33 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_CAN=y # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -217,4 +239,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/can/configs/ft2004_aarch64_eg_configs b/example/peripheral/can/configs/ft2004_aarch64_eg_configs index 405c6b734978b1c3499dc859149f2a11acf5721d..14e0e9339b7067256b554ad8d42a065e5d3974b7 100644 --- a/example/peripheral/can/configs/ft2004_aarch64_eg_configs +++ b/example/peripheral/can/configs/ft2004_aarch64_eg_configs @@ -114,6 +114,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -171,12 +180,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -188,14 +191,33 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_CAN=y # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -213,4 +235,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/can/sdkconfig b/example/peripheral/can/sdkconfig index d4e4e1f6e5ce65e05b2fb79d3e9f5e291e817c51..651e30fa92611296be60cb6e83fddb3d7892b8b1 100644 --- a/example/peripheral/can/sdkconfig +++ b/example/peripheral/can/sdkconfig @@ -115,6 +115,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -172,12 +181,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -189,14 +192,33 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_CAN=y # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -214,4 +236,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/can/sdkconfig.h b/example/peripheral/can/sdkconfig.h index 75a30b3b40911d0db7289754ebdc4cb4c1bca83e..d431dbf8ec60a1bc65e0ebb508ff3ff956bc32fb 100644 --- a/example/peripheral/can/sdkconfig.h +++ b/example/peripheral/can/sdkconfig.h @@ -104,6 +104,12 @@ /* Compiler Options */ +/* Cross-Compiler Setting */ + +#define CONFIG_GCC_OPTIMIZE_LEVEL 0 +/* CONFIG_USE_EXT_COMPILER is not set */ +/* CONFIG_USE_KLIN_SYS is not set */ +/* end of Cross-Compiler Setting */ #define CONFIG_OUTPUT_BINARY /* end of Compiler Options */ /* end of Building Option */ @@ -151,11 +157,6 @@ /* CONFIG_FREERTOS_USE_FGDMA is not set */ /* end of Freertos DMA Drivers */ -/* Freertos MMC Drivers */ - -/* CONFIG_FREERTOS_USE_FSDIO is not set */ -/* end of Freertos MMC Drivers */ - /* Freertos Adc Drivers */ /* CONFIG_FREERTOS_USE_ADC is not set */ @@ -165,13 +166,29 @@ #define CONFIG_FREERTOS_USE_CAN /* end of Freertos Can Drivers */ + +/* Freertos I2c Drivers */ + +/* CONFIG_FREERTOS_USE_I2C is not set */ +/* end of Freertos I2c Drivers */ + +/* Freertos Mio Drivers */ + +/* CONFIG_FREERTOS_USE_MIO is not set */ +/* end of Freertos Mio Drivers */ + +/* Freertos Timer Drivers */ + +/* CONFIG_FREERTOS_USE_TIMER is not set */ +/* end of Freertos Timer Drivers */ /* end of Component Configuration */ -/* FreeRTOS Setting */ +/* Third-Party Configuration */ /* CONFIG_USE_LWIP is not set */ #define CONFIG_USE_BACKTRACE /* CONFIG_USE_FATFS is not set */ +/* CONFIG_USE_FATFS_0_1_4 is not set */ /* CONFIG_USE_SFUD is not set */ /* CONFIG_USE_SPIFFS is not set */ /* CONFIG_USE_AMP is not set */ @@ -187,6 +204,27 @@ /* CONFIG_USE_TLSF is not set */ /* CONFIG_USE_SDMMC_CMD is not set */ /* CONFIG_USE_CHERRY_USB is not set */ -/* end of FreeRTOS Setting */ +/* end of Third-Party Configuration */ + +/* Kernel Configuration */ + +#define CONFIG_FREERTOS_OPTIMIZED_SCHEDULER +#define CONFIG_FREERTOS_HZ 1000 +#define CONFIG_FREERTOS_MAX_PRIORITIES 32 +#define CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES 13 +#define CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES 11 +#define CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS 1 +#define CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE 1024 +#define CONFIG_FREERTOS_MAX_TASK_NAME_LEN 32 +#define CONFIG_FREERTOS_TIMER_TASK_PRIORITY 1 +#define CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH 2048 +#define CONFIG_FREERTOS_TIMER_QUEUE_LENGTH 10 +#define CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE 0 +#define CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS +#define CONFIG_FREERTOS_USE_TRACE_FACILITY +#define CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS +/* CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set */ +#define CONFIG_FREERTOS_TOTAL_HEAP_SIZE 10240 +/* end of Kernel Configuration */ #endif diff --git a/example/peripheral/can/src/can_example.c b/example/peripheral/can/src/can_example.c index fa2fb3cb2d202a43c3fcd3e9cf1cfe8905e59d70..2945611290831cd31a181e64ea8d419dd81c3ad0 100644 --- a/example/peripheral/can/src/can_example.c +++ b/example/peripheral/can/src/can_example.c @@ -64,10 +64,10 @@ static xTaskHandle recv_handle; static TimerHandle_t xOneShotTimer; -static FFreeRTOSCan *os_can_ctrl_p[FCAN_INSTANCE_NUM]; +static FFreeRTOSCan *os_can_ctrl_p[FCAN_NUM]; -static FCanFrame send_frame[FCAN_INSTANCE_NUM]; -static FCanFrame recv_frame[FCAN_INSTANCE_NUM]; +static FCanFrame send_frame[FCAN_NUM]; +static FCanFrame recv_frame[FCAN_NUM]; static void FFreeRTOSCanSendTask(void *pvParameters); static void FFreeRTOSCanRecvTask(void *pvParameters); @@ -196,22 +196,22 @@ static void FFreeRTOSCanInitTask(void *pvParameters) { FError ret = FCAN_SUCCESS; BaseType_t xReturn = pdPASS; - FCanInstance can_id = FCAN_INSTANCE_0; + u32 can_id = FCAN0_ID; - for(can_id = FCAN_INSTANCE_0; can_id < FCAN_INSTANCE_NUM; can_id++) + for(can_id = FCAN0_ID; can_id < FCAN_NUM; can_id++) { #if defined(CONFIG_TARGET_F2000_4) || defined(CONFIG_TARGET_D2000) - if(can_id == FCAN_INSTANCE_0) + if(can_id == FCAN0_ID) { FPinSetFunc(FIOCTRL_TJTAG_TDI_PAD, FPIN_FUNC1); /* can0-tx: func 1 */ FPinSetFunc(FIOCTRL_SWDITMS_SWJ_PAD, FPIN_FUNC1); /* can0-rx: func 1 */ } - else if(can_id == FCAN_INSTANCE_1) + else if(can_id == FCAN1_ID) { FPinSetFunc(FIOCTRL_NTRST_SWJ_PAD, FPIN_FUNC1); /* can1-tx: func 1 */ FPinSetFunc(FIOCTRL_SWDO_SWJ_PAD, FPIN_FUNC1); /* can1-rx: func 1 */ } - else if(can_id == FCAN_INSTANCE_2) + else if(can_id == FCAN2_ID) { } @@ -308,7 +308,7 @@ can_init_exit: static void FFreeRTOSCanRecvTask(void *pvParameters) { FError ret = FCAN_SUCCESS; - u8 count[FCAN_INSTANCE_NUM]= {0}; + u8 count[FCAN_NUM]= {0}; int i = 0; static FCanQueueData xReceiveStructure; FFreeRTOSCan *os_can_p; @@ -330,12 +330,12 @@ static void FFreeRTOSCanRecvTask(void *pvParameters) for (i = 0; i < recv_frame[instance_id].candlc; i++) { printf("%#x ", recv_frame[instance_id].data[i]); - if(recv_frame[instance_id].data[i] != send_frame[FCAN_INSTANCE_1-instance_id].data[i]) + if(recv_frame[instance_id].data[i] != send_frame[FCAN1_ID-instance_id].data[i]) { - FCAN_TEST_ERROR("\ncount=%d: can %d recv is equal to can%d send!!!\r\n", count[instance_id], instance_id, FCAN_INSTANCE_1-instance_id); + FCAN_TEST_ERROR("\ncount=%d: can %d recv is equal to can%d send!!!\r\n", count[instance_id], instance_id, FCAN1_ID-instance_id); } } - printf("\ncount=%d: can %d recv is equal to can%d send!!!\r\n", count[instance_id], instance_id, FCAN_INSTANCE_1-instance_id); + printf("\ncount=%d: can %d recv is equal to can%d send!!!\r\n", count[instance_id], instance_id, FCAN1_ID-instance_id); count[instance_id]++; } @@ -349,16 +349,16 @@ static void FFreeRTOSCanSendTask(void *pvParameters) #define FCAN_SEND_LENGTH 8 FError ret = FCAN_SUCCESS; - FCanInstance can_id = FCAN_INSTANCE_0; + u32 can_id = FCAN0_ID; - u8 count[FCAN_INSTANCE_NUM]= {0}; + u8 count[FCAN_NUM]= {0}; int i = 0; /* As per most tasks, this task is implemented in an infinite loop. */ for (;;) { printf("\r\ncan send task running\r\n"); - for(can_id = FCAN_INSTANCE_0; can_id <= FCAN_INSTANCE_1; can_id++) + for(can_id = FCAN0_ID; can_id <= FCAN1_ID; can_id++) { send_frame[can_id].canid = FCAN_SEND_ID+(can_id<<8); send_frame[can_id].canid &= CAN_SFF_MASK; @@ -460,8 +460,8 @@ static void FFreeRTOSCanDelete(void) } /* deinit can os instance */ - FFreeRTOSCanDeinit(os_can_ctrl_p[FCAN_INSTANCE_0]); - FFreeRTOSCanDeinit(os_can_ctrl_p[FCAN_INSTANCE_1]); + FFreeRTOSCanDeinit(os_can_ctrl_p[FCAN0_ID]); + FFreeRTOSCanDeinit(os_can_ctrl_p[FCAN1_ID]); /* delete queue */ vQueueDelete(xQueue); diff --git a/example/peripheral/dma/ddma/configs/e2000d_aarch32_eg_configs b/example/peripheral/dma/ddma/configs/e2000d_aarch32_eg_configs index ba85580bd4b54fbf34d228317ce6e367393ebc8b..6617696b4ff6852cd0674f5195d99d4f6da19a97 100644 --- a/example/peripheral/dma/ddma/configs/e2000d_aarch32_eg_configs +++ b/example/peripheral/dma/ddma/configs/e2000d_aarch32_eg_configs @@ -114,6 +114,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -171,12 +180,6 @@ CONFIG_FREERTOS_USE_FDDMA=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -188,14 +191,33 @@ CONFIG_FREERTOS_USE_FDDMA=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -213,4 +235,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/dma/ddma/configs/e2000d_aarch64_eg_configs b/example/peripheral/dma/ddma/configs/e2000d_aarch64_eg_configs index 0857033ff49946fc38c6ba4c16b6fe1e1b297ee6..ddc552bec7672de1175280d1358026664b781aae 100644 --- a/example/peripheral/dma/ddma/configs/e2000d_aarch64_eg_configs +++ b/example/peripheral/dma/ddma/configs/e2000d_aarch64_eg_configs @@ -110,6 +110,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -167,12 +176,6 @@ CONFIG_FREERTOS_USE_FDDMA=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -184,14 +187,33 @@ CONFIG_FREERTOS_USE_FDDMA=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -209,4 +231,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/dma/ddma/sdkconfig b/example/peripheral/dma/ddma/sdkconfig index 0857033ff49946fc38c6ba4c16b6fe1e1b297ee6..ddc552bec7672de1175280d1358026664b781aae 100644 --- a/example/peripheral/dma/ddma/sdkconfig +++ b/example/peripheral/dma/ddma/sdkconfig @@ -110,6 +110,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -167,12 +176,6 @@ CONFIG_FREERTOS_USE_FDDMA=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -184,14 +187,33 @@ CONFIG_FREERTOS_USE_FDDMA=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -209,4 +231,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/dma/ddma/sdkconfig.h b/example/peripheral/dma/ddma/sdkconfig.h index e392df8816db870fe1f063af97dd1250b477776f..be83190874650d41983d4f760a3e77cac585b02c 100644 --- a/example/peripheral/dma/ddma/sdkconfig.h +++ b/example/peripheral/dma/ddma/sdkconfig.h @@ -101,6 +101,12 @@ /* Compiler Options */ +/* Cross-Compiler Setting */ + +#define CONFIG_GCC_OPTIMIZE_LEVEL 0 +/* CONFIG_USE_EXT_COMPILER is not set */ +/* CONFIG_USE_KLIN_SYS is not set */ +/* end of Cross-Compiler Setting */ #define CONFIG_OUTPUT_BINARY /* end of Compiler Options */ /* end of Building Option */ @@ -148,11 +154,6 @@ /* CONFIG_FREERTOS_USE_FGDMA is not set */ /* end of Freertos DMA Drivers */ -/* Freertos MMC Drivers */ - -/* CONFIG_FREERTOS_USE_FSDIO is not set */ -/* end of Freertos MMC Drivers */ - /* Freertos Adc Drivers */ /* CONFIG_FREERTOS_USE_ADC is not set */ @@ -162,13 +163,29 @@ /* CONFIG_FREERTOS_USE_CAN is not set */ /* end of Freertos Can Drivers */ + +/* Freertos I2c Drivers */ + +/* CONFIG_FREERTOS_USE_I2C is not set */ +/* end of Freertos I2c Drivers */ + +/* Freertos Mio Drivers */ + +/* CONFIG_FREERTOS_USE_MIO is not set */ +/* end of Freertos Mio Drivers */ + +/* Freertos Timer Drivers */ + +/* CONFIG_FREERTOS_USE_TIMER is not set */ +/* end of Freertos Timer Drivers */ /* end of Component Configuration */ -/* FreeRTOS Setting */ +/* Third-Party Configuration */ /* CONFIG_USE_LWIP is not set */ #define CONFIG_USE_BACKTRACE /* CONFIG_USE_FATFS is not set */ +/* CONFIG_USE_FATFS_0_1_4 is not set */ /* CONFIG_USE_SFUD is not set */ /* CONFIG_USE_SPIFFS is not set */ /* CONFIG_USE_AMP is not set */ @@ -184,6 +201,27 @@ #define CONFIG_USE_TLSF /* CONFIG_USE_SDMMC_CMD is not set */ /* CONFIG_USE_CHERRY_USB is not set */ -/* end of FreeRTOS Setting */ +/* end of Third-Party Configuration */ + +/* Kernel Configuration */ + +#define CONFIG_FREERTOS_OPTIMIZED_SCHEDULER +#define CONFIG_FREERTOS_HZ 1000 +#define CONFIG_FREERTOS_MAX_PRIORITIES 32 +#define CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES 13 +#define CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES 11 +#define CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS 1 +#define CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE 1024 +#define CONFIG_FREERTOS_MAX_TASK_NAME_LEN 32 +#define CONFIG_FREERTOS_TIMER_TASK_PRIORITY 1 +#define CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH 2048 +#define CONFIG_FREERTOS_TIMER_QUEUE_LENGTH 10 +#define CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE 0 +#define CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS +#define CONFIG_FREERTOS_USE_TRACE_FACILITY +#define CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS +/* CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set */ +#define CONFIG_FREERTOS_TOTAL_HEAP_SIZE 10240 +/* end of Kernel Configuration */ #endif diff --git a/example/peripheral/dma/ddma/src/ddma_spi_loopback.c b/example/peripheral/dma/ddma/src/ddma_spi_loopback.c index a361217194ff80139caeac4f15f8bfa101c66dbc..a01461211d532b8eb494ec8a57a463b71580a2e5 100644 --- a/example/peripheral/dma/ddma/src/ddma_spi_loopback.c +++ b/example/peripheral/dma/ddma/src/ddma_spi_loopback.c @@ -76,7 +76,7 @@ static TimerHandle_t exit_timer = NULL; static u32 loopback_times = 3U; static boolean is_running = FALSE; -static const u32 spim_rx_slave_id[FSPI_DEVICE_NUM] = +static const u32 spim_rx_slave_id[FSPI_NUM] = { [FSPI0_ID] = FDDMA0_SPIM0_RX_SLAVE_ID, [FSPI1_ID] = FDDMA0_SPIM1_RX_SLAVE_ID, @@ -84,7 +84,7 @@ static const u32 spim_rx_slave_id[FSPI_DEVICE_NUM] = [FSPI3_ID] = FDDMA0_SPIM3_RX_SLAVE_ID }; -static const u32 spim_tx_slave_id[FSPI_DEVICE_NUM] = +static const u32 spim_tx_slave_id[FSPI_NUM] = { [FSPI0_ID] = FDDMA0_SPIM0_TX_SLAVE_ID, [FSPI1_ID] = FDDMA0_SPIM1_TX_SLAVE_ID, diff --git a/example/peripheral/dma/gdma/configs/e2000d_aarch32_eg_configs b/example/peripheral/dma/gdma/configs/e2000d_aarch32_eg_configs index 1ecbf2fd11784597e868c502301800004b3903af..7fb1b3ab6667eca802ce9c98e73198e64c17fb91 100644 --- a/example/peripheral/dma/gdma/configs/e2000d_aarch32_eg_configs +++ b/example/peripheral/dma/gdma/configs/e2000d_aarch32_eg_configs @@ -113,6 +113,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -170,12 +179,6 @@ CONFIG_FREERTOS_USE_UART=y CONFIG_FREERTOS_USE_FGDMA=y # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -187,14 +190,33 @@ CONFIG_FREERTOS_USE_FGDMA=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -212,4 +234,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/dma/gdma/configs/e2000d_aarch64_eg_configs b/example/peripheral/dma/gdma/configs/e2000d_aarch64_eg_configs index 1486603cf60efc25c3207f0d2d1db9ad104d93da..48d537945e3408fdb478ec0b25d913d372ea4371 100644 --- a/example/peripheral/dma/gdma/configs/e2000d_aarch64_eg_configs +++ b/example/peripheral/dma/gdma/configs/e2000d_aarch64_eg_configs @@ -109,6 +109,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -166,12 +175,6 @@ CONFIG_FREERTOS_USE_UART=y CONFIG_FREERTOS_USE_FGDMA=y # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -183,14 +186,33 @@ CONFIG_FREERTOS_USE_FGDMA=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -208,4 +230,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/dma/gdma/sdkconfig b/example/peripheral/dma/gdma/sdkconfig index 1486603cf60efc25c3207f0d2d1db9ad104d93da..48d537945e3408fdb478ec0b25d913d372ea4371 100644 --- a/example/peripheral/dma/gdma/sdkconfig +++ b/example/peripheral/dma/gdma/sdkconfig @@ -109,6 +109,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -166,12 +175,6 @@ CONFIG_FREERTOS_USE_UART=y CONFIG_FREERTOS_USE_FGDMA=y # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -183,14 +186,33 @@ CONFIG_FREERTOS_USE_FGDMA=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -208,4 +230,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/dma/gdma/sdkconfig.h b/example/peripheral/dma/gdma/sdkconfig.h index d2e79f1c709c4fc6d0d5f254ad128d481778c701..59ac8028cd0f33fdd85fba6ca41a5d4a33e99bf2 100644 --- a/example/peripheral/dma/gdma/sdkconfig.h +++ b/example/peripheral/dma/gdma/sdkconfig.h @@ -100,6 +100,12 @@ /* Compiler Options */ +/* Cross-Compiler Setting */ + +#define CONFIG_GCC_OPTIMIZE_LEVEL 0 +/* CONFIG_USE_EXT_COMPILER is not set */ +/* CONFIG_USE_KLIN_SYS is not set */ +/* end of Cross-Compiler Setting */ #define CONFIG_OUTPUT_BINARY /* end of Compiler Options */ /* end of Building Option */ @@ -147,11 +153,6 @@ #define CONFIG_FREERTOS_USE_FGDMA /* end of Freertos DMA Drivers */ -/* Freertos MMC Drivers */ - -/* CONFIG_FREERTOS_USE_FSDIO is not set */ -/* end of Freertos MMC Drivers */ - /* Freertos Adc Drivers */ /* CONFIG_FREERTOS_USE_ADC is not set */ @@ -161,13 +162,29 @@ /* CONFIG_FREERTOS_USE_CAN is not set */ /* end of Freertos Can Drivers */ + +/* Freertos I2c Drivers */ + +/* CONFIG_FREERTOS_USE_I2C is not set */ +/* end of Freertos I2c Drivers */ + +/* Freertos Mio Drivers */ + +/* CONFIG_FREERTOS_USE_MIO is not set */ +/* end of Freertos Mio Drivers */ + +/* Freertos Timer Drivers */ + +/* CONFIG_FREERTOS_USE_TIMER is not set */ +/* end of Freertos Timer Drivers */ /* end of Component Configuration */ -/* FreeRTOS Setting */ +/* Third-Party Configuration */ /* CONFIG_USE_LWIP is not set */ #define CONFIG_USE_BACKTRACE /* CONFIG_USE_FATFS is not set */ +/* CONFIG_USE_FATFS_0_1_4 is not set */ /* CONFIG_USE_SFUD is not set */ /* CONFIG_USE_SPIFFS is not set */ /* CONFIG_USE_AMP is not set */ @@ -183,6 +200,27 @@ #define CONFIG_USE_TLSF /* CONFIG_USE_SDMMC_CMD is not set */ /* CONFIG_USE_CHERRY_USB is not set */ -/* end of FreeRTOS Setting */ +/* end of Third-Party Configuration */ + +/* Kernel Configuration */ + +#define CONFIG_FREERTOS_OPTIMIZED_SCHEDULER +#define CONFIG_FREERTOS_HZ 1000 +#define CONFIG_FREERTOS_MAX_PRIORITIES 32 +#define CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES 13 +#define CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES 11 +#define CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS 1 +#define CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE 1024 +#define CONFIG_FREERTOS_MAX_TASK_NAME_LEN 32 +#define CONFIG_FREERTOS_TIMER_TASK_PRIORITY 1 +#define CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH 2048 +#define CONFIG_FREERTOS_TIMER_QUEUE_LENGTH 10 +#define CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE 0 +#define CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS +#define CONFIG_FREERTOS_USE_TRACE_FACILITY +#define CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS +/* CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set */ +#define CONFIG_FREERTOS_TOTAL_HEAP_SIZE 10240 +/* end of Kernel Configuration */ #endif diff --git a/example/peripheral/gpio/configs/e2000d_aarch32_eg_configs b/example/peripheral/gpio/configs/e2000d_aarch32_eg_configs index b3297007ce55cec7c7ee376938792aa3239a1f4b..030a23c6e251751a8dd0e34d7b4ab6da3c4ba272 100644 --- a/example/peripheral/gpio/configs/e2000d_aarch32_eg_configs +++ b/example/peripheral/gpio/configs/e2000d_aarch32_eg_configs @@ -112,6 +112,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -169,12 +178,6 @@ CONFIG_FREERTOS_USE_GPIO=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -186,14 +189,33 @@ CONFIG_FREERTOS_USE_GPIO=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -211,4 +233,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/gpio/configs/e2000d_aarch64_eg_configs b/example/peripheral/gpio/configs/e2000d_aarch64_eg_configs index c73f2c12cadd52e4452f9667eadd4915ae75bcd1..dad9a22a54a5922b7a95c8b0501744ff24e18b57 100644 --- a/example/peripheral/gpio/configs/e2000d_aarch64_eg_configs +++ b/example/peripheral/gpio/configs/e2000d_aarch64_eg_configs @@ -108,6 +108,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -165,12 +174,6 @@ CONFIG_FREERTOS_USE_GPIO=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -182,14 +185,33 @@ CONFIG_FREERTOS_USE_GPIO=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -207,4 +229,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/gpio/sdkconfig b/example/peripheral/gpio/sdkconfig index c73f2c12cadd52e4452f9667eadd4915ae75bcd1..dad9a22a54a5922b7a95c8b0501744ff24e18b57 100644 --- a/example/peripheral/gpio/sdkconfig +++ b/example/peripheral/gpio/sdkconfig @@ -108,6 +108,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -165,12 +174,6 @@ CONFIG_FREERTOS_USE_GPIO=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -182,14 +185,33 @@ CONFIG_FREERTOS_USE_GPIO=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -207,4 +229,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/gpio/sdkconfig.h b/example/peripheral/gpio/sdkconfig.h index 6e502857321dfbe26f879b3d6a08f976fa0ff414..f8a934b002f9ebd20f1d625d8e35a000a012c4e1 100644 --- a/example/peripheral/gpio/sdkconfig.h +++ b/example/peripheral/gpio/sdkconfig.h @@ -99,6 +99,12 @@ /* Compiler Options */ +/* Cross-Compiler Setting */ + +#define CONFIG_GCC_OPTIMIZE_LEVEL 0 +/* CONFIG_USE_EXT_COMPILER is not set */ +/* CONFIG_USE_KLIN_SYS is not set */ +/* end of Cross-Compiler Setting */ #define CONFIG_OUTPUT_BINARY /* end of Compiler Options */ /* end of Building Option */ @@ -146,11 +152,6 @@ /* CONFIG_FREERTOS_USE_FGDMA is not set */ /* end of Freertos DMA Drivers */ -/* Freertos MMC Drivers */ - -/* CONFIG_FREERTOS_USE_FSDIO is not set */ -/* end of Freertos MMC Drivers */ - /* Freertos Adc Drivers */ /* CONFIG_FREERTOS_USE_ADC is not set */ @@ -160,13 +161,29 @@ /* CONFIG_FREERTOS_USE_CAN is not set */ /* end of Freertos Can Drivers */ + +/* Freertos I2c Drivers */ + +/* CONFIG_FREERTOS_USE_I2C is not set */ +/* end of Freertos I2c Drivers */ + +/* Freertos Mio Drivers */ + +/* CONFIG_FREERTOS_USE_MIO is not set */ +/* end of Freertos Mio Drivers */ + +/* Freertos Timer Drivers */ + +/* CONFIG_FREERTOS_USE_TIMER is not set */ +/* end of Freertos Timer Drivers */ /* end of Component Configuration */ -/* FreeRTOS Setting */ +/* Third-Party Configuration */ /* CONFIG_USE_LWIP is not set */ #define CONFIG_USE_BACKTRACE /* CONFIG_USE_FATFS is not set */ +/* CONFIG_USE_FATFS_0_1_4 is not set */ /* CONFIG_USE_SFUD is not set */ /* CONFIG_USE_SPIFFS is not set */ /* CONFIG_USE_AMP is not set */ @@ -182,6 +199,27 @@ #define CONFIG_USE_TLSF /* CONFIG_USE_SDMMC_CMD is not set */ /* CONFIG_USE_CHERRY_USB is not set */ -/* end of FreeRTOS Setting */ +/* end of Third-Party Configuration */ + +/* Kernel Configuration */ + +#define CONFIG_FREERTOS_OPTIMIZED_SCHEDULER +#define CONFIG_FREERTOS_HZ 1000 +#define CONFIG_FREERTOS_MAX_PRIORITIES 32 +#define CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES 13 +#define CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES 11 +#define CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS 1 +#define CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE 1024 +#define CONFIG_FREERTOS_MAX_TASK_NAME_LEN 32 +#define CONFIG_FREERTOS_TIMER_TASK_PRIORITY 1 +#define CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH 2048 +#define CONFIG_FREERTOS_TIMER_QUEUE_LENGTH 10 +#define CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE 0 +#define CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS +#define CONFIG_FREERTOS_USE_TRACE_FACILITY +#define CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS +/* CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set */ +#define CONFIG_FREERTOS_TOTAL_HEAP_SIZE 10240 +/* end of Kernel Configuration */ #endif diff --git a/example/peripheral/i2c/Kconfig b/example/peripheral/i2c/Kconfig new file mode 100644 index 0000000000000000000000000000000000000000..0277fb8553f2132f097012a78633194f6173c156 --- /dev/null +++ b/example/peripheral/i2c/Kconfig @@ -0,0 +1,19 @@ +# +# For a description of the syntax of this configuration file, +# see tools/kconfiglib/kconfig-language.txt. +# + + +mainmenu "Phytium Freertos Configuration" + + menu "Freertos Configuration" + config TARGET_NAME + string "Build Target Name" + default "freertos" + help + Build Target name for the demo + +endmenu + +source "$(FREERTOS_SDK_ROOT)/Kconfig" + diff --git a/example/peripheral/i2c/README.md b/example/peripheral/i2c/README.md new file mode 100644 index 0000000000000000000000000000000000000000..3af26431a97e5952f4459cfce9350ccadfe5dbe7 --- /dev/null +++ b/example/peripheral/i2c/README.md @@ -0,0 +1,161 @@ + + +# i2c base on freertos + +## 1. 例程介绍 + +本例程示范了freertos环境下的i2c的读写使用,包括i2c的初始化、写、读和去初始化操作; +程序启动后,创建i2c的初始化、写任务和读任务; +例程在D2000上使用i2c-0与i2c-2回环测试,也可进行eeprom读取(更改从机地址,取消slave任务初始化即可)(注意i2c-0本身连接的eeprom芯片,虚拟从机地址不要与其重合,不然会引起总线冲突); +例程也可以作为ft2004的例程参考,只需自行解决从机地址替换,本例程没有直接演示。 +E2000D上使用的demo板上的 RTC 进行iic测试,从机亦可参考D2000进行; +本例程目前仅仅适配了主机poll发送,从机中断接收的方式。 + +## 2. 如何使用例程 + +本例程需要用到 +- Phytium开发板(D2000/E2000DQS of TestB板) +- [Phytium freeRTOS SDK](https://gitee.com/phytium_embedded/phytium-free-rtos-sdk) +- [Phytium standalone SDK](https://gitee.com/phytium_embedded/phytium-standalone-sdk) +### 2.1 硬件配置方法 + +本例程支持的硬件平台包括 +- D2000、E2000DQS demo开发板 + +对应的配置项是 +- CONFIG_TARGET_D2000 +- CONFIG_TARGET_E2000D、 CONFIG_TARGET_E2000Q + +### 2.1.1 硬件连线 + +- D2000 + +![hardware_d2000](./figs/board.png) + +- E2000 + +![hardware_e2000](./figs/E2000_1339.png) + +### 2.2 SDK配置方法 + +本例程需要, + +- 使能Shell +- 使能I2C +- 如果是E2000系列,使能MIO + +对应的配置项是, + +- CONFIG_USE_LETTER_SHELL +- CONFIG_FREERTOS_USE_I2C +如果是E2000系列 +- CONFIG_FREERTOS_USE_MIO + +本例子已经提供好具体的编译指令,以下进行介绍: +- make 将目录下的工程进行编译 +- make clean 将目录下的工程进行清理 +- make boot 将目录下的工程进行编译,并将生成的elf 复制到目标地址 +- make load_d2000_aarch64 将预设64bit d2000 下的配置加载至工程中 +- make load_d2000_aarch32 将预设32bit d2000 下的配置加载至工程中 +- make load_e2000d_aarch64 将预设64bit e2000d 下的配置加载至工程中 +- make load_e2000d_aarch32 将预设32bit e2000d 下的配置加载至工程中 +- make load_e2000q_aarch64 将预设64bit e2000q 下的配置加载至工程中 +- make load_e2000q_aarch32 将预设32bit e2000q 下的配置加载至工程中 +- make menuconfig 配置目录下的参数变量 +- make backup_kconfig 将目录下的sdkconfig 备份到./configs下 + +具体使用方法为: +- 在当前目录下 +- 执行以上指令 + +### 2.3 构建和下载 + +#### 2.3.1 构建过程 + +- 在host侧完成配置 +>配置成d2000,对于其它平台,使用对应的默认配置,如E2000D `make load_e2000d_aarch32` + +- 选择目标平台 +``` +make load_d2000_aarch32 +``` + +- 选择例程需要的配置 +``` +make menuconfig +``` + +- 进行编译 +``` +make +``` + +- 将编译出的镜像放置到tftp目录下 +``` +make boot +``` + +#### 2.3.2 下载过程 + +- host侧设置重启host侧tftp服务器 +``` +sudo service tftpd-hpa restart +``` + +- 开发板侧使用bootelf命令跳转 +``` +setenv ipaddr 192.168.4.20 +setenv serverip 192.168.4.50 +setenv gatewayip 192.168.4.1 +tftpboot 0x90100000 freertos.elf +bootelf -p 0x90100000 +``` + +### 2.4 输出与实验现象 + +- 系统进入后,创建i2c初始化任务,创建i2c从机中断初始化,注册中断服务函数,创建i2c主机的读写任务函数。 + +- D2000 + +![d2000](./figs/d2000_master_slave.png) + +![d2000](./figs/d2000_eeprom.png) + +- E2000 + +![e2000d](./figs/E2000_1339.png) + + +## 3. 如何解决问题 + +- 若出现读写异常,需确认连接是否正确; + +- 由于D2000开发板上的自带eeprom,因此不建议使用特殊地址0x57进行I2C-2模拟的从设备地址,因为这可能导致总线抢占,无法正常传输; + +## 4. 修改历史记录 + + + + diff --git a/example/peripheral/i2c/configs/d2000_aarch32_eg_configs b/example/peripheral/i2c/configs/d2000_aarch32_eg_configs new file mode 100644 index 0000000000000000000000000000000000000000..680d39c41fbee555f64db0376fa9b50694fa1f55 --- /dev/null +++ b/example/peripheral/i2c/configs/d2000_aarch32_eg_configs @@ -0,0 +1,269 @@ + +# +# Freertos Configuration +# +CONFIG_TARGET_NAME="d2000_freertos_a32" +# end of Freertos Configuration + +# +# Standalone Setting +# +CONFIG_USE_FREERTOS=y + +# +# Arch Configuration +# +CONFIG_TARGET_ARMV8_AARCH32=y +# CONFIG_TARGET_ARMV8_AARCH64 is not set +CONFIG_USE_CACHE=y +# CONFIG_USE_L3CACHE is not set +CONFIG_USE_MMU=y +CONFIG_USE_SYS_TICK=y +CONFIG_USE_AARCH64_L1_TO_AARCH32=y +# end of Arch Configuration + +# +# Board Configuration +# +# CONFIG_TARGET_F2000_4 is not set +CONFIG_TARGET_D2000=y +# CONFIG_TARGET_E2000Q is not set +# CONFIG_TARGET_E2000D is not set +# CONFIG_TARGET_E2000S is not set +CONFIG_DEFAULT_DEBUG_PRINT_UART1=y +# CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set +# CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set +# end of Board Configuration + +# +# Components Configuration +# +# CONFIG_USE_SPI is not set +# CONFIG_USE_QSPI is not set +CONFIG_USE_GIC=y +CONFIG_ENABLE_GICV3=y +CONFIG_USE_SERIAL=y + +# +# Usart Configuration +# +CONFIG_ENABLE_Pl011_UART=y +# end of Usart Configuration + +# CONFIG_USE_GPIO is not set +# CONFIG_USE_ETH is not set +# CONFIG_USE_CAN is not set +CONFIG_USE_I2C=y +CONFIG_USE_FI2C=y +# CONFIG_USE_TIMER is not set +CONFIG_USE_MIO=y + +# +# Hardware Mio Configuration +# +# end of Hardware Mio Configuration + +# CONFIG_USE_SDMMC is not set +# CONFIG_USE_PCIE is not set +# CONFIG_USE_WDT is not set +# CONFIG_USE_DMA is not set +# CONFIG_USE_NAND is not set +# CONFIG_USE_RTC is not set +# CONFIG_USE_SATA is not set +# CONFIG_USE_USB is not set +# CONFIG_USE_ADC is not set +# CONFIG_USE_PWM is not set +# CONFIG_USE_IPC is not set +# end of Components Configuration + +CONFIG_USE_NEW_LIBC=y +# end of Standalone Setting + +# +# Building Option +# +# CONFIG_LOG_VERBOS is not set +# CONFIG_LOG_DEBUG is not set +# CONFIG_LOG_INFO is not set +# CONFIG_LOG_WARN is not set +CONFIG_LOG_ERROR=y +# CONFIG_LOG_NONE is not set +CONFIG_USE_DEFAULT_INTERRUPT_CONFIG=y +CONFIG_INTERRUPT_ROLE_MASTER=y +# CONFIG_INTERRUPT_ROLE_SLAVE is not set +# CONFIG_LOG_EXTRA_INFO is not set +# CONFIG_BOOTUP_DEBUG_PRINTS is not set + +# +# Linker Options +# +CONFIG_AARCH32_RAM_LD=y +# CONFIG_AARCH64_RAM_LD is not set +# CONFIG_USER_DEFINED_LD is not set +CONFIG_LINK_SCRIPT_ROM=y +CONFIG_ROM_START_UP_ADDR=0x80100000 +CONFIG_ROM_SIZE_MB=1 +CONFIG_LINK_SCRIPT_RAM=y +CONFIG_RAM_START_UP_ADDR=0x81000000 +CONFIG_RAM_SIZE_MB=64 +CONFIG_HEAP_SIZE=1 +CONFIG_SVC_STACK_SIZE=0x1000 +CONFIG_SYS_STACK_SIZE=0x1000 +CONFIG_IRQ_STACK_SIZE=0x1000 +CONFIG_ABORT_STACK_SIZE=0x1000 +CONFIG_FIQ_STACK_SIZE=0x1000 +CONFIG_UNDEF_STACK_SIZE=0x1000 +# end of Linker Options + +# +# Compiler Options +# + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + +CONFIG_OUTPUT_BINARY=y +# end of Compiler Options +# end of Building Option + +# +# Component Configuration +# + +# +# Freertos Uart Drivers +# +CONFIG_FREERTOS_USE_UART=y +# end of Freertos Uart Drivers + +# +# Freertos Pwm Drivers +# +# CONFIG_FREERTOS_USE_PWM is not set +# end of Freertos Pwm Drivers + +# +# Freertos Qspi Drivers +# +# CONFIG_FREERTOS_USE_QSPI is not set +# end of Freertos Qspi Drivers + +# +# Freertos Wdt Drivers +# +# CONFIG_FREERTOS_USE_WDT is not set +# end of Freertos Wdt Drivers + +# +# Freertos Eth Drivers +# +# CONFIG_FREERTOS_USE_XMAC is not set +# end of Freertos Eth Drivers + +# +# Freertos Gpio Drivers +# +# CONFIG_FREERTOS_USE_GPIO is not set +# end of Freertos Gpio Drivers + +# +# Freertos Spim Drivers +# +# CONFIG_FREERTOS_USE_FSPIM is not set +# end of Freertos Spim Drivers + +# +# Freertos DMA Drivers +# +# CONFIG_FREERTOS_USE_FDDMA is not set +# CONFIG_FREERTOS_USE_FGDMA is not set +# end of Freertos DMA Drivers + +# +# Freertos MMC Drivers +# +# CONFIG_FREERTOS_USE_FSDIO is not set +# end of Freertos MMC Drivers + +# +# Freertos Adc Drivers +# +# CONFIG_FREERTOS_USE_ADC is not set +# end of Freertos Adc Drivers + +# +# Freertos Can Drivers +# +# CONFIG_FREERTOS_USE_CAN is not set +# end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +CONFIG_FREERTOS_USE_I2C=y +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers +# end of Component Configuration + +# +# Third-Party Configuration +# +# CONFIG_USE_LWIP is not set +CONFIG_USE_BACKTRACE=y +# CONFIG_USE_FATFS is not set +# CONFIG_USE_SFUD is not set +# CONFIG_USE_SPIFFS is not set +# CONFIG_USE_AMP is not set +CONFIG_USE_LETTER_SHELL=y + +# +# Letter Shell Configuration +# +CONFIG_LS_PL011_UART=y +CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y +# CONFIG_DEFAULT_LETTER_SHELL_USE_UART0 is not set +# CONFIG_DEFAULT_LETTER_SHELL_USE_UART2 is not set +# end of Letter Shell Configuration + +# CONFIG_USE_TLSF is not set +# CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/i2c/configs/d2000_aarch64_eg_configs b/example/peripheral/i2c/configs/d2000_aarch64_eg_configs new file mode 100644 index 0000000000000000000000000000000000000000..591e0421f20857310345de6ace809ed469a9da8d --- /dev/null +++ b/example/peripheral/i2c/configs/d2000_aarch64_eg_configs @@ -0,0 +1,265 @@ + +# +# Freertos Configuration +# +CONFIG_TARGET_NAME="d2000_freertos_a64" +# end of Freertos Configuration + +# +# Standalone Setting +# +CONFIG_USE_FREERTOS=y + +# +# Arch Configuration +# +# CONFIG_TARGET_ARMV8_AARCH32 is not set +CONFIG_TARGET_ARMV8_AARCH64=y +CONFIG_USE_CACHE=y +# CONFIG_USE_L3CACHE is not set +CONFIG_USE_MMU=y +CONFIG_USE_SYS_TICK=y +# CONFIG_MMU_DEBUG_PRINTS is not set +# end of Arch Configuration + +# +# Board Configuration +# +# CONFIG_TARGET_F2000_4 is not set +CONFIG_TARGET_D2000=y +# CONFIG_TARGET_E2000Q is not set +# CONFIG_TARGET_E2000D is not set +# CONFIG_TARGET_E2000S is not set +CONFIG_DEFAULT_DEBUG_PRINT_UART1=y +# CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set +# CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set +# end of Board Configuration + +# +# Components Configuration +# +# CONFIG_USE_SPI is not set +# CONFIG_USE_QSPI is not set +CONFIG_USE_GIC=y +CONFIG_ENABLE_GICV3=y +CONFIG_USE_SERIAL=y + +# +# Usart Configuration +# +CONFIG_ENABLE_Pl011_UART=y +# end of Usart Configuration + +# CONFIG_USE_GPIO is not set +# CONFIG_USE_ETH is not set +# CONFIG_USE_CAN is not set +CONFIG_USE_I2C=y +CONFIG_USE_FI2C=y +# CONFIG_USE_TIMER is not set +CONFIG_USE_MIO=y + +# +# Hardware Mio Configuration +# +# end of Hardware Mio Configuration + +# CONFIG_USE_SDMMC is not set +# CONFIG_USE_PCIE is not set +# CONFIG_USE_WDT is not set +# CONFIG_USE_DMA is not set +# CONFIG_USE_NAND is not set +# CONFIG_USE_RTC is not set +# CONFIG_USE_SATA is not set +# CONFIG_USE_USB is not set +# CONFIG_USE_ADC is not set +# CONFIG_USE_PWM is not set +# CONFIG_USE_IPC is not set +# end of Components Configuration + +CONFIG_USE_NEW_LIBC=y +# end of Standalone Setting + +# +# Building Option +# +# CONFIG_LOG_VERBOS is not set +# CONFIG_LOG_DEBUG is not set +# CONFIG_LOG_INFO is not set +# CONFIG_LOG_WARN is not set +CONFIG_LOG_ERROR=y +# CONFIG_LOG_NONE is not set +CONFIG_USE_DEFAULT_INTERRUPT_CONFIG=y +CONFIG_INTERRUPT_ROLE_MASTER=y +# CONFIG_INTERRUPT_ROLE_SLAVE is not set +# CONFIG_LOG_EXTRA_INFO is not set +# CONFIG_BOOTUP_DEBUG_PRINTS is not set + +# +# Linker Options +# +# CONFIG_AARCH32_RAM_LD is not set +CONFIG_AARCH64_RAM_LD=y +# CONFIG_USER_DEFINED_LD is not set +CONFIG_LINK_SCRIPT_ROM=y +CONFIG_ROM_START_UP_ADDR=0x80100000 +CONFIG_ROM_SIZE_MB=1 +CONFIG_LINK_SCRIPT_RAM=y +CONFIG_RAM_START_UP_ADDR=0x81000000 +CONFIG_RAM_SIZE_MB=64 +CONFIG_HEAP_SIZE=1 +CONFIG_STACK_SIZE=0x100000 +CONFIG_FPU_STACK_SIZE=0x1000 +# end of Linker Options + +# +# Compiler Options +# + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + +CONFIG_OUTPUT_BINARY=y +# end of Compiler Options +# end of Building Option + +# +# Component Configuration +# + +# +# Freertos Uart Drivers +# +CONFIG_FREERTOS_USE_UART=y +# end of Freertos Uart Drivers + +# +# Freertos Pwm Drivers +# +# CONFIG_FREERTOS_USE_PWM is not set +# end of Freertos Pwm Drivers + +# +# Freertos Qspi Drivers +# +# CONFIG_FREERTOS_USE_QSPI is not set +# end of Freertos Qspi Drivers + +# +# Freertos Wdt Drivers +# +# CONFIG_FREERTOS_USE_WDT is not set +# end of Freertos Wdt Drivers + +# +# Freertos Eth Drivers +# +# CONFIG_FREERTOS_USE_XMAC is not set +# end of Freertos Eth Drivers + +# +# Freertos Gpio Drivers +# +# CONFIG_FREERTOS_USE_GPIO is not set +# end of Freertos Gpio Drivers + +# +# Freertos Spim Drivers +# +# CONFIG_FREERTOS_USE_FSPIM is not set +# end of Freertos Spim Drivers + +# +# Freertos DMA Drivers +# +# CONFIG_FREERTOS_USE_FDDMA is not set +# CONFIG_FREERTOS_USE_FGDMA is not set +# end of Freertos DMA Drivers + +# +# Freertos MMC Drivers +# +# CONFIG_FREERTOS_USE_FSDIO is not set +# end of Freertos MMC Drivers + +# +# Freertos Adc Drivers +# +# CONFIG_FREERTOS_USE_ADC is not set +# end of Freertos Adc Drivers + +# +# Freertos Can Drivers +# +# CONFIG_FREERTOS_USE_CAN is not set +# end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +CONFIG_FREERTOS_USE_I2C=y +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers +# end of Component Configuration + +# +# Third-Party Configuration +# +# CONFIG_USE_LWIP is not set +CONFIG_USE_BACKTRACE=y +# CONFIG_USE_FATFS is not set +# CONFIG_USE_SFUD is not set +# CONFIG_USE_SPIFFS is not set +# CONFIG_USE_AMP is not set +CONFIG_USE_LETTER_SHELL=y + +# +# Letter Shell Configuration +# +CONFIG_LS_PL011_UART=y +CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y +# CONFIG_DEFAULT_LETTER_SHELL_USE_UART0 is not set +# CONFIG_DEFAULT_LETTER_SHELL_USE_UART2 is not set +# end of Letter Shell Configuration + +# CONFIG_USE_TLSF is not set +# CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/i2c/configs/e2000d_aarch32_eg_configs b/example/peripheral/i2c/configs/e2000d_aarch32_eg_configs new file mode 100644 index 0000000000000000000000000000000000000000..4127aaf54aa0b1dc496a2685b26ff4072ecfc136 --- /dev/null +++ b/example/peripheral/i2c/configs/e2000d_aarch32_eg_configs @@ -0,0 +1,270 @@ + +# +# Freertos Configuration +# +CONFIG_TARGET_NAME="e2000d_freertos_a32" +# end of Freertos Configuration + +# +# Standalone Setting +# +CONFIG_USE_FREERTOS=y + +# +# Arch Configuration +# +CONFIG_TARGET_ARMV8_AARCH32=y +# CONFIG_TARGET_ARMV8_AARCH64 is not set +CONFIG_USE_CACHE=y +CONFIG_USE_MMU=y +CONFIG_USE_SYS_TICK=y +CONFIG_USE_AARCH64_L1_TO_AARCH32=y +# end of Arch Configuration + +# +# Board Configuration +# +# CONFIG_TARGET_F2000_4 is not set +# CONFIG_TARGET_D2000 is not set +# CONFIG_TARGET_E2000Q is not set +CONFIG_TARGET_E2000D=y +# CONFIG_TARGET_E2000S is not set +CONFIG_TARGET_E2000=y +CONFIG_DEFAULT_DEBUG_PRINT_UART1=y +# CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set +# CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set +# end of Board Configuration + +# +# Components Configuration +# +# CONFIG_USE_SPI is not set +# CONFIG_USE_QSPI is not set +CONFIG_USE_GIC=y +CONFIG_ENABLE_GICV3=y +CONFIG_USE_SERIAL=y + +# +# Usart Configuration +# +CONFIG_ENABLE_Pl011_UART=y +# end of Usart Configuration + +# CONFIG_USE_GPIO is not set +# CONFIG_USE_ETH is not set +# CONFIG_USE_CAN is not set +CONFIG_USE_I2C=y +CONFIG_USE_FI2C=y +# CONFIG_USE_TIMER is not set +CONFIG_USE_MIO=y + +# +# Hardware Mio Configuration +# +CONFIG_ENABLE_MIO=y +# end of Hardware Mio Configuration + +# CONFIG_USE_SDMMC is not set +# CONFIG_USE_PCIE is not set +# CONFIG_USE_WDT is not set +# CONFIG_USE_DMA is not set +# CONFIG_USE_NAND is not set +# CONFIG_USE_RTC is not set +# CONFIG_USE_SATA is not set +# CONFIG_USE_USB is not set +# CONFIG_USE_ADC is not set +# CONFIG_USE_PWM is not set +# CONFIG_USE_IPC is not set +# end of Components Configuration + +CONFIG_USE_NEW_LIBC=y +# end of Standalone Setting + +# +# Building Option +# +# CONFIG_LOG_VERBOS is not set +# CONFIG_LOG_DEBUG is not set +# CONFIG_LOG_INFO is not set +# CONFIG_LOG_WARN is not set +CONFIG_LOG_ERROR=y +# CONFIG_LOG_NONE is not set +CONFIG_USE_DEFAULT_INTERRUPT_CONFIG=y +CONFIG_INTERRUPT_ROLE_MASTER=y +# CONFIG_INTERRUPT_ROLE_SLAVE is not set +# CONFIG_LOG_EXTRA_INFO is not set +# CONFIG_BOOTUP_DEBUG_PRINTS is not set + +# +# Linker Options +# +CONFIG_AARCH32_RAM_LD=y +# CONFIG_AARCH64_RAM_LD is not set +# CONFIG_USER_DEFINED_LD is not set +CONFIG_LINK_SCRIPT_ROM=y +CONFIG_ROM_START_UP_ADDR=0x80100000 +CONFIG_ROM_SIZE_MB=1 +CONFIG_LINK_SCRIPT_RAM=y +CONFIG_RAM_START_UP_ADDR=0x81000000 +CONFIG_RAM_SIZE_MB=64 +CONFIG_HEAP_SIZE=1 +CONFIG_SVC_STACK_SIZE=0x1000 +CONFIG_SYS_STACK_SIZE=0x1000 +CONFIG_IRQ_STACK_SIZE=0x1000 +CONFIG_ABORT_STACK_SIZE=0x1000 +CONFIG_FIQ_STACK_SIZE=0x1000 +CONFIG_UNDEF_STACK_SIZE=0x1000 +# end of Linker Options + +# +# Compiler Options +# + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + +CONFIG_OUTPUT_BINARY=y +# end of Compiler Options +# end of Building Option + +# +# Component Configuration +# + +# +# Freertos Uart Drivers +# +CONFIG_FREERTOS_USE_UART=y +# end of Freertos Uart Drivers + +# +# Freertos Pwm Drivers +# +# CONFIG_FREERTOS_USE_PWM is not set +# end of Freertos Pwm Drivers + +# +# Freertos Qspi Drivers +# +# CONFIG_FREERTOS_USE_QSPI is not set +# end of Freertos Qspi Drivers + +# +# Freertos Wdt Drivers +# +# CONFIG_FREERTOS_USE_WDT is not set +# end of Freertos Wdt Drivers + +# +# Freertos Eth Drivers +# +# CONFIG_FREERTOS_USE_XMAC is not set +# end of Freertos Eth Drivers + +# +# Freertos Gpio Drivers +# +# CONFIG_FREERTOS_USE_GPIO is not set +# end of Freertos Gpio Drivers + +# +# Freertos Spim Drivers +# +# CONFIG_FREERTOS_USE_FSPIM is not set +# end of Freertos Spim Drivers + +# +# Freertos DMA Drivers +# +# CONFIG_FREERTOS_USE_FDDMA is not set +# CONFIG_FREERTOS_USE_FGDMA is not set +# end of Freertos DMA Drivers + +# +# Freertos MMC Drivers +# +# CONFIG_FREERTOS_USE_FSDIO is not set +# end of Freertos MMC Drivers + +# +# Freertos Adc Drivers +# +# CONFIG_FREERTOS_USE_ADC is not set +# end of Freertos Adc Drivers + +# +# Freertos Can Drivers +# +# CONFIG_FREERTOS_USE_CAN is not set +# end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +CONFIG_FREERTOS_USE_I2C=y +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +CONFIG_FREERTOS_USE_MIO=y +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers +# end of Component Configuration + +# +# Third-Party Configuration +# +# CONFIG_USE_LWIP is not set +CONFIG_USE_BACKTRACE=y +# CONFIG_USE_FATFS is not set +# CONFIG_USE_SFUD is not set +# CONFIG_USE_SPIFFS is not set +# CONFIG_USE_AMP is not set +CONFIG_USE_LETTER_SHELL=y + +# +# Letter Shell Configuration +# +CONFIG_LS_PL011_UART=y +CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y +# CONFIG_DEFAULT_LETTER_SHELL_USE_UART0 is not set +# CONFIG_DEFAULT_LETTER_SHELL_USE_UART2 is not set +# end of Letter Shell Configuration + +# CONFIG_USE_TLSF is not set +# CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/i2c/configs/e2000d_aarch64_eg_configs b/example/peripheral/i2c/configs/e2000d_aarch64_eg_configs new file mode 100644 index 0000000000000000000000000000000000000000..c92a861654146f9f8791c8f1b550e6c2adc31772 --- /dev/null +++ b/example/peripheral/i2c/configs/e2000d_aarch64_eg_configs @@ -0,0 +1,266 @@ + +# +# Freertos Configuration +# +CONFIG_TARGET_NAME="e2000d_freertos_a64" +# end of Freertos Configuration + +# +# Standalone Setting +# +CONFIG_USE_FREERTOS=y + +# +# Arch Configuration +# +# CONFIG_TARGET_ARMV8_AARCH32 is not set +CONFIG_TARGET_ARMV8_AARCH64=y +CONFIG_USE_CACHE=y +CONFIG_USE_MMU=y +CONFIG_USE_SYS_TICK=y +# CONFIG_MMU_DEBUG_PRINTS is not set +# end of Arch Configuration + +# +# Board Configuration +# +# CONFIG_TARGET_F2000_4 is not set +# CONFIG_TARGET_D2000 is not set +# CONFIG_TARGET_E2000Q is not set +CONFIG_TARGET_E2000D=y +# CONFIG_TARGET_E2000S is not set +CONFIG_TARGET_E2000=y +CONFIG_DEFAULT_DEBUG_PRINT_UART1=y +# CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set +# CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set +# end of Board Configuration + +# +# Components Configuration +# +# CONFIG_USE_SPI is not set +# CONFIG_USE_QSPI is not set +CONFIG_USE_GIC=y +CONFIG_ENABLE_GICV3=y +CONFIG_USE_SERIAL=y + +# +# Usart Configuration +# +CONFIG_ENABLE_Pl011_UART=y +# end of Usart Configuration + +# CONFIG_USE_GPIO is not set +# CONFIG_USE_ETH is not set +# CONFIG_USE_CAN is not set +CONFIG_USE_I2C=y +CONFIG_USE_FI2C=y +# CONFIG_USE_TIMER is not set +CONFIG_USE_MIO=y + +# +# Hardware Mio Configuration +# +CONFIG_ENABLE_MIO=y +# end of Hardware Mio Configuration + +# CONFIG_USE_SDMMC is not set +# CONFIG_USE_PCIE is not set +# CONFIG_USE_WDT is not set +# CONFIG_USE_DMA is not set +# CONFIG_USE_NAND is not set +# CONFIG_USE_RTC is not set +# CONFIG_USE_SATA is not set +# CONFIG_USE_USB is not set +# CONFIG_USE_ADC is not set +# CONFIG_USE_PWM is not set +# CONFIG_USE_IPC is not set +# end of Components Configuration + +CONFIG_USE_NEW_LIBC=y +# end of Standalone Setting + +# +# Building Option +# +# CONFIG_LOG_VERBOS is not set +# CONFIG_LOG_DEBUG is not set +# CONFIG_LOG_INFO is not set +# CONFIG_LOG_WARN is not set +CONFIG_LOG_ERROR=y +# CONFIG_LOG_NONE is not set +CONFIG_USE_DEFAULT_INTERRUPT_CONFIG=y +CONFIG_INTERRUPT_ROLE_MASTER=y +# CONFIG_INTERRUPT_ROLE_SLAVE is not set +# CONFIG_LOG_EXTRA_INFO is not set +# CONFIG_BOOTUP_DEBUG_PRINTS is not set + +# +# Linker Options +# +# CONFIG_AARCH32_RAM_LD is not set +CONFIG_AARCH64_RAM_LD=y +# CONFIG_USER_DEFINED_LD is not set +CONFIG_LINK_SCRIPT_ROM=y +CONFIG_ROM_START_UP_ADDR=0x80100000 +CONFIG_ROM_SIZE_MB=1 +CONFIG_LINK_SCRIPT_RAM=y +CONFIG_RAM_START_UP_ADDR=0x81000000 +CONFIG_RAM_SIZE_MB=64 +CONFIG_HEAP_SIZE=1 +CONFIG_STACK_SIZE=0x100000 +CONFIG_FPU_STACK_SIZE=0x1000 +# end of Linker Options + +# +# Compiler Options +# + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + +CONFIG_OUTPUT_BINARY=y +# end of Compiler Options +# end of Building Option + +# +# Component Configuration +# + +# +# Freertos Uart Drivers +# +CONFIG_FREERTOS_USE_UART=y +# end of Freertos Uart Drivers + +# +# Freertos Pwm Drivers +# +# CONFIG_FREERTOS_USE_PWM is not set +# end of Freertos Pwm Drivers + +# +# Freertos Qspi Drivers +# +# CONFIG_FREERTOS_USE_QSPI is not set +# end of Freertos Qspi Drivers + +# +# Freertos Wdt Drivers +# +# CONFIG_FREERTOS_USE_WDT is not set +# end of Freertos Wdt Drivers + +# +# Freertos Eth Drivers +# +# CONFIG_FREERTOS_USE_XMAC is not set +# end of Freertos Eth Drivers + +# +# Freertos Gpio Drivers +# +# CONFIG_FREERTOS_USE_GPIO is not set +# end of Freertos Gpio Drivers + +# +# Freertos Spim Drivers +# +# CONFIG_FREERTOS_USE_FSPIM is not set +# end of Freertos Spim Drivers + +# +# Freertos DMA Drivers +# +# CONFIG_FREERTOS_USE_FDDMA is not set +# CONFIG_FREERTOS_USE_FGDMA is not set +# end of Freertos DMA Drivers + +# +# Freertos MMC Drivers +# +# CONFIG_FREERTOS_USE_FSDIO is not set +# end of Freertos MMC Drivers + +# +# Freertos Adc Drivers +# +# CONFIG_FREERTOS_USE_ADC is not set +# end of Freertos Adc Drivers + +# +# Freertos Can Drivers +# +# CONFIG_FREERTOS_USE_CAN is not set +# end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +CONFIG_FREERTOS_USE_I2C=y +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +CONFIG_FREERTOS_USE_MIO=y +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers +# end of Component Configuration + +# +# Third-Party Configuration +# +# CONFIG_USE_LWIP is not set +CONFIG_USE_BACKTRACE=y +# CONFIG_USE_FATFS is not set +# CONFIG_USE_SFUD is not set +# CONFIG_USE_SPIFFS is not set +# CONFIG_USE_AMP is not set +CONFIG_USE_LETTER_SHELL=y + +# +# Letter Shell Configuration +# +CONFIG_LS_PL011_UART=y +CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y +# CONFIG_DEFAULT_LETTER_SHELL_USE_UART0 is not set +# CONFIG_DEFAULT_LETTER_SHELL_USE_UART2 is not set +# end of Letter Shell Configuration + +# CONFIG_USE_TLSF is not set +# CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/i2c/configs/e2000q_aarch32_eg_configs b/example/peripheral/i2c/configs/e2000q_aarch32_eg_configs new file mode 100644 index 0000000000000000000000000000000000000000..2cfa78029aa1d4ccbd00eb8b43917f75b6026549 --- /dev/null +++ b/example/peripheral/i2c/configs/e2000q_aarch32_eg_configs @@ -0,0 +1,270 @@ + +# +# Freertos Configuration +# +CONFIG_TARGET_NAME="e2000q_freertos_a32" +# end of Freertos Configuration + +# +# Standalone Setting +# +CONFIG_USE_FREERTOS=y + +# +# Arch Configuration +# +CONFIG_TARGET_ARMV8_AARCH32=y +# CONFIG_TARGET_ARMV8_AARCH64 is not set +CONFIG_USE_CACHE=y +CONFIG_USE_MMU=y +CONFIG_USE_SYS_TICK=y +CONFIG_USE_AARCH64_L1_TO_AARCH32=y +# end of Arch Configuration + +# +# Board Configuration +# +# CONFIG_TARGET_F2000_4 is not set +# CONFIG_TARGET_D2000 is not set +CONFIG_TARGET_E2000Q=y +# CONFIG_TARGET_E2000D is not set +# CONFIG_TARGET_E2000S is not set +CONFIG_TARGET_E2000=y +CONFIG_DEFAULT_DEBUG_PRINT_UART1=y +# CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set +# CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set +# end of Board Configuration + +# +# Components Configuration +# +# CONFIG_USE_SPI is not set +# CONFIG_USE_QSPI is not set +CONFIG_USE_GIC=y +CONFIG_ENABLE_GICV3=y +CONFIG_USE_SERIAL=y + +# +# Usart Configuration +# +CONFIG_ENABLE_Pl011_UART=y +# end of Usart Configuration + +# CONFIG_USE_GPIO is not set +# CONFIG_USE_ETH is not set +# CONFIG_USE_CAN is not set +CONFIG_USE_I2C=y +CONFIG_USE_FI2C=y +# CONFIG_USE_TIMER is not set +CONFIG_USE_MIO=y + +# +# Hardware Mio Configuration +# +CONFIG_ENABLE_MIO=y +# end of Hardware Mio Configuration + +# CONFIG_USE_SDMMC is not set +# CONFIG_USE_PCIE is not set +# CONFIG_USE_WDT is not set +# CONFIG_USE_DMA is not set +# CONFIG_USE_NAND is not set +# CONFIG_USE_RTC is not set +# CONFIG_USE_SATA is not set +# CONFIG_USE_USB is not set +# CONFIG_USE_ADC is not set +# CONFIG_USE_PWM is not set +# CONFIG_USE_IPC is not set +# end of Components Configuration + +CONFIG_USE_NEW_LIBC=y +# end of Standalone Setting + +# +# Building Option +# +# CONFIG_LOG_VERBOS is not set +# CONFIG_LOG_DEBUG is not set +# CONFIG_LOG_INFO is not set +# CONFIG_LOG_WARN is not set +CONFIG_LOG_ERROR=y +# CONFIG_LOG_NONE is not set +CONFIG_USE_DEFAULT_INTERRUPT_CONFIG=y +CONFIG_INTERRUPT_ROLE_MASTER=y +# CONFIG_INTERRUPT_ROLE_SLAVE is not set +# CONFIG_LOG_EXTRA_INFO is not set +# CONFIG_BOOTUP_DEBUG_PRINTS is not set + +# +# Linker Options +# +CONFIG_AARCH32_RAM_LD=y +# CONFIG_AARCH64_RAM_LD is not set +# CONFIG_USER_DEFINED_LD is not set +CONFIG_LINK_SCRIPT_ROM=y +CONFIG_ROM_START_UP_ADDR=0x80100000 +CONFIG_ROM_SIZE_MB=1 +CONFIG_LINK_SCRIPT_RAM=y +CONFIG_RAM_START_UP_ADDR=0x81000000 +CONFIG_RAM_SIZE_MB=64 +CONFIG_HEAP_SIZE=1 +CONFIG_SVC_STACK_SIZE=0x1000 +CONFIG_SYS_STACK_SIZE=0x1000 +CONFIG_IRQ_STACK_SIZE=0x1000 +CONFIG_ABORT_STACK_SIZE=0x1000 +CONFIG_FIQ_STACK_SIZE=0x1000 +CONFIG_UNDEF_STACK_SIZE=0x1000 +# end of Linker Options + +# +# Compiler Options +# + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + +CONFIG_OUTPUT_BINARY=y +# end of Compiler Options +# end of Building Option + +# +# Component Configuration +# + +# +# Freertos Uart Drivers +# +CONFIG_FREERTOS_USE_UART=y +# end of Freertos Uart Drivers + +# +# Freertos Pwm Drivers +# +# CONFIG_FREERTOS_USE_PWM is not set +# end of Freertos Pwm Drivers + +# +# Freertos Qspi Drivers +# +# CONFIG_FREERTOS_USE_QSPI is not set +# end of Freertos Qspi Drivers + +# +# Freertos Wdt Drivers +# +# CONFIG_FREERTOS_USE_WDT is not set +# end of Freertos Wdt Drivers + +# +# Freertos Eth Drivers +# +# CONFIG_FREERTOS_USE_XMAC is not set +# end of Freertos Eth Drivers + +# +# Freertos Gpio Drivers +# +# CONFIG_FREERTOS_USE_GPIO is not set +# end of Freertos Gpio Drivers + +# +# Freertos Spim Drivers +# +# CONFIG_FREERTOS_USE_FSPIM is not set +# end of Freertos Spim Drivers + +# +# Freertos DMA Drivers +# +# CONFIG_FREERTOS_USE_FDDMA is not set +# CONFIG_FREERTOS_USE_FGDMA is not set +# end of Freertos DMA Drivers + +# +# Freertos MMC Drivers +# +# CONFIG_FREERTOS_USE_FSDIO is not set +# end of Freertos MMC Drivers + +# +# Freertos Adc Drivers +# +# CONFIG_FREERTOS_USE_ADC is not set +# end of Freertos Adc Drivers + +# +# Freertos Can Drivers +# +# CONFIG_FREERTOS_USE_CAN is not set +# end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +CONFIG_FREERTOS_USE_I2C=y +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +CONFIG_FREERTOS_USE_MIO=y +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers +# end of Component Configuration + +# +# Third-Party Configuration +# +# CONFIG_USE_LWIP is not set +CONFIG_USE_BACKTRACE=y +# CONFIG_USE_FATFS is not set +# CONFIG_USE_SFUD is not set +# CONFIG_USE_SPIFFS is not set +# CONFIG_USE_AMP is not set +CONFIG_USE_LETTER_SHELL=y + +# +# Letter Shell Configuration +# +CONFIG_LS_PL011_UART=y +CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y +# CONFIG_DEFAULT_LETTER_SHELL_USE_UART0 is not set +# CONFIG_DEFAULT_LETTER_SHELL_USE_UART2 is not set +# end of Letter Shell Configuration + +# CONFIG_USE_TLSF is not set +# CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/i2c/configs/e2000q_aarch64_eg_configs b/example/peripheral/i2c/configs/e2000q_aarch64_eg_configs new file mode 100644 index 0000000000000000000000000000000000000000..604855bcb4c7965c7afe11729b732abc14244b04 --- /dev/null +++ b/example/peripheral/i2c/configs/e2000q_aarch64_eg_configs @@ -0,0 +1,266 @@ + +# +# Freertos Configuration +# +CONFIG_TARGET_NAME="e2000q_freertos_a64" +# end of Freertos Configuration + +# +# Standalone Setting +# +CONFIG_USE_FREERTOS=y + +# +# Arch Configuration +# +# CONFIG_TARGET_ARMV8_AARCH32 is not set +CONFIG_TARGET_ARMV8_AARCH64=y +CONFIG_USE_CACHE=y +CONFIG_USE_MMU=y +CONFIG_USE_SYS_TICK=y +# CONFIG_MMU_DEBUG_PRINTS is not set +# end of Arch Configuration + +# +# Board Configuration +# +# CONFIG_TARGET_F2000_4 is not set +# CONFIG_TARGET_D2000 is not set +CONFIG_TARGET_E2000Q=y +# CONFIG_TARGET_E2000D is not set +# CONFIG_TARGET_E2000S is not set +CONFIG_TARGET_E2000=y +CONFIG_DEFAULT_DEBUG_PRINT_UART1=y +# CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set +# CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set +# end of Board Configuration + +# +# Components Configuration +# +# CONFIG_USE_SPI is not set +# CONFIG_USE_QSPI is not set +CONFIG_USE_GIC=y +CONFIG_ENABLE_GICV3=y +CONFIG_USE_SERIAL=y + +# +# Usart Configuration +# +CONFIG_ENABLE_Pl011_UART=y +# end of Usart Configuration + +# CONFIG_USE_GPIO is not set +# CONFIG_USE_ETH is not set +# CONFIG_USE_CAN is not set +CONFIG_USE_I2C=y +CONFIG_USE_FI2C=y +# CONFIG_USE_TIMER is not set +CONFIG_USE_MIO=y + +# +# Hardware Mio Configuration +# +CONFIG_ENABLE_MIO=y +# end of Hardware Mio Configuration + +# CONFIG_USE_SDMMC is not set +# CONFIG_USE_PCIE is not set +# CONFIG_USE_WDT is not set +# CONFIG_USE_DMA is not set +# CONFIG_USE_NAND is not set +# CONFIG_USE_RTC is not set +# CONFIG_USE_SATA is not set +# CONFIG_USE_USB is not set +# CONFIG_USE_ADC is not set +# CONFIG_USE_PWM is not set +# CONFIG_USE_IPC is not set +# end of Components Configuration + +CONFIG_USE_NEW_LIBC=y +# end of Standalone Setting + +# +# Building Option +# +# CONFIG_LOG_VERBOS is not set +# CONFIG_LOG_DEBUG is not set +# CONFIG_LOG_INFO is not set +# CONFIG_LOG_WARN is not set +CONFIG_LOG_ERROR=y +# CONFIG_LOG_NONE is not set +CONFIG_USE_DEFAULT_INTERRUPT_CONFIG=y +CONFIG_INTERRUPT_ROLE_MASTER=y +# CONFIG_INTERRUPT_ROLE_SLAVE is not set +# CONFIG_LOG_EXTRA_INFO is not set +# CONFIG_BOOTUP_DEBUG_PRINTS is not set + +# +# Linker Options +# +# CONFIG_AARCH32_RAM_LD is not set +CONFIG_AARCH64_RAM_LD=y +# CONFIG_USER_DEFINED_LD is not set +CONFIG_LINK_SCRIPT_ROM=y +CONFIG_ROM_START_UP_ADDR=0x80100000 +CONFIG_ROM_SIZE_MB=1 +CONFIG_LINK_SCRIPT_RAM=y +CONFIG_RAM_START_UP_ADDR=0x81000000 +CONFIG_RAM_SIZE_MB=64 +CONFIG_HEAP_SIZE=1 +CONFIG_STACK_SIZE=0x100000 +CONFIG_FPU_STACK_SIZE=0x1000 +# end of Linker Options + +# +# Compiler Options +# + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + +CONFIG_OUTPUT_BINARY=y +# end of Compiler Options +# end of Building Option + +# +# Component Configuration +# + +# +# Freertos Uart Drivers +# +CONFIG_FREERTOS_USE_UART=y +# end of Freertos Uart Drivers + +# +# Freertos Pwm Drivers +# +# CONFIG_FREERTOS_USE_PWM is not set +# end of Freertos Pwm Drivers + +# +# Freertos Qspi Drivers +# +# CONFIG_FREERTOS_USE_QSPI is not set +# end of Freertos Qspi Drivers + +# +# Freertos Wdt Drivers +# +# CONFIG_FREERTOS_USE_WDT is not set +# end of Freertos Wdt Drivers + +# +# Freertos Eth Drivers +# +# CONFIG_FREERTOS_USE_XMAC is not set +# end of Freertos Eth Drivers + +# +# Freertos Gpio Drivers +# +# CONFIG_FREERTOS_USE_GPIO is not set +# end of Freertos Gpio Drivers + +# +# Freertos Spim Drivers +# +# CONFIG_FREERTOS_USE_FSPIM is not set +# end of Freertos Spim Drivers + +# +# Freertos DMA Drivers +# +# CONFIG_FREERTOS_USE_FDDMA is not set +# CONFIG_FREERTOS_USE_FGDMA is not set +# end of Freertos DMA Drivers + +# +# Freertos MMC Drivers +# +# CONFIG_FREERTOS_USE_FSDIO is not set +# end of Freertos MMC Drivers + +# +# Freertos Adc Drivers +# +# CONFIG_FREERTOS_USE_ADC is not set +# end of Freertos Adc Drivers + +# +# Freertos Can Drivers +# +# CONFIG_FREERTOS_USE_CAN is not set +# end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +CONFIG_FREERTOS_USE_I2C=y +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +CONFIG_FREERTOS_USE_MIO=y +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers +# end of Component Configuration + +# +# Third-Party Configuration +# +# CONFIG_USE_LWIP is not set +CONFIG_USE_BACKTRACE=y +# CONFIG_USE_FATFS is not set +# CONFIG_USE_SFUD is not set +# CONFIG_USE_SPIFFS is not set +# CONFIG_USE_AMP is not set +CONFIG_USE_LETTER_SHELL=y + +# +# Letter Shell Configuration +# +CONFIG_LS_PL011_UART=y +CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y +# CONFIG_DEFAULT_LETTER_SHELL_USE_UART0 is not set +# CONFIG_DEFAULT_LETTER_SHELL_USE_UART2 is not set +# end of Letter Shell Configuration + +# CONFIG_USE_TLSF is not set +# CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/i2c/figs/E2000_1339.png b/example/peripheral/i2c/figs/E2000_1339.png new file mode 100644 index 0000000000000000000000000000000000000000..9574b8a4d13dc3cb61450c81164f874aadbc3870 Binary files /dev/null and b/example/peripheral/i2c/figs/E2000_1339.png differ diff --git a/example/peripheral/i2c/figs/E2000_rtc.png b/example/peripheral/i2c/figs/E2000_rtc.png new file mode 100644 index 0000000000000000000000000000000000000000..971f299fbae9a8e505bfa9ca27b2044b5e2992db Binary files /dev/null and b/example/peripheral/i2c/figs/E2000_rtc.png differ diff --git a/example/peripheral/i2c/figs/board.png b/example/peripheral/i2c/figs/board.png new file mode 100644 index 0000000000000000000000000000000000000000..3d385e2ef09f34933c34b4e29d387d110e293fd2 Binary files /dev/null and b/example/peripheral/i2c/figs/board.png differ diff --git a/example/peripheral/i2c/figs/d2000_eeprom.png b/example/peripheral/i2c/figs/d2000_eeprom.png new file mode 100644 index 0000000000000000000000000000000000000000..439e3c4548e0c05342b9111510f26ca3ec31d2a9 Binary files /dev/null and b/example/peripheral/i2c/figs/d2000_eeprom.png differ diff --git a/example/peripheral/i2c/figs/d2000_master_slave.png b/example/peripheral/i2c/figs/d2000_master_slave.png new file mode 100644 index 0000000000000000000000000000000000000000..7ab80b49f9e4d0ef8b22585ea714c418eb0bff7f Binary files /dev/null and b/example/peripheral/i2c/figs/d2000_master_slave.png differ diff --git a/example/peripheral/i2c/inc/i2c_example.h b/example/peripheral/i2c/inc/i2c_example.h new file mode 100644 index 0000000000000000000000000000000000000000..38324dea7e7a9a3e2be7936b80da0f58eb83f8b4 --- /dev/null +++ b/example/peripheral/i2c/inc/i2c_example.h @@ -0,0 +1,50 @@ +/* + * Copyright : (C) 2022 Phytium Information Technology, Inc. + * All Rights Reserved. + * + * This program is OPEN SOURCE software: you can redistribute it and/or modify it + * under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd, + * either version 1.0 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the Phytium Public License for more details. + * + * + * FilePath: i2c_example.h + * Date: 2022-07-18 14:41:23 + * LastEditTime: 2022-07-18 14:41:23 + * Description:  This file is for + * + * Modify History: + * Ver   Who        Date         Changes + * ----- ------     --------    -------------------------------------- + * 0.0.1 liushengming 2022.7.18 init + */ +#ifndef QSPI_EXAMPLE_H +#define QSPI_EXAMPLE_H + +#ifdef __cplusplus +extern "C" +{ +#endif +#include "fi2c_os.h" +/***************************** Include Files *********************************/ + +/************************** Definitions *****************************/ + +/************************** Variable Definitions *****************************/ + +/***************** Macros (Inline Functions) Definitions *********************/ + +/************************** Function Prototypes ******************************/ +/* i2c write and read test */ +BaseType_t FFreeRTOSI2cCreate(void); +/* dump buffer of slave */ +void FFreeRTOSI2cSlaveDump(FFreeRTOSI2c *os_i2c_p); + +#ifdef __cplusplus +} +#endif + +#endif \ No newline at end of file diff --git a/example/peripheral/i2c/main.c b/example/peripheral/i2c/main.c new file mode 100644 index 0000000000000000000000000000000000000000..939ff693a8b3b2f481e4e934066457568812b802 --- /dev/null +++ b/example/peripheral/i2c/main.c @@ -0,0 +1,47 @@ +/* + * Copyright : (C) 2022 Phytium Information Technology, Inc. + * All Rights Reserved. + * + * This program is OPEN SOURCE software: you can redistribute it and/or modify it + * under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd, + * either version 1.0 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the Phytium Public License for more details. + * + * + * FilePath: main.c + * Date: 2022-07-18 14:39:10 + * LastEditTime: 2022-07-18 14:39:10 + * Description:  This file is for + * + * Modify History: + * Ver   Who        Date         Changes + * ----- ------     --------    -------------------------------------- + */ + +#include +#include "shell.h" +#include "shell_port.h" +#include "i2c_example.h" + +int main(void) +{ + BaseType_t ret; + + ret = FFreeRTOSI2cCreate(); + if(ret != pdPASS) + goto FAIL_EXIT; + + ret = LSUserShellTask(); + if(ret != pdPASS) + goto FAIL_EXIT; + + vTaskStartScheduler(); /* 启动任务,开启调度 */ + while (1); /* 正常不会执行到这里 */ + +FAIL_EXIT: + printf("failed 0x%x \r\n", ret); + return 0; +} \ No newline at end of file diff --git a/example/peripheral/i2c/makefile b/example/peripheral/i2c/makefile new file mode 100644 index 0000000000000000000000000000000000000000..d56227392212980c329dde7ebb09f8ec2d601317 --- /dev/null +++ b/example/peripheral/i2c/makefile @@ -0,0 +1,29 @@ +export PROJECT_DIR ?= $(shell pwd) + +export USR_SRC_DIR = $(PROJECT_DIR) \ + ./src +export USR_INC_DIR = $(PROJECT_DIR) \ + ./inc + +# 用户定义的编译目标文件上传路径 +ifeq ($(OS),Windows_NT) + USR_BOOT_DIR ?= $(subst \,/, $(PHYTIUM_DEV_PATH))/tftp +else + USR_BOOT_DIR ?= /mnt/d/tftboot +endif + + +# 设置启动镜像名 +BOOT_IMG_NAME ?= freertos + +# 指定编译freertos项目使用的makefile +include $(FREERTOS_SDK_ROOT)/make/build_freertos.mk + +# 完成编译 +boot: + make -j + @cp ./$(CONFIG_TARGET_NAME).elf $(USR_BOOT_DIR)/$(BOOT_IMG_NAME).elf + @cp ./$(CONFIG_TARGET_NAME).bin $(USR_BOOT_DIR)/$(BOOT_IMG_NAME).bin + @ls -l $(USR_BOOT_DIR)/$(BOOT_IMG_NAME).* + + diff --git a/example/peripheral/i2c/sdkconfig b/example/peripheral/i2c/sdkconfig new file mode 100644 index 0000000000000000000000000000000000000000..604855bcb4c7965c7afe11729b732abc14244b04 --- /dev/null +++ b/example/peripheral/i2c/sdkconfig @@ -0,0 +1,266 @@ + +# +# Freertos Configuration +# +CONFIG_TARGET_NAME="e2000q_freertos_a64" +# end of Freertos Configuration + +# +# Standalone Setting +# +CONFIG_USE_FREERTOS=y + +# +# Arch Configuration +# +# CONFIG_TARGET_ARMV8_AARCH32 is not set +CONFIG_TARGET_ARMV8_AARCH64=y +CONFIG_USE_CACHE=y +CONFIG_USE_MMU=y +CONFIG_USE_SYS_TICK=y +# CONFIG_MMU_DEBUG_PRINTS is not set +# end of Arch Configuration + +# +# Board Configuration +# +# CONFIG_TARGET_F2000_4 is not set +# CONFIG_TARGET_D2000 is not set +CONFIG_TARGET_E2000Q=y +# CONFIG_TARGET_E2000D is not set +# CONFIG_TARGET_E2000S is not set +CONFIG_TARGET_E2000=y +CONFIG_DEFAULT_DEBUG_PRINT_UART1=y +# CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set +# CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set +# end of Board Configuration + +# +# Components Configuration +# +# CONFIG_USE_SPI is not set +# CONFIG_USE_QSPI is not set +CONFIG_USE_GIC=y +CONFIG_ENABLE_GICV3=y +CONFIG_USE_SERIAL=y + +# +# Usart Configuration +# +CONFIG_ENABLE_Pl011_UART=y +# end of Usart Configuration + +# CONFIG_USE_GPIO is not set +# CONFIG_USE_ETH is not set +# CONFIG_USE_CAN is not set +CONFIG_USE_I2C=y +CONFIG_USE_FI2C=y +# CONFIG_USE_TIMER is not set +CONFIG_USE_MIO=y + +# +# Hardware Mio Configuration +# +CONFIG_ENABLE_MIO=y +# end of Hardware Mio Configuration + +# CONFIG_USE_SDMMC is not set +# CONFIG_USE_PCIE is not set +# CONFIG_USE_WDT is not set +# CONFIG_USE_DMA is not set +# CONFIG_USE_NAND is not set +# CONFIG_USE_RTC is not set +# CONFIG_USE_SATA is not set +# CONFIG_USE_USB is not set +# CONFIG_USE_ADC is not set +# CONFIG_USE_PWM is not set +# CONFIG_USE_IPC is not set +# end of Components Configuration + +CONFIG_USE_NEW_LIBC=y +# end of Standalone Setting + +# +# Building Option +# +# CONFIG_LOG_VERBOS is not set +# CONFIG_LOG_DEBUG is not set +# CONFIG_LOG_INFO is not set +# CONFIG_LOG_WARN is not set +CONFIG_LOG_ERROR=y +# CONFIG_LOG_NONE is not set +CONFIG_USE_DEFAULT_INTERRUPT_CONFIG=y +CONFIG_INTERRUPT_ROLE_MASTER=y +# CONFIG_INTERRUPT_ROLE_SLAVE is not set +# CONFIG_LOG_EXTRA_INFO is not set +# CONFIG_BOOTUP_DEBUG_PRINTS is not set + +# +# Linker Options +# +# CONFIG_AARCH32_RAM_LD is not set +CONFIG_AARCH64_RAM_LD=y +# CONFIG_USER_DEFINED_LD is not set +CONFIG_LINK_SCRIPT_ROM=y +CONFIG_ROM_START_UP_ADDR=0x80100000 +CONFIG_ROM_SIZE_MB=1 +CONFIG_LINK_SCRIPT_RAM=y +CONFIG_RAM_START_UP_ADDR=0x81000000 +CONFIG_RAM_SIZE_MB=64 +CONFIG_HEAP_SIZE=1 +CONFIG_STACK_SIZE=0x100000 +CONFIG_FPU_STACK_SIZE=0x1000 +# end of Linker Options + +# +# Compiler Options +# + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + +CONFIG_OUTPUT_BINARY=y +# end of Compiler Options +# end of Building Option + +# +# Component Configuration +# + +# +# Freertos Uart Drivers +# +CONFIG_FREERTOS_USE_UART=y +# end of Freertos Uart Drivers + +# +# Freertos Pwm Drivers +# +# CONFIG_FREERTOS_USE_PWM is not set +# end of Freertos Pwm Drivers + +# +# Freertos Qspi Drivers +# +# CONFIG_FREERTOS_USE_QSPI is not set +# end of Freertos Qspi Drivers + +# +# Freertos Wdt Drivers +# +# CONFIG_FREERTOS_USE_WDT is not set +# end of Freertos Wdt Drivers + +# +# Freertos Eth Drivers +# +# CONFIG_FREERTOS_USE_XMAC is not set +# end of Freertos Eth Drivers + +# +# Freertos Gpio Drivers +# +# CONFIG_FREERTOS_USE_GPIO is not set +# end of Freertos Gpio Drivers + +# +# Freertos Spim Drivers +# +# CONFIG_FREERTOS_USE_FSPIM is not set +# end of Freertos Spim Drivers + +# +# Freertos DMA Drivers +# +# CONFIG_FREERTOS_USE_FDDMA is not set +# CONFIG_FREERTOS_USE_FGDMA is not set +# end of Freertos DMA Drivers + +# +# Freertos MMC Drivers +# +# CONFIG_FREERTOS_USE_FSDIO is not set +# end of Freertos MMC Drivers + +# +# Freertos Adc Drivers +# +# CONFIG_FREERTOS_USE_ADC is not set +# end of Freertos Adc Drivers + +# +# Freertos Can Drivers +# +# CONFIG_FREERTOS_USE_CAN is not set +# end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +CONFIG_FREERTOS_USE_I2C=y +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +CONFIG_FREERTOS_USE_MIO=y +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers +# end of Component Configuration + +# +# Third-Party Configuration +# +# CONFIG_USE_LWIP is not set +CONFIG_USE_BACKTRACE=y +# CONFIG_USE_FATFS is not set +# CONFIG_USE_SFUD is not set +# CONFIG_USE_SPIFFS is not set +# CONFIG_USE_AMP is not set +CONFIG_USE_LETTER_SHELL=y + +# +# Letter Shell Configuration +# +CONFIG_LS_PL011_UART=y +CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y +# CONFIG_DEFAULT_LETTER_SHELL_USE_UART0 is not set +# CONFIG_DEFAULT_LETTER_SHELL_USE_UART2 is not set +# end of Letter Shell Configuration + +# CONFIG_USE_TLSF is not set +# CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/i2c/sdkconfig.h b/example/peripheral/i2c/sdkconfig.h new file mode 100644 index 0000000000000000000000000000000000000000..592c2f3b81537cf7dac5721fdd244440b7e2f104 --- /dev/null +++ b/example/peripheral/i2c/sdkconfig.h @@ -0,0 +1,234 @@ +#ifndef SDK_CONFIG_H__ +#define SDK_CONFIG_H__ + +/* Freertos Configuration */ + +#define CONFIG_TARGET_NAME "e2000q_freertos_a64" +/* end of Freertos Configuration */ + +/* Standalone Setting */ + +#define CONFIG_USE_FREERTOS + +/* Arch Configuration */ + +/* CONFIG_TARGET_ARMV8_AARCH32 is not set */ +#define CONFIG_TARGET_ARMV8_AARCH64 +#define CONFIG_USE_CACHE +#define CONFIG_USE_MMU +#define CONFIG_USE_SYS_TICK +/* CONFIG_MMU_DEBUG_PRINTS is not set */ +/* end of Arch Configuration */ + +/* Board Configuration */ + +/* CONFIG_TARGET_F2000_4 is not set */ +/* CONFIG_TARGET_D2000 is not set */ +#define CONFIG_TARGET_E2000Q +/* CONFIG_TARGET_E2000D is not set */ +/* CONFIG_TARGET_E2000S is not set */ +#define CONFIG_TARGET_E2000 +#define CONFIG_DEFAULT_DEBUG_PRINT_UART1 +/* CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set */ +/* CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set */ +/* end of Board Configuration */ + +/* Components Configuration */ + +/* CONFIG_USE_SPI is not set */ +/* CONFIG_USE_QSPI is not set */ +#define CONFIG_USE_GIC +#define CONFIG_ENABLE_GICV3 +#define CONFIG_USE_SERIAL + +/* Usart Configuration */ + +#define CONFIG_ENABLE_Pl011_UART +/* end of Usart Configuration */ +/* CONFIG_USE_GPIO is not set */ +/* CONFIG_USE_ETH is not set */ +/* CONFIG_USE_CAN is not set */ +#define CONFIG_USE_I2C +#define CONFIG_USE_FI2C +/* CONFIG_USE_TIMER is not set */ +#define CONFIG_USE_MIO + +/* Hardware Mio Configuration */ + +#define CONFIG_ENABLE_MIO +/* end of Hardware Mio Configuration */ +/* CONFIG_USE_SDMMC is not set */ +/* CONFIG_USE_PCIE is not set */ +/* CONFIG_USE_WDT is not set */ +/* CONFIG_USE_DMA is not set */ +/* CONFIG_USE_NAND is not set */ +/* CONFIG_USE_RTC is not set */ +/* CONFIG_USE_SATA is not set */ +/* CONFIG_USE_USB is not set */ +/* CONFIG_USE_ADC is not set */ +/* CONFIG_USE_PWM is not set */ +/* CONFIG_USE_IPC is not set */ +/* end of Components Configuration */ +#define CONFIG_USE_NEW_LIBC +/* end of Standalone Setting */ + +/* Building Option */ + +/* CONFIG_LOG_VERBOS is not set */ +/* CONFIG_LOG_DEBUG is not set */ +/* CONFIG_LOG_INFO is not set */ +/* CONFIG_LOG_WARN is not set */ +#define CONFIG_LOG_ERROR +/* CONFIG_LOG_NONE is not set */ +#define CONFIG_USE_DEFAULT_INTERRUPT_CONFIG +#define CONFIG_INTERRUPT_ROLE_MASTER +/* CONFIG_INTERRUPT_ROLE_SLAVE is not set */ +/* CONFIG_LOG_EXTRA_INFO is not set */ +/* CONFIG_BOOTUP_DEBUG_PRINTS is not set */ + +/* Linker Options */ + +/* CONFIG_AARCH32_RAM_LD is not set */ +#define CONFIG_AARCH64_RAM_LD +/* CONFIG_USER_DEFINED_LD is not set */ +#define CONFIG_LINK_SCRIPT_ROM +#define CONFIG_ROM_START_UP_ADDR 0x80100000 +#define CONFIG_ROM_SIZE_MB 1 +#define CONFIG_LINK_SCRIPT_RAM +#define CONFIG_RAM_START_UP_ADDR 0x81000000 +#define CONFIG_RAM_SIZE_MB 64 +#define CONFIG_HEAP_SIZE 1 +#define CONFIG_STACK_SIZE 0x100000 +#define CONFIG_FPU_STACK_SIZE 0x1000 +/* end of Linker Options */ + +/* Compiler Options */ + +/* Cross-Compiler Setting */ + +#define CONFIG_GCC_OPTIMIZE_LEVEL 0 +/* CONFIG_USE_EXT_COMPILER is not set */ +/* CONFIG_USE_KLIN_SYS is not set */ +/* end of Cross-Compiler Setting */ +#define CONFIG_OUTPUT_BINARY +/* end of Compiler Options */ +/* end of Building Option */ + +/* Component Configuration */ + +/* Freertos Uart Drivers */ + +#define CONFIG_FREERTOS_USE_UART +/* end of Freertos Uart Drivers */ + +/* Freertos Pwm Drivers */ + +/* CONFIG_FREERTOS_USE_PWM is not set */ +/* end of Freertos Pwm Drivers */ + +/* Freertos Qspi Drivers */ + +/* CONFIG_FREERTOS_USE_QSPI is not set */ +/* end of Freertos Qspi Drivers */ + +/* Freertos Wdt Drivers */ + +/* CONFIG_FREERTOS_USE_WDT is not set */ +/* end of Freertos Wdt Drivers */ + +/* Freertos Eth Drivers */ + +/* CONFIG_FREERTOS_USE_XMAC is not set */ +/* end of Freertos Eth Drivers */ + +/* Freertos Gpio Drivers */ + +/* CONFIG_FREERTOS_USE_GPIO is not set */ +/* end of Freertos Gpio Drivers */ + +/* Freertos Spim Drivers */ + +/* CONFIG_FREERTOS_USE_FSPIM is not set */ +/* end of Freertos Spim Drivers */ + +/* Freertos DMA Drivers */ + +/* CONFIG_FREERTOS_USE_FDDMA is not set */ +/* CONFIG_FREERTOS_USE_FGDMA is not set */ +/* end of Freertos DMA Drivers */ + +/* Freertos MMC Drivers */ + +/* CONFIG_FREERTOS_USE_FSDIO is not set */ +/* end of Freertos MMC Drivers */ + +/* Freertos Adc Drivers */ + +/* CONFIG_FREERTOS_USE_ADC is not set */ +/* end of Freertos Adc Drivers */ + +/* Freertos Can Drivers */ + +/* CONFIG_FREERTOS_USE_CAN is not set */ +/* end of Freertos Can Drivers */ + +/* Freertos I2c Drivers */ + +#define CONFIG_FREERTOS_USE_I2C +/* end of Freertos I2c Drivers */ + +/* Freertos Mio Drivers */ + +#define CONFIG_FREERTOS_USE_MIO +/* end of Freertos Mio Drivers */ + +/* Freertos Timer Drivers */ + +/* CONFIG_FREERTOS_USE_TIMER is not set */ +/* end of Freertos Timer Drivers */ +/* end of Component Configuration */ + +/* Third-Party Configuration */ + +/* CONFIG_USE_LWIP is not set */ +#define CONFIG_USE_BACKTRACE +/* CONFIG_USE_FATFS is not set */ +/* CONFIG_USE_SFUD is not set */ +/* CONFIG_USE_SPIFFS is not set */ +/* CONFIG_USE_AMP is not set */ +#define CONFIG_USE_LETTER_SHELL + +/* Letter Shell Configuration */ + +#define CONFIG_LS_PL011_UART +#define CONFIG_DEFAULT_LETTER_SHELL_USE_UART1 +/* CONFIG_DEFAULT_LETTER_SHELL_USE_UART0 is not set */ +/* CONFIG_DEFAULT_LETTER_SHELL_USE_UART2 is not set */ +/* end of Letter Shell Configuration */ +/* CONFIG_USE_TLSF is not set */ +/* CONFIG_USE_SDMMC_CMD is not set */ +/* CONFIG_USE_CHERRY_USB is not set */ +/* end of Third-Party Configuration */ + +/* Kernel Configuration */ + +#define CONFIG_FREERTOS_OPTIMIZED_SCHEDULER +#define CONFIG_FREERTOS_HZ 1000 +#define CONFIG_FREERTOS_MAX_PRIORITIES 32 +#define CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES 13 +#define CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES 11 +#define CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS 1 +#define CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE 1024 +#define CONFIG_FREERTOS_MAX_TASK_NAME_LEN 32 +#define CONFIG_FREERTOS_TIMER_TASK_PRIORITY 1 +#define CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH 2048 +#define CONFIG_FREERTOS_TIMER_QUEUE_LENGTH 10 +#define CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE 0 +#define CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS +#define CONFIG_FREERTOS_USE_TRACE_FACILITY +#define CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS +/* CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set */ +#define CONFIG_FREERTOS_TOTAL_HEAP_SIZE 10240 +/* end of Kernel Configuration */ + +#endif diff --git a/example/peripheral/i2c/src/i2c_example.c b/example/peripheral/i2c/src/i2c_example.c new file mode 100644 index 0000000000000000000000000000000000000000..17e6e32287c014b48b9f421caf9e5d9f0bb2f7e3 --- /dev/null +++ b/example/peripheral/i2c/src/i2c_example.c @@ -0,0 +1,571 @@ +/* + * Copyright : (C) 2022 Phytium Information Technology, Inc. + * All Rights Reserved. + * + * This program is OPEN SOURCE software: you can redistribute it and/or modify it + * under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd, + * either version 1.0 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the Phytium Public License for more details. + * + * + * FilePath: i2c_example.c + * Date: 2022-11-10 11:35:23 + * LastEditTime: 2022-11-10 11:35:24 + * Description:  This file is for + * + * Modify History: + * Ver   Who        Date         Changes + * ----- ------     --------    -------------------------------------- + */ +#include +#include "FreeRTOSConfig.h" +#include "FreeRTOS.h" +#include "task.h" +#include "fi2c.h" +#include "fi2c_hw.h" +#include "fi2c_os.h" +#include "timers.h" +#include "fcpu_info.h" +#include "i2c_example.h" +#include "fparameters.h" +#include "fpinctrl.h" +#include "sdkconfig.h" +#include "fdebug.h" +#include "ftypes.h" +#include "finterrupt.h" +#if defined(CONFIG_TARGET_E2000) +#include "fiopad.h" +#define BCD_TO_BIN(bcd) (( ((((bcd)&0xf0)>>4)*10) + ((bcd)&0xf) ) & 0xff) +#define BIN_TO_BCD(bin) (( (((bin)/10)<<4) + ((bin)%10) ) & 0xff) +#endif + +/* write and read task delay in milliseconds */ +#define TASK_DELAY_MS 5000UL + +/* slave address */ +/* Notice! Using addresses above 0x50 may cause the loopback test to fail */ +#define MASTER_SLAVE_ADDR 0x01 +#define EEPROM_ADDR 0x57 +#define RTC_ADDR 0x68 + +#define DAT_LENGTH 15 +static char data_w[DAT_LENGTH] = {0}; +static char data_r0[DAT_LENGTH]; +static char data_r1[DAT_LENGTH]; + +static xTaskHandle init_handle; +static xTaskHandle read_handle; +static xTaskHandle write_handle; +static xTaskHandle slave_handle; + +static FFreeRTOSI2c *os_i2c_master; +static FFreeRTOSI2c *os_i2c_slave; + +typedef struct data +{ + boolean first_write;/*IIC首次写入,在初始化时置位,用来指示当前传输的首个字节数据是用户需要读写的地址偏移*/ + u32 buff_idx;/* PC 指向的地址偏移 */ + u8 buff[IO_BUF_LEN];/*虚拟内存块*/ +} FI2cSlaveData; + +/* Slave mode for virtual eeprom memory ,size: IO_BUF_LEN in fi2c_os.h*/ +static FI2cSlaveData slave; + +/** + * @name: FFreeRTOSI2cSlaveDump + * @msg: dump buffer of slave + * @return {*} + * @param {FFreeRTOSI2c} *os_i2c_p + */ +void FFreeRTOSI2cSlaveDump(FFreeRTOSI2c *os_i2c_p) +{ + FASSERT(os_i2c_p); + FASSERT(os_i2c_p->wr_semaphore != NULL); + FI2cSlaveData *slave_p = &slave; + FtDumpHexByte(slave_p->buff,IO_BUF_LEN); +} + +/** + * @name: FI2cSlaveCb + * @msg: 从机内存操作 + * @return {*},无 + * @param {void} *instance_p + * @param {void} *para + * @param {u32} evt + */ +void FI2cOsSlaveCb(void *instance_p, void *para, u32 evt) +{ + FI2cSlaveData *slave_p = &slave; + u8 *val = (u8 *)para; + /* + *Do not increment buffer_idx here,because we set maximum lenth is IO_BUF_LEN + */ + if (slave_p->buff_idx >= IO_BUF_LEN) + slave_p->buff_idx = slave_p->buff_idx % IO_BUF_LEN; + switch (evt) + { + case FI2C_EVT_SLAVE_WRITE_RECEIVED: + if (slave_p->first_write) + { + slave_p->buff_idx = *val; + slave_p->first_write = FALSE; + } + else + { + slave_p->buff[slave_p->buff_idx++] = *val; + } + + break; + case FI2C_EVT_SLAVE_READ_PROCESSED: + /* The previous byte made it to the bus, get next one */ + slave_p->buff_idx++; + /* fallthrough */ + break; + case FI2C_EVT_SLAVE_READ_REQUESTED: + *val = slave_p->buff[slave_p->buff_idx++]; + break; + case FI2C_EVT_SLAVE_STOP: + case FI2C_EVT_SLAVE_WRITE_REQUESTED: + slave_p->first_write = TRUE; + break; + default: + break; + } + + return; +} + +/** + * @name: FI2cSlaveWriteReceived + * @msg: Slave收到主机发送的数据,需要存下 + * @return {*} 无 + * @param {void} *instance_p + * @param {void} *para + */ +void FI2cOsSlaveWriteReceived(void *instance_p, void *para) +{ + FI2cOsSlaveCb(instance_p, para, FI2C_EVT_SLAVE_WRITE_RECEIVED); +} + +/** + * @name: FI2cSlaveReadProcessed + * @msg: 在Slave发送模式下,发送完数据的最后一个字节后,在规定时间内没有收到 Master 端的回应 + * @return {*} 无 + * @param {void} *instance_p + * @param {void} *para + */ +void FI2cOsSlaveReadProcessed(void *instance_p, void *para) +{ + FI2cOsSlaveCb(instance_p, para, FI2C_EVT_SLAVE_READ_PROCESSED); +} + +/** + * @name: FI2cSlaveReadRequest + * @msg: slave收到主机读取内容的请求 + * @return {*} 无 + * @param {void} *instance_p + * @param {void} *para + */ +void FI2cOsSlaveReadRequest(void *instance_p, void *para) +{ + FI2cOsSlaveCb(instance_p, para, FI2C_EVT_SLAVE_READ_REQUESTED); +} + +/** + * @name: FI2cSlaveStop + * @msg: I2C总线接口上是否产生了STOP。与控制器工作在Master模式还是 Slave 模式无关。 + * @return {*} + * @param {void} *instance_p + * @param {void} *para + */ +void FI2cOsSlaveStop(void *instance_p, void *para) +{ + FI2cOsSlaveCb(instance_p, para, FI2C_EVT_SLAVE_STOP); +} + +/** + * @name: FI2cSlaveWriteRequest + * @msg: slave收到主机发送的写请求 + * @return {*} + * @param {void} *instance_p + * @param {void} *para + */ +void FI2cOsSlaveWriteRequest(void *instance_p, void *para) +{ + FI2cOsSlaveCb(instance_p, para, FI2C_EVT_SLAVE_WRITE_REQUESTED); +} + +/* + * @name: FI2cIntrTxDone + * @msg:user transmit FIFO done interrupt callback. + * @param {void} *instance_p + */ +static void FI2cIntrTxDonecallback(void *instance, void *param) +{ + BaseType_t x_result = pdFALSE; + BaseType_t xhigher_priority_task_woken = pdFALSE; + + FI2c *instance_p = (FI2c *)instance; + x_result = xEventGroupSetBitsFromISR(os_i2c_master[instance_p->config.instance_id].trx_event,RTOS_I2C_WRITE_DONE,&xhigher_priority_task_woken); + if (x_result != pdFAIL) + { + portYIELD_FROM_ISR(xhigher_priority_task_woken); + } +} + +/* + * @name: FI2cIntrRxDonecallback + * @msg:user receive fifo level done interrupt callback. + * @param {void} *instance_p + */ +static void FI2cIntrRxDonecallback(void *instance, void *param) +{ + BaseType_t x_result = pdFALSE; + BaseType_t xhigher_priority_task_woken = pdFALSE; + + FI2c *instance_p = (FI2c *)instance; + x_result = xEventGroupSetBitsFromISR(os_i2c_master[instance_p->config.instance_id].trx_event,RTOS_I2C_READ_DONE,&xhigher_priority_task_woken); + if (x_result != pdFAIL) + { + portYIELD_FROM_ISR(xhigher_priority_task_woken); + } +} + +/* + * @name: FI2cIntrTxAbrtcallback + * @msg:user transmit abort interrupt callback. + * @param {void} *instance_p + */ +static void FI2cIntrTxAbrtcallback(void *instance, void *param) +{ + BaseType_t x_result = pdFALSE; + BaseType_t xhigher_priority_task_woken = pdFALSE; + + FI2c *instance_p = (FI2c *)instance; + x_result = xEventGroupSetBitsFromISR(os_i2c_master[instance_p->config.instance_id].trx_event,RTOS_I2C_TRANS_ABORTED,&xhigher_priority_task_woken); + if (x_result != pdFAIL) + { + portYIELD_FROM_ISR(xhigher_priority_task_woken); + } +} + + +static void I2cSlaveTask(void *pvParameters) +{ + const char *pcTaskName = "\r\n*****I2cSlaveTask is running...\r\n"; + const TickType_t xDelay = pdMS_TO_TICKS(TASK_DELAY_MS); + vTaskDelay(xDelay); + FError ret = FREERTOS_I2C_SUCCESS; + + /* The FFreeRTOSI2c to use is passed in via the parameter. + Cast this to a FFreeRTOSI2c pointer. */ + FFreeRTOSI2c *os_i2c_write_p = ( FFreeRTOSI2c * ) pvParameters; + + while (1) + { + vTaskDelay(xDelay); + vPrintf( pcTaskName ); + /* 获取到信号,打印内存块 */ + FFreeRTOSI2cSlaveDump(os_i2c_write_p); + } +} + +static void I2cReadTask(void *pvParameters) +{ + const TickType_t xDelay = pdMS_TO_TICKS(TASK_DELAY_MS); + vTaskDelay(xDelay); + const char *pcReadTaskName = "\r\n*****I2cReadTask is running...\r\n"; + vPrintf( pcReadTaskName ); + FError ret = FREERTOS_I2C_SUCCESS; + + /* Master mode for send or receive data */ + FFreeRTOSI2cMessage message; + + /* The FFreeRTOSI2c to use is passed in via the parameter. + Cast this to a FFreeRTOSI2c pointer. */ + FFreeRTOSI2c *os_i2c_read_p = ( FFreeRTOSI2c * ) pvParameters; + + message.slave_addr = os_i2c_read_p->i2c_device.config.slave_addr; +#if defined(CONFIG_TARGET_D2000) || defined(CONFIG_TARGET_F2000_4) + /*8位地址*/ + message.mem_byte_len = 1; + message.mem_addr = 0x1;/* 地址偏移0x1的位置poll方式读取数据 */ + message.buf_length = DAT_LENGTH; + message.buf = data_r0; + message.mode = FI2C_READ_DATA_POLL; + + ret = FFreeRTOSI2cTransfer(os_i2c_read_p, &message); + if (ret != FREERTOS_I2C_SUCCESS) + { + vPrintf("FFreeRTOSI2cTransfer read poll task error,i2c id:%d.\r\n", os_i2c_read_p->i2c_device.config.instance_id); + } + message.mem_addr = 0x31;/* 地址偏移0x35的位置poll方式读取数据 */ + message.buf = data_r1; + message.buf_length = DAT_LENGTH; + ret = FFreeRTOSI2cTransfer(os_i2c_read_p, &message); + if (ret != FREERTOS_I2C_SUCCESS) + { + vPrintf("FFreeRTOSI2cTransfer read poll task error,i2c id:%d.\r\n", os_i2c_read_p->i2c_device.config.instance_id); + } + vPrintf("data_r0:\r\n"); + FtDumpHexByte(data_r0,DAT_LENGTH); + vPrintf("data_r1:\r\n"); + FtDumpHexByte(data_r1,DAT_LENGTH); + vPrintf("\r\nI2cReadTask over.\r\n"); +#endif +#if defined(CONFIG_TARGET_E2000) + message.mem_byte_len = 1; + message.mem_addr = 0x0;/* 地址偏移0x0的位置poll方式读取数据 */ + message.buf_length = 7; + message.buf = data_r0; + message.mode = FI2C_READ_DATA_POLL; + + ret = FFreeRTOSI2cTransfer(os_i2c_read_p, &message); + if (ret != FREERTOS_I2C_SUCCESS) + { + vPrintf("FFreeRTOSI2cTransfer read poll task error,i2c id:%d.\r\n", os_i2c_read_p->i2c_device.config.instance_id); + } + u16 year; + if (data_r0[5] & 0x80) + year = BCD_TO_BIN (data_r0[6]) + 2000; + else + year = BCD_TO_BIN (data_r0[6]) + 1900; + printf("date_time: %d-%d-%d week:%d time:%d:%d:%d\r\n", + year, + BCD_TO_BIN (data_r0[5] & 0x1F), + BCD_TO_BIN (data_r0[4] & 0x3F), + BCD_TO_BIN ((data_r0[3] - 1) & 0x7), + BCD_TO_BIN (data_r0[2] & 0x3F), + BCD_TO_BIN (data_r0[1] & 0x7F), + BCD_TO_BIN (data_r0[0] & 0x7F) + ); + vTaskDelay(xDelay); +#endif + FFreeRTOSI2cDeinit(os_i2c_read_p);/*写入再读取完成后去初始化FFreeRTOSI2c主机设置*/ + printf(" I2cReadTask over.\r\n "); + vTaskDelete(NULL); +} + +static void I2cWriteTask(void *pvParameters) +{ + const TickType_t xDelay = pdMS_TO_TICKS(TASK_DELAY_MS); + vTaskDelay(xDelay); + const char *pcWriteTaskName = "\r\n*****I2cWriteTask is running...\r\n"; + vPrintf( pcWriteTaskName ); + FError ret = FREERTOS_I2C_SUCCESS; + u8 i; + /* Master mode for send or receive data */ + FFreeRTOSI2cMessage message; + + /* The FFreeRTOSI2c to use is passed in via the parameter. + Cast this to a FFreeRTOSI2c pointer. */ + FFreeRTOSI2c *os_i2c_write_p = ( FFreeRTOSI2c * ) pvParameters; + + message.slave_addr = os_i2c_write_p->i2c_device.config.slave_addr; +#if defined(CONFIG_TARGET_D2000) || defined(CONFIG_TARGET_F2000_4) + for (i = 0; i < DAT_LENGTH; i++) + { + data_w[i] = i ; + } + /*8位地址*/ + message.mem_byte_len = 1; + message.buf = data_w; + message.buf_length = DAT_LENGTH; + message.mem_addr = 0x01;/* 地址偏移0x1的位置poll方式写入数据 */ + message.mode = FI2C_WRITE_DATA_POLL; + ret = FFreeRTOSI2cTransfer(os_i2c_write_p, &message); + if (ret != FREERTOS_I2C_SUCCESS) + { + vPrintf("FFreeRTOSI2cTransfer write poll task error,i2c id:%d.\r\n", os_i2c_write_p->i2c_device.config.instance_id); + } + + message.mem_addr = 0x31;/* 地址偏移0x35的位置poll方式写入数据 */ + ret = FFreeRTOSI2cTransfer(os_i2c_write_p, &message); + if (ret != FREERTOS_I2C_SUCCESS) + { + vPrintf("FFreeRTOSI2cTransfer write poll task error,i2c id:%d.\r\n", os_i2c_write_p->i2c_device.config.instance_id); + } +#endif +#if defined(CONFIG_TARGET_E2000) + /*RTC*/ + data_w[0] = BIN_TO_BCD(20) ;/*second*/ + data_w[1] = BIN_TO_BCD(20) ;/*minute*/ + data_w[2] = BIN_TO_BCD(20) ;/*hour*/ + data_w[3] = BIN_TO_BCD(2+1) ;/*weekday2 + 1*/ + data_w[4] = BIN_TO_BCD(15) ;/*day_of_month*/ + + data_w[5] = (BIN_TO_BCD (11) | 0x80);/* 2000 -> (* | 0x80) , 1900 -> (* | 0x0) */ + data_w[6] = BIN_TO_BCD (2022 % 100) ; + /*8位地址*/ + message.mem_byte_len = 1; + message.buf = data_w; + message.buf_length = 7; + message.mem_addr = 0x0;/* 地址偏移0x0的位置poll方式写入数据 */ + message.mode = FI2C_WRITE_DATA_POLL; + ret = FFreeRTOSI2cTransfer(os_i2c_write_p, &message); + if (ret != FREERTOS_I2C_SUCCESS) + { + vPrintf("FFreeRTOSI2cTransfer write poll task error,i2c id:%d.\r\n", os_i2c_write_p->i2c_device.config.instance_id); + } +#endif + printf(" I2cWriteTask over.\r\n "); + vTaskDelete(NULL); +} + +static FError FFreeRTOSI2cInitSet(uint32_t id,uint32_t work_mode,uint32_t slave_address) +{ + FError err; + /* init i2c controller */ + if (work_mode == FI2C_MASTER) /* 主机初始化默认使用poll模式 */ + { + os_i2c_master = FFreeRTOSI2cInit(id, work_mode, slave_address, FI2C_SPEED_STANDARD_RATE); + /* register intr callback */ + InterruptInstall(os_i2c_master->i2c_device.config.irq_num,FI2cMasterIntrHandler,&os_i2c_master->i2c_device,"fi2cmaster"); + /* register intr handler func */ + FI2cMasterRegisterIntrHandler(&os_i2c_master->i2c_device, FI2C_EVT_MASTER_TRANS_ABORTED, FI2cIntrTxAbrtcallback); + FI2cMasterRegisterIntrHandler(&os_i2c_master->i2c_device, FI2C_EVT_MASTER_READ_DONE, FI2cIntrRxDonecallback); + FI2cMasterRegisterIntrHandler(&os_i2c_master->i2c_device, FI2C_EVT_MASTER_WRITE_DONE, FI2cIntrTxDonecallback); + } + else if (work_mode == FI2C_SLAVE) + { + os_i2c_slave = FFreeRTOSI2cInit(id, work_mode, slave_address, FI2C_SPEED_STANDARD_RATE); + /* register intr callback */ + InterruptInstall(os_i2c_slave->i2c_device.config.irq_num,FI2cSlaveIntrHandler,&os_i2c_slave->i2c_device,"fi2cslave"); + /* slave mode intr set,must set before master data come in. */ + err = FI2cSlaveSetupIntr(&os_i2c_slave->i2c_device); + if (err != FREERTOS_I2C_SUCCESS) + { + vPrintf("I2c slave intr init failed.\r\n"); + return FREERTOS_I2C_INVAL_STATE_ERROR; + } + FI2cSlaveData *slave_p = &slave; + memset(slave_p, 0, sizeof(*slave_p)); + slave_p->first_write = TRUE; + FI2cSlaveRegisterIntrHandler(&os_i2c_slave->i2c_device, FI2C_EVT_SLAVE_WRITE_RECEIVED, FI2cOsSlaveWriteReceived); + FI2cSlaveRegisterIntrHandler(&os_i2c_slave->i2c_device, FI2C_EVT_SLAVE_READ_PROCESSED, FI2cOsSlaveReadProcessed); + FI2cSlaveRegisterIntrHandler(&os_i2c_slave->i2c_device, FI2C_EVT_SLAVE_READ_REQUESTED, FI2cOsSlaveReadRequest); + FI2cSlaveRegisterIntrHandler(&os_i2c_slave->i2c_device, FI2C_EVT_SLAVE_STOP, FI2cOsSlaveStop); + FI2cSlaveRegisterIntrHandler(&os_i2c_slave->i2c_device, FI2C_EVT_SLAVE_WRITE_REQUESTED, FI2cOsSlaveWriteRequest); + } + return FREERTOS_I2C_SUCCESS; +} + +static void I2cInitTask(void *pvParameters) +{ + FError err; + BaseType_t xReturn = pdPASS; + + taskENTER_CRITICAL(); //进入临界区 +#if defined(CONFIG_TARGET_E2000) + err = FFreeRTOSI2cInitSet(FMIO9_ID,FI2C_MASTER,RTC_ADDR); + if (err != FREERTOS_I2C_SUCCESS) + { + vPrintf("I2c FFreeRTOSI2cInitSet failed.\r\n"); + return; + } + + xReturn = xTaskCreate((TaskFunction_t )I2cReadTask, /* 任务入口函数 */ + (const char* )"I2cReadTask",/* 任务名字 */ + (uint16_t )1024, /* 任务栈大小 */ + (void* )os_i2c_master,/* 任务入口函数参数 */ + (UBaseType_t )configMAX_PRIORITIES-2, /* 任务的优先级 */ + (TaskHandle_t* )&read_handle); /* 任务控制 */ + FASSERT_MSG(xReturn == pdPASS,"I2cReadTask create is failed"); + + xReturn = xTaskCreate((TaskFunction_t )I2cWriteTask, /* 任务入口函数 */ + (const char* )"I2cWriteTask",/* 任务名字 */ + (uint16_t )1024, /* 任务栈大小 */ + (void* )os_i2c_master,/* 任务入口函数参数 */ + (UBaseType_t )configMAX_PRIORITIES-1, /* 任务的优先级 */ + (TaskHandle_t* )&write_handle); /* 任务控制 */ + FASSERT_MSG(xReturn == pdPASS,"I2cWriteTask create is failed"); +#endif +#if defined(CONFIG_TARGET_D2000) + err = FFreeRTOSI2cInitSet(FI2C0_ID,FI2C_MASTER,MASTER_SLAVE_ADDR); + if (err != FREERTOS_I2C_SUCCESS) + { + vPrintf("I2c FFreeRTOSI2cInitSet failed.\r\n"); + return; + } + + err = FFreeRTOSI2cInitSet(FI2C2_ID,FI2C_SLAVE,MASTER_SLAVE_ADDR); + if (err != FREERTOS_I2C_SUCCESS) + { + vPrintf("I2c FFreeRTOSI2cInitSet failed.\r\n"); + return; + } + + xReturn = xTaskCreate((TaskFunction_t )I2cReadTask, /* 任务入口函数 */ + (const char* )"I2cReadTask",/* 任务名字 */ + (uint16_t )1024, /* 任务栈大小 */ + (void* )os_i2c_master,/* 任务入口函数参数 */ + (UBaseType_t )configMAX_PRIORITIES-3, /* 任务的优先级 */ + (TaskHandle_t* )&read_handle); /* 任务控制 */ + FASSERT_MSG(xReturn == pdPASS,"I2cReadTask create is failed"); + + xReturn = xTaskCreate((TaskFunction_t )I2cWriteTask, /* 任务入口函数 */ + (const char* )"I2cWriteTask",/* 任务名字 */ + (uint16_t )1024, /* 任务栈大小 */ + (void* )os_i2c_master,/* 任务入口函数参数 */ + (UBaseType_t )configMAX_PRIORITIES-1, /* 任务的优先级 */ + (TaskHandle_t* )&write_handle); /* 任务控制 */ + FASSERT_MSG(xReturn == pdPASS,"I2cWriteTask create is failed"); + + xReturn = xTaskCreate((TaskFunction_t )I2cSlaveTask, /* 任务入口函数 */ + (const char* )"I2cSlaveTask",/* 任务名字 */ + (uint16_t )1024, /* 任务栈大小 */ + (void* )os_i2c_slave,/* 任务入口函数参数 */ + (UBaseType_t )configMAX_PRIORITIES-2, /* 任务的优先级 */ + (TaskHandle_t* )&slave_handle); /* 任务控制 */ + FASSERT_MSG(xReturn == pdPASS,"I2cSlaveTask create is failed"); +#endif +#if defined(CONFIG_TARGET_F2000_4) + err = FFreeRTOSI2cInitSet(FI2C0_ID,FI2C_MASTER,EEPROM_ADDR); + if (err != FREERTOS_I2C_SUCCESS) + { + vPrintf("I2c FFreeRTOSI2cInitSet failed.\r\n"); + return; + } + xReturn = xTaskCreate((TaskFunction_t )I2cReadTask, /* 任务入口函数 */ + (const char* )"I2cReadTask",/* 任务名字 */ + (uint16_t )1024, /* 任务栈大小 */ + (void* )os_i2c_master,/* 任务入口函数参数 */ + (UBaseType_t )configMAX_PRIORITIES-2, /* 任务的优先级 */ + (TaskHandle_t* )&read_handle); /* 任务控制 */ + FASSERT_MSG(xReturn == pdPASS,"I2cReadTask create is failed"); + + xReturn = xTaskCreate((TaskFunction_t )I2cWriteTask, /* 任务入口函数 */ + (const char* )"I2cWriteTask",/* 任务名字 */ + (uint16_t )1024, /* 任务栈大小 */ + (void* )os_i2c_master,/* 任务入口函数参数 */ + (UBaseType_t )configMAX_PRIORITIES-1, /* 任务的优先级 */ + (TaskHandle_t* )&write_handle); /* 任务控制 */ + FASSERT_MSG(xReturn == pdPASS,"I2cWriteTask create is failed"); +#endif + taskEXIT_CRITICAL(); //退出临界区 + vTaskDelete(NULL); +} + +BaseType_t FFreeRTOSI2cCreate(void) +{ + BaseType_t xReturn = pdPASS;/* 定义一个创建信息返回值,默认为 pdPASS */ + BaseType_t xTimerStarted = pdPASS; + + taskENTER_CRITICAL(); //进入临界区 + + xReturn = xTaskCreate((TaskFunction_t )I2cInitTask, /* 任务入口函数 */ + (const char* )"I2cInitTask",/* 任务名字 */ + (uint16_t )1024, /* 任务栈大小 */ + (void* )NULL,/* 任务入口函数参数 */ + (UBaseType_t )configMAX_PRIORITIES, /* 任务的优先级 */ + (TaskHandle_t* )&init_handle); /* 任务控制 */ + FASSERT_MSG(xReturn == pdPASS,"I2cInitTask create is failed"); + + taskEXIT_CRITICAL(); //退出临界区 + printf("i2c task creat ok.\r\n"); + return xReturn; +} + diff --git a/example/peripheral/pwm/configs/e2000d_aarch32_eg_configs b/example/peripheral/pwm/configs/e2000d_aarch32_eg_configs index 9bd36081bc7bc7424040f2e80f5b792aea113732..cccaea1bd497f8dbb7f36ca970b740b6218f556f 100644 --- a/example/peripheral/pwm/configs/e2000d_aarch32_eg_configs +++ b/example/peripheral/pwm/configs/e2000d_aarch32_eg_configs @@ -118,6 +118,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -175,12 +184,6 @@ CONFIG_FREERTOS_USE_PWM=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -192,14 +195,33 @@ CONFIG_FREERTOS_USE_PWM=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -217,4 +239,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/pwm/configs/e2000d_aarch64_eg_configs b/example/peripheral/pwm/configs/e2000d_aarch64_eg_configs index e81dc2b5ad8bfd6d0c3d528a5000d73b8903fbba..1989a6ddcedd732d70346966da4b4bb99ff39ee7 100644 --- a/example/peripheral/pwm/configs/e2000d_aarch64_eg_configs +++ b/example/peripheral/pwm/configs/e2000d_aarch64_eg_configs @@ -114,6 +114,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -171,12 +180,6 @@ CONFIG_FREERTOS_USE_PWM=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -188,14 +191,33 @@ CONFIG_FREERTOS_USE_PWM=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -213,4 +235,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/pwm/configs/e2000q_aarch32_eg_configs b/example/peripheral/pwm/configs/e2000q_aarch32_eg_configs index 9f79adf5c1d22e689112f7d650fede1ad2e875db..cd4f947cb778095f073dc317791a11f17bb1c7d6 100644 --- a/example/peripheral/pwm/configs/e2000q_aarch32_eg_configs +++ b/example/peripheral/pwm/configs/e2000q_aarch32_eg_configs @@ -118,6 +118,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -175,12 +184,6 @@ CONFIG_FREERTOS_USE_PWM=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -192,14 +195,33 @@ CONFIG_FREERTOS_USE_PWM=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -217,4 +239,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/pwm/configs/e2000q_aarch64_eg_configs b/example/peripheral/pwm/configs/e2000q_aarch64_eg_configs index ef77db983eb4e8267b1349ee889b729874db6990..25df10ad12051a42661982e285223684cdfcc83b 100644 --- a/example/peripheral/pwm/configs/e2000q_aarch64_eg_configs +++ b/example/peripheral/pwm/configs/e2000q_aarch64_eg_configs @@ -114,6 +114,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -171,12 +180,6 @@ CONFIG_FREERTOS_USE_PWM=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -188,14 +191,33 @@ CONFIG_FREERTOS_USE_PWM=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -213,4 +235,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/pwm/sdkconfig b/example/peripheral/pwm/sdkconfig index ef77db983eb4e8267b1349ee889b729874db6990..25df10ad12051a42661982e285223684cdfcc83b 100644 --- a/example/peripheral/pwm/sdkconfig +++ b/example/peripheral/pwm/sdkconfig @@ -114,6 +114,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -171,12 +180,6 @@ CONFIG_FREERTOS_USE_PWM=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -188,14 +191,33 @@ CONFIG_FREERTOS_USE_PWM=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -213,4 +235,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/pwm/sdkconfig.h b/example/peripheral/pwm/sdkconfig.h index 8aeb473bcd156fa5ccbea02bf6ad56b71f807958..a9e405cd136b91892b553db979d63addb5b79a8b 100644 --- a/example/peripheral/pwm/sdkconfig.h +++ b/example/peripheral/pwm/sdkconfig.h @@ -103,6 +103,12 @@ /* Compiler Options */ +/* Cross-Compiler Setting */ + +#define CONFIG_GCC_OPTIMIZE_LEVEL 0 +/* CONFIG_USE_EXT_COMPILER is not set */ +/* CONFIG_USE_KLIN_SYS is not set */ +/* end of Cross-Compiler Setting */ #define CONFIG_OUTPUT_BINARY /* end of Compiler Options */ /* end of Building Option */ @@ -150,11 +156,6 @@ /* CONFIG_FREERTOS_USE_FGDMA is not set */ /* end of Freertos DMA Drivers */ -/* Freertos MMC Drivers */ - -/* CONFIG_FREERTOS_USE_FSDIO is not set */ -/* end of Freertos MMC Drivers */ - /* Freertos Adc Drivers */ /* CONFIG_FREERTOS_USE_ADC is not set */ @@ -164,13 +165,29 @@ /* CONFIG_FREERTOS_USE_CAN is not set */ /* end of Freertos Can Drivers */ + +/* Freertos I2c Drivers */ + +/* CONFIG_FREERTOS_USE_I2C is not set */ +/* end of Freertos I2c Drivers */ + +/* Freertos Mio Drivers */ + +/* CONFIG_FREERTOS_USE_MIO is not set */ +/* end of Freertos Mio Drivers */ + +/* Freertos Timer Drivers */ + +/* CONFIG_FREERTOS_USE_TIMER is not set */ +/* end of Freertos Timer Drivers */ /* end of Component Configuration */ -/* FreeRTOS Setting */ +/* Third-Party Configuration */ /* CONFIG_USE_LWIP is not set */ #define CONFIG_USE_BACKTRACE /* CONFIG_USE_FATFS is not set */ +/* CONFIG_USE_FATFS_0_1_4 is not set */ /* CONFIG_USE_SFUD is not set */ /* CONFIG_USE_SPIFFS is not set */ /* CONFIG_USE_AMP is not set */ @@ -186,6 +203,27 @@ #define CONFIG_USE_TLSF /* CONFIG_USE_SDMMC_CMD is not set */ /* CONFIG_USE_CHERRY_USB is not set */ -/* end of FreeRTOS Setting */ +/* end of Third-Party Configuration */ + +/* Kernel Configuration */ + +#define CONFIG_FREERTOS_OPTIMIZED_SCHEDULER +#define CONFIG_FREERTOS_HZ 1000 +#define CONFIG_FREERTOS_MAX_PRIORITIES 32 +#define CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES 13 +#define CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES 11 +#define CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS 1 +#define CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE 1024 +#define CONFIG_FREERTOS_MAX_TASK_NAME_LEN 32 +#define CONFIG_FREERTOS_TIMER_TASK_PRIORITY 1 +#define CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH 2048 +#define CONFIG_FREERTOS_TIMER_QUEUE_LENGTH 10 +#define CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE 0 +#define CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS +#define CONFIG_FREERTOS_USE_TRACE_FACILITY +#define CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS +/* CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set */ +#define CONFIG_FREERTOS_TOTAL_HEAP_SIZE 10240 +/* end of Kernel Configuration */ #endif diff --git a/example/peripheral/pwm/src/pwm_example.c b/example/peripheral/pwm/src/pwm_example.c index 498847454c19832d18e95481363ad270b0caf6e5..227a4240aa5a9aa4df56b34b9c058caeb614522c 100644 --- a/example/peripheral/pwm/src/pwm_example.c +++ b/example/peripheral/pwm/src/pwm_example.c @@ -172,7 +172,7 @@ static void prvOneShotTimerCallback( TimerHandle_t xTimer ) /* create pwm test, id is pwm module number */ BaseType_t FFreeRTOSPwmCreate(u32 id) { - FASSERT(id < FPWM_INSTANCE_NUM); + FASSERT(id < FPWM_NUM); BaseType_t xReturn = pdPASS;/* 定义一个创建信息返回值,默认为 pdPASS */ BaseType_t xTimerStarted = pdPASS; diff --git a/example/peripheral/qspi/configs/d2000_aarch32_eg_configs b/example/peripheral/qspi/configs/d2000_aarch32_eg_configs index 0ac4198f3a331bbf70e2f4f9ed2b05fe1d022d60..7bfadc5cf7dc9478848c2d4bf40f95e60d835d16 100644 --- a/example/peripheral/qspi/configs/d2000_aarch32_eg_configs +++ b/example/peripheral/qspi/configs/d2000_aarch32_eg_configs @@ -118,6 +118,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -175,12 +184,6 @@ CONFIG_FREERTOS_USE_QSPI=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -192,14 +195,33 @@ CONFIG_FREERTOS_USE_QSPI=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -217,4 +239,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/qspi/configs/d2000_aarch64_eg_configs b/example/peripheral/qspi/configs/d2000_aarch64_eg_configs index 6faa0f1e9ca93493f41fbf0fa31ae08a416bdf85..319f09c3aad8f50a59917b29c26ca137aa0dd96b 100644 --- a/example/peripheral/qspi/configs/d2000_aarch64_eg_configs +++ b/example/peripheral/qspi/configs/d2000_aarch64_eg_configs @@ -114,6 +114,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -171,12 +180,6 @@ CONFIG_FREERTOS_USE_QSPI=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -188,14 +191,33 @@ CONFIG_FREERTOS_USE_QSPI=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -213,4 +235,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/qspi/configs/e2000d_aarch32_eg_configs b/example/peripheral/qspi/configs/e2000d_aarch32_eg_configs index e7bdc8d602bb137dff5510efdee04b6eea47fa5d..76021c7b3ddad169f66e44ae3ddee2e89cbeac06 100644 --- a/example/peripheral/qspi/configs/e2000d_aarch32_eg_configs +++ b/example/peripheral/qspi/configs/e2000d_aarch32_eg_configs @@ -118,6 +118,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -175,12 +184,6 @@ CONFIG_FREERTOS_USE_QSPI=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -192,14 +195,33 @@ CONFIG_FREERTOS_USE_QSPI=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -217,4 +239,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/qspi/configs/e2000d_aarch64_eg_configs b/example/peripheral/qspi/configs/e2000d_aarch64_eg_configs index ccbd39b3065b09a820e0e0726cad7bf93be433d1..2d499f1c20c75185c30d78622786f149fe27c71d 100644 --- a/example/peripheral/qspi/configs/e2000d_aarch64_eg_configs +++ b/example/peripheral/qspi/configs/e2000d_aarch64_eg_configs @@ -114,6 +114,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -171,12 +180,6 @@ CONFIG_FREERTOS_USE_QSPI=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -188,14 +191,33 @@ CONFIG_FREERTOS_USE_QSPI=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -213,4 +235,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/qspi/configs/e2000q_aarch32_eg_configs b/example/peripheral/qspi/configs/e2000q_aarch32_eg_configs index 3e11d71513f89c6d7f98f5e1a63fd6be1fad8216..88678ccdbf418bb8ac70f35b1b282cdf5d7c44e5 100644 --- a/example/peripheral/qspi/configs/e2000q_aarch32_eg_configs +++ b/example/peripheral/qspi/configs/e2000q_aarch32_eg_configs @@ -118,6 +118,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -175,12 +184,6 @@ CONFIG_FREERTOS_USE_QSPI=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -192,14 +195,33 @@ CONFIG_FREERTOS_USE_QSPI=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -217,4 +239,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/qspi/configs/e2000q_aarch64_eg_configs b/example/peripheral/qspi/configs/e2000q_aarch64_eg_configs index 1dab65cf6d4a2c2d344529a816f7e9be75fd05a3..c94db1f1c6544b6032b17c334ed0ed75fb1f9da8 100644 --- a/example/peripheral/qspi/configs/e2000q_aarch64_eg_configs +++ b/example/peripheral/qspi/configs/e2000q_aarch64_eg_configs @@ -114,6 +114,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -171,12 +180,6 @@ CONFIG_FREERTOS_USE_QSPI=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -188,14 +191,33 @@ CONFIG_FREERTOS_USE_QSPI=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -213,4 +235,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/qspi/configs/ft2004_aarch32_eg_configs b/example/peripheral/qspi/configs/ft2004_aarch32_eg_configs index 5972fdd0ac0a0408cab3bc5effc9f90fff229d7a..c172a180c4a16a145879ba0c26a144acaf9771b8 100644 --- a/example/peripheral/qspi/configs/ft2004_aarch32_eg_configs +++ b/example/peripheral/qspi/configs/ft2004_aarch32_eg_configs @@ -118,6 +118,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -175,12 +184,6 @@ CONFIG_FREERTOS_USE_QSPI=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -192,14 +195,33 @@ CONFIG_FREERTOS_USE_QSPI=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -217,4 +239,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/qspi/configs/ft2004_aarch64_eg_configs b/example/peripheral/qspi/configs/ft2004_aarch64_eg_configs index 8bd0df2626fe1368cacf2ac8c3e8af1778231aae..2b38cc99e0fc378a28388ddc731bbbb61d78ec3a 100644 --- a/example/peripheral/qspi/configs/ft2004_aarch64_eg_configs +++ b/example/peripheral/qspi/configs/ft2004_aarch64_eg_configs @@ -114,6 +114,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -171,12 +180,6 @@ CONFIG_FREERTOS_USE_QSPI=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -188,14 +191,33 @@ CONFIG_FREERTOS_USE_QSPI=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -213,4 +235,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/qspi/sdkconfig b/example/peripheral/qspi/sdkconfig index 1dab65cf6d4a2c2d344529a816f7e9be75fd05a3..c94db1f1c6544b6032b17c334ed0ed75fb1f9da8 100644 --- a/example/peripheral/qspi/sdkconfig +++ b/example/peripheral/qspi/sdkconfig @@ -114,6 +114,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -171,12 +180,6 @@ CONFIG_FREERTOS_USE_QSPI=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -188,14 +191,33 @@ CONFIG_FREERTOS_USE_QSPI=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -213,4 +235,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/qspi/sdkconfig.h b/example/peripheral/qspi/sdkconfig.h index 39b0c06c54f38e6c639ac99c6511cf88dbac6fad..cfdc319a9b1e5b333d08b6201fd669424f799172 100644 --- a/example/peripheral/qspi/sdkconfig.h +++ b/example/peripheral/qspi/sdkconfig.h @@ -103,6 +103,12 @@ /* Compiler Options */ +/* Cross-Compiler Setting */ + +#define CONFIG_GCC_OPTIMIZE_LEVEL 0 +/* CONFIG_USE_EXT_COMPILER is not set */ +/* CONFIG_USE_KLIN_SYS is not set */ +/* end of Cross-Compiler Setting */ #define CONFIG_OUTPUT_BINARY /* end of Compiler Options */ /* end of Building Option */ @@ -150,11 +156,6 @@ /* CONFIG_FREERTOS_USE_FGDMA is not set */ /* end of Freertos DMA Drivers */ -/* Freertos MMC Drivers */ - -/* CONFIG_FREERTOS_USE_FSDIO is not set */ -/* end of Freertos MMC Drivers */ - /* Freertos Adc Drivers */ /* CONFIG_FREERTOS_USE_ADC is not set */ @@ -164,13 +165,29 @@ /* CONFIG_FREERTOS_USE_CAN is not set */ /* end of Freertos Can Drivers */ + +/* Freertos I2c Drivers */ + +/* CONFIG_FREERTOS_USE_I2C is not set */ +/* end of Freertos I2c Drivers */ + +/* Freertos Mio Drivers */ + +/* CONFIG_FREERTOS_USE_MIO is not set */ +/* end of Freertos Mio Drivers */ + +/* Freertos Timer Drivers */ + +/* CONFIG_FREERTOS_USE_TIMER is not set */ +/* end of Freertos Timer Drivers */ /* end of Component Configuration */ -/* FreeRTOS Setting */ +/* Third-Party Configuration */ /* CONFIG_USE_LWIP is not set */ #define CONFIG_USE_BACKTRACE /* CONFIG_USE_FATFS is not set */ +/* CONFIG_USE_FATFS_0_1_4 is not set */ /* CONFIG_USE_SFUD is not set */ /* CONFIG_USE_SPIFFS is not set */ /* CONFIG_USE_AMP is not set */ @@ -186,6 +203,27 @@ /* CONFIG_USE_TLSF is not set */ /* CONFIG_USE_SDMMC_CMD is not set */ /* CONFIG_USE_CHERRY_USB is not set */ -/* end of FreeRTOS Setting */ +/* end of Third-Party Configuration */ + +/* Kernel Configuration */ + +#define CONFIG_FREERTOS_OPTIMIZED_SCHEDULER +#define CONFIG_FREERTOS_HZ 1000 +#define CONFIG_FREERTOS_MAX_PRIORITIES 32 +#define CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES 13 +#define CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES 11 +#define CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS 1 +#define CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE 1024 +#define CONFIG_FREERTOS_MAX_TASK_NAME_LEN 32 +#define CONFIG_FREERTOS_TIMER_TASK_PRIORITY 1 +#define CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH 2048 +#define CONFIG_FREERTOS_TIMER_QUEUE_LENGTH 10 +#define CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE 0 +#define CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS +#define CONFIG_FREERTOS_USE_TRACE_FACILITY +#define CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS +/* CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set */ +#define CONFIG_FREERTOS_TOTAL_HEAP_SIZE 10240 +/* end of Kernel Configuration */ #endif diff --git a/example/peripheral/sdio/README.md b/example/peripheral/sdio/README.md index df45cc8e8b4ab4d1e21f8ac7e61992acd5ddba5a..e6e011d5ee1c10f92e6604b5d8b762344c0cc615 100644 --- a/example/peripheral/sdio/README.md +++ b/example/peripheral/sdio/README.md @@ -124,7 +124,3 @@ sd wr 0 emmc 7 3 ## 4. 修改历史记录 - - - - diff --git a/example/peripheral/sdio/configs/e2000d_aarch32_eg_configs b/example/peripheral/sdio/configs/e2000d_aarch32_eg_configs index 64f010423407f8111edb094e15b7bb41534c8497..c24fd2a4053d83eaa06f6a4c0956725535a7400e 100644 --- a/example/peripheral/sdio/configs/e2000d_aarch32_eg_configs +++ b/example/peripheral/sdio/configs/e2000d_aarch32_eg_configs @@ -57,6 +57,7 @@ CONFIG_ENABLE_Pl011_UART=y # CONFIG_USE_TIMER is not set # CONFIG_USE_MIO is not set CONFIG_USE_SDMMC=y +# CONFIG_ENABLE_FSDMMC is not set CONFIG_ENABLE_FSDIO=y # CONFIG_USE_PCIE is not set # CONFIG_USE_WDT is not set @@ -112,6 +113,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -169,12 +179,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -CONFIG_FREERTOS_USE_FSDIO=y -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -186,14 +190,33 @@ CONFIG_FREERTOS_USE_FSDIO=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -214,8 +237,31 @@ CONFIG_USE_SDMMC_CMD=y # # SDMMC Configuration # -CONFIG_SDMMC_PORT_FSDIO=y +# CONFIG_SDMMC_USE_FSDMMC is not set +CONFIG_SDMMC_USE_FSDIO=y # end of SDMMC Configuration # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/sdio/configs/e2000d_aarch64_eg_configs b/example/peripheral/sdio/configs/e2000d_aarch64_eg_configs index 24897cad8f728924962ad72119c72c6da7e001fc..3eec1cd3c4ace820cff45df0b08ab849b47a245a 100644 --- a/example/peripheral/sdio/configs/e2000d_aarch64_eg_configs +++ b/example/peripheral/sdio/configs/e2000d_aarch64_eg_configs @@ -57,6 +57,7 @@ CONFIG_ENABLE_Pl011_UART=y # CONFIG_USE_TIMER is not set # CONFIG_USE_MIO is not set CONFIG_USE_SDMMC=y +# CONFIG_ENABLE_FSDMMC is not set CONFIG_ENABLE_FSDIO=y # CONFIG_USE_PCIE is not set # CONFIG_USE_WDT is not set @@ -77,8 +78,8 @@ CONFIG_USE_NEW_LIBC=y # Building Option # # CONFIG_LOG_VERBOS is not set -# CONFIG_LOG_DEBUG is not set -CONFIG_LOG_INFO=y +CONFIG_LOG_DEBUG=y +# CONFIG_LOG_INFO is not set # CONFIG_LOG_WARN is not set # CONFIG_LOG_ERROR is not set # CONFIG_LOG_NONE is not set @@ -108,6 +109,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -165,12 +175,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -CONFIG_FREERTOS_USE_FSDIO=y -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -182,14 +186,33 @@ CONFIG_FREERTOS_USE_FSDIO=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -210,8 +233,31 @@ CONFIG_USE_SDMMC_CMD=y # # SDMMC Configuration # -CONFIG_SDMMC_PORT_FSDIO=y +# CONFIG_SDMMC_USE_FSDMMC is not set +CONFIG_SDMMC_USE_FSDIO=y # end of SDMMC Configuration # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/sdio/configs/e2000q_aarch32_eg_configs b/example/peripheral/sdio/configs/e2000q_aarch32_eg_configs index 76430549524018226909f57a3d90255fbe1a41dc..346939114d750a395c27a10eca6fdfd98cccebfe 100644 --- a/example/peripheral/sdio/configs/e2000q_aarch32_eg_configs +++ b/example/peripheral/sdio/configs/e2000q_aarch32_eg_configs @@ -57,6 +57,7 @@ CONFIG_ENABLE_Pl011_UART=y # CONFIG_USE_TIMER is not set # CONFIG_USE_MIO is not set CONFIG_USE_SDMMC=y +# CONFIG_ENABLE_FSDMMC is not set CONFIG_ENABLE_FSDIO=y # CONFIG_USE_PCIE is not set # CONFIG_USE_WDT is not set @@ -112,6 +113,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -169,12 +179,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -CONFIG_FREERTOS_USE_FSDIO=y -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -186,14 +190,33 @@ CONFIG_FREERTOS_USE_FSDIO=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -214,8 +237,31 @@ CONFIG_USE_SDMMC_CMD=y # # SDMMC Configuration # -CONFIG_SDMMC_PORT_FSDIO=y +# CONFIG_SDMMC_USE_FSDMMC is not set +CONFIG_SDMMC_USE_FSDIO=y # end of SDMMC Configuration # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/sdio/configs/e2000q_aarch64_eg_configs b/example/peripheral/sdio/configs/e2000q_aarch64_eg_configs index c9591ec613c1d356244ec9935fc9035d16438bce..3e9d39d87a2e871b80d510ba85e4af0dbb068b93 100644 --- a/example/peripheral/sdio/configs/e2000q_aarch64_eg_configs +++ b/example/peripheral/sdio/configs/e2000q_aarch64_eg_configs @@ -57,6 +57,7 @@ CONFIG_ENABLE_Pl011_UART=y # CONFIG_USE_TIMER is not set # CONFIG_USE_MIO is not set CONFIG_USE_SDMMC=y +# CONFIG_ENABLE_FSDMMC is not set CONFIG_ENABLE_FSDIO=y # CONFIG_USE_PCIE is not set # CONFIG_USE_WDT is not set @@ -78,9 +79,9 @@ CONFIG_USE_NEW_LIBC=y # # CONFIG_LOG_VERBOS is not set # CONFIG_LOG_DEBUG is not set -CONFIG_LOG_INFO=y +# CONFIG_LOG_INFO is not set # CONFIG_LOG_WARN is not set -# CONFIG_LOG_ERROR is not set +CONFIG_LOG_ERROR=y # CONFIG_LOG_NONE is not set CONFIG_USE_DEFAULT_INTERRUPT_CONFIG=y CONFIG_INTERRUPT_ROLE_MASTER=y @@ -108,6 +109,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -165,12 +175,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -CONFIG_FREERTOS_USE_FSDIO=y -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -182,14 +186,33 @@ CONFIG_FREERTOS_USE_FSDIO=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -210,8 +233,31 @@ CONFIG_USE_SDMMC_CMD=y # # SDMMC Configuration # -CONFIG_SDMMC_PORT_FSDIO=y +# CONFIG_SDMMC_USE_FSDMMC is not set +CONFIG_SDMMC_USE_FSDIO=y # end of SDMMC Configuration # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/sdio/main.c b/example/peripheral/sdio/main.c index e28f6df82d3857f6bc0667dfea786a15d11c2e42..fcefd26861bdc92ec58f48ddb27f640047b91fd2 100644 --- a/example/peripheral/sdio/main.c +++ b/example/peripheral/sdio/main.c @@ -24,6 +24,8 @@ #include "shell.h" #include "shell_port.h" #include +#include "sdmmc_system.h" +#include "sd_read_write.h" int main(void) { @@ -33,10 +35,13 @@ int main(void) if(ret != pdPASS) goto FAIL_EXIT; - /* ret = FFreeRTOSSdWriteRead(1U, FALSE, 0, 2); */ + /* board init */ + sdmmc_sys_init(); - vTaskStartScheduler(); /* 启动任务,开启调度 */ - while (1); /* 正常不会执行到这里 */ + ret = FFreeRTOSSdWriteRead(1U, FALSE, 0, 4); + + vTaskStartScheduler(); + while (1); FAIL_EXIT: printf("failed 0x%x \r\n", ret); diff --git a/example/peripheral/sdio/sdkconfig b/example/peripheral/sdio/sdkconfig index 9a99079bd3671cf2b3ecb273c27d1c4048ae94e6..346939114d750a395c27a10eca6fdfd98cccebfe 100644 --- a/example/peripheral/sdio/sdkconfig +++ b/example/peripheral/sdio/sdkconfig @@ -2,7 +2,7 @@ # # Freertos Configuration # -CONFIG_TARGET_NAME="e2000d_freertos_a64" +CONFIG_TARGET_NAME="e2000q_freertos_a32" # end of Freertos Configuration # @@ -13,12 +13,12 @@ CONFIG_USE_FREERTOS=y # # Arch Configuration # -# CONFIG_TARGET_ARMV8_AARCH32 is not set -CONFIG_TARGET_ARMV8_AARCH64=y +CONFIG_TARGET_ARMV8_AARCH32=y +# CONFIG_TARGET_ARMV8_AARCH64 is not set CONFIG_USE_CACHE=y CONFIG_USE_MMU=y -# CONFIG_USE_SYS_TICK is not set -# CONFIG_MMU_DEBUG_PRINTS is not set +CONFIG_USE_SYS_TICK=y +CONFIG_USE_AARCH64_L1_TO_AARCH32=y # end of Arch Configuration # @@ -26,8 +26,8 @@ CONFIG_USE_MMU=y # # CONFIG_TARGET_F2000_4 is not set # CONFIG_TARGET_D2000 is not set -# CONFIG_TARGET_E2000Q is not set -CONFIG_TARGET_E2000D=y +CONFIG_TARGET_E2000Q=y +# CONFIG_TARGET_E2000D is not set # CONFIG_TARGET_E2000S is not set CONFIG_TARGET_E2000=y CONFIG_DEFAULT_DEBUG_PRINT_UART1=y @@ -57,6 +57,7 @@ CONFIG_ENABLE_Pl011_UART=y # CONFIG_USE_TIMER is not set # CONFIG_USE_MIO is not set CONFIG_USE_SDMMC=y +# CONFIG_ENABLE_FSDMMC is not set CONFIG_ENABLE_FSDIO=y # CONFIG_USE_PCIE is not set # CONFIG_USE_WDT is not set @@ -78,9 +79,9 @@ CONFIG_USE_NEW_LIBC=y # # CONFIG_LOG_VERBOS is not set # CONFIG_LOG_DEBUG is not set -# CONFIG_LOG_INFO is not set +CONFIG_LOG_INFO=y # CONFIG_LOG_WARN is not set -CONFIG_LOG_ERROR=y +# CONFIG_LOG_ERROR is not set # CONFIG_LOG_NONE is not set CONFIG_USE_DEFAULT_INTERRUPT_CONFIG=y CONFIG_INTERRUPT_ROLE_MASTER=y @@ -91,8 +92,8 @@ CONFIG_LOG_EXTRA_INFO=y # # Linker Options # -# CONFIG_AARCH32_RAM_LD is not set -CONFIG_AARCH64_RAM_LD=y +CONFIG_AARCH32_RAM_LD=y +# CONFIG_AARCH64_RAM_LD is not set # CONFIG_USER_DEFINED_LD is not set CONFIG_LINK_SCRIPT_ROM=y CONFIG_ROM_START_UP_ADDR=0x80100000 @@ -101,13 +102,26 @@ CONFIG_LINK_SCRIPT_RAM=y CONFIG_RAM_START_UP_ADDR=0x81000000 CONFIG_RAM_SIZE_MB=64 CONFIG_HEAP_SIZE=1 -CONFIG_STACK_SIZE=0x100000 -CONFIG_FPU_STACK_SIZE=0x1000 +CONFIG_SVC_STACK_SIZE=0x1000 +CONFIG_SYS_STACK_SIZE=0x1000 +CONFIG_IRQ_STACK_SIZE=0x1000 +CONFIG_ABORT_STACK_SIZE=0x1000 +CONFIG_FIQ_STACK_SIZE=0x1000 +CONFIG_UNDEF_STACK_SIZE=0x1000 # end of Linker Options # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -165,12 +179,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -CONFIG_FREERTOS_USE_FSDIO=y -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -182,14 +190,33 @@ CONFIG_FREERTOS_USE_FSDIO=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -210,8 +237,31 @@ CONFIG_USE_SDMMC_CMD=y # # SDMMC Configuration # -CONFIG_SDMMC_PORT_FSDIO=y +# CONFIG_SDMMC_USE_FSDMMC is not set +CONFIG_SDMMC_USE_FSDIO=y # end of SDMMC Configuration # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/sdio/sdkconfig.h b/example/peripheral/sdio/sdkconfig.h index 36c7b85a45f3891e80a027430b15bc11612518a8..b871f89dce2a6fef681fa4aaac4f8299d95137dd 100644 --- a/example/peripheral/sdio/sdkconfig.h +++ b/example/peripheral/sdio/sdkconfig.h @@ -3,7 +3,7 @@ /* Freertos Configuration */ -#define CONFIG_TARGET_NAME "e2000d_freertos_a64" +#define CONFIG_TARGET_NAME "e2000q_freertos_a32" /* end of Freertos Configuration */ /* Standalone Setting */ @@ -12,20 +12,20 @@ /* Arch Configuration */ -/* CONFIG_TARGET_ARMV8_AARCH32 is not set */ -#define CONFIG_TARGET_ARMV8_AARCH64 +#define CONFIG_TARGET_ARMV8_AARCH32 +/* CONFIG_TARGET_ARMV8_AARCH64 is not set */ #define CONFIG_USE_CACHE #define CONFIG_USE_MMU -/* CONFIG_USE_SYS_TICK is not set */ -/* CONFIG_MMU_DEBUG_PRINTS is not set */ +#define CONFIG_USE_SYS_TICK +#define CONFIG_USE_AARCH64_L1_TO_AARCH32 /* end of Arch Configuration */ /* Board Configuration */ /* CONFIG_TARGET_F2000_4 is not set */ /* CONFIG_TARGET_D2000 is not set */ -/* CONFIG_TARGET_E2000Q is not set */ -#define CONFIG_TARGET_E2000D +#define CONFIG_TARGET_E2000Q +/* CONFIG_TARGET_E2000D is not set */ /* CONFIG_TARGET_E2000S is not set */ #define CONFIG_TARGET_E2000 #define CONFIG_DEFAULT_DEBUG_PRINT_UART1 @@ -52,6 +52,7 @@ /* CONFIG_USE_TIMER is not set */ /* CONFIG_USE_MIO is not set */ #define CONFIG_USE_SDMMC +/* CONFIG_ENABLE_FSDMMC is not set */ #define CONFIG_ENABLE_FSDIO /* CONFIG_USE_PCIE is not set */ /* CONFIG_USE_WDT is not set */ @@ -71,9 +72,9 @@ /* CONFIG_LOG_VERBOS is not set */ /* CONFIG_LOG_DEBUG is not set */ -/* CONFIG_LOG_INFO is not set */ +#define CONFIG_LOG_INFO /* CONFIG_LOG_WARN is not set */ -#define CONFIG_LOG_ERROR +/* CONFIG_LOG_ERROR is not set */ /* CONFIG_LOG_NONE is not set */ #define CONFIG_USE_DEFAULT_INTERRUPT_CONFIG #define CONFIG_INTERRUPT_ROLE_MASTER @@ -83,8 +84,8 @@ /* Linker Options */ -/* CONFIG_AARCH32_RAM_LD is not set */ -#define CONFIG_AARCH64_RAM_LD +#define CONFIG_AARCH32_RAM_LD +/* CONFIG_AARCH64_RAM_LD is not set */ /* CONFIG_USER_DEFINED_LD is not set */ #define CONFIG_LINK_SCRIPT_ROM #define CONFIG_ROM_START_UP_ADDR 0x80100000 @@ -93,12 +94,22 @@ #define CONFIG_RAM_START_UP_ADDR 0x81000000 #define CONFIG_RAM_SIZE_MB 64 #define CONFIG_HEAP_SIZE 1 -#define CONFIG_STACK_SIZE 0x100000 -#define CONFIG_FPU_STACK_SIZE 0x1000 +#define CONFIG_SVC_STACK_SIZE 0x1000 +#define CONFIG_SYS_STACK_SIZE 0x1000 +#define CONFIG_IRQ_STACK_SIZE 0x1000 +#define CONFIG_ABORT_STACK_SIZE 0x1000 +#define CONFIG_FIQ_STACK_SIZE 0x1000 +#define CONFIG_UNDEF_STACK_SIZE 0x1000 /* end of Linker Options */ /* Compiler Options */ +/* Cross-Compiler Setting */ + +#define CONFIG_GCC_OPTIMIZE_LEVEL 0 +/* CONFIG_USE_EXT_COMPILER is not set */ +/* CONFIG_USE_KLIN_SYS is not set */ +/* end of Cross-Compiler Setting */ #define CONFIG_OUTPUT_BINARY /* end of Compiler Options */ /* end of Building Option */ @@ -146,11 +157,6 @@ /* CONFIG_FREERTOS_USE_FGDMA is not set */ /* end of Freertos DMA Drivers */ -/* Freertos MMC Drivers */ - -#define CONFIG_FREERTOS_USE_FSDIO -/* end of Freertos MMC Drivers */ - /* Freertos Adc Drivers */ /* CONFIG_FREERTOS_USE_ADC is not set */ @@ -160,13 +166,29 @@ /* CONFIG_FREERTOS_USE_CAN is not set */ /* end of Freertos Can Drivers */ + +/* Freertos I2c Drivers */ + +/* CONFIG_FREERTOS_USE_I2C is not set */ +/* end of Freertos I2c Drivers */ + +/* Freertos Mio Drivers */ + +/* CONFIG_FREERTOS_USE_MIO is not set */ +/* end of Freertos Mio Drivers */ + +/* Freertos Timer Drivers */ + +/* CONFIG_FREERTOS_USE_TIMER is not set */ +/* end of Freertos Timer Drivers */ /* end of Component Configuration */ -/* FreeRTOS Setting */ +/* Third-Party Configuration */ /* CONFIG_USE_LWIP is not set */ #define CONFIG_USE_BACKTRACE /* CONFIG_USE_FATFS is not set */ +/* CONFIG_USE_FATFS_0_1_4 is not set */ /* CONFIG_USE_SFUD is not set */ /* CONFIG_USE_SPIFFS is not set */ /* CONFIG_USE_AMP is not set */ @@ -184,9 +206,31 @@ /* SDMMC Configuration */ -#define CONFIG_SDMMC_PORT_FSDIO +/* CONFIG_SDMMC_USE_FSDMMC is not set */ +#define CONFIG_SDMMC_USE_FSDIO /* end of SDMMC Configuration */ /* CONFIG_USE_CHERRY_USB is not set */ -/* end of FreeRTOS Setting */ +/* end of Third-Party Configuration */ + +/* Kernel Configuration */ + +#define CONFIG_FREERTOS_OPTIMIZED_SCHEDULER +#define CONFIG_FREERTOS_HZ 1000 +#define CONFIG_FREERTOS_MAX_PRIORITIES 32 +#define CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES 13 +#define CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES 11 +#define CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS 1 +#define CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE 1024 +#define CONFIG_FREERTOS_MAX_TASK_NAME_LEN 32 +#define CONFIG_FREERTOS_TIMER_TASK_PRIORITY 1 +#define CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH 2048 +#define CONFIG_FREERTOS_TIMER_QUEUE_LENGTH 10 +#define CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE 0 +#define CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS +#define CONFIG_FREERTOS_USE_TRACE_FACILITY +#define CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS +/* CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set */ +#define CONFIG_FREERTOS_TOTAL_HEAP_SIZE 10240 +/* end of Kernel Configuration */ #endif diff --git a/example/peripheral/sdio/src/cmd_sd.c b/example/peripheral/sdio/src/cmd_sd.c index 253adeb32b6e982660e93be1e5251071c07f2730..f2b8a4b22ba27172a022f0a81f1625d53a282ea2 100644 --- a/example/peripheral/sdio/src/cmd_sd.c +++ b/example/peripheral/sdio/src/cmd_sd.c @@ -60,7 +60,7 @@ static int SdCmdEntry(int argc, char *argv[]) if (!strcmp(argv[1], "wr")) { - u32 sdio_id = FSDIO_HOST_INSTANCE_1; + u32 sdio_id = FSDIO1_ID; boolean is_emmc = FALSE; u32 start_blk = 0U; u32 blk_num = 2U; diff --git a/example/peripheral/sdio/src/sd_read_write.c b/example/peripheral/sdio/src/sd_read_write.c index 61a81f3122c7e4523b2a1726c4d16436534ddf17..2918bac1cae6e082289caa9c0dc76fcbf670ef81 100644 --- a/example/peripheral/sdio/src/sd_read_write.c +++ b/example/peripheral/sdio/src/sd_read_write.c @@ -26,6 +26,7 @@ #include "FreeRTOS.h" #include "task.h" +#include "event_groups.h" #include "fassert.h" #include "fdebug.h" @@ -33,45 +34,41 @@ #include "fkernel.h" #include "fcache.h" -#include "fsdio_os.h" +#include "sdmmc_host_os.h" /************************** Constant Definitions *****************************/ #define SD_WR_BUF_LEN 4096 #define SD_EVT_INIT_DONE (0x1 << 0) #define SD_EVT_WRITE_DONE (0x1 << 1) #define SD_EVT_READ_DONE (0x1 << 2) +/**************************** Type Definitions *******************************/ +typedef struct +{ + sdmmc_host_instance_t *cur_host; + sdmmc_host_config_t *cur_host_config; + fsize_t start_blk; + fsize_t block_num; +} SdioTestInfo; /************************** Variable Definitions *****************************/ static u8 sd_write_buffer[SD_WR_BUF_LEN] = {0}; static u8 sd_read_buffer[SD_WR_BUF_LEN] = {0}; + +static sdmmc_host_instance_t tf_host; +static sdmmc_host_config_t tf_host_config; +static sdmmc_host_instance_t emmc_host; +static sdmmc_host_config_t emmc_host_config; +static SdioTestInfo test_info = +{ + .cur_host = &tf_host, + .cur_host_config = &tf_host_config, + .start_blk = 0U, + .block_num = 4U +}; + static u32 sd_slot = 0U; static EventGroupHandle_t sync = NULL; static TaskHandle_t write_task = NULL; -static TaskHandle_t read_task = NULL; static TimerHandle_t exit_timer = NULL; -static FFreeRTOSSdio *sdio = NULL; -static FFreeRTOSSdioConifg sdio_config = -{ - .en_dma = TRUE, - .medium_type = FFREERTOS_SDIO_MEDIUM_TF, - .card_detect_handler = NULL, - .card_detect_args = NULL -}; -static FFreeRTOSSdioMessage read_message = -{ - .buf = sd_read_buffer, - .buf_len = SD_WR_BUF_LEN, - .start_block = 0U, - .block_num = 3U, - .trans_type = FFREERTOS_SDIO_TRANS_READ -}; -static FFreeRTOSSdioMessage write_message = -{ - .buf = sd_write_buffer, - .buf_len = SD_WR_BUF_LEN, - .start_block = 0U, - .block_num = 3U, - .trans_type = FFREERTOS_SDIO_TRANS_WRITE -}; -static u32 run_times = 3U; +static u32 run_times = 2U; static boolean is_running = FALSE; /***************** Macros (Inline Functions) Definitions *********************/ #define FSDIO_DEBUG_TAG "FSDIO-SD" @@ -94,24 +91,12 @@ static void SDExitCallback(TimerHandle_t timer) write_task = NULL; } - if (read_task) - { - vTaskDelete(read_task); - read_task = NULL; - } - if (sync) { vEventGroupDelete(sync); sync = NULL; } - if (sdio) - { - err = FFreeRTOSSdioDeInit(sdio); - sdio = NULL; - } - if (pdPASS != xTimerDelete(timer, 0)) /* delete timer ifself */ { FSDIO_ERROR("delete exit timer failed !!!"); @@ -146,8 +131,7 @@ static boolean SDWaitEvent(u32 evt_bits, TickType_t wait_delay) static void SDInitTask(void * args) { - sdio = FFreeRTOSSdioInit(sd_slot, &sdio_config); - if (NULL == sdio) + if (SDMMC_OK != sdmmc_host_init(test_info.cur_host, test_info.cur_host_config)) { FSDIO_ERROR("init sdio failed !!!"); goto task_exit; @@ -159,82 +143,61 @@ task_exit: vTaskDelete(NULL); /* delete task itself */ } -static void SDReadTask(void * args) +static void SDWriteReadTask(void * args) { u32 times = 0U; - const TickType_t wait_delay = pdMS_TO_TICKS(5000UL); /* wait for 5 seconds */ - const uintptr trans_len = read_message.block_num * FFREERTOS_SDIO_BLOCK_SIZE; + const TickType_t wait_delay = pdMS_TO_TICKS(2000UL); /* wait for 2 seconds */ + FError err; + const uintptr trans_len = test_info.block_num * 512U; + char ch = 'A'; - FASSERT_MSG(trans_len <= SD_WR_BUF_LEN, "trans length exceed buffer limits"); - - for (;;) + if (trans_len > SD_WR_BUF_LEN) { - /* wait write finish to get the updated contents */ - if (!SDWaitEvent(SD_EVT_WRITE_DONE, portMAX_DELAY)) - { - FSDIO_ERROR("sdio read timeout !!!"); - goto task_exit; - } + FSDIO_ERROR("trans length exceed buffer limits"); + goto task_exit; + } - printf("start read ...\r\n"); + SDWaitEvent(SD_EVT_INIT_DONE, portMAX_DELAY); - memset(read_message.buf, 0U, trans_len); - FError err = FFreeRTOSSdioTransfer(sdio, &read_message); - if (FFREERTOS_SDIO_OK != err) + for (;;) + { + printf("start read ...\r\n"); + memset(sd_read_buffer, 0U, trans_len); + if (SDMMC_OK != sdmmc_os_read_sectors(&(test_info.cur_host->card), + sd_read_buffer, + test_info.start_blk, + test_info.block_num)) { FSDIO_ERROR("sdio read failed !!!"); goto task_exit; } - FCacheDCacheFlushRange((uintptr)(void *)read_message.buf, trans_len); + FCacheDCacheFlushRange((uintptr)(void *)sd_read_buffer, trans_len); printf("==>Read from Block [%d:%d]\r\n", - read_message.start_block, - read_message.start_block + read_message.block_num); + test_info.start_blk, + test_info.start_blk + test_info.block_num); - FtDumpHexByte(read_message.buf, trans_len); - - SDSendEvent(SD_EVT_READ_DONE); /* send read finish singal */ - vTaskDelay(wait_delay); + FtDumpHexByte(sd_read_buffer, min(trans_len, (fsize_t)(2 * 512U))); - if (++times > run_times) - break; - } + /*************************************************************/ -task_exit: - printf("exit from read task \r\n"); - vTaskSuspend(NULL); /* suspend task */ -} - -static void SDWriteTask(void * args) -{ - u32 times = 0U; - const TickType_t wait_delay = pdMS_TO_TICKS(2000UL); /* wait for 2 seconds */ - FError err; - const uintptr trans_len = write_message.block_num * FFREERTOS_SDIO_BLOCK_SIZE; - char ch = 'A'; - - FASSERT_MSG(trans_len <= SD_WR_BUF_LEN, "trans length exceed buffer limits"); - SDWaitEvent(SD_EVT_INIT_DONE, portMAX_DELAY); - - for (;;) - { printf("start write ...\r\n"); - memset(write_message.buf, (ch + times), trans_len); - FCacheDCacheInvalidateRange((uintptr)(void *)write_message.buf, trans_len); + memset(sd_write_buffer, (ch + times), trans_len); printf("==>Write %c to Block [%d:%d]\r\n", - ch, write_message.start_block, - write_message.start_block + write_message.block_num); - - err = FFreeRTOSSdioTransfer(sdio, &write_message); - if (FFREERTOS_SDIO_OK != err) + ch, + test_info.start_blk, + test_info.start_blk + test_info.block_num); + + if (SDMMC_OK != sdmmc_os_write_sectors(&(test_info.cur_host->card), + sd_write_buffer, + test_info.start_blk, + test_info.block_num)) { FSDIO_ERROR("sdio write failed !!!"); goto task_exit; } - SDSendEvent(SD_EVT_WRITE_DONE); /* send write finish signal */ vTaskDelay(wait_delay); - SDWaitEvent(SD_EVT_READ_DONE, portMAX_DELAY); /* wait until read done and go on next write */ if (++times > run_times) break; @@ -263,13 +226,16 @@ BaseType_t FFreeRTOSSdWriteRead(u32 slot_id, boolean is_emmc, u32 start_blk, u32 FASSERT_MSG(NULL == sync, "event group exists !!!"); FASSERT_MSG((sync = xEventGroupCreate()) != NULL, "create event group failed !!!"); - sd_slot = slot_id; - sdio_config.medium_type = is_emmc ? FFREERTOS_SDIO_MEDIUM_EMMC: FFREERTOS_SDIO_MEDIUM_TF; + test_info.cur_host = is_emmc ? &emmc_host : &tf_host; + test_info.cur_host_config = is_emmc ? &emmc_host_config : &tf_host_config; - read_message.start_block = start_blk; - read_message.block_num = blk_num; - write_message.start_block = start_blk; - write_message.block_num = blk_num; + test_info.cur_host_config->slot = slot_id; + test_info.cur_host_config->type = SDMMC_HOST_TYPE_FSDIO; + test_info.cur_host_config->flags = SDMMC_HOST_WORK_MODE_DMA | SDMMC_HOST_WORK_MODE_IRQ; + test_info.cur_host_config->flags |= is_emmc ? 0U : SDMMC_HOST_REMOVABLE_CARD; + + test_info.start_blk = start_blk; + test_info.block_num = blk_num; taskENTER_CRITICAL(); /* no schedule when create task */ ret = xTaskCreate((TaskFunction_t )SDInitTask, @@ -280,8 +246,8 @@ BaseType_t FFreeRTOSSdWriteRead(u32 slot_id, boolean is_emmc, u32 start_blk, u32 NULL); FASSERT_MSG(pdPASS == ret, "create task failed"); - ret = xTaskCreate((TaskFunction_t )SDWriteTask, - (const char* )"SDWriteTask", + ret = xTaskCreate((TaskFunction_t )SDWriteReadTask, + (const char* )"SDWriteReadTask", (uint16_t )2048, NULL, (UBaseType_t )configMAX_PRIORITIES - 2, @@ -289,15 +255,6 @@ BaseType_t FFreeRTOSSdWriteRead(u32 slot_id, boolean is_emmc, u32 start_blk, u32 FASSERT_MSG(pdPASS == ret, "create task failed"); - ret = xTaskCreate((TaskFunction_t )SDReadTask, - (const char* )"SDReadTask", - (uint16_t )2048, - NULL, - (UBaseType_t )configMAX_PRIORITIES - 2, - &read_task); - - FASSERT_MSG(pdPASS == ret, "create task failed"); - exit_timer = xTimerCreate("Exit-Timer", /* Text name for the software timer - not used by FreeRTOS. */ total_run_time, /* The software timer's period in ticks. */ pdFALSE, /* Setting uxAutoRealod to pdFALSE creates a one-shot software timer. */ diff --git a/example/peripheral/spi/configs/e2000d_aarch32_eg_configs b/example/peripheral/spi/configs/e2000d_aarch32_eg_configs index c014aa05a1570e11b384986e28d23e8baeeb01a2..55e64d45bbf97e7df64cf0ddc08d430675719c43 100644 --- a/example/peripheral/spi/configs/e2000d_aarch32_eg_configs +++ b/example/peripheral/spi/configs/e2000d_aarch32_eg_configs @@ -112,6 +112,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -169,12 +178,6 @@ CONFIG_FREERTOS_USE_FSPIM=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -186,14 +189,33 @@ CONFIG_FREERTOS_USE_FSPIM=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set CONFIG_USE_SFUD=y # @@ -219,4 +241,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/spi/configs/e2000d_aarch64_eg_configs b/example/peripheral/spi/configs/e2000d_aarch64_eg_configs index 956cb09a9a9c96e5e99681b97d526f35dc0e2271..095efa78422e8c1b7b8c62782d8cc97026bf3d58 100644 --- a/example/peripheral/spi/configs/e2000d_aarch64_eg_configs +++ b/example/peripheral/spi/configs/e2000d_aarch64_eg_configs @@ -108,6 +108,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -165,12 +174,6 @@ CONFIG_FREERTOS_USE_FSPIM=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -182,14 +185,33 @@ CONFIG_FREERTOS_USE_FSPIM=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set CONFIG_USE_SFUD=y # @@ -215,4 +237,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/spi/sdkconfig b/example/peripheral/spi/sdkconfig index 956cb09a9a9c96e5e99681b97d526f35dc0e2271..095efa78422e8c1b7b8c62782d8cc97026bf3d58 100644 --- a/example/peripheral/spi/sdkconfig +++ b/example/peripheral/spi/sdkconfig @@ -108,6 +108,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -165,12 +174,6 @@ CONFIG_FREERTOS_USE_FSPIM=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -182,14 +185,33 @@ CONFIG_FREERTOS_USE_FSPIM=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set CONFIG_USE_SFUD=y # @@ -215,4 +237,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/spi/sdkconfig.h b/example/peripheral/spi/sdkconfig.h index 239ec2a748d85f6b810ecc1ac5827a6864b59f1f..20e01f8f9f67490008e39dfeb6c9620530d9094f 100644 --- a/example/peripheral/spi/sdkconfig.h +++ b/example/peripheral/spi/sdkconfig.h @@ -99,6 +99,12 @@ /* Compiler Options */ +/* Cross-Compiler Setting */ + +#define CONFIG_GCC_OPTIMIZE_LEVEL 0 +/* CONFIG_USE_EXT_COMPILER is not set */ +/* CONFIG_USE_KLIN_SYS is not set */ +/* end of Cross-Compiler Setting */ #define CONFIG_OUTPUT_BINARY /* end of Compiler Options */ /* end of Building Option */ @@ -146,11 +152,6 @@ /* CONFIG_FREERTOS_USE_FGDMA is not set */ /* end of Freertos DMA Drivers */ -/* Freertos MMC Drivers */ - -/* CONFIG_FREERTOS_USE_FSDIO is not set */ -/* end of Freertos MMC Drivers */ - /* Freertos Adc Drivers */ /* CONFIG_FREERTOS_USE_ADC is not set */ @@ -160,13 +161,29 @@ /* CONFIG_FREERTOS_USE_CAN is not set */ /* end of Freertos Can Drivers */ + +/* Freertos I2c Drivers */ + +/* CONFIG_FREERTOS_USE_I2C is not set */ +/* end of Freertos I2c Drivers */ + +/* Freertos Mio Drivers */ + +/* CONFIG_FREERTOS_USE_MIO is not set */ +/* end of Freertos Mio Drivers */ + +/* Freertos Timer Drivers */ + +/* CONFIG_FREERTOS_USE_TIMER is not set */ +/* end of Freertos Timer Drivers */ /* end of Component Configuration */ -/* FreeRTOS Setting */ +/* Third-Party Configuration */ /* CONFIG_USE_LWIP is not set */ #define CONFIG_USE_BACKTRACE /* CONFIG_USE_FATFS is not set */ +/* CONFIG_USE_FATFS_0_1_4 is not set */ #define CONFIG_USE_SFUD /* SFUD Configuration */ @@ -188,6 +205,27 @@ #define CONFIG_USE_TLSF /* CONFIG_USE_SDMMC_CMD is not set */ /* CONFIG_USE_CHERRY_USB is not set */ -/* end of FreeRTOS Setting */ +/* end of Third-Party Configuration */ + +/* Kernel Configuration */ + +#define CONFIG_FREERTOS_OPTIMIZED_SCHEDULER +#define CONFIG_FREERTOS_HZ 1000 +#define CONFIG_FREERTOS_MAX_PRIORITIES 32 +#define CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES 13 +#define CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES 11 +#define CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS 1 +#define CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE 1024 +#define CONFIG_FREERTOS_MAX_TASK_NAME_LEN 32 +#define CONFIG_FREERTOS_TIMER_TASK_PRIORITY 1 +#define CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH 2048 +#define CONFIG_FREERTOS_TIMER_QUEUE_LENGTH 10 +#define CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE 0 +#define CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS +#define CONFIG_FREERTOS_USE_TRACE_FACILITY +#define CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS +/* CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set */ +#define CONFIG_FREERTOS_TOTAL_HEAP_SIZE 10240 +/* end of Kernel Configuration */ #endif diff --git a/example/peripheral/timer_tacho/Kconfig b/example/peripheral/timer_tacho/Kconfig new file mode 100644 index 0000000000000000000000000000000000000000..0277fb8553f2132f097012a78633194f6173c156 --- /dev/null +++ b/example/peripheral/timer_tacho/Kconfig @@ -0,0 +1,19 @@ +# +# For a description of the syntax of this configuration file, +# see tools/kconfiglib/kconfig-language.txt. +# + + +mainmenu "Phytium Freertos Configuration" + + menu "Freertos Configuration" + config TARGET_NAME + string "Build Target Name" + default "freertos" + help + Build Target name for the demo + +endmenu + +source "$(FREERTOS_SDK_ROOT)/Kconfig" + diff --git a/example/peripheral/timer_tacho/README.md b/example/peripheral/timer_tacho/README.md new file mode 100644 index 0000000000000000000000000000000000000000..600163871cbf4d0d324d1cfc030cc360564e032d --- /dev/null +++ b/example/peripheral/timer_tacho/README.md @@ -0,0 +1,142 @@ + + +# timer_tacho base on freertos + +## 1. 例程介绍 + +本例程示范了freertos环境下的timer、tacho和capture的使用,包括timer控制器的初始化、定时、信号捕捉操作; +程序启动后,创建timer、tacho或capture(两者使用同一IO,默认tacho,变更需要更改初始化和任务)的初始化任务,分别测试定时功能,采样转换功能,以及脉冲计数触发功能; +例程仅仅支持E2000上使用; +E2000DQ上使用的demo板上的 PWM-IN12(tacho—in12) 进行测试。 + +## 2. 如何使用例程 + +本例程需要用到 +- Phytium开发板(E2000DQ of demo板) +- [Phytium freeRTOS SDK](https://gitee.com/phytium_embedded/phytium-free-rtos-sdk) +- [Phytium standalone SDK](https://gitee.com/phytium_embedded/phytium-standalone-sdk) +### 2.1 硬件配置方法 + +本例程支持的硬件平台包括 +- E2000DQ demo开发板 + +对应的配置项是 + +- CONFIG_TARGET_E2000D、 CONFIG_TARGET_E2000Q + +### 2.1.1 硬件连线 + +- E2000 pwm_in12使用1KHz的方波 + +![hardware_e2000](./figs/tacho_hdw.png) + +### 2.2 SDK配置方法 + +本例程需要, + +- CONFIG_USE_LETTER_SHELL +- CONFIG_FREERTOS_USE_TIMER +- CONFIG_LS_PL011_UART + +本例子已经提供好具体的编译指令,以下进行介绍: +- make 将目录下的工程进行编译 +- make clean 将目录下的工程进行清理 +- make boot 将目录下的工程进行编译,并将生成的elf 复制到目标地址 +- make load_e2000d_aarch64 将预设64bit e2000d 下的配置加载至工程中 +- make load_e2000d_aarch32 将预设32bit e2000d 下的配置加载至工程中 +- make load_e2000q_aarch64 将预设64bit e2000q 下的配置加载至工程中 +- make load_e2000q_aarch32 将预设32bit e2000q 下的配置加载至工程中 +- make menuconfig 配置目录下的参数变量 +- make backup_kconfig 将目录下的sdkconfig 备份到./configs下 + +具体使用方法为: +- 在当前目录下 +- 执行以上指令 + +### 2.3 构建和下载 + +#### 2.3.1 构建过程 + +- 在host侧完成配置 +>配置成E2000Q,对于其它平台,使用对应的默认配置,如E2000D `make load_e2000d_aarch32` + +- 选择目标平台 +``` +make load_e2000q_aarch64 +``` + +- 选择例程需要的配置 +``` +make menuconfig +``` + +- 进行编译 +``` +make +``` + +- 将编译出的镜像放置到tftp目录下 +``` +make boot +``` + +#### 2.3.2 下载过程 + +- host侧设置重启host侧tftp服务器 +``` +sudo service tftpd-hpa restart +``` + +- 开发板侧使用bootelf命令跳转 +``` +setenv ipaddr 192.168.4.20 +setenv serverip 192.168.4.50 +setenv gatewayip 192.168.4.1 +tftpboot 0x90100000 freertos.elf +bootelf -p 0x90100000 +``` + +### 2.4 输出与实验现象 + +- 系统进入后,创建timer初始化任务,创建tacho初始化任务,注册中断服务函数,创建两个功能的任务函数。 + +- E2000 + +![e2000d](./figs/timer_capture.png) + +![e2000d](./figs/timer_tacho.png) + +- 图中我们使用timer id 0 作为定时器任务的控制器,time in 的数字表示进入循环定时中断服务的次数。 +- get captureCnt表示使用timer id 12控制器来采集脉冲的个数(设置上升沿捕获) +- tachometer id使用timer id 12控制器来抓取1KHz信号来模拟风扇波形信号。RPM表示转速 + +## 3. 如何解决问题 + +- 若出现风扇中断异常,需确认连接是否正确,确保风扇波形不低于报警中断的最低设置转速。 + +- 由于timer控制器的数量远多余pwm_in IO口数值,所以尽量使用id 15后面的定时控制器来做普通定时器。 + +## 4. 修改历史记录 +v0.1.0 init diff --git a/example/peripheral/timer_tacho/configs/e2000d_aarch32_eg_configs b/example/peripheral/timer_tacho/configs/e2000d_aarch32_eg_configs new file mode 100644 index 0000000000000000000000000000000000000000..d76ccbbcf411eac4e6b484eb3df3f7f756d9353c --- /dev/null +++ b/example/peripheral/timer_tacho/configs/e2000d_aarch32_eg_configs @@ -0,0 +1,268 @@ + +# +# Freertos Configuration +# +CONFIG_TARGET_NAME="freertos" +# end of Freertos Configuration + +# +# Standalone Setting +# +CONFIG_USE_FREERTOS=y + +# +# Arch Configuration +# +CONFIG_TARGET_ARMV8_AARCH32=y +# CONFIG_TARGET_ARMV8_AARCH64 is not set +# CONFIG_USE_CACHE is not set +# CONFIG_USE_SYS_TICK is not set +CONFIG_USE_AARCH64_L1_TO_AARCH32=y +# end of Arch Configuration + +# +# Board Configuration +# +# CONFIG_TARGET_F2000_4 is not set +# CONFIG_TARGET_D2000 is not set +# CONFIG_TARGET_E2000Q is not set +CONFIG_TARGET_E2000D=y +# CONFIG_TARGET_E2000S is not set +CONFIG_TARGET_E2000=y +CONFIG_DEFAULT_DEBUG_PRINT_UART1=y +# CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set +# CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set +# end of Board Configuration + +# +# Components Configuration +# +# CONFIG_USE_SPI is not set +# CONFIG_USE_QSPI is not set +CONFIG_USE_GIC=y +CONFIG_ENABLE_GICV3=y +CONFIG_USE_SERIAL=y + +# +# Usart Configuration +# +CONFIG_ENABLE_Pl011_UART=y +# end of Usart Configuration + +# CONFIG_USE_GPIO is not set +# CONFIG_USE_ETH is not set +# CONFIG_USE_CAN is not set +# CONFIG_USE_I2C is not set +CONFIG_USE_TIMER=y + +# +# Hardware Timer Configuration +# +CONFIG_ENABLE_TIMER_TACHO=y +# end of Hardware Timer Configuration + +# CONFIG_USE_MIO is not set +# CONFIG_USE_SDMMC is not set +# CONFIG_USE_PCIE is not set +# CONFIG_USE_WDT is not set +# CONFIG_USE_DMA is not set +# CONFIG_USE_NAND is not set +# CONFIG_USE_RTC is not set +# CONFIG_USE_SATA is not set +# CONFIG_USE_USB is not set +# CONFIG_USE_ADC is not set +# CONFIG_USE_PWM is not set +# CONFIG_USE_IPC is not set +# end of Components Configuration + +CONFIG_USE_NEW_LIBC=y +# end of Standalone Setting + +# +# Building Option +# +# CONFIG_LOG_VERBOS is not set +# CONFIG_LOG_DEBUG is not set +# CONFIG_LOG_INFO is not set +# CONFIG_LOG_WARN is not set +CONFIG_LOG_ERROR=y +# CONFIG_LOG_NONE is not set +CONFIG_USE_DEFAULT_INTERRUPT_CONFIG=y +CONFIG_INTERRUPT_ROLE_MASTER=y +# CONFIG_INTERRUPT_ROLE_SLAVE is not set +# CONFIG_LOG_EXTRA_INFO is not set +# CONFIG_BOOTUP_DEBUG_PRINTS is not set + +# +# Linker Options +# +CONFIG_AARCH32_RAM_LD=y +# CONFIG_AARCH64_RAM_LD is not set +# CONFIG_USER_DEFINED_LD is not set +CONFIG_LINK_SCRIPT_ROM=y +CONFIG_ROM_START_UP_ADDR=0x80100000 +CONFIG_ROM_SIZE_MB=1 +CONFIG_LINK_SCRIPT_RAM=y +CONFIG_RAM_START_UP_ADDR=0x81000000 +CONFIG_RAM_SIZE_MB=64 +CONFIG_HEAP_SIZE=1 +CONFIG_SVC_STACK_SIZE=0x1000 +CONFIG_SYS_STACK_SIZE=0x1000 +CONFIG_IRQ_STACK_SIZE=0x1000 +CONFIG_ABORT_STACK_SIZE=0x1000 +CONFIG_FIQ_STACK_SIZE=0x1000 +CONFIG_UNDEF_STACK_SIZE=0x1000 +# end of Linker Options + +# +# Compiler Options +# + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + +CONFIG_OUTPUT_BINARY=y +# end of Compiler Options +# end of Building Option + +# +# Component Configuration +# + +# +# Freertos Uart Drivers +# +CONFIG_FREERTOS_USE_UART=y +# end of Freertos Uart Drivers + +# +# Freertos Pwm Drivers +# +# CONFIG_FREERTOS_USE_PWM is not set +# end of Freertos Pwm Drivers + +# +# Freertos Qspi Drivers +# +# CONFIG_FREERTOS_USE_QSPI is not set +# end of Freertos Qspi Drivers + +# +# Freertos Wdt Drivers +# +# CONFIG_FREERTOS_USE_WDT is not set +# end of Freertos Wdt Drivers + +# +# Freertos Eth Drivers +# +# CONFIG_FREERTOS_USE_XMAC is not set +# end of Freertos Eth Drivers + +# +# Freertos Gpio Drivers +# +# CONFIG_FREERTOS_USE_GPIO is not set +# end of Freertos Gpio Drivers + +# +# Freertos Spim Drivers +# +# CONFIG_FREERTOS_USE_FSPIM is not set +# end of Freertos Spim Drivers + +# +# Freertos DMA Drivers +# +# CONFIG_FREERTOS_USE_FDDMA is not set +# CONFIG_FREERTOS_USE_FGDMA is not set +# end of Freertos DMA Drivers + +# +# Freertos MMC Drivers +# +# CONFIG_FREERTOS_USE_FSDIO is not set +# end of Freertos MMC Drivers + +# +# Freertos Adc Drivers +# +# CONFIG_FREERTOS_USE_ADC is not set +# end of Freertos Adc Drivers + +# +# Freertos Can Drivers +# +# CONFIG_FREERTOS_USE_CAN is not set +# end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +CONFIG_FREERTOS_USE_TIMER=y +# end of Freertos Timer Drivers +# end of Component Configuration + +# +# Third-Party Configuration +# +# CONFIG_USE_LWIP is not set +CONFIG_USE_BACKTRACE=y +# CONFIG_USE_FATFS is not set +# CONFIG_USE_SFUD is not set +# CONFIG_USE_SPIFFS is not set +# CONFIG_USE_AMP is not set +CONFIG_USE_LETTER_SHELL=y + +# +# Letter Shell Configuration +# +CONFIG_LS_PL011_UART=y +CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y +# CONFIG_DEFAULT_LETTER_SHELL_USE_UART0 is not set +# CONFIG_DEFAULT_LETTER_SHELL_USE_UART2 is not set +# end of Letter Shell Configuration + +# CONFIG_USE_TLSF is not set +# CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/timer_tacho/configs/e2000d_aarch64_eg_configs b/example/peripheral/timer_tacho/configs/e2000d_aarch64_eg_configs new file mode 100644 index 0000000000000000000000000000000000000000..feed2ab78a2b4ea35dd9713bd4cefd521db10627 --- /dev/null +++ b/example/peripheral/timer_tacho/configs/e2000d_aarch64_eg_configs @@ -0,0 +1,264 @@ + +# +# Freertos Configuration +# +CONFIG_TARGET_NAME="freertos" +# end of Freertos Configuration + +# +# Standalone Setting +# +CONFIG_USE_FREERTOS=y + +# +# Arch Configuration +# +# CONFIG_TARGET_ARMV8_AARCH32 is not set +CONFIG_TARGET_ARMV8_AARCH64=y +# CONFIG_USE_CACHE is not set +# CONFIG_USE_SYS_TICK is not set +# CONFIG_MMU_DEBUG_PRINTS is not set +# end of Arch Configuration + +# +# Board Configuration +# +# CONFIG_TARGET_F2000_4 is not set +# CONFIG_TARGET_D2000 is not set +# CONFIG_TARGET_E2000Q is not set +CONFIG_TARGET_E2000D=y +# CONFIG_TARGET_E2000S is not set +CONFIG_TARGET_E2000=y +CONFIG_DEFAULT_DEBUG_PRINT_UART1=y +# CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set +# CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set +# end of Board Configuration + +# +# Components Configuration +# +# CONFIG_USE_SPI is not set +# CONFIG_USE_QSPI is not set +CONFIG_USE_GIC=y +CONFIG_ENABLE_GICV3=y +CONFIG_USE_SERIAL=y + +# +# Usart Configuration +# +CONFIG_ENABLE_Pl011_UART=y +# end of Usart Configuration + +# CONFIG_USE_GPIO is not set +# CONFIG_USE_ETH is not set +# CONFIG_USE_CAN is not set +# CONFIG_USE_I2C is not set +CONFIG_USE_TIMER=y + +# +# Hardware Timer Configuration +# +CONFIG_ENABLE_TIMER_TACHO=y +# end of Hardware Timer Configuration + +# CONFIG_USE_MIO is not set +# CONFIG_USE_SDMMC is not set +# CONFIG_USE_PCIE is not set +# CONFIG_USE_WDT is not set +# CONFIG_USE_DMA is not set +# CONFIG_USE_NAND is not set +# CONFIG_USE_RTC is not set +# CONFIG_USE_SATA is not set +# CONFIG_USE_USB is not set +# CONFIG_USE_ADC is not set +# CONFIG_USE_PWM is not set +# CONFIG_USE_IPC is not set +# end of Components Configuration + +CONFIG_USE_NEW_LIBC=y +# end of Standalone Setting + +# +# Building Option +# +# CONFIG_LOG_VERBOS is not set +# CONFIG_LOG_DEBUG is not set +# CONFIG_LOG_INFO is not set +# CONFIG_LOG_WARN is not set +CONFIG_LOG_ERROR=y +# CONFIG_LOG_NONE is not set +CONFIG_USE_DEFAULT_INTERRUPT_CONFIG=y +CONFIG_INTERRUPT_ROLE_MASTER=y +# CONFIG_INTERRUPT_ROLE_SLAVE is not set +# CONFIG_LOG_EXTRA_INFO is not set +# CONFIG_BOOTUP_DEBUG_PRINTS is not set + +# +# Linker Options +# +# CONFIG_AARCH32_RAM_LD is not set +CONFIG_AARCH64_RAM_LD=y +# CONFIG_USER_DEFINED_LD is not set +CONFIG_LINK_SCRIPT_ROM=y +CONFIG_ROM_START_UP_ADDR=0x80100000 +CONFIG_ROM_SIZE_MB=1 +CONFIG_LINK_SCRIPT_RAM=y +CONFIG_RAM_START_UP_ADDR=0x81000000 +CONFIG_RAM_SIZE_MB=64 +CONFIG_HEAP_SIZE=1 +CONFIG_STACK_SIZE=0x100000 +CONFIG_FPU_STACK_SIZE=0x1000 +# end of Linker Options + +# +# Compiler Options +# + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + +CONFIG_OUTPUT_BINARY=y +# end of Compiler Options +# end of Building Option + +# +# Component Configuration +# + +# +# Freertos Uart Drivers +# +CONFIG_FREERTOS_USE_UART=y +# end of Freertos Uart Drivers + +# +# Freertos Pwm Drivers +# +# CONFIG_FREERTOS_USE_PWM is not set +# end of Freertos Pwm Drivers + +# +# Freertos Qspi Drivers +# +# CONFIG_FREERTOS_USE_QSPI is not set +# end of Freertos Qspi Drivers + +# +# Freertos Wdt Drivers +# +# CONFIG_FREERTOS_USE_WDT is not set +# end of Freertos Wdt Drivers + +# +# Freertos Eth Drivers +# +# CONFIG_FREERTOS_USE_XMAC is not set +# end of Freertos Eth Drivers + +# +# Freertos Gpio Drivers +# +# CONFIG_FREERTOS_USE_GPIO is not set +# end of Freertos Gpio Drivers + +# +# Freertos Spim Drivers +# +# CONFIG_FREERTOS_USE_FSPIM is not set +# end of Freertos Spim Drivers + +# +# Freertos DMA Drivers +# +# CONFIG_FREERTOS_USE_FDDMA is not set +# CONFIG_FREERTOS_USE_FGDMA is not set +# end of Freertos DMA Drivers + +# +# Freertos MMC Drivers +# +# CONFIG_FREERTOS_USE_FSDIO is not set +# end of Freertos MMC Drivers + +# +# Freertos Adc Drivers +# +# CONFIG_FREERTOS_USE_ADC is not set +# end of Freertos Adc Drivers + +# +# Freertos Can Drivers +# +# CONFIG_FREERTOS_USE_CAN is not set +# end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +CONFIG_FREERTOS_USE_TIMER=y +# end of Freertos Timer Drivers +# end of Component Configuration + +# +# Third-Party Configuration +# +# CONFIG_USE_LWIP is not set +CONFIG_USE_BACKTRACE=y +# CONFIG_USE_FATFS is not set +# CONFIG_USE_SFUD is not set +# CONFIG_USE_SPIFFS is not set +# CONFIG_USE_AMP is not set +CONFIG_USE_LETTER_SHELL=y + +# +# Letter Shell Configuration +# +CONFIG_LS_PL011_UART=y +CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y +# CONFIG_DEFAULT_LETTER_SHELL_USE_UART0 is not set +# CONFIG_DEFAULT_LETTER_SHELL_USE_UART2 is not set +# end of Letter Shell Configuration + +# CONFIG_USE_TLSF is not set +# CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/timer_tacho/configs/e2000q_aarch32_eg_configs b/example/peripheral/timer_tacho/configs/e2000q_aarch32_eg_configs new file mode 100644 index 0000000000000000000000000000000000000000..581cac39a5bcf4d3e1ef3ef25fd64c1d9aa7e740 --- /dev/null +++ b/example/peripheral/timer_tacho/configs/e2000q_aarch32_eg_configs @@ -0,0 +1,268 @@ + +# +# Freertos Configuration +# +CONFIG_TARGET_NAME="freertos" +# end of Freertos Configuration + +# +# Standalone Setting +# +CONFIG_USE_FREERTOS=y + +# +# Arch Configuration +# +CONFIG_TARGET_ARMV8_AARCH32=y +# CONFIG_TARGET_ARMV8_AARCH64 is not set +# CONFIG_USE_CACHE is not set +# CONFIG_USE_SYS_TICK is not set +CONFIG_USE_AARCH64_L1_TO_AARCH32=y +# end of Arch Configuration + +# +# Board Configuration +# +# CONFIG_TARGET_F2000_4 is not set +# CONFIG_TARGET_D2000 is not set +CONFIG_TARGET_E2000Q=y +# CONFIG_TARGET_E2000D is not set +# CONFIG_TARGET_E2000S is not set +CONFIG_TARGET_E2000=y +CONFIG_DEFAULT_DEBUG_PRINT_UART1=y +# CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set +# CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set +# end of Board Configuration + +# +# Components Configuration +# +# CONFIG_USE_SPI is not set +# CONFIG_USE_QSPI is not set +CONFIG_USE_GIC=y +CONFIG_ENABLE_GICV3=y +CONFIG_USE_SERIAL=y + +# +# Usart Configuration +# +CONFIG_ENABLE_Pl011_UART=y +# end of Usart Configuration + +# CONFIG_USE_GPIO is not set +# CONFIG_USE_ETH is not set +# CONFIG_USE_CAN is not set +# CONFIG_USE_I2C is not set +CONFIG_USE_TIMER=y + +# +# Hardware Timer Configuration +# +CONFIG_ENABLE_TIMER_TACHO=y +# end of Hardware Timer Configuration + +# CONFIG_USE_MIO is not set +# CONFIG_USE_SDMMC is not set +# CONFIG_USE_PCIE is not set +# CONFIG_USE_WDT is not set +# CONFIG_USE_DMA is not set +# CONFIG_USE_NAND is not set +# CONFIG_USE_RTC is not set +# CONFIG_USE_SATA is not set +# CONFIG_USE_USB is not set +# CONFIG_USE_ADC is not set +# CONFIG_USE_PWM is not set +# CONFIG_USE_IPC is not set +# end of Components Configuration + +CONFIG_USE_NEW_LIBC=y +# end of Standalone Setting + +# +# Building Option +# +# CONFIG_LOG_VERBOS is not set +# CONFIG_LOG_DEBUG is not set +# CONFIG_LOG_INFO is not set +# CONFIG_LOG_WARN is not set +CONFIG_LOG_ERROR=y +# CONFIG_LOG_NONE is not set +CONFIG_USE_DEFAULT_INTERRUPT_CONFIG=y +CONFIG_INTERRUPT_ROLE_MASTER=y +# CONFIG_INTERRUPT_ROLE_SLAVE is not set +# CONFIG_LOG_EXTRA_INFO is not set +# CONFIG_BOOTUP_DEBUG_PRINTS is not set + +# +# Linker Options +# +CONFIG_AARCH32_RAM_LD=y +# CONFIG_AARCH64_RAM_LD is not set +# CONFIG_USER_DEFINED_LD is not set +CONFIG_LINK_SCRIPT_ROM=y +CONFIG_ROM_START_UP_ADDR=0x80100000 +CONFIG_ROM_SIZE_MB=1 +CONFIG_LINK_SCRIPT_RAM=y +CONFIG_RAM_START_UP_ADDR=0x81000000 +CONFIG_RAM_SIZE_MB=64 +CONFIG_HEAP_SIZE=1 +CONFIG_SVC_STACK_SIZE=0x1000 +CONFIG_SYS_STACK_SIZE=0x1000 +CONFIG_IRQ_STACK_SIZE=0x1000 +CONFIG_ABORT_STACK_SIZE=0x1000 +CONFIG_FIQ_STACK_SIZE=0x1000 +CONFIG_UNDEF_STACK_SIZE=0x1000 +# end of Linker Options + +# +# Compiler Options +# + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + +CONFIG_OUTPUT_BINARY=y +# end of Compiler Options +# end of Building Option + +# +# Component Configuration +# + +# +# Freertos Uart Drivers +# +CONFIG_FREERTOS_USE_UART=y +# end of Freertos Uart Drivers + +# +# Freertos Pwm Drivers +# +# CONFIG_FREERTOS_USE_PWM is not set +# end of Freertos Pwm Drivers + +# +# Freertos Qspi Drivers +# +# CONFIG_FREERTOS_USE_QSPI is not set +# end of Freertos Qspi Drivers + +# +# Freertos Wdt Drivers +# +# CONFIG_FREERTOS_USE_WDT is not set +# end of Freertos Wdt Drivers + +# +# Freertos Eth Drivers +# +# CONFIG_FREERTOS_USE_XMAC is not set +# end of Freertos Eth Drivers + +# +# Freertos Gpio Drivers +# +# CONFIG_FREERTOS_USE_GPIO is not set +# end of Freertos Gpio Drivers + +# +# Freertos Spim Drivers +# +# CONFIG_FREERTOS_USE_FSPIM is not set +# end of Freertos Spim Drivers + +# +# Freertos DMA Drivers +# +# CONFIG_FREERTOS_USE_FDDMA is not set +# CONFIG_FREERTOS_USE_FGDMA is not set +# end of Freertos DMA Drivers + +# +# Freertos MMC Drivers +# +# CONFIG_FREERTOS_USE_FSDIO is not set +# end of Freertos MMC Drivers + +# +# Freertos Adc Drivers +# +# CONFIG_FREERTOS_USE_ADC is not set +# end of Freertos Adc Drivers + +# +# Freertos Can Drivers +# +# CONFIG_FREERTOS_USE_CAN is not set +# end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +CONFIG_FREERTOS_USE_TIMER=y +# end of Freertos Timer Drivers +# end of Component Configuration + +# +# Third-Party Configuration +# +# CONFIG_USE_LWIP is not set +CONFIG_USE_BACKTRACE=y +# CONFIG_USE_FATFS is not set +# CONFIG_USE_SFUD is not set +# CONFIG_USE_SPIFFS is not set +# CONFIG_USE_AMP is not set +CONFIG_USE_LETTER_SHELL=y + +# +# Letter Shell Configuration +# +CONFIG_LS_PL011_UART=y +CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y +# CONFIG_DEFAULT_LETTER_SHELL_USE_UART0 is not set +# CONFIG_DEFAULT_LETTER_SHELL_USE_UART2 is not set +# end of Letter Shell Configuration + +# CONFIG_USE_TLSF is not set +# CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/timer_tacho/configs/e2000q_aarch64_eg_configs b/example/peripheral/timer_tacho/configs/e2000q_aarch64_eg_configs new file mode 100644 index 0000000000000000000000000000000000000000..0bcf2870b7f0074d059440baffb3895b44590a92 --- /dev/null +++ b/example/peripheral/timer_tacho/configs/e2000q_aarch64_eg_configs @@ -0,0 +1,264 @@ + +# +# Freertos Configuration +# +CONFIG_TARGET_NAME="freertos" +# end of Freertos Configuration + +# +# Standalone Setting +# +CONFIG_USE_FREERTOS=y + +# +# Arch Configuration +# +# CONFIG_TARGET_ARMV8_AARCH32 is not set +CONFIG_TARGET_ARMV8_AARCH64=y +# CONFIG_USE_CACHE is not set +# CONFIG_USE_SYS_TICK is not set +# CONFIG_MMU_DEBUG_PRINTS is not set +# end of Arch Configuration + +# +# Board Configuration +# +# CONFIG_TARGET_F2000_4 is not set +# CONFIG_TARGET_D2000 is not set +CONFIG_TARGET_E2000Q=y +# CONFIG_TARGET_E2000D is not set +# CONFIG_TARGET_E2000S is not set +CONFIG_TARGET_E2000=y +CONFIG_DEFAULT_DEBUG_PRINT_UART1=y +# CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set +# CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set +# end of Board Configuration + +# +# Components Configuration +# +# CONFIG_USE_SPI is not set +# CONFIG_USE_QSPI is not set +CONFIG_USE_GIC=y +CONFIG_ENABLE_GICV3=y +CONFIG_USE_SERIAL=y + +# +# Usart Configuration +# +CONFIG_ENABLE_Pl011_UART=y +# end of Usart Configuration + +# CONFIG_USE_GPIO is not set +# CONFIG_USE_ETH is not set +# CONFIG_USE_CAN is not set +# CONFIG_USE_I2C is not set +CONFIG_USE_TIMER=y + +# +# Hardware Timer Configuration +# +CONFIG_ENABLE_TIMER_TACHO=y +# end of Hardware Timer Configuration + +# CONFIG_USE_MIO is not set +# CONFIG_USE_SDMMC is not set +# CONFIG_USE_PCIE is not set +# CONFIG_USE_WDT is not set +# CONFIG_USE_DMA is not set +# CONFIG_USE_NAND is not set +# CONFIG_USE_RTC is not set +# CONFIG_USE_SATA is not set +# CONFIG_USE_USB is not set +# CONFIG_USE_ADC is not set +# CONFIG_USE_PWM is not set +# CONFIG_USE_IPC is not set +# end of Components Configuration + +CONFIG_USE_NEW_LIBC=y +# end of Standalone Setting + +# +# Building Option +# +# CONFIG_LOG_VERBOS is not set +# CONFIG_LOG_DEBUG is not set +# CONFIG_LOG_INFO is not set +# CONFIG_LOG_WARN is not set +CONFIG_LOG_ERROR=y +# CONFIG_LOG_NONE is not set +CONFIG_USE_DEFAULT_INTERRUPT_CONFIG=y +CONFIG_INTERRUPT_ROLE_MASTER=y +# CONFIG_INTERRUPT_ROLE_SLAVE is not set +# CONFIG_LOG_EXTRA_INFO is not set +# CONFIG_BOOTUP_DEBUG_PRINTS is not set + +# +# Linker Options +# +# CONFIG_AARCH32_RAM_LD is not set +CONFIG_AARCH64_RAM_LD=y +# CONFIG_USER_DEFINED_LD is not set +CONFIG_LINK_SCRIPT_ROM=y +CONFIG_ROM_START_UP_ADDR=0x80100000 +CONFIG_ROM_SIZE_MB=1 +CONFIG_LINK_SCRIPT_RAM=y +CONFIG_RAM_START_UP_ADDR=0x81000000 +CONFIG_RAM_SIZE_MB=64 +CONFIG_HEAP_SIZE=1 +CONFIG_STACK_SIZE=0x100000 +CONFIG_FPU_STACK_SIZE=0x1000 +# end of Linker Options + +# +# Compiler Options +# + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + +CONFIG_OUTPUT_BINARY=y +# end of Compiler Options +# end of Building Option + +# +# Component Configuration +# + +# +# Freertos Uart Drivers +# +CONFIG_FREERTOS_USE_UART=y +# end of Freertos Uart Drivers + +# +# Freertos Pwm Drivers +# +# CONFIG_FREERTOS_USE_PWM is not set +# end of Freertos Pwm Drivers + +# +# Freertos Qspi Drivers +# +# CONFIG_FREERTOS_USE_QSPI is not set +# end of Freertos Qspi Drivers + +# +# Freertos Wdt Drivers +# +# CONFIG_FREERTOS_USE_WDT is not set +# end of Freertos Wdt Drivers + +# +# Freertos Eth Drivers +# +# CONFIG_FREERTOS_USE_XMAC is not set +# end of Freertos Eth Drivers + +# +# Freertos Gpio Drivers +# +# CONFIG_FREERTOS_USE_GPIO is not set +# end of Freertos Gpio Drivers + +# +# Freertos Spim Drivers +# +# CONFIG_FREERTOS_USE_FSPIM is not set +# end of Freertos Spim Drivers + +# +# Freertos DMA Drivers +# +# CONFIG_FREERTOS_USE_FDDMA is not set +# CONFIG_FREERTOS_USE_FGDMA is not set +# end of Freertos DMA Drivers + +# +# Freertos MMC Drivers +# +# CONFIG_FREERTOS_USE_FSDIO is not set +# end of Freertos MMC Drivers + +# +# Freertos Adc Drivers +# +# CONFIG_FREERTOS_USE_ADC is not set +# end of Freertos Adc Drivers + +# +# Freertos Can Drivers +# +# CONFIG_FREERTOS_USE_CAN is not set +# end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +CONFIG_FREERTOS_USE_TIMER=y +# end of Freertos Timer Drivers +# end of Component Configuration + +# +# Third-Party Configuration +# +# CONFIG_USE_LWIP is not set +CONFIG_USE_BACKTRACE=y +# CONFIG_USE_FATFS is not set +# CONFIG_USE_SFUD is not set +# CONFIG_USE_SPIFFS is not set +# CONFIG_USE_AMP is not set +CONFIG_USE_LETTER_SHELL=y + +# +# Letter Shell Configuration +# +CONFIG_LS_PL011_UART=y +CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y +# CONFIG_DEFAULT_LETTER_SHELL_USE_UART0 is not set +# CONFIG_DEFAULT_LETTER_SHELL_USE_UART2 is not set +# end of Letter Shell Configuration + +# CONFIG_USE_TLSF is not set +# CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/timer_tacho/figs/tacho_hdw.png b/example/peripheral/timer_tacho/figs/tacho_hdw.png new file mode 100644 index 0000000000000000000000000000000000000000..e523d350e997be2da72068cecce9130074c4d032 Binary files /dev/null and b/example/peripheral/timer_tacho/figs/tacho_hdw.png differ diff --git a/example/peripheral/timer_tacho/figs/timer_capture.png b/example/peripheral/timer_tacho/figs/timer_capture.png new file mode 100644 index 0000000000000000000000000000000000000000..be579323637c5aed38ca6d5781ad51f6d60354b3 Binary files /dev/null and b/example/peripheral/timer_tacho/figs/timer_capture.png differ diff --git a/example/peripheral/timer_tacho/figs/timer_tacho.png b/example/peripheral/timer_tacho/figs/timer_tacho.png new file mode 100644 index 0000000000000000000000000000000000000000..ac6729b4d558dd755b0eb6d7e145b4f8da6fdf13 Binary files /dev/null and b/example/peripheral/timer_tacho/figs/timer_tacho.png differ diff --git a/example/peripheral/timer_tacho/inc/timer_tacho_example.h b/example/peripheral/timer_tacho/inc/timer_tacho_example.h new file mode 100644 index 0000000000000000000000000000000000000000..a5de61ad3fade90ae61c3818d4b13aa5cc4e039a --- /dev/null +++ b/example/peripheral/timer_tacho/inc/timer_tacho_example.h @@ -0,0 +1,48 @@ +/* + * Copyright : (C) 2022 Phytium Information Technology, Inc. + * All Rights Reserved. + * + * This program is OPEN SOURCE software: you can redistribute it and/or modify it + * under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd, + * either version 1.0 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the Phytium Public License for more details. + * + * + * FilePath: timer_tacho_example.h + * Date: 2022-08-23 19:05:38 + * LastEditTime: 2022-08-23 19:05:39 + * Description:  This file is for + * + * Modify History: + * Ver   Who        Date         Changes + * ----- ------     --------    -------------------------------------- + * v0.1.0 liushengming 2022.08.24 init + */ + +#ifndef TIMER_TACHO_EXAMPLE_H +#define TIMER_TACHO_EXAMPLE_H + +#ifdef __cplusplus +extern "C" +{ +#endif + +/***************************** Include Files *********************************/ + +/************************** Constant Definitions *****************************/ + +/************************** Variable Definitions *****************************/ + +/***************** Macros (Inline Functions) Definitions *********************/ + +/************************** Function Prototypes ******************************/ +BaseType_t FFreeRTOSTimerTachoCreate(void); +/*****************************************************************************/ +#ifdef __cplusplus +} +#endif + +#endif \ No newline at end of file diff --git a/example/peripheral/timer_tacho/main.c b/example/peripheral/timer_tacho/main.c new file mode 100644 index 0000000000000000000000000000000000000000..2b4b7824b46f01a4f304a4b87841954baba6e1ac --- /dev/null +++ b/example/peripheral/timer_tacho/main.c @@ -0,0 +1,48 @@ +/* + * Copyright : (C) 2022 Phytium Information Technology, Inc. + * All Rights Reserved. + * + * This program is OPEN SOURCE software: you can redistribute it and/or modify it + * under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd, + * either version 1.0 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the Phytium Public License for more details. + * + * + * FilePath: main.c + * Date: 2022-08-23 17:24:03 + * LastEditTime: 2022-08-23 17:24:03 + * Description:  This file is for timer_tacho + * + * Modify History: + * Ver   Who        Date         Changes + * ----- ------     --------    -------------------------------------- + * v0.1.0 liushengming 2022.08.23 init + */ + +#include +#include "shell.h" +#include "shell_port.h" +#include "timer_tacho_example.h" + +int main(void) +{ + BaseType_t ret; + + ret = FFreeRTOSTimerTachoCreate(); + if(ret != pdPASS) + goto FAIL_EXIT; + + ret = LSUserShellTask(); + if(ret != pdPASS) + goto FAIL_EXIT; + + vTaskStartScheduler(); /* 启动任务,开启调度 */ + while (1); /* 正常不会执行到这里 */ + +FAIL_EXIT: + printf("failed 0x%x \r\n", ret); + return 0; +} diff --git a/example/peripheral/timer_tacho/makefile b/example/peripheral/timer_tacho/makefile new file mode 100644 index 0000000000000000000000000000000000000000..d56227392212980c329dde7ebb09f8ec2d601317 --- /dev/null +++ b/example/peripheral/timer_tacho/makefile @@ -0,0 +1,29 @@ +export PROJECT_DIR ?= $(shell pwd) + +export USR_SRC_DIR = $(PROJECT_DIR) \ + ./src +export USR_INC_DIR = $(PROJECT_DIR) \ + ./inc + +# 用户定义的编译目标文件上传路径 +ifeq ($(OS),Windows_NT) + USR_BOOT_DIR ?= $(subst \,/, $(PHYTIUM_DEV_PATH))/tftp +else + USR_BOOT_DIR ?= /mnt/d/tftboot +endif + + +# 设置启动镜像名 +BOOT_IMG_NAME ?= freertos + +# 指定编译freertos项目使用的makefile +include $(FREERTOS_SDK_ROOT)/make/build_freertos.mk + +# 完成编译 +boot: + make -j + @cp ./$(CONFIG_TARGET_NAME).elf $(USR_BOOT_DIR)/$(BOOT_IMG_NAME).elf + @cp ./$(CONFIG_TARGET_NAME).bin $(USR_BOOT_DIR)/$(BOOT_IMG_NAME).bin + @ls -l $(USR_BOOT_DIR)/$(BOOT_IMG_NAME).* + + diff --git a/example/peripheral/timer_tacho/sdkconfig b/example/peripheral/timer_tacho/sdkconfig new file mode 100644 index 0000000000000000000000000000000000000000..0bcf2870b7f0074d059440baffb3895b44590a92 --- /dev/null +++ b/example/peripheral/timer_tacho/sdkconfig @@ -0,0 +1,264 @@ + +# +# Freertos Configuration +# +CONFIG_TARGET_NAME="freertos" +# end of Freertos Configuration + +# +# Standalone Setting +# +CONFIG_USE_FREERTOS=y + +# +# Arch Configuration +# +# CONFIG_TARGET_ARMV8_AARCH32 is not set +CONFIG_TARGET_ARMV8_AARCH64=y +# CONFIG_USE_CACHE is not set +# CONFIG_USE_SYS_TICK is not set +# CONFIG_MMU_DEBUG_PRINTS is not set +# end of Arch Configuration + +# +# Board Configuration +# +# CONFIG_TARGET_F2000_4 is not set +# CONFIG_TARGET_D2000 is not set +CONFIG_TARGET_E2000Q=y +# CONFIG_TARGET_E2000D is not set +# CONFIG_TARGET_E2000S is not set +CONFIG_TARGET_E2000=y +CONFIG_DEFAULT_DEBUG_PRINT_UART1=y +# CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set +# CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set +# end of Board Configuration + +# +# Components Configuration +# +# CONFIG_USE_SPI is not set +# CONFIG_USE_QSPI is not set +CONFIG_USE_GIC=y +CONFIG_ENABLE_GICV3=y +CONFIG_USE_SERIAL=y + +# +# Usart Configuration +# +CONFIG_ENABLE_Pl011_UART=y +# end of Usart Configuration + +# CONFIG_USE_GPIO is not set +# CONFIG_USE_ETH is not set +# CONFIG_USE_CAN is not set +# CONFIG_USE_I2C is not set +CONFIG_USE_TIMER=y + +# +# Hardware Timer Configuration +# +CONFIG_ENABLE_TIMER_TACHO=y +# end of Hardware Timer Configuration + +# CONFIG_USE_MIO is not set +# CONFIG_USE_SDMMC is not set +# CONFIG_USE_PCIE is not set +# CONFIG_USE_WDT is not set +# CONFIG_USE_DMA is not set +# CONFIG_USE_NAND is not set +# CONFIG_USE_RTC is not set +# CONFIG_USE_SATA is not set +# CONFIG_USE_USB is not set +# CONFIG_USE_ADC is not set +# CONFIG_USE_PWM is not set +# CONFIG_USE_IPC is not set +# end of Components Configuration + +CONFIG_USE_NEW_LIBC=y +# end of Standalone Setting + +# +# Building Option +# +# CONFIG_LOG_VERBOS is not set +# CONFIG_LOG_DEBUG is not set +# CONFIG_LOG_INFO is not set +# CONFIG_LOG_WARN is not set +CONFIG_LOG_ERROR=y +# CONFIG_LOG_NONE is not set +CONFIG_USE_DEFAULT_INTERRUPT_CONFIG=y +CONFIG_INTERRUPT_ROLE_MASTER=y +# CONFIG_INTERRUPT_ROLE_SLAVE is not set +# CONFIG_LOG_EXTRA_INFO is not set +# CONFIG_BOOTUP_DEBUG_PRINTS is not set + +# +# Linker Options +# +# CONFIG_AARCH32_RAM_LD is not set +CONFIG_AARCH64_RAM_LD=y +# CONFIG_USER_DEFINED_LD is not set +CONFIG_LINK_SCRIPT_ROM=y +CONFIG_ROM_START_UP_ADDR=0x80100000 +CONFIG_ROM_SIZE_MB=1 +CONFIG_LINK_SCRIPT_RAM=y +CONFIG_RAM_START_UP_ADDR=0x81000000 +CONFIG_RAM_SIZE_MB=64 +CONFIG_HEAP_SIZE=1 +CONFIG_STACK_SIZE=0x100000 +CONFIG_FPU_STACK_SIZE=0x1000 +# end of Linker Options + +# +# Compiler Options +# + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + +CONFIG_OUTPUT_BINARY=y +# end of Compiler Options +# end of Building Option + +# +# Component Configuration +# + +# +# Freertos Uart Drivers +# +CONFIG_FREERTOS_USE_UART=y +# end of Freertos Uart Drivers + +# +# Freertos Pwm Drivers +# +# CONFIG_FREERTOS_USE_PWM is not set +# end of Freertos Pwm Drivers + +# +# Freertos Qspi Drivers +# +# CONFIG_FREERTOS_USE_QSPI is not set +# end of Freertos Qspi Drivers + +# +# Freertos Wdt Drivers +# +# CONFIG_FREERTOS_USE_WDT is not set +# end of Freertos Wdt Drivers + +# +# Freertos Eth Drivers +# +# CONFIG_FREERTOS_USE_XMAC is not set +# end of Freertos Eth Drivers + +# +# Freertos Gpio Drivers +# +# CONFIG_FREERTOS_USE_GPIO is not set +# end of Freertos Gpio Drivers + +# +# Freertos Spim Drivers +# +# CONFIG_FREERTOS_USE_FSPIM is not set +# end of Freertos Spim Drivers + +# +# Freertos DMA Drivers +# +# CONFIG_FREERTOS_USE_FDDMA is not set +# CONFIG_FREERTOS_USE_FGDMA is not set +# end of Freertos DMA Drivers + +# +# Freertos MMC Drivers +# +# CONFIG_FREERTOS_USE_FSDIO is not set +# end of Freertos MMC Drivers + +# +# Freertos Adc Drivers +# +# CONFIG_FREERTOS_USE_ADC is not set +# end of Freertos Adc Drivers + +# +# Freertos Can Drivers +# +# CONFIG_FREERTOS_USE_CAN is not set +# end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +CONFIG_FREERTOS_USE_TIMER=y +# end of Freertos Timer Drivers +# end of Component Configuration + +# +# Third-Party Configuration +# +# CONFIG_USE_LWIP is not set +CONFIG_USE_BACKTRACE=y +# CONFIG_USE_FATFS is not set +# CONFIG_USE_SFUD is not set +# CONFIG_USE_SPIFFS is not set +# CONFIG_USE_AMP is not set +CONFIG_USE_LETTER_SHELL=y + +# +# Letter Shell Configuration +# +CONFIG_LS_PL011_UART=y +CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y +# CONFIG_DEFAULT_LETTER_SHELL_USE_UART0 is not set +# CONFIG_DEFAULT_LETTER_SHELL_USE_UART2 is not set +# end of Letter Shell Configuration + +# CONFIG_USE_TLSF is not set +# CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/timer_tacho/sdkconfig.h b/example/peripheral/timer_tacho/sdkconfig.h new file mode 100644 index 0000000000000000000000000000000000000000..12e48b6e3ed82488c4960f5c15ff965d0d704da8 --- /dev/null +++ b/example/peripheral/timer_tacho/sdkconfig.h @@ -0,0 +1,232 @@ +#ifndef SDK_CONFIG_H__ +#define SDK_CONFIG_H__ + +/* Freertos Configuration */ + +#define CONFIG_TARGET_NAME "freertos" +/* end of Freertos Configuration */ + +/* Standalone Setting */ + +#define CONFIG_USE_FREERTOS + +/* Arch Configuration */ + +/* CONFIG_TARGET_ARMV8_AARCH32 is not set */ +#define CONFIG_TARGET_ARMV8_AARCH64 +/* CONFIG_USE_CACHE is not set */ +/* CONFIG_USE_SYS_TICK is not set */ +/* CONFIG_MMU_DEBUG_PRINTS is not set */ +/* end of Arch Configuration */ + +/* Board Configuration */ + +/* CONFIG_TARGET_F2000_4 is not set */ +/* CONFIG_TARGET_D2000 is not set */ +#define CONFIG_TARGET_E2000Q +/* CONFIG_TARGET_E2000D is not set */ +/* CONFIG_TARGET_E2000S is not set */ +#define CONFIG_TARGET_E2000 +#define CONFIG_DEFAULT_DEBUG_PRINT_UART1 +/* CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set */ +/* CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set */ +/* end of Board Configuration */ + +/* Components Configuration */ + +/* CONFIG_USE_SPI is not set */ +/* CONFIG_USE_QSPI is not set */ +#define CONFIG_USE_GIC +#define CONFIG_ENABLE_GICV3 +#define CONFIG_USE_SERIAL + +/* Usart Configuration */ + +#define CONFIG_ENABLE_Pl011_UART +/* end of Usart Configuration */ +/* CONFIG_USE_GPIO is not set */ +/* CONFIG_USE_ETH is not set */ +/* CONFIG_USE_CAN is not set */ +/* CONFIG_USE_I2C is not set */ +#define CONFIG_USE_TIMER + +/* Hardware Timer Configuration */ + +#define CONFIG_ENABLE_TIMER_TACHO +/* end of Hardware Timer Configuration */ +/* CONFIG_USE_MIO is not set */ +/* CONFIG_USE_SDMMC is not set */ +/* CONFIG_USE_PCIE is not set */ +/* CONFIG_USE_WDT is not set */ +/* CONFIG_USE_DMA is not set */ +/* CONFIG_USE_NAND is not set */ +/* CONFIG_USE_RTC is not set */ +/* CONFIG_USE_SATA is not set */ +/* CONFIG_USE_USB is not set */ +/* CONFIG_USE_ADC is not set */ +/* CONFIG_USE_PWM is not set */ +/* CONFIG_USE_IPC is not set */ +/* end of Components Configuration */ +#define CONFIG_USE_NEW_LIBC +/* end of Standalone Setting */ + +/* Building Option */ + +/* CONFIG_LOG_VERBOS is not set */ +/* CONFIG_LOG_DEBUG is not set */ +/* CONFIG_LOG_INFO is not set */ +/* CONFIG_LOG_WARN is not set */ +#define CONFIG_LOG_ERROR +/* CONFIG_LOG_NONE is not set */ +#define CONFIG_USE_DEFAULT_INTERRUPT_CONFIG +#define CONFIG_INTERRUPT_ROLE_MASTER +/* CONFIG_INTERRUPT_ROLE_SLAVE is not set */ +/* CONFIG_LOG_EXTRA_INFO is not set */ +/* CONFIG_BOOTUP_DEBUG_PRINTS is not set */ + +/* Linker Options */ + +/* CONFIG_AARCH32_RAM_LD is not set */ +#define CONFIG_AARCH64_RAM_LD +/* CONFIG_USER_DEFINED_LD is not set */ +#define CONFIG_LINK_SCRIPT_ROM +#define CONFIG_ROM_START_UP_ADDR 0x80100000 +#define CONFIG_ROM_SIZE_MB 1 +#define CONFIG_LINK_SCRIPT_RAM +#define CONFIG_RAM_START_UP_ADDR 0x81000000 +#define CONFIG_RAM_SIZE_MB 64 +#define CONFIG_HEAP_SIZE 1 +#define CONFIG_STACK_SIZE 0x100000 +#define CONFIG_FPU_STACK_SIZE 0x1000 +/* end of Linker Options */ + +/* Compiler Options */ + +/* Cross-Compiler Setting */ + +#define CONFIG_GCC_OPTIMIZE_LEVEL 0 +/* CONFIG_USE_EXT_COMPILER is not set */ +/* CONFIG_USE_KLIN_SYS is not set */ +/* end of Cross-Compiler Setting */ +#define CONFIG_OUTPUT_BINARY +/* end of Compiler Options */ +/* end of Building Option */ + +/* Component Configuration */ + +/* Freertos Uart Drivers */ + +#define CONFIG_FREERTOS_USE_UART +/* end of Freertos Uart Drivers */ + +/* Freertos Pwm Drivers */ + +/* CONFIG_FREERTOS_USE_PWM is not set */ +/* end of Freertos Pwm Drivers */ + +/* Freertos Qspi Drivers */ + +/* CONFIG_FREERTOS_USE_QSPI is not set */ +/* end of Freertos Qspi Drivers */ + +/* Freertos Wdt Drivers */ + +/* CONFIG_FREERTOS_USE_WDT is not set */ +/* end of Freertos Wdt Drivers */ + +/* Freertos Eth Drivers */ + +/* CONFIG_FREERTOS_USE_XMAC is not set */ +/* end of Freertos Eth Drivers */ + +/* Freertos Gpio Drivers */ + +/* CONFIG_FREERTOS_USE_GPIO is not set */ +/* end of Freertos Gpio Drivers */ + +/* Freertos Spim Drivers */ + +/* CONFIG_FREERTOS_USE_FSPIM is not set */ +/* end of Freertos Spim Drivers */ + +/* Freertos DMA Drivers */ + +/* CONFIG_FREERTOS_USE_FDDMA is not set */ +/* CONFIG_FREERTOS_USE_FGDMA is not set */ +/* end of Freertos DMA Drivers */ + +/* Freertos MMC Drivers */ + +/* CONFIG_FREERTOS_USE_FSDIO is not set */ +/* end of Freertos MMC Drivers */ + +/* Freertos Adc Drivers */ + +/* CONFIG_FREERTOS_USE_ADC is not set */ +/* end of Freertos Adc Drivers */ + +/* Freertos Can Drivers */ + +/* CONFIG_FREERTOS_USE_CAN is not set */ +/* end of Freertos Can Drivers */ + +/* Freertos I2c Drivers */ + +/* CONFIG_FREERTOS_USE_I2C is not set */ +/* end of Freertos I2c Drivers */ + +/* Freertos Mio Drivers */ + +/* CONFIG_FREERTOS_USE_MIO is not set */ +/* end of Freertos Mio Drivers */ + +/* Freertos Timer Drivers */ + +#define CONFIG_FREERTOS_USE_TIMER +/* end of Freertos Timer Drivers */ +/* end of Component Configuration */ + +/* Third-Party Configuration */ + +/* CONFIG_USE_LWIP is not set */ +#define CONFIG_USE_BACKTRACE +/* CONFIG_USE_FATFS is not set */ +/* CONFIG_USE_SFUD is not set */ +/* CONFIG_USE_SPIFFS is not set */ +/* CONFIG_USE_AMP is not set */ +#define CONFIG_USE_LETTER_SHELL + +/* Letter Shell Configuration */ + +#define CONFIG_LS_PL011_UART +#define CONFIG_DEFAULT_LETTER_SHELL_USE_UART1 +/* CONFIG_DEFAULT_LETTER_SHELL_USE_UART0 is not set */ +/* CONFIG_DEFAULT_LETTER_SHELL_USE_UART2 is not set */ +/* end of Letter Shell Configuration */ +/* CONFIG_USE_TLSF is not set */ +/* CONFIG_USE_SDMMC_CMD is not set */ +/* CONFIG_USE_CHERRY_USB is not set */ +/* end of Third-Party Configuration */ + +/* Kernel Configuration */ + +#define CONFIG_FREERTOS_OPTIMIZED_SCHEDULER +#define CONFIG_FREERTOS_HZ 1000 +#define CONFIG_FREERTOS_MAX_PRIORITIES 32 +#define CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES 13 +#define CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES 11 +#define CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS 1 +#define CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE 1024 +#define CONFIG_FREERTOS_MAX_TASK_NAME_LEN 32 +#define CONFIG_FREERTOS_TIMER_TASK_PRIORITY 1 +#define CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH 2048 +#define CONFIG_FREERTOS_TIMER_QUEUE_LENGTH 10 +#define CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE 0 +#define CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS +#define CONFIG_FREERTOS_USE_TRACE_FACILITY +#define CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS +/* CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set */ +#define CONFIG_FREERTOS_TOTAL_HEAP_SIZE 10240 +/* end of Kernel Configuration */ + +#endif diff --git a/example/peripheral/timer_tacho/src/timer_tacho_example.c b/example/peripheral/timer_tacho/src/timer_tacho_example.c new file mode 100644 index 0000000000000000000000000000000000000000..3bb93397741b8cd3003f65f27fe5e994fae3adf6 --- /dev/null +++ b/example/peripheral/timer_tacho/src/timer_tacho_example.c @@ -0,0 +1,388 @@ +/* + * Copyright : (C) 2022 Phytium Information Technology, Inc. + * All Rights Reserved. + * + * This program is OPEN SOURCE software: you can redistribute it and/or modify it + * under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd, + * either version 1.0 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the Phytium Public License for more details. + * + * + * FilePath: timer_tacho_example.c + * Date: 2022-08-24 13:57:55 + * LastEditTime: 2022-08-24 13:57:56 + * Description:  This file is for + * + * Modify History: + * Ver   Who        Date         Changes + * ----- ------     --------    -------------------------------------- + */ + +#include +#include "FreeRTOSConfig.h" +#include "FreeRTOS.h" +#include "task.h" +#include "fpinctrl.h" +#include "fassert.h" +#include "timers.h" +#include "ftimer_tacho_os.h" +#include "timer_tacho_example.h" +#include "fparameters.h" +#include "fpinctrl.h" +#include "fcpu_info.h" +#include "sdkconfig.h" +#include "fdebug.h" + +/* The periods assigned to the one-shot timers. */ +#define ONE_SHOT_TIMER_PERIOD ( pdMS_TO_TICKS( 50000UL ) ) + +#define TIMER_IRQ_PRIORITY 0xb +#define TACHO_IRQ_PRIORITY 0xc +#define TIMER_INSTANCE_NUM 0U +#define TACHO_INSTANCE_NUM 12U + +/* write and read task delay in milliseconds */ +#define TASK_DELAY_MS 2000UL + +static xTaskHandle timer_handle; +static xTaskHandle tacho_handle; +static xTaskHandle cap_handle; +static xTaskHandle init_handle; + +static FFreeRTOSTimerTacho *os_timer_ctrl; +static FFreeRTOSTimerTacho *os_tacho_ctrl; + +volatile int timerflag = 0; +volatile int tachoflag = 0; + +/***** timer intr and handler******/ +/** + * @name: CycCmpIntrHandler + * @msg: 循环定时回调函数 + * @return {*} + * @param {void} *param + */ +static void CycCmpIntrHandler(void *param) +{ + FTimerTachoCtrl *instance_p = (FTimerTachoCtrl *)param; + timerflag++; + printf("cyc intr,id: %d,times_in: %d.\n\r\n", instance_p->config.id, timerflag); +} + +/** + * @name: OnceCmpIntrHandler + * @msg: 单次定时回调服务函数 + * @return {*} + * @param {void} *param + */ +static void OnceCmpIntrHandler(void *param) +{ + FTimerTachoCtrl *instance_p = (FTimerTachoCtrl *)param; + printf("once cmp intr, timer id: %d.\r\n", instance_p->config.id); + FTimerSetInterruptMask(instance_p, FTIMER_EVENT_ONCE_CMP, FALSE); +} + +/** + * @name: RolloverIntrHandler + * @msg: 此中断已经在驱动层进行了屏蔽,由于我们设置的cmp值已经是翻转值,所以等同于中断计数中断,此处可作为用法的拓展 + * @return {*} + * @param {void} *param + */ +static void RolloverIntrHandler(void *param) +{ + FTimerTachoCtrl *instance_p = (FTimerTachoCtrl *)param; + /* Anything else that you can do.*/ + printf("roll over cmp intr, timer id: %d", instance_p->config.id); +} + +/** + * @name: TimerDisableIntr + * @msg: 失能中断 + * @return {void} + * @param {FTimerTachoCtrl} *instance_p 驱动控制数据结构 + */ +void TimerDisableIntr(FTimerTachoCtrl *instance_p) +{ + u32 irq_num = FTIMER_TACHO_IRQ_NUM(instance_p->config.id); + + InterruptMask(irq_num); +} + +/** + * @name: TimerEnableIntr + * @msg: 设置并且使能中断 + * @return {void} + * @param {FTimerTachoCtrl} *instance_p 驱动控制数据结构 + */ +static void TimerEnableIntr(FTimerTachoCtrl *instance_p) +{ + FASSERT(instance_p); + + u32 irq_num = FTIMER_TACHO_IRQ_NUM(instance_p->config.id); + + u32 cpu_id; + GetCpuId(&cpu_id); + InterruptSetTargetCpus(irq_num, cpu_id); + printf("cpu_id is cpu_id %d,irq_num:%d, \r\n",cpu_id,irq_num); + /* disable timer irq */ + InterruptMask(irq_num); + + /* umask timer irq */ + InterruptSetPriority(irq_num, TIMER_IRQ_PRIORITY); + InterruptInstall(irq_num, FTimerTachoIntrHandler, instance_p, instance_p->config.name); + + FTimerTachoSetIntr(instance_p); + /* enable irq */ + InterruptUmask(irq_num); + + return ; +} + +/***** tacho intr and handler******/ + +static void TachoDisableIntr(FTimerTachoCtrl *instance_p) +{ + FASSERT(instance_p); + u32 irq_num = FTIMER_TACHO_IRQ_NUM(instance_p->config.id); + InterruptMask(irq_num); +} + +static void TachOverIntrHandler(void *param) +{ + FTimerTachoCtrl *instance_p = (FTimerTachoCtrl *)param; + u32 irq_num = FTIMER_TACHO_IRQ_NUM(instance_p->config.id); + InterruptMask(irq_num); + u32 rpm; + FTachoGetFanRPM(instance_p,&rpm); + printf("TachOver intr,tacho id: %d,rpm:%d.\r\n", instance_p->config.id,rpm); + InterruptUmask(irq_num); + tachoflag++; + if (tachoflag > 20) + { + tachoflag = 0; + TachoDisableIntr(instance_p); + printf("Please deinit tacho,then init."); + } +} + +static void CapIntrHandler(void *param) +{ + FTimerTachoCtrl *instance_p = (FTimerTachoCtrl *)param; + printf("TachCapt intr,tacho id: %d", instance_p->config.id); +} + +static void TachUnderIntrHandler(void *param) +{ + FTimerTachoCtrl *instance_p = (FTimerTachoCtrl *)param; + u32 irq_num = FTIMER_TACHO_IRQ_NUM(instance_p->config.id); + InterruptMask(irq_num); + u32 rpm; + FTachoGetFanRPM(instance_p,&rpm); + printf("TachUnder intr,tacho id: %d,rpm:%d.\r\n", instance_p->config.id,rpm); + InterruptUmask(irq_num); + tachoflag++; + if (tachoflag > 20) + { + tachoflag = 0; + TachoDisableIntr(instance_p); + printf("Please deinit tacho,then init."); + } +} + +void TachoEnableIntr(FTimerTachoCtrl *instance_p) +{ + FASSERT(instance_p); + u32 irq_num = FTIMER_TACHO_IRQ_NUM(instance_p->config.id); + + u32 cpu_id; + GetCpuId(&cpu_id); + printf("cpu_id is cpu_id %d,irq_num:%d, \r\n",cpu_id,irq_num); + InterruptSetTargetCpus(irq_num, cpu_id); + + /* disable timer irq */ + InterruptMask(irq_num); + + /* umask timer irq */ + InterruptSetPriority(irq_num, TACHO_IRQ_PRIORITY); + InterruptInstall(irq_num, FTimerTachoIntrHandler, instance_p, instance_p->config.name); + + FTimerTachoSetIntr(instance_p); + /* enable irq */ + InterruptUmask(irq_num); + + return; +} + +static void TimerTask(void *pvParameters) +{ + TickType_t xDelay = pdMS_TO_TICKS(TASK_DELAY_MS); + FError ret = FREERTOS_TIMER_TACHO_SUCCESS; + FFreeRTOSTimerTacho *timer_p = (FFreeRTOSTimerTacho *)pvParameters; + vTaskDelay(xDelay); + printf("\r\n*****TimerTask is running...\r\n"); + + TimerEnableIntr(&os_timer_ctrl->ctrl); + ret = FFreeRTOSTimerStart(timer_p); + if (ret != FREERTOS_TIMER_TACHO_SUCCESS) + { + printf("TimerTask Start failed.\r\n"); + return; + } + + xDelay = pdMS_TO_TICKS(10000);/*delay 10s*/ + vTaskDelay(xDelay); + + ret = FFreeRTOSTimerStop(timer_p); + if (ret != FREERTOS_TIMER_TACHO_SUCCESS) + { + printf("TimerTask Stop failed.\r\n"); + return; + } + + /* disable timer irq */ + TimerDisableIntr(&os_timer_ctrl->ctrl); + FFreeRTOSTimerDeinit(timer_p); + printf("*** TimerTask over.\r\n"); + vTaskDelete(NULL); +} + +static void TachoTask(void *pvParameters) +{ + const TickType_t xDelay = pdMS_TO_TICKS(TASK_DELAY_MS); + FFreeRTOSTimerTacho *tacho_p = (FFreeRTOSTimerTacho *)pvParameters; + FError ret = FREERTOS_TIMER_TACHO_SUCCESS; + vTaskDelay(xDelay); + printf( "\r\n*****TachoTask is running...\r\n" ); + + TachoEnableIntr(&tacho_p->ctrl); + ret = FFreeRTOSTimerStart(tacho_p); + u32 rpm; + vTaskDelay(100);/*等待采样周期完成*/ + if (ret != FREERTOS_TIMER_TACHO_SUCCESS) + { + printf("Tacho start failed.\r\n"); + return; + } + for (size_t i = 0; i < 5; i++) + { + ret = FFreeRTOSTachoGetRPM(tacho_p,&rpm); + if (ret != FREERTOS_TIMER_TACHO_SUCCESS) + { + printf("TachoTask Stop failed.\r\n"); + return; + } + printf("***GET_RPM:%d.\r\n",rpm); + vTaskDelay(xDelay);/*Collect every 2 seconds*/ + } + TachoDisableIntr(&tacho_p->ctrl); + FFreeRTOSTimerStop(tacho_p); + FFreeRTOSTachoDeinit(tacho_p); + +tacho_task_exit: + printf("*** TachoTask over.\r\n"); + vTaskDelete(NULL); +} + +static void captask(void *pvParameters) +{ + const TickType_t xDelay = pdMS_TO_TICKS(TASK_DELAY_MS); + FFreeRTOSTimerTacho *cap_p = (FFreeRTOSTimerTacho *)pvParameters; + FError ret = FREERTOS_TIMER_TACHO_SUCCESS; + vTaskDelay(pdMS_TO_TICKS(1)); + + printf( "\r\n*****TimerCapTask is running...\r\n" ); + + TachoEnableIntr(&cap_p->ctrl); + ret = FFreeRTOSTimerStart(cap_p); + if (ret != FREERTOS_TIMER_TACHO_SUCCESS) + { + printf("Tacho start failed.\r\n"); + goto tacho_task_exit; + } + for (size_t i = 0; i < 5; i++) + { + printf("Get id %d CaptureCnt is :%d.\r\n",cap_p->ctrl.config.id,FFreeRTOSTachoGetCNT(cap_p)); + vTaskDelay(pdMS_TO_TICKS(1)); + } + /* disable tacho irq */ + TachoDisableIntr(&cap_p->ctrl); + FFreeRTOSTimerStop(cap_p); + FFreeRTOSTachoDeinit(cap_p); + +tacho_task_exit: + printf(" TimerCapTask over.\r\n"); + vTaskDelete(NULL); +} + +static void InitTask(void *pvParameters) +{ + BaseType_t xReturn = pdPASS; + /* init timers controller */ + + os_timer_ctrl = FFreeRTOSTimerInit(TIMER_INSTANCE_NUM, FTIMER_CYC_CMP, 2000000);/* 2000000 us = 2 s */ + if (os_timer_ctrl == NULL) + { + printf("*timer init error.\r\n"); + goto timer_init_exit; + } + FTimerRegisterEvtCallback(&os_timer_ctrl->ctrl, FTIMER_EVENT_CYC_CMP, CycCmpIntrHandler); + FTimerRegisterEvtCallback(&os_timer_ctrl->ctrl, FTIMER_EVENT_ONCE_CMP, OnceCmpIntrHandler); + FTimerRegisterEvtCallback(&os_timer_ctrl->ctrl, FTIMER_EVENT_ROLL_OVER, RolloverIntrHandler); + + /*init mode: FTIMER_WORK_MODE_CAPTURE or FTIMER_WORK_MODE_TACHO */ + os_tacho_ctrl = FFreeRTOSTachoInit(TACHO_INSTANCE_NUM, FTIMER_WORK_MODE_TACHO); + if (os_timer_ctrl == NULL) + { + printf("*tacho init error.\r\n"); + goto timer_init_exit; + } + FTimerRegisterEvtCallback(&os_tacho_ctrl->ctrl, FTACHO_EVENT_OVER, TachOverIntrHandler); + FTimerRegisterEvtCallback(&os_tacho_ctrl->ctrl, FTACHO_EVENT_UNDER, TachUnderIntrHandler); + FTimerRegisterEvtCallback(&os_tacho_ctrl->ctrl, FTACHO_EVENT_CAPTURE, CapIntrHandler); + + taskENTER_CRITICAL(); //进入临界区 + xReturn = xTaskCreate((TaskFunction_t)TimerTask, /* 任务入口函数 */ + (const char *)"TimerTask", /* 任务名字 */ + (uint16_t)1024, /* 任务栈大小 */ + (void *)os_timer_ctrl, /* 任务入口函数参数 */ + (UBaseType_t)configMAX_PRIORITIES - 1, /* 任务的优先级 */ + (TaskHandle_t *)&timer_handle); /* 任务控制 */ + FASSERT_MSG(xReturn == pdPASS,"TimerTask create is failed"); + + xReturn = xTaskCreate((TaskFunction_t)TachoTask, /* 任务入口函数 */ + (const char* )"TachoTask",/* 任务名字 */ + (uint16_t)1024, /* 任务栈大小 */ + (void* )os_tacho_ctrl,/* 任务入口函数参数 */ + (UBaseType_t)configMAX_PRIORITIES - 2, /* 任务的优先级 */ + (TaskHandle_t* )&tacho_handle); /* 任务控制 */ + FASSERT_MSG(xReturn == pdPASS,"TachoTask create is failed"); + + taskEXIT_CRITICAL(); //退出临界区 +timer_init_exit: + vTaskDelete(NULL); +} + +BaseType_t FFreeRTOSTimerTachoCreate(void) +{ + BaseType_t xReturn = pdPASS;/* 定义一个创建信息返回值,默认为 pdPASS */ + + taskENTER_CRITICAL(); //进入临界区 + + /* init timers controller */ + + xReturn = xTaskCreate((TaskFunction_t )InitTask, /* 任务入口函数 */ + (const char* )"InitTask",/* 任务名字 */ + (uint16_t )1024, /* 任务栈大小 */ + (void* )NULL,/* 任务入口函数参数 */ + (UBaseType_t )configMAX_PRIORITIES-1, /* 任务的优先级 */ + (TaskHandle_t* )&init_handle); /* 任务控制 */ + FASSERT_MSG(xReturn == pdPASS,"TachoTask create is failed"); + + taskEXIT_CRITICAL(); //退出临界区 + + return xReturn; +} + diff --git a/example/peripheral/usb/cherryusb_host/configs/e2000d_aarch32_eg_configs b/example/peripheral/usb/cherryusb_host/configs/e2000d_aarch32_eg_configs index 6c949218c8b063d49d05f5751cf50510c2f07e66..44be435dbca71625cccb00bef6f8f3df028b3736 100644 --- a/example/peripheral/usb/cherryusb_host/configs/e2000d_aarch32_eg_configs +++ b/example/peripheral/usb/cherryusb_host/configs/e2000d_aarch32_eg_configs @@ -112,6 +112,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -169,12 +178,6 @@ CONFIG_FREERTOS_USE_FSPIM=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -186,14 +189,33 @@ CONFIG_FREERTOS_USE_FSPIM=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -226,4 +248,26 @@ CONFIG_CHERRY_USB_HOST_VEDIO=y CONFIG_CHERRY_USB_HOST_CDC=y CONFIG_CHERRY_USB_HOST_RNDIS_WIRELESS=y # end of CherryUSB Configuration -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/usb/cherryusb_host/configs/e2000d_aarch64_eg_configs b/example/peripheral/usb/cherryusb_host/configs/e2000d_aarch64_eg_configs index 5ee6831fd2f1f39daf502e29b45617c5a60b20fa..18ab06ae89fb6a028080816e8e22aea1a2d27f0a 100644 --- a/example/peripheral/usb/cherryusb_host/configs/e2000d_aarch64_eg_configs +++ b/example/peripheral/usb/cherryusb_host/configs/e2000d_aarch64_eg_configs @@ -108,6 +108,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -165,12 +174,6 @@ CONFIG_FREERTOS_USE_FSPIM=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -182,14 +185,33 @@ CONFIG_FREERTOS_USE_FSPIM=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -222,4 +244,26 @@ CONFIG_CHERRY_USB_HOST_VEDIO=y CONFIG_CHERRY_USB_HOST_CDC=y CONFIG_CHERRY_USB_HOST_RNDIS_WIRELESS=y # end of CherryUSB Configuration -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/usb/cherryusb_host/configs/e2000s_aarch32_eg_configs b/example/peripheral/usb/cherryusb_host/configs/e2000s_aarch32_eg_configs index ecbd00e88a113cbae6ab1e377f7946916585f3e6..283a2729489b7b67c1f5a440106ed3ddbead0826 100644 --- a/example/peripheral/usb/cherryusb_host/configs/e2000s_aarch32_eg_configs +++ b/example/peripheral/usb/cherryusb_host/configs/e2000s_aarch32_eg_configs @@ -112,6 +112,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -169,12 +178,6 @@ CONFIG_FREERTOS_USE_FSPIM=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -186,14 +189,33 @@ CONFIG_FREERTOS_USE_FSPIM=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -226,4 +248,26 @@ CONFIG_CHERRY_USB_HOST_VEDIO=y CONFIG_CHERRY_USB_HOST_CDC=y CONFIG_CHERRY_USB_HOST_RNDIS_WIRELESS=y # end of CherryUSB Configuration -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/usb/cherryusb_host/configs/e2000s_aarch64_eg_configs b/example/peripheral/usb/cherryusb_host/configs/e2000s_aarch64_eg_configs index f1823f7834a570038e29c17e38841563ccbe7df1..feff81a1e20819300da4d0312e772cff04f9ec5e 100644 --- a/example/peripheral/usb/cherryusb_host/configs/e2000s_aarch64_eg_configs +++ b/example/peripheral/usb/cherryusb_host/configs/e2000s_aarch64_eg_configs @@ -108,6 +108,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -165,12 +174,6 @@ CONFIG_FREERTOS_USE_FSPIM=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -182,14 +185,33 @@ CONFIG_FREERTOS_USE_FSPIM=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -222,4 +244,26 @@ CONFIG_CHERRY_USB_HOST_VEDIO=y CONFIG_CHERRY_USB_HOST_CDC=y CONFIG_CHERRY_USB_HOST_RNDIS_WIRELESS=y # end of CherryUSB Configuration -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/usb/cherryusb_host/sdkconfig b/example/peripheral/usb/cherryusb_host/sdkconfig index f1823f7834a570038e29c17e38841563ccbe7df1..feff81a1e20819300da4d0312e772cff04f9ec5e 100644 --- a/example/peripheral/usb/cherryusb_host/sdkconfig +++ b/example/peripheral/usb/cherryusb_host/sdkconfig @@ -108,6 +108,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -165,12 +174,6 @@ CONFIG_FREERTOS_USE_FSPIM=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -182,14 +185,33 @@ CONFIG_FREERTOS_USE_FSPIM=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -222,4 +244,26 @@ CONFIG_CHERRY_USB_HOST_VEDIO=y CONFIG_CHERRY_USB_HOST_CDC=y CONFIG_CHERRY_USB_HOST_RNDIS_WIRELESS=y # end of CherryUSB Configuration -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/usb/cherryusb_host/sdkconfig.h b/example/peripheral/usb/cherryusb_host/sdkconfig.h index ef67d74ffd0e9fb9558bf70e7289ddfeddf8257c..e7f637f4ef707014fa564349e4459a863671754f 100644 --- a/example/peripheral/usb/cherryusb_host/sdkconfig.h +++ b/example/peripheral/usb/cherryusb_host/sdkconfig.h @@ -99,6 +99,12 @@ /* Compiler Options */ +/* Cross-Compiler Setting */ + +#define CONFIG_GCC_OPTIMIZE_LEVEL 0 +/* CONFIG_USE_EXT_COMPILER is not set */ +/* CONFIG_USE_KLIN_SYS is not set */ +/* end of Cross-Compiler Setting */ #define CONFIG_OUTPUT_BINARY /* end of Compiler Options */ /* end of Building Option */ @@ -146,11 +152,6 @@ /* CONFIG_FREERTOS_USE_FGDMA is not set */ /* end of Freertos DMA Drivers */ -/* Freertos MMC Drivers */ - -/* CONFIG_FREERTOS_USE_FSDIO is not set */ -/* end of Freertos MMC Drivers */ - /* Freertos Adc Drivers */ /* CONFIG_FREERTOS_USE_ADC is not set */ @@ -160,13 +161,29 @@ /* CONFIG_FREERTOS_USE_CAN is not set */ /* end of Freertos Can Drivers */ + +/* Freertos I2c Drivers */ + +/* CONFIG_FREERTOS_USE_I2C is not set */ +/* end of Freertos I2c Drivers */ + +/* Freertos Mio Drivers */ + +/* CONFIG_FREERTOS_USE_MIO is not set */ +/* end of Freertos Mio Drivers */ + +/* Freertos Timer Drivers */ + +/* CONFIG_FREERTOS_USE_TIMER is not set */ +/* end of Freertos Timer Drivers */ /* end of Component Configuration */ -/* FreeRTOS Setting */ +/* Third-Party Configuration */ /* CONFIG_USE_LWIP is not set */ #define CONFIG_USE_BACKTRACE /* CONFIG_USE_FATFS is not set */ +/* CONFIG_USE_FATFS_0_1_4 is not set */ /* CONFIG_USE_SFUD is not set */ /* CONFIG_USE_SPIFFS is not set */ /* CONFIG_USE_AMP is not set */ @@ -196,6 +213,27 @@ #define CONFIG_CHERRY_USB_HOST_CDC #define CONFIG_CHERRY_USB_HOST_RNDIS_WIRELESS /* end of CherryUSB Configuration */ -/* end of FreeRTOS Setting */ +/* end of Third-Party Configuration */ + +/* Kernel Configuration */ + +#define CONFIG_FREERTOS_OPTIMIZED_SCHEDULER +#define CONFIG_FREERTOS_HZ 1000 +#define CONFIG_FREERTOS_MAX_PRIORITIES 32 +#define CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES 13 +#define CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES 11 +#define CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS 1 +#define CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE 1024 +#define CONFIG_FREERTOS_MAX_TASK_NAME_LEN 32 +#define CONFIG_FREERTOS_TIMER_TASK_PRIORITY 1 +#define CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH 2048 +#define CONFIG_FREERTOS_TIMER_QUEUE_LENGTH 10 +#define CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE 0 +#define CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS +#define CONFIG_FREERTOS_USE_TRACE_FACILITY +#define CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS +/* CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set */ +#define CONFIG_FREERTOS_TOTAL_HEAP_SIZE 10240 +/* end of Kernel Configuration */ #endif diff --git a/example/peripheral/wdt/configs/d2000_aarch32_eg_configs b/example/peripheral/wdt/configs/d2000_aarch32_eg_configs index 76098bcbb23b03e1e415b177520e33998ca54f38..67ad8d9c83871ab0273ade9703e9bd8c3ec358fc 100644 --- a/example/peripheral/wdt/configs/d2000_aarch32_eg_configs +++ b/example/peripheral/wdt/configs/d2000_aarch32_eg_configs @@ -118,6 +118,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -175,12 +184,6 @@ CONFIG_FREERTOS_USE_WDT=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -192,14 +195,33 @@ CONFIG_FREERTOS_USE_WDT=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -217,4 +239,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/wdt/configs/d2000_aarch64_eg_configs b/example/peripheral/wdt/configs/d2000_aarch64_eg_configs index 1d2d7a81d164e19aba1d05defdd0d9851c9f214f..8fd56f374ea045558ce86468996d6e3da79d0c1f 100644 --- a/example/peripheral/wdt/configs/d2000_aarch64_eg_configs +++ b/example/peripheral/wdt/configs/d2000_aarch64_eg_configs @@ -114,6 +114,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -171,12 +180,6 @@ CONFIG_FREERTOS_USE_WDT=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -188,14 +191,33 @@ CONFIG_FREERTOS_USE_WDT=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -213,4 +235,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/wdt/configs/e2000d_aarch32_eg_configs b/example/peripheral/wdt/configs/e2000d_aarch32_eg_configs index bb8130e22c62a332467b8e4deedb1ff16b87132b..d9fab34dde61620f5fb77ec2bb617e28be2a65f0 100644 --- a/example/peripheral/wdt/configs/e2000d_aarch32_eg_configs +++ b/example/peripheral/wdt/configs/e2000d_aarch32_eg_configs @@ -118,6 +118,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -175,12 +184,6 @@ CONFIG_FREERTOS_USE_WDT=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -192,14 +195,33 @@ CONFIG_FREERTOS_USE_WDT=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -217,4 +239,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/wdt/configs/e2000d_aarch64_eg_configs b/example/peripheral/wdt/configs/e2000d_aarch64_eg_configs index 5b6d679c238cfe48d89b1922105f064e24261751..f96fb048daac9909f732a0fd43101489e77d2fa5 100644 --- a/example/peripheral/wdt/configs/e2000d_aarch64_eg_configs +++ b/example/peripheral/wdt/configs/e2000d_aarch64_eg_configs @@ -114,6 +114,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -171,12 +180,6 @@ CONFIG_FREERTOS_USE_WDT=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -188,14 +191,33 @@ CONFIG_FREERTOS_USE_WDT=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -213,4 +235,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/wdt/configs/ft2004_aarch32_eg_configs b/example/peripheral/wdt/configs/ft2004_aarch32_eg_configs index 0c4e6a66156af8f2e25e3265c4aecf47922fc0d7..6c5a713840708f10e9039ad9f11df1e475882803 100644 --- a/example/peripheral/wdt/configs/ft2004_aarch32_eg_configs +++ b/example/peripheral/wdt/configs/ft2004_aarch32_eg_configs @@ -118,6 +118,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -175,12 +184,6 @@ CONFIG_FREERTOS_USE_WDT=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -192,14 +195,33 @@ CONFIG_FREERTOS_USE_WDT=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -217,4 +239,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/wdt/configs/ft2004_aarch64_eg_configs b/example/peripheral/wdt/configs/ft2004_aarch64_eg_configs index d5e9c66c7a43cd7bd384f35b54d50a624a91ca03..6c8708d8194cb63c734fd9281f2ab4784f4af2f4 100644 --- a/example/peripheral/wdt/configs/ft2004_aarch64_eg_configs +++ b/example/peripheral/wdt/configs/ft2004_aarch64_eg_configs @@ -114,6 +114,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -171,12 +180,6 @@ CONFIG_FREERTOS_USE_WDT=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -188,14 +191,33 @@ CONFIG_FREERTOS_USE_WDT=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -213,4 +235,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/wdt/sdkconfig b/example/peripheral/wdt/sdkconfig index 5b6d679c238cfe48d89b1922105f064e24261751..f96fb048daac9909f732a0fd43101489e77d2fa5 100644 --- a/example/peripheral/wdt/sdkconfig +++ b/example/peripheral/wdt/sdkconfig @@ -114,6 +114,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -171,12 +180,6 @@ CONFIG_FREERTOS_USE_WDT=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -188,14 +191,33 @@ CONFIG_FREERTOS_USE_WDT=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -213,4 +235,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/peripheral/wdt/sdkconfig.h b/example/peripheral/wdt/sdkconfig.h index 1c8b59bbc9d9f616d71970e00fcbe42d2d80895b..8d8d689978006e87c94b6dac910af6b32d1d8d67 100644 --- a/example/peripheral/wdt/sdkconfig.h +++ b/example/peripheral/wdt/sdkconfig.h @@ -103,6 +103,12 @@ /* Compiler Options */ +/* Cross-Compiler Setting */ + +#define CONFIG_GCC_OPTIMIZE_LEVEL 0 +/* CONFIG_USE_EXT_COMPILER is not set */ +/* CONFIG_USE_KLIN_SYS is not set */ +/* end of Cross-Compiler Setting */ #define CONFIG_OUTPUT_BINARY /* end of Compiler Options */ /* end of Building Option */ @@ -150,11 +156,6 @@ /* CONFIG_FREERTOS_USE_FGDMA is not set */ /* end of Freertos DMA Drivers */ -/* Freertos MMC Drivers */ - -/* CONFIG_FREERTOS_USE_FSDIO is not set */ -/* end of Freertos MMC Drivers */ - /* Freertos Adc Drivers */ /* CONFIG_FREERTOS_USE_ADC is not set */ @@ -164,13 +165,29 @@ /* CONFIG_FREERTOS_USE_CAN is not set */ /* end of Freertos Can Drivers */ + +/* Freertos I2c Drivers */ + +/* CONFIG_FREERTOS_USE_I2C is not set */ +/* end of Freertos I2c Drivers */ + +/* Freertos Mio Drivers */ + +/* CONFIG_FREERTOS_USE_MIO is not set */ +/* end of Freertos Mio Drivers */ + +/* Freertos Timer Drivers */ + +/* CONFIG_FREERTOS_USE_TIMER is not set */ +/* end of Freertos Timer Drivers */ /* end of Component Configuration */ -/* FreeRTOS Setting */ +/* Third-Party Configuration */ /* CONFIG_USE_LWIP is not set */ #define CONFIG_USE_BACKTRACE /* CONFIG_USE_FATFS is not set */ +/* CONFIG_USE_FATFS_0_1_4 is not set */ /* CONFIG_USE_SFUD is not set */ /* CONFIG_USE_SPIFFS is not set */ /* CONFIG_USE_AMP is not set */ @@ -186,6 +203,27 @@ #define CONFIG_USE_TLSF /* CONFIG_USE_SDMMC_CMD is not set */ /* CONFIG_USE_CHERRY_USB is not set */ -/* end of FreeRTOS Setting */ +/* end of Third-Party Configuration */ + +/* Kernel Configuration */ + +#define CONFIG_FREERTOS_OPTIMIZED_SCHEDULER +#define CONFIG_FREERTOS_HZ 1000 +#define CONFIG_FREERTOS_MAX_PRIORITIES 32 +#define CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES 13 +#define CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES 11 +#define CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS 1 +#define CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE 1024 +#define CONFIG_FREERTOS_MAX_TASK_NAME_LEN 32 +#define CONFIG_FREERTOS_TIMER_TASK_PRIORITY 1 +#define CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH 2048 +#define CONFIG_FREERTOS_TIMER_QUEUE_LENGTH 10 +#define CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE 0 +#define CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS +#define CONFIG_FREERTOS_USE_TRACE_FACILITY +#define CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS +/* CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set */ +#define CONFIG_FREERTOS_TOTAL_HEAP_SIZE 10240 +/* end of Kernel Configuration */ #endif diff --git a/example/storage/fatfs/Kconfig b/example/storage/fatfs/Kconfig new file mode 100644 index 0000000000000000000000000000000000000000..3caed92fa7962489d699bab6c3284e9873af0f57 --- /dev/null +++ b/example/storage/fatfs/Kconfig @@ -0,0 +1,25 @@ +mainmenu "Phytium Baremetal Configuration" + +menu "Project Configuration" + + config TARGET_NAME + string "Build Target Name" + default "template" + help + Build Target name for the demo + + config FATFS_BASIC_TEST + bool "Basic Test" + default y + + config FATFS_SPEED_TEST + bool "Speed Test" + default n + + config FATFS_CYCLE_TEST + bool "Cycle Test" + default n + +endmenu + +source "$(FREERTOS_SDK_ROOT)/Kconfig" \ No newline at end of file diff --git a/example/storage/fatfs/READEME.md b/example/storage/fatfs/READEME.md new file mode 100644 index 0000000000000000000000000000000000000000..74e03c77ace22658ba358e900ca2e94476523dc7 --- /dev/null +++ b/example/storage/fatfs/READEME.md @@ -0,0 +1,114 @@ +# FATFS 文件系统测试 + +## 1. 例程介绍 + +- 文件系统是一类负责管理和存储文件信息的软件机构,在磁盘上组织文件的方法。作为常用的文件系统,FATFS免费开源,专门为小型嵌入式系统设计。 +- 本例程中通过在文件系统的根目录下挂载多个目录,支持在 RAM Disk, MicroSD 卡,eMMC 卡和 U盘上同时使用和测试 FATFS 文件系统 + + +## 2. 如何使用例程 + +本例程在 E2000 平台测试通过,您可以参考以下方法配置本例程所需要的硬件和软件环境, +- E2000 开发板 +- 本例程基于 E2000 Q Demo 板 + +![hardware](./figures/hardware.png) + +### 2.1 硬件配置方法 + +本例程支持的硬件平台包括 + +- E2000Q + +对应的配置项是, + +- CONFIG_TARGET_E2000Q + +### 2.2 SDK配置方法 + +本例程需要, + +- 使能Shell + +对应的配置项是, + +- CONFIG_USE_LETTER_SHELL + +本例子已经提供好具体的编译指令,以下进行介绍: +- make 将目录下的工程进行编译 +- make clean 将目录下的工程进行清理 +- make boot 将目录下的工程进行编译,并将生成的elf 复制到目标地址 +- make load_e2000d_aarch64 将预设64bit e2000d 下的配置加载至工程中 +- make load_e2000d_aarch32 将预设32bit e2000d 下的配置加载至工程中 +- make menuconfig 配置目录下的参数变量 +- make backup_kconfig 将目录下的sdkconfig 备份到./configs下 + +具体使用方法为: +- 在当前目录下 +- 执行以上指令 + +### 2.3 构建和下载 + +#### 2.3.1 构建过程 + +- 在host侧完成配置 +>配置成 e2000,对于其它平台,使用对于的默认配置,如 e2000q `make load_e2000q_aarch32` + +- 选择目标平台 +``` +make load_e2000q_aarch32 +``` + +- 选择例程需要的配置 +``` +make menuconfig +``` + +- 进行编译 +``` +make +``` + +- 将编译出的镜像放置到tftp目录下 +``` +make boot +``` + +#### 2.3.2 下载过程 + +- host侧设置重启host侧tftp服务器 +``` +sudo service tftpd-hpa restart +``` + +- 开发板侧使用bootelf命令跳转 +``` +setenv ipaddr 192.168.4.20 +setenv serverip 192.168.4.50 +setenv gatewayip 192.168.4.1 +tftpboot 0x90100000 freertos.elf +bootelf -p 0x90100000 +``` + +### 2.4 输出与实验现象 + +- 打开配置 CONFIG_FATFS_SDIO_TF, 使能 MicroSD(TF) 卡 +- 打开配置 CONFIG_FATFS_SDIO_EMMC, 使能 eMMC +- 打开配置 CONFIG_FATFS_USB, 使能 U 盘 + +- 打开配置 CONFIG_FATFS_BASIC_TEST,测试 FATFS 的基本功能 +- 打开配置 CONFIG_FATFS_SPEED_TEST, 测试 FATFS 的读写速度,会破环文件系统 +- 打开配置 CONFIG_FATFS_CYCLE_TEST, 运行 FATFS 的测试项,会破环文件系统 +- 编译镜像,加载到开发板上电启动 + +![](./figures/config.png) + +![](./figures/test_item.png) + +- 加载镜像启动后,自动开始测试 + +![](./figures/test_1.png) +![](./figures/test_2.png) +![](./figures/test_3.png) + +## 3. 如何解决问题 diff --git a/example/storage/fatfs/configs/e2000d_aarch32_eg_configs b/example/storage/fatfs/configs/e2000d_aarch32_eg_configs new file mode 100644 index 0000000000000000000000000000000000000000..59f7e1654d425e00ba076d5bf9a5e82fb75719b7 --- /dev/null +++ b/example/storage/fatfs/configs/e2000d_aarch32_eg_configs @@ -0,0 +1,316 @@ + +# +# Project Configuration +# +CONFIG_TARGET_NAME="e2000d_freertos_a32" +CONFIG_FATFS_BASIC_TEST=y +# CONFIG_FATFS_SPEED_TEST is not set +# CONFIG_FATFS_CYCLE_TEST is not set +# end of Project Configuration + +# +# Standalone Setting +# +CONFIG_USE_FREERTOS=y + +# +# Arch Configuration +# +CONFIG_TARGET_ARMV8_AARCH32=y +# CONFIG_TARGET_ARMV8_AARCH64 is not set +CONFIG_USE_CACHE=y +CONFIG_USE_MMU=y +# CONFIG_USE_SYS_TICK is not set +CONFIG_USE_AARCH64_L1_TO_AARCH32=y +# end of Arch Configuration + +# +# Board Configuration +# +# CONFIG_TARGET_F2000_4 is not set +# CONFIG_TARGET_D2000 is not set +# CONFIG_TARGET_E2000Q is not set +CONFIG_TARGET_E2000D=y +# CONFIG_TARGET_E2000S is not set +CONFIG_TARGET_E2000=y +CONFIG_DEFAULT_DEBUG_PRINT_UART1=y +# CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set +# CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set +# end of Board Configuration + +# +# Components Configuration +# +# CONFIG_USE_SPI is not set +# CONFIG_USE_QSPI is not set +CONFIG_USE_GIC=y +CONFIG_ENABLE_GICV3=y +CONFIG_USE_SERIAL=y + +# +# Usart Configuration +# +CONFIG_ENABLE_Pl011_UART=y +# end of Usart Configuration + +# CONFIG_USE_GPIO is not set +# CONFIG_USE_ETH is not set +# CONFIG_USE_CAN is not set +# CONFIG_USE_I2C is not set +# CONFIG_USE_TIMER is not set +# CONFIG_USE_MIO is not set +CONFIG_USE_SDMMC=y +# CONFIG_ENABLE_FSDMMC is not set +CONFIG_ENABLE_FSDIO=y +# CONFIG_USE_PCIE is not set +# CONFIG_USE_WDT is not set +# CONFIG_USE_DMA is not set +# CONFIG_USE_NAND is not set +# CONFIG_USE_RTC is not set +# CONFIG_USE_SATA is not set +# CONFIG_USE_USB is not set +# CONFIG_USE_ADC is not set +# CONFIG_USE_PWM is not set +# CONFIG_USE_IPC is not set +# end of Components Configuration + +CONFIG_USE_NEW_LIBC=y +# end of Standalone Setting + +# +# Building Option +# +# CONFIG_LOG_VERBOS is not set +# CONFIG_LOG_DEBUG is not set +# CONFIG_LOG_INFO is not set +# CONFIG_LOG_WARN is not set +CONFIG_LOG_ERROR=y +# CONFIG_LOG_NONE is not set +CONFIG_USE_DEFAULT_INTERRUPT_CONFIG=y +CONFIG_INTERRUPT_ROLE_MASTER=y +# CONFIG_INTERRUPT_ROLE_SLAVE is not set +# CONFIG_LOG_EXTRA_INFO is not set +# CONFIG_BOOTUP_DEBUG_PRINTS is not set + +# +# Linker Options +# +CONFIG_AARCH32_RAM_LD=y +# CONFIG_AARCH64_RAM_LD is not set +# CONFIG_USER_DEFINED_LD is not set +CONFIG_LINK_SCRIPT_ROM=y +CONFIG_ROM_START_UP_ADDR=0x80100000 +CONFIG_ROM_SIZE_MB=2 +CONFIG_LINK_SCRIPT_RAM=y +CONFIG_RAM_START_UP_ADDR=0x81000000 +CONFIG_RAM_SIZE_MB=64 +CONFIG_HEAP_SIZE=1 +CONFIG_SVC_STACK_SIZE=0x1000 +CONFIG_SYS_STACK_SIZE=0x1000 +CONFIG_IRQ_STACK_SIZE=0x1000 +CONFIG_ABORT_STACK_SIZE=0x1000 +CONFIG_FIQ_STACK_SIZE=0x1000 +CONFIG_UNDEF_STACK_SIZE=0x1000 +# end of Linker Options + +# +# Compiler Options +# + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + +CONFIG_OUTPUT_BINARY=y +# end of Compiler Options +# end of Building Option + +# +# Component Configuration +# + +# +# Freertos Uart Drivers +# +CONFIG_FREERTOS_USE_UART=y +# end of Freertos Uart Drivers + +# +# Freertos Pwm Drivers +# +# CONFIG_FREERTOS_USE_PWM is not set +# end of Freertos Pwm Drivers + +# +# Freertos Qspi Drivers +# +# CONFIG_FREERTOS_USE_QSPI is not set +# end of Freertos Qspi Drivers + +# +# Freertos Wdt Drivers +# +# CONFIG_FREERTOS_USE_WDT is not set +# end of Freertos Wdt Drivers + +# +# Freertos Eth Drivers +# +# CONFIG_FREERTOS_USE_XMAC is not set +# end of Freertos Eth Drivers + +# +# Freertos Gpio Drivers +# +# CONFIG_FREERTOS_USE_GPIO is not set +# end of Freertos Gpio Drivers + +# +# Freertos Spim Drivers +# +# CONFIG_FREERTOS_USE_FSPIM is not set +# end of Freertos Spim Drivers + +# +# Freertos DMA Drivers +# +# CONFIG_FREERTOS_USE_FDDMA is not set +# CONFIG_FREERTOS_USE_FGDMA is not set +# end of Freertos DMA Drivers + +# +# Freertos Adc Drivers +# +# CONFIG_FREERTOS_USE_ADC is not set +# end of Freertos Adc Drivers + +# +# Freertos Can Drivers +# +# CONFIG_FREERTOS_USE_CAN is not set +# end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers +# end of Component Configuration + +# +# Third-Party Configuration +# +# CONFIG_USE_LWIP is not set +CONFIG_USE_BACKTRACE=y +# CONFIG_USE_FATFS is not set +CONFIG_USE_FATFS_0_1_4=y + +# +# FATFS Configuration (0.1.4) +# +CONFIG_FATFS_RAM_DISK=y + +# +# RAM Disk Configuration +# +CONFIG_FATFS_RAM_DISK_BASE=0xa0000000 +CONFIG_FATFS_RAM_DISK_SIZE_MB=500 +CONFIG_FATFS_RAM_DISK_SECTOR_SIZE_BYTE=512 +# end of RAM Disk Configuration + +CONFIG_FATFS_SDMMC=y +CONFIG_FATFS_SDMMC_FSDIO_TF=y +CONFIG_FATFS_SDMMC_FSDIO_EMMC=y +# CONFIG_FATFS_SDMMC_FSDMMC_TF is not set +CONFIG_FATFS_USB=y +CONFIG_FATFS_VOLUME_COUNT=6 +# CONFIG_FATFS_LFN_NONE is not set +CONFIG_FATFS_LFN_HEAP=y +# CONFIG_FATFS_LFN_STACK is not set +CONFIG_FATFS_MAX_LFN=255 +CONFIG_FATFS_FS_LOCK=0 +CONFIG_FATFS_TIMEOUT_MS=10000 +CONFIG_FATFS_PER_FILE_CACHE=y +CONFIG_FATFS_ALLOC_PREFER_MEMP=y +CONFIG_FATFS_MEMP_SIZE=2 +# end of FATFS Configuration (0.1.4) + +# CONFIG_USE_SFUD is not set +# CONFIG_USE_SPIFFS is not set +# CONFIG_USE_AMP is not set +CONFIG_USE_LETTER_SHELL=y + +# +# Letter Shell Configuration +# +CONFIG_LS_PL011_UART=y +CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y +# CONFIG_DEFAULT_LETTER_SHELL_USE_UART0 is not set +# CONFIG_DEFAULT_LETTER_SHELL_USE_UART2 is not set +# end of Letter Shell Configuration + +CONFIG_USE_TLSF=y +CONFIG_USE_SDMMC_CMD=y + +# +# SDMMC Configuration +# +# CONFIG_SDMMC_USE_FSDMMC is not set +CONFIG_SDMMC_USE_FSDIO=y +# end of SDMMC Configuration + +CONFIG_USE_CHERRY_USB=y + +# +# CherryUSB Configuration +# +CONFIG_CHERRY_USB_PORT_XHCI=y +# CONFIG_CHERRY_USB_PORT_PHYTIUM_OTG is not set +CONFIG_CHERRYUSB_HOST=y +# CONFIG_CHERRYUSB_DEVICE is not set +CONFIG_CHERRY_USB_HOST_HUB=y +CONFIG_CHERRY_USB_HOST_MSC=y +# CONFIG_CHERRY_USB_HOST_HID is not set +# CONFIG_CHERRY_USB_HOST_VEDIO is not set +# CONFIG_CHERRY_USB_HOST_CDC is not set +# CONFIG_CHERRY_USB_HOST_RNDIS_WIRELESS is not set +# end of CherryUSB Configuration +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/storage/fatfs/configs/e2000d_aarch64_eg_configs b/example/storage/fatfs/configs/e2000d_aarch64_eg_configs new file mode 100644 index 0000000000000000000000000000000000000000..729925007bb7126f1d2e8eba5500fd3b52cb7136 --- /dev/null +++ b/example/storage/fatfs/configs/e2000d_aarch64_eg_configs @@ -0,0 +1,312 @@ + +# +# Project Configuration +# +CONFIG_TARGET_NAME="e2000d_freertos_a64" +CONFIG_FATFS_BASIC_TEST=y +# CONFIG_FATFS_SPEED_TEST is not set +# CONFIG_FATFS_CYCLE_TEST is not set +# end of Project Configuration + +# +# Standalone Setting +# +CONFIG_USE_FREERTOS=y + +# +# Arch Configuration +# +# CONFIG_TARGET_ARMV8_AARCH32 is not set +CONFIG_TARGET_ARMV8_AARCH64=y +CONFIG_USE_CACHE=y +CONFIG_USE_MMU=y +# CONFIG_USE_SYS_TICK is not set +# CONFIG_MMU_DEBUG_PRINTS is not set +# end of Arch Configuration + +# +# Board Configuration +# +# CONFIG_TARGET_F2000_4 is not set +# CONFIG_TARGET_D2000 is not set +# CONFIG_TARGET_E2000Q is not set +CONFIG_TARGET_E2000D=y +# CONFIG_TARGET_E2000S is not set +CONFIG_TARGET_E2000=y +CONFIG_DEFAULT_DEBUG_PRINT_UART1=y +# CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set +# CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set +# end of Board Configuration + +# +# Components Configuration +# +# CONFIG_USE_SPI is not set +# CONFIG_USE_QSPI is not set +CONFIG_USE_GIC=y +CONFIG_ENABLE_GICV3=y +CONFIG_USE_SERIAL=y + +# +# Usart Configuration +# +CONFIG_ENABLE_Pl011_UART=y +# end of Usart Configuration + +# CONFIG_USE_GPIO is not set +# CONFIG_USE_ETH is not set +# CONFIG_USE_CAN is not set +# CONFIG_USE_I2C is not set +# CONFIG_USE_TIMER is not set +# CONFIG_USE_MIO is not set +CONFIG_USE_SDMMC=y +# CONFIG_ENABLE_FSDMMC is not set +CONFIG_ENABLE_FSDIO=y +# CONFIG_USE_PCIE is not set +# CONFIG_USE_WDT is not set +# CONFIG_USE_DMA is not set +# CONFIG_USE_NAND is not set +# CONFIG_USE_RTC is not set +# CONFIG_USE_SATA is not set +# CONFIG_USE_USB is not set +# CONFIG_USE_ADC is not set +# CONFIG_USE_PWM is not set +# CONFIG_USE_IPC is not set +# end of Components Configuration + +CONFIG_USE_NEW_LIBC=y +# end of Standalone Setting + +# +# Building Option +# +# CONFIG_LOG_VERBOS is not set +# CONFIG_LOG_DEBUG is not set +# CONFIG_LOG_INFO is not set +# CONFIG_LOG_WARN is not set +CONFIG_LOG_ERROR=y +# CONFIG_LOG_NONE is not set +CONFIG_USE_DEFAULT_INTERRUPT_CONFIG=y +CONFIG_INTERRUPT_ROLE_MASTER=y +# CONFIG_INTERRUPT_ROLE_SLAVE is not set +CONFIG_LOG_EXTRA_INFO=y +# CONFIG_BOOTUP_DEBUG_PRINTS is not set + +# +# Linker Options +# +# CONFIG_AARCH32_RAM_LD is not set +CONFIG_AARCH64_RAM_LD=y +# CONFIG_USER_DEFINED_LD is not set +CONFIG_LINK_SCRIPT_ROM=y +CONFIG_ROM_START_UP_ADDR=0x80100000 +CONFIG_ROM_SIZE_MB=2 +CONFIG_LINK_SCRIPT_RAM=y +CONFIG_RAM_START_UP_ADDR=0x81000000 +CONFIG_RAM_SIZE_MB=64 +CONFIG_HEAP_SIZE=1 +CONFIG_STACK_SIZE=0x100000 +CONFIG_FPU_STACK_SIZE=0x1000 +# end of Linker Options + +# +# Compiler Options +# + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + +CONFIG_OUTPUT_BINARY=y +# end of Compiler Options +# end of Building Option + +# +# Component Configuration +# + +# +# Freertos Uart Drivers +# +CONFIG_FREERTOS_USE_UART=y +# end of Freertos Uart Drivers + +# +# Freertos Pwm Drivers +# +# CONFIG_FREERTOS_USE_PWM is not set +# end of Freertos Pwm Drivers + +# +# Freertos Qspi Drivers +# +# CONFIG_FREERTOS_USE_QSPI is not set +# end of Freertos Qspi Drivers + +# +# Freertos Wdt Drivers +# +# CONFIG_FREERTOS_USE_WDT is not set +# end of Freertos Wdt Drivers + +# +# Freertos Eth Drivers +# +# CONFIG_FREERTOS_USE_XMAC is not set +# end of Freertos Eth Drivers + +# +# Freertos Gpio Drivers +# +# CONFIG_FREERTOS_USE_GPIO is not set +# end of Freertos Gpio Drivers + +# +# Freertos Spim Drivers +# +# CONFIG_FREERTOS_USE_FSPIM is not set +# end of Freertos Spim Drivers + +# +# Freertos DMA Drivers +# +# CONFIG_FREERTOS_USE_FDDMA is not set +# CONFIG_FREERTOS_USE_FGDMA is not set +# end of Freertos DMA Drivers + +# +# Freertos Adc Drivers +# +# CONFIG_FREERTOS_USE_ADC is not set +# end of Freertos Adc Drivers + +# +# Freertos Can Drivers +# +# CONFIG_FREERTOS_USE_CAN is not set +# end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers +# end of Component Configuration + +# +# Third-Party Configuration +# +# CONFIG_USE_LWIP is not set +CONFIG_USE_BACKTRACE=y +# CONFIG_USE_FATFS is not set +CONFIG_USE_FATFS_0_1_4=y + +# +# FATFS Configuration (0.1.4) +# +CONFIG_FATFS_RAM_DISK=y + +# +# RAM Disk Configuration +# +CONFIG_FATFS_RAM_DISK_BASE=0xa0000000 +CONFIG_FATFS_RAM_DISK_SIZE_MB=500 +CONFIG_FATFS_RAM_DISK_SECTOR_SIZE_BYTE=512 +# end of RAM Disk Configuration + +CONFIG_FATFS_SDMMC=y +CONFIG_FATFS_SDMMC_FSDIO_TF=y +CONFIG_FATFS_SDMMC_FSDIO_EMMC=y +# CONFIG_FATFS_SDMMC_FSDMMC_TF is not set +CONFIG_FATFS_USB=y +CONFIG_FATFS_VOLUME_COUNT=10 +# CONFIG_FATFS_LFN_NONE is not set +CONFIG_FATFS_LFN_HEAP=y +# CONFIG_FATFS_LFN_STACK is not set +CONFIG_FATFS_MAX_LFN=255 +CONFIG_FATFS_FS_LOCK=0 +CONFIG_FATFS_TIMEOUT_MS=10000 +CONFIG_FATFS_PER_FILE_CACHE=y +CONFIG_FATFS_ALLOC_PREFER_MEMP=y +CONFIG_FATFS_MEMP_SIZE=2 +# end of FATFS Configuration (0.1.4) + +# CONFIG_USE_SFUD is not set +# CONFIG_USE_SPIFFS is not set +# CONFIG_USE_AMP is not set +CONFIG_USE_LETTER_SHELL=y + +# +# Letter Shell Configuration +# +CONFIG_LS_PL011_UART=y +CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y +# CONFIG_DEFAULT_LETTER_SHELL_USE_UART0 is not set +# CONFIG_DEFAULT_LETTER_SHELL_USE_UART2 is not set +# end of Letter Shell Configuration + +CONFIG_USE_TLSF=y +CONFIG_USE_SDMMC_CMD=y + +# +# SDMMC Configuration +# +# CONFIG_SDMMC_USE_FSDMMC is not set +CONFIG_SDMMC_USE_FSDIO=y +# end of SDMMC Configuration + +CONFIG_USE_CHERRY_USB=y + +# +# CherryUSB Configuration +# +CONFIG_CHERRY_USB_PORT_XHCI=y +# CONFIG_CHERRY_USB_PORT_PHYTIUM_OTG is not set +CONFIG_CHERRYUSB_HOST=y +# CONFIG_CHERRYUSB_DEVICE is not set +CONFIG_CHERRY_USB_HOST_HUB=y +CONFIG_CHERRY_USB_HOST_MSC=y +# CONFIG_CHERRY_USB_HOST_HID is not set +# CONFIG_CHERRY_USB_HOST_VEDIO is not set +# CONFIG_CHERRY_USB_HOST_CDC is not set +# CONFIG_CHERRY_USB_HOST_RNDIS_WIRELESS is not set +# end of CherryUSB Configuration +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/storage/fatfs/configs/e2000q_aarch32_eg_configs b/example/storage/fatfs/configs/e2000q_aarch32_eg_configs new file mode 100644 index 0000000000000000000000000000000000000000..3cae266d0aec353a8257299e156d9930635f8b28 --- /dev/null +++ b/example/storage/fatfs/configs/e2000q_aarch32_eg_configs @@ -0,0 +1,316 @@ + +# +# Project Configuration +# +CONFIG_TARGET_NAME="e2000q_freertos_a32" +CONFIG_FATFS_BASIC_TEST=y +# CONFIG_FATFS_SPEED_TEST is not set +# CONFIG_FATFS_CYCLE_TEST is not set +# end of Project Configuration + +# +# Standalone Setting +# +CONFIG_USE_FREERTOS=y + +# +# Arch Configuration +# +CONFIG_TARGET_ARMV8_AARCH32=y +# CONFIG_TARGET_ARMV8_AARCH64 is not set +CONFIG_USE_CACHE=y +CONFIG_USE_MMU=y +# CONFIG_USE_SYS_TICK is not set +CONFIG_USE_AARCH64_L1_TO_AARCH32=y +# end of Arch Configuration + +# +# Board Configuration +# +# CONFIG_TARGET_F2000_4 is not set +# CONFIG_TARGET_D2000 is not set +CONFIG_TARGET_E2000Q=y +# CONFIG_TARGET_E2000D is not set +# CONFIG_TARGET_E2000S is not set +CONFIG_TARGET_E2000=y +CONFIG_DEFAULT_DEBUG_PRINT_UART1=y +# CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set +# CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set +# end of Board Configuration + +# +# Components Configuration +# +# CONFIG_USE_SPI is not set +# CONFIG_USE_QSPI is not set +CONFIG_USE_GIC=y +CONFIG_ENABLE_GICV3=y +CONFIG_USE_SERIAL=y + +# +# Usart Configuration +# +CONFIG_ENABLE_Pl011_UART=y +# end of Usart Configuration + +# CONFIG_USE_GPIO is not set +# CONFIG_USE_ETH is not set +# CONFIG_USE_CAN is not set +# CONFIG_USE_I2C is not set +# CONFIG_USE_TIMER is not set +# CONFIG_USE_MIO is not set +CONFIG_USE_SDMMC=y +# CONFIG_ENABLE_FSDMMC is not set +CONFIG_ENABLE_FSDIO=y +# CONFIG_USE_PCIE is not set +# CONFIG_USE_WDT is not set +# CONFIG_USE_DMA is not set +# CONFIG_USE_NAND is not set +# CONFIG_USE_RTC is not set +# CONFIG_USE_SATA is not set +# CONFIG_USE_USB is not set +# CONFIG_USE_ADC is not set +# CONFIG_USE_PWM is not set +# CONFIG_USE_IPC is not set +# end of Components Configuration + +CONFIG_USE_NEW_LIBC=y +# end of Standalone Setting + +# +# Building Option +# +# CONFIG_LOG_VERBOS is not set +# CONFIG_LOG_DEBUG is not set +# CONFIG_LOG_INFO is not set +# CONFIG_LOG_WARN is not set +CONFIG_LOG_ERROR=y +# CONFIG_LOG_NONE is not set +CONFIG_USE_DEFAULT_INTERRUPT_CONFIG=y +CONFIG_INTERRUPT_ROLE_MASTER=y +# CONFIG_INTERRUPT_ROLE_SLAVE is not set +# CONFIG_LOG_EXTRA_INFO is not set +# CONFIG_BOOTUP_DEBUG_PRINTS is not set + +# +# Linker Options +# +CONFIG_AARCH32_RAM_LD=y +# CONFIG_AARCH64_RAM_LD is not set +# CONFIG_USER_DEFINED_LD is not set +CONFIG_LINK_SCRIPT_ROM=y +CONFIG_ROM_START_UP_ADDR=0x80100000 +CONFIG_ROM_SIZE_MB=2 +CONFIG_LINK_SCRIPT_RAM=y +CONFIG_RAM_START_UP_ADDR=0x81000000 +CONFIG_RAM_SIZE_MB=64 +CONFIG_HEAP_SIZE=1 +CONFIG_SVC_STACK_SIZE=0x1000 +CONFIG_SYS_STACK_SIZE=0x1000 +CONFIG_IRQ_STACK_SIZE=0x1000 +CONFIG_ABORT_STACK_SIZE=0x1000 +CONFIG_FIQ_STACK_SIZE=0x1000 +CONFIG_UNDEF_STACK_SIZE=0x1000 +# end of Linker Options + +# +# Compiler Options +# + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + +CONFIG_OUTPUT_BINARY=y +# end of Compiler Options +# end of Building Option + +# +# Component Configuration +# + +# +# Freertos Uart Drivers +# +CONFIG_FREERTOS_USE_UART=y +# end of Freertos Uart Drivers + +# +# Freertos Pwm Drivers +# +# CONFIG_FREERTOS_USE_PWM is not set +# end of Freertos Pwm Drivers + +# +# Freertos Qspi Drivers +# +# CONFIG_FREERTOS_USE_QSPI is not set +# end of Freertos Qspi Drivers + +# +# Freertos Wdt Drivers +# +# CONFIG_FREERTOS_USE_WDT is not set +# end of Freertos Wdt Drivers + +# +# Freertos Eth Drivers +# +# CONFIG_FREERTOS_USE_XMAC is not set +# end of Freertos Eth Drivers + +# +# Freertos Gpio Drivers +# +# CONFIG_FREERTOS_USE_GPIO is not set +# end of Freertos Gpio Drivers + +# +# Freertos Spim Drivers +# +# CONFIG_FREERTOS_USE_FSPIM is not set +# end of Freertos Spim Drivers + +# +# Freertos DMA Drivers +# +# CONFIG_FREERTOS_USE_FDDMA is not set +# CONFIG_FREERTOS_USE_FGDMA is not set +# end of Freertos DMA Drivers + +# +# Freertos Adc Drivers +# +# CONFIG_FREERTOS_USE_ADC is not set +# end of Freertos Adc Drivers + +# +# Freertos Can Drivers +# +# CONFIG_FREERTOS_USE_CAN is not set +# end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers +# end of Component Configuration + +# +# Third-Party Configuration +# +# CONFIG_USE_LWIP is not set +CONFIG_USE_BACKTRACE=y +# CONFIG_USE_FATFS is not set +CONFIG_USE_FATFS_0_1_4=y + +# +# FATFS Configuration (0.1.4) +# +CONFIG_FATFS_RAM_DISK=y + +# +# RAM Disk Configuration +# +CONFIG_FATFS_RAM_DISK_BASE=0xa0000000 +CONFIG_FATFS_RAM_DISK_SIZE_MB=500 +CONFIG_FATFS_RAM_DISK_SECTOR_SIZE_BYTE=512 +# end of RAM Disk Configuration + +CONFIG_FATFS_SDMMC=y +CONFIG_FATFS_SDMMC_FSDIO_TF=y +CONFIG_FATFS_SDMMC_FSDIO_EMMC=y +# CONFIG_FATFS_SDMMC_FSDMMC_TF is not set +CONFIG_FATFS_USB=y +CONFIG_FATFS_VOLUME_COUNT=10 +# CONFIG_FATFS_LFN_NONE is not set +CONFIG_FATFS_LFN_HEAP=y +# CONFIG_FATFS_LFN_STACK is not set +CONFIG_FATFS_MAX_LFN=255 +CONFIG_FATFS_FS_LOCK=0 +CONFIG_FATFS_TIMEOUT_MS=10000 +CONFIG_FATFS_PER_FILE_CACHE=y +CONFIG_FATFS_ALLOC_PREFER_MEMP=y +CONFIG_FATFS_MEMP_SIZE=2 +# end of FATFS Configuration (0.1.4) + +# CONFIG_USE_SFUD is not set +# CONFIG_USE_SPIFFS is not set +# CONFIG_USE_AMP is not set +CONFIG_USE_LETTER_SHELL=y + +# +# Letter Shell Configuration +# +CONFIG_LS_PL011_UART=y +CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y +# CONFIG_DEFAULT_LETTER_SHELL_USE_UART0 is not set +# CONFIG_DEFAULT_LETTER_SHELL_USE_UART2 is not set +# end of Letter Shell Configuration + +CONFIG_USE_TLSF=y +CONFIG_USE_SDMMC_CMD=y + +# +# SDMMC Configuration +# +# CONFIG_SDMMC_USE_FSDMMC is not set +CONFIG_SDMMC_USE_FSDIO=y +# end of SDMMC Configuration + +CONFIG_USE_CHERRY_USB=y + +# +# CherryUSB Configuration +# +CONFIG_CHERRY_USB_PORT_XHCI=y +# CONFIG_CHERRY_USB_PORT_PHYTIUM_OTG is not set +CONFIG_CHERRYUSB_HOST=y +# CONFIG_CHERRYUSB_DEVICE is not set +CONFIG_CHERRY_USB_HOST_HUB=y +CONFIG_CHERRY_USB_HOST_MSC=y +# CONFIG_CHERRY_USB_HOST_HID is not set +# CONFIG_CHERRY_USB_HOST_VEDIO is not set +# CONFIG_CHERRY_USB_HOST_CDC is not set +# CONFIG_CHERRY_USB_HOST_RNDIS_WIRELESS is not set +# end of CherryUSB Configuration +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/storage/fatfs/configs/e2000q_aarch64_eg_configs b/example/storage/fatfs/configs/e2000q_aarch64_eg_configs new file mode 100644 index 0000000000000000000000000000000000000000..80934dd6c31bcd95abc0cc61cc362b8458643a8d --- /dev/null +++ b/example/storage/fatfs/configs/e2000q_aarch64_eg_configs @@ -0,0 +1,312 @@ + +# +# Project Configuration +# +CONFIG_TARGET_NAME="e2000q_freertos_a64" +CONFIG_FATFS_BASIC_TEST=y +# CONFIG_FATFS_SPEED_TEST is not set +# CONFIG_FATFS_CYCLE_TEST is not set +# end of Project Configuration + +# +# Standalone Setting +# +CONFIG_USE_FREERTOS=y + +# +# Arch Configuration +# +# CONFIG_TARGET_ARMV8_AARCH32 is not set +CONFIG_TARGET_ARMV8_AARCH64=y +CONFIG_USE_CACHE=y +CONFIG_USE_MMU=y +# CONFIG_USE_SYS_TICK is not set +# CONFIG_MMU_DEBUG_PRINTS is not set +# end of Arch Configuration + +# +# Board Configuration +# +# CONFIG_TARGET_F2000_4 is not set +# CONFIG_TARGET_D2000 is not set +CONFIG_TARGET_E2000Q=y +# CONFIG_TARGET_E2000D is not set +# CONFIG_TARGET_E2000S is not set +CONFIG_TARGET_E2000=y +CONFIG_DEFAULT_DEBUG_PRINT_UART1=y +# CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set +# CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set +# end of Board Configuration + +# +# Components Configuration +# +# CONFIG_USE_SPI is not set +# CONFIG_USE_QSPI is not set +CONFIG_USE_GIC=y +CONFIG_ENABLE_GICV3=y +CONFIG_USE_SERIAL=y + +# +# Usart Configuration +# +CONFIG_ENABLE_Pl011_UART=y +# end of Usart Configuration + +# CONFIG_USE_GPIO is not set +# CONFIG_USE_ETH is not set +# CONFIG_USE_CAN is not set +# CONFIG_USE_I2C is not set +# CONFIG_USE_TIMER is not set +# CONFIG_USE_MIO is not set +CONFIG_USE_SDMMC=y +# CONFIG_ENABLE_FSDMMC is not set +CONFIG_ENABLE_FSDIO=y +# CONFIG_USE_PCIE is not set +# CONFIG_USE_WDT is not set +# CONFIG_USE_DMA is not set +# CONFIG_USE_NAND is not set +# CONFIG_USE_RTC is not set +# CONFIG_USE_SATA is not set +# CONFIG_USE_USB is not set +# CONFIG_USE_ADC is not set +# CONFIG_USE_PWM is not set +# CONFIG_USE_IPC is not set +# end of Components Configuration + +CONFIG_USE_NEW_LIBC=y +# end of Standalone Setting + +# +# Building Option +# +# CONFIG_LOG_VERBOS is not set +# CONFIG_LOG_DEBUG is not set +# CONFIG_LOG_INFO is not set +# CONFIG_LOG_WARN is not set +CONFIG_LOG_ERROR=y +# CONFIG_LOG_NONE is not set +CONFIG_USE_DEFAULT_INTERRUPT_CONFIG=y +CONFIG_INTERRUPT_ROLE_MASTER=y +# CONFIG_INTERRUPT_ROLE_SLAVE is not set +CONFIG_LOG_EXTRA_INFO=y +# CONFIG_BOOTUP_DEBUG_PRINTS is not set + +# +# Linker Options +# +# CONFIG_AARCH32_RAM_LD is not set +CONFIG_AARCH64_RAM_LD=y +# CONFIG_USER_DEFINED_LD is not set +CONFIG_LINK_SCRIPT_ROM=y +CONFIG_ROM_START_UP_ADDR=0x80100000 +CONFIG_ROM_SIZE_MB=2 +CONFIG_LINK_SCRIPT_RAM=y +CONFIG_RAM_START_UP_ADDR=0x81000000 +CONFIG_RAM_SIZE_MB=64 +CONFIG_HEAP_SIZE=1 +CONFIG_STACK_SIZE=0x100000 +CONFIG_FPU_STACK_SIZE=0x1000 +# end of Linker Options + +# +# Compiler Options +# + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + +CONFIG_OUTPUT_BINARY=y +# end of Compiler Options +# end of Building Option + +# +# Component Configuration +# + +# +# Freertos Uart Drivers +# +CONFIG_FREERTOS_USE_UART=y +# end of Freertos Uart Drivers + +# +# Freertos Pwm Drivers +# +# CONFIG_FREERTOS_USE_PWM is not set +# end of Freertos Pwm Drivers + +# +# Freertos Qspi Drivers +# +# CONFIG_FREERTOS_USE_QSPI is not set +# end of Freertos Qspi Drivers + +# +# Freertos Wdt Drivers +# +# CONFIG_FREERTOS_USE_WDT is not set +# end of Freertos Wdt Drivers + +# +# Freertos Eth Drivers +# +# CONFIG_FREERTOS_USE_XMAC is not set +# end of Freertos Eth Drivers + +# +# Freertos Gpio Drivers +# +# CONFIG_FREERTOS_USE_GPIO is not set +# end of Freertos Gpio Drivers + +# +# Freertos Spim Drivers +# +# CONFIG_FREERTOS_USE_FSPIM is not set +# end of Freertos Spim Drivers + +# +# Freertos DMA Drivers +# +# CONFIG_FREERTOS_USE_FDDMA is not set +# CONFIG_FREERTOS_USE_FGDMA is not set +# end of Freertos DMA Drivers + +# +# Freertos Adc Drivers +# +# CONFIG_FREERTOS_USE_ADC is not set +# end of Freertos Adc Drivers + +# +# Freertos Can Drivers +# +# CONFIG_FREERTOS_USE_CAN is not set +# end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers +# end of Component Configuration + +# +# Third-Party Configuration +# +# CONFIG_USE_LWIP is not set +CONFIG_USE_BACKTRACE=y +# CONFIG_USE_FATFS is not set +CONFIG_USE_FATFS_0_1_4=y + +# +# FATFS Configuration (0.1.4) +# +CONFIG_FATFS_RAM_DISK=y + +# +# RAM Disk Configuration +# +CONFIG_FATFS_RAM_DISK_BASE=0xa0000000 +CONFIG_FATFS_RAM_DISK_SIZE_MB=500 +CONFIG_FATFS_RAM_DISK_SECTOR_SIZE_BYTE=512 +# end of RAM Disk Configuration + +CONFIG_FATFS_SDMMC=y +CONFIG_FATFS_SDMMC_FSDIO_TF=y +CONFIG_FATFS_SDMMC_FSDIO_EMMC=y +# CONFIG_FATFS_SDMMC_FSDMMC_TF is not set +CONFIG_FATFS_USB=y +CONFIG_FATFS_VOLUME_COUNT=10 +# CONFIG_FATFS_LFN_NONE is not set +CONFIG_FATFS_LFN_HEAP=y +# CONFIG_FATFS_LFN_STACK is not set +CONFIG_FATFS_MAX_LFN=255 +CONFIG_FATFS_FS_LOCK=0 +CONFIG_FATFS_TIMEOUT_MS=10000 +CONFIG_FATFS_PER_FILE_CACHE=y +CONFIG_FATFS_ALLOC_PREFER_MEMP=y +CONFIG_FATFS_MEMP_SIZE=2 +# end of FATFS Configuration (0.1.4) + +# CONFIG_USE_SFUD is not set +# CONFIG_USE_SPIFFS is not set +# CONFIG_USE_AMP is not set +CONFIG_USE_LETTER_SHELL=y + +# +# Letter Shell Configuration +# +CONFIG_LS_PL011_UART=y +CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y +# CONFIG_DEFAULT_LETTER_SHELL_USE_UART0 is not set +# CONFIG_DEFAULT_LETTER_SHELL_USE_UART2 is not set +# end of Letter Shell Configuration + +CONFIG_USE_TLSF=y +CONFIG_USE_SDMMC_CMD=y + +# +# SDMMC Configuration +# +# CONFIG_SDMMC_USE_FSDMMC is not set +CONFIG_SDMMC_USE_FSDIO=y +# end of SDMMC Configuration + +CONFIG_USE_CHERRY_USB=y + +# +# CherryUSB Configuration +# +CONFIG_CHERRY_USB_PORT_XHCI=y +# CONFIG_CHERRY_USB_PORT_PHYTIUM_OTG is not set +CONFIG_CHERRYUSB_HOST=y +# CONFIG_CHERRYUSB_DEVICE is not set +CONFIG_CHERRY_USB_HOST_HUB=y +CONFIG_CHERRY_USB_HOST_MSC=y +# CONFIG_CHERRY_USB_HOST_HID is not set +# CONFIG_CHERRY_USB_HOST_VEDIO is not set +# CONFIG_CHERRY_USB_HOST_CDC is not set +# CONFIG_CHERRY_USB_HOST_RNDIS_WIRELESS is not set +# end of CherryUSB Configuration +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/storage/fatfs/figures/config.png b/example/storage/fatfs/figures/config.png new file mode 100644 index 0000000000000000000000000000000000000000..5388bf139c95a860f678598e3e9553113b71b7e5 Binary files /dev/null and b/example/storage/fatfs/figures/config.png differ diff --git a/example/storage/fatfs/figures/hardware.png b/example/storage/fatfs/figures/hardware.png new file mode 100644 index 0000000000000000000000000000000000000000..a5636d4138d74e24374a8fd7f1c215d6aed80980 Binary files /dev/null and b/example/storage/fatfs/figures/hardware.png differ diff --git a/example/storage/fatfs/figures/test_1.png b/example/storage/fatfs/figures/test_1.png new file mode 100644 index 0000000000000000000000000000000000000000..3bda1d0341a93c86f75eba6dccdd6c684dc56d65 Binary files /dev/null and b/example/storage/fatfs/figures/test_1.png differ diff --git a/example/storage/fatfs/figures/test_2.png b/example/storage/fatfs/figures/test_2.png new file mode 100644 index 0000000000000000000000000000000000000000..a9786c6c346160a80d703d2e5c6af286e11e7e91 Binary files /dev/null and b/example/storage/fatfs/figures/test_2.png differ diff --git a/example/storage/fatfs/figures/test_3.png b/example/storage/fatfs/figures/test_3.png new file mode 100644 index 0000000000000000000000000000000000000000..f3f1014c46b51ca88c2335f5d100e15cf12638b6 Binary files /dev/null and b/example/storage/fatfs/figures/test_3.png differ diff --git a/example/storage/fatfs/figures/test_item.png b/example/storage/fatfs/figures/test_item.png new file mode 100644 index 0000000000000000000000000000000000000000..31a5ccde67beaffc7395c4dcc58e546a07cf2dbf Binary files /dev/null and b/example/storage/fatfs/figures/test_item.png differ diff --git a/example/storage/fatfs/inc/fatfs_examples.h b/example/storage/fatfs/inc/fatfs_examples.h new file mode 100644 index 0000000000000000000000000000000000000000..7acad21a5c4bcd57dc249f084e758b6c5137c6fe --- /dev/null +++ b/example/storage/fatfs/inc/fatfs_examples.h @@ -0,0 +1,41 @@ +/* + * Copyright : (C) 2022 Phytium Information Technology, Inc. + * All Rights Reserved. + * + * This program is OPEN SOURCE software: you can redistribute it and/or modify it + * under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd, + * either version 1.0 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the Phytium Public License for more details. + * + * + * FilePath: atfs_examples.h + * Date: 2022-06-17 10:42:40 + * LastEditTime: 2022-06-17 10:42:40 + * Description: This file is for + * + * Modify History: + * Ver Who Date Changes + * ----- ------ -------- -------------------------------------- + */ + +#ifndef FATFS_EXAMPLES_H +#define FATFS_EXAMPLES_H + + +enum +{ + FFREERTOS_FATFS_RAM_DISK = 0U, + FFREERTOS_FATFS_TF_CARD = 1U, + FFREERTOS_FATFS_EMMC_CARD = 2U, + FFREERTOS_FATFS_USB_DISK = 3U, + + FFREERTOS_DISK_TYPE_NUM, +}; + +/* fatfs run */ +BaseType_t FFreeRTOSFatfsTest(void); + +#endif // ! \ No newline at end of file diff --git a/example/storage/fatfs/main.c b/example/storage/fatfs/main.c new file mode 100644 index 0000000000000000000000000000000000000000..eb1601370bbce1a47c33335d30bc48e4d2cd5baa --- /dev/null +++ b/example/storage/fatfs/main.c @@ -0,0 +1,52 @@ +/* + * Copyright : (C) 2022 Phytium Information Technology, Inc. + * All Rights Reserved. + * + * This program is OPEN SOURCE software: you can redistribute it and/or modify it + * under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd, + * either version 1.0 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the Phytium Public License for more details. + * + * + * FilePath: main.c + * Date: 2022-06-17 08:17:59 + * LastEditTime: 2022-06-17 08:17:59 + * Description: This file is for + * + * Modify History: + * Ver Who Date Changes + * ----- ------ -------- -------------------------------------- + */ + +#include "shell.h" +#include "shell_port.h" +#include +#ifdef CONFIG_FATFS_SDMMC +#include "sdmmc_system.h" +#endif +#include "fatfs_examples.h" + +int main(void) +{ + BaseType_t ret; + +#ifdef CONFIG_FATFS_SDMMC + sdmmc_sys_init(); +#endif + + ret = FFreeRTOSFatfsTest(); + + ret = LSUserShellTask() ; + if(ret != pdPASS) + goto FAIL_EXIT; + + vTaskStartScheduler(); /* 启动任务,开启调度 */ + while (1); /* 正常不会执行到这里 */ + +FAIL_EXIT: + printf("failed 0x%x \r\n", ret); + return 0; +} diff --git a/example/storage/fatfs/makefile b/example/storage/fatfs/makefile new file mode 100644 index 0000000000000000000000000000000000000000..baf1a3fe8785c93b1907e67b6d8dc31f0712b4e7 --- /dev/null +++ b/example/storage/fatfs/makefile @@ -0,0 +1,30 @@ +# 指定工程项目根目录为当前(只能指定一个目录) +export PROJECT_DIR ?= $(shell pwd) +export KCONFIG_DIR ?= $(PROJECT_DIR) +# 用户添加的源文件夹和头文件夹(可以指定多个) +export USR_SRC_DIR ?= $(PROJECT_DIR) \ + $(PROJECT_DIR)/src +export USR_INC_DIR ?= $(PROJECT_DIR) \ + $(PROJECT_DIR)/inc + +# 用户定义的编译目标文件上传路径 +ifeq ($(OS),Windows_NT) +USR_BOOT_DIR ?= /d/tftboot +else +USR_BOOT_DIR ?= /mnt/d/tftboot +endif + +# 设置启动镜像名 +BOOT_IMG_NAME ?= freertos + +# 指定编译freertos项目使用的makefile +include $(FREERTOS_SDK_ROOT)/make/build_freertos.mk + +# 完成编译 +boot: + make -j + @cp ./$(CONFIG_TARGET_NAME).elf $(USR_BOOT_DIR)/$(BOOT_IMG_NAME).elf +ifdef CONFIG_OUTPUT_BINARY + @cp ./$(CONFIG_TARGET_NAME).bin $(USR_BOOT_DIR)/$(BOOT_IMG_NAME).bin +endif + @ls $(USR_BOOT_DIR)/$(BOOT_IMG_NAME).* -l \ No newline at end of file diff --git a/example/storage/fatfs/sdkconfig b/example/storage/fatfs/sdkconfig new file mode 100644 index 0000000000000000000000000000000000000000..80934dd6c31bcd95abc0cc61cc362b8458643a8d --- /dev/null +++ b/example/storage/fatfs/sdkconfig @@ -0,0 +1,312 @@ + +# +# Project Configuration +# +CONFIG_TARGET_NAME="e2000q_freertos_a64" +CONFIG_FATFS_BASIC_TEST=y +# CONFIG_FATFS_SPEED_TEST is not set +# CONFIG_FATFS_CYCLE_TEST is not set +# end of Project Configuration + +# +# Standalone Setting +# +CONFIG_USE_FREERTOS=y + +# +# Arch Configuration +# +# CONFIG_TARGET_ARMV8_AARCH32 is not set +CONFIG_TARGET_ARMV8_AARCH64=y +CONFIG_USE_CACHE=y +CONFIG_USE_MMU=y +# CONFIG_USE_SYS_TICK is not set +# CONFIG_MMU_DEBUG_PRINTS is not set +# end of Arch Configuration + +# +# Board Configuration +# +# CONFIG_TARGET_F2000_4 is not set +# CONFIG_TARGET_D2000 is not set +CONFIG_TARGET_E2000Q=y +# CONFIG_TARGET_E2000D is not set +# CONFIG_TARGET_E2000S is not set +CONFIG_TARGET_E2000=y +CONFIG_DEFAULT_DEBUG_PRINT_UART1=y +# CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set +# CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set +# end of Board Configuration + +# +# Components Configuration +# +# CONFIG_USE_SPI is not set +# CONFIG_USE_QSPI is not set +CONFIG_USE_GIC=y +CONFIG_ENABLE_GICV3=y +CONFIG_USE_SERIAL=y + +# +# Usart Configuration +# +CONFIG_ENABLE_Pl011_UART=y +# end of Usart Configuration + +# CONFIG_USE_GPIO is not set +# CONFIG_USE_ETH is not set +# CONFIG_USE_CAN is not set +# CONFIG_USE_I2C is not set +# CONFIG_USE_TIMER is not set +# CONFIG_USE_MIO is not set +CONFIG_USE_SDMMC=y +# CONFIG_ENABLE_FSDMMC is not set +CONFIG_ENABLE_FSDIO=y +# CONFIG_USE_PCIE is not set +# CONFIG_USE_WDT is not set +# CONFIG_USE_DMA is not set +# CONFIG_USE_NAND is not set +# CONFIG_USE_RTC is not set +# CONFIG_USE_SATA is not set +# CONFIG_USE_USB is not set +# CONFIG_USE_ADC is not set +# CONFIG_USE_PWM is not set +# CONFIG_USE_IPC is not set +# end of Components Configuration + +CONFIG_USE_NEW_LIBC=y +# end of Standalone Setting + +# +# Building Option +# +# CONFIG_LOG_VERBOS is not set +# CONFIG_LOG_DEBUG is not set +# CONFIG_LOG_INFO is not set +# CONFIG_LOG_WARN is not set +CONFIG_LOG_ERROR=y +# CONFIG_LOG_NONE is not set +CONFIG_USE_DEFAULT_INTERRUPT_CONFIG=y +CONFIG_INTERRUPT_ROLE_MASTER=y +# CONFIG_INTERRUPT_ROLE_SLAVE is not set +CONFIG_LOG_EXTRA_INFO=y +# CONFIG_BOOTUP_DEBUG_PRINTS is not set + +# +# Linker Options +# +# CONFIG_AARCH32_RAM_LD is not set +CONFIG_AARCH64_RAM_LD=y +# CONFIG_USER_DEFINED_LD is not set +CONFIG_LINK_SCRIPT_ROM=y +CONFIG_ROM_START_UP_ADDR=0x80100000 +CONFIG_ROM_SIZE_MB=2 +CONFIG_LINK_SCRIPT_RAM=y +CONFIG_RAM_START_UP_ADDR=0x81000000 +CONFIG_RAM_SIZE_MB=64 +CONFIG_HEAP_SIZE=1 +CONFIG_STACK_SIZE=0x100000 +CONFIG_FPU_STACK_SIZE=0x1000 +# end of Linker Options + +# +# Compiler Options +# + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + +CONFIG_OUTPUT_BINARY=y +# end of Compiler Options +# end of Building Option + +# +# Component Configuration +# + +# +# Freertos Uart Drivers +# +CONFIG_FREERTOS_USE_UART=y +# end of Freertos Uart Drivers + +# +# Freertos Pwm Drivers +# +# CONFIG_FREERTOS_USE_PWM is not set +# end of Freertos Pwm Drivers + +# +# Freertos Qspi Drivers +# +# CONFIG_FREERTOS_USE_QSPI is not set +# end of Freertos Qspi Drivers + +# +# Freertos Wdt Drivers +# +# CONFIG_FREERTOS_USE_WDT is not set +# end of Freertos Wdt Drivers + +# +# Freertos Eth Drivers +# +# CONFIG_FREERTOS_USE_XMAC is not set +# end of Freertos Eth Drivers + +# +# Freertos Gpio Drivers +# +# CONFIG_FREERTOS_USE_GPIO is not set +# end of Freertos Gpio Drivers + +# +# Freertos Spim Drivers +# +# CONFIG_FREERTOS_USE_FSPIM is not set +# end of Freertos Spim Drivers + +# +# Freertos DMA Drivers +# +# CONFIG_FREERTOS_USE_FDDMA is not set +# CONFIG_FREERTOS_USE_FGDMA is not set +# end of Freertos DMA Drivers + +# +# Freertos Adc Drivers +# +# CONFIG_FREERTOS_USE_ADC is not set +# end of Freertos Adc Drivers + +# +# Freertos Can Drivers +# +# CONFIG_FREERTOS_USE_CAN is not set +# end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers +# end of Component Configuration + +# +# Third-Party Configuration +# +# CONFIG_USE_LWIP is not set +CONFIG_USE_BACKTRACE=y +# CONFIG_USE_FATFS is not set +CONFIG_USE_FATFS_0_1_4=y + +# +# FATFS Configuration (0.1.4) +# +CONFIG_FATFS_RAM_DISK=y + +# +# RAM Disk Configuration +# +CONFIG_FATFS_RAM_DISK_BASE=0xa0000000 +CONFIG_FATFS_RAM_DISK_SIZE_MB=500 +CONFIG_FATFS_RAM_DISK_SECTOR_SIZE_BYTE=512 +# end of RAM Disk Configuration + +CONFIG_FATFS_SDMMC=y +CONFIG_FATFS_SDMMC_FSDIO_TF=y +CONFIG_FATFS_SDMMC_FSDIO_EMMC=y +# CONFIG_FATFS_SDMMC_FSDMMC_TF is not set +CONFIG_FATFS_USB=y +CONFIG_FATFS_VOLUME_COUNT=10 +# CONFIG_FATFS_LFN_NONE is not set +CONFIG_FATFS_LFN_HEAP=y +# CONFIG_FATFS_LFN_STACK is not set +CONFIG_FATFS_MAX_LFN=255 +CONFIG_FATFS_FS_LOCK=0 +CONFIG_FATFS_TIMEOUT_MS=10000 +CONFIG_FATFS_PER_FILE_CACHE=y +CONFIG_FATFS_ALLOC_PREFER_MEMP=y +CONFIG_FATFS_MEMP_SIZE=2 +# end of FATFS Configuration (0.1.4) + +# CONFIG_USE_SFUD is not set +# CONFIG_USE_SPIFFS is not set +# CONFIG_USE_AMP is not set +CONFIG_USE_LETTER_SHELL=y + +# +# Letter Shell Configuration +# +CONFIG_LS_PL011_UART=y +CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y +# CONFIG_DEFAULT_LETTER_SHELL_USE_UART0 is not set +# CONFIG_DEFAULT_LETTER_SHELL_USE_UART2 is not set +# end of Letter Shell Configuration + +CONFIG_USE_TLSF=y +CONFIG_USE_SDMMC_CMD=y + +# +# SDMMC Configuration +# +# CONFIG_SDMMC_USE_FSDMMC is not set +CONFIG_SDMMC_USE_FSDIO=y +# end of SDMMC Configuration + +CONFIG_USE_CHERRY_USB=y + +# +# CherryUSB Configuration +# +CONFIG_CHERRY_USB_PORT_XHCI=y +# CONFIG_CHERRY_USB_PORT_PHYTIUM_OTG is not set +CONFIG_CHERRYUSB_HOST=y +# CONFIG_CHERRYUSB_DEVICE is not set +CONFIG_CHERRY_USB_HOST_HUB=y +CONFIG_CHERRY_USB_HOST_MSC=y +# CONFIG_CHERRY_USB_HOST_HID is not set +# CONFIG_CHERRY_USB_HOST_VEDIO is not set +# CONFIG_CHERRY_USB_HOST_CDC is not set +# CONFIG_CHERRY_USB_HOST_RNDIS_WIRELESS is not set +# end of CherryUSB Configuration +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/storage/fatfs/sdkconfig.h b/example/storage/fatfs/sdkconfig.h new file mode 100644 index 0000000000000000000000000000000000000000..94bfd87795dd515d1c2fcb659bc2563b902fe19c --- /dev/null +++ b/example/storage/fatfs/sdkconfig.h @@ -0,0 +1,276 @@ +#ifndef SDK_CONFIG_H__ +#define SDK_CONFIG_H__ + +/* Project Configuration */ + +#define CONFIG_TARGET_NAME "e2000q_freertos_a64" +#define CONFIG_FATFS_BASIC_TEST +/* CONFIG_FATFS_SPEED_TEST is not set */ +/* CONFIG_FATFS_CYCLE_TEST is not set */ +/* end of Project Configuration */ + +/* Standalone Setting */ + +#define CONFIG_USE_FREERTOS + +/* Arch Configuration */ + +/* CONFIG_TARGET_ARMV8_AARCH32 is not set */ +#define CONFIG_TARGET_ARMV8_AARCH64 +#define CONFIG_USE_CACHE +#define CONFIG_USE_MMU +/* CONFIG_USE_SYS_TICK is not set */ +/* CONFIG_MMU_DEBUG_PRINTS is not set */ +/* end of Arch Configuration */ + +/* Board Configuration */ + +/* CONFIG_TARGET_F2000_4 is not set */ +/* CONFIG_TARGET_D2000 is not set */ +#define CONFIG_TARGET_E2000Q +/* CONFIG_TARGET_E2000D is not set */ +/* CONFIG_TARGET_E2000S is not set */ +#define CONFIG_TARGET_E2000 +#define CONFIG_DEFAULT_DEBUG_PRINT_UART1 +/* CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set */ +/* CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set */ +/* end of Board Configuration */ + +/* Components Configuration */ + +/* CONFIG_USE_SPI is not set */ +/* CONFIG_USE_QSPI is not set */ +#define CONFIG_USE_GIC +#define CONFIG_ENABLE_GICV3 +#define CONFIG_USE_SERIAL + +/* Usart Configuration */ + +#define CONFIG_ENABLE_Pl011_UART +/* end of Usart Configuration */ +/* CONFIG_USE_GPIO is not set */ +/* CONFIG_USE_ETH is not set */ +/* CONFIG_USE_CAN is not set */ +/* CONFIG_USE_I2C is not set */ +/* CONFIG_USE_TIMER is not set */ +/* CONFIG_USE_MIO is not set */ +#define CONFIG_USE_SDMMC +/* CONFIG_ENABLE_FSDMMC is not set */ +#define CONFIG_ENABLE_FSDIO +/* CONFIG_USE_PCIE is not set */ +/* CONFIG_USE_WDT is not set */ +/* CONFIG_USE_DMA is not set */ +/* CONFIG_USE_NAND is not set */ +/* CONFIG_USE_RTC is not set */ +/* CONFIG_USE_SATA is not set */ +/* CONFIG_USE_USB is not set */ +/* CONFIG_USE_ADC is not set */ +/* CONFIG_USE_PWM is not set */ +/* CONFIG_USE_IPC is not set */ +/* end of Components Configuration */ +#define CONFIG_USE_NEW_LIBC +/* end of Standalone Setting */ + +/* Building Option */ + +/* CONFIG_LOG_VERBOS is not set */ +/* CONFIG_LOG_DEBUG is not set */ +/* CONFIG_LOG_INFO is not set */ +/* CONFIG_LOG_WARN is not set */ +#define CONFIG_LOG_ERROR +/* CONFIG_LOG_NONE is not set */ +#define CONFIG_USE_DEFAULT_INTERRUPT_CONFIG +#define CONFIG_INTERRUPT_ROLE_MASTER +/* CONFIG_INTERRUPT_ROLE_SLAVE is not set */ +#define CONFIG_LOG_EXTRA_INFO +/* CONFIG_BOOTUP_DEBUG_PRINTS is not set */ + +/* Linker Options */ + +/* CONFIG_AARCH32_RAM_LD is not set */ +#define CONFIG_AARCH64_RAM_LD +/* CONFIG_USER_DEFINED_LD is not set */ +#define CONFIG_LINK_SCRIPT_ROM +#define CONFIG_ROM_START_UP_ADDR 0x80100000 +#define CONFIG_ROM_SIZE_MB 2 +#define CONFIG_LINK_SCRIPT_RAM +#define CONFIG_RAM_START_UP_ADDR 0x81000000 +#define CONFIG_RAM_SIZE_MB 64 +#define CONFIG_HEAP_SIZE 1 +#define CONFIG_STACK_SIZE 0x100000 +#define CONFIG_FPU_STACK_SIZE 0x1000 +/* end of Linker Options */ + +/* Compiler Options */ + +/* Cross-Compiler Setting */ + +#define CONFIG_GCC_OPTIMIZE_LEVEL 0 +/* CONFIG_USE_EXT_COMPILER is not set */ +/* CONFIG_USE_KLIN_SYS is not set */ +/* end of Cross-Compiler Setting */ +#define CONFIG_OUTPUT_BINARY +/* end of Compiler Options */ +/* end of Building Option */ + +/* Component Configuration */ + +/* Freertos Uart Drivers */ + +#define CONFIG_FREERTOS_USE_UART +/* end of Freertos Uart Drivers */ + +/* Freertos Pwm Drivers */ + +/* CONFIG_FREERTOS_USE_PWM is not set */ +/* end of Freertos Pwm Drivers */ + +/* Freertos Qspi Drivers */ + +/* CONFIG_FREERTOS_USE_QSPI is not set */ +/* end of Freertos Qspi Drivers */ + +/* Freertos Wdt Drivers */ + +/* CONFIG_FREERTOS_USE_WDT is not set */ +/* end of Freertos Wdt Drivers */ + +/* Freertos Eth Drivers */ + +/* CONFIG_FREERTOS_USE_XMAC is not set */ +/* end of Freertos Eth Drivers */ + +/* Freertos Gpio Drivers */ + +/* CONFIG_FREERTOS_USE_GPIO is not set */ +/* end of Freertos Gpio Drivers */ + +/* Freertos Spim Drivers */ + +/* CONFIG_FREERTOS_USE_FSPIM is not set */ +/* end of Freertos Spim Drivers */ + +/* Freertos DMA Drivers */ + +/* CONFIG_FREERTOS_USE_FDDMA is not set */ +/* CONFIG_FREERTOS_USE_FGDMA is not set */ +/* end of Freertos DMA Drivers */ + +/* Freertos Adc Drivers */ + +/* CONFIG_FREERTOS_USE_ADC is not set */ +/* end of Freertos Adc Drivers */ + +/* Freertos Can Drivers */ + +/* CONFIG_FREERTOS_USE_CAN is not set */ +/* end of Freertos Can Drivers */ + +/* Freertos I2c Drivers */ + +/* CONFIG_FREERTOS_USE_I2C is not set */ +/* end of Freertos I2c Drivers */ + +/* Freertos Mio Drivers */ + +/* CONFIG_FREERTOS_USE_MIO is not set */ +/* end of Freertos Mio Drivers */ + +/* Freertos Timer Drivers */ + +/* CONFIG_FREERTOS_USE_TIMER is not set */ +/* end of Freertos Timer Drivers */ +/* end of Component Configuration */ + +/* Third-Party Configuration */ + +/* CONFIG_USE_LWIP is not set */ +#define CONFIG_USE_BACKTRACE +/* CONFIG_USE_FATFS is not set */ +#define CONFIG_USE_FATFS_0_1_4 + +/* FATFS Configuration (0.1.4) */ + +#define CONFIG_FATFS_RAM_DISK + +/* RAM Disk Configuration */ + +#define CONFIG_FATFS_RAM_DISK_BASE 0xa0000000 +#define CONFIG_FATFS_RAM_DISK_SIZE_MB 500 +#define CONFIG_FATFS_RAM_DISK_SECTOR_SIZE_BYTE 512 +/* end of RAM Disk Configuration */ +#define CONFIG_FATFS_SDMMC +#define CONFIG_FATFS_SDMMC_FSDIO_TF +#define CONFIG_FATFS_SDMMC_FSDIO_EMMC +/* CONFIG_FATFS_SDMMC_FSDMMC_TF is not set */ +#define CONFIG_FATFS_USB +#define CONFIG_FATFS_VOLUME_COUNT 10 +/* CONFIG_FATFS_LFN_NONE is not set */ +#define CONFIG_FATFS_LFN_HEAP +/* CONFIG_FATFS_LFN_STACK is not set */ +#define CONFIG_FATFS_MAX_LFN 255 +#define CONFIG_FATFS_FS_LOCK 0 +#define CONFIG_FATFS_TIMEOUT_MS 10000 +#define CONFIG_FATFS_PER_FILE_CACHE +#define CONFIG_FATFS_ALLOC_PREFER_MEMP +#define CONFIG_FATFS_MEMP_SIZE 2 +/* end of FATFS Configuration (0.1.4) */ +/* CONFIG_USE_SFUD is not set */ +/* CONFIG_USE_SPIFFS is not set */ +/* CONFIG_USE_AMP is not set */ +#define CONFIG_USE_LETTER_SHELL + +/* Letter Shell Configuration */ + +#define CONFIG_LS_PL011_UART +#define CONFIG_DEFAULT_LETTER_SHELL_USE_UART1 +/* CONFIG_DEFAULT_LETTER_SHELL_USE_UART0 is not set */ +/* CONFIG_DEFAULT_LETTER_SHELL_USE_UART2 is not set */ +/* end of Letter Shell Configuration */ +#define CONFIG_USE_TLSF +#define CONFIG_USE_SDMMC_CMD + +/* SDMMC Configuration */ + +/* CONFIG_SDMMC_USE_FSDMMC is not set */ +#define CONFIG_SDMMC_USE_FSDIO +/* end of SDMMC Configuration */ +#define CONFIG_USE_CHERRY_USB + +/* CherryUSB Configuration */ + +#define CONFIG_CHERRY_USB_PORT_XHCI +/* CONFIG_CHERRY_USB_PORT_PHYTIUM_OTG is not set */ +#define CONFIG_CHERRYUSB_HOST +/* CONFIG_CHERRYUSB_DEVICE is not set */ +#define CONFIG_CHERRY_USB_HOST_HUB +#define CONFIG_CHERRY_USB_HOST_MSC +/* CONFIG_CHERRY_USB_HOST_HID is not set */ +/* CONFIG_CHERRY_USB_HOST_VEDIO is not set */ +/* CONFIG_CHERRY_USB_HOST_CDC is not set */ +/* CONFIG_CHERRY_USB_HOST_RNDIS_WIRELESS is not set */ +/* end of CherryUSB Configuration */ +/* end of Third-Party Configuration */ + +/* Kernel Configuration */ + +#define CONFIG_FREERTOS_OPTIMIZED_SCHEDULER +#define CONFIG_FREERTOS_HZ 1000 +#define CONFIG_FREERTOS_MAX_PRIORITIES 32 +#define CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES 13 +#define CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES 11 +#define CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS 1 +#define CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE 1024 +#define CONFIG_FREERTOS_MAX_TASK_NAME_LEN 32 +#define CONFIG_FREERTOS_TIMER_TASK_PRIORITY 1 +#define CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH 2048 +#define CONFIG_FREERTOS_TIMER_QUEUE_LENGTH 10 +#define CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE 0 +#define CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS +#define CONFIG_FREERTOS_USE_TRACE_FACILITY +#define CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS +/* CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set */ +#define CONFIG_FREERTOS_TOTAL_HEAP_SIZE 10240 +/* end of Kernel Configuration */ + +#endif diff --git a/example/storage/fatfs/src/fatfs_examples.c b/example/storage/fatfs/src/fatfs_examples.c new file mode 100644 index 0000000000000000000000000000000000000000..213afd0c778a2d575f70bbdf5d3c31b4cb3a3054 --- /dev/null +++ b/example/storage/fatfs/src/fatfs_examples.c @@ -0,0 +1,339 @@ +/* + * Copyright : (C) 2022 Phytium Information Technology, Inc. + * All Rights Reserved. + * + * This program is OPEN SOURCE software: you can redistribute it and/or modify it + * under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd, + * either version 1.0 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the Phytium Public License for more details. + * + * + * FilePath: spim_spiffs_example.c + * Date: 2022-07-11 11:32:48 + * LastEditTime: 2022-07-11 11:32:48 + * Description: This file is for + * + * Modify History: + * Ver Who Date Changes + * ----- ------ -------- -------------------------------------- + */ +#include +#include +#include + +#include "FreeRTOSConfig.h" +#include "FreeRTOS.h" +#include "task.h" +#include "semphr.h" +#include "timers.h" +#include "event_groups.h" + +#include "fkernel.h" +#include "strto.h" +#include "fassert.h" +#include "fdebug.h" +#include "fparameters.h" +#include "sdkconfig.h" + +#include "ff_utils.h" +#include "fatfs_examples.h" +/************************** Constant Definitions *****************************/ +#define FATFS_EVT_INIT_DONE (0x1 << 0) +#define FATFS_EVT_CYC_TEST_DONE (0x1 << 1) + +/************************** Variable Definitions *****************************/ +static const char *mount_points[FFREERTOS_DISK_TYPE_NUM] = +{ + [FFREERTOS_FATFS_RAM_DISK] = FF_RAM_DISK_MOUNT_POINT, + [FFREERTOS_FATFS_TF_CARD] = FF_FSDIO_TF_DISK_MOUNT_POINT, + [FFREERTOS_FATFS_EMMC_CARD] = FF_FSDIO_EMMC_DISK_MOUNT_POINT, + [FFREERTOS_FATFS_USB_DISK] = FF_USB_DISK_MOUNT_POINT +}; +static const MKFS_PARM fs_option = +{ + .fmt = FM_EXFAT, /* format file system as exFAT to support > 4GB storage */ + .n_fat = 0, /* use default setting for other options */ + .align = 0, + .n_root = 0, + .au_size = 0 +}; +static boolean is_running = FALSE; +static EventGroupHandle_t sync = NULL; +static TimerHandle_t exit_timer = NULL; +static ff_fatfs file_sys[FFREERTOS_DISK_TYPE_NUM]; + +/***************** Macros (Inline Functions) Definitions *********************/ +#define FF_DEBUG_TAG "FATFS" +#define FF_ERROR(format, ...) FT_DEBUG_PRINT_E(FF_DEBUG_TAG, format, ##__VA_ARGS__) +#define FF_WARN(format, ...) FT_DEBUG_PRINT_W(FF_DEBUG_TAG, format, ##__VA_ARGS__) +#define FF_INFO(format, ...) FT_DEBUG_PRINT_I(FF_DEBUG_TAG, format, ##__VA_ARGS__) +#define FF_DEBUG(format, ...) FT_DEBUG_PRINT_D(FF_DEBUG_TAG, format, ##__VA_ARGS__) + +/************************** Function Prototypes ******************************/ + +/*****************************************************************************/ +static void FatfsSendEvent(u32 evt_bits) +{ + FASSERT(sync); + BaseType_t x_result = pdFALSE; + + FF_DEBUG("ack evt 0x%x", evt_bits); + x_result = xEventGroupSetBits(sync, evt_bits); +} + +static boolean FatfsWaitEvent(u32 evt_bits, TickType_t wait_delay) +{ + FASSERT(sync); + EventBits_t ev; + ev = xEventGroupWaitBits(sync, evt_bits, + pdTRUE, pdFALSE, wait_delay); + if (ev & evt_bits) + { + return TRUE; + } + + return FALSE; +} + +static void FatfsInitTask(void * args) +{ + FRESULT fr = FR_OK; + +#ifdef CONFIG_FATFS_RAM_DISK + fr = ff_setup(&file_sys[FFREERTOS_FATFS_RAM_DISK], + mount_points[FFREERTOS_FATFS_RAM_DISK], + &fs_option, pdFALSE); + + if (FR_OK != fr) + { + FF_ERROR("ram disk init failed, err = %d", fr); + goto task_exit; + } +#endif + +#ifdef CONFIG_FATFS_SDMMC_FSDIO_TF + fr = ff_setup(&file_sys[FFREERTOS_FATFS_TF_CARD], + mount_points[FFREERTOS_FATFS_TF_CARD], + &fs_option, pdFALSE); + + if (FR_OK != fr) + { + FF_ERROR("sdio card init failed, err = %d", fr); + goto task_exit; + } +#endif + +#ifdef CONFIG_FATFS_SDMMC_FSDIO_EMMC + fr = ff_setup(&file_sys[FFREERTOS_FATFS_EMMC_CARD], + mount_points[FFREERTOS_FATFS_EMMC_CARD], + &fs_option, pdFALSE); + + if (FR_OK != fr) + { + FF_ERROR("sdio card init failed, err = %d", fr); + goto task_exit; + } +#endif + +#ifdef CONFIG_FATFS_USB + fr = ff_setup(&file_sys[FFREERTOS_FATFS_USB_DISK], + mount_points[FFREERTOS_FATFS_USB_DISK], + &fs_option, pdFALSE); + + if (FR_OK != fr) + { + FF_ERROR("sdio card init failed, err = %d", fr); + goto task_exit; + } +#endif + FatfsSendEvent(FATFS_EVT_INIT_DONE); +task_exit: + vTaskDelete(NULL); /* delete task itself */ +} + +static void FatfsTestTask(void * args) +{ + const char *root = NULL; + FRESULT fr = FR_OK; + + FatfsWaitEvent(FATFS_EVT_INIT_DONE, portMAX_DELAY); + +#ifdef CONFIG_FATFS_BASIC_TEST + { + #ifdef CONFIG_FATFS_RAM_DISK + printf("\r\n========Basic test for RAM Disk=================\r\n"); + fr = ff_basic_test(mount_points[FFREERTOS_FATFS_RAM_DISK], "logfile.txt"); + if (FR_OK != fr) + { + FF_ERROR("ram disk basic test failed, err = %d", fr); + goto task_exit; + } + #endif + + #ifdef CONFIG_FATFS_SDMMC_FSDIO_TF + printf("\r\n========Basic test for TF Card=================\r\n"); + fr = ff_basic_test(mount_points[FFREERTOS_FATFS_TF_CARD], "logfile.txt"); + if (FR_OK != fr) + { + FF_ERROR("tf card basic test failed, err = %d", fr); + goto task_exit; + } + #endif + + #ifdef CONFIG_FATFS_SDMMC_FSDIO_EMMC + printf("\r\n========Basic test for eMMC=================\r\n"); + fr = ff_basic_test(mount_points[FFREERTOS_FATFS_EMMC_CARD], "logfile.txt"); + if (FR_OK != fr) + { + FF_ERROR("sdio basic test failed, err = %d", fr); + goto task_exit; + } + #endif + + #ifdef CONFIG_FATFS_USB + printf("\r\n========Basic test for USB Disk=================\r\n"); + fr = ff_basic_test(mount_points[FFREERTOS_FATFS_USB_DISK], "logfile.txt"); + if (FR_OK != fr) + { + FF_ERROR("sdio basic test failed, err = %d", fr); + goto task_exit; + } + #endif + } +#endif + +/* speed test will test diskio and destory file system */ +#ifdef CONFIG_FATFS_SPEED_TEST + { + #ifdef CONFIG_FATFS_RAM_DISK + printf("\r\n========Speed test for RAM Disk=================\r\n"); + fr = ff_speed_bench(mount_points[FFREERTOS_FATFS_RAM_DISK], 300000U); + if (FR_OK != fr) + { + FF_ERROR("ram disk speed test failed, err = %d", fr); + goto task_exit; + } + #endif + + #ifdef CONFIG_FATFS_SDMMC_FSDIO_TF + printf("\r\n========Speed test for TF Card=================\r\n"); + fr = ff_speed_bench(mount_points[FFREERTOS_FATFS_TF_CARD], 300000U); + if (FR_OK != fr) + { + FF_ERROR("sdio speed test failed, err = %d", fr); + goto task_exit; + } + #endif + + #ifdef CONFIG_FATFS_SDMMC_FSDIO_EMMC + printf("\r\n========Speed test for eMMC=================\r\n"); + fr = ff_speed_bench(mount_points[FFREERTOS_FATFS_EMMC_CARD], 300000U); + if (FR_OK != fr) + { + FF_ERROR("sdio speed test failed, err = %d", fr); + goto task_exit; + } + #endif + + #ifdef CONFIG_FATFS_USB + printf("\r\n========Speed test for USB Disk=================\r\n"); + fr = ff_speed_bench(mount_points[FFREERTOS_FATFS_USB_DISK], 300000U); + if (FR_OK != fr) + { + FF_ERROR("sdio speed test failed, err = %d", fr); + goto task_exit; + } + #endif + } +#endif + +/* cycle test will test diskio and destory file system */ +#ifdef CONFIG_FATFS_CYCLE_TEST + { + #ifdef CONFIG_FATFS_RAM_DISK + printf("\r\n========Cycle test for RAM Disk=================\r\n"); + if (ff_cycle_test(mount_points[FFREERTOS_FATFS_RAM_DISK], 3)) + goto task_exit; + #endif + + #ifdef CONFIG_FATFS_SDMMC_FSDIO_TF + printf("\r\n========Cycle test for RAM Disk=================\r\n"); + if (ff_cycle_test(mount_points[FFREERTOS_FATFS_TF_CARD], 3)) + goto task_exit; + #endif + + #ifdef CONFIG_FATFS_SDMMC_FSDIO_EMMC + if (ff_cycle_test(mount_points[FFREERTOS_FATFS_EMMC_CARD], 3)) + goto task_exit; + #endif + + #ifdef CONFIG_FATFS_USB + if (ff_cycle_test(mount_points[FFREERTOS_FATFS_USB_DISK], 3)) + goto task_exit; + #endif + } +#endif + +task_exit: + FatfsSendEvent(FATFS_EVT_CYC_TEST_DONE); + printf("exit from test task \r\n"); + vTaskDelete(NULL); /* delete task itself */ +} + +static void FatfsExitCallback(TimerHandle_t timer) +{ + if (sync) + { + vEventGroupDelete(sync); + sync = NULL; + } + + is_running = FALSE; +} + +BaseType_t FFreeRTOSFatfsTest(void) +{ + BaseType_t ret = pdPASS; + const TickType_t total_run_time = pdMS_TO_TICKS(30000UL); /* run for 30 secs deadline */ + + if (is_running) + { + FF_ERROR("task is running !!!!"); + return pdPASS; + } + + FASSERT_MSG(NULL == sync, "event group exists !!!"); + FASSERT_MSG((sync = xEventGroupCreate()) != NULL, "create event group failed !!!"); + + taskENTER_CRITICAL(); /* no schedule when create task */ + + ret = xTaskCreate((TaskFunction_t )FatfsInitTask, + (const char* )"FatfsInitTask", + (uint16_t )2048, + NULL, + (UBaseType_t )configMAX_PRIORITIES - 1, + NULL); + FASSERT_MSG(pdPASS == ret, "create task failed"); + + ret = xTaskCreate((TaskFunction_t )FatfsTestTask, + (const char* )"FatfsTestTask", + (uint16_t )2048, + NULL, + (UBaseType_t )configMAX_PRIORITIES - 1, + NULL); + FASSERT_MSG(pdPASS == ret, "create task failed"); + + exit_timer = xTimerCreate("FatfsExitTimer", /* Text name for the software timer - not used by FreeRTOS. */ + total_run_time, /* The software timer's period in ticks. */ + pdFALSE, /* Setting uxAutoRealod to pdFALSE creates a one-shot software timer. */ + NULL, /* use timer id to pass task data for reference. */ + FatfsExitCallback); /* The callback function to be used by the software timer being created. */ + + FASSERT_MSG(NULL != exit_timer, "create exit timer failed"); + + taskEXIT_CRITICAL(); /* allow schedule since task created */ + return ret; +} \ No newline at end of file diff --git a/example/storage/qspi_spiffs/configs/d2000_aarch32_eg_configs b/example/storage/qspi_spiffs/configs/d2000_aarch32_eg_configs index 8b17a1da2a1321bcfe1daaeaa8d1fa276a8d84e8..1a14b70ed882d47c8d273cfa50c1d89a63d616cd 100644 --- a/example/storage/qspi_spiffs/configs/d2000_aarch32_eg_configs +++ b/example/storage/qspi_spiffs/configs/d2000_aarch32_eg_configs @@ -118,6 +118,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -175,12 +184,6 @@ CONFIG_FREERTOS_USE_QSPI=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -192,14 +195,33 @@ CONFIG_FREERTOS_USE_QSPI=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set CONFIG_USE_SFUD=y # @@ -236,4 +258,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/storage/qspi_spiffs/configs/d2000_aarch64_eg_configs b/example/storage/qspi_spiffs/configs/d2000_aarch64_eg_configs index 2b35d2de14367812628246494c6e1a71ecf34757..d61f47b1d69381350a256237b8d1ed3f525016a3 100644 --- a/example/storage/qspi_spiffs/configs/d2000_aarch64_eg_configs +++ b/example/storage/qspi_spiffs/configs/d2000_aarch64_eg_configs @@ -114,6 +114,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -171,12 +180,6 @@ CONFIG_FREERTOS_USE_QSPI=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -188,14 +191,33 @@ CONFIG_FREERTOS_USE_QSPI=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set CONFIG_USE_SFUD=y # @@ -232,4 +254,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/storage/qspi_spiffs/configs/e2000d_aarch32_eg_configs b/example/storage/qspi_spiffs/configs/e2000d_aarch32_eg_configs index 85b81d19e1ea112d60f8d46dc967d1f443766078..8b148fff2a8da0ce8fc00583360954ba449a7c78 100644 --- a/example/storage/qspi_spiffs/configs/e2000d_aarch32_eg_configs +++ b/example/storage/qspi_spiffs/configs/e2000d_aarch32_eg_configs @@ -118,6 +118,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -175,12 +184,6 @@ CONFIG_FREERTOS_USE_QSPI=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -192,14 +195,33 @@ CONFIG_FREERTOS_USE_QSPI=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set CONFIG_USE_SFUD=y # @@ -236,4 +258,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/storage/qspi_spiffs/configs/e2000d_aarch64_eg_configs b/example/storage/qspi_spiffs/configs/e2000d_aarch64_eg_configs index 6a2d29daf283d6bfe4605b9c19cbf9d206ed2564..4b83f2d0b3ff0c6eb7b82e077e1e4032ab18efff 100644 --- a/example/storage/qspi_spiffs/configs/e2000d_aarch64_eg_configs +++ b/example/storage/qspi_spiffs/configs/e2000d_aarch64_eg_configs @@ -114,6 +114,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -171,12 +180,6 @@ CONFIG_FREERTOS_USE_QSPI=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -188,14 +191,33 @@ CONFIG_FREERTOS_USE_QSPI=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set CONFIG_USE_SFUD=y # @@ -232,4 +254,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/storage/qspi_spiffs/configs/e2000q_aarch32_eg_configs b/example/storage/qspi_spiffs/configs/e2000q_aarch32_eg_configs index 015408c1051a0612794f974b25a16f4c3a48900d..31478dca673d348871ed5d98be45807b48f8d7f3 100644 --- a/example/storage/qspi_spiffs/configs/e2000q_aarch32_eg_configs +++ b/example/storage/qspi_spiffs/configs/e2000q_aarch32_eg_configs @@ -118,6 +118,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -175,12 +184,6 @@ CONFIG_FREERTOS_USE_QSPI=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -192,14 +195,33 @@ CONFIG_FREERTOS_USE_QSPI=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set CONFIG_USE_SFUD=y # @@ -236,4 +258,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/storage/qspi_spiffs/configs/e2000q_aarch64_eg_configs b/example/storage/qspi_spiffs/configs/e2000q_aarch64_eg_configs index 4004e2e6d46119b1b9087e5a42b2d329f67049d1..d36e77f69662538c3ebf5f78aa343f1883a1cee7 100644 --- a/example/storage/qspi_spiffs/configs/e2000q_aarch64_eg_configs +++ b/example/storage/qspi_spiffs/configs/e2000q_aarch64_eg_configs @@ -114,6 +114,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -171,12 +180,6 @@ CONFIG_FREERTOS_USE_QSPI=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -188,14 +191,33 @@ CONFIG_FREERTOS_USE_QSPI=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set CONFIG_USE_SFUD=y # @@ -232,4 +254,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/storage/qspi_spiffs/configs/ft2004_aarch32_eg_configs b/example/storage/qspi_spiffs/configs/ft2004_aarch32_eg_configs index a190e8e7d6e8c34ea36e8b2f1972734d0253beae..3b2ff438fa568ff81cdc15b7205aa1fc7a2a7956 100644 --- a/example/storage/qspi_spiffs/configs/ft2004_aarch32_eg_configs +++ b/example/storage/qspi_spiffs/configs/ft2004_aarch32_eg_configs @@ -118,6 +118,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -175,12 +184,6 @@ CONFIG_FREERTOS_USE_QSPI=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -192,14 +195,33 @@ CONFIG_FREERTOS_USE_QSPI=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set CONFIG_USE_SFUD=y # @@ -236,4 +258,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/storage/qspi_spiffs/configs/ft2004_aarch64_eg_configs b/example/storage/qspi_spiffs/configs/ft2004_aarch64_eg_configs index 3ab805e7e75b08aba16ea5536bedb9ec6db33856..225d9ac3cf4e7a091e394dfe18c3bcde444c9925 100644 --- a/example/storage/qspi_spiffs/configs/ft2004_aarch64_eg_configs +++ b/example/storage/qspi_spiffs/configs/ft2004_aarch64_eg_configs @@ -114,6 +114,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -171,12 +180,6 @@ CONFIG_FREERTOS_USE_QSPI=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -188,14 +191,33 @@ CONFIG_FREERTOS_USE_QSPI=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set CONFIG_USE_SFUD=y # @@ -232,4 +254,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/storage/qspi_spiffs/sdkconfig b/example/storage/qspi_spiffs/sdkconfig index 4004e2e6d46119b1b9087e5a42b2d329f67049d1..d36e77f69662538c3ebf5f78aa343f1883a1cee7 100644 --- a/example/storage/qspi_spiffs/sdkconfig +++ b/example/storage/qspi_spiffs/sdkconfig @@ -114,6 +114,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -171,12 +180,6 @@ CONFIG_FREERTOS_USE_QSPI=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -188,14 +191,33 @@ CONFIG_FREERTOS_USE_QSPI=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set CONFIG_USE_SFUD=y # @@ -232,4 +254,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/storage/qspi_spiffs/sdkconfig.h b/example/storage/qspi_spiffs/sdkconfig.h index 978530b073ece080f9d7cd9d9aea880175f1fb3a..683d807c4a27abf5d869d8c2c35a7b5b5e9983a5 100644 --- a/example/storage/qspi_spiffs/sdkconfig.h +++ b/example/storage/qspi_spiffs/sdkconfig.h @@ -103,6 +103,12 @@ /* Compiler Options */ +/* Cross-Compiler Setting */ + +#define CONFIG_GCC_OPTIMIZE_LEVEL 0 +/* CONFIG_USE_EXT_COMPILER is not set */ +/* CONFIG_USE_KLIN_SYS is not set */ +/* end of Cross-Compiler Setting */ #define CONFIG_OUTPUT_BINARY /* end of Compiler Options */ /* end of Building Option */ @@ -150,11 +156,6 @@ /* CONFIG_FREERTOS_USE_FGDMA is not set */ /* end of Freertos DMA Drivers */ -/* Freertos MMC Drivers */ - -/* CONFIG_FREERTOS_USE_FSDIO is not set */ -/* end of Freertos MMC Drivers */ - /* Freertos Adc Drivers */ /* CONFIG_FREERTOS_USE_ADC is not set */ @@ -164,13 +165,29 @@ /* CONFIG_FREERTOS_USE_CAN is not set */ /* end of Freertos Can Drivers */ + +/* Freertos I2c Drivers */ + +/* CONFIG_FREERTOS_USE_I2C is not set */ +/* end of Freertos I2c Drivers */ + +/* Freertos Mio Drivers */ + +/* CONFIG_FREERTOS_USE_MIO is not set */ +/* end of Freertos Mio Drivers */ + +/* Freertos Timer Drivers */ + +/* CONFIG_FREERTOS_USE_TIMER is not set */ +/* end of Freertos Timer Drivers */ /* end of Component Configuration */ -/* FreeRTOS Setting */ +/* Third-Party Configuration */ /* CONFIG_USE_LWIP is not set */ #define CONFIG_USE_BACKTRACE /* CONFIG_USE_FATFS is not set */ +/* CONFIG_USE_FATFS_0_1_4 is not set */ #define CONFIG_USE_SFUD /* SFUD Configuration */ @@ -201,6 +218,27 @@ /* CONFIG_USE_TLSF is not set */ /* CONFIG_USE_SDMMC_CMD is not set */ /* CONFIG_USE_CHERRY_USB is not set */ -/* end of FreeRTOS Setting */ +/* end of Third-Party Configuration */ + +/* Kernel Configuration */ + +#define CONFIG_FREERTOS_OPTIMIZED_SCHEDULER +#define CONFIG_FREERTOS_HZ 1000 +#define CONFIG_FREERTOS_MAX_PRIORITIES 32 +#define CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES 13 +#define CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES 11 +#define CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS 1 +#define CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE 1024 +#define CONFIG_FREERTOS_MAX_TASK_NAME_LEN 32 +#define CONFIG_FREERTOS_TIMER_TASK_PRIORITY 1 +#define CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH 2048 +#define CONFIG_FREERTOS_TIMER_QUEUE_LENGTH 10 +#define CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE 0 +#define CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS +#define CONFIG_FREERTOS_USE_TRACE_FACILITY +#define CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS +/* CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set */ +#define CONFIG_FREERTOS_TOTAL_HEAP_SIZE 10240 +/* end of Kernel Configuration */ #endif diff --git a/example/storage/sata_fatfs/configs/d2000_aarch32_eg_configs b/example/storage/sata_fatfs/configs/d2000_aarch32_eg_configs index ada6a28a2ccde9c217030d2318a64fdde0651fd4..c7e5a5ccd9d396afb91ca8ed1398e767f3ef65d4 100644 --- a/example/storage/sata_fatfs/configs/d2000_aarch32_eg_configs +++ b/example/storage/sata_fatfs/configs/d2000_aarch32_eg_configs @@ -125,6 +125,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -182,12 +191,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -199,10 +202,28 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y @@ -217,6 +238,7 @@ CONFIG_SELECT_FATFS_FSATA_PCIE=y # CONFIG_SELECT_FATFS_USB is not set # end of FATFS Configuration +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -234,4 +256,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/storage/sata_fatfs/configs/d2000_aarch64_eg_configs b/example/storage/sata_fatfs/configs/d2000_aarch64_eg_configs index 887b52f0d686be2dfd9ea391915a377131767129..976ea5ad10f83f499d3b997ed5031a24fe690c8c 100644 --- a/example/storage/sata_fatfs/configs/d2000_aarch64_eg_configs +++ b/example/storage/sata_fatfs/configs/d2000_aarch64_eg_configs @@ -121,6 +121,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -178,12 +187,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -195,10 +198,28 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y @@ -213,6 +234,7 @@ CONFIG_SELECT_FATFS_FSATA_PCIE=y # CONFIG_SELECT_FATFS_USB is not set # end of FATFS Configuration +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -230,4 +252,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/storage/sata_fatfs/configs/e2000d_aarch32_eg_configs b/example/storage/sata_fatfs/configs/e2000d_aarch32_eg_configs index e641de063e59d347d9f13f27501393b96a2374ae..572b8aca4e34a6128bab038d6c6d6b0dfd053fae 100644 --- a/example/storage/sata_fatfs/configs/e2000d_aarch32_eg_configs +++ b/example/storage/sata_fatfs/configs/e2000d_aarch32_eg_configs @@ -118,6 +118,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -175,12 +184,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -192,10 +195,28 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y @@ -211,6 +232,7 @@ CONFIG_SELECT_FATFS_FSATA_CONTROLLER=y # CONFIG_SELECT_FATFS_USB is not set # end of FATFS Configuration +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -228,4 +250,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/storage/sata_fatfs/configs/e2000d_aarch64_eg_configs b/example/storage/sata_fatfs/configs/e2000d_aarch64_eg_configs index 1b5ead15373043586ed9b89ec501c7035087016b..db5d6e0056b31f28c884bd5c2c4549ba401190ac 100644 --- a/example/storage/sata_fatfs/configs/e2000d_aarch64_eg_configs +++ b/example/storage/sata_fatfs/configs/e2000d_aarch64_eg_configs @@ -114,6 +114,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -171,12 +180,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -188,10 +191,28 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y @@ -207,6 +228,7 @@ CONFIG_SELECT_FATFS_FSATA_CONTROLLER=y # CONFIG_SELECT_FATFS_USB is not set # end of FATFS Configuration +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -224,4 +246,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/storage/sata_fatfs/configs/e2000q_aarch32_eg_configs b/example/storage/sata_fatfs/configs/e2000q_aarch32_eg_configs index 776a5de1956bf09a8285c358d4ef7b29ade9c6a8..b85a59128ca1aea3373f00a2ecc968c9079cf326 100644 --- a/example/storage/sata_fatfs/configs/e2000q_aarch32_eg_configs +++ b/example/storage/sata_fatfs/configs/e2000q_aarch32_eg_configs @@ -118,6 +118,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -175,12 +184,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -192,10 +195,28 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y @@ -211,6 +232,7 @@ CONFIG_SELECT_FATFS_FSATA_CONTROLLER=y # CONFIG_SELECT_FATFS_USB is not set # end of FATFS Configuration +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -228,4 +250,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/storage/sata_fatfs/configs/e2000q_aarch64_eg_configs b/example/storage/sata_fatfs/configs/e2000q_aarch64_eg_configs index 6b410bdbcaaf0f4ae02fba874170bf9824a5f206..7a8595116a61845e28f8b652f09505a0764a799f 100644 --- a/example/storage/sata_fatfs/configs/e2000q_aarch64_eg_configs +++ b/example/storage/sata_fatfs/configs/e2000q_aarch64_eg_configs @@ -114,6 +114,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -171,12 +180,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -188,10 +191,28 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y @@ -207,6 +228,7 @@ CONFIG_SELECT_FATFS_FSATA_CONTROLLER=y # CONFIG_SELECT_FATFS_USB is not set # end of FATFS Configuration +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -224,4 +246,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/storage/sata_fatfs/configs/ft2004_aarch32_eg_configs b/example/storage/sata_fatfs/configs/ft2004_aarch32_eg_configs index 1570e26b22ab39f5c11f30f9af61e6b3f535fafc..23c7dc1592fce6d6f4ebfd42d05fa6aaca730486 100644 --- a/example/storage/sata_fatfs/configs/ft2004_aarch32_eg_configs +++ b/example/storage/sata_fatfs/configs/ft2004_aarch32_eg_configs @@ -125,6 +125,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -182,12 +191,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -199,10 +202,28 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y @@ -217,6 +238,7 @@ CONFIG_SELECT_FATFS_FSATA_PCIE=y # CONFIG_SELECT_FATFS_USB is not set # end of FATFS Configuration +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -234,4 +256,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/storage/sata_fatfs/configs/ft2004_aarch64_eg_configs b/example/storage/sata_fatfs/configs/ft2004_aarch64_eg_configs index 3868441ac8e84089cb1267aa7e154178398dc083..be1230dc5aa62fa6f1f8f5a483317fcfee221bf2 100644 --- a/example/storage/sata_fatfs/configs/ft2004_aarch64_eg_configs +++ b/example/storage/sata_fatfs/configs/ft2004_aarch64_eg_configs @@ -121,6 +121,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -178,12 +187,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -195,10 +198,28 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y @@ -213,6 +234,7 @@ CONFIG_SELECT_FATFS_FSATA_PCIE=y # CONFIG_SELECT_FATFS_USB is not set # end of FATFS Configuration +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -230,4 +252,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/storage/sata_fatfs/sdkconfig b/example/storage/sata_fatfs/sdkconfig index 6b410bdbcaaf0f4ae02fba874170bf9824a5f206..7a8595116a61845e28f8b652f09505a0764a799f 100644 --- a/example/storage/sata_fatfs/sdkconfig +++ b/example/storage/sata_fatfs/sdkconfig @@ -114,6 +114,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -171,12 +180,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -188,10 +191,28 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y @@ -207,6 +228,7 @@ CONFIG_SELECT_FATFS_FSATA_CONTROLLER=y # CONFIG_SELECT_FATFS_USB is not set # end of FATFS Configuration +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -224,4 +246,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/storage/sata_fatfs/sdkconfig.h b/example/storage/sata_fatfs/sdkconfig.h index 08f529aa1b23b64b2d9b4ee98b6742b22003807b..cef44defb1fee4b9dfe105a19c90b2d27e799dbd 100644 --- a/example/storage/sata_fatfs/sdkconfig.h +++ b/example/storage/sata_fatfs/sdkconfig.h @@ -103,6 +103,12 @@ /* Compiler Options */ +/* Cross-Compiler Setting */ + +#define CONFIG_GCC_OPTIMIZE_LEVEL 0 +/* CONFIG_USE_EXT_COMPILER is not set */ +/* CONFIG_USE_KLIN_SYS is not set */ +/* end of Cross-Compiler Setting */ #define CONFIG_OUTPUT_BINARY /* end of Compiler Options */ /* end of Building Option */ @@ -150,11 +156,6 @@ /* CONFIG_FREERTOS_USE_FGDMA is not set */ /* end of Freertos DMA Drivers */ -/* Freertos MMC Drivers */ - -/* CONFIG_FREERTOS_USE_FSDIO is not set */ -/* end of Freertos MMC Drivers */ - /* Freertos Adc Drivers */ /* CONFIG_FREERTOS_USE_ADC is not set */ @@ -164,9 +165,24 @@ /* CONFIG_FREERTOS_USE_CAN is not set */ /* end of Freertos Can Drivers */ + +/* Freertos I2c Drivers */ + +/* CONFIG_FREERTOS_USE_I2C is not set */ +/* end of Freertos I2c Drivers */ + +/* Freertos Mio Drivers */ + +/* CONFIG_FREERTOS_USE_MIO is not set */ +/* end of Freertos Mio Drivers */ + +/* Freertos Timer Drivers */ + +/* CONFIG_FREERTOS_USE_TIMER is not set */ +/* end of Freertos Timer Drivers */ /* end of Component Configuration */ -/* FreeRTOS Setting */ +/* Third-Party Configuration */ /* CONFIG_USE_LWIP is not set */ #define CONFIG_USE_BACKTRACE @@ -180,6 +196,7 @@ #define CONFIG_SELECT_FATFS_FSATA_CONTROLLER /* CONFIG_SELECT_FATFS_USB is not set */ /* end of FATFS Configuration */ +/* CONFIG_USE_FATFS_0_1_4 is not set */ /* CONFIG_USE_SFUD is not set */ /* CONFIG_USE_SPIFFS is not set */ /* CONFIG_USE_AMP is not set */ @@ -195,6 +212,27 @@ #define CONFIG_USE_TLSF /* CONFIG_USE_SDMMC_CMD is not set */ /* CONFIG_USE_CHERRY_USB is not set */ -/* end of FreeRTOS Setting */ +/* end of Third-Party Configuration */ + +/* Kernel Configuration */ + +#define CONFIG_FREERTOS_OPTIMIZED_SCHEDULER +#define CONFIG_FREERTOS_HZ 1000 +#define CONFIG_FREERTOS_MAX_PRIORITIES 32 +#define CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES 13 +#define CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES 11 +#define CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS 1 +#define CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE 1024 +#define CONFIG_FREERTOS_MAX_TASK_NAME_LEN 32 +#define CONFIG_FREERTOS_TIMER_TASK_PRIORITY 1 +#define CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH 2048 +#define CONFIG_FREERTOS_TIMER_QUEUE_LENGTH 10 +#define CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE 0 +#define CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS +#define CONFIG_FREERTOS_USE_TRACE_FACILITY +#define CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS +/* CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set */ +#define CONFIG_FREERTOS_TOTAL_HEAP_SIZE 10240 +/* end of Kernel Configuration */ #endif diff --git a/example/storage/spim_spiffs/sdkconfig b/example/storage/spim_spiffs/sdkconfig index 86833babcea362706d1a0dad96787a9b91f15b21..345d7bc6c0f72361db22e2755b906520e050893a 100644 --- a/example/storage/spim_spiffs/sdkconfig +++ b/example/storage/spim_spiffs/sdkconfig @@ -115,6 +115,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -189,10 +198,28 @@ CONFIG_FREERTOS_USE_FSPIM=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y @@ -233,4 +260,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/storage/spim_spiffs/sdkconfig.h b/example/storage/spim_spiffs/sdkconfig.h index 58cde585f8022335463dd04463c7dd44f0d7aac0..f5dd31c815233b82e80d50bc92a24fe7674f4c4a 100644 --- a/example/storage/spim_spiffs/sdkconfig.h +++ b/example/storage/spim_spiffs/sdkconfig.h @@ -104,6 +104,12 @@ /* Compiler Options */ +/* Cross-Compiler Setting */ + +#define CONFIG_GCC_OPTIMIZE_LEVEL 0 +/* CONFIG_USE_EXT_COMPILER is not set */ +/* CONFIG_USE_KLIN_SYS is not set */ +/* end of Cross-Compiler Setting */ #define CONFIG_OUTPUT_BINARY /* end of Compiler Options */ /* end of Building Option */ @@ -165,9 +171,24 @@ /* CONFIG_FREERTOS_USE_CAN is not set */ /* end of Freertos Can Drivers */ + +/* Freertos I2c Drivers */ + +/* CONFIG_FREERTOS_USE_I2C is not set */ +/* end of Freertos I2c Drivers */ + +/* Freertos Mio Drivers */ + +/* CONFIG_FREERTOS_USE_MIO is not set */ +/* end of Freertos Mio Drivers */ + +/* Freertos Timer Drivers */ + +/* CONFIG_FREERTOS_USE_TIMER is not set */ +/* end of Freertos Timer Drivers */ /* end of Component Configuration */ -/* FreeRTOS Setting */ +/* Third-Party Configuration */ /* CONFIG_USE_LWIP is not set */ #define CONFIG_USE_BACKTRACE @@ -202,6 +223,27 @@ #define CONFIG_USE_TLSF /* CONFIG_USE_SDMMC_CMD is not set */ /* CONFIG_USE_CHERRY_USB is not set */ -/* end of FreeRTOS Setting */ +/* end of Third-Party Configuration */ + +/* Kernel Configuration */ + +#define CONFIG_FREERTOS_OPTIMIZED_SCHEDULER +#define CONFIG_FREERTOS_HZ 1000 +#define CONFIG_FREERTOS_MAX_PRIORITIES 32 +#define CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES 13 +#define CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES 11 +#define CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS 1 +#define CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE 1024 +#define CONFIG_FREERTOS_MAX_TASK_NAME_LEN 32 +#define CONFIG_FREERTOS_TIMER_TASK_PRIORITY 1 +#define CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH 2048 +#define CONFIG_FREERTOS_TIMER_QUEUE_LENGTH 10 +#define CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE 0 +#define CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS +#define CONFIG_FREERTOS_USE_TRACE_FACILITY +#define CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS +/* CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set */ +#define CONFIG_FREERTOS_TOTAL_HEAP_SIZE 10240 +/* end of Kernel Configuration */ #endif diff --git a/example/template/configs/d2000_aarch32_eg_configs b/example/template/configs/d2000_aarch32_eg_configs index f75409dd6b59bfe74c23dc4c71b30bac8e54e128..aabb60b1d81636bdc32221ac624123dae18b77d4 100644 --- a/example/template/configs/d2000_aarch32_eg_configs +++ b/example/template/configs/d2000_aarch32_eg_configs @@ -111,6 +111,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + # CONFIG_OUTPUT_BINARY is not set # end of Compiler Options # end of Building Option @@ -168,12 +177,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -185,14 +188,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -210,4 +232,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/template/configs/d2000_aarch64_eg_configs b/example/template/configs/d2000_aarch64_eg_configs index 8479669d3e355e4aacef8d7d14d663e3be930842..826c4b8b506e6b88e30d263750c78b6bacde3c9d 100644 --- a/example/template/configs/d2000_aarch64_eg_configs +++ b/example/template/configs/d2000_aarch64_eg_configs @@ -107,6 +107,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + # CONFIG_OUTPUT_BINARY is not set # end of Compiler Options # end of Building Option @@ -164,12 +173,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -181,14 +184,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -206,4 +228,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/template/configs/e2000d_aarch32_eg_configs b/example/template/configs/e2000d_aarch32_eg_configs index 2bd43e711f00f82227c30cd0cc8fccdb267b9b90..792eeae4e26fe830a4195aab312f7dc5bf03d309 100644 --- a/example/template/configs/e2000d_aarch32_eg_configs +++ b/example/template/configs/e2000d_aarch32_eg_configs @@ -111,6 +111,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -168,12 +177,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -185,14 +188,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -210,4 +232,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/template/configs/e2000d_aarch64_eg_configs b/example/template/configs/e2000d_aarch64_eg_configs index b8c6027e4cfb07936cd1c7588a1c3ba24241457e..f363a8f332dcf6e41d93bf864116d90adfef04eb 100644 --- a/example/template/configs/e2000d_aarch64_eg_configs +++ b/example/template/configs/e2000d_aarch64_eg_configs @@ -107,6 +107,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -164,12 +173,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -181,14 +184,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -206,4 +228,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/template/configs/ft2004_aarch32_eg_configs b/example/template/configs/ft2004_aarch32_eg_configs index 77be645ad12963fe6ff9c2490cc04e19d984c26b..a31ee53ebae19349beab3b8fb0a151865ac75dfd 100644 --- a/example/template/configs/ft2004_aarch32_eg_configs +++ b/example/template/configs/ft2004_aarch32_eg_configs @@ -111,6 +111,15 @@ CONFIG_UNDEF_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + # CONFIG_OUTPUT_BINARY is not set # end of Compiler Options # end of Building Option @@ -168,12 +177,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -185,14 +188,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -210,4 +232,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/template/configs/ft2004_aarch64_eg_configs b/example/template/configs/ft2004_aarch64_eg_configs index b095059c6750cd7540b6219a6c944eed5780981b..54b19567405bcadd54c6a69706da81a21aa568ee 100644 --- a/example/template/configs/ft2004_aarch64_eg_configs +++ b/example/template/configs/ft2004_aarch64_eg_configs @@ -107,6 +107,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + # CONFIG_OUTPUT_BINARY is not set # end of Compiler Options # end of Building Option @@ -164,12 +173,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -181,14 +184,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -206,4 +228,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/template/main.c b/example/template/main.c index b157fbf01cb65960166a8e927fab8531cae38bd3..17357ce0db566c6d4a336ad927750c8327f91102 100644 --- a/example/template/main.c +++ b/example/template/main.c @@ -20,98 +20,20 @@ * Ver   Who        Date         Changes * ----- ------     --------    -------------------------------------- */ - - #include #include #include "FreeRTOS.h" #include "task.h" -#include "queue.h" #include "ftypes.h" -#include "fassert.h" -#include "fgeneric_timer.h" -#include "finterrupt.h" -#include "fparameters.h" #include "shell.h" #include "shell_port.h" -static TaskHandle_t cpuStatsTaskHandle = NULL; -static uint8_t CPU_RunInfo[800] = {0}; //保存任务运行时间信息 - -static void CpuStatsTask(void* parameter) -{ - while (1) - { - memset(CPU_RunInfo,0,800); //信息缓冲区清零 - vTaskList((char *)&CPU_RunInfo); //获取任务运行时间信息 - - printf("---------------------------------------------\r\n"); - printf("task_name task_state priority stack task_num\r\n"); - printf("%s", CPU_RunInfo); - printf("---------------------------------------------\r\n"); - - memset(CPU_RunInfo, 0, 800); //信息缓冲区清零 - vTaskGetRunTimeStats((char *)&CPU_RunInfo); - - printf("task_name\trun_time_count\tusage_rate\r\n"); - printf("%s", CPU_RunInfo); - printf("---------------------------------------------\r\n\n"); - vTaskDelay(5000); /* 延时 */ - } -} - -static TaskHandle_t appTaskCreateHandle = NULL; - -static void AppTaskCreate(void) -{ - BaseType_t xReturn = pdPASS;/* 定义一个创建信息返回值,默认为 pdPASS */ - - printf("create AppTaskCreate!\r\n"); - taskENTER_CRITICAL(); //进入临界区 - /* 创建 CPU stats 任务 */ - xReturn = xTaskCreate((TaskFunction_t )CpuStatsTask, /* 任务入口函数 */ - (const char* )"CPU_STATS_Task",/* 任务名字 */ - (uint16_t )512, /* 任务栈大小 */ - (void* )NULL, /* 任务入口函数参数 */ - (UBaseType_t )4, /* 任务的优先级 */ - (TaskHandle_t* )&cpuStatsTaskHandle);/* 任务控制块指针 */ - - if (pdPASS == xReturn) - { - printf("create cpu stats task success!\r\n"); - } - - vTaskDelete(appTaskCreateHandle); //删除 AppTaskCreate 任务 - - taskEXIT_CRITICAL(); //退出临界区 -} - -BaseType_t TestFreeRTOSEntry() -{ - BaseType_t xReturn = pdPASS;/* 定义一个创建信息返回值,默认为 pdPASS */ - - printf("get cpu stats TestCpuStatsEntry\r\n"); - xReturn = xTaskCreate((TaskFunction_t )AppTaskCreate, /* 任务入口函数 */ - (const char* )"AppTaskCreate",/* 任务名字 */ - (uint16_t )512, /* 任务栈大小 */ - (void* )NULL,/* 任务入口函数参数 */ - (UBaseType_t )1, /* 任务的优先级 */ - (TaskHandle_t* )&appTaskCreateHandle); /* 任务控制 */ - - return xReturn; -} - int main() { printf("main hello ft Date: %s, Time: %s\n", __DATE__, __TIME__); BaseType_t xReturn = pdPASS; - /* 创建 CPU stats 任务 */ - xReturn = TestFreeRTOSEntry(); - if(xReturn != pdPASS) - goto FAIL_EXIT; - - xReturn = LSUserShellTask() ; + xReturn = LSUserShellTask(); if(xReturn != pdPASS) goto FAIL_EXIT; diff --git a/example/template/sdkconfig b/example/template/sdkconfig index b8c6027e4cfb07936cd1c7588a1c3ba24241457e..f363a8f332dcf6e41d93bf864116d90adfef04eb 100644 --- a/example/template/sdkconfig +++ b/example/template/sdkconfig @@ -107,6 +107,15 @@ CONFIG_FPU_STACK_SIZE=0x1000 # # Compiler Options # + +# +# Cross-Compiler Setting +# +CONFIG_GCC_OPTIMIZE_LEVEL=0 +# CONFIG_USE_EXT_COMPILER is not set +# CONFIG_USE_KLIN_SYS is not set +# end of Cross-Compiler Setting + CONFIG_OUTPUT_BINARY=y # end of Compiler Options # end of Building Option @@ -164,12 +173,6 @@ CONFIG_FREERTOS_USE_UART=y # CONFIG_FREERTOS_USE_FGDMA is not set # end of Freertos DMA Drivers -# -# Freertos MMC Drivers -# -# CONFIG_FREERTOS_USE_FSDIO is not set -# end of Freertos MMC Drivers - # # Freertos Adc Drivers # @@ -181,14 +184,33 @@ CONFIG_FREERTOS_USE_UART=y # # CONFIG_FREERTOS_USE_CAN is not set # end of Freertos Can Drivers + +# +# Freertos I2c Drivers +# +# CONFIG_FREERTOS_USE_I2C is not set +# end of Freertos I2c Drivers + +# +# Freertos Mio Drivers +# +# CONFIG_FREERTOS_USE_MIO is not set +# end of Freertos Mio Drivers + +# +# Freertos Timer Drivers +# +# CONFIG_FREERTOS_USE_TIMER is not set +# end of Freertos Timer Drivers # end of Component Configuration # -# FreeRTOS Setting +# Third-Party Configuration # # CONFIG_USE_LWIP is not set CONFIG_USE_BACKTRACE=y # CONFIG_USE_FATFS is not set +# CONFIG_USE_FATFS_0_1_4 is not set # CONFIG_USE_SFUD is not set # CONFIG_USE_SPIFFS is not set # CONFIG_USE_AMP is not set @@ -206,4 +228,26 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set # CONFIG_USE_CHERRY_USB is not set -# end of FreeRTOS Setting +# end of Third-Party Configuration + +# +# Kernel Configuration +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=32 +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 +CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 +# end of Kernel Configuration diff --git a/example/template/sdkconfig.h b/example/template/sdkconfig.h index 3690ee18f70d80880a7bd41a0b63d91be9249903..8b755d2aa48fd7d29c90c813c008019a0e914ed7 100644 --- a/example/template/sdkconfig.h +++ b/example/template/sdkconfig.h @@ -98,6 +98,12 @@ /* Compiler Options */ +/* Cross-Compiler Setting */ + +#define CONFIG_GCC_OPTIMIZE_LEVEL 0 +/* CONFIG_USE_EXT_COMPILER is not set */ +/* CONFIG_USE_KLIN_SYS is not set */ +/* end of Cross-Compiler Setting */ #define CONFIG_OUTPUT_BINARY /* end of Compiler Options */ /* end of Building Option */ @@ -145,11 +151,6 @@ /* CONFIG_FREERTOS_USE_FGDMA is not set */ /* end of Freertos DMA Drivers */ -/* Freertos MMC Drivers */ - -/* CONFIG_FREERTOS_USE_FSDIO is not set */ -/* end of Freertos MMC Drivers */ - /* Freertos Adc Drivers */ /* CONFIG_FREERTOS_USE_ADC is not set */ @@ -159,13 +160,29 @@ /* CONFIG_FREERTOS_USE_CAN is not set */ /* end of Freertos Can Drivers */ + +/* Freertos I2c Drivers */ + +/* CONFIG_FREERTOS_USE_I2C is not set */ +/* end of Freertos I2c Drivers */ + +/* Freertos Mio Drivers */ + +/* CONFIG_FREERTOS_USE_MIO is not set */ +/* end of Freertos Mio Drivers */ + +/* Freertos Timer Drivers */ + +/* CONFIG_FREERTOS_USE_TIMER is not set */ +/* end of Freertos Timer Drivers */ /* end of Component Configuration */ -/* FreeRTOS Setting */ +/* Third-Party Configuration */ /* CONFIG_USE_LWIP is not set */ #define CONFIG_USE_BACKTRACE /* CONFIG_USE_FATFS is not set */ +/* CONFIG_USE_FATFS_0_1_4 is not set */ /* CONFIG_USE_SFUD is not set */ /* CONFIG_USE_SPIFFS is not set */ /* CONFIG_USE_AMP is not set */ @@ -181,6 +198,27 @@ #define CONFIG_USE_TLSF /* CONFIG_USE_SDMMC_CMD is not set */ /* CONFIG_USE_CHERRY_USB is not set */ -/* end of FreeRTOS Setting */ +/* end of Third-Party Configuration */ + +/* Kernel Configuration */ + +#define CONFIG_FREERTOS_OPTIMIZED_SCHEDULER +#define CONFIG_FREERTOS_HZ 1000 +#define CONFIG_FREERTOS_MAX_PRIORITIES 32 +#define CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES 13 +#define CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES 11 +#define CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS 1 +#define CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE 1024 +#define CONFIG_FREERTOS_MAX_TASK_NAME_LEN 32 +#define CONFIG_FREERTOS_TIMER_TASK_PRIORITY 1 +#define CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH 2048 +#define CONFIG_FREERTOS_TIMER_QUEUE_LENGTH 10 +#define CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE 0 +#define CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS +#define CONFIG_FREERTOS_USE_TRACE_FACILITY +#define CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS +/* CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set */ +#define CONFIG_FREERTOS_TOTAL_HEAP_SIZE 10240 +/* end of Kernel Configuration */ #endif diff --git a/install.py b/install.py index aa2b9064c2d613ddcaffa67aba874628bdfc7551..875cf5e7ae4ee93d1e11638192107753a36a51d5 100644 --- a/install.py +++ b/install.py @@ -86,9 +86,9 @@ os.system("chmod +x ./make/*.mk --silent ") os.system("chmod +x ./lib/Kconfiglib/*.py --silent ") # Add standalone sdk -standalone_sdk_v="0.4.0" +standalone_sdk_v="993810c24d6041a17ee4178649ad115295d2302e" standalone_path=freertos_sdk_path + '/standalone' -standalone_branche="release" +standalone_branche="master" standalone_remote="https://gitee.com/phytium_embedded/phytium-standalone-sdk.git" if not os.path.exists(standalone_path): @@ -105,7 +105,9 @@ if not os.path.exists(standalone_path): os.system("echo \"standalone.mk\" >> {}".format(r'.git/info/sparse-checkout')) os.system("echo \"lib/*\" >> {}".format(r'.git/info/sparse-checkout')) os.system("echo \"doc/*\" >> {}".format(r'.git/info/sparse-checkout')) - + os.system("echo \"third-party/fatfs-0.1.4/*\" >> {}".format(r'.git/info/sparse-checkout')) + os.system("echo \"third-party/sdmmc/*\" >> {}".format(r'.git/info/sparse-checkout')) + os.system("git checkout {}".format(standalone_sdk_v)) print('[1]: Standalone sdk download is succeed') os.chdir(current_path) # 切换回当前路径 diff --git a/make/Kconfig b/make/Kconfig index 69db46689f9c6dfe822b800a4ca4f942435a5276..631b56ae14dff1dd3a57df8e9cb47858965e64e2 100644 --- a/make/Kconfig +++ b/make/Kconfig @@ -1,6 +1,30 @@ menu "Compiler Options" + +menu "Cross-Compiler Setting" + + config GCC_OPTIMIZE_LEVEL + int "Set Optimize Level" + default 0 + help + Set Optimize level for GCC + + config USE_EXT_COMPILER + bool "Use User-Specified Compiler" + default n + + config USE_KLIN_SYS + bool "Use Klin system" + default n + + config EXT_COMPILER_PREFIX + depends on USE_EXT_COMPILER + string "" + default "arm-none-eabi-" if TARGET_ARMV8_AARCH32 + default "aarch64-none-elf-" if TARGET_ARMV8_AARCH64 +endmenu + config OUTPUT_BINARY bool "Build *.bin as Ouput" default n diff --git a/make/complier.mk b/make/complier.mk index c2a7c60d3c234b29b0db21636d1d8388afd2cfc1..9b242471c704cd06eea5d47eb7862ed57439cb92 100755 --- a/make/complier.mk +++ b/make/complier.mk @@ -14,7 +14,8 @@ APP ?= $(CONFIG_TARGET_NAME) QUIET ?=@ -OPT_LEVEL ?= 0 +# OPT_LEVEL ?= 0 +OPT_LEVEL ?= $(CONFIG_GCC_OPTIMIZE_LEVEL) INC_DIR ?= # include 目录 SRC_DIR ?= # 源文件目录 diff --git a/third-party/Kconfig b/third-party/Kconfig index 9276ae4f3373c3ae43d40a570e037d29b65ed276..2ef9478054e48002ea5fa722965241f66dc2fb08 100644 --- a/third-party/Kconfig +++ b/third-party/Kconfig @@ -27,6 +27,17 @@ config USE_FATFS source "$(FREERTOS_SDK_ROOT)/third-party/fatfs-0.1.3/Kconfig" endif +config USE_FATFS_0_1_4 + bool + prompt "Use FATFS(0.1.4)" + default n + help + Include FATFS + + if USE_FATFS_0_1_4 + source "$(FREERTOS_SDK_ROOT)/third-party/fatfs-0.1.4/Kconfig" + endif + config USE_SFUD bool prompt "Use SFUD(Spi Flash Library)" diff --git a/third-party/fatfs-0.1.3/port/fsata_controller/diskio.c b/third-party/fatfs-0.1.3/port/fsata_controller/diskio.c index d0fb49104863f032f7082d28188d2f94263a19d1..e6b21fdc5fc9d5517d0cd8bd985cae9b113fa81a 100644 --- a/third-party/fatfs-0.1.3/port/fsata_controller/diskio.c +++ b/third-party/fatfs-0.1.3/port/fsata_controller/diskio.c @@ -27,7 +27,7 @@ static u8 mem[50000] __attribute__((aligned(1024))) = {0}; #define ADDR_ALIGNMENT 1024 -static FSataCtrl sata_device[FSATA_INSTANCE_NUM];//最多支持16个ahci控制器,可以自行定义个数 +static FSataCtrl sata_device[FSATA_NUM];//最多支持16个ahci控制器,可以自行定义个数 static boolean sata_ok = FALSE; @@ -69,7 +69,7 @@ static int FSataInit(void) return 0; } - for (instance_id = 0; instance_id < FSATA_INSTANCE_NUM; instance_id++) + for (instance_id = 0; instance_id < FSATA_NUM; instance_id++) { host_valid = FALSE; config_p = FSataLookupConfig(instance_id, FSATA_TYPE_CONTROLLER); @@ -137,7 +137,7 @@ static int FSataInit(void) sata_ok = TRUE; /* get host number and port number which link success */ - for(host_num = 0; host_num < FSATA_INSTANCE_NUM; host_num++) + for(host_num = 0; host_num < FSATA_NUM; host_num++) { for (port_num = 0; port_num < sata_device[host_num].n_ports; port_num++) { diff --git a/third-party/fatfs-0.1.3/port/fsata_pcie/diskio.c b/third-party/fatfs-0.1.3/port/fsata_pcie/diskio.c index 27d10ccfee251047aafba985381fa8298a11b118..4ece1c7aaee835dbfd00a45623551b53c263b022 100644 --- a/third-party/fatfs-0.1.3/port/fsata_pcie/diskio.c +++ b/third-party/fatfs-0.1.3/port/fsata_pcie/diskio.c @@ -67,25 +67,25 @@ static void FSataPcieIrqHandler(void *param) static void PCieIntxInit(FPcie* instance_p) { - InterruptSetPriority(FT_PCI_INTA_IRQ_NUM, 0); + InterruptSetPriority(FPCI_INTA_IRQ_NUM, 0); - InterruptInstall(FT_PCI_INTA_IRQ_NUM, (IrqHandler)FPcieIntxIrqHandler, instance_p, "pcieInta"); - InterruptUmask(FT_PCI_INTA_IRQ_NUM); - InterruptSetPriority(FT_PCI_INTB_IRQ_NUM, 0); - InterruptInstall(FT_PCI_INTB_IRQ_NUM, (IrqHandler)FPcieIntxIrqHandler, instance_p, "pcieIntB"); - InterruptUmask(FT_PCI_INTB_IRQ_NUM); - InterruptSetPriority(FT_PCI_INTC_IRQ_NUM, 0); - InterruptInstall(FT_PCI_INTC_IRQ_NUM, (IrqHandler)FPcieIntxIrqHandler, instance_p, "pcieIntC"); - InterruptUmask(FT_PCI_INTC_IRQ_NUM); - InterruptSetPriority(FT_PCI_INTD_IRQ_NUM, 0); - InterruptInstall(FT_PCI_INTD_IRQ_NUM, (IrqHandler)FPcieIntxIrqHandler, instance_p, "pcieIntD"); - InterruptUmask(FT_PCI_INTD_IRQ_NUM); + InterruptInstall(FPCI_INTA_IRQ_NUM, (IrqHandler)FPcieIntxIrqHandler, instance_p, "pcieInta"); + InterruptUmask(FPCI_INTA_IRQ_NUM); + InterruptSetPriority(FPCI_INTB_IRQ_NUM, 0); + InterruptInstall(FPCI_INTB_IRQ_NUM, (IrqHandler)FPcieIntxIrqHandler, instance_p, "pcieIntB"); + InterruptUmask(FPCI_INTB_IRQ_NUM); + InterruptSetPriority(FPCI_INTC_IRQ_NUM, 0); + InterruptInstall(FPCI_INTC_IRQ_NUM, (IrqHandler)FPcieIntxIrqHandler, instance_p, "pcieIntC"); + InterruptUmask(FPCI_INTC_IRQ_NUM); + InterruptSetPriority(FPCI_INTD_IRQ_NUM, 0); + InterruptInstall(FPCI_INTD_IRQ_NUM, (IrqHandler)FPcieIntxIrqHandler, instance_p, "pcieIntD"); + InterruptUmask(FPCI_INTD_IRQ_NUM); } static void FPcieInit() { /* 第一步初始化pcie_obj这个实例,初始化mem,io资源成员 */ - FPcieCfgInitialize(&pcie_obj, FPcieLookupConfig(FT_PCIE0_ID)); + FPcieCfgInitialize(&pcie_obj, FPcieLookupConfig(FPCIE0_ID)); FSATA_DEBUG("\n"); FSATA_DEBUG(" PCI:\n"); FSATA_DEBUG(" B:D:F VID:PID parent_BDF class_code\n"); diff --git a/third-party/fatfs-0.1.4/Kconfig b/third-party/fatfs-0.1.4/Kconfig new file mode 100644 index 0000000000000000000000000000000000000000..31cd44f789970ced241f581fecbe6b4e1ec7f78c --- /dev/null +++ b/third-party/fatfs-0.1.4/Kconfig @@ -0,0 +1 @@ +source "$STANDALONE_DIR/third-party/fatfs-0.1.4/Kconfig" \ No newline at end of file diff --git a/third-party/fatfs-0.1.4/fatfs.mk b/third-party/fatfs-0.1.4/fatfs.mk new file mode 100644 index 0000000000000000000000000000000000000000..7ec047e5172ad189f2f035b55a553dfcebba040f --- /dev/null +++ b/third-party/fatfs-0.1.4/fatfs.mk @@ -0,0 +1,15 @@ +FATFS_OS_DIR := $(FREERTOS_SDK_ROOT)/third-party/fatfs-0.1.4 +FATFS_BM_DIR := $(STANDALONE_DIR)/third-party/fatfs-0.1.4 + +include $(FATFS_BM_DIR)/fatfs.mk + +ifdef CONFIG_USE_FREERTOS + INC_DIR += $(FATFS_OS_DIR)/osal + SRC_DIR += $(FATFS_OS_DIR)/osal + + ifdef CONFIG_FATFS_USB + INC_DIR += $(FATFS_OS_DIR)/port/fusb + SRC_DIR += $(FATFS_OS_DIR)/port/fusb + endif + +endif #CONFIG_USE_FREERTOS \ No newline at end of file diff --git a/third-party/fatfs-0.1.4/osal/ffsystem.c b/third-party/fatfs-0.1.4/osal/ffsystem.c new file mode 100644 index 0000000000000000000000000000000000000000..06098af3e85c2ea9eed808e2f8c06131831cacfb --- /dev/null +++ b/third-party/fatfs-0.1.4/osal/ffsystem.c @@ -0,0 +1,199 @@ +/*------------------------------------------------------------------------*/ +/* Sample Code of OS Dependent Functions for FatFs */ +/* (C)ChaN, 2018 */ +/*------------------------------------------------------------------------*/ + +#include +#include +#include "ff.h" +#include "fassert.h" +#include "sdkconfig.h" +#ifdef CONFIG_FATFS_ALLOC_PREFER_MEMP +#include "fmemory_pool.h" +#endif + +#ifdef CONFIG_FATFS_ALLOC_PREFER_MEMP +#define FATFS_MEMP_TOTAL_SIZE (CONFIG_FATFS_MEMP_SIZE * SZ_1M) +static FMemp ff_memp; +static u8 memp_buf[FATFS_MEMP_TOTAL_SIZE] __attribute((aligned(64))); + +void ff_mempinit(void) +{ + /* create memory pool to support dynamic memory allocation */ + FASSERT (FT_SUCCESS == FMempInit(&ff_memp, &memp_buf[0], &memp_buf[0] + FATFS_MEMP_TOTAL_SIZE)); +} +#endif + + +/*------------------------------------------------------------------------*/ +/* Allocate a memory block */ +/*------------------------------------------------------------------------*/ + +void* ff_memalloc ( /* Returns pointer to the allocated memory block (null if not enough core) */ + UINT msize /* Number of bytes to allocate */ +) +{ + void *result = NULL; + +#ifdef CONFIG_FATFS_ALLOC_PREFER_MEMP + result = FMempMalloc(&ff_memp, msize); +#else + result = malloc(msize); /* Allocate a new memory block with POSIX API */ +#endif + if (NULL != result){ + memset(result, 0, msize); + } + + return result; +} + +void* ff_memalign( /* Returns pointer to the allocated memory block (null if not enough core) */ + UINT msize, /* Number of bytes to allocate */ + UINT align /* Alignment */ +) +{ + void *result = NULL; + +#ifdef CONFIG_FATFS_ALLOC_PREFER_MEMP + result = FMempMallocAlign(&ff_memp, msize, align); +#else + #error "allocate aligned memory is not supported !!!" + result = malloc(msize); /* Allocate a new memory block with POSIX API */ +#endif + + if (NULL != result){ + memset(result, 0, msize); + } + + return result; +} + +/*------------------------------------------------------------------------*/ +/* Free a memory block */ +/*------------------------------------------------------------------------*/ + +void ff_memfree ( + void* mblock /* Pointer to the memory block to free (nothing to do if null) */ +) +{ +#ifdef CONFIG_FATFS_ALLOC_PREFER_MEMP + FMempFree(&ff_memp, mblock); +#else + free(mblock); /* Free the memory block with POSIX API */ +#endif +} + + + +#if FF_FS_REENTRANT /* Mutal exclusion */ + +/*------------------------------------------------------------------------*/ +/* Create a Synchronization Object */ +/*------------------------------------------------------------------------*/ +/* This function is called in f_mount() function to create a new +/ synchronization object for the volume, such as semaphore and mutex. +/ When a 0 is returned, the f_mount() function fails with FR_INT_ERR. +*/ + +int ff_cre_syncobj ( /* 1:Function succeeded, 0:Could not create the sync object */ + BYTE vol, /* Corresponding volume (logical drive number) */ + FF_SYNC_t* sobj /* Pointer to return the created sync object */ +) +{ + /* FreeRTOS */ + *sobj = xSemaphoreCreateMutex(); + return (int)(*sobj != NULL); +} + + +/*------------------------------------------------------------------------*/ +/* Delete a Synchronization Object */ +/*------------------------------------------------------------------------*/ +/* This function is called in f_mount() function to delete a synchronization +/ object that created with ff_cre_syncobj() function. When a 0 is returned, +/ the f_mount() function fails with FR_INT_ERR. +*/ + +int ff_del_syncobj ( /* 1:Function succeeded, 0:Could not delete due to an error */ + FF_SYNC_t sobj /* Sync object tied to the logical drive to be deleted */ +) +{ + /* FreeRTOS */ + vSemaphoreDelete(sobj); + return 1; +} + + +/*------------------------------------------------------------------------*/ +/* Request Grant to Access the Volume */ +/*------------------------------------------------------------------------*/ +/* This function is called on entering file functions to lock the volume. +/ When a 0 is returned, the file function fails with FR_TIMEOUT. +*/ + +int ff_req_grant ( /* 1:Got a grant to access the volume, 0:Could not get a grant */ + FF_SYNC_t sobj /* Sync object to wait */ +) +{ + /* FreeRTOS */ + return (int)(xSemaphoreTake(sobj, FF_FS_TIMEOUT) == pdTRUE); +} + + +/*------------------------------------------------------------------------*/ +/* Release Grant to Access the Volume */ +/*------------------------------------------------------------------------*/ +/* This function is called on leaving file functions to unlock the volume. +*/ + +void ff_rel_grant ( + FF_SYNC_t sobj /* Sync object to be signaled */ +) +{ + /* FreeRTOS */ + xSemaphoreGive(sobj); +} + +#endif + +DWORD get_fattime(void) /* TODO: impl file time with RTC */ +{ + return ((DWORD)(2022 - 1980) << 25) /* bit31:25, Year origin from the 1980 (0..127, e.g. 37 for 2017) */ + | ((DWORD)(11) << 21) /* bit24:21, Month (1..12) */ + | ((DWORD)2 << 16) /* bit20:16, Day of the month (1..31) */ + | (WORD)(9 << 11) /* bit15:11, Hour (0..23) */ + | (WORD)(3 << 5) /* bit10:5, Minute (0..59) */ + | (WORD)(15 >> 1); /* bit4:0, Second / 2 (0..29, e.g. 25 for 50) */ +} + + +void ff_systimer_start(void) +{ + /* no need to start systimer */ +} + +QWORD ff_systimer_get_tick(void) +{ + return (QWORD)xTaskGetTickCount(); +} + +void ff_systimer_tick_to_time(QWORD ticks, DWORD *sec, DWORD *msec) +{ + + if (sec) + { + *sec = (DWORD)(ticks / (u32)configTICK_RATE_HZ); + } + + if (msec) + { + *msec = (DWORD)(ticks % (DWORD)configTICK_RATE_HZ / + (((DWORD)configTICK_RATE_HZ * 1 + 999) / 1000)); + } + +} + +void ff_systimer_stop(void) +{ + /* no need to stop systimer */ +} \ No newline at end of file diff --git a/third-party/fatfs-0.1.4/port/fusb/diskio_usb.c b/third-party/fatfs-0.1.4/port/fusb/diskio_usb.c new file mode 100644 index 0000000000000000000000000000000000000000..c5a865782ad84d19c07da72a9795a6b247fd28fd --- /dev/null +++ b/third-party/fatfs-0.1.4/port/fusb/diskio_usb.c @@ -0,0 +1,336 @@ +/*-----------------------------------------------------------------------*/ +/* Low level disk I/O module skeleton for FatFs (C)ChaN, 2016 */ +/*-----------------------------------------------------------------------*/ +/* If a working storage control module is available, it should be */ +/* attached to the FatFs via a glue function rather than modifying it. */ +/* This is an example of glue functions to attach various exsisting */ +/* storage control modules to the FatFs module with a defined API. */ +/*-----------------------------------------------------------------------*/ + +#include +#include +#include "fparameters.h" +#include "fdebug.h" +#include "fkernel.h" +#include "fparameters.h" +#include "fassert.h" +#include "fcache.h" +#include "finterrupt.h" +#include "fcpu_info.h" +#include "diskio.h" +#include "ffconf.h" +#include "ff.h" +#include "fmemory_pool.h" +#include "sdkconfig.h" + +#include "usbh_core.h" +#include "usbh_msc.h" + +#define FF_DEBUG_TAG "DISKIO-USB" +#define FF_ERROR(format, ...) FT_DEBUG_PRINT_E(FF_DEBUG_TAG, format, ##__VA_ARGS__) +#define FF_INFO(format, ...) FT_DEBUG_PRINT_I(FF_DEBUG_TAG, format, ##__VA_ARGS__) +#define FF_DEBUG(format, ...) FT_DEBUG_PRINT_D(FF_DEBUG_TAG, format, ##__VA_ARGS__) +#define FF_WARN(format, ...) FT_DEBUG_PRINT_W(FF_DEBUG_TAG, format, ##__VA_ARGS__) + +#define FUSB_MEMP_TOTAL_SIZE SZ_1M +#define FUSB_FATFS_ID FUSB3_ID_0 + +static FMemp memp; +static u8 memp_buf[FUSB_MEMP_TOTAL_SIZE]; +FASSERT_STATIC(FUSB_FATFS_ID < FUSB3_NUM); + +static const u32 usb_irq_num[FUSB3_NUM] = +{ + [FUSB3_ID_0] = FUSB3_0_IRQ_NUM, + [FUSB3_ID_1] = FUSB3_1_IRQ_NUM +}; + +static const uintptr xhci_base_addr[FUSB3_NUM] = +{ + [FUSB3_ID_0] = FUSB3_0_BASE_ADDR + FUSB3_XHCI_OFFSET, + [FUSB3_ID_1] = FUSB3_1_BASE_ADDR + FUSB3_XHCI_OFFSET +}; + +typedef struct +{ + DWORD id; + boolean init_ok; + BYTE pdrv; + const TCHAR *disk_name; +} ff_usb_disk; + +static ff_usb_disk usb_disk = +{ + .pdrv = FF_DRV_NOT_USED, + .init_ok = FALSE, + .disk_name = "/dev/sda" +}; + +/*****************************************************************************/ +extern void USBH_IRQHandler(void); + +static void UsbHcInterrruptHandler(s32 vector, void *param) +{ + USBH_IRQHandler(); +} + +static void UsbHcSetupInterrupt(void) +{ + u32 cpu_id; + u32 irq_num = usb_irq_num[FUSB_FATFS_ID]; + u32 irq_priority = 13U; + + GetCpuId(&cpu_id); + InterruptSetTargetCpus(irq_num, cpu_id); + + InterruptSetPriority(irq_num, irq_priority); + + /* register intr callback */ + InterruptInstall(irq_num, + UsbHcInterrruptHandler, + NULL, + NULL); + + /* enable irq */ + InterruptUmask(irq_num); +} + +void UsbHcSetupMemp(void) +{ + if (FT_COMPONENT_IS_READY != memp.is_ready) + { + USB_ASSERT(FT_SUCCESS == FMempInit(&memp, &memp_buf[0], &memp_buf[0] + FUSB_MEMP_TOTAL_SIZE)); + } +} + +/* implement cherryusb weak functions */ +void usb_hc_low_level_init(void) +{ + UsbHcSetupMemp(); + UsbHcSetupInterrupt(); +} + +unsigned long usb_hc_get_register_base(void) +{ + return xhci_base_addr[FUSB_FATFS_ID]; +} + +void *usb_hc_malloc(size_t size) +{ + return usb_hc_malloc_align(sizeof(void *), size); +} + +void *usb_hc_malloc_align(size_t align, size_t size) +{ + void *result = FMempMallocAlign(&memp, size, align); + + if (result) + memset(result, 0U, size); + + return result; +} + +void usb_hc_free(void *ptr) +{ + if (NULL != ptr) + FMempFree(&memp, ptr); +} + +void usb_assert(const char *filename, int linenum) +{ + FAssert(filename, linenum, 0xff); +} + +void usb_hc_dcache_invalidate(void *addr, unsigned long len) +{ + FCacheDCacheInvalidateRange((uintptr)addr, len); +} +/*****************************************/ + +/*-----------------------------------------------------------------------*/ +/* Get Drive Status */ +/*-----------------------------------------------------------------------*/ + +static DSTATUS usb_disk_status ( + BYTE pdrv /* Physical drive nmuber to identify the drive */ +) +{ + DSTATUS status = STA_NOINIT; + ff_usb_disk *disk = &usb_disk; + + if (disk->init_ok) + status &= ~STA_NOINIT; + + return status; +} + +/*-----------------------------------------------------------------------*/ +/* Inidialize a Drive */ +/*-----------------------------------------------------------------------*/ + +static DSTATUS usb_disk_initialize( + BYTE pdrv /* Physical drive nmuber to identify the drive */ +) +{ + DSTATUS status = STA_NOINIT; + ff_usb_disk *disk = &usb_disk; + int retries = 10000; + + if (FF_DRV_NOT_USED == disk->pdrv) + { + return STA_NOINIT; + } + + if (FALSE == disk->init_ok) + { + (void)usbh_initialize(); /* start a task to emurate usb hub and attached usb disk */ + while (TRUE) + { + if (NULL != usbh_find_class_instance(disk->disk_name)) + { + break; + } + + if (retries-- < 0) + { + FF_ERROR("init cherryusb host failed or usb disk device not found !!!"); + return STA_NOINIT; + } + + vTaskDelay(10); /* may need to wait while for usb disk emuration */ + } + + disk->init_ok = TRUE; + } + + status &= ~STA_NOINIT; + return status; +} + +/*-----------------------------------------------------------------------*/ +/* Read Sector(s) */ +/*-----------------------------------------------------------------------*/ + +static DRESULT usb_disk_read ( + BYTE pdrv, /* Physical drive nmuber to identify the drive */ + BYTE *buff, /* Data buffer to store read data */ + DWORD sector, /* Start sector in LBA */ + UINT count /* Number of sectors to read */ +) +{ + DRESULT status = RES_OK; + ff_usb_disk *disk = &usb_disk; + struct usbh_msc *msc_class = (struct usbh_msc *)usbh_find_class_instance(disk->disk_name); + + if (msc_class) + { + if (0 > usbh_msc_scsi_read10(msc_class, sector, buff, count)) + { + FF_ERROR("read usb sector [%d-%d] failed: 0x%x", sector, sector + count); + status = RES_ERROR; + } + } + else + { + status = RES_PARERR; + } + + return status; +} + +/*-----------------------------------------------------------------------*/ +/* Write Sector(s) */ +/*-----------------------------------------------------------------------*/ + +static DRESULT usb_disk_write ( + BYTE pdrv, /* Physical drive nmuber to identify the drive */ + const BYTE *buff, /* Data to be written */ + DWORD sector, /* Start sector in LBA */ + UINT count /* Number of sectors to write */ +) +{ + DRESULT status = RES_OK; + ff_usb_disk *disk = &usb_disk; + struct usbh_msc *msc_class = (struct usbh_msc *)usbh_find_class_instance(disk->disk_name); + + if (msc_class) + { + if (0 > usbh_msc_scsi_write10(msc_class, sector, buff, count)) + { + FF_ERROR("write usb sector [%d-%d] failed: 0x%x", sector, sector + count); + status = RES_ERROR; + } + } + else + { + status = RES_PARERR; + } + + return status; +} + +/*-----------------------------------------------------------------------*/ +/* Miscellaneous Functions */ +/*-----------------------------------------------------------------------*/ + +DRESULT usb_disk_ioctl ( + BYTE pdrv, /* Physical drive nmuber (0..) */ + BYTE cmd, /* Control code */ + void *buff /* Buffer to send/receive control data */ +) +{ + DRESULT res; + ff_usb_disk *disk = &usb_disk; + struct usbh_msc *msc_class = (struct usbh_msc *)usbh_find_class_instance(disk->disk_name); + + res = RES_PARERR; + if (NULL == msc_class) + { + return res; + } + + switch (cmd) + { + case CTRL_SYNC: /* Nothing to do */ + res = RES_OK; + break; + + case GET_SECTOR_COUNT: /* Get number of sectors on the drive */ + *(DWORD*)buff = msc_class->blocknum; + res = RES_OK; + break; + + case GET_SECTOR_SIZE: /* Get size of sector for generic read/write */ + *(WORD*)buff = msc_class->blocksize; + res = RES_OK; + break; + + case GET_BLOCK_SIZE: + *(DWORD*)buff = 1; /* This is not flash storage that can be erase by command, return 1 */ + res = RES_OK; + break; + } + + return res; +} + +static const ff_diskio_driver_t usb_disk_drv = +{ + .init = &usb_disk_initialize, + .status = &usb_disk_status, + .read = &usb_disk_read, + .write = &usb_disk_write, + .ioctl = &usb_disk_ioctl +}; + +void ff_diskio_register_usb(BYTE pdrv) +{ + ff_usb_disk *disk = &usb_disk; + + disk->id = FUSB_FATFS_ID; + disk->init_ok = FALSE; + disk->pdrv = pdrv; /* assign volume for usb disk */ + ff_diskio_register(pdrv, &usb_disk_drv); + + FF_INFO("create usb disk as driver-%d", disk->pdrv); +} \ No newline at end of file diff --git a/third-party/freertos/Kconfig b/third-party/freertos/Kconfig new file mode 100644 index 0000000000000000000000000000000000000000..811aed875cd52c10c0a7039e0bdc3cb7130dbf0c --- /dev/null +++ b/third-party/freertos/Kconfig @@ -0,0 +1,188 @@ + + + config FREERTOS_OPTIMIZED_SCHEDULER + bool "Enable FreeRTOS pĺatform optimized scheduler" + default y + help + On most platforms there are instructions can speedup the ready task + searching. Enabling this option the FreeRTOS with this instructions + support will be built. + + config FREERTOS_HZ + int "Tick rate (Hz)" + range 1 10000 + default 1000 + help + Select the tick rate at which FreeRTOS does pre-emptive context switching. + + config FREERTOS_MAX_PRIORITIES + int "Max task priority" + range 1 32 + default 32 + help + Sets the maximum priority that can be assigned to a task. Tasks can be assigned a priority + from zero, which is the lowest priority, to (FREERTOS_MAX_PRIORITIES - 1), which is the highest + priority. + + config FREERTOS_KERNEL_INTERRUPT_PRIORITIES + int "Kernel interrupt priority" + range 1 13 + default 13 + help + Sets the interrupt priority used by the tick interrupt, and must always be set to the + lowest possible interrupt priority. + + config FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES + int "Max api call interrupt priority" + range 1 15 + default 11 + help + Sets the highest interrupt priority from which interrupt-safe FreeRTOS API functions can + be called. + + + config FREERTOS_THREAD_LOCAL_STORAGE_POINTERS + int "Number of thread local storage pointers" + range 1 256 + default 1 + help + FreeRTOS has the ability to store per-thread pointers in the task + control block. This controls the number of pointers available. + + This value must be at least 1. Index 0 is reserved for use by the pthreads API + thread-local-storage. Other indexes can be used for any desired purpose. + + + config FREERTOS_MINIMAL_TASK_STACKSIZE + int "Minimal Task stack size" + range 768 32768 + default 1024 + help + The idle task has its own stack, sized in bytes. The default size is enough for most uses. Size can be + reduced to 768 bytes if no (or simple) FreeRTOS idle hooks are used and pthread local storage or FreeRTOS + local storage cleanup callbacks are not used. + + The stack size may need to be increased above the default if the app installs idle or thread local storage + cleanup hooks that use a lot of stack memory. + + + config FREERTOS_MAX_TASK_NAME_LEN + int "Maximum task name length" + range 1 256 + default 32 + help + Changes the maximum task name length. Each task allocated will + include this many bytes for a task name. Using a shorter value + saves a small amount of RAM, a longer value allows more complex + names. + + For most uses, the default of 16 is OK. + + + config FREERTOS_TIMER_TASK_PRIORITY + int "FreeRTOS timer task priority" + range 1 25 + default 1 + help + The timer service task (primarily) makes use of existing FreeRTOS features, allowing timer + functionality to be added to an application with minimal impact on the size of the application's + executable binary. + + Use this constant to define the priority that the timer task will run at. + + config FREERTOS_TIMER_TASK_STACK_DEPTH + int "FreeRTOS timer task stack size" + range 1536 32768 + default 2048 + help + The timer service task (primarily) makes use of existing FreeRTOS features, allowing timer + functionality to be added to an application with minimal impact on the size of the application's + executable binary. + + Use this constant to define the size (in bytes) of the stack allocated for the timer task. + + config FREERTOS_TIMER_QUEUE_LENGTH + int "FreeRTOS timer queue length" + range 5 20 + default 10 + help + FreeRTOS provides a set of timer related API functions. Many of these functions use a standard + FreeRTOS queue to send commands to the timer service task. The queue used for this purpose is + called the 'timer command queue'. The 'timer command queue' is private to the FreeRTOS timer + implementation, and cannot be accessed directly. + + For most uses the default value of 10 is OK. + + config FREERTOS_QUEUE_REGISTRY_SIZE + int "FreeRTOS queue registry size" + range 0 20 + default 0 + help + FreeRTOS uses the queue registry as a means for kernel aware debuggers to locate queues, semaphores, + and mutexes. The registry allows for a textual name to be associated with a queue for easy identification + within a debugging GUI. A value of 0 will disable queue registry functionality, and a value larger than 0 + will specify the number of queues/semaphores/mutexes that the registry can hold. + + config FREERTOS_GENERATE_RUN_TIME_STATS + bool "Enable FreeRTOS to collect run time stats" + default y + select FREERTOS_USE_TRACE_FACILITY + select FREERTOS_USE_STATS_FORMATTING_FUNCTIONS + help + If enabled, configGENERATE_RUN_TIME_STATS will be defined as 1 in + FreeRTOS. This will allow FreeRTOS to collect information regarding the + usage of processor time amongst FreeRTOS tasks. + The function vTaskGetRunTimeStats() will also be available + if FREERTOS_USE_STATS_FORMATTING_FUNCTIONS and + FREERTOS_USE_TRACE_FACILITY are enabled. vTaskGetRunTimeStats() will + display the run time of each task as a % of the total run time of all + CPUs (task run time / no of CPUs) / (total run time / 100 ) + + config FREERTOS_USE_TRACE_FACILITY + bool "Enable FreeRTOS trace facility" + default n + help + If enabled, configUSE_TRACE_FACILITY will be defined as 1 in FreeRTOS. + This will allow the usage of trace facility functions such as + uxTaskGetSystemState(). + + config FREERTOS_USE_STATS_FORMATTING_FUNCTIONS + bool "Enable FreeRTOS stats formatting functions" + depends on FREERTOS_USE_TRACE_FACILITY + default n + help + If enabled, configUSE_STATS_FORMATTING_FUNCTIONS will be defined as 1 in + FreeRTOS. This will allow the usage of stats formatting functions such + as vTaskList(). + + config FREERTOS_USE_TICKLESS_IDLE + bool "Tickless idle support" + default n + help + If power management support is enabled, FreeRTOS will be able to put + the system into light sleep mode when no tasks need to run for a number + of ticks. This number can be set using FREERTOS_IDLE_TIME_BEFORE_SLEEP option. + This feature is also known as "automatic light sleep". + + Note that timers created using APIs may prevent the system from + entering sleep mode, even when no tasks need to run. + To skip unnecessary wake-up initialize a timer with the "skip_unhandled_events" option as true. + + If disabled, automatic light sleep support will be disabled. + + config FREERTOS_IDLE_TIME_BEFORE_SLEEP + int "Minimum number of ticks to enter sleep mode for" + depends on FREERTOS_USE_TICKLESS_IDLE + default 3 + range 2 4294967295 + # Minimal value is 2 because of a check in FreeRTOS.h (search configEXPECTED_IDLE_TIME_BEFORE_SLEEP) + help + FreeRTOS will enter light sleep mode if no tasks need to run for this number + of ticks. + + config FREERTOS_TOTAL_HEAP_SIZE + int "Total amount of RAM available in the FreeRTOS heap, unit kbytes" + range 1 65535 + default 10240 + help + Set the total amount of RAM available in the FreeRTOS heap, unit kbytes, less than RAM_SIZE_MB. \ No newline at end of file diff --git a/third-party/freertos/portable/GCC/ft_platform/aarch32/FreeRTOSConfig.h b/third-party/freertos/portable/GCC/ft_platform/FreeRTOSConfig.h similarity index 67% rename from third-party/freertos/portable/GCC/ft_platform/aarch32/FreeRTOSConfig.h rename to third-party/freertos/portable/GCC/ft_platform/FreeRTOSConfig.h index bf267016ee752e4332f15701d26f3bf32a1422d9..af991d516d12a403ec9e37b5d709b3c5413b85c2 100644 --- a/third-party/freertos/portable/GCC/ft_platform/aarch32/FreeRTOSConfig.h +++ b/third-party/freertos/portable/GCC/ft_platform/FreeRTOSConfig.h @@ -28,6 +28,7 @@ #ifndef FREERTOS_CONFIG_H #define FREERTOS_CONFIG_H +#include "sdkconfig.h" #if !defined(__ASSEMBLER__) #include "fparameters.h" #include "finterrupt.h" @@ -67,22 +68,31 @@ * */ -/* 在不安全group1 中,16 is steps ,3 是其中等级*/ -#define configKERNEL_INTERRUPT_PRIORITY IRQ_PRIORITY_VALUE_11 -/* 在不安全group1 中 ,0x8 ~0xb 不可以使用安全api(优先级越低越高)*/ -#define configMAX_API_CALL_INTERRUPT_PRIORITY IRQ_PRIORITY_VALUE_11 +/* the interrupt priority used by the tick interrupt */ +#define configKERNEL_INTERRUPT_PRIORITY ( CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES ) +/* the highest interrupt priority from which interrupt-safe FreeRTOS API functions can be called */ +#define configMAX_API_CALL_INTERRUPT_PRIORITY ( CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES ) -#define configUSE_PORT_OPTIMISED_TASK_SELECTION 1 //Method to select the next task -#define configUSE_TICKLESS_IDLE 0 //disable tickless mode -#define configTICK_RATE_HZ ((TickType_t)1000) //system timer rate 1ms -#define configUSE_PREEMPTION 1 //preemption task +#ifdef CONFIG_FREERTOS_OPTIMIZED_SCHEDULER +#define configUSE_PORT_OPTIMISED_TASK_SELECTION 1 +#endif + +#ifdef CONFIG_FREERTOS_USE_TICKLESS_IDLE +#define configUSE_TICKLESS_IDLE 1 +#define configEXPECTED_IDLE_TIME_BEFORE_SLEEP CONFIG_FREERTOS_IDLE_TIME_BEFORE_SLEEP +#endif + +#define configTICK_RATE_HZ ( CONFIG_FREERTOS_HZ ) +#define configUSE_PREEMPTION 1 #define configUSE_IDLE_HOOK 1 #define configUSE_TICK_HOOK 1 -#define configMAX_PRIORITIES (7) -#define configMINIMAL_STACK_SIZE ((unsigned short)1024) //min task stack size 100*4 bytes -#define configTOTAL_HEAP_SIZE (10 * 1024 * 1024) //total heap size -#define configMAX_TASK_NAME_LEN (32) -#define configUSE_TRACE_FACILITY 1 //启用可视化跟踪调试 +#define configMAX_PRIORITIES ( CONFIG_FREERTOS_MAX_PRIORITIES ) +#define configMINIMAL_STACK_SIZE ( CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE ) +#define configTOTAL_HEAP_SIZE ( CONFIG_FREERTOS_TOTAL_HEAP_SIZE * 1024) +#define configMAX_TASK_NAME_LEN ( CONFIG_FREERTOS_MAX_TASK_NAME_LEN ) +#ifdef CONFIG_FREERTOS_USE_TRACE_FACILITY +#define configUSE_TRACE_FACILITY 1 /* Used by uxTaskGetSystemState(), and other trace facility functions */ +#endif /* 与宏 configUSE_TRACE_FACILITY 同时为 1 时会编译下面 3 个函数 * prvWriteNameToBuffer() * vTaskList(), @@ -91,7 +101,7 @@ #define configUSE_16_BIT_TICKS 0 //use 32 bit ticktype #define configIDLE_SHOULD_YIELD 1 //idle task would not yield for task with same priority #define configUSE_MUTEXES 1 -#define configQUEUE_REGISTRY_SIZE 8 //max queue and semp member +#define configQUEUE_REGISTRY_SIZE ( CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE ) #define configCHECK_FOR_STACK_OVERFLOW 0 #define configUSE_RECURSIVE_MUTEXES 1 #define configUSE_MALLOC_FAILED_HOOK 1 @@ -101,25 +111,15 @@ #define configSUPPORT_STATIC_ALLOCATION 1 //use dynamic memory allocation #define configSUPPORT_DYNAMIC_ALLOCATION 1 -/* Include the query-heap CLI command to query the free heap space. */ -#define configINCLUDE_QUERY_HEAP_COMMAND 1 - /* Co-routine definitions. */ #define configUSE_CO_ROUTINES 0 //disable co-routines #define configMAX_CO_ROUTINE_PRIORITIES (2) /* Software timer definitions. */ -#define configUSE_TIMERS 1 //use software timer -#define configTIMER_TASK_PRIORITY (configMAX_PRIORITIES - 1) -#define configTIMER_QUEUE_LENGTH 5 -#define configTIMER_TASK_STACK_DEPTH (configMINIMAL_STACK_SIZE * 2) - -/* If configUSE_TASK_FPU_SUPPORT is set to 1 (or undefined) then each task will -be created without an FPU context, and a task must call vTaskUsesFPU() before -making use of any FPU registers. If configUSE_TASK_FPU_SUPPORT is set to 2 then -tasks are created with an FPU context by default, and calling vTaskUsesFPU() has -no effect. */ -#define configUSE_TASK_FPU_SUPPORT 1 +#define configUSE_TIMERS 1 +#define configTIMER_TASK_PRIORITY ( CONFIG_FREERTOS_TIMER_TASK_PRIORITY ) +#define configTIMER_QUEUE_LENGTH ( CONFIG_FREERTOS_TIMER_QUEUE_LENGTH ) +#define configTIMER_TASK_STACK_DEPTH ( CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH ) /* Set the following definitions to 1 to include the API function, or zero to exclude the API function. */ @@ -137,19 +137,25 @@ to exclude the API function. */ #define INCLUDE_xTaskGetHandle 1 #define INCLUDE_xSemaphoreGetMutexHolder 1 -#define configNUM_THREAD_LOCAL_STORAGE_POINTERS 5 +#define configNUM_THREAD_LOCAL_STORAGE_POINTERS ( CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS ) #define INCLUDE_xTaskGetIdleTaskHandle 1 /* This demo makes use of one or more example stats formatting functions. These format the raw data provided by the uxTaskGetSystemState() function in to human readable ASCII form. See the notes in the implementation of vTaskList() within FreeRTOS/Source/tasks.c for limitations. */ -#define configUSE_STATS_FORMATTING_FUNCTIONS 1 +#ifdef CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS +#define configUSE_STATS_FORMATTING_FUNCTIONS 1 /* Used by vTaskList() */ +#endif + /* Run time stats are not generated. portCONFIGURE_TIMER_FOR_RUN_TIME_STATS and portGET_RUN_TIME_COUNTER_VALUE must be defined if configGENERATE_RUN_TIME_STATS is set to 1. */ -#define configGENERATE_RUN_TIME_STATS 1 //启用运行时间统计功能 +#ifdef CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS +#define configGENERATE_RUN_TIME_STATS 1 +#endif + #ifndef __ASSEMBLER__ // skip when preprocess asm extern volatile unsigned int gCpuRuntime; #define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() (gCpuRuntime = 0ul) @@ -177,13 +183,6 @@ header file. */ } while (0); -/* If configTASK_RETURN_ADDRESS is not defined then a task that attempts to -return from its implementing function will end up in a "task exit error" -function - which contains a call to configASSERT(). However this can give GCC -some problems when it tries to unwind the stack, as the exit error function has -nothing to return to. To avoid this define configTASK_RETURN_ADDRESS to 0. */ -#define configTASK_RETURN_ADDRESS NULL - /****** Hardware specific settings. *******************************************/ /* @@ -193,7 +192,6 @@ nothing to return to. To avoid this define configTASK_RETURN_ADDRESS to 0. */ * be installed as the peripheral's interrupt handler. */ - #define configSETUP_TICK_INTERRUPT() \ do \ { \ @@ -209,48 +207,23 @@ nothing to return to. To avoid this define configTASK_RETURN_ADDRESS to 0. */ vClearTickInterrupt(); \ }while (0) + +#ifdef CONFIG_TARGET_ARMV8_AARCH32 #define FreeRTOS_IRQ_Handler IRQHandler #define FreeRTOS_SWI_Handler SWIHandler +#endif -#define configINTERRUPT_CONTROLLER_BASE_ADDRESS (0x71800000) +#ifdef CONFIG_TARGET_ARMV8_AARCH64 +#define FreeRTOS_IRQ_Handler IRQInterruptHandler +#define FreeRTOS_SWI_Handler SynchronousInterruptHandler +#endif + +/* The following constant describe the hardware, and are correct for the +QEMU-Virt. */ +#define configINTERRUPT_CONTROLLER_BASE_ADDRESS (GICV3_DISTRIBUTOR_BASE_ADDR) #define configINTERRUPT_CONTROLLER_CPU_INTERFACE_OFFSET (0x2000UL) #define configUNIQUE_INTERRUPT_PRIORITIES 16 -/****** Network configuration settings - only used when the lwIP example is -built. See the page that documents this demo on the http://www.FreeRTOS.org -website for more information. ***********************************************/ - -/* The priority for the task that unblocked by the MAC interrupt to process -received packets. */ -#define configMAC_INPUT_TASK_PRIORITY (configMAX_PRIORITIES - 1) - -/* The priority of the task that runs the lwIP stack. */ -#define configLWIP_TASK_PRIORITY (configMAX_PRIORITIES - 2) - -/* The priority of the task that uses lwIP sockets to provide a simple command -line interface. */ -#define configCLI_TASK_PRIORITY (tskIDLE_PRIORITY) - -/* MAC address configuration. */ -#define configMAC_ADDR0 0x00 -#define configMAC_ADDR1 0x13 -#define configMAC_ADDR2 0x14 -#define configMAC_ADDR3 0x15 -#define configMAC_ADDR4 0x15 -#define configMAC_ADDR5 0x16 - -/* IP address configuration. */ -#define configIP_ADDR0 172 -#define configIP_ADDR1 25 -#define configIP_ADDR2 218 -#define configIP_ADDR3 200 - -/* Netmask configuration. */ -#define configNET_MASK0 255 -#define configNET_MASK1 255 -#define configNET_MASK2 255 -#define configNET_MASK3 0 - #if !defined(__ASSEMBLER__) void vPrintString(const char *pcString); void vPrintStringAndNumber(const char *pcString, uint32_t ulValue); diff --git a/third-party/freertos/portable/GCC/ft_platform/aarch64/FreeRTOSConfig.h b/third-party/freertos/portable/GCC/ft_platform/aarch64/FreeRTOSConfig.h deleted file mode 100644 index 594e8dd2934cbf4cae712c41722f3e03da0683d9..0000000000000000000000000000000000000000 --- a/third-party/freertos/portable/GCC/ft_platform/aarch64/FreeRTOSConfig.h +++ /dev/null @@ -1,201 +0,0 @@ -/* - * FreeRTOS Kernel V10.0.1 - * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - -#ifndef FREERTOS_CONFIG_H -#define FREERTOS_CONFIG_H - -#include "finterrupt.h" - -/*----------------------------------------------------------- - * Application specific definitions. - * - * These definitions should be adjusted for your particular hardware and - * application requirements. - * - * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE - * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE. - * - * See http://www.freertos.org/a00110.html. - *----------------------------------------------------------*/ - -/* - * The FreeRTOS Cortex-A port implements a full interrupt nesting model. - * - * Interrupts that are assigned a priority at or below - * configMAX_API_CALL_INTERRUPT_PRIORITY (which counter-intuitively in the ARM - * generic interrupt controller [GIC] means a priority that has a numerical - * value above configMAX_API_CALL_INTERRUPT_PRIORITY) can call FreeRTOS safe API - * functions and will nest. - * - * Interrupts that are assigned a priority above - * configMAX_API_CALL_INTERRUPT_PRIORITY (which in the GIC means a numerical - * value below configMAX_API_CALL_INTERRUPT_PRIORITY) cannot call any FreeRTOS - * API functions, will nest, and will not be masked by FreeRTOS critical - * sections (although it is necessary for interrupts to be globally disabled - * extremely briefly as the interrupt mask is updated in the GIC). - * - * FreeRTOS functions that can be called from an interrupt are those that end in - * "FromISR". FreeRTOS maintains a separate interrupt safe API to enable - * interrupt entry to be shorter, faster, simpler and smaller. - * - * For the purpose of setting configMAX_API_CALL_INTERRUPT_PRIORITY 255 - * represents the lowest priority. - */ - -/* 在不安全group1 中,16 is steps ,3 是其中等级*/ -#define configKERNEL_INTERRUPT_PRIORITY IRQ_PRIORITY_VALUE_11 -/* 在不安全group1 中 ,0x8 ~0xb 不可以使用安全api(优先级越低越高)*/ -#define configMAX_API_CALL_INTERRUPT_PRIORITY IRQ_PRIORITY_VALUE_11 - - -#define configUSE_PORT_OPTIMISED_TASK_SELECTION 1 -#define configUSE_TICKLESS_IDLE 0 -#define configTICK_RATE_HZ ((TickType_t)1000) -#define configUSE_PREEMPTION 1 -#define configUSE_IDLE_HOOK 1 -#define configUSE_TICK_HOOK 1 -#define configMAX_PRIORITIES (8) -#define configMINIMAL_STACK_SIZE ((unsigned short)1024) -#define configTOTAL_HEAP_SIZE (1024 * 1024 * 12) -#define configMAX_TASK_NAME_LEN (32) -#define configUSE_16_BIT_TICKS 0 -#define configIDLE_SHOULD_YIELD 1 -#define configUSE_MUTEXES 1 -#define configQUEUE_REGISTRY_SIZE 8 -#define configCHECK_FOR_STACK_OVERFLOW 1 -#define configUSE_RECURSIVE_MUTEXES 1 -#define configUSE_APPLICATION_TASK_TAG 0 -#define configUSE_COUNTING_SEMAPHORES 1 -#define configUSE_QUEUE_SETS 1 - -/* This demo creates RTOS objects using both static and dynamic allocation. */ -#define configSUPPORT_STATIC_ALLOCATION 1 -#define configSUPPORT_DYNAMIC_ALLOCATION 1 /* Defaults to 1 anyway. */ - -/* Co-routine definitions. */ -#define configUSE_CO_ROUTINES 0 -#define configMAX_CO_ROUTINE_PRIORITIES (2) - -/* Software timer definitions. */ -#define configUSE_TIMERS 1 -#define configTIMER_TASK_PRIORITY (configMAX_PRIORITIES - 1) -#define configTIMER_QUEUE_LENGTH 5 -#define configTIMER_TASK_STACK_DEPTH (configMINIMAL_STACK_SIZE * 2) - -/* Set the following definitions to 1 to include the API function, or zero -to exclude the API function. */ -#define INCLUDE_vTaskPrioritySet 1 -#define INCLUDE_uxTaskPriorityGet 1 -#define INCLUDE_vTaskDelete 1 -#define INCLUDE_vTaskCleanUpResources 1 -#define INCLUDE_vTaskSuspend 1 -#define INCLUDE_vTaskDelayUntil 1 -#define INCLUDE_vTaskDelay 1 -#define INCLUDE_xTimerPendFunctionCall 1 -#define INCLUDE_eTaskGetState 1 -#define INCLUDE_xTaskAbortDelay 1 -#define INCLUDE_xTaskGetHandle 1 - -#define INCLUDE_xSemaphoreGetMutexHolder 1 -#define configNUM_THREAD_LOCAL_STORAGE_POINTERS 5 -#define INCLUDE_xTaskGetIdleTaskHandle 1 - -/* This demo makes use of one or more example stats formatting functions. These -format the raw data provided by the uxTaskGetSystemState() function in to human -readable ASCII form. See the notes in the implementation of vTaskList() within -FreeRTOS/Source/tasks.c for limitations. */ -#define configUSE_STATS_FORMATTING_FUNCTIONS 1 - -/* Run time stats are not generated. portCONFIGURE_TIMER_FOR_RUN_TIME_STATS and -portGET_RUN_TIME_COUNTER_VALUE must be defined if configGENERATE_RUN_TIME_STATS -is set to 1. */ -#define configGENERATE_RUN_TIME_STATS 1 //启用运行时间统计功能 -extern volatile unsigned int gCpuRuntime; -#define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() (gCpuRuntime = 0ul) -#define portGET_RUN_TIME_COUNTER_VALUE() gCpuRuntime - -/* The size of the global output buffer that is available for use when there -are multiple command interpreters running at once (for example, one on a UART -and one on TCP/IP). This is done to prevent an output buffer being defined by -each implementation - which would waste RAM. In this case, there is only one -command interpreter running. */ -#define configCOMMAND_INT_MAX_OUTPUT_SIZE 2096 - -/* Normal assert() semantics without relying on the provision of an assert.h -header file. */ -void vMainAssertCalled(const char *pcFileName, uint32_t ulLineNumber); -#define configASSERT(x) \ - if ((x) == 0) \ - { \ - vMainAssertCalled(__FILE__, __LINE__); \ - } - -/* If configTASK_RETURN_ADDRESS is not defined then a task that attempts to -return from its implementing function will end up in a "task exit error" -function - which contains a call to configASSERT(). However this can give GCC -some problems when it tries to unwind the stack, as the exit error function has -nothing to return to. To avoid this define configTASK_RETURN_ADDRESS to 0. */ -#define configTASK_RETURN_ADDRESS NULL - -/* Bump up the priority of recmuCONTROLLING_TASK_PRIORITY to prevent false -positive errors being reported considering the priority of other tasks in the -system. */ -#define recmuCONTROLLING_TASK_PRIORITY (configMAX_PRIORITIES - 2) - -/****** Hardware specific settings. *******************************************/ - -/* - * The application must provide a function that configures a peripheral to - * create the FreeRTOS tick interrupt, then define configSETUP_TICK_INTERRUPT() - * in FreeRTOSConfig.h to call the function. This file contains a function - * that is suitable for use on the Zynq MPU. FreeRTOS_Tick_Handler() must - * be installed as the peripheral's interrupt handler. - */ -void vConfigureTickInterrupt(void); -#define configSETUP_TICK_INTERRUPT() vConfigureTickInterrupt() - -void vClearTickInterrupt(void); -#define configCLEAR_TICK_INTERRUPT() vClearTickInterrupt() - -/* The following constant describe the hardware, and are correct for the -QEMU-Virt. */ -#define configINTERRUPT_CONTROLLER_BASE_ADDRESS (GICV3_DISTRIBUTOR_BASEADDRESS) -#define configUNIQUE_INTERRUPT_PRIORITIES 16 - -#define fabs(x) __builtin_fabs(x) - -#define configUSE_TRACE_FACILITY 1 - - -#define FreeRTOS_IRQ_Handler IRQInterruptHandler -#define FreeRTOS_SWI_Handler SynchronousInterruptHandler - -void vPrintString(const char *pcString); -void vPrintStringAndNumber(const char *pcString, uint32_t ulValue); -void vPrintf(const char *format, ...); - -#endif /* FREERTOS_CONFIG_H */ diff --git a/third-party/freertos/portable/freertos_configs.c b/third-party/freertos/portable/freertos_configs.c index f5c8f4e63fc5c4e032efbeca086dff76a107b377..28f682f61b9ea1813c5d350aefc0e8258ce92c9c 100644 --- a/third-party/freertos/portable/freertos_configs.c +++ b/third-party/freertos/portable/freertos_configs.c @@ -64,7 +64,7 @@ void vApplicationIdleHook(void) u32 PlatformGetGicDistBase(void) { - return GICV3_BASEADDRESS; + return GICV3_BASE_ADDR; } static u32 cntfrq; /* System frequency */ diff --git a/third-party/letter-shell-3.1/port/cmd/cmd_os_stats.c b/third-party/letter-shell-3.1/port/cmd/cmd_ps.c similarity index 100% rename from third-party/letter-shell-3.1/port/cmd/cmd_os_stats.c rename to third-party/letter-shell-3.1/port/cmd/cmd_ps.c diff --git a/third-party/lwip-2.1.2/ports/fgmac/ethernetif.c b/third-party/lwip-2.1.2/ports/fgmac/ethernetif.c index 9bcc11ff2f81580b4dae65f815af605ac77ad1fe..e9abaa99897036d24a2ac01bc8a01be9df61ac13 100644 --- a/third-party/lwip-2.1.2/ports/fgmac/ethernetif.c +++ b/third-party/lwip-2.1.2/ports/fgmac/ethernetif.c @@ -81,7 +81,7 @@ * But this is only an example, anyway... */ -static netif_config netif_config_instance[GMAC_INSTANCE_NUM]; +static netif_config netif_config_instance[FGMAC_NUM]; void ethernet_link_thread(void *argument) { @@ -333,10 +333,10 @@ static err_t low_level_output(struct netif *netif, struct pbuf *p) pay_load_offset = 0; /* Check if the length of data to copy is bigger than Tx buffer size*/ - while ((bytes_left_to_copy + buffer_offset) > GMAC_MAX_PACKET_SIZE) + while ((bytes_left_to_copy + buffer_offset) > FGMAC_MAX_PACKET_SIZE) { /* Copy data to Tx buffer*/ - memcpy((u8 *)((u8 *)buffer + buffer_offset), (u8 *)((u8 *)q->payload + pay_load_offset), (GMAC_MAX_PACKET_SIZE - buffer_offset)); + memcpy((u8 *)((u8 *)buffer + buffer_offset), (u8 *)((u8 *)q->payload + pay_load_offset), (FGMAC_MAX_PACKET_SIZE - buffer_offset)); FGMAC_DMA_INC_DESC(gmac->tx_ring.desc_buf_idx, gmac->tx_ring.desc_max_num); /* Point to next descriptor */ dma_tx_desc = &gmac->tx_desc[gmac->tx_ring.desc_buf_idx]; @@ -350,9 +350,9 @@ static err_t low_level_output(struct netif *netif, struct pbuf *p) } buffer = (u8 *)(intptr)(dma_tx_desc->buf_addr); - bytes_left_to_copy = bytes_left_to_copy - (GMAC_MAX_PACKET_SIZE - buffer_offset); - pay_load_offset = pay_load_offset + (GMAC_MAX_PACKET_SIZE - buffer_offset); - frame_length = frame_length + (GMAC_MAX_PACKET_SIZE - buffer_offset); + bytes_left_to_copy = bytes_left_to_copy - (FGMAC_MAX_PACKET_SIZE - buffer_offset); + pay_load_offset = pay_load_offset + (FGMAC_MAX_PACKET_SIZE - buffer_offset); + frame_length = frame_length + (FGMAC_MAX_PACKET_SIZE - buffer_offset); buffer_offset = 0; if (buffer == NULL) @@ -453,10 +453,10 @@ static struct pbuf *low_level_input(struct netif *netif) bytes_left_to_copy = q->len; pay_load_offset = 0; /* Check if the length of bytes to copy in current pbuf is bigger than Rx buffer size*/ - while ((bytes_left_to_copy + buffer_offset) > GMAC_MAX_PACKET_SIZE) + while ((bytes_left_to_copy + buffer_offset) > FGMAC_MAX_PACKET_SIZE) { /* Copy data to pbuf */ - memcpy((u8 *)((u8 *)q->payload + pay_load_offset), (u8 *)((u8 *)buffer + buffer_offset), (GMAC_MAX_PACKET_SIZE - buffer_offset)); + memcpy((u8 *)((u8 *)q->payload + pay_load_offset), (u8 *)((u8 *)buffer + buffer_offset), (FGMAC_MAX_PACKET_SIZE - buffer_offset)); /* Point to next descriptor */ FGMAC_DMA_INC_DESC(desc_buffer_index, gmac->rx_ring.desc_max_num); @@ -468,8 +468,8 @@ static struct pbuf *low_level_input(struct netif *netif) dma_rx_desc = &gmac->rx_desc[desc_buffer_index]; buffer = (u8 *)(intptr)(dma_rx_desc->buf_addr); - bytes_left_to_copy = bytes_left_to_copy - (GMAC_MAX_PACKET_SIZE - buffer_offset); - pay_load_offset = pay_load_offset + (GMAC_MAX_PACKET_SIZE - buffer_offset); + bytes_left_to_copy = bytes_left_to_copy - (FGMAC_MAX_PACKET_SIZE - buffer_offset); + pay_load_offset = pay_load_offset + (FGMAC_MAX_PACKET_SIZE - buffer_offset); buffer_offset = 0; } /* Copy remaining data in pbuf */ diff --git a/third-party/lwip-2.1.2/ports/fgmac/ethernetif.h b/third-party/lwip-2.1.2/ports/fgmac/ethernetif.h index c6843bf526b89f1a3c4e2757893e8339f4cd706c..b5bea2a7da4dd7c0b7309592f253a250078a7707 100644 --- a/third-party/lwip-2.1.2/ports/fgmac/ethernetif.h +++ b/third-party/lwip-2.1.2/ports/fgmac/ethernetif.h @@ -43,10 +43,10 @@ typedef struct FGmac gctrl; ethernetif netifctrl; /* align buf and descriptor by 128 */ - u8 tx_buf[GMAC_TX_DESCNUM * GMAC_MAX_PACKET_SIZE] __aligned(GMAC_DMA_MIN_ALIGN); - u8 rx_buf[GMAC_RX_DESCNUM * GMAC_MAX_PACKET_SIZE] __aligned(GMAC_DMA_MIN_ALIGN); - u8 tx_desc[GMAC_TX_DESCNUM * sizeof(FGmacDmaDesc)] __aligned(GMAC_DMA_MIN_ALIGN); - u8 rx_desc[GMAC_RX_DESCNUM * sizeof(FGmacDmaDesc) + 128] __aligned(GMAC_DMA_MIN_ALIGN); + u8 tx_buf[GMAC_TX_DESCNUM * FGMAC_MAX_PACKET_SIZE] __aligned(FGMAC_DMA_MIN_ALIGN); + u8 rx_buf[GMAC_RX_DESCNUM * FGMAC_MAX_PACKET_SIZE] __aligned(FGMAC_DMA_MIN_ALIGN); + u8 tx_desc[GMAC_TX_DESCNUM * sizeof(FGmacDmaDesc)] __aligned(FGMAC_DMA_MIN_ALIGN); + u8 rx_desc[GMAC_RX_DESCNUM * sizeof(FGmacDmaDesc) + 128] __aligned(FGMAC_DMA_MIN_ALIGN); }netif_config; err_t ethernetif_init(struct netif *netif); diff --git a/third-party/lwip-2.1.2/ports/fgmac/ft_os_gmac.c b/third-party/lwip-2.1.2/ports/fgmac/ft_os_gmac.c index 887554b4b57eebc4a95166e0716ae720aac8adc9..5af5d22ca178c9a856312986c0e89b9d16fba6cc 100644 --- a/third-party/lwip-2.1.2/ports/fgmac/ft_os_gmac.c +++ b/third-party/lwip-2.1.2/ports/fgmac/ft_os_gmac.c @@ -402,7 +402,7 @@ void FtOsGmacStart(FtOsGmac *os_gmac) u32 ret = FT_SUCCESS; /* Initialize Rx Description list : ring Mode */ - ret = FGmacSetupRxDescRing(gmac, (FGmacDmaDesc *)(gmac->rx_desc), os_gmac->rx_buffer, GMAC_MAX_PACKET_SIZE, GMAC_RX_DESCNUM); + ret = FGmacSetupRxDescRing(gmac, (FGmacDmaDesc *)(gmac->rx_desc), os_gmac->rx_buffer, FGMAC_MAX_PACKET_SIZE, GMAC_RX_DESCNUM); if (FT_SUCCESS != ret) { OS_MAC_DEBUG_E("gmac setup rx return err code %d\r\n", ret); @@ -410,7 +410,7 @@ void FtOsGmacStart(FtOsGmac *os_gmac) } /* Initialize Tx Description list : ring Mode */ - ret = FGmacSetupTxDescRing(gmac, (FGmacDmaDesc *)(gmac->tx_desc), os_gmac->tx_buffer, GMAC_MAX_PACKET_SIZE, GMAC_TX_DESCNUM); + ret = FGmacSetupTxDescRing(gmac, (FGmacDmaDesc *)(gmac->tx_desc), os_gmac->tx_buffer, FGMAC_MAX_PACKET_SIZE, GMAC_TX_DESCNUM); if (FT_SUCCESS != ret) { OS_MAC_DEBUG_E("gmac setup tx return err code %d\r\n", ret); diff --git a/third-party/lwip-2.1.2/ports/fgmac/ft_os_gmac.h b/third-party/lwip-2.1.2/ports/fgmac/ft_os_gmac.h index cb54b88fe310e2818e270735be7d2c913d4f1d00..2e783e946712d5b916523cfafc523188f306e71f 100644 --- a/third-party/lwip-2.1.2/ports/fgmac/ft_os_gmac.h +++ b/third-party/lwip-2.1.2/ports/fgmac/ft_os_gmac.h @@ -36,8 +36,8 @@ #include "lwip/netif.h" #include "ethernetif.h" -#define FT_OS_GMAC0_ID GMAC_INSTANCE_0 -#define FT_OS_GMAC1_ID GMAC_INSTANCE_1 +#define FT_OS_GMAC0_ID FGMAC0_ID +#define FT_OS_GMAC1_ID FGMAC1_ID #define FT_NETIF_LINKUP 0x1U #define FT_NETIF_DOWN 0x2U diff --git a/third-party/sdmmc-1.0/Kconfig b/third-party/sdmmc-1.0/Kconfig index 682390a2c0743a8e258526fc6f12f83ead757975..43cca455c73651cba58976701703cd79222df1d3 100644 --- a/third-party/sdmmc-1.0/Kconfig +++ b/third-party/sdmmc-1.0/Kconfig @@ -1,12 +1 @@ -menu "SDMMC Configuration" - choice SDMMC_PORT_TYPE - prompt "MMC/SD Type" - help - Select MMC/SD Driver - - config SDMMC_PORT_FSDIO - bool "FSDIO" - select USE_SDMMC - select ENABLE_FSDIO - endchoice #SDMMC_PORT_TYPE -endmenu \ No newline at end of file +source "$STANDALONE_DIR/third-party/sdmmc/Kconfig" \ No newline at end of file diff --git a/third-party/sdmmc-1.0/inc/sdmmc_cmd.h b/third-party/sdmmc-1.0/inc/sdmmc_cmd.h deleted file mode 100644 index b5f7e32ceabb8057f105c5880580087621a3ddc9..0000000000000000000000000000000000000000 --- a/third-party/sdmmc-1.0/inc/sdmmc_cmd.h +++ /dev/null @@ -1,312 +0,0 @@ -// Copyright 2015-2018 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef _SDMMC_CMD_H_ -#define _SDMMC_CMD_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include "sdmmc_types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * Probe and initialize SD/MMC card using given host - * - * @note Only SD cards (SDSC and SDHC/SDXC) are supported now. - * Support for MMC/eMMC cards will be added later. - * - * @param host pointer to structure defining host controller - * @param out_card pointer to structure which will receive information - * about the card when the function completes - * @return - * - SDMMC_OK on success - * - One of the error codes from SDMMC host controller - */ -sdmmc_err_t sdmmc_card_init(const sdmmc_host_t* host, - sdmmc_card_t* out_card); - -/** - * Probe and initialize eMMC using given host - * - * @note Only eMMC are supported for this function. - * - * @param host pointer to structure defining host controller - * @param out_card pointer to structure which will receive information - * about the card when the function completes - * @return - * - SDMMC_OK on success - * - One of the error codes from SDMMC host controller - */ -sdmmc_err_t sdmmc_init_emmc(const sdmmc_host_t *config, sdmmc_card_t *card); - -/** - * Probe and initialize TF cards (SDHC/SDXC) using given host - * - * @note Only TF are supported for this function. - * - * @param host pointer to structure defining host controller - * @param out_card pointer to structure which will receive information - * about the card when the function completes - * @return - * - SDMMC_OK on success - * - One of the error codes from SDMMC host controller - */ -sdmmc_err_t sdmmc_init_tf_card(const sdmmc_host_t *config, sdmmc_card_t *card); - -/** - * @brief Print information about the card to a stream - * @param stream stream obtained using fopen or fdopen - * @param card card information structure initialized using sdmmc_card_init - */ -void sdmmc_card_print_info(FILE* stream, const sdmmc_card_t* card); - -/** - * Write given number of sectors to SD/MMC card - * - * @param card pointer to card information structure previously initialized - * using sdmmc_card_init - * @param src pointer to data buffer to read data from; data size must be - * equal to sector_count * card->csd.sector_size - * @param start_sector sector where to start writing - * @param sector_count number of sectors to write - * @return - * - SDMMC_OK on success - * - One of the error codes from SDMMC host controller - */ -sdmmc_err_t sdmmc_write_sectors(sdmmc_card_t* card, const void* src, - size_t start_sector, size_t sector_count); - -/** - * Write given number of sectors to SD/MMC card - * - * @param card pointer to card information structure previously initialized - * using sdmmc_card_init - * @param dst pointer to data buffer to write into; buffer size must be - * at least sector_count * card->csd.sector_size - * @param start_sector sector where to start reading - * @param sector_count number of sectors to read - * @return - * - SDMMC_OK on success - * - One of the error codes from SDMMC host controller - */ -sdmmc_err_t sdmmc_read_sectors(sdmmc_card_t* card, void* dst, - size_t start_sector, size_t sector_count); - -/** - * Read one byte from an SDIO card using IO_RW_DIRECT (CMD52) - * - * @param card pointer to card information structure previously initialized - * using sdmmc_card_init - * @param function IO function number - * @param reg byte address within IO function - * @param[out] out_byte output, receives the value read from the card - * @return - * - SDMMC_OK on success - * - One of the error codes from SDMMC host controller - */ -sdmmc_err_t sdmmc_io_read_byte(sdmmc_card_t* card, uint32_t function, - uint32_t reg, uint8_t *out_byte); - -/** - * Write one byte to an SDIO card using IO_RW_DIRECT (CMD52) - * - * @param card pointer to card information structure previously initialized - * using sdmmc_card_init - * @param function IO function number - * @param reg byte address within IO function - * @param in_byte value to be written - * @param[out] out_byte if not NULL, receives new byte value read - * from the card (read-after-write). - * @return - * - SDMMC_OK on success - * - One of the error codes from SDMMC host controller - */ -sdmmc_err_t sdmmc_io_write_byte(sdmmc_card_t* card, uint32_t function, - uint32_t reg, uint8_t in_byte, uint8_t* out_byte); - -/** - * Read multiple bytes from an SDIO card using IO_RW_EXTENDED (CMD53) - * - * This function performs read operation using CMD53 in byte mode. - * For block mode, see sdmmc_io_read_blocks. - * - * @param card pointer to card information structure previously initialized - * using sdmmc_card_init - * @param function IO function number - * @param addr byte address within IO function where reading starts - * @param dst buffer which receives the data read from card - * @param size number of bytes to read - * @return - * - SDMMC_OK on success - * - SDMMC_ERR_INVALID_SIZE if size exceeds 512 bytes - * - One of the error codes from SDMMC host controller - */ -sdmmc_err_t sdmmc_io_read_bytes(sdmmc_card_t* card, uint32_t function, - uint32_t addr, void* dst, size_t size); - -/** - * Write multiple bytes to an SDIO card using IO_RW_EXTENDED (CMD53) - * - * This function performs write operation using CMD53 in byte mode. - * For block mode, see sdmmc_io_write_blocks. - * - * @param card pointer to card information structure previously initialized - * using sdmmc_card_init - * @param function IO function number - * @param addr byte address within IO function where writing starts - * @param src data to be written - * @param size number of bytes to write - * @return - * - SDMMC_OK on success - * - SDMMC_ERR_INVALID_SIZE if size exceeds 512 bytes - * - One of the error codes from SDMMC host controller - */ -sdmmc_err_t sdmmc_io_write_bytes(sdmmc_card_t* card, uint32_t function, - uint32_t addr, const void* src, size_t size); - -/** - * Read blocks of data from an SDIO card using IO_RW_EXTENDED (CMD53) - * - * This function performs read operation using CMD53 in block mode. - * For byte mode, see sdmmc_io_read_bytes. - * - * @param card pointer to card information structure previously initialized - * using sdmmc_card_init - * @param function IO function number - * @param addr byte address within IO function where writing starts - * @param dst buffer which receives the data read from card - * @param size number of bytes to read, must be divisible by the card block - * size. - * @return - * - SDMMC_OK on success - * - SDMMC_ERR_INVALID_SIZE if size is not divisible by 512 bytes - * - One of the error codes from SDMMC host controller - */ -sdmmc_err_t sdmmc_io_read_blocks(sdmmc_card_t* card, uint32_t function, - uint32_t addr, void* dst, size_t size); - -/** - * Write blocks of data to an SDIO card using IO_RW_EXTENDED (CMD53) - * - * This function performs write operation using CMD53 in block mode. - * For byte mode, see sdmmc_io_write_bytes. - * - * @param card pointer to card information structure previously initialized - * using sdmmc_card_init - * @param function IO function number - * @param addr byte address within IO function where writing starts - * @param src data to be written - * @param size number of bytes to read, must be divisible by the card block - * size. - * @return - * - SDMMC_OK on success - * - SDMMC_ERR_INVALID_SIZE if size is not divisible by 512 bytes - * - One of the error codes from SDMMC host controller - */ -sdmmc_err_t sdmmc_io_write_blocks(sdmmc_card_t* card, uint32_t function, - uint32_t addr, const void* src, size_t size); - -/** - * Enable SDIO interrupt in the SDMMC host - * - * @param card pointer to card information structure previously initialized - * using sdmmc_card_init - * @return - * - SDMMC_OK on success - * - SDMMC_ERR_NOT_SUPPORTED if the host controller does not support - * IO interrupts - */ -sdmmc_err_t sdmmc_io_enable_int(sdmmc_card_t* card); - -/** - * Block until an SDIO interrupt is received - * - * Slave uses D1 line to signal interrupt condition to the host. - * This function can be used to wait for the interrupt. - * - * @param card pointer to card information structure previously initialized - * using sdmmc_card_init - * @param timeout_ticks time to wait for the interrupt, in RTOS ticks - * @return - * - SDMMC_OK if the interrupt is received - * - SDMMC_ERR_NOT_SUPPORTED if the host controller does not support - * IO interrupts - * - SDMMC_ERR_TIMEOUT if the interrupt does not happen in timeout_ticks - */ -sdmmc_err_t sdmmc_io_wait_int(sdmmc_card_t* card, TickType_t timeout_ticks); - -/** - * Get the data of CIS region of a SDIO card. - * - * You may provide a buffer not sufficient to store all the CIS data. In this - * case, this functions store as much data into your buffer as possible. Also, - * this function will try to get and return the size required for you. - * - * @param card pointer to card information structure previously initialized - * using sdmmc_card_init - * @param out_buffer Output buffer of the CIS data - * @param buffer_size Size of the buffer. - * @param inout_cis_size Mandatory, pointer to a size, input and output. - * - input: Limitation of maximum searching range, should be 0 or larger than - * buffer_size. The function searches for CIS_CODE_END until this range. Set to - * 0 to search infinitely. - * - output: The size required to store all the CIS data, if CIS_CODE_END is found. - * - * @return - * - SDMMC_OK: on success - * - SDMMC_ERR_INVALID_RESPONSE: if the card does not (correctly) support CIS. - * - SDMMC_ERR_INVALID_SIZE: CIS_CODE_END found, but buffer_size is less than - * required size, which is stored in the inout_cis_size then. - * - SDMMC_ERR_NOT_FOUND: if the CIS_CODE_END not found. Increase input value of - * inout_cis_size or set it to 0, if you still want to search for the end; - * output value of inout_cis_size is invalid in this case. - * - and other error code return from sdmmc_io_read_bytes - */ -sdmmc_err_t sdmmc_io_get_cis_data(sdmmc_card_t* card, uint8_t* out_buffer, size_t buffer_size, size_t* inout_cis_size); - -/** - * Parse and print the CIS information of a SDIO card. - * - * @note Not all the CIS codes and all kinds of tuples are supported. If you - * see some unresolved code, you can add the parsing of these code in - * sdmmc_io.c and contribute to the IDF through the Github repository. - * - * using sdmmc_card_init - * @param buffer Buffer to parse - * @param buffer_size Size of the buffer. - * @param fp File pointer to print to, set to NULL to print to stdout. - * - * @return - * - SDMMC_OK: on success - * - SDMMC_ERR_NOT_SUPPORTED: if the value from the card is not supported to be parsed. - * - SDMMC_ERR_INVALID_SIZE: if the CIS size fields are not correct. - */ -sdmmc_err_t sdmmc_io_print_cis_info(uint8_t* buffer, size_t buffer_size, FILE* fp); - -sdmmc_err_t sdmmc_send_cmd_switch(sdmmc_card_t *card); - -sdmmc_err_t sdmmc_send_stop_transmission(sdmmc_card_t *card); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/third-party/sdmmc-1.0/inc/sdmmc_common.h b/third-party/sdmmc-1.0/inc/sdmmc_common.h deleted file mode 100644 index 537d83d057cc236407d23c862913b0cf08a6dc84..0000000000000000000000000000000000000000 --- a/third-party/sdmmc-1.0/inc/sdmmc_common.h +++ /dev/null @@ -1,177 +0,0 @@ -/* - * Copyright (c) 2006 Uwe Stuehler - * Adaptations to ESP-IDF Copyright (c) 2016-2018 Espressif Systems (Shanghai) PTE LTD - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef _SDMMC_COMMON_H_ -#define _SDMMC_COMMON_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include - -#include "sdmmc_defs.h" -#include "sdmmc_types.h" -#include "sdmmc_cmd.h" -#include "sdmmc_port.h" - -/** - * @brief Flags to indicate the capabilities of the various memory systems - */ -#define MALLOC_CAP_EXEC (1<<0) ///< Memory must be able to run executable code -#define MALLOC_CAP_32BIT (1<<1) ///< Memory must allow for aligned 32-bit data accesses -#define MALLOC_CAP_8BIT (1<<2) ///< Memory must allow for 8/16/...-bit data accesses -#define MALLOC_CAP_DMA (1<<3) ///< Memory must be able to accessed by DMA -#define MALLOC_CAP_PID2 (1<<4) ///< Memory must be mapped to PID2 memory space (PIDs are not currently used) -#define MALLOC_CAP_PID3 (1<<5) ///< Memory must be mapped to PID3 memory space (PIDs are not currently used) -#define MALLOC_CAP_PID4 (1<<6) ///< Memory must be mapped to PID4 memory space (PIDs are not currently used) -#define MALLOC_CAP_PID5 (1<<7) ///< Memory must be mapped to PID5 memory space (PIDs are not currently used) -#define MALLOC_CAP_PID6 (1<<8) ///< Memory must be mapped to PID6 memory space (PIDs are not currently used) -#define MALLOC_CAP_PID7 (1<<9) ///< Memory must be mapped to PID7 memory space (PIDs are not currently used) -#define MALLOC_CAP_SPIRAM (1<<10) ///< Memory must be in SPI RAM -#define MALLOC_CAP_INTERNAL (1<<11) ///< Memory must be internal; specifically it should not disappear when flash/spiram cache is switched off -#define MALLOC_CAP_DEFAULT (1<<12) ///< Memory can be returned in a non-capability-specific memory allocation (e.g. malloc(), calloc()) call -#define MALLOC_CAP_IRAM_8BIT (1<<13) ///< Memory must be in IRAM and allow unaligned access -#define MALLOC_CAP_RETENTION (1<<14) - -#define MALLOC_CAP_INVALID (1<<31) ///< Memory can't be used / list end marker - - -#define SDMMC_GO_IDLE_DELAY_MS 20 -#define SDMMC_IO_SEND_OP_COND_DELAY_MS 10 - -/* These delay values are mostly useful for cases when CD pin is not used, and - * the card is removed. In this case, SDMMC peripheral may not always return - * CMD_DONE / DATA_DONE interrupts after signaling the error. These timeouts work - * as a safety net in such cases. - */ -#define SDMMC_DEFAULT_CMD_TIMEOUT_MS 1000 // Max timeout of ordinary commands -#define SDMMC_WRITE_CMD_TIMEOUT_MS 5000 // Max timeout of write commands - -/* Maximum retry/error count for SEND_OP_COND (CMD1). - * These are somewhat arbitrary, values originate from OpenBSD driver. - */ -#define SDMMC_SEND_OP_COND_MAX_RETRIES 100 -#define SDMMC_SEND_OP_COND_MAX_ERRORS 3 - -/* Functions to send individual commands */ -sdmmc_err_t sdmmc_send_cmd(sdmmc_card_t* card, sdmmc_command_t* cmd); -sdmmc_err_t sdmmc_send_app_cmd(sdmmc_card_t* card, sdmmc_command_t* cmd); -sdmmc_err_t sdmmc_send_cmd_go_idle_state(sdmmc_card_t* card); -sdmmc_err_t sdmmc_send_cmd_send_if_cond(sdmmc_card_t* card, uint32_t ocr); -sdmmc_err_t sdmmc_send_cmd_send_op_cond(sdmmc_card_t* card, uint32_t ocr, uint32_t *ocrp); -sdmmc_err_t sdmmc_send_cmd_read_ocr(sdmmc_card_t *card, uint32_t *ocrp); -sdmmc_err_t sdmmc_send_cmd_send_cid(sdmmc_card_t *card, sdmmc_cid_t *out_cid); -sdmmc_err_t sdmmc_send_cmd_all_send_cid(sdmmc_card_t* card, sdmmc_response_t* out_raw_cid); -sdmmc_err_t sdmmc_send_cmd_set_relative_addr(sdmmc_card_t* card, uint16_t* out_rca); -sdmmc_err_t sdmmc_send_cmd_set_blocklen(sdmmc_card_t* card, sdmmc_csd_t* csd); -sdmmc_err_t sdmmc_send_cmd_switch_func(sdmmc_card_t* card, - uint32_t mode, uint32_t group, uint32_t function, - sdmmc_switch_func_rsp_t* resp); -sdmmc_err_t sdmmc_send_cmd_send_csd(sdmmc_card_t* card, sdmmc_csd_t* out_csd); -sdmmc_err_t sdmmc_send_cmd_select_card(sdmmc_card_t* card, uint32_t rca); -sdmmc_err_t sdmmc_send_cmd_send_scr(sdmmc_card_t* card, sdmmc_scr_t *out_scr); -sdmmc_err_t sdmmc_send_cmd_set_bus_width(sdmmc_card_t* card, int width); -sdmmc_err_t sdmmc_send_cmd_send_status(sdmmc_card_t* card, uint32_t* out_status); -sdmmc_err_t sdmmc_send_cmd_crc_on_off(sdmmc_card_t* card, bool crc_enable); -sdmmc_err_t sdmmc_init_switch_hs(sdmmc_card_t *card); -sdmmc_err_t sdmmc_set_blockcount(sdmmc_card_t *card, size_t block_count); - -/* Higher level functions */ -sdmmc_err_t sdmmc_enable_hs_mode(sdmmc_card_t* card); -sdmmc_err_t sdmmc_enable_hs_mode_and_check(sdmmc_card_t* card); -sdmmc_err_t sdmmc_write_sectors_dma(sdmmc_card_t* card, const void* src, - size_t start_block, size_t block_count); -sdmmc_err_t sdmmc_read_sectors_dma(sdmmc_card_t* card, void* dst, - size_t start_block, size_t block_count); - -/* SD specific */ -sdmmc_err_t sdmmc_check_scr(sdmmc_card_t* card); -sdmmc_err_t sdmmc_decode_cid(sdmmc_response_t resp, sdmmc_cid_t* out_cid); -sdmmc_err_t sdmmc_decode_csd(sdmmc_response_t response, sdmmc_csd_t* out_csd); -sdmmc_err_t sdmmc_decode_scr(uint32_t *raw_scr, sdmmc_scr_t* out_scr); - -/* SDIO specific */ -sdmmc_err_t sdmmc_io_reset(sdmmc_card_t* card); -sdmmc_err_t sdmmc_io_enable_hs_mode(sdmmc_card_t* card); -sdmmc_err_t sdmmc_io_send_op_cond(sdmmc_card_t* card, uint32_t ocr, uint32_t *ocrp); -sdmmc_err_t sdmmc_io_rw_direct(sdmmc_card_t* card, int function, - uint32_t reg, uint32_t arg, uint8_t *byte); -sdmmc_err_t sdmmc_io_rw_extended(sdmmc_card_t* card, int function, - uint32_t reg, int arg, void *data, size_t size); - - -/* MMC specific */ -sdmmc_err_t sdmmc_mmc_send_ext_csd_data(sdmmc_card_t* card, void *out_data, size_t datalen); -sdmmc_err_t sdmmc_mmc_switch(sdmmc_card_t* card, uint8_t set, uint8_t index, uint8_t value); -sdmmc_err_t sdmmc_mmc_decode_cid(int mmc_ver, sdmmc_response_t resp, sdmmc_cid_t* out_cid); -sdmmc_err_t sdmmc_mmc_decode_csd(sdmmc_response_t response, sdmmc_csd_t* out_csd); -sdmmc_err_t sdmmc_mmc_enable_hs_mode(sdmmc_card_t* card); - -/* Parts of card initialization flow */ -sdmmc_err_t sdmmc_init_sd_if_cond(sdmmc_card_t* card); -sdmmc_err_t sdmmc_init_select_card(sdmmc_card_t* card); -sdmmc_err_t sdmmc_init_csd(sdmmc_card_t* card); -sdmmc_err_t sdmmc_init_cid(sdmmc_card_t* card); -sdmmc_err_t sdmmc_init_rca(sdmmc_card_t* card); -sdmmc_err_t sdmmc_init_mmc_decode_cid(sdmmc_card_t* card); -sdmmc_err_t sdmmc_init_ocr(sdmmc_card_t* card); -sdmmc_err_t sdmmc_init_spi_crc(sdmmc_card_t* card); -sdmmc_err_t sdmmc_init_io(sdmmc_card_t* card); -sdmmc_err_t sdmmc_init_sd_blocklen(sdmmc_card_t* card); -sdmmc_err_t sdmmc_init_sd_scr(sdmmc_card_t* card); -sdmmc_err_t sdmmc_init_sd_wait_data_ready(sdmmc_card_t* card); -sdmmc_err_t sdmmc_init_mmc_read_ext_csd(sdmmc_card_t* card); -sdmmc_err_t sdmmc_init_mmc_read_cid(sdmmc_card_t* card); -sdmmc_err_t sdmmc_init_host_bus_width(sdmmc_card_t* card); -sdmmc_err_t sdmmc_init_sd_bus_width(sdmmc_card_t* card); -sdmmc_err_t sdmmc_init_io_bus_width(sdmmc_card_t* card); -sdmmc_err_t sdmmc_init_mmc_bus_width(sdmmc_card_t* card); -sdmmc_err_t sdmmc_init_card_hs_mode(sdmmc_card_t* card); -sdmmc_err_t sdmmc_init_host_frequency(sdmmc_card_t* card); -sdmmc_err_t sdmmc_init_mmc_check_csd(sdmmc_card_t* card); - -/* Various helper functions */ -static inline bool host_is_spi(const sdmmc_card_t* card) -{ - return (card->host.flags & SDMMC_HOST_FLAG_SPI) != 0; -} - -static inline bool host_support_sdio(const sdmmc_card_t* card) -{ - return (card->host.flags & SDMMC_HOST_FLAG_SDIO) != 0; -} - -static inline uint32_t get_host_ocr(float voltage) -{ - // TODO: report exact voltage to the card - // For now tell that the host has 2.8-3.6V voltage range - (void) voltage; - return SD_OCR_VOL_MASK; -} - -void sdmmc_flip_byte_order(uint32_t* response, size_t size); - -sdmmc_err_t sdmmc_fix_host_flags(sdmmc_card_t *card); - -#ifdef __cplusplus -} -#endif - -#endif \ No newline at end of file diff --git a/third-party/sdmmc-1.0/inc/sdmmc_defs.h b/third-party/sdmmc-1.0/inc/sdmmc_defs.h deleted file mode 100644 index 603d5209583b5f7b3911886908c86a16cc387cd7..0000000000000000000000000000000000000000 --- a/third-party/sdmmc-1.0/inc/sdmmc_defs.h +++ /dev/null @@ -1,492 +0,0 @@ -/* - * Copyright (c) 2006 Uwe Stuehler - * Adaptations to ESP-IDF Copyright (c) 2016 Espressif Systems (Shanghai) PTE LTD - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef _SDMMC_DEFS_H_ -#define _SDMMC_DEFS_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include - -/* MMC commands */ /* response type */ -#define MMC_GO_IDLE_STATE 0 /* R0 */ -#define MMC_SEND_OP_COND 1 /* R3 */ -#define MMC_ALL_SEND_CID 2 /* R2 */ -#define MMC_SET_RELATIVE_ADDR 3 /* R1 */ -#define MMC_SWITCH 6 /* R1B */ -#define MMC_SELECT_CARD 7 /* R1 */ -#define MMC_SEND_EXT_CSD 8 /* R1 */ -#define MMC_SEND_CSD 9 /* R2 */ -#define MMC_SEND_CID 10 /* R1 */ -#define MMC_READ_DAT_UNTIL_STOP 11 /* R1 */ -#define MMC_STOP_TRANSMISSION 12 /* R1B */ -#define MMC_SEND_STATUS 13 /* R1 */ -#define MMC_SET_BLOCKLEN 16 /* R1 */ -#define MMC_READ_BLOCK_SINGLE 17 /* R1 */ -#define MMC_READ_BLOCK_MULTIPLE 18 /* R1 */ -#define MMC_WRITE_DAT_UNTIL_STOP 20 /* R1 */ -#define MMC_SET_BLOCK_COUNT 23 /* R1 */ -#define MMC_WRITE_BLOCK_SINGLE 24 /* R1 */ -#define MMC_WRITE_BLOCK_MULTIPLE 25 /* R1 */ -#define MMC_APP_CMD 55 /* R1 */ - -/* SD commands */ /* response type */ -#define SD_SEND_RELATIVE_ADDR 3 /* R6 */ -#define SD_SEND_SWITCH_FUNC 6 /* R1 */ -#define SD_SEND_IF_COND 8 /* R7 */ -#define SD_READ_OCR 58 /* R3 */ -#define SD_CRC_ON_OFF 59 /* R1 */ - -/* SD application commands */ /* response type */ -#define SD_APP_SET_BUS_WIDTH 6 /* R1 */ -#define SD_APP_SD_STATUS 13 /* R2 */ -#define SD_APP_OP_COND 41 /* R3 */ -#define SD_APP_SEND_SCR 51 /* R1 */ - -/* SD IO commands */ -#define SD_IO_SEND_OP_COND 5 /* R4 */ -#define SD_IO_RW_DIRECT 52 /* R5 */ -#define SD_IO_RW_EXTENDED 53 /* R5 */ - -/* OCR bits */ -#define MMC_OCR_MEM_READY (1 << 31) /* memory power-up status bit */ -#define MMC_OCR_ACCESS_MODE_MASK 0x60000000 /* bits 30:29 */ -#define MMC_OCR_SECTOR_MODE (1 << 30) -#define MMC_OCR_BYTE_MODE (1 << 29) -#define MMC_OCR_3_5V_3_6V (1 << 23) -#define MMC_OCR_3_4V_3_5V (1 << 22) -#define MMC_OCR_3_3V_3_4V (1 << 21) -#define MMC_OCR_3_2V_3_3V (1 << 20) -#define MMC_OCR_3_1V_3_2V (1 << 19) -#define MMC_OCR_3_0V_3_1V (1 << 18) -#define MMC_OCR_2_9V_3_0V (1 << 17) -#define MMC_OCR_2_8V_2_9V (1 << 16) -#define MMC_OCR_2_7V_2_8V (1 << 15) -#define MMC_OCR_2_6V_2_7V (1 << 14) -#define MMC_OCR_2_5V_2_6V (1 << 13) -#define MMC_OCR_2_4V_2_5V (1 << 12) -#define MMC_OCR_2_3V_2_4V (1 << 11) -#define MMC_OCR_2_2V_2_3V (1 << 10) -#define MMC_OCR_2_1V_2_2V (1 << 9) -#define MMC_OCR_2_0V_2_1V (1 << 8) -#define MMC_OCR_1_65V_1_95V (1 << 7) - -#define SD_OCR_SDHC_CAP (1 << 30) -#define SD_OCR_VOL_MASK 0xFF8000 /* bits 23:15 */ - -/* SD mode R1 response type bits */ -#define MMC_R1_READY_FOR_DATA (1 << 8) /* ready for next transfer */ -#define MMC_R1_APP_CMD (1 << 5) /* app. commands supported */ -#define MMC_R1_SWITCH_ERROR (1 << 7) /* switch command did not succeed */ - -/* SPI mode R1 response type bits */ -#define SD_SPI_R1_IDLE_STATE (1 << 0) -#define SD_SPI_R1_ERASE_RST (1 << 1) -#define SD_SPI_R1_ILLEGAL_CMD (1 << 2) -#define SD_SPI_R1_CMD_CRC_ERR (1 << 3) -#define SD_SPI_R1_ERASE_SEQ_ERR (1 << 4) -#define SD_SPI_R1_ADDR_ERR (1 << 5) -#define SD_SPI_R1_PARAM_ERR (1 << 6) -#define SD_SPI_R1_NO_RESPONSE (1 << 7) - -#define SDIO_R1_FUNC_NUM_ERR (1 << 4) - -/* 48-bit response decoding (32 bits w/o CRC) */ -#define MMC_R1(resp) ((resp)[0]) -#define MMC_R3(resp) ((resp)[0]) -#define MMC_R4(resp) ((resp)[0]) -#define MMC_R5(resp) ((resp)[0]) -#define SD_R6(resp) ((resp)[0]) -#define MMC_R1_CURRENT_STATE(resp) (((resp)[0] >> 9) & 0xf) - -/* SPI mode response decoding */ -#define SD_SPI_R1(resp) ((resp)[0] & 0xff) -#define SD_SPI_R2(resp) ((resp)[0] & 0xffff) -#define SD_SPI_R3(resp) ((resp)[0]) -#define SD_SPI_R7(resp) ((resp)[0]) - -/* SPI mode data response decoding */ -#define SD_SPI_DATA_RSP_VALID(resp_byte) (((resp_byte)&0x11) == 0x1) -#define SD_SPI_DATA_RSP(resp_byte) (((resp_byte) >> 1) & 0x7) -#define SD_SPI_DATA_ACCEPTED 0x2 -#define SD_SPI_DATA_CRC_ERROR 0x5 -#define SD_SPI_DATA_WR_ERROR 0x6 - -/* RCA argument and response */ -#define MMC_ARG_RCA(rca) ((rca) << 16) -#define SD_R6_RCA(resp) (SD_R6((resp)) >> 16) - -/* bus width argument */ -#define SD_ARG_BUS_WIDTH_1 0 -#define SD_ARG_BUS_WIDTH_4 2 - -/* EXT_CSD fields */ -#define EXT_CSD_BUS_WIDTH 183 /* WO */ -#define EXT_CSD_HS_TIMING 185 /* R/W */ -#define EXT_CSD_REV 192 /* RO */ -#define EXT_CSD_STRUCTURE 194 /* RO */ -#define EXT_CSD_CARD_TYPE 196 /* RO */ -#define EXT_CSD_SEC_COUNT 212 /* RO */ -#define EXT_CSD_PWR_CL_26_360 203 /* RO */ -#define EXT_CSD_PWR_CL_52_360 202 /* RO */ -#define EXT_CSD_PWR_CL_26_195 201 /* RO */ -#define EXT_CSD_PWR_CL_52_195 200 /* RO */ -#define EXT_CSD_POWER_CLASS 187 /* R/W */ -#define EXT_CSD_CMD_SET 191 /* R/W */ -#define EXT_CSD_S_CMD_SET 504 /* RO */ - -/* EXT_CSD field definitions */ -#define EXT_CSD_CMD_SET_NORMAL (1U << 0) -#define EXT_CSD_CMD_SET_SECURE (1U << 1) -#define EXT_CSD_CMD_SET_CPSECURE (1U << 2) - -/* EXT_CSD_HS_TIMING */ -#define EXT_CSD_HS_TIMING_BC 0 -#define EXT_CSD_HS_TIMING_HS 1 -#define EXT_CSD_HS_TIMING_HS200 2 -#define EXT_CSD_HS_TIMING_HS400 3 - -/* EXT_CSD_BUS_WIDTH */ -#define EXT_CSD_BUS_WIDTH_1 0 -#define EXT_CSD_BUS_WIDTH_4 1 -#define EXT_CSD_BUS_WIDTH_8 2 -#define EXT_CSD_BUS_WIDTH_4_DDR 5 -#define EXT_CSD_BUS_WIDTH_8_DDR 6 - -/* EXT_CSD_CARD_TYPE */ -/* The only currently valid values for this field are 0x01, 0x03, 0x07, - * 0x0B and 0x0F. */ -#define EXT_CSD_CARD_TYPE_F_26M (1 << 0) /* SDR at "rated voltages */ -#define EXT_CSD_CARD_TYPE_F_52M (1 << 1) /* SDR at "rated voltages */ -#define EXT_CSD_CARD_TYPE_F_52M_1_8V (1 << 2) /* DDR, 1.8V or 3.3V I/O */ -#define EXT_CSD_CARD_TYPE_F_52M_1_2V (1 << 3) /* DDR, 1.2V I/O */ -#define EXT_CSD_CARD_TYPE_26M 0x01 -#define EXT_CSD_CARD_TYPE_52M 0x03 -#define EXT_CSD_CARD_TYPE_52M_V18 0x07 -#define EXT_CSD_CARD_TYPE_52M_V12 0x0b -#define EXT_CSD_CARD_TYPE_52M_V12_18 0x0f - -/* EXT_CSD MMC */ -#define EXT_CSD_MMC_SIZE 512 - -/* MMC_SWITCH access mode */ -#define MMC_SWITCH_MODE_CMD_SET 0x00 /* Change the command set */ -#define MMC_SWITCH_MODE_SET_BITS 0x01 /* Set bits in value */ -#define MMC_SWITCH_MODE_CLEAR_BITS 0x02 /* Clear bits in value */ -#define MMC_SWITCH_MODE_WRITE_BYTE 0x03 /* Set target to value */ - -/* MMC R2 response (CSD) */ -#define MMC_CSD_CSDVER(resp) MMC_RSP_BITS((resp), 126, 2) -#define MMC_CSD_CSDVER_1_0 1 -#define MMC_CSD_CSDVER_2_0 2 -#define MMC_CSD_CSDVER_EXT_CSD 3 -#define MMC_CSD_MMCVER(resp) MMC_RSP_BITS((resp), 122, 4) -#define MMC_CSD_MMCVER_1_0 0 /* MMC 1.0 - 1.2 */ -#define MMC_CSD_MMCVER_1_4 1 /* MMC 1.4 */ -#define MMC_CSD_MMCVER_2_0 2 /* MMC 2.0 - 2.2 */ -#define MMC_CSD_MMCVER_3_1 3 /* MMC 3.1 - 3.3 */ -#define MMC_CSD_MMCVER_4_0 4 /* MMC 4 */ -#define MMC_CSD_READ_BL_LEN(resp) MMC_RSP_BITS((resp), 80, 4) -#define MMC_CSD_C_SIZE(resp) MMC_RSP_BITS((resp), 62, 12) -#define MMC_CSD_CAPACITY(resp) ((MMC_CSD_C_SIZE((resp)) + 1) << (MMC_CSD_C_SIZE_MULT((resp)) + 2)) -#define MMC_CSD_C_SIZE_MULT(resp) MMC_RSP_BITS((resp), 47, 3) - -/* MMC v1 R2 response (CID) */ -#define MMC_CID_MID_V1(resp) MMC_RSP_BITS((resp), 104, 24) -#define MMC_CID_PNM_V1_CPY(resp, pnm) \ - do \ - { \ - (pnm)[0] = MMC_RSP_BITS((resp), 96, 8); \ - (pnm)[1] = MMC_RSP_BITS((resp), 88, 8); \ - (pnm)[2] = MMC_RSP_BITS((resp), 80, 8); \ - (pnm)[3] = MMC_RSP_BITS((resp), 72, 8); \ - (pnm)[4] = MMC_RSP_BITS((resp), 64, 8); \ - (pnm)[5] = MMC_RSP_BITS((resp), 56, 8); \ - (pnm)[6] = MMC_RSP_BITS((resp), 48, 8); \ - (pnm)[7] = '\0'; \ - } while (0) -#define MMC_CID_REV_V1(resp) MMC_RSP_BITS((resp), 40, 8) -#define MMC_CID_PSN_V1(resp) MMC_RSP_BITS((resp), 16, 24) -#define MMC_CID_MDT_V1(resp) MMC_RSP_BITS((resp), 8, 8) - -/* MMC v2 R2 response (CID) */ -#define MMC_CID_MID_V2(resp) MMC_RSP_BITS((resp), 120, 8) -#define MMC_CID_OID_V2(resp) MMC_RSP_BITS((resp), 104, 16) -#define MMC_CID_PNM_V2_CPY(resp, pnm) \ - do \ - { \ - (pnm)[0] = MMC_RSP_BITS((resp), 96, 8); \ - (pnm)[1] = MMC_RSP_BITS((resp), 88, 8); \ - (pnm)[2] = MMC_RSP_BITS((resp), 80, 8); \ - (pnm)[3] = MMC_RSP_BITS((resp), 72, 8); \ - (pnm)[4] = MMC_RSP_BITS((resp), 64, 8); \ - (pnm)[5] = MMC_RSP_BITS((resp), 56, 8); \ - (pnm)[6] = '\0'; \ - } while (0) -#define MMC_CID_PSN_V2(resp) MMC_RSP_BITS((resp), 16, 32) - -/* SD R2 response (CSD) */ -#define SD_CSD_CSDVER(resp) MMC_RSP_BITS((resp), 126, 2) -#define SD_CSD_CSDVER_1_0 0 -#define SD_CSD_CSDVER_2_0 1 -#define SD_CSD_TAAC(resp) MMC_RSP_BITS((resp), 112, 8) -#define SD_CSD_TAAC_1_5_MSEC 0x26 -#define SD_CSD_NSAC(resp) MMC_RSP_BITS((resp), 104, 8) -#define SD_CSD_SPEED(resp) MMC_RSP_BITS((resp), 96, 8) -#define SD_CSD_SPEED_25_MHZ 0x32 -#define SD_CSD_SPEED_50_MHZ 0x5a -#define SD_CSD_CCC(resp) MMC_RSP_BITS((resp), 84, 12) -#define SD_CSD_CCC_BASIC (1 << 0) /* basic */ -#define SD_CSD_CCC_BR (1 << 2) /* block read */ -#define SD_CSD_CCC_BW (1 << 4) /* block write */ -#define SD_CSD_CCC_ERASE (1 << 5) /* erase */ -#define SD_CSD_CCC_WP (1 << 6) /* write protection */ -#define SD_CSD_CCC_LC (1 << 7) /* lock card */ -#define SD_CSD_CCC_AS (1 << 8) /*application specific*/ -#define SD_CSD_CCC_IOM (1 << 9) /* I/O mode */ -#define SD_CSD_CCC_SWITCH (1 << 10) /* switch */ -#define SD_CSD_READ_BL_LEN(resp) MMC_RSP_BITS((resp), 80, 4) -#define SD_CSD_READ_BL_PARTIAL(resp) MMC_RSP_BITS((resp), 79, 1) -#define SD_CSD_WRITE_BLK_MISALIGN(resp) MMC_RSP_BITS((resp), 78, 1) -#define SD_CSD_READ_BLK_MISALIGN(resp) MMC_RSP_BITS((resp), 77, 1) -#define SD_CSD_DSR_IMP(resp) MMC_RSP_BITS((resp), 76, 1) -#define SD_CSD_C_SIZE(resp) MMC_RSP_BITS((resp), 62, 12) -#define SD_CSD_CAPACITY(resp) ((SD_CSD_C_SIZE((resp)) + 1) << (SD_CSD_C_SIZE_MULT((resp)) + 2)) -#define SD_CSD_V2_C_SIZE(resp) MMC_RSP_BITS((resp), 48, 22) -#define SD_CSD_V2_CAPACITY(resp) ((SD_CSD_V2_C_SIZE((resp)) + 1) << 10) -#define SD_CSD_V2_BL_LEN 0x9 /* 512 */ -#define SD_CSD_VDD_R_CURR_MIN(resp) MMC_RSP_BITS((resp), 59, 3) -#define SD_CSD_VDD_R_CURR_MAX(resp) MMC_RSP_BITS((resp), 56, 3) -#define SD_CSD_VDD_W_CURR_MIN(resp) MMC_RSP_BITS((resp), 53, 3) -#define SD_CSD_VDD_W_CURR_MAX(resp) MMC_RSP_BITS((resp), 50, 3) -#define SD_CSD_VDD_RW_CURR_100mA 0x7 -#define SD_CSD_VDD_RW_CURR_80mA 0x6 -#define SD_CSD_C_SIZE_MULT(resp) MMC_RSP_BITS((resp), 47, 3) -#define SD_CSD_ERASE_BLK_EN(resp) MMC_RSP_BITS((resp), 46, 1) -#define SD_CSD_SECTOR_SIZE(resp) MMC_RSP_BITS((resp), 39, 7) /* +1 */ -#define SD_CSD_WP_GRP_SIZE(resp) MMC_RSP_BITS((resp), 32, 7) /* +1 */ -#define SD_CSD_WP_GRP_ENABLE(resp) MMC_RSP_BITS((resp), 31, 1) -#define SD_CSD_R2W_FACTOR(resp) MMC_RSP_BITS((resp), 26, 3) -#define SD_CSD_WRITE_BL_LEN(resp) MMC_RSP_BITS((resp), 22, 4) -#define SD_CSD_RW_BL_LEN_2G 0xa -#define SD_CSD_RW_BL_LEN_1G 0x9 -#define SD_CSD_WRITE_BL_PARTIAL(resp) MMC_RSP_BITS((resp), 21, 1) -#define SD_CSD_FILE_FORMAT_GRP(resp) MMC_RSP_BITS((resp), 15, 1) -#define SD_CSD_COPY(resp) MMC_RSP_BITS((resp), 14, 1) -#define SD_CSD_PERM_WRITE_PROTECT(resp) MMC_RSP_BITS((resp), 13, 1) -#define SD_CSD_TMP_WRITE_PROTECT(resp) MMC_RSP_BITS((resp), 12, 1) -#define SD_CSD_FILE_FORMAT(resp) MMC_RSP_BITS((resp), 10, 2) - -/* SD R2 response (CID) */ -#define SD_CID_MID(resp) MMC_RSP_BITS((resp), 120, 8) -#define SD_CID_OID(resp) MMC_RSP_BITS((resp), 104, 16) -#define SD_CID_PNM_CPY(resp, pnm) \ - do \ - { \ - (pnm)[0] = MMC_RSP_BITS((resp), 96, 8); \ - (pnm)[1] = MMC_RSP_BITS((resp), 88, 8); \ - (pnm)[2] = MMC_RSP_BITS((resp), 80, 8); \ - (pnm)[3] = MMC_RSP_BITS((resp), 72, 8); \ - (pnm)[4] = MMC_RSP_BITS((resp), 64, 8); \ - (pnm)[5] = '\0'; \ - } while (0) -#define SD_CID_REV(resp) MMC_RSP_BITS((resp), 56, 8) -#define SD_CID_PSN(resp) MMC_RSP_BITS((resp), 24, 32) -#define SD_CID_MDT(resp) MMC_RSP_BITS((resp), 8, 12) - -/* SCR (SD Configuration Register) */ -#define SCR_STRUCTURE(scr) MMC_RSP_BITS((scr), 60, 4) -#define SCR_STRUCTURE_VER_1_0 0 /* Version 1.0 */ -#define SCR_SD_SPEC(scr) MMC_RSP_BITS((scr), 56, 4) -#define SCR_SD_SPEC_VER_1_0 0 /* Version 1.0 and 1.01 */ -#define SCR_SD_SPEC_VER_1_10 1 /* Version 1.10 */ -#define SCR_SD_SPEC_VER_2 2 /* Version 2.00 or Version 3.0x */ -#define SCR_DATA_STAT_AFTER_ERASE(scr) MMC_RSP_BITS((scr), 55, 1) -#define SCR_SD_SECURITY(scr) MMC_RSP_BITS((scr), 52, 3) -#define SCR_SD_SECURITY_NONE 0 /* no security */ -#define SCR_SD_SECURITY_1_0 1 /* security protocol 1.0 */ -#define SCR_SD_SECURITY_1_0_2 2 /* security protocol 1.0 */ -#define SCR_SD_BUS_WIDTHS(scr) MMC_RSP_BITS((scr), 48, 4) -#define SCR_SD_BUS_WIDTHS_1BIT (1 << 0) /* 1bit (DAT0) */ -#define SCR_SD_BUS_WIDTHS_4BIT (1 << 2) /* 4bit (DAT0-3) */ -#define SCR_SD_SPEC3(scr) MMC_RSP_BITS((scr), 47, 1) -#define SCR_EX_SECURITY(scr) MMC_RSP_BITS((scr), 43, 4) -#define SCR_SD_SPEC4(scr) MMC_RSP_BITS((scr), 42, 1) -#define SCR_RESERVED(scr) MMC_RSP_BITS((scr), 34, 8) -#define SCR_CMD_SUPPORT_CMD23(scr) MMC_RSP_BITS((scr), 33, 1) -#define SCR_CMD_SUPPORT_CMD20(scr) MMC_RSP_BITS((scr), 32, 1) -#define SCR_RESERVED2(scr) MMC_RSP_BITS((scr), 0, 32) - -/* Max supply current in SWITCH_FUNC response (in mA) */ -#define SD_SFUNC_I_MAX(status) (MMC_RSP_BITS((uint32_t *)(status), 496, 16)) - -/* Supported flags in SWITCH_FUNC response */ -#define SD_SFUNC_SUPPORTED(status, group) \ - (MMC_RSP_BITS((uint32_t *)(status), 400 + (group - 1) * 16, 16)) - -/* Selected function in SWITCH_FUNC response */ -#define SD_SFUNC_SELECTED(status, group) \ - (MMC_RSP_BITS((uint32_t *)(status), 376 + (group - 1) * 4, 4)) - -/* Busy flags in SWITCH_FUNC response */ -#define SD_SFUNC_BUSY(status, group) \ - (MMC_RSP_BITS((uint32_t *)(status), 272 + (group - 1) * 16, 16)) - -/* Version of SWITCH_FUNC response */ -#define SD_SFUNC_VER(status) (MMC_RSP_BITS((uint32_t *)(status), 368, 8)) - -#define SD_SFUNC_GROUP_MAX 6 -#define SD_SFUNC_FUNC_MAX 15 - -#define SD_ACCESS_MODE 1 /* Function group 1, Access Mode */ - -#define SD_ACCESS_MODE_SDR12 0 /* 25 MHz clock */ -#define SD_ACCESS_MODE_SDR25 1 /* 50 MHz clock */ -#define SD_ACCESS_MODE_SDR50 2 /* UHS-I, 100 MHz clock */ -#define SD_ACCESS_MODE_SDR104 3 /* UHS-I, 208 MHz clock */ -#define SD_ACCESS_MODE_DDR50 4 /* UHS-I, 50 MHz clock, DDR */ - -/** - * @brief Extract up to 32 sequential bits from an array of 32-bit words - * - * Bits within the word are numbered in the increasing order from LSB to MSB. - * - * As an example, consider 2 32-bit words: - * - * 0x01234567 0x89abcdef - * - * On a little-endian system, the bytes are stored in memory as follows: - * - * 67 45 23 01 ef cd ab 89 - * - * MMC_RSP_BITS will extact bits as follows: - * - * start=0 len=4 -> result=0x00000007 - * start=0 len=12 -> result=0x00000567 - * start=28 len=8 -> result=0x000000f0 - * start=59 len=5 -> result=0x00000011 - * - * @param src array of words to extract bits from - * @param start index of the first bit to extract - * @param len number of bits to extract, 1 to 32 - * @return 32-bit word where requested bits start from LSB - */ -static inline uint32_t MMC_RSP_BITS(uint32_t *src, int start, int len) -{ - uint32_t mask = (len % 32 == 0) ? UINT_MAX : UINT_MAX >> (32 - (len % 32)); - size_t word = start / 32; - size_t shift = start % 32; - uint32_t right = src[word] >> shift; - uint32_t left = (len + shift <= 32) ? 0 : src[word + 1] << ((32 - shift) % 32); - return (left | right) & mask; -} - -/* SD R4 response (IO OCR) */ -#define SD_IO_OCR_MEM_READY (1 << 31) -#define SD_IO_OCR_NUM_FUNCTIONS(ocr) (((ocr) >> 28) & 0x7) -#define SD_IO_OCR_MEM_PRESENT (1 << 27) -#define SD_IO_OCR_MASK 0x00fffff0 - -/* CMD52 arguments */ -#define SD_ARG_CMD52_READ (0 << 31) -#define SD_ARG_CMD52_WRITE (1 << 31) -#define SD_ARG_CMD52_FUNC_SHIFT 28 -#define SD_ARG_CMD52_FUNC_MASK 0x7 -#define SD_ARG_CMD52_EXCHANGE (1 << 27) -#define SD_ARG_CMD52_REG_SHIFT 9 -#define SD_ARG_CMD52_REG_MASK 0x1ffff -#define SD_ARG_CMD52_DATA_SHIFT 0 -#define SD_ARG_CMD52_DATA_MASK 0xff -#define SD_R5_DATA(resp) ((resp)[0] & 0xff) - -/* CMD53 arguments */ -#define SD_ARG_CMD53_READ (0 << 31) -#define SD_ARG_CMD53_WRITE (1 << 31) -#define SD_ARG_CMD53_FUNC_SHIFT 28 -#define SD_ARG_CMD53_FUNC_MASK 0x7 -#define SD_ARG_CMD53_BLOCK_MODE (1 << 27) -#define SD_ARG_CMD53_INCREMENT (1 << 26) -#define SD_ARG_CMD53_REG_SHIFT 9 -#define SD_ARG_CMD53_REG_MASK 0x1ffff -#define SD_ARG_CMD53_LENGTH_SHIFT 0 -#define SD_ARG_CMD53_LENGTH_MASK 0x1ff -#define SD_ARG_CMD53_LENGTH_MAX 512 - -/* Card Common Control Registers (CCCR) */ -#define SD_IO_CCCR_START 0x00000 -#define SD_IO_CCCR_SIZE 0x100 -#define SD_IO_CCCR_FN_ENABLE 0x02 -#define SD_IO_CCCR_FN_READY 0x03 -#define SD_IO_CCCR_INT_ENABLE 0x04 -#define SD_IO_CCCR_INT_PENDING 0x05 -#define SD_IO_CCCR_CTL 0x06 -#define CCCR_CTL_RES (1 << 3) -#define SD_IO_CCCR_BUS_WIDTH 0x07 -#define CCCR_BUS_WIDTH_1 (0 << 0) -#define CCCR_BUS_WIDTH_4 (2 << 0) -#define CCCR_BUS_WIDTH_8 (3 << 0) -#define CCCR_BUS_WIDTH_ECSI (1 << 5) -#define SD_IO_CCCR_CARD_CAP 0x08 -#define CCCR_CARD_CAP_LSC BIT(6) -#define CCCR_CARD_CAP_4BLS BIT(7) -#define SD_IO_CCCR_CISPTR 0x09 -#define SD_IO_CCCR_BLKSIZEL 0x10 -#define SD_IO_CCCR_BLKSIZEH 0x11 -#define SD_IO_CCCR_HIGHSPEED 0x13 -#define CCCR_HIGHSPEED_SUPPORT BIT(0) -#define CCCR_HIGHSPEED_ENABLE BIT(1) - -/* Function Basic Registers (FBR) */ -#define SD_IO_FBR_START 0x00100 -#define SD_IO_FBR_SIZE 0x00700 - -/* Card Information Structure (CIS) */ -#define SD_IO_CIS_START 0x01000 -#define SD_IO_CIS_SIZE 0x17000 - -/* CIS tuple codes (based on PC Card 16) */ -#define CISTPL_CODE_NULL 0x00 -#define CISTPL_CODE_DEVICE 0x01 -#define CISTPL_CODE_CHKSUM 0x10 -#define CISTPL_CODE_VERS1 0x15 -#define CISTPL_CODE_ALTSTR 0x16 -#define CISTPL_CODE_CONFIG 0x1A -#define CISTPL_CODE_CFTABLE_ENTRY 0x1B -#define CISTPL_CODE_MANFID 0x20 -#define CISTPL_CODE_FUNCID 0x21 -#define TPLFID_FUNCTION_SDIO 0x0c -#define CISTPL_CODE_FUNCE 0x22 -#define CISTPL_CODE_VENDER_BEGIN 0x80 -#define CISTPL_CODE_VENDER_END 0x8F -#define CISTPL_CODE_SDIO_STD 0x91 -#define CISTPL_CODE_SDIO_EXT 0x92 -#define CISTPL_CODE_END 0xFF - -/* Timing */ -#define SDMMC_TIMING_LEGACY 0 -#define SDMMC_TIMING_HIGHSPEED 1 -#define SDMMC_TIMING_MMC_DDR52 2 - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/third-party/sdmmc-1.0/inc/sdmmc_types.h b/third-party/sdmmc-1.0/inc/sdmmc_types.h deleted file mode 100644 index c199d6e11535dbc41b793095530475c6422a293c..0000000000000000000000000000000000000000 --- a/third-party/sdmmc-1.0/inc/sdmmc_types.h +++ /dev/null @@ -1,212 +0,0 @@ -/* - * Copyright (c) 2006 Uwe Stuehler - * Adaptations to ESP-IDF Copyright (c) 2016 Espressif Systems (Shanghai) PTE LTD - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef _SDMMC_TYPES_H_ -#define _SDMMC_TYPES_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include - -#include "sdmmc_port.h" - -/* Definitions for error constants. */ -#define SDMMC_OK 0 /* sdmmc_err_t value indicating success (no error) */ -#define SDMMC_FAIL -1 /* Generic sdmmc_err_t code indicating failure */ - -#define SDMMC_ERR_NO_MEM 0x101 /* Out of memory */ -#define SDMMC_ERR_INVALID_ARG 0x102 /* Invalid argument */ -#define SDMMC_ERR_INVALID_STATE 0x103 /* Invalid state */ -#define SDMMC_ERR_INVALID_SIZE 0x104 /* Invalid size */ -#define SDMMC_ERR_NOT_FOUND 0x105 /* Requested resource not found */ -#define SDMMC_ERR_NOT_SUPPORTED 0x106 /* Operation or feature not supported */ -#define SDMMC_ERR_TIMEOUT 0x107 /* Operation timed out */ -#define SDMMC_ERR_INVALID_RESPONSE 0x108 /* Received response was invalid */ -#define SDMMC_ERR_INVALID_CRC 0x109 /* CRC or checksum was invalid */ -#define SDMMC_ERR_INVALID_VERSION 0x10A /* Version was invalid */ -#define SDMMC_ERR_INVALID_MAC 0x10B /* MAC address was invalid */ -#define SDMMC_ERR_SEND_CMD_FAILED 0x10C /* Send command failed */ -#define SDMMC_ERR_NOT_READY 0x10D /* Host not ready */ - -/** - * Decoded values from SD card Card Specific Data register - */ -typedef struct { - int csd_ver; /* CSD structure format */ - int mmc_ver; /* MMC version (for CID format) */ - int capacity; /* total number of sectors */ - int sector_size; /* sector size in bytes */ - int read_block_len; /* block length for reads */ - int card_command_class; /* Card Command Class for SD */ - int tr_speed; /* Max transfer speed */ -} sdmmc_csd_t; - -/** - * Decoded values from SD card Card IDentification register - */ -typedef struct { - int mfg_id; /* manufacturer identification number */ - int oem_id; /* OEM/product identification number */ - char name[8]; /* product name (MMC v1 has the longest) */ - int revision; /* product revision */ - int serial; /* product serial number */ - int date; /* manufacturing date */ -} sdmmc_cid_t; - -/** - * Decoded values from SD Configuration Register - */ -typedef struct { - int sd_spec; /* SD Physical layer specification version, reported by card */ - int bus_width; /* bus widths supported by card: BIT(0) — 1-bit bus, BIT(2) — 4-bit bus */ -} sdmmc_scr_t; - -/** - * Decoded values of Extended Card Specific Data - */ -typedef struct { - uint8_t power_class; /* Power class used by the card */ -} sdmmc_ext_csd_t; - -/** - * SD/MMC command response buffer - */ -typedef uint32_t sdmmc_response_t[4]; - -/** - * SD SWITCH_FUNC response buffer - */ -typedef struct { - uint32_t data[512 / 8 / sizeof(uint32_t)]; /* response data */ -} sdmmc_switch_func_rsp_t; - -/** - * SD/MMC command information - */ -typedef struct { - uint32_t opcode; /* SD or MMC command index */ - uint32_t arg; /* SD/MMC command argument */ - sdmmc_response_t response; /* response buffer */ - void* data; /* buffer to send or read into */ - size_t datalen; /* length of data buffer */ - size_t blklen; /* block length */ - int flags; /* see below */ -/** @cond */ -#define SCF_ITSDONE 0x0001 /* command is complete */ -#define SCF_CMD(flags) ((flags) & 0x00f0) -#define SCF_CMD_AC 0x0000 -#define SCF_CMD_ADTC 0x0010 -#define SCF_CMD_BC 0x0020 -#define SCF_CMD_BCR 0x0030 -#define SCF_CMD_READ 0x0040 /* read command (data expected) */ -#define SCF_RSP_BSY 0x0100 -#define SCF_RSP_136 0x0200 -#define SCF_RSP_CRC 0x0400 -#define SCF_RSP_IDX 0x0800 -#define SCF_RSP_PRESENT 0x1000 -/* response types */ -#define SCF_RSP_R0 0 /* none */ -#define SCF_RSP_R1 (SCF_RSP_PRESENT|SCF_RSP_CRC|SCF_RSP_IDX) -#define SCF_RSP_R1B (SCF_RSP_PRESENT|SCF_RSP_CRC|SCF_RSP_IDX|SCF_RSP_BSY) -#define SCF_RSP_R2 (SCF_RSP_PRESENT|SCF_RSP_CRC|SCF_RSP_136) -#define SCF_RSP_R3 (SCF_RSP_PRESENT) -#define SCF_RSP_R4 (SCF_RSP_PRESENT) -#define SCF_RSP_R5 (SCF_RSP_PRESENT|SCF_RSP_CRC|SCF_RSP_IDX) -#define SCF_RSP_R5B (SCF_RSP_PRESENT|SCF_RSP_CRC|SCF_RSP_IDX|SCF_RSP_BSY) -#define SCF_RSP_R6 (SCF_RSP_PRESENT|SCF_RSP_CRC|SCF_RSP_IDX) -#define SCF_RSP_R7 (SCF_RSP_PRESENT|SCF_RSP_CRC|SCF_RSP_IDX) -/* special flags */ -#define SCF_WAIT_BUSY 0x2000 /* Wait for completion of card busy signal before returning */ -/** @endcond */ - sdmmc_err_t error; /* error returned from transfer */ - int timeout_ms; /* response timeout, in milliseconds */ -} sdmmc_command_t; - -/** - * SD/MMC Host description - * - * This structure defines properties of SD/MMC host and functions - * of SD/MMC host which can be used by upper layers. - */ -typedef struct { - uint32_t flags; /* flags defining host properties */ -#define SDMMC_HOST_FLAG_1BIT BIT(0) /* host supports 1-line SD and MMC protocol */ -#define SDMMC_HOST_FLAG_4BIT BIT(1) /* host supports 4-line SD and MMC protocol */ -#define SDMMC_HOST_FLAG_8BIT BIT(2) /* host supports 8-line MMC protocol */ -#define SDMMC_HOST_FLAG_SPI BIT(3) /* host supports SPI protocol */ -#define SDMMC_HOST_FLAG_DDR BIT(4) /* host supports DDR mode for SD/MMC */ -#define SDMMC_HOST_FLAG_DEINIT_ARG BIT(5) /* host `deinit` function called with the slot argument */ -#define SDMMC_HOST_FLAG_SDIO BIT(6) /* host supports SDIO */ - int slot; /* slot number, to be passed to host functions */ - int max_freq_khz; /* max frequency supported by the host */ -#define SDMMC_FREQ_DEFAULT 20000 /* SD/MMC Default speed (limited by clock divider) */ -#define SDMMC_FREQ_HIGHSPEED 40000 /* SD High speed (limited by clock divider) */ -#define SDMMC_FREQ_PROBING 400 /* SD/MMC probing speed */ -#define SDMMC_FREQ_52M 52000 /* MMC 52MHz speed */ -#define SDMMC_FREQ_25M 25000 -#define SDMMC_FREQ_26M 26000 /* MMC 26MHz speed */ -#define SDMMC_FREQ_50M 50000 /* SD/MMC 50MHz high speed */ - float io_voltage; /* I/O voltage used by the controller (voltage switching is not supported) */ - sdmmc_err_t (*init)(int slot); /* Host function to initialize the driver */ - sdmmc_err_t (*set_bus_width)(int slot, size_t width); /* host function to set bus width */ - size_t (*get_bus_width)(int slot); /* host function to get bus width */ - sdmmc_err_t (*set_bus_ddr_mode)(int slot, bool ddr_enable); /* host function to set DDR mode */ - sdmmc_err_t (*set_card_clk)(int slot, uint32_t freq_khz); /* host function to set card clock frequency */ - sdmmc_err_t (*do_transaction)(int slot, sdmmc_command_t* cmdinfo); /* host function to do a transaction */ - union { - sdmmc_err_t (*deinit)(void); /* host function to deinitialize the driver */ - sdmmc_err_t (*deinit_p)(int slot); /* host function to deinitialize the driver, called with the `slot` */ - }; - sdmmc_err_t (*io_int_enable)(int slot); /* Host function to enable SDIO interrupt line */ - sdmmc_err_t (*io_int_wait)(int slot, TickType_t timeout_ticks); /* Host function to wait for SDIO interrupt line to be active */ - int command_timeout_ms; /* timeout, in milliseconds, of a single command. Set to 0 to use the default value. */ -} sdmmc_host_t; - -/** - * SD/MMC card information structure - */ -typedef struct { - sdmmc_host_t host; /* Host with which the card is associated */ - uint32_t ocr; /* OCR (Operation Conditions Register) value */ - union { - sdmmc_cid_t cid; /* decoded CID (Card IDentification) register value */ - sdmmc_response_t raw_cid; /* raw CID of MMC card to be decoded - after the CSD is fetched in the data transfer mode*/ - }; - sdmmc_csd_t csd; /* decoded CSD (Card-Specific Data) register value */ - sdmmc_scr_t scr; /* decoded SCR (SD card Configuration Register) value */ - sdmmc_ext_csd_t ext_csd; /* decoded EXT_CSD (Extended Card Specific Data) register value */ - uint16_t rca; /* RCA (Relative Card Address) */ - uint16_t max_freq_khz; /* Maximum frequency, in kHz, supported by the card */ - uint32_t is_mem : 1; /* Bit indicates if the card is a memory card */ - uint32_t is_sdio : 1; /* Bit indicates if the card is an IO card */ - uint32_t is_mmc : 1; /* Bit indicates if the card is MMC */ - uint32_t num_io_functions : 3; /* If is_sdio is 1, contains the number of IO functions on the card */ - uint32_t log_bus_width : 2; /* log2(bus width supported by card) */ - uint32_t is_ddr : 1; /* Card supports DDR mode */ - uint32_t reserved : 23; /* Reserved for future expansion */ -} sdmmc_card_t; - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/third-party/sdmmc-1.0/osal/sdmmc_system.c b/third-party/sdmmc-1.0/osal/sdmmc_system.c new file mode 100644 index 0000000000000000000000000000000000000000..119b7064eac82c1697f5ebf7345ba193bc6b5edb --- /dev/null +++ b/third-party/sdmmc-1.0/osal/sdmmc_system.c @@ -0,0 +1,94 @@ + +/* + * Copyright : (C) 2022 Phytium Information Technology, Inc. + * All Rights Reserved. + * + * This program is OPEN SOURCE software: you can redistribute it and/or modify it + * under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd, + * either version 1.0 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the Phytium Public License for more details. + * + * + * FilePath: sdmmc_system.c + * Date: 2022-02-10 14:53:44 + * LastEditTime: 2022-02-25 11:47:44 + * Description:  This files is for + * + * Modify History: + * Ver   Who        Date         Changes + * ----- ------     --------    -------------------------------------- + */ +#include + +#include +#include "fmemory_pool.h" + +#include "sdmmc_system.h" + +#define SDMMC_MEM_BUF_SIZE SZ_1M +#define SDMMC_ALIGNMENT 64U +#define SDMMC_256_ALIGNMENT 256U + +static u8 sdmmc_buf[SDMMC_MEM_BUF_SIZE] = {0}; +static FMemp sdmmc_mem_pool; + +void sdmmc_sys_init(void) +{ + memset(&sdmmc_mem_pool, 0, sizeof(sdmmc_mem_pool)); + + FError result = FMempInit(&sdmmc_mem_pool, sdmmc_buf, sdmmc_buf + SDMMC_MEM_BUF_SIZE); /* init memory pool */ + SDMMC_ASSERT(result == FMEMP_SUCCESS); +} + +void sdmmc_sys_deinit(void) +{ + FASSERT(FT_COMPONENT_IS_READY == sdmmc_mem_pool.is_ready); + FMempDeinit(&sdmmc_mem_pool); +} + +void sdmmc_sys_delay_ms(uint32_t msecs) +{ + vTaskDelay(pdMS_TO_TICKS(msecs)); +} + +void *sdmmc_sys_heap_caps_malloc(size_t size, uint32_t caps) +{ + void *ptr = NULL; + FASSERT(FT_COMPONENT_IS_READY == sdmmc_mem_pool.is_ready); + + if (caps & MALLOC_8_ALIGN) + { + ptr = FMempMallocAlign(&sdmmc_mem_pool, size, 8); /* allocate alligned memory for DMA access */ + } + else if (caps & MALLOC_32_ALIGN) + { + ptr = FMempMallocAlign(&sdmmc_mem_pool, size, 32); + } + else if (caps & MALLOC_64_ALIGN) + { + ptr = FMempMallocAlign(&sdmmc_mem_pool, size, 64); + } + else if (caps & MALLOC_256_ALIGN) + { + ptr = FMempMallocAlign(&sdmmc_mem_pool, size, 256); + } + else if (caps & MALLOC_512_ALIGN) + { + ptr = FMempMallocAlign(&sdmmc_mem_pool, size, 512); + } + else + { + ptr = FMempCalloc(&sdmmc_mem_pool, 1, size); + } + + return ptr; +} + +void sdmmc_sys_free(void *ptr) +{ + FASSERT(FT_COMPONENT_IS_READY == sdmmc_mem_pool.is_ready); + FMempFree(&sdmmc_mem_pool, ptr); +} \ No newline at end of file diff --git a/third-party/sdmmc-1.0/port/fsdio/sdmmc_port.h b/third-party/sdmmc-1.0/osal/sdmmc_system.h similarity index 54% rename from third-party/sdmmc-1.0/port/fsdio/sdmmc_port.h rename to third-party/sdmmc-1.0/osal/sdmmc_system.h index a49b057b2a9cfd46e5f25ac3203f739493cf1188..6c3bd961398e6ba952607b55f09b3afce512c9c5 100644 --- a/third-party/sdmmc-1.0/port/fsdio/sdmmc_port.h +++ b/third-party/sdmmc-1.0/osal/sdmmc_system.h @@ -11,47 +11,64 @@ * See the Phytium Public License for more details. * * - * FilePath: sdmmc_port.h - * Date: 2022-07-25 09:58:09 - * LastEditTime: 2022-07-25 09:58:09 + * FilePath: sdmmc_system.h + * Date: 2022-02-10 14:53:44 + * LastEditTime: 2022-02-25 11:46:22 * Description:  This files is for * * Modify History: * Ver   Who        Date         Changes * ----- ------     --------    -------------------------------------- */ -#ifndef THIRD_PARTY_SDMMC_PORT_H -#define THIRD_PARTY_SDMMC_PORT_H + +#ifndef THIRD_PARTY_SDMMC_SYSTEM_H +#define THIRD_PARTY_SDMMC_SYSTEM_H #ifdef __cplusplus extern "C" { #endif -/***************************** Include Files *********************************/ -#include - #include "ftypes.h" -#include "fsleep.h" -#include "fkernel.h" #include "fassert.h" #include "fdebug.h" +#include "fprintf.h" -/************************** Constant Definitions *****************************/ -#define true TRUE -#define false FALSE +/* Definitions for portable marco. */ +#ifdef BIT +#undef BIT +#endif +#define BIT(x) (1U << (x)) -/**************************** Type Definitions *******************************/ -typedef s32 sdmmc_err_t; -typedef boolean bool; +#ifndef MAX +#undef MAX +#endif +#define MAX(a, b) (((a) > (b)) ? (a) : (b)) -/************************** Variable Definitions *****************************/ +#ifndef MIN +#undef MIN +#endif +#define MIN(a, b) (((a) < (b)) ? (a) : (b)) -/***************** Macros (Inline Functions) Definitions *********************/ -#define SDMMC_DELAY(m) fsleep_microsec(m) #define SDMMC_ASSERT(a) FASSERT(a) #define WORD_ALIGNED_ATTR __attribute__((aligned(4))) -#define SDMMC_PTR_DMA_CAP(a) sdmmc_port_is_aligned_memory(a) +#define SDMMC_PTR_DMA_CAP(a) !((unsigned long)a % 512) +#define true TRUE +#define false FALSE +#define MALLOC_8_ALIGN (1U << 0) +#define MALLOC_32_ALIGN (1U << 1) +#define MALLOC_64_ALIGN (1U << 2) +#define MALLOC_256_ALIGN (1U << 3) +#define MALLOC_512_ALIGN (1U << 4) +#define MALLOC_CAP_DMA MALLOC_512_ALIGN +#define MALLOC_CAP_DESC MALLOC_256_ALIGN + +#define SDMMC_PRINTF printf + +/* Definitions for portable types. */ +typedef int sdmmc_err_t; +typedef int bool; +typedef unsigned long tick_type_t; #define SDMMC_LOGE( tag, format, ... ) LOG_EARLY_IMPL(tag, format, FT_LOG_ERROR, E, ##__VA_ARGS__) #define SDMMC_LOGW( tag, format, ... ) LOG_EARLY_IMPL(tag, format, FT_LOG_WARN, W, ##__VA_ARGS__) @@ -61,23 +78,11 @@ typedef boolean bool; #define SDMMC_LOG_BUFFER_HEXDUMP( tag, buffer, buff_len, level ) FtDumpHexWord((u32 *)(buffer), (u32)(buff_len)) -/************************** Function Prototypes ******************************/ - -/*****************************************************************************/ -/* init sdmmc before use */ -sdmmc_err_t sdmmc_port_init(void); - -/* deinit sdmmc */ -sdmmc_err_t sdmmc_port_deinit(void); - -/* allocate aligned memory from local memory pool */ -void *sdmmc_port_align_malloc(size_t want_size, boolean dma_capable); - -/* free memory to local memory pool */ -void sdmmc_port_align_free(void *pv); - -/* check if address of buffer is aligned */ -boolean sdmmc_port_is_aligned_memory(const void *buf_p); +void sdmmc_sys_init(void); +void sdmmc_sys_deinit(void); +void sdmmc_sys_delay_ms(uint32_t msecs); +void *sdmmc_sys_heap_caps_malloc(size_t size, uint32_t caps); +void sdmmc_sys_free(void *ptr); #ifdef __cplusplus } diff --git a/drivers/mmc/fsdio/fsdio_os.c b/third-party/sdmmc-1.0/port/fsdio/fsdio_port.c similarity index 32% rename from drivers/mmc/fsdio/fsdio_os.c rename to third-party/sdmmc-1.0/port/fsdio/fsdio_port.c index 762aa7a9f943a198f18774935305250cc9b119ac..65d20b95fb5c3fc32b90f4526e461e68a906262a 100644 --- a/drivers/mmc/fsdio/fsdio_os.c +++ b/third-party/sdmmc-1.0/port/fsdio/fsdio_port.c @@ -11,83 +11,98 @@ * See the Phytium Public License for more details. * * - * FilePath: fsdio_os.c - * Date: 2022-07-25 09:14:40 - * LastEditTime: 2022-07-25 09:14:40 + * FilePath: fsdio_port.c + * Date: 2022-02-10 14:53:44 + * LastEditTime: 2022-02-25 11:46:22 * Description:  This files is for * * Modify History: * Ver   Who        Date         Changes * ----- ------     --------    -------------------------------------- - * 1.0 zhugengyu 2022/7/27 init commit */ - -/***************************** Include Files *********************************/ #include -#include -#include -#include "finterrupt.h" +#include +#include +#include + #include "fparameters.h" -#include "fdebug.h" #include "fassert.h" -#include "fsleep.h" +#include "fcache.h" +#include "finterrupt.h" +#include "fdebug.h" #include "fcpu_info.h" -#include "fiopad.h" -#include "fsdio_os.h" +#include "fsdio.h" #include "fsdio_hw.h" -#include "sdmmc_cmd.h" -#include "sdmmc_defs.h" + +#include "fsdio_port.h" /************************** Constant Definitions *****************************/ +#define SDIO_MAX_BLK_TRANS 128U +#define FFREERTOS_SDIO_OK FT_SUCCESS +#define FFREERTOS_SDIO_SEMA_ERR FT_CODE_ERR(ErrModPort, ErrBspMmc, 1) +#define FFREERTOS_SDIO_HOST_ERR FT_CODE_ERR(ErrModPort, ErrBspMmc, 2) +#define FFREERTOS_SDIO_EVT_ERR FT_CODE_ERR(ErrModPort, ErrBspMmc, 3) +#define FFREERTOS_SDIO_READ_ERR FT_CODE_ERR(ErrModPort, ErrBspMmc, 4) +#define FFREERTOS_SDIO_WRITE_ERR FT_CODE_ERR(ErrModPort, ErrBspMmc, 5) + +#define FFREERTOS_SDIO_IRQ_PRIORITY IRQ_PRIORITY_VALUE_12 /**************************** Type Definitions *******************************/ typedef struct { - sdmmc_card_t card; /* instance of card in sdmmc */ - sdmmc_host_t host; /* instance of host in sdmmc */ -} FSdioOSHost; /* instance to support sdmmc commands */ + FSdio ctrl; + sdmmc_host_instance_t *instance; + SemaphoreHandle_t locker; + EventGroupHandle_t evt; +#define FFREERTOS_SDIO_CMD_TRANS_DONE (0x1 << 0) /* evt bit when command / data finished */ +#define FFREERTOS_SDIO_DAT_TRANS_DONE (0x1 << 1) +#define FFREERTOS_SDIO_ERROR_OCCURRED (0x1 << 2) /* evt bit when ctrl in error occurred */ +#define FFREERTOS_SDIO_PLUG_INOUT (0x1 << 3) /* evt bit when card plug-in/out occurred */ + FSdioCmdData cmd_pkg; + FSdioData dat_pkg; + volatile FSdioIDmaDesc *rw_desc; +} sdmmc_host_slot_info; /************************** Variable Definitions *****************************/ -static FFreeRTOSSdio sdio[FSDIO_HOST_INSTANCE_NUM]; -static FSdioOSHost sdmmc_host[FSDIO_HOST_INSTANCE_NUM]; +static sdmmc_host_slot_info host_slot_info[FSDIO_NUM]; /***************** Macros (Inline Functions) Definitions *********************/ -#define FSDIO_DEBUG_TAG "FSDIO-OS" +#define FSDIO_DEBUG_TAG "FSDIO-HOST" #define FSDIO_ERROR(format, ...) FT_DEBUG_PRINT_E(FSDIO_DEBUG_TAG, format, ##__VA_ARGS__) #define FSDIO_WARN(format, ...) FT_DEBUG_PRINT_W(FSDIO_DEBUG_TAG, format, ##__VA_ARGS__) #define FSDIO_INFO(format, ...) FT_DEBUG_PRINT_I(FSDIO_DEBUG_TAG, format, ##__VA_ARGS__) #define FSDIO_DEBUG(format, ...) FT_DEBUG_PRINT_D(FSDIO_DEBUG_TAG, format, ##__VA_ARGS__) /************************** Function Prototypes ******************************/ - -/*****************************************************************************/ -static inline FError FSdioOsTakeSema(SemaphoreHandle_t locker) +static inline sdmmc_host_slot_info *fsdio_get_slot_info(int slot) { - FASSERT_MSG((NULL != locker), "locker not exists"); - if (pdFALSE == xSemaphoreTake(locker, portMAX_DELAY)) - { - FSDIO_ERROR("failed to give locker !!!"); - return FFREERTOS_SDIO_SEMA_ERR; - } + return &host_slot_info[slot]; +} - return FFREERTOS_SDIO_OK; +static inline sdmmc_host_instance_t *fsdio_get_instance(int slot) +{ + return host_slot_info[slot].instance; } -static inline void FSdioOsGiveSema(SemaphoreHandle_t locker) +static inline FSdio *fsdio_get_ctrl(int slot) { - FASSERT_MSG((NULL != locker), "locker not exists"); - if (pdFALSE == xSemaphoreGive(locker)) - { - FSDIO_ERROR("failed to give locker !!!"); - } + return &host_slot_info[slot].ctrl; +} - return; +sdmmc_err_t sdmmc_cmd_set_block_count(sdmmc_card_t *card, u32 block_count); +sdmmc_err_t sdmmc_send_stop_transmission(sdmmc_card_t *card); +/*****************************************************************************/ +static void fsdio_host_relax(void) +{ + sdmmc_sys_delay_ms(1); } -static void FSdioOSSetupInterrupt(FSdio *ctrl) +static void fsdio_setup_interrupt(int slot) { + FSdio *ctrl = fsdio_get_ctrl(slot); + uintptr base_addr = ctrl->config.base_addr; u32 cpu_id = 0; @@ -109,58 +124,74 @@ static void FSdioOSSetupInterrupt(FSdio *ctrl) return; } -/* init sdmmc host */ -static sdmmc_err_t FSdioOsHostInit(int slot) -{ - FASSERT((slot >= 0) && (slot < FSDIO_HOST_INSTANCE_NUM)); - return SDMMC_OK; -} /* sdmmc host set bus width */ -static sdmmc_err_t FSdioOsHostSetBusWidth(int slot, size_t width) +static sdmmc_err_t fsdio_host_set_bus_width(int slot, size_t width) { - FASSERT((slot >= 0) && (slot < FSDIO_HOST_INSTANCE_NUM)); - FFreeRTOSSdio *instance = &sdio[slot]; - FSdio *ctrl = &instance->ctrl; - uintptr base_addr = ctrl->config.base_addr; + FASSERT((slot >= 0) && (slot < FSDIO_NUM)); + FSdio *ctrl_p = fsdio_get_ctrl(slot); + uintptr base_addr = ctrl_p->config.base_addr; FSDIO_INFO("set bus width as %d", width); FSdioSetBusWidth(base_addr, width); return SDMMC_OK; } /* sdmmc host get bus width */ -static size_t FSdioOsHostGetBusWidth(int slot) +static size_t fsdio_host_get_bus_width(int slot) { - FASSERT((slot >= 0) && (slot < FSDIO_HOST_INSTANCE_NUM)); - FFreeRTOSSdio *instance = &sdio[slot]; - FSdio *ctrl = &instance->ctrl; - uintptr base_addr = ctrl->config.base_addr; - size_t bus_width = (size_t)FSdioGetBusWidth(base_addr); - FSDIO_INFO("get bus width as %d", bus_width); - return bus_width; + FASSERT((slot >= 0) && (slot < FSDIO_NUM)); + return 4U; /* host support 4 bus width */ } /* sdmmc host set ddr mode */ -static sdmmc_err_t FSdioOsHostSetDDRMode(int slot, bool ddr_enabled) +static sdmmc_err_t fsdio_host_set_ddr_mode(int slot, bool ddr_enabled) { - FASSERT((slot >= 0) && (slot < FSDIO_HOST_INSTANCE_NUM)); + FASSERT((slot >= 0) && (slot < FSDIO_NUM)); FSDIO_ERROR("sdio_host_set_bus_ddr_mode not supported !!!"); return SDMMC_OK; } /* sdmmc host change card clock freq */ -static sdmmc_err_t FSdioOsHostSetCardClock(int slot, u32 freq_khz) +static sdmmc_err_t fsdio_host_set_clk_freq(int slot, u32 freq_khz) +{ + FASSERT((slot >= 0) && (slot < FSDIO_NUM)); + FSdio *ctrl_p = fsdio_get_ctrl(slot); + sdmmc_host_slot_info *impl = fsdio_get_slot_info(slot); + FError err = FSdioSetClkFreq(ctrl_p, freq_khz * 1000); + + if (FSDIO_SUCCESS == err) + { + FSDIO_INFO("set clk rate as %dKHz", freq_khz); + return SDMMC_OK; + } + else + { + return SDMMC_FAIL; + } +} + +static sdmmc_err_t fsdio_host_io_int_enable(int slot) +{ + FASSERT((slot >= 0) && (slot < FSDIO_NUM)); + FSDIO_ERROR("sdio_host_io_int_enable not supported !!!"); + return SDMMC_OK; +} + +static sdmmc_err_t fsdio_host_io_int_wait(int slot, tick_type_t timeout_ticks) +{ + FASSERT((slot >= 0) && (slot < FSDIO_NUM)); + FSDIO_ERROR("sdio_host_io_int_wait not supported !!!"); + return SDMMC_OK; +} + +static sdmmc_err_t fsdio_host_get_real_freq(int slot, int* real_freq_khz) { - FASSERT((slot >= 0) && (slot < FSDIO_HOST_INSTANCE_NUM)); - FFreeRTOSSdio *instance = &sdio[slot]; - FSdio *ctrl = &instance->ctrl; - FSDIO_INFO("set clk rate as %dKHz", freq_khz); - FError err = FSdioSetClkFreq(ctrl, freq_khz * 1000); - return (FSDIO_SUCCESS == err) ? SDMMC_OK : SDMMC_FAIL; + sdmmc_host_slot_info *impl = fsdio_get_slot_info(slot); + *real_freq_khz = FSdioGetClkFreq(&(impl->ctrl)) / 1000; + return SDMMC_OK; } -/* convert command info from sdmmc_command_t to FSdioCmdData */ -static void FSdioOsConvertCmdInfo(sdmmc_command_t *cmdinfo, FSdioCmdData *cmd_data) +static void fsdio_convert_cmdinfo(sdmmc_command_t *cmdinfo, FSdioCmdData *const cmd_data) { if (MMC_GO_IDLE_STATE == cmdinfo->opcode) { @@ -208,66 +239,163 @@ static void FSdioOsConvertCmdInfo(sdmmc_command_t *cmdinfo, FSdioCmdData *cmd_da cmd_data->cmdidx = cmdinfo->opcode; cmd_data->cmdarg = cmdinfo->arg; + /* FSdioDumpCmdInfo(cmd_data); */ return; } +static sdmmc_err_t fsdio_host_pre_command(int slot, sdmmc_command_t *cmdinfo) +{ + sdmmc_host_instance_t *instance_p = fsdio_get_instance(slot); + sdmmc_host_slot_info *impl = fsdio_get_slot_info(slot); + + if (!(instance_p->config.flags & SDMMC_HOST_IO_SUPPORT)) /* filter function card only command */ + { + FSDIO_INFO("opcode = %d", cmdinfo->opcode); + if (SD_IO_SEND_OP_COND == cmdinfo->opcode) + { + FSDIO_INFO("reject SD_IO_SEND_OP_COND for memory card"); + return SDMMC_FAIL; + } + + if (SD_IO_RW_DIRECT == cmdinfo->opcode) + { + FSDIO_INFO("reject SD_IO_RW_DIRECT for memory card"); + return SDMMC_ERR_TIMEOUT; + } + } + + if (!(instance_p->config.flags & SDMMC_HOST_REMOVABLE_CARD)) /* filter SD memory card only command */ + { + FSDIO_INFO("opcode = %d", cmdinfo->opcode); + if ((SD_SEND_IF_COND == cmdinfo->opcode) && (NULL == cmdinfo->data)) + { + /* MMC_SEND_EXT_CSD = 8 need to send so check cmdinfo->data to distinguish + SD_SEND_IF_COND from MMC_SEND_EXT_CSD */ + FSDIO_INFO("reject SD_SEND_IF_COND for eMMC"); + return SDMMC_ERR_NOT_SUPPORTED; + } + + if (MMC_APP_CMD == cmdinfo->opcode) + { + FSDIO_INFO("reject MMC_APP_CMD for eMMC"); + return SDMMC_ERR_TIMEOUT; + } + } + + if ((MMC_READ_BLOCK_MULTIPLE == cmdinfo->opcode) || + (MMC_WRITE_BLOCK_MULTIPLE == cmdinfo->opcode) && (cmdinfo->data)) + { + u32 block_count = cmdinfo->datalen / cmdinfo->blklen; + if (block_count > 1U) + { + return sdmmc_cmd_set_block_count(&instance_p->card, block_count); + } + } + + return SDMMC_OK; +} + +static sdmmc_err_t fsdio_host_post_command(int slot, sdmmc_command_t *cmdinfo) +{ + sdmmc_host_instance_t *instance_p = fsdio_get_instance(slot); + sdmmc_host_slot_info *impl = fsdio_get_slot_info(slot); + + if ((cmdinfo->error) && (cmdinfo->data)) + { + (void)sdmmc_send_stop_transmission(&(instance_p->card)); + } + + return SDMMC_OK; +} + +static void fsdio_card_detected(FSdio *const ctrl, void *args, u32 status, u32 dmac_status) +{ + FASSERT(ctrl); + int slot = ctrl->config.instance_id; + sdmmc_host_slot_info *slot_info = fsdio_get_slot_info(slot); + BaseType_t xhigher_priority_task_woken = pdFALSE; + BaseType_t x_result = pdFALSE; + + FSDIO_DEBUG("card-%d detected ...", slot); + FASSERT(slot_info->evt); + x_result = xEventGroupSetBitsFromISR(slot_info->evt, FFREERTOS_SDIO_PLUG_INOUT, + &xhigher_priority_task_woken); + +} + /* send signal sdio error from interrupt */ -static void FSdioOsHandleError(FSdio *const ctrl, void *args) +static void fsdio_handle_error(FSdio *const ctrl, void *args, u32 status, u32 dmac_status) { FASSERT(ctrl); FSDIO_ERROR("sdio error occur ..."); - - FFreeRTOSSdio *instance = (FFreeRTOSSdio *)args; + int slot = ctrl->config.instance_id; + sdmmc_host_slot_info *slot_info = fsdio_get_slot_info(slot); BaseType_t xhigher_priority_task_woken = pdFALSE; BaseType_t x_result = pdFALSE; - FASSERT(instance->evt); - x_result = xEventGroupSetBitsFromISR(instance->evt, FFREERTOS_SDIO_ERROR_OCCURRED, + FSDIO_ERROR(" cmd: %d", slot_info->cmd_pkg.cmdidx); + FSDIO_ERROR(" status: 0x%x, dmac status: 0x%x", status, dmac_status); + if (status & FSDIO_INT_RE_BIT) + FSDIO_ERROR(" response err"); + + if (dmac_status & FSDIO_DMAC_STATUS_DU) + FSDIO_ERROR(" descriptor un-readable"); + + FASSERT(slot_info->evt); + x_result = xEventGroupSetBitsFromISR(slot_info->evt, FFREERTOS_SDIO_ERROR_OCCURRED, &xhigher_priority_task_woken); } /* send signal sdio command done from interrupt */ -static void FSdioOsAckCmdDone(FSdio *const ctrl, void *args) +static void fsdio_ack_cmd_done(FSdio *const ctrl, void *args, u32 status, u32 dmac_status) { - FASSERT(args); - FFreeRTOSSdio *instance = (FFreeRTOSSdio *)args; + FASSERT(ctrl); + int slot = ctrl->config.instance_id; + sdmmc_host_slot_info *slot_info = fsdio_get_slot_info(slot); BaseType_t xhigher_priority_task_woken = pdFALSE; BaseType_t x_result = pdFALSE; FSDIO_DEBUG("ack cmd and data trans done"); - FASSERT(instance->evt); - x_result = xEventGroupSetBitsFromISR(instance->evt, FFREERTOS_SDIO_CMD_TRANS_DONE, + FASSERT(slot_info->evt); + x_result = xEventGroupSetBitsFromISR(slot_info->evt, FFREERTOS_SDIO_CMD_TRANS_DONE, &xhigher_priority_task_woken); return; } /* send signal sdio data over from interrupt */ -static void FSdioOsAckDataDone(FSdio *const ctrl, void *args) +static void fsdio_ack_data_done(FSdio *const ctrl, void *args, u32 status, u32 dmac_status) { - FASSERT(args); - FFreeRTOSSdio *instance = (FFreeRTOSSdio *)args; + FASSERT(ctrl); + int slot = ctrl->config.instance_id; + sdmmc_host_slot_info *slot_info = fsdio_get_slot_info(slot); BaseType_t xhigher_priority_task_woken = pdFALSE; BaseType_t x_result = pdFALSE; FSDIO_DEBUG("ack cmd and data trans done"); - FASSERT(instance->evt); - x_result = xEventGroupSetBitsFromISR(instance->evt, FFREERTOS_SDIO_DAT_TRANS_DONE, + FASSERT(slot_info->evt); + x_result = xEventGroupSetBitsFromISR(slot_info->evt, FFREERTOS_SDIO_DAT_TRANS_DONE, &xhigher_priority_task_woken); return; } /* wait sdio command done / data over / error occurred from task */ -static FError FSdioOsWaitCmdDataDone(FFreeRTOSSdio *const instance) +static FError fsdio_wait_cmd_data_done(int slot, int timeout_ms) { - const TickType_t wait_delay = pdMS_TO_TICKS(FFREERTOS_SDIO_CMD_TIMEOUT); /* wait for 5000 ms */ + sdmmc_err_t ret = SDMMC_OK; + sdmmc_host_instance_t *instance = fsdio_get_instance(slot); + sdmmc_host_t *host = &instance->host; + FSdio *ctrl = fsdio_get_ctrl(slot); + sdmmc_host_slot_info *slot_info = fsdio_get_slot_info(slot); + FSdioCmdData *cmd_data = &(slot_info->cmd_pkg); + FSdioData *trans_data = &(slot_info->dat_pkg); + + const TickType_t wait_delay = pdMS_TO_TICKS(timeout_ms); /* wait for 5000 ms */ EventBits_t ev; FError err = FFREERTOS_SDIO_OK; u32 evt_bits = FFREERTOS_SDIO_CMD_TRANS_DONE; /* command done */ u32 err_bits = FFREERTOS_SDIO_ERROR_OCCURRED; /* error occurred */ - FSdioCmdData *cmd_data = &instance->cmd_data; - FSdio *ctrl = &instance->ctrl; if (cmd_data->data_p) { @@ -275,8 +403,8 @@ static FError FSdioOsWaitCmdDataDone(FFreeRTOSSdio *const instance) } /* block task to wait finish signal */ - FASSERT_MSG(instance->evt, "evt not exists"); - ev = xEventGroupWaitBits(instance->evt, evt_bits, + FASSERT_MSG(slot_info->evt, "evt not exists"); + ev = xEventGroupWaitBits(slot_info->evt, evt_bits, pdTRUE, pdTRUE, wait_delay); /* wait for cmd/data done */ if (ev & evt_bits == evt_bits) { @@ -288,7 +416,8 @@ static FError FSdioOsWaitCmdDataDone(FFreeRTOSSdio *const instance) /* restart controller in interrupt is not a good idea */ FSdioDumpRegister(ctrl->config.base_addr); FSDIO_WARN("restart controller from error state !!!"); - err = FSdioRestart(ctrl); /* update clock otherwise next command will also fail */ + (void)FSdioRestart(ctrl); /* update clock otherwise next command will also fail */ + err = FFREERTOS_SDIO_EVT_ERR; } else { @@ -299,28 +428,40 @@ static FError FSdioOsWaitCmdDataDone(FFreeRTOSSdio *const instance) return err; } -/* sdmmc do cmd and data transaction */ -static sdmmc_err_t FSdioOsHostDoTransaction(int slot, sdmmc_command_t *cmdinfo) +static sdmmc_err_t fsdio_host_do_transaction(int slot, sdmmc_command_t *cmdinfo) { - FASSERT((slot >= 0) && (slot < FSDIO_HOST_INSTANCE_NUM)); - FFreeRTOSSdio *instance = &sdio[slot]; - FSdio *ctrl = &instance->ctrl; + FASSERT(cmdinfo); + FError err; sdmmc_err_t ret = SDMMC_OK; - FSdioCmdData *cmd_data = &instance->cmd_data; - FSdioData *trans_data = &instance->trans_data; - FError err = FSDIO_SUCCESS; + sdmmc_host_instance_t *instance = fsdio_get_instance(slot); + sdmmc_host_t *host = &instance->host; + FSdio *ctrl = fsdio_get_ctrl(slot); + + sdmmc_host_slot_info *slot_info = fsdio_get_slot_info(slot); + FSdioCmdData *cmd_data = &(slot_info->cmd_pkg); + FSdioData *trans_data = &(slot_info->dat_pkg); + + ret = fsdio_host_pre_command(slot, cmdinfo); + if (SDMMC_OK != ret) + { + /* if not supported (bypass), return ok, if other error (reject), return fail */ + return ret; + } - /* use static structure attached at instance to forward command & data */ memset(cmd_data, 0, sizeof(*cmd_data)); if (cmdinfo->data) { memset(trans_data, 0, sizeof(*trans_data)); cmd_data->data_p = trans_data; } + else + { + cmd_data->data_p = NULL; /* no need to wait for data */ + } - FSdioOsConvertCmdInfo(cmdinfo, cmd_data); /* prepare command data */ + fsdio_convert_cmdinfo(cmdinfo, cmd_data); - if (instance->config.en_dma) /* DMA mode */ + if (SDMMC_HOST_WORK_MODE_DMA & instance->config.flags) /* DMA mode */ { err = FSdioDMATransfer(ctrl, cmd_data); if (FSDIO_SUCCESS != err) @@ -340,294 +481,242 @@ static sdmmc_err_t FSdioOsHostDoTransaction(int slot, sdmmc_command_t *cmdinfo) } /* wait command / data over signal */ - err = FSdioOsWaitCmdDataDone(instance); + err = fsdio_wait_cmd_data_done(slot, host->command_timeout_ms); if (FSDIO_SUCCESS != err) { ret = SDMMC_FAIL; - goto err_exit; + cmdinfo->error = SDMMC_FAIL; } - - /* success, copy response out */ - if (SCF_RSP_PRESENT & cmdinfo->flags) + else { - cmdinfo->response[0] = cmd_data->response[0]; - - if (SCF_RSP_136 & cmdinfo->flags) + if (SCF_RSP_PRESENT & cmdinfo->flags) { - cmdinfo->response[1] = cmd_data->response[1]; - cmdinfo->response[2] = cmd_data->response[2]; - cmdinfo->response[3] = cmd_data->response[3]; + memcpy(cmdinfo->response, cmd_data->response, sizeof(u32) * 4); } } + ret = fsdio_host_post_command(slot, cmdinfo); + if (SDMMC_OK != ret) + { + goto err_exit; + } + err_exit: return ret; } -/* sdmmc host deinit */ -static sdmmc_err_t FSdioOsHostDeinit(void) +static sdmmc_err_t fsdio_ctrl_init(int slot_id) { - sdmmc_err_t err = SDMMC_OK; - return err; -} - -static sdmmc_err_t FSdioOsHostEnableIOInt(int slot) -{ - FASSERT((slot >= 0) && (slot < FSDIO_HOST_INSTANCE_NUM)); - FSDIO_ERROR("sdio_host_io_int_enable not supported !!!"); - return SDMMC_OK; -} + sdmmc_err_t ret = SDMMC_OK; + FSdio *ctrl_p = fsdio_get_ctrl(slot_id); + sdmmc_host_instance_t *instance = fsdio_get_instance(slot_id); + FSdioConfig ctrl_config; + const FSdioConfig *def_ctrl_config; -static sdmmc_err_t FSdioOsHostWaitIOInt(int slot, TickType_t timeout_ticks) -{ - FASSERT((slot >= 0) && (slot < FSDIO_HOST_INSTANCE_NUM)); - FSDIO_ERROR("sdio_host_io_int_wait not supported !!!"); - return SDMMC_OK; -} + memset(&ctrl_config, 0, sizeof(ctrl_config)); -/* setup sdmmc host */ -static FError FSdioOsSetupHost(FFreeRTOSSdio *const instance) -{ - FSdio *ctrl = &instance->ctrl; - int slot = (int)ctrl->config.instance_id; - FSdioOSHost *const sdmmc = &sdmmc_host[slot]; - sdmmc_host_t *host_p = &sdmmc->host; /* host */ - sdmmc_card_t *card_p = &sdmmc->card; /* card */ - sdmmc_err_t sd_err = SDMMC_OK; - static boolean sdmmc_inited = FALSE; - - if (TRUE != sdmmc_inited) - { - /* init sdmmc, which is shared by all instance, and init only one time */ - sd_err = sdmmc_port_init(); - if (SDMMC_OK != sd_err) - goto err_exit; + SDMMC_ASSERT((def_ctrl_config = FSdioLookupConfig(slot_id)) != NULL); + ctrl_config = *def_ctrl_config; - sdmmc_inited = TRUE; - } - - instance->host_data = sdmmc; - - /* set sdmmc host parameters */ - host_p->slot = slot; - host_p->flags |= SDMMC_HOST_FLAG_4BIT; /* bus width = 4 bit */ - host_p->flags &= ~SDMMC_HOST_FLAG_DDR; /* not support DDR mode */ - host_p->flags &= ~SDMMC_HOST_FLAG_SPI; /* not support SPI mode */ - host_p->max_freq_khz = SDMMC_FREQ_50M; /* max freq 50MHz */ - host_p->io_voltage = 3.3f; /* 3.3v */ - host_p->command_timeout_ms = FFREERTOS_SDIO_CMD_TIMEOUT; /* 5000ms timeout */ - - FSDIO_INFO("slot: %d, flags: 0x%x, freq: %dkHz", - host_p->slot, host_p->flags, host_p->max_freq_khz); - - /* register host ops */ - host_p->init = FSdioOsHostInit; - host_p->set_bus_width = FSdioOsHostSetBusWidth; - host_p->get_bus_width = FSdioOsHostGetBusWidth; - host_p->set_bus_ddr_mode = FSdioOsHostSetDDRMode; - host_p->set_card_clk = FSdioOsHostSetCardClock; - host_p->do_transaction = FSdioOsHostDoTransaction; - host_p->deinit = FSdioOsHostDeinit; - host_p->io_int_enable = FSdioOsHostEnableIOInt; - host_p->io_int_wait = FSdioOsHostWaitIOInt; - - /* set clock as 400kHz to probe card */ - sd_err = FSdioOsHostSetCardClock(slot, SDMMC_FREQ_PROBING); - if (SDMMC_OK != sd_err) + if (!(instance->config.flags & SDMMC_HOST_WORK_MODE_IRQ)) { - FSDIO_ERROR("sdio ctrl setup 400kHz clock failed"); - goto err_exit; + FSDIO_ERROR("irq mode is required !!!"); + return SDMMC_FAIL; } - /* probe eMMC or tf card */ - if (FFREERTOS_SDIO_MEDIUM_EMMC == instance->config.medium_type) + if (instance->config.flags & SDMMC_HOST_WORK_MODE_DMA) + ctrl_config.trans_mode = FSDIO_IDMA_TRANS_MODE; + else + ctrl_config.trans_mode = FSDIO_PIO_TRANS_MODE; + + if (instance->config.flags & SDMMC_HOST_REMOVABLE_CARD) + ctrl_config.non_removable = FALSE; + else + ctrl_config.non_removable = TRUE; + + if ((instance->config.flags & SDMMC_HOST_WORK_MODE_IRQ) && + !(instance->config.flags & SDMMC_HOST_WORK_MODE_DMA)) { - sd_err = sdmmc_init_emmc(host_p, card_p); + FSDIO_ERROR("pio can only work in poll mode !!!"); + ret = SDMMC_FAIL; + goto err_exit; } - else if (FFREERTOS_SDIO_MEDIUM_TF == instance->config.medium_type) + + ctrl_config.filp_resp_byte_order = FALSE; /* sdmmc will handle byte order filp */ + if (FSDIO_SUCCESS != FSdioCfgInitialize(ctrl_p, &ctrl_config)) { - sd_err = sdmmc_init_tf_card(host_p, card_p); + FSDIO_ERROR("sdio ctrl init failed"); + ret = SDMMC_FAIL; + goto err_exit; } - if (SDMMC_OK == sd_err) + FSdioRegisterRelaxHandler(ctrl_p, fsdio_host_relax); + + fsdio_setup_interrupt(slot_id); + FSdioRegisterEvtHandler(ctrl_p, FSDIO_EVT_CARD_DETECTED, fsdio_card_detected, NULL); + FSdioRegisterEvtHandler(ctrl_p, FSDIO_EVT_ERR_OCCURE, fsdio_handle_error, NULL); + FSdioRegisterEvtHandler(ctrl_p, FSDIO_EVT_CMD_DONE, fsdio_ack_cmd_done, NULL); + FSdioRegisterEvtHandler(ctrl_p, FSDIO_EVT_DATA_DONE, fsdio_ack_data_done, NULL); + + host_slot_info[slot_id].rw_desc = sdmmc_sys_heap_caps_malloc(SDIO_MAX_BLK_TRANS * sizeof(FSdioIDmaDesc), MALLOC_256_ALIGN); + if (NULL == host_slot_info[slot_id].rw_desc) { - sdmmc_card_print_info(stdout, card_p); /* print card info is success */ + ret = SDMMC_FAIL; + goto err_exit; } - else + + if ((instance->config.flags & SDMMC_HOST_WORK_MODE_DMA) && + (FSDIO_SUCCESS != FSdioSetIDMAList(ctrl_p, host_slot_info[slot_id].rw_desc, SDIO_MAX_BLK_TRANS))) { - FSDIO_ERROR("card init failed: 0x%x", sd_err); + FSDIO_ERROR("sdio ctrl setup DMA failed"); + ret = SDMMC_FAIL; + goto err_exit; } err_exit: - return (SDMMC_OK != sd_err) ? FFREERTOS_SDIO_HOST_ERR : FFREERTOS_SDIO_OK; + return ret; } -/** - * @name: FFreeRTOSSdioInit - * @msg: init and get sdio instance - * @return {FFreeRTOSSdio *} NULL if failed - * @param {u32} id, instance id of sdio - * @param {FFreeRTOSSdioConifg} *input_config, input config of sdio - */ -FFreeRTOSSdio *FFreeRTOSSdioInit(u32 id, const FFreeRTOSSdioConifg *input_config) +static sdmmc_err_t fsdio_card_init(int slot_id) { - FASSERT(input_config); - FASSERT_MSG(id < FSDIO_HOST_INSTANCE_NUM, "invalid sdio id"); - FFreeRTOSSdio *instance = &sdio[id]; - FSdio *ctrl = &instance->ctrl; - FSdioConfig sdio_config; - FError err = FFREERTOS_SDIO_OK; - sdmmc_err_t sd_err = SDMMC_OK; + sdmmc_err_t ret = SDMMC_OK; + sdmmc_host_instance_t *instance = fsdio_get_instance(slot_id); + sdmmc_host_t *host_p = &instance->host; + sdmmc_card_t *card_p = &instance->card; - if (FT_COMPONENT_IS_READY == ctrl->is_ready) + ret = fsdio_host_set_clk_freq(slot_id, SDMMC_FREQ_PROBING); + if (SDMMC_OK != ret) { - FSDIO_ERROR("sdio-%d already init", id); - return instance; + FSDIO_ERROR("sdio ctrl setup 400kHz clock failed"); + return ret; } - taskENTER_CRITICAL(); /* no scheduler during init */ - - instance->config = *input_config; - sdio_config = *FSdioLookupConfig(id); - sdio_config.trans_mode = (instance->config.en_dma) ? FSDIO_IDMA_TRANS_MODE : FSDIO_PIO_TRANS_MODE; - if (FFREERTOS_SDIO_MEDIUM_EMMC == instance->config.medium_type) - sdio_config.non_removable = TRUE; - else - sdio_config.non_removable = FALSE; - - err = FSdioCfgInitialize(ctrl, &sdio_config); - if (FSDIO_SUCCESS != err) + ret = fsdio_host_set_bus_width(slot_id, 1U); + if (SDMMC_OK != ret) { - FSDIO_ERROR("init sdio-%d failed, err: 0x%x !!!", id, err); - taskEXIT_CRITICAL(); /* allow schedule after init */ - return NULL; + FSDIO_ERROR("sdio ctrl set 1 bus width failed"); + return ret; } - if (instance->config.en_dma) + ret = sdmmc_card_init(host_p, card_p); + if (SDMMC_OK == ret) { - /* setup dma list */ - err = FSdioSetIDMAList(ctrl, instance->rw_desc, FFREERTOS_SDIO_MAX_TRANS_BLOCK); - if (FSDIO_SUCCESS != err) - { - FSDIO_ERROR("set sdio-%d dma list, err: 0x%x !!!", id, err); - taskEXIT_CRITICAL(); /* allow schedule after init */ - return NULL; - } + sdmmc_card_print_info(card_p); } - FSdioOSSetupInterrupt(ctrl); + return ret; +} + +sdmmc_err_t fsdio_host_init(sdmmc_host_instance_t *const instance, const sdmmc_host_config_t* config) +{ + SDMMC_ASSERT(instance && config); + SDMMC_ASSERT(config->slot < FSDIO_NUM); + int slot_id = config->slot; + sdmmc_host_t *host_p = &instance->host; + sdmmc_card_t *card_p = &instance->card; + FSdio *ctrl_p = fsdio_get_ctrl(slot_id); + sdmmc_host_slot_info *slot_info = fsdio_get_slot_info(slot_id); + sdmmc_err_t ret = SDMMC_OK; - if (instance->config.card_detect_handler) - { - FSdioRegisterEvtHandler(ctrl, FSDIO_EVT_CARD_DETECTED, - instance->config.card_detect_handler, - instance->config.card_detect_args); - } + memset(host_p, 0, sizeof(*host_p)); + memset(card_p, 0, sizeof(*card_p)); - /* restart controller if error */ - FSdioRegisterEvtHandler(ctrl, FSDIO_EVT_ERR_OCCURE, FSdioOsHandleError, instance); + instance->private = &host_slot_info[slot_id]; + host_slot_info[slot_id].instance = instance; - /* transfer may end up with cmd over or cmd and data over */ - FSdioRegisterEvtHandler(ctrl, FSDIO_EVT_CMD_DONE, FSdioOsAckCmdDone, instance); - FSdioRegisterEvtHandler(ctrl, FSDIO_EVT_DATA_DONE, FSdioOsAckDataDone, instance); + instance->config = *config; + FSDIO_INFO("instance->config.flags = 0x%x", instance->config.flags); - FASSERT_MSG(NULL == instance->locker, "locker exists !!!"); - FASSERT_MSG((instance->locker = xSemaphoreCreateMutex()) != NULL, "create mutex failed !!!"); + /* config sdmmc host */ + host_p->flags |= (SDMMC_HOST_FLAG_4BIT | SDMMC_HOST_FLAG_1BIT); /* support 1-bit and 4-bit dat line */ + host_p->flags &= ~SDMMC_HOST_FLAG_DDR; /* no DDR mode, support SDR only */ + host_p->flags &= ~SDMMC_HOST_FLAG_SPI; /* no SPI mode */ + host_p->slot = slot_id; + host_p->max_freq_khz = SDMMC_FREQ_50M; + host_p->io_voltage = 3.3f; /* SD 2.0, no UHS-I support, so support 3.3v only */ - FASSERT_MSG(NULL == instance->evt, "event group exists !!!"); - FASSERT_MSG((instance->evt = xEventGroupCreate()) != NULL, "create event group failed !!!"); + host_p->command_timeout_ms = 5000; /* 5000ms */ + + /* register sdio host ops */ + host_p->set_bus_width = fsdio_host_set_bus_width; + host_p->get_bus_width = fsdio_host_get_bus_width; + host_p->set_bus_ddr_mode = fsdio_host_set_ddr_mode; + host_p->set_card_clk = fsdio_host_set_clk_freq; + host_p->get_real_freq = fsdio_host_get_real_freq; + host_p->do_transaction = fsdio_host_do_transaction; + host_p->io_int_enable = fsdio_host_io_int_enable; + host_p->io_int_wait = fsdio_host_io_int_wait; + + taskENTER_CRITICAL(); /* no scheduler during init */ + + FASSERT_MSG(NULL == slot_info->locker, "locker exists !!!"); + FASSERT_MSG((slot_info->locker = xSemaphoreCreateMutex()) != NULL, "create mutex failed !!!"); + + FASSERT_MSG(NULL == slot_info->evt, "event group exists !!!"); + FASSERT_MSG((slot_info->evt = xEventGroupCreate()) != NULL, "create event group failed !!!"); + + FASSERT(sdmmc_host_lock(host_p) == SDMMC_OK); + + ret = fsdio_ctrl_init(slot_id); + if (SDMMC_OK != ret) + { + goto err_exit; + } taskEXIT_CRITICAL(); /* allow schedule after init */ - /* take locker to protect instead disable scheduler, - since card probe is time-consuming */ - err = FSdioOsTakeSema(instance->locker); - if (FFREERTOS_SDIO_OK != err) - return NULL; + /* send command and init card */ + ret = fsdio_card_init(slot_id); + if (SDMMC_OK != ret) + { + FSdioDumpRegister(ctrl_p->config.base_addr); + goto err_exit; + } - /* including card probe process, which could be time consuming */ - err = FSdioOsSetupHost(instance); + instance->is_ready = FT_COMPONENT_IS_READY; err_exit: - FSdioOsGiveSema(instance->locker); - return (FFREERTOS_SDIO_OK == err) ? instance : NULL; /* exit with NULL if failed */ + sdmmc_host_unlock(host_p); + return ret; } -/** - * @name: FFreeRTOSSdioDeInit - * @msg: deinit sdio instance - * @return {FError} FFREERTOS_SDIO_OK if success - * @param {FFreeRTOSSdio} *instance, freertos sdio instance - */ -FError FFreeRTOSSdioDeInit(FFreeRTOSSdio *const instance) +sdmmc_err_t fsdio_host_deinit(sdmmc_host_instance_t *const instance) { - FASSERT(instance); - FSdio *ctrl = &instance->ctrl; - FError err = FFREERTOS_SDIO_OK; + sdmmc_err_t ret = SDMMC_OK; + int slot = instance->config.slot; + sdmmc_host_t *host_p = &instance->host; + sdmmc_host_slot_info *slot_info = fsdio_get_slot_info(slot); /* no scheduler during deinit */ taskENTER_CRITICAL(); - /* disable sdio irq */ - InterruptMask(ctrl->config.irq_num); - - FSdioDeInitialize(ctrl); + FASSERT_MSG(NULL != slot_info->locker, "locker not exists !!!"); + vSemaphoreDelete(slot_info->locker); + slot_info->locker = NULL; - instance->host_data = NULL; - - FASSERT_MSG(NULL != instance->locker, "locker not exists !!!"); - vSemaphoreDelete(instance->locker); - instance->locker = NULL; - - FASSERT_MSG(NULL != instance->evt, "event group not exists !!!"); - vEventGroupDelete(instance->evt); - instance->evt = NULL; + FASSERT_MSG(NULL != slot_info->evt, "event group not exists !!!"); + vEventGroupDelete(slot_info->evt); + slot_info->evt = NULL; taskEXIT_CRITICAL(); /* allow schedule after deinit */ - return err; + return ret; } -/** - * @name: FFreeRTOSSdioTransfer - * @msg: start sdio transfer and wait transfer done in this function - * @return {FError} FFREERTOS_SDIO_OK if transfer success - * @param {FFreeRTOSSdio} *instance, freertos sdio instance - * @param {FFreeRTOSSdioMessage} *message, sdio transfer message - */ -FError FFreeRTOSSdioTransfer(FFreeRTOSSdio *const instance, const FFreeRTOSSdioMessage *message) +sdmmc_err_t fsdio_host_lock(sdmmc_host_t * host) { - FASSERT(instance); - FSdio *ctrl = &instance->ctrl; - sdmmc_err_t sd_err = SDMMC_OK; - FError err = FFREERTOS_SDIO_OK; - FSdioOSHost *sdmmc = (FSdioOSHost *)instance->host_data; + FASSERT(host); + int slot_id = host->slot; + sdmmc_host_slot_info *slot_info = fsdio_get_slot_info(slot_id); - err = FSdioOsTakeSema(instance->locker); - if (FFREERTOS_SDIO_OK != err) - return err; + return (pdTRUE == xSemaphoreTake(slot_info->locker, portMAX_DELAY)) ? SDMMC_OK: SDMMC_FAIL; +} - FASSERT_MSG(message->buf_len >= message->block_num * FSDIO_DEFAULT_BLOCK_SZ, "buffer not enough !!!"); - if (FFREERTOS_SDIO_TRANS_READ == message->trans_type) - { - sd_err = sdmmc_read_sectors(&sdmmc->card, (void *)message->buf, - message->start_block, message->block_num); - if (SDMMC_OK != sd_err) - { - err = FFREERTOS_SDIO_READ_ERR; - } - } - else - { - sd_err = sdmmc_write_sectors(&sdmmc->card, (const void *)message->buf, - message->start_block, message->block_num); - if (SDMMC_OK != sd_err) - { - err = FFREERTOS_SDIO_WRITE_ERR; - } - } +void fsdio_host_unlock(sdmmc_host_t * host) +{ + FASSERT(host); + int slot_id = host->slot; + sdmmc_host_slot_info *slot_info = fsdio_get_slot_info(slot_id); -err_exit: - FSdioOsGiveSema(instance->locker); - return err; + xSemaphoreGive(slot_info->locker); } \ No newline at end of file diff --git a/third-party/sdmmc-1.0/port/fsdio/fsdio_port.h b/third-party/sdmmc-1.0/port/fsdio/fsdio_port.h new file mode 100644 index 0000000000000000000000000000000000000000..16be99428a28999fc709177c00cf66eb66cd13de --- /dev/null +++ b/third-party/sdmmc-1.0/port/fsdio/fsdio_port.h @@ -0,0 +1,47 @@ + +/* + * Copyright : (C) 2022 Phytium Information Technology, Inc. + * All Rights Reserved. + * + * This program is OPEN SOURCE software: you can redistribute it and/or modify it + * under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd, + * either version 1.0 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the Phytium Public License for more details. + * + * + * FilePath: fsdio_port.h + * Date: 2022-02-10 14:53:44 + * LastEditTime: 2022-02-25 11:46:22 + * Description:  This files is for + * + * Modify History: + * Ver   Who        Date         Changes + * ----- ------     --------    -------------------------------------- + */ + +#ifndef THIRD_PARTY_FSDIO_OS_H +#define THIRD_PARTY_FSDIO_OS_H + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "sdmmc_host.h" + +sdmmc_err_t fsdio_host_init(sdmmc_host_instance_t *const instance, const sdmmc_host_config_t* config); + +sdmmc_err_t fsdio_host_deinit(sdmmc_host_instance_t *const instance); + +sdmmc_err_t fsdio_host_lock(sdmmc_host_t *const host); + +void fsdio_host_unlock(sdmmc_host_t *const host); + +#ifdef __cplusplus +} +#endif + +#endif \ No newline at end of file diff --git a/third-party/sdmmc-1.0/port/sdmmc_host_os.h b/third-party/sdmmc-1.0/port/sdmmc_host_os.h new file mode 100644 index 0000000000000000000000000000000000000000..295503df6efc20bc33f13c0a76038575cb2b21a3 --- /dev/null +++ b/third-party/sdmmc-1.0/port/sdmmc_host_os.h @@ -0,0 +1,172 @@ +/* + * Copyright : (C) 2022 Phytium Information Technology, Inc. + * All Rights Reserved. + * + * This program is OPEN SOURCE software: you can redistribute it and/or modify it + * under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd, + * either version 1.0 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the Phytium Public License for more details. + * + * + * FilePath: fsdio_port.h + * Date: 2022-02-10 14:53:44 + * LastEditTime: 2022-02-25 11:46:22 + * Description:  This files is for + * + * Modify History: + * Ver   Who        Date         Changes + * ----- ------     --------    -------------------------------------- + */ + +#pragma once + +#include "sdmmc_host.h" +#include "sdmmc_cmd.h" + +#define SDMMC_LOCKED_CALL_NON_RET_NON_ARG(func, card) \ + do { \ + SDMMC_ASSERT(card); \ + if (SDMMC_OK == sdmmc_host_lock((sdmmc_host_t *)&(card->host))) {\ + func(card);\ + } \ + sdmmc_host_unlock((sdmmc_host_t *)&(card->host));\ + } while(0); + +#define SDMMC_LOCKED_CALL_NON_ARG(func, card) \ + do { \ + SDMMC_ASSERT(card); \ + sdmmc_err_t err = SDMMC_OK; \ + if (SDMMC_OK == sdmmc_host_lock(&(card->host))) {\ + err = func(card);\ + } \ + sdmmc_host_unlock(&(card->host));\ + return err; \ + } while(0); + +#define SDMMC_LOCKED_CALL_NON_RET(func, card, ...) \ + do { \ + SDMMC_ASSERT(card); \ + if (SDMMC_OK == sdmmc_host_lock(&(card->host))) {\ + func(card, ##__VA_ARGS__);\ + } \ + sdmmc_host_unlock(&(card->host));\ + } while(0); + +#define SDMMC_LOCKED_CALL(func, card, ...) \ + do { \ + SDMMC_ASSERT(card); \ + sdmmc_err_t err = SDMMC_OK; \ + if (SDMMC_OK == sdmmc_host_lock(&(card->host))) {\ + err = func(card, ##__VA_ARGS__);\ + } \ + sdmmc_host_unlock(&(card->host));\ + return err; \ + } while(0); + +/* thread-safe API warpper */ +static inline void sdmmc_os_card_print_info(const sdmmc_card_t* card) +{ + SDMMC_LOCKED_CALL_NON_RET_NON_ARG(sdmmc_card_print_info, card); +} + +static inline sdmmc_err_t sdmmc_os_get_status(sdmmc_card_t* card) +{ + SDMMC_LOCKED_CALL_NON_ARG(sdmmc_get_status, card); +} + +sdmmc_err_t sdmmc_os_write_sectors(sdmmc_card_t* card, const void* src, + size_t start_sector, size_t sector_count) +{ + SDMMC_LOCKED_CALL(sdmmc_write_sectors, card, src, start_sector, sector_count); +} + +sdmmc_err_t sdmmc_os_read_sectors(sdmmc_card_t* card, void* dst, + size_t start_sector, size_t sector_count) +{ + SDMMC_LOCKED_CALL(sdmmc_read_sectors, card, dst, start_sector, sector_count); +} + +sdmmc_err_t sdmmc_os_erase_sectors(sdmmc_card_t* card, size_t start_sector, + size_t sector_count, sdmmc_erase_arg_t arg) +{ + SDMMC_LOCKED_CALL(sdmmc_erase_sectors, card, start_sector, sector_count, arg); +} + +sdmmc_err_t sdmmc_os_can_discard(sdmmc_card_t* card) +{ + SDMMC_LOCKED_CALL_NON_ARG(sdmmc_can_discard, card); +} + +sdmmc_err_t sdmmc_os_can_trim(sdmmc_card_t* card) +{ + SDMMC_LOCKED_CALL_NON_ARG(sdmmc_can_trim, card); +} + +sdmmc_err_t sdmmc_os_mmc_can_sanitize(sdmmc_card_t* card) +{ + SDMMC_LOCKED_CALL_NON_ARG(sdmmc_mmc_can_sanitize, card); +} + +sdmmc_err_t sdmmc_os_mmc_sanitize(sdmmc_card_t* card, uint32_t timeout_ms) +{ + SDMMC_LOCKED_CALL(sdmmc_mmc_sanitize, card, timeout_ms); +} + +sdmmc_err_t sdmmc_os_full_erase(sdmmc_card_t* card) +{ + SDMMC_LOCKED_CALL_NON_ARG(sdmmc_full_erase, card); +} + +sdmmc_err_t sdmmc_os_io_read_byte(sdmmc_card_t* card, uint32_t function, + uint32_t reg, uint8_t *out_byte) +{ + SDMMC_LOCKED_CALL(sdmmc_io_read_byte, card, function, reg, out_byte); +} + +sdmmc_err_t sdmmc_os_io_write_byte(sdmmc_card_t* card, uint32_t function, + uint32_t reg, uint8_t in_byte, uint8_t* out_byte) +{ + SDMMC_LOCKED_CALL(sdmmc_io_write_byte, card, function, reg, in_byte, out_byte); +} + +sdmmc_err_t sdmmc_os_io_read_bytes(sdmmc_card_t* card, uint32_t function, + uint32_t addr, void* dst, size_t size) +{ + SDMMC_LOCKED_CALL(sdmmc_io_read_bytes, card, function, addr, dst, size); +} + +sdmmc_err_t sdmmc_os_io_write_bytes(sdmmc_card_t* card, uint32_t function, + uint32_t addr, const void* src, size_t size) +{ + SDMMC_LOCKED_CALL(sdmmc_io_write_bytes, card, function, addr, src, size); +} + +sdmmc_err_t sdmmc_os_io_read_blocks(sdmmc_card_t* card, uint32_t function, + uint32_t addr, void* dst, size_t size) +{ + SDMMC_LOCKED_CALL(sdmmc_io_read_blocks, card, function, addr, dst, size); +} + +sdmmc_err_t sdmmc_os_io_write_blocks(sdmmc_card_t* card, uint32_t function, + uint32_t addr, const void* src, size_t size) +{ + SDMMC_LOCKED_CALL(sdmmc_io_write_blocks, card, function, addr, src, size); +} + +sdmmc_err_t sdmmc_os_io_enable_int(sdmmc_card_t* card) +{ + SDMMC_LOCKED_CALL_NON_ARG(sdmmc_io_enable_int, card); +} + +sdmmc_err_t sdmmc_os_io_wait_int(sdmmc_card_t* card, tick_type_t timeout_ticks) +{ + SDMMC_LOCKED_CALL(sdmmc_io_wait_int, card, timeout_ticks); +} + +sdmmc_err_t sdmmc_os_io_get_cis_data(sdmmc_card_t* card, uint8_t* out_buffer, size_t buffer_size, size_t* inout_cis_size) +{ + SDMMC_LOCKED_CALL(sdmmc_io_get_cis_data, card, out_buffer, buffer_size, inout_cis_size); +} \ No newline at end of file diff --git a/third-party/sdmmc-1.0/sdmmc.mk b/third-party/sdmmc-1.0/sdmmc.mk new file mode 100644 index 0000000000000000000000000000000000000000..2388f5e4a5bb5a139b9796aa7e778560cbdad180 --- /dev/null +++ b/third-party/sdmmc-1.0/sdmmc.mk @@ -0,0 +1,20 @@ +SDMMC_OS_DIR := $(FREERTOS_SDK_ROOT)/third-party/sdmmc-1.0 +SDMMC_BM_DIR := $(STANDALONE_DIR)/third-party/sdmmc + +include $(SDMMC_BM_DIR)/sdmmc.mk + +ifdef CONFIG_USE_FREERTOS + +INC_DIR += $(SDMMC_OS_DIR)/osal\ + $(SDMMC_OS_DIR)/port +SRC_DIR += $(SDMMC_OS_DIR)/osal\ + $(SDMMC_OS_DIR)/port + + ifdef CONFIG_SDMMC_USE_FSDIO + + INC_DIR += $(SDMMC_OS_DIR)/port/fsdio + SRC_DIR += $(SDMMC_OS_DIR)/port/fsdio + + endif #CONFIG_SDMMC_USE_FSDIO + +endif \ No newline at end of file diff --git a/third-party/sdmmc-1.0/src/sdmmc_cmd.c b/third-party/sdmmc-1.0/src/sdmmc_cmd.c deleted file mode 100644 index b2246c30cc4ddf4e8a506955fc3a4ee1ac1743b7..0000000000000000000000000000000000000000 --- a/third-party/sdmmc-1.0/src/sdmmc_cmd.c +++ /dev/null @@ -1,676 +0,0 @@ -/* - * Copyright (c) 2006 Uwe Stuehler - * Adaptations to ESP-IDF Copyright (c) 2016-2018 Espressif Systems (Shanghai) PTE LTD - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include "sdmmc_common.h" - -static const char *TAG = "sdmmc_cmd"; - -sdmmc_err_t sdmmc_send_cmd(sdmmc_card_t *card, sdmmc_command_t *cmd) -{ - if (card->host.command_timeout_ms != 0) - { - cmd->timeout_ms = card->host.command_timeout_ms; - } - else if (cmd->timeout_ms == 0) - { - cmd->timeout_ms = SDMMC_DEFAULT_CMD_TIMEOUT_MS; - } - - int slot = card->host.slot; - SDMMC_LOGV(TAG, "sending cmd slot=%d op=%d arg=%x flags=%x data=%p blklen=%d datalen=%d timeout=%d", - slot, cmd->opcode, cmd->arg, cmd->flags, cmd->data, cmd->blklen, cmd->datalen, cmd->timeout_ms); - sdmmc_err_t err = (*card->host.do_transaction)(slot, cmd); - if (err != 0) - { - SDMMC_LOGD(TAG, "cmd=%d, sdmmc_req_run returned 0x%x", cmd->opcode, err); - return err; - } - int state = MMC_R1_CURRENT_STATE(cmd->response); - SDMMC_LOGV(TAG, "cmd response %08x %08x %08x %08x err=0x%x state=%d", - cmd->response[0], - cmd->response[1], - cmd->response[2], - cmd->response[3], - cmd->error, - state); - return cmd->error; -} - -sdmmc_err_t sdmmc_send_app_cmd(sdmmc_card_t *card, sdmmc_command_t *cmd) -{ - sdmmc_command_t app_cmd = { - .opcode = MMC_APP_CMD, - .flags = SCF_CMD_AC | SCF_RSP_R1, - .arg = MMC_ARG_RCA(card->rca), - }; - SDMMC_LOGI(TAG, "cmd to be send %d", cmd->opcode); - sdmmc_err_t err = sdmmc_send_cmd(card, &app_cmd); - if (err != SDMMC_OK) - { - return err; - } - // Check APP_CMD status bit (only in SD mode) - if (!host_is_spi(card) && !(MMC_R1(app_cmd.response) & MMC_R1_APP_CMD)) - { - SDMMC_LOGW(TAG, "card doesn't support APP_CMD"); - return SDMMC_ERR_NOT_SUPPORTED; - } - return sdmmc_send_cmd(card, cmd); -} - -sdmmc_err_t sdmmc_send_cmd_go_idle_state(sdmmc_card_t *card) -{ - sdmmc_command_t cmd = { - .opcode = MMC_GO_IDLE_STATE, - .flags = SCF_CMD_BC | SCF_RSP_R0, - }; - sdmmc_err_t err = sdmmc_send_cmd(card, &cmd); - if (host_is_spi(card)) - { - /* To enter SPI mode, CMD0 needs to be sent twice (see figure 4-1 in - * SD Simplified spec v4.10). Some cards enter SD mode on first CMD0, - * so don't expect the above command to succeed. - * SCF_RSP_R1 flag below tells the lower layer to expect correct R1 - * response (in SPI mode). - */ - (void)err; - SDMMC_DELAY(SDMMC_GO_IDLE_DELAY_MS); - - cmd.flags |= SCF_RSP_R1; - err = sdmmc_send_cmd(card, &cmd); - } - if (err == SDMMC_OK) - { - SDMMC_DELAY(SDMMC_GO_IDLE_DELAY_MS); - } - return err; -} - -sdmmc_err_t sdmmc_send_cmd_send_if_cond(sdmmc_card_t *card, uint32_t ocr) -{ - const uint8_t pattern = 0xaa; /* any pattern will do here */ - sdmmc_command_t cmd = { - .opcode = SD_SEND_IF_COND, - .arg = (((ocr & SD_OCR_VOL_MASK) != 0) << 8) | pattern, - .flags = SCF_CMD_BCR | SCF_RSP_R7, - }; - sdmmc_err_t err = sdmmc_send_cmd(card, &cmd); - if (err != SDMMC_OK) - { - return err; - } - uint8_t response = cmd.response[0] & 0xff; - if (response != pattern) - { - SDMMC_LOGE(TAG, "%s: received=0x%x expected=0x%x", __func__, response, pattern); - return SDMMC_ERR_INVALID_RESPONSE; - } - return SDMMC_OK; -} - -sdmmc_err_t sdmmc_send_cmd_send_op_cond(sdmmc_card_t *card, uint32_t ocr, uint32_t *ocrp) -{ - sdmmc_err_t err; - - sdmmc_command_t cmd = { - .arg = ocr, - .flags = SCF_CMD_BCR | SCF_RSP_R3, - .opcode = SD_APP_OP_COND}; - int nretries = SDMMC_SEND_OP_COND_MAX_RETRIES; - int err_cnt = SDMMC_SEND_OP_COND_MAX_ERRORS; - for (; nretries != 0; --nretries) - { - bzero(&cmd, sizeof cmd); - cmd.arg = ocr; - cmd.flags = SCF_CMD_BCR | SCF_RSP_R3; - if (!card->is_mmc) - { /* SD mode */ - SDMMC_LOGD(TAG, "SD mode"); - cmd.opcode = SD_APP_OP_COND; - err = sdmmc_send_app_cmd(card, &cmd); - } - else - { /* MMC mode */ - SDMMC_LOGD(TAG, "MMC mode"); - cmd.arg &= ~MMC_OCR_ACCESS_MODE_MASK; - cmd.arg |= MMC_OCR_SECTOR_MODE; - cmd.opcode = MMC_SEND_OP_COND; - err = sdmmc_send_cmd(card, &cmd); - } - - if (err != SDMMC_OK) - { - if (--err_cnt == 0) - { - SDMMC_LOGD(TAG, "%s: sdmmc_send_app_cmd err=0x%x", __func__, err); - return err; - } - else - { - SDMMC_LOGV(TAG, "%s: ignoring err=0x%x", __func__, err); - continue; - } - } - // In SD protocol, card sets MEM_READY bit in OCR when it is ready. - // In SPI protocol, card clears IDLE_STATE bit in R1 response. - if (!host_is_spi(card)) - { - if ((MMC_R3(cmd.response) & MMC_OCR_MEM_READY) || - ocr == 0) - { - break; - } - } - else - { - if ((SD_SPI_R1(cmd.response) & SD_SPI_R1_IDLE_STATE) == 0) - { - break; - } - } - SDMMC_DELAY(1000); - } - if (nretries == 0) - { - return SDMMC_ERR_TIMEOUT; - } - if (ocrp) - { - *ocrp = MMC_R3(cmd.response); - } - return SDMMC_OK; -} - -sdmmc_err_t sdmmc_send_cmd_read_ocr(sdmmc_card_t *card, uint32_t *ocrp) -{ - SDMMC_ASSERT(ocrp); - sdmmc_command_t cmd = { - .opcode = SD_READ_OCR, - .flags = SCF_CMD_BCR | SCF_RSP_R2}; - sdmmc_err_t err = sdmmc_send_cmd(card, &cmd); - if (err != SDMMC_OK) - { - return err; - } - *ocrp = SD_SPI_R3(cmd.response); - return SDMMC_OK; -} - -sdmmc_err_t sdmmc_send_cmd_all_send_cid(sdmmc_card_t *card, sdmmc_response_t *out_raw_cid) -{ - SDMMC_ASSERT(out_raw_cid); - sdmmc_command_t cmd = { - .opcode = MMC_ALL_SEND_CID, - .flags = SCF_CMD_BCR | SCF_RSP_R2}; - sdmmc_err_t err = sdmmc_send_cmd(card, &cmd); - if (err != SDMMC_OK) - { - return err; - } - memcpy(out_raw_cid, &cmd.response, sizeof(sdmmc_response_t)); - return SDMMC_OK; -} - -sdmmc_err_t sdmmc_send_cmd_send_cid(sdmmc_card_t *card, sdmmc_cid_t *out_cid) -{ - SDMMC_ASSERT(out_cid); - SDMMC_ASSERT(host_is_spi(card) && "SEND_CID should only be used in SPI mode"); - SDMMC_ASSERT(!card->is_mmc && "MMC cards are not supported in SPI mode"); - sdmmc_response_t buf; - sdmmc_command_t cmd = { - .opcode = MMC_SEND_CID, - .flags = SCF_CMD_READ | SCF_CMD_ADTC, - .arg = 0, - .data = &buf[0], - .datalen = sizeof(buf)}; - sdmmc_err_t err = sdmmc_send_cmd(card, &cmd); - if (err != SDMMC_OK) - { - return err; - } - sdmmc_flip_byte_order(buf, sizeof(buf)); - return sdmmc_decode_cid(buf, out_cid); -} - -sdmmc_err_t sdmmc_send_cmd_set_relative_addr(sdmmc_card_t *card, uint16_t *out_rca) -{ - SDMMC_ASSERT(out_rca); - sdmmc_command_t cmd = { - .opcode = SD_SEND_RELATIVE_ADDR, - .flags = SCF_CMD_BCR | SCF_RSP_R6}; - - /* MMC cards expect us to set the RCA. - * Set RCA to 1 since we don't support multiple cards on the same bus, for now. - */ - uint16_t mmc_rca = 1; - if (card->is_mmc) - { - cmd.arg = MMC_ARG_RCA(mmc_rca); - } - - sdmmc_err_t err = sdmmc_send_cmd(card, &cmd); - if (err != SDMMC_OK) - { - return err; - } - *out_rca = (card->is_mmc) ? mmc_rca : SD_R6_RCA(cmd.response); - return SDMMC_OK; -} - -sdmmc_err_t sdmmc_send_cmd_set_blocklen(sdmmc_card_t *card, sdmmc_csd_t *csd) -{ - sdmmc_command_t cmd = { - .opcode = MMC_SET_BLOCKLEN, - .arg = csd->sector_size, - .flags = SCF_CMD_AC | SCF_RSP_R1}; - SDMMC_LOGD(TAG, "set block len: sector size: 0x%x", csd->sector_size); - return sdmmc_send_cmd(card, &cmd); -} - -sdmmc_err_t sdmmc_send_cmd_send_csd(sdmmc_card_t *card, sdmmc_csd_t *out_csd) -{ - /* The trick with SEND_CSD is that in SPI mode, it acts as a data read - * command, while in SD mode it is an AC command with R2 response. - */ - sdmmc_response_t spi_buf; - const bool is_spi = host_is_spi(card); - sdmmc_command_t cmd = { - .opcode = MMC_SEND_CSD, - .arg = is_spi ? 0 : MMC_ARG_RCA(card->rca), - .flags = is_spi ? (SCF_CMD_READ | SCF_CMD_ADTC | SCF_RSP_R1) : (SCF_CMD_AC | SCF_RSP_R2), - .data = is_spi ? &spi_buf[0] : 0, - .datalen = is_spi ? sizeof(spi_buf) : 0, - }; - sdmmc_err_t err = sdmmc_send_cmd(card, &cmd); - if (err != SDMMC_OK) - { - return err; - } - uint32_t *ptr = cmd.response; - if (is_spi) - { - sdmmc_flip_byte_order(spi_buf, sizeof(spi_buf)); - ptr = spi_buf; - } - - if (card->is_mmc) - { - err = sdmmc_mmc_decode_csd(cmd.response, out_csd); - } - else - { - err = sdmmc_decode_csd(ptr, out_csd); - } - return err; -} - -sdmmc_err_t sdmmc_send_cmd_select_card(sdmmc_card_t *card, uint32_t rca) -{ - /* Don't expect to see a response when de-selecting a card */ - uint32_t response = (rca == 0) ? 0 : SCF_RSP_R1; - sdmmc_command_t cmd = { - .opcode = MMC_SELECT_CARD, - .arg = MMC_ARG_RCA(rca), - .flags = SCF_CMD_AC | response}; - return sdmmc_send_cmd(card, &cmd); -} - -sdmmc_err_t sdmmc_send_cmd_send_scr(sdmmc_card_t *card, sdmmc_scr_t *out_scr) -{ - size_t datalen = 8; - uint32_t *buf = (uint32_t *)sdmmc_port_align_malloc(datalen, TRUE); - if (buf == NULL) - { - return SDMMC_ERR_NO_MEM; - } - SDMMC_LOGI(TAG, "send scr buf: %p, datalen: %d", buf, datalen); - sdmmc_command_t cmd = { - .data = buf, - .datalen = datalen, - .blklen = datalen, - .flags = SCF_CMD_ADTC | SCF_CMD_READ | SCF_RSP_R1, - .opcode = SD_APP_SEND_SCR}; - sdmmc_err_t err = sdmmc_send_app_cmd(card, &cmd); - if (err == SDMMC_OK) - { - err = sdmmc_decode_scr(buf, out_scr); - } - sdmmc_port_align_free(buf); - return err; -} - -sdmmc_err_t sdmmc_send_cmd_set_bus_width(sdmmc_card_t *card, int width) -{ - sdmmc_command_t cmd = { - .opcode = SD_APP_SET_BUS_WIDTH, - .flags = SCF_RSP_R1 | SCF_CMD_AC, - .arg = (width == 4) ? SD_ARG_BUS_WIDTH_4 : SD_ARG_BUS_WIDTH_1, - }; - - return sdmmc_send_app_cmd(card, &cmd); -} - -sdmmc_err_t sdmmc_send_cmd_crc_on_off(sdmmc_card_t *card, bool crc_enable) -{ - SDMMC_ASSERT(host_is_spi(card) && "CRC_ON_OFF can only be used in SPI mode"); - sdmmc_command_t cmd = { - .opcode = SD_CRC_ON_OFF, - .arg = crc_enable ? 1 : 0, - .flags = SCF_CMD_AC | SCF_RSP_R1}; - return sdmmc_send_cmd(card, &cmd); -} - -sdmmc_err_t sdmmc_send_cmd_send_status(sdmmc_card_t *card, uint32_t *out_status) -{ - sdmmc_command_t cmd = { - .opcode = MMC_SEND_STATUS, - .arg = MMC_ARG_RCA(card->rca), - .flags = SCF_CMD_AC | SCF_RSP_R1}; - sdmmc_err_t err = sdmmc_send_cmd(card, &cmd); - if (err != SDMMC_OK) - { - return err; - } - if (out_status) - { - *out_status = MMC_R1(cmd.response); - } - return SDMMC_OK; -} - -/* set number of blocks in next transcation */ -sdmmc_err_t sdmmc_set_blockcount(sdmmc_card_t *card, size_t block_count) -{ - sdmmc_command_t cmd = { - .opcode = MMC_SET_BLOCK_COUNT, - .arg = block_count & 0xffff, - .flags = SCF_CMD_AC | SCF_RSP_R1}; - return sdmmc_send_cmd(card, &cmd); -} - -sdmmc_err_t sdmmc_write_sectors(sdmmc_card_t *card, const void *src, - size_t start_block, size_t block_count) -{ - sdmmc_err_t err = SDMMC_OK; - size_t block_size = card->csd.sector_size; - if (SDMMC_PTR_DMA_CAP(src) && (intptr_t)src % 4 == 0) - { - err = sdmmc_write_sectors_dma(card, src, start_block, block_count); - } - else - { - // SDMMC peripheral needs DMA-capable buffers. Split the write into - // separate single block writes, if needed, and allocate a temporary - // DMA-capable buffer. - void *tmp_buf = sdmmc_port_align_malloc(block_size, TRUE); - if (tmp_buf == NULL) - { - return SDMMC_ERR_NO_MEM; - } - const uint8_t *cur_src = (const uint8_t *)src; - for (size_t i = 0; i < block_count; ++i) - { - memcpy(tmp_buf, cur_src, block_size); - cur_src += block_size; - err = sdmmc_write_sectors_dma(card, tmp_buf, start_block + i, 1); - if (err != SDMMC_OK) - { - SDMMC_LOGD(TAG, "%s: error 0x%x writing block %d+%d", - __func__, err, start_block, i); - break; - } - } - sdmmc_port_align_free(tmp_buf); - } - return err; -} - -sdmmc_err_t sdmmc_write_sectors_dma(sdmmc_card_t *card, const void *src, - size_t start_block, size_t block_count) -{ - if (start_block + block_count > (size_t)card->csd.capacity) - { - - SDMMC_LOGI(TAG, "start: %d, cnt: %d, capacity: %d", start_block, block_count, (size_t)card->csd.capacity); - return SDMMC_ERR_INVALID_SIZE; - } - size_t block_size = card->csd.sector_size; - sdmmc_err_t err = SDMMC_OK; - sdmmc_command_t cmd = { - .flags = SCF_CMD_ADTC | SCF_RSP_R1, - .blklen = block_size, - .data = (void *)src, - .datalen = block_count * block_size, - .timeout_ms = SDMMC_WRITE_CMD_TIMEOUT_MS}; - if (block_count == 1) - { - cmd.opcode = MMC_WRITE_BLOCK_SINGLE; - } - else - { - cmd.opcode = MMC_WRITE_BLOCK_MULTIPLE; - } - if (card->ocr & SD_OCR_SDHC_CAP) - { - cmd.arg = start_block; - } - else - { - cmd.arg = start_block * block_size; - } - - /* for multi-block transcation, send CMD-23 to announce block num, this is optional */ - if (block_count > 1) - { - err = sdmmc_set_blockcount(card, block_count); - if (err != SDMMC_OK) - { - SDMMC_LOGE(TAG, "%s: sdmmc_set_blockcount returned 0x%x", __func__, err); - return err; - } - } - - err = sdmmc_send_cmd(card, &cmd); - if (err != SDMMC_OK) - { - SDMMC_LOGE(TAG, "%s: sdmmc_send_cmd returned 0x%x", __func__, err); - return err; - } - - /* stop transmission for multi-block write, CMD12 is no supported for mmc card */ - if ((FALSE == card->is_mmc) && (block_count > 1)) - { - err = sdmmc_send_stop_transmission(card); - if (err != SDMMC_OK) - { - SDMMC_LOGE(TAG, "%s: send_stop_transmission returned 0x%x", __func__, err); - return err; - } - } - - uint32_t status = 0; - size_t count = 0; - while (!host_is_spi(card) && !(status & MMC_R1_READY_FOR_DATA)) - { - // TODO: add some timeout here - err = sdmmc_send_cmd_send_status(card, &status); - if (err != SDMMC_OK) - { - return err; - } - if (++count % 10 == 0) - { - SDMMC_LOGV(TAG, "waiting for card to become ready (%d)", count); - } - } - return SDMMC_OK; -} - -sdmmc_err_t sdmmc_read_sectors(sdmmc_card_t *card, void *dst, - size_t start_block, size_t block_count) -{ - sdmmc_err_t err = SDMMC_OK; - size_t block_size = card->csd.sector_size; - if (SDMMC_PTR_DMA_CAP(dst) && (intptr_t)dst % 4 == 0) - { - err = sdmmc_read_sectors_dma(card, dst, start_block, block_count); - } - else - { - // SDMMC peripheral needs DMA-capable buffers. Split the read into - // separate single block reads, if needed, and allocate a temporary - // DMA-capable buffer. - void *tmp_buf = sdmmc_port_align_malloc(block_size, TRUE); - if (tmp_buf == NULL) - { - return SDMMC_ERR_NO_MEM; - } - uint8_t *cur_dst = (uint8_t *)dst; - for (size_t i = 0; i < block_count; ++i) - { - err = sdmmc_read_sectors_dma(card, tmp_buf, start_block + i, 1); - if (err != SDMMC_OK) - { - SDMMC_LOGD(TAG, "%s: error 0x%x writing block %d+%d", - __func__, err, start_block, i); - break; - } - memcpy(cur_dst, tmp_buf, block_size); - cur_dst += block_size; - } - sdmmc_port_align_free(tmp_buf); - } - - return err; -} - -sdmmc_err_t sdmmc_read_sectors_dma(sdmmc_card_t *card, void *dst, - size_t start_block, size_t block_count) -{ - if (start_block + block_count > (size_t)card->csd.capacity) - { - - SDMMC_LOGI(TAG, "start: %d, cnt: %d, capacity: %d", start_block, block_count, (size_t)card->csd.capacity); - return SDMMC_ERR_INVALID_SIZE; - } - size_t block_size = card->csd.sector_size; - sdmmc_err_t err = SDMMC_OK; - sdmmc_command_t cmd = { - .flags = SCF_CMD_ADTC | SCF_CMD_READ | SCF_RSP_R1, - .blklen = block_size, - .data = (void *)dst, - .datalen = block_count * block_size}; - if (block_count == 1) - { - cmd.opcode = MMC_READ_BLOCK_SINGLE; - } - else - { - cmd.opcode = MMC_READ_BLOCK_MULTIPLE; - } - if (card->ocr & SD_OCR_SDHC_CAP) - { - cmd.arg = start_block; - } - else - { - cmd.arg = start_block * block_size; - } - - - /* for multi-block transcation, send CMD-23 to announce block num, this is optional */ - if (block_count > 1) - { - err = sdmmc_set_blockcount(card, block_count); - if (err != SDMMC_OK) - { - SDMMC_LOGE(TAG, "%s: sdmmc_set_blockcount returned 0x%x", __func__, err); - return err; - } - } - - err = sdmmc_send_cmd(card, &cmd); - if (err != SDMMC_OK) - { - SDMMC_LOGE(TAG, "%s: sdmmc_send_cmd returned 0x%x", __func__, err); - return err; - } - - /* stop transmission for multi-block read, CMD12 is no supported for mmc card */ - if ((FALSE == card->is_mmc) && (block_count > 1)) - { - err = sdmmc_send_stop_transmission(card); - if (err != SDMMC_OK) - { - SDMMC_LOGE(TAG, "%s: send_stop_transmission returned 0x%x", __func__, err); - return err; - } - } - - uint32_t status = 0; - size_t count = 0; - while (!host_is_spi(card) && !(status & MMC_R1_READY_FOR_DATA)) - { - // TODO: add some timeout here - err = sdmmc_send_cmd_send_status(card, &status); - if (err != SDMMC_OK) - { - return err; - } - if (++count % 10 == 0) - { - SDMMC_LOGV(TAG, "waiting for card to become ready (%d)", count); - } - } - - return SDMMC_OK; -} - -sdmmc_err_t sdmmc_send_cmd_switch(sdmmc_card_t *card) -{ - size_t datalen = 64; - sdmmc_err_t err; - - uint32_t *buf = (uint32_t *)sdmmc_port_align_malloc(datalen, FALSE); - if (NULL == buf) - { - return SDMMC_ERR_NO_MEM; - } - - memset(buf, 0, datalen); - sdmmc_command_t cmd = { - .opcode = MMC_SWITCH, - .arg = 0x2, - .flags = SCF_CMD_ADTC | SCF_RSP_R1 - }; - - err = sdmmc_send_app_cmd(card, &cmd); - sdmmc_port_align_free(buf); - return err; -} - -sdmmc_err_t sdmmc_send_stop_transmission(sdmmc_card_t *card) -{ - sdmmc_err_t err; - sdmmc_command_t cmd = { - .opcode = MMC_STOP_TRANSMISSION, - .arg = 0x0, - .flags = SCF_RSP_R1B - }; - err = sdmmc_send_app_cmd(card, &cmd); - return err; -} diff --git a/third-party/sdmmc-1.0/src/sdmmc_common.c b/third-party/sdmmc-1.0/src/sdmmc_common.c deleted file mode 100644 index 3ae686e34184d5d4dd5064a64936df874d3ab7a0..0000000000000000000000000000000000000000 --- a/third-party/sdmmc-1.0/src/sdmmc_common.c +++ /dev/null @@ -1,400 +0,0 @@ -/* - * Copyright (c) 2006 Uwe Stuehler - * Adaptations to ESP-IDF Copyright (c) 2016-2018 Espressif Systems (Shanghai) PTE LTD - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include "sdmmc_common.h" - -static const char *TAG = "sdmmc_common"; - -sdmmc_err_t sdmmc_init_ocr(sdmmc_card_t *card) -{ - sdmmc_err_t err; - /* In SPI mode, READ_OCR (CMD58) command is used to figure out which voltage - * ranges the card can support. This step is skipped since 1.8V isn't - * supported on the ESP32. - */ - - uint32_t host_ocr = get_host_ocr(card->host.io_voltage); - if ((card->ocr & SD_OCR_SDHC_CAP) != 0) - { - host_ocr |= SD_OCR_SDHC_CAP; - } - /* Send SEND_OP_COND (ACMD41) command to the card until it becomes ready. */ - err = sdmmc_send_cmd_send_op_cond(card, host_ocr, &card->ocr); - - /* If time-out, re-try send_op_cond as MMC */ - if (err == SDMMC_ERR_TIMEOUT && !host_is_spi(card)) - { - SDMMC_LOGD(TAG, "send_op_cond timeout, trying MMC"); - card->is_mmc = 1; - err = sdmmc_send_cmd_send_op_cond(card, host_ocr, &card->ocr); - } - - if (err != SDMMC_OK) - { - SDMMC_LOGE(TAG, "%s: send_op_cond (1) returned 0x%x", __func__, err); - return err; - } - if (host_is_spi(card)) - { - err = sdmmc_send_cmd_read_ocr(card, &card->ocr); - if (err != SDMMC_OK) - { - SDMMC_LOGE(TAG, "%s: read_ocr returned 0x%x", __func__, err); - return err; - } - } - SDMMC_LOGD(TAG, "host_ocr=0x%x card_ocr=0x%x", host_ocr, card->ocr); - - /* Clear all voltage bits in host's OCR which the card doesn't support. - * Don't touch CCS bit because in SPI mode cards don't report CCS in ACMD41 - * response. - */ - host_ocr &= (card->ocr | (~SD_OCR_VOL_MASK)); - SDMMC_LOGD(TAG, "sdmmc_card_init: host_ocr=%08x, card_ocr=%08x", host_ocr, card->ocr); - return SDMMC_OK; -} - -sdmmc_err_t sdmmc_init_cid(sdmmc_card_t *card) -{ - sdmmc_err_t err; - sdmmc_response_t raw_cid; - if (!host_is_spi(card)) - { - err = sdmmc_send_cmd_all_send_cid(card, &raw_cid); - - if (err != SDMMC_OK) - { - SDMMC_LOGE(TAG, "%s: all_send_cid returned 0x%x", __func__, err); - return err; - } - if (!card->is_mmc) - { - err = sdmmc_decode_cid(raw_cid, &card->cid); - if (err != SDMMC_OK) - { - SDMMC_LOGE(TAG, "%s: decoding CID failed (0x%x)", __func__, err); - return err; - } - } - else - { - /* For MMC, need to know CSD to decode CID. But CSD can only be read - * in data transfer mode, and it is not possible to read CID in data - * transfer mode. We temporiliy store the raw cid and do the - * decoding after the RCA is set and the card is in data transfer - * mode. - */ - memcpy(card->raw_cid, raw_cid, sizeof(sdmmc_response_t)); - } - } - else - { - err = sdmmc_send_cmd_send_cid(card, &card->cid); - if (err != SDMMC_OK) - { - SDMMC_LOGE(TAG, "%s: send_cid returned 0x%x", __func__, err); - return err; - } - } - return SDMMC_OK; -} - -sdmmc_err_t sdmmc_init_rca(sdmmc_card_t *card) -{ - sdmmc_err_t err; - err = sdmmc_send_cmd_set_relative_addr(card, &card->rca); - if (err != SDMMC_OK) - { - SDMMC_LOGE(TAG, "%s: set_relative_addr returned 0x%x", __func__, err); - return err; - } - return SDMMC_OK; -} - -sdmmc_err_t sdmmc_init_mmc_decode_cid(sdmmc_card_t *card) -{ - sdmmc_err_t err; - sdmmc_response_t raw_cid; - memcpy(raw_cid, card->raw_cid, sizeof(raw_cid)); - err = sdmmc_mmc_decode_cid(card->csd.mmc_ver, raw_cid, &card->cid); - if (err != SDMMC_OK) - { - SDMMC_LOGE(TAG, "%s: decoding CID failed (0x%x)", __func__, err); - return err; - } - return SDMMC_OK; -} - -sdmmc_err_t sdmmc_init_csd(sdmmc_card_t *card) -{ - SDMMC_ASSERT(card->is_mem == 1); - /* Get and decode the contents of CSD register. Determine card capacity. */ - sdmmc_err_t err = sdmmc_send_cmd_send_csd(card, &card->csd); - if (err != SDMMC_OK) - { - SDMMC_LOGE(TAG, "%s: send_csd returned 0x%x", __func__, err); - return err; - } - const size_t max_sdsc_capacity = UINT32_MAX / card->csd.sector_size + 1; - if (!(card->ocr & SD_OCR_SDHC_CAP) && - ((size_t)card->csd.capacity > max_sdsc_capacity)) - { - SDMMC_LOGW(TAG, "%s: SDSC card reports capacity=%u. Limiting to %u.", - __func__, card->csd.capacity, max_sdsc_capacity); - card->csd.capacity = max_sdsc_capacity; - } - return SDMMC_OK; -} - -sdmmc_err_t sdmmc_init_select_card(sdmmc_card_t *card) -{ - SDMMC_ASSERT(!host_is_spi(card)); - sdmmc_err_t err = sdmmc_send_cmd_select_card(card, card->rca); - if (err != SDMMC_OK) - { - SDMMC_LOGE(TAG, "%s: select_card returned 0x%x", __func__, err); - return err; - } - return SDMMC_OK; -} - -sdmmc_err_t sdmmc_init_card_hs_mode(sdmmc_card_t *card) -{ - sdmmc_err_t err = SDMMC_ERR_NOT_SUPPORTED; - if (card->is_mem && !card->is_mmc) - { - err = sdmmc_enable_hs_mode_and_check(card); - } - else if (card->is_sdio) - { - err = sdmmc_io_enable_hs_mode(card); - } - else if (card->is_mmc) - { - err = sdmmc_mmc_enable_hs_mode(card); - } - if (err == SDMMC_ERR_NOT_SUPPORTED) - { - SDMMC_LOGD(TAG, "%s: host supports HS mode, but card doesn't", __func__); - card->max_freq_khz = SDMMC_FREQ_DEFAULT; - } - else if (err != SDMMC_OK) - { - return err; - } - return SDMMC_OK; -} - -sdmmc_err_t sdmmc_init_host_bus_width(sdmmc_card_t *card) -{ - int bus_width = 1; - - - if ((card->host.flags & SDMMC_HOST_FLAG_4BIT) && - (card->log_bus_width == 2)) - { - bus_width = 4; - } - else if ((card->host.flags & SDMMC_HOST_FLAG_8BIT) && - (card->log_bus_width == 3)) - { - bus_width = 8; - } - SDMMC_LOGD(TAG, "%s: using %d-bit bus", __func__, bus_width); - if (bus_width > 1) - { - sdmmc_err_t err = (*card->host.set_bus_width)(card->host.slot, bus_width); - if (err != SDMMC_OK) - { - SDMMC_LOGE(TAG, "host.set_bus_width failed (0x%x)", err); - return err; - } - } - return SDMMC_OK; -} - -sdmmc_err_t sdmmc_init_host_frequency(sdmmc_card_t *card) -{ - /* if max freq of card exceed host, host configuration must change, otherwise card init will failed */ - if (card->max_freq_khz > card->host.max_freq_khz) - { - SDMMC_LOGE(TAG, "max freq of card %dkHz shall <= max freq of host %dkHz", - card->max_freq_khz, card->host.max_freq_khz); - return SDMMC_FAIL; - } - - SDMMC_ASSERT(card->max_freq_khz <= card->host.max_freq_khz); - - /* Find highest frequency in the following list, - * which is below card->max_freq_khz. - */ - const uint32_t freq_values[] = { - SDMMC_FREQ_52M, - SDMMC_FREQ_HIGHSPEED, - SDMMC_FREQ_26M, - SDMMC_FREQ_25M, /* add option 25MHz, which is common */ - SDMMC_FREQ_DEFAULT - /* NOTE: in sdspi mode, 20MHz may not work. in that case, add 10MHz here. */ - }; - const int n_freq_values = sizeof(freq_values) / sizeof(freq_values[0]); - - /* select a freq from freq_values that is close to max freq of card */ - uint32_t selected_freq = SDMMC_FREQ_PROBING; - for (int i = 0; i < n_freq_values; ++i) - { - uint32_t freq = freq_values[i]; - if (card->max_freq_khz >= freq) - { - selected_freq = freq; - break; - } - } - - SDMMC_LOGD(TAG, "%s: using %d kHz bus frequency", __func__, selected_freq); - if (selected_freq > SDMMC_FREQ_PROBING) - { - sdmmc_err_t err = (*card->host.set_card_clk)(card->host.slot, selected_freq); - if (err != SDMMC_OK) - { - SDMMC_LOGE(TAG, "failed to switch bus frequency (0x%x)", err); - return err; - } - } - - if (card->is_ddr) - { - if (card->host.set_bus_ddr_mode == NULL) - { - SDMMC_LOGE(TAG, "host doesn't support DDR mode or voltage switching"); - return SDMMC_ERR_NOT_SUPPORTED; - } - sdmmc_err_t err = (*card->host.set_bus_ddr_mode)(card->host.slot, true); - if (err != SDMMC_OK) - { - SDMMC_LOGE(TAG, "failed to switch bus to DDR mode (0x%x)", err); - return err; - } - } - return SDMMC_OK; -} - -void sdmmc_flip_byte_order(uint32_t *response, size_t size) -{ - SDMMC_ASSERT(size % (2 * sizeof(uint32_t)) == 0); - const size_t n_words = size / sizeof(uint32_t); - for (size_t i = 0; i < n_words / 2; ++i) - { - uint32_t left = __builtin_bswap32(response[i]); - uint32_t right = __builtin_bswap32(response[n_words - i - 1]); - response[i] = right; - response[n_words - i - 1] = left; - } -} - -void sdmmc_card_print_info(FILE *stream, const sdmmc_card_t *card) -{ - bool print_scr = card->is_mmc ? false : true; /* emmc card do not have scr to read */ - bool print_csd = true; - - const char *type; - fprintf(stream, "Probe Card Success !!!\n"); - fprintf(stream, "======================\n"); - fprintf(stream, "Name: %s\n", card->cid.name); - if (card->is_sdio) - { - type = "SDIO"; - print_scr = true; - print_csd = true; - } - else if (card->is_mmc) - { - type = "MMC"; - print_csd = true; - } - else - { - type = (card->ocr & SD_OCR_SDHC_CAP) ? "SDHC/SDXC" : "SDSC"; - } - - fprintf(stream, "Manufactory ID: 0x%x\n", card->cid.mfg_id); - fprintf(stream, "OEM ID: 0x%x\n", card->cid.oem_id); - fprintf(stream, "Serial NO.: 0x%x\n", card->cid.serial); - fprintf(stream, "Revision: 0x%x\n", card->cid.revision); - fprintf(stream, "Type: %s\n", type); - - if (card->max_freq_khz < 1000) - { - fprintf(stream, "Speed: %d kHz\n", card->max_freq_khz); - } - else - { - fprintf(stream, "Speed: %d MHz%s\n", card->max_freq_khz / 1000, - card->is_ddr ? ", DDR" : ""); - } - fprintf(stream, "Size: %lluMB\n", ((uint64_t)card->csd.capacity) * card->csd.sector_size / (1024 * 1024)); - - if (print_csd) - { - fprintf(stream, "CSD: ver=%d, class=%d, max speed=%d, sector_size=%d, capacity=%d, read_bl_len=%d, \n", - card->csd.csd_ver, - card->csd.card_command_class, - card->csd.tr_speed, - card->csd.sector_size, - card->csd.capacity, - card->csd.read_block_len); - } - - if (print_scr) - { - fprintf(stream, "SCR: sd_spec=%d, bus_width=%d\n", - card->scr.sd_spec, - card->scr.bus_width); - } - - fprintf(stream, "======================\n"); -} - -sdmmc_err_t sdmmc_fix_host_flags(sdmmc_card_t *card) -{ - const uint32_t width_1bit = SDMMC_HOST_FLAG_1BIT; - const uint32_t width_4bit = SDMMC_HOST_FLAG_4BIT; - const uint32_t width_8bit = SDMMC_HOST_FLAG_8BIT; - const uint32_t width_mask = width_1bit | width_4bit | width_8bit; - - int slot_bit_width = card->host.get_bus_width(card->host.slot); - if (slot_bit_width == 1 && - (card->host.flags & (width_4bit | width_8bit))) - { - card->host.flags &= ~width_mask; - card->host.flags |= width_1bit; - } - else if (slot_bit_width == 4 && (card->host.flags & width_8bit)) - { - if ((card->host.flags & width_4bit) == 0) - { - SDMMC_LOGW(TAG, "slot width set to 4, but host flags don't have 4 line mode enabled; using 1 line mode"); - card->host.flags &= ~width_mask; - card->host.flags |= width_1bit; - } - else - { - card->host.flags &= ~width_mask; - card->host.flags |= width_4bit; - } - } - return SDMMC_OK; -} diff --git a/third-party/sdmmc-1.0/src/sdmmc_init.c b/third-party/sdmmc-1.0/src/sdmmc_init.c deleted file mode 100644 index b3af6850fafac3f386c9fdcbabfaf8500533686c..0000000000000000000000000000000000000000 --- a/third-party/sdmmc-1.0/src/sdmmc_init.c +++ /dev/null @@ -1,262 +0,0 @@ -/* - * Copyright (c) 2006 Uwe Stuehler - * Adaptations to ESP-IDF Copyright (c) 2016-2018 Espressif Systems (Shanghai) PTE LTD - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include "sdmmc_common.h" - -static const char *TAG = "sdmmc_init"; - -#define SDMMC_INIT_STEP(condition, function) \ - do \ - { \ - if ((condition)) \ - { \ - sdmmc_err_t err = (function)(card); \ - if (err != SDMMC_OK) \ - { \ - SDMMC_LOGD(TAG, "%s: %s returned 0x%x", __func__, #function, err); \ - return err; \ - } \ - } \ - } while (0); - -sdmmc_err_t sdmmc_card_init(const sdmmc_host_t *config, sdmmc_card_t *card) -{ - memset(card, 0, sizeof(*card)); - memcpy(&card->host, config, sizeof(*config)); - const bool is_spi = host_is_spi(card); - const bool always = true; - const bool io_supported = host_support_sdio(card); //true; - - /* Check if host flags are compatible with slot configuration. */ - SDMMC_INIT_STEP(!is_spi, sdmmc_fix_host_flags); - - /* Reset SDIO (CMD52, RES) before re-initializing IO (CMD5). */ - SDMMC_INIT_STEP(io_supported, sdmmc_io_reset); - - /* GO_IDLE_STATE (CMD0) command resets the card */ - SDMMC_INIT_STEP(always, sdmmc_send_cmd_go_idle_state); - - /* SEND_IF_COND (CMD8) command is used to identify SDHC/SDXC cards. */ - SDMMC_INIT_STEP(always, sdmmc_init_sd_if_cond); - - /* IO_SEND_OP_COND(CMD5), Determine if the card is an IO card. */ - SDMMC_INIT_STEP(io_supported, sdmmc_init_io); - - /* if support io, send CMD5 to check if it is memory card inserted, otherwise, - assert card as memory */ - const bool is_mem = io_supported ? card->is_mem : true; - /* if not support io, assert sdio not support */ - const bool is_sdio = io_supported ? !is_mem : false; - - if (!io_supported) - card->is_mem = 1; /* assert card as memory card when io not support */ - - /* Enable CRC16 checks for data transfers in SPI mode */ - SDMMC_INIT_STEP(is_spi, sdmmc_init_spi_crc); - - /* Use SEND_OP_COND(CMD41) to set up card OCR */ - SDMMC_INIT_STEP(is_mem, sdmmc_init_ocr); - - const bool is_mmc = is_mem && card->is_mmc; - const bool is_sdmem = is_mem && !is_mmc; - - SDMMC_LOGD(TAG, "%s: card type is %s", __func__, - is_sdio ? "SDIO" : is_mmc ? "MMC" - : "SD"); - - /* Read the contents of CID register*/ - SDMMC_INIT_STEP(is_mem, sdmmc_init_cid); - - /* Assign RCA (CMD3) */ - SDMMC_INIT_STEP(!is_spi, sdmmc_init_rca); - - /* Read and decode the contents of CSD register */ - SDMMC_INIT_STEP(is_mem, sdmmc_init_csd); - - /* Decode the contents of mmc CID register */ - SDMMC_INIT_STEP(is_mmc && !is_spi, sdmmc_init_mmc_decode_cid); - - /* Switch the card from stand-by mode to data transfer mode (not needed if - * SPI interface is used). This is needed to issue SET_BLOCKLEN and - * SEND_SCR commands. (CMD7) - */ - SDMMC_INIT_STEP(!is_spi, sdmmc_init_select_card); - - /* SD memory cards: - * Set block len for SDSC cards to 512 bytes (same as SDHC) - * Read SCR - * Wait to enter data transfer state - */ - SDMMC_INIT_STEP(is_sdmem, sdmmc_init_sd_blocklen); - - /* essential!!! switch from 1bit to 4bit */ - SDMMC_INIT_STEP(is_sdmem, sdmmc_init_switch_hs); - - SDMMC_INIT_STEP(is_sdmem, sdmmc_init_sd_scr); - SDMMC_INIT_STEP(is_sdmem, sdmmc_init_sd_wait_data_ready); - - /* MMC cards: read CXD */ - SDMMC_INIT_STEP(is_mmc, sdmmc_init_mmc_read_ext_csd); - - /* Try to switch card to HS mode if the card supports it. - * Set card->max_freq_khz value accordingly. - */ - SDMMC_INIT_STEP(always, sdmmc_init_card_hs_mode); - - /* Set bus width. One call for every kind of card, then one for the host */ - if (!is_spi) { - SDMMC_INIT_STEP(is_sdmem, sdmmc_init_sd_bus_width); - SDMMC_INIT_STEP(is_sdio, sdmmc_init_io_bus_width); - SDMMC_INIT_STEP(is_mmc, sdmmc_init_mmc_bus_width); - SDMMC_INIT_STEP(always, sdmmc_init_host_bus_width); - } - - /* Switch to the host to use card->max_freq_khz frequency. */ - SDMMC_INIT_STEP(always, sdmmc_init_host_frequency); - - /* Sanity check after switching the bus mode and frequency */ - //SDMMC_INIT_STEP(is_sdmem, sdmmc_check_scr); - /* TODO: this is CMD line only, add data checks for eMMC */ - SDMMC_INIT_STEP(is_mmc, sdmmc_init_mmc_check_csd); - /* TODO: add similar checks for SDIO */ - - return SDMMC_OK; -} - -sdmmc_err_t sdmmc_init_tf_card(const sdmmc_host_t *config, sdmmc_card_t *card) -{ - const bool always = true; - memset(card, 0, sizeof(*card)); /* reset card data */ - card->is_mem = TRUE; /* assert card as memory card when io not support */ - card->is_mmc = FALSE; /* assert card is not un-removeable emmc card */ - card->is_sdio = FALSE; - memcpy(&card->host, config, sizeof(*config)); /* copy card configs */ - - SDMMC_LOGD(TAG, "card type is SD"); - - /* Check if host flags are compatible with slot configuration. */ - SDMMC_INIT_STEP(always, sdmmc_fix_host_flags); - - /* GO_IDLE_STATE (CMD0) command resets the card */ - SDMMC_INIT_STEP(always, sdmmc_send_cmd_go_idle_state); - - /* SEND_IF_COND (CMD8) command is used to identify SDHC/SDXC cards. */ - SDMMC_INIT_STEP(always, sdmmc_init_sd_if_cond); - - /* Use SEND_OP_COND (CMD41) to set up card OCR */ - SDMMC_INIT_STEP(always, sdmmc_init_ocr); - - /* Read the contents of CID register (CMD2)*/ - SDMMC_INIT_STEP(always, sdmmc_init_cid); - - /* Assign RCA (CMD3) */ - SDMMC_INIT_STEP(always, sdmmc_init_rca); - - /* Read and decode the contents of CSD register (CMD9) */ - SDMMC_INIT_STEP(always, sdmmc_init_csd); - - /* Switch the card from stand-by mode to data transfer mode (not needed if - * SPI interface is used). This is needed to issue SET_BLOCKLEN and - * SEND_SCR commands. (CMD7) - */ - SDMMC_INIT_STEP(always, sdmmc_init_select_card); - - /* Get bus width of card (CMD51) */ - SDMMC_INIT_STEP(always, sdmmc_init_sd_scr); - - /* Check current status of card (CMD13) */ - SDMMC_INIT_STEP(always, sdmmc_init_sd_wait_data_ready); - - /* Set bus width (CMD6) */ - SDMMC_INIT_STEP(always, sdmmc_init_sd_bus_width); - - /* Call driver function to change bus width */ - SDMMC_INIT_STEP(always, sdmmc_init_host_bus_width); - - /* SD memory cards: - * Set block len for SDSC cards to 512 bytes (same as SDHC) - * Read SCR - * Wait to enter data transfer state (CMD16) - */ - SDMMC_INIT_STEP(always, sdmmc_init_sd_blocklen); - - /* Try to switch card to HS mode if the card supports it. - * Set card->max_freq_khz value accordingly. - */ - SDMMC_INIT_STEP(always, sdmmc_init_card_hs_mode); - - /* Call driver function use card->max_freq_khz frequency. */ - SDMMC_INIT_STEP(always, sdmmc_init_host_frequency); - - return SDMMC_OK; -} - -sdmmc_err_t sdmmc_init_emmc(const sdmmc_host_t *config, sdmmc_card_t *card) -{ - const bool always = true; - memset(card, 0, sizeof(*card)); /* reset card data */ - card->is_mem = TRUE; /* assert card as memory card when io not support */ - card->is_mmc = TRUE; /* assert card is not un-removeable emmc card */ - card->is_sdio = FALSE; - memcpy(&card->host, config, sizeof(*config)); /* copy card configs */ - - SDMMC_LOGD(TAG, "card type is eMMC"); - - /* Check if host flags are compatible with slot configuration. */ - SDMMC_INIT_STEP(always, sdmmc_fix_host_flags); - - /* GO_IDLE_STATE (CMD0) command resets the card */ - SDMMC_INIT_STEP(always, sdmmc_send_cmd_go_idle_state); - - /* Use MMC_SEND_OP_COND (CMD1) to set up card OCR */ - SDMMC_INIT_STEP(always, sdmmc_init_ocr); - - /* Read the contents of CID register (CMD2) */ - SDMMC_INIT_STEP(always, sdmmc_init_cid); - - /* Assign RCA (CMD3) */ - SDMMC_INIT_STEP(always, sdmmc_init_rca); - - /* Read and decode the contents of CSD register (CMD9) */ - SDMMC_INIT_STEP(always, sdmmc_init_csd); - - /* Decode the contents of mmc CID register */ - SDMMC_INIT_STEP(always, sdmmc_init_mmc_decode_cid); - - /* Switch the card from stand-by mode to data transfer mode (not needed if - * SPI interface is used). This is needed to issue SET_BLOCKLEN and - * SEND_SCR commands. (CMD7) - */ - SDMMC_INIT_STEP(always, sdmmc_init_select_card); - - /* MMC cards: read CXD (CMD8) */ - SDMMC_INIT_STEP(always, sdmmc_init_mmc_read_ext_csd); - - /* Switch bus width and call driver function to change bus width (CMD6) */ - SDMMC_INIT_STEP(always, sdmmc_init_mmc_bus_width); - SDMMC_INIT_STEP(always, sdmmc_init_host_bus_width); - - /* Check current status of card (CMD13) */ - SDMMC_INIT_STEP(always, sdmmc_init_sd_wait_data_ready); - - /* Try to switch card to HS mode if the card supports it. - * Set card->max_freq_khz value accordingly. - */ - SDMMC_INIT_STEP(always, sdmmc_init_card_hs_mode); - - return SDMMC_OK; -} \ No newline at end of file diff --git a/third-party/sdmmc-1.0/src/sdmmc_io.c b/third-party/sdmmc-1.0/src/sdmmc_io.c deleted file mode 100644 index eb5fa6a7f2e215b1679acd26bd203ceb47d46a95..0000000000000000000000000000000000000000 --- a/third-party/sdmmc-1.0/src/sdmmc_io.c +++ /dev/null @@ -1,725 +0,0 @@ -/* - * Copyright (c) 2006 Uwe Stuehler - * Adaptations to ESP-IDF Copyright (c) 2016-2018 Espressif Systems (Shanghai) PTE LTD - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include "sdmmc_common.h" - -#define CIS_TUPLE(NAME) \ - (cis_tuple_t) { .code = CISTPL_CODE_##NAME, .name = #NAME, .func = &cis_tuple_func_default, } -#define CIS_TUPLE_WITH_FUNC(NAME, FUNC) \ - (cis_tuple_t) { .code = CISTPL_CODE_##NAME, .name = #NAME, .func = &(FUNC), } - -#define CIS_CHECK_SIZE(SIZE, MINIMAL) \ - do \ - { \ - int store_size = (SIZE); \ - if ((store_size) < (MINIMAL)) \ - return SDMMC_ERR_INVALID_SIZE; \ - } while (0) -#define CIS_CHECK_UNSUPPORTED(COND) \ - do \ - { \ - if (!(COND)) \ - return SDMMC_ERR_NOT_SUPPORTED; \ - } while (0) -#define CIS_GET_MINIMAL_SIZE 32 - -typedef sdmmc_err_t (*cis_tuple_info_func_t)(const void *tuple_info, uint8_t *data, FILE *fp); - -typedef struct -{ - int code; - const char *name; - cis_tuple_info_func_t func; -} cis_tuple_t; - -static const char *TAG = "sdmmc_io"; - -static sdmmc_err_t cis_tuple_func_default(const void *p, uint8_t *data, FILE *fp); -static sdmmc_err_t cis_tuple_func_manfid(const void *p, uint8_t *data, FILE *fp); -static sdmmc_err_t cis_tuple_func_cftable_entry(const void *p, uint8_t *data, FILE *fp); -static sdmmc_err_t cis_tuple_func_end(const void *p, uint8_t *data, FILE *fp); - -static const cis_tuple_t cis_table[] = { - CIS_TUPLE(NULL), - CIS_TUPLE(DEVICE), - CIS_TUPLE(CHKSUM), - CIS_TUPLE(VERS1), - CIS_TUPLE(ALTSTR), - CIS_TUPLE(CONFIG), - CIS_TUPLE_WITH_FUNC(CFTABLE_ENTRY, cis_tuple_func_cftable_entry), - CIS_TUPLE_WITH_FUNC(MANFID, cis_tuple_func_manfid), - CIS_TUPLE(FUNCID), - CIS_TUPLE(FUNCE), - CIS_TUPLE(VENDER_BEGIN), - CIS_TUPLE(VENDER_END), - CIS_TUPLE(SDIO_STD), - CIS_TUPLE(SDIO_EXT), - CIS_TUPLE_WITH_FUNC(END, cis_tuple_func_end), -}; - -sdmmc_err_t sdmmc_io_reset(sdmmc_card_t *card) -{ - uint8_t sdio_reset = CCCR_CTL_RES; - sdmmc_err_t err = sdmmc_io_rw_direct(card, 0, SD_IO_CCCR_CTL, SD_ARG_CMD52_WRITE, &sdio_reset); - if (err == SDMMC_ERR_TIMEOUT || (host_is_spi(card) && err == SDMMC_ERR_NOT_SUPPORTED)) - { - /* Non-IO cards are allowed to time out (in SD mode) or - * return "invalid command" error (in SPI mode). - */ - } - else if (err == SDMMC_ERR_NOT_FOUND) - { - SDMMC_LOGD(TAG, "%s: card not present", __func__); - return err; - } - else if (err != SDMMC_OK) - { - SDMMC_LOGE(TAG, "%s: unexpected return: 0x%x", __func__, err); - return err; - } - return SDMMC_OK; -} - -sdmmc_err_t sdmmc_init_io(sdmmc_card_t *card) -{ - /* IO_SEND_OP_COND(CMD5), Determine if the card is an IO card. - * Non-IO cards will not respond to this command. - */ - sdmmc_err_t err = sdmmc_io_send_op_cond(card, 0, &card->ocr); - if (err != SDMMC_OK) - { - SDMMC_LOGD(TAG, "%s: io_send_op_cond (1) returned 0x%x; not IO card", __func__, err); - card->is_sdio = 0; - card->is_mem = 1; - } - else - { - card->is_sdio = 1; - - if (card->ocr & SD_IO_OCR_MEM_PRESENT) - { - SDMMC_LOGD(TAG, "%s: IO-only card", __func__); - card->is_mem = 0; - } - card->num_io_functions = SD_IO_OCR_NUM_FUNCTIONS(card->ocr); - SDMMC_LOGD(TAG, "%s: number of IO functions: %d", __func__, card->num_io_functions); - if (card->num_io_functions == 0) - { - card->is_sdio = 0; - } - uint32_t host_ocr = get_host_ocr(card->host.io_voltage); - host_ocr &= card->ocr; - err = sdmmc_io_send_op_cond(card, host_ocr, &card->ocr); - if (err != SDMMC_OK) - { - SDMMC_LOGE(TAG, "%s: sdmmc_io_send_op_cond (1) returned 0x%x", __func__, err); - return err; - } - err = sdmmc_io_enable_int(card); - if (err != SDMMC_OK) - { - SDMMC_LOGD(TAG, "%s: sdmmc_enable_int failed (0x%x)", __func__, err); - } - } - return SDMMC_OK; -} - -sdmmc_err_t sdmmc_init_io_bus_width(sdmmc_card_t *card) -{ - sdmmc_err_t err; - card->log_bus_width = 0; - if (card->host.flags & SDMMC_HOST_FLAG_4BIT) - { - uint8_t card_cap = 0; - err = sdmmc_io_rw_direct(card, 0, SD_IO_CCCR_CARD_CAP, - SD_ARG_CMD52_READ, &card_cap); - if (err != SDMMC_OK) - { - SDMMC_LOGE(TAG, "%s: sdmmc_io_rw_direct (read SD_IO_CCCR_CARD_CAP) returned 0x%0x", __func__, err); - return err; - } - SDMMC_LOGD(TAG, "IO card capabilities byte: %02x", card_cap); - if (!(card_cap & CCCR_CARD_CAP_LSC) || - (card_cap & CCCR_CARD_CAP_4BLS)) - { - // This card supports 4-bit bus mode - uint8_t bus_width = CCCR_BUS_WIDTH_4; - err = sdmmc_io_rw_direct(card, 0, SD_IO_CCCR_BUS_WIDTH, - SD_ARG_CMD52_WRITE, &bus_width); - if (err != SDMMC_OK) - { - SDMMC_LOGE(TAG, "%s: sdmmc_io_rw_direct (write SD_IO_CCCR_BUS_WIDTH) returned 0x%0x", __func__, err); - return err; - } - card->log_bus_width = 2; - } - } - return SDMMC_OK; -} - -sdmmc_err_t sdmmc_io_enable_hs_mode(sdmmc_card_t *card) -{ - /* If the host is configured to use low frequency, don't attempt to switch */ - if (card->host.max_freq_khz < SDMMC_FREQ_DEFAULT) - { - card->max_freq_khz = card->host.max_freq_khz; - return SDMMC_OK; - } - else if (card->host.max_freq_khz < SDMMC_FREQ_HIGHSPEED) - { - card->max_freq_khz = SDMMC_FREQ_DEFAULT; - return SDMMC_OK; - } - - /* For IO cards, do write + read operation on "High Speed" register, - * setting EHS bit. If both EHS and SHS read back as set, then HS mode - * has been enabled. - */ - uint8_t val = CCCR_HIGHSPEED_ENABLE; - sdmmc_err_t err = sdmmc_io_rw_direct(card, 0, SD_IO_CCCR_HIGHSPEED, - SD_ARG_CMD52_WRITE | SD_ARG_CMD52_EXCHANGE, &val); - if (err != SDMMC_OK) - { - SDMMC_LOGD(TAG, "%s: sdmmc_io_rw_direct returned 0x%x", __func__, err); - return err; - } - - SDMMC_LOGD(TAG, "%s: CCCR_HIGHSPEED=0x%02x", __func__, val); - const uint8_t hs_mask = CCCR_HIGHSPEED_ENABLE | CCCR_HIGHSPEED_SUPPORT; - if ((val & hs_mask) != hs_mask) - { - return SDMMC_ERR_NOT_SUPPORTED; - } - card->max_freq_khz = SDMMC_FREQ_HIGHSPEED; - return SDMMC_OK; -} - -sdmmc_err_t sdmmc_io_send_op_cond(sdmmc_card_t *card, uint32_t ocr, uint32_t *ocrp) -{ - sdmmc_err_t err = SDMMC_OK; - sdmmc_command_t cmd = { - .flags = SCF_CMD_BCR | SCF_RSP_R4, - .arg = ocr, - .opcode = SD_IO_SEND_OP_COND}; - for (size_t i = 0; i < 100; i++) - { - err = sdmmc_send_cmd(card, &cmd); - if (err != SDMMC_OK) - { - break; - } - if ((MMC_R4(cmd.response) & SD_IO_OCR_MEM_READY) || - ocr == 0) - { - break; - } - err = SDMMC_ERR_TIMEOUT; - SDMMC_DELAY(SDMMC_IO_SEND_OP_COND_DELAY_MS); - } - if (err == SDMMC_OK && ocrp != NULL) - *ocrp = MMC_R4(cmd.response); - - return err; -} - -sdmmc_err_t sdmmc_io_rw_direct(sdmmc_card_t *card, int func, - uint32_t reg, uint32_t arg, uint8_t *byte) -{ - sdmmc_err_t err; - sdmmc_command_t cmd = { - .flags = SCF_CMD_AC | SCF_RSP_R5, - .arg = 0, - .opcode = SD_IO_RW_DIRECT}; - - arg |= (func & SD_ARG_CMD52_FUNC_MASK) << SD_ARG_CMD52_FUNC_SHIFT; - arg |= (reg & SD_ARG_CMD52_REG_MASK) << SD_ARG_CMD52_REG_SHIFT; - arg |= (*byte & SD_ARG_CMD52_DATA_MASK) << SD_ARG_CMD52_DATA_SHIFT; - cmd.arg = arg; - - err = sdmmc_send_cmd(card, &cmd); - if (err != SDMMC_OK) - { - SDMMC_LOGV(TAG, "%s: sdmmc_send_cmd returned 0x%x", __func__, err); - return err; - } - - *byte = SD_R5_DATA(cmd.response); - - return SDMMC_OK; -} - -sdmmc_err_t sdmmc_io_read_byte(sdmmc_card_t *card, uint32_t function, - uint32_t addr, uint8_t *out_byte) -{ - sdmmc_err_t ret = sdmmc_io_rw_direct(card, function, addr, SD_ARG_CMD52_READ, out_byte); - if (ret != SDMMC_OK) - { - SDMMC_LOGE(TAG, "%s: sdmmc_io_rw_direct (read 0x%x) returned 0x%x", __func__, addr, ret); - } - return ret; -} - -sdmmc_err_t sdmmc_io_write_byte(sdmmc_card_t *card, uint32_t function, - uint32_t addr, uint8_t in_byte, uint8_t *out_byte) -{ - uint8_t tmp_byte = in_byte; - sdmmc_err_t ret = sdmmc_io_rw_direct(card, function, addr, - SD_ARG_CMD52_WRITE | SD_ARG_CMD52_EXCHANGE, &tmp_byte); - if (ret != SDMMC_OK) - { - SDMMC_LOGE(TAG, "%s: sdmmc_io_rw_direct (write 0x%x) returned 0x%x", __func__, addr, ret); - return ret; - } - if (out_byte != NULL) - { - *out_byte = tmp_byte; - } - return SDMMC_OK; -} - -sdmmc_err_t sdmmc_io_rw_extended(sdmmc_card_t *card, int func, - uint32_t reg, int arg, void *datap, size_t datalen) -{ - sdmmc_err_t err; - const size_t max_byte_transfer_size = 512; - sdmmc_command_t cmd = { - .flags = SCF_CMD_AC | SCF_RSP_R5, - .arg = 0, - .opcode = SD_IO_RW_EXTENDED, - .data = datap, - .datalen = datalen, - .blklen = max_byte_transfer_size /* TODO: read max block size from CIS */ - }; - - uint32_t count; /* number of bytes or blocks, depending on transfer mode */ - if (arg & SD_ARG_CMD53_BLOCK_MODE) - { - if (cmd.datalen % cmd.blklen != 0) - { - return SDMMC_ERR_INVALID_SIZE; - } - count = cmd.datalen / cmd.blklen; - } - else - { - if (datalen > max_byte_transfer_size) - { - /* TODO: split into multiple operations? */ - return SDMMC_ERR_INVALID_SIZE; - } - if (datalen == max_byte_transfer_size) - { - count = 0; // See 5.3.1 SDIO simplifed spec - } - else - { - count = datalen; - } - cmd.blklen = datalen; - } - - arg |= (func & SD_ARG_CMD53_FUNC_MASK) << SD_ARG_CMD53_FUNC_SHIFT; - arg |= (reg & SD_ARG_CMD53_REG_MASK) << SD_ARG_CMD53_REG_SHIFT; - arg |= (count & SD_ARG_CMD53_LENGTH_MASK) << SD_ARG_CMD53_LENGTH_SHIFT; - cmd.arg = arg; - - if ((arg & SD_ARG_CMD53_WRITE) == 0) - { - cmd.flags |= SCF_CMD_READ; - } - - err = sdmmc_send_cmd(card, &cmd); - if (err != SDMMC_OK) - { - SDMMC_LOGE(TAG, "%s: sdmmc_send_cmd returned 0x%x", __func__, err); - return err; - } - - return SDMMC_OK; -} - -sdmmc_err_t sdmmc_io_read_bytes(sdmmc_card_t *card, uint32_t function, - uint32_t addr, void *dst, size_t size) -{ - /* host quirk: SDIO transfer with length not divisible by 4 bytes - * has to be split into two transfers: one with aligned length, - * the other one for the remaining 1-3 bytes. - */ - uint8_t *pc_dst = dst; - while (size > 0) - { - size_t size_aligned = size & (~3); - size_t will_transfer = size_aligned > 0 ? size_aligned : size; - - sdmmc_err_t err = sdmmc_io_rw_extended(card, function, addr, - SD_ARG_CMD53_READ | SD_ARG_CMD53_INCREMENT, - pc_dst, will_transfer); - if (err != SDMMC_OK) - { - return err; - } - pc_dst += will_transfer; - size -= will_transfer; - addr += will_transfer; - } - return SDMMC_OK; -} - -sdmmc_err_t sdmmc_io_write_bytes(sdmmc_card_t *card, uint32_t function, - uint32_t addr, const void *src, size_t size) -{ - /* same host quirk as in sdmmc_io_read_bytes */ - const uint8_t *pc_src = (const uint8_t *)src; - - while (size > 0) - { - size_t size_aligned = size & (~3); - size_t will_transfer = size_aligned > 0 ? size_aligned : size; - - sdmmc_err_t err = sdmmc_io_rw_extended(card, function, addr, - SD_ARG_CMD53_WRITE | SD_ARG_CMD53_INCREMENT, - (void *)pc_src, will_transfer); - if (err != SDMMC_OK) - { - return err; - } - pc_src += will_transfer; - size -= will_transfer; - addr += will_transfer; - } - return SDMMC_OK; -} - -sdmmc_err_t sdmmc_io_read_blocks(sdmmc_card_t *card, uint32_t function, - uint32_t addr, void *dst, size_t size) -{ - if (size % 4 != 0) - { - return SDMMC_ERR_INVALID_SIZE; - } - return sdmmc_io_rw_extended(card, function, addr, - SD_ARG_CMD53_READ | SD_ARG_CMD53_INCREMENT | SD_ARG_CMD53_BLOCK_MODE, - dst, size); -} - -sdmmc_err_t sdmmc_io_write_blocks(sdmmc_card_t *card, uint32_t function, - uint32_t addr, const void *src, size_t size) -{ - if (size % 4 != 0) - { - return SDMMC_ERR_INVALID_SIZE; - } - return sdmmc_io_rw_extended(card, function, addr, - SD_ARG_CMD53_WRITE | SD_ARG_CMD53_INCREMENT | SD_ARG_CMD53_BLOCK_MODE, - (void *)src, size); -} - -sdmmc_err_t sdmmc_io_enable_int(sdmmc_card_t *card) -{ - if (card->host.io_int_enable == NULL) - { - return SDMMC_ERR_NOT_SUPPORTED; - } - return (*card->host.io_int_enable)(card->host.slot); -} - -sdmmc_err_t sdmmc_io_wait_int(sdmmc_card_t *card, TickType_t timeout_ticks) -{ - if (card->host.io_int_wait == NULL) - { - return SDMMC_ERR_NOT_SUPPORTED; - } - return (*card->host.io_int_wait)(card->host.slot, timeout_ticks); -} - -/* - * Print the CIS information of a CIS card, currently only ESP slave supported. - */ - -static sdmmc_err_t cis_tuple_func_default(const void *p, uint8_t *data, FILE *fp) -{ - const cis_tuple_t *tuple = (const cis_tuple_t *)p; - uint8_t code = *(data++); - int size = *(data++); - if (tuple) - { - fprintf(fp, "TUPLE: %s, size: %d: ", tuple->name, size); - } - else - { - fprintf(fp, "TUPLE: unknown(%02X), size: %d: ", code, size); - } - for (int i = 0; i < size; i++) - fprintf(fp, "%02X ", *(data++)); - fprintf(fp, "\n"); - return SDMMC_OK; -} - -static sdmmc_err_t cis_tuple_func_manfid(const void *p, uint8_t *data, FILE *fp) -{ - const cis_tuple_t *tuple = (const cis_tuple_t *)p; - data++; - int size = *(data++); - fprintf(fp, "TUPLE: %s, size: %d\n", tuple->name, size); - CIS_CHECK_SIZE(size, 4); - fprintf(fp, " MANF: %04X, CARD: %04X\n", *(uint16_t *)(data), *(uint16_t *)(data + 2)); - return SDMMC_OK; -} - -static sdmmc_err_t cis_tuple_func_end(const void *p, uint8_t *data, FILE *fp) -{ - const cis_tuple_t *tuple = (const cis_tuple_t *)p; - data++; - fprintf(fp, "TUPLE: %s\n", tuple->name); - return SDMMC_OK; -} - -static sdmmc_err_t cis_tuple_func_cftable_entry(const void *p, uint8_t *data, FILE *fp) -{ - const cis_tuple_t *tuple = (const cis_tuple_t *)p; - data++; - int size = *(data++); - fprintf(fp, "TUPLE: %s, size: %d\n", tuple->name, size); - CIS_CHECK_SIZE(size, 2); - - CIS_CHECK_SIZE(size--, 1); - bool interface = data[0] & BIT(7); - bool def = data[0] & BIT(6); - int conf_ent_num = data[0] & 0x3F; - fprintf(fp, " INDX: %02X, Intface: %d, Default: %d, Conf-Entry-Num: %d\n", *(data++), interface, def, conf_ent_num); - - if (interface) - { - CIS_CHECK_SIZE(size--, 1); - fprintf(fp, " IF: %02X\n", *(data++)); - } - - CIS_CHECK_SIZE(size--, 1); - bool misc = data[0] & BIT(7); - int mem_space = (data[0] >> 5) & (0x3); - bool irq = data[0] & BIT(4); - bool io_sp = data[0] & BIT(3); - bool timing = data[0] & BIT(2); - int power = data[0] & 3; - fprintf(fp, " FS: %02X, misc: %d, mem_space: %d, irq: %d, io_space: %d, timing: %d, power: %d\n", *(data++), misc, mem_space, irq, io_sp, timing, power); - - CIS_CHECK_UNSUPPORTED(power == 0); //power descriptor is not handled yet - CIS_CHECK_UNSUPPORTED(!timing); //timing descriptor is not handled yet - CIS_CHECK_UNSUPPORTED(!io_sp); //io space descriptor is not handled yet - - if (irq) - { - CIS_CHECK_SIZE(size--, 1); - bool mask = data[0] & BIT(4); - fprintf(fp, " IR: %02X, mask: %d, ", *(data++), mask); - if (mask) - { - CIS_CHECK_SIZE(size, 2); - size -= 2; - fprintf(fp, " IRQ: %02X %02X\n", data[0], data[1]); - data += 2; - } - } - - if (mem_space) - { - CIS_CHECK_SIZE(size, 2); - size -= 2; - CIS_CHECK_UNSUPPORTED(mem_space == 1); //other cases not handled yet - int len = *(uint16_t *)data; - fprintf(fp, " LEN: %04X\n", len); - data += 2; - } - - CIS_CHECK_UNSUPPORTED(misc == 0); //misc descriptor is not handled yet - return SDMMC_OK; -} - -static const cis_tuple_t *get_tuple(uint8_t code) -{ - for (size_t i = 0; i < sizeof(cis_table) / sizeof(cis_tuple_t); i++) - { - if (code == cis_table[i].code) - return &cis_table[i]; - } - return NULL; -} - -sdmmc_err_t sdmmc_io_print_cis_info(uint8_t *buffer, size_t buffer_size, FILE *fp) -{ - SDMMC_LOG_BUFFER_HEXDUMP("CIS", buffer, buffer_size, ESP_LOG_DEBUG); - if (!fp) - fp = stdout; - - uint8_t *cis = buffer; - do - { - const cis_tuple_t *tuple = get_tuple(cis[0]); - int size = cis[1]; - sdmmc_err_t ret = SDMMC_OK; - if (tuple) - { - ret = tuple->func(tuple, cis, fp); - } - else - { - ret = cis_tuple_func_default(NULL, cis, fp); - } - if (ret != SDMMC_OK) - return ret; - cis += 2 + size; - if (tuple && tuple->code == CISTPL_CODE_END) - break; - } while (cis < buffer + buffer_size); - return SDMMC_OK; -} - -/** - * Check tuples in the buffer. - * - * @param buf Buffer to check - * @param buffer_size Size of the buffer - * @param inout_cis_offset - * - input: the last cis_offset, relative to the beginning of the buf. -1 if - * this buffer begin with the tuple length, otherwise should be no smaller than - * zero. - * - output: when the end tuple found, output offset of the CISTPL_CODE_END - * byte + 1 (relative to the beginning of the buffer; when not found, output - * the address of next tuple code. - * - * @return true if found, false if haven't. - */ -static bool check_tuples_in_buffer(uint8_t *buf, int buffer_size, int *inout_cis_offset) -{ - int cis_offset = *inout_cis_offset; - if (cis_offset == -1) - { - //the CIS code is checked in the last buffer, skip to next tuple - cis_offset += buf[0] + 2; - } - SDMMC_ASSERT(cis_offset >= 0); - while (1) - { - if (cis_offset < buffer_size) - { - //A CIS code in the buffer, check it - if (buf[cis_offset] == CISTPL_CODE_END) - { - *inout_cis_offset = cis_offset + 1; - return true; - } - } - if (cis_offset + 1 < buffer_size) - { - cis_offset += buf[cis_offset + 1] + 2; - } - else - { - break; - } - } - *inout_cis_offset = cis_offset; - return false; -} - -sdmmc_err_t sdmmc_io_get_cis_data(sdmmc_card_t *card, uint8_t *out_buffer, size_t buffer_size, size_t *inout_cis_size) -{ - sdmmc_err_t ret = SDMMC_OK; - WORD_ALIGNED_ATTR uint8_t buf[CIS_GET_MINIMAL_SIZE]; - - /* Pointer to size is a mandatory parameter */ - SDMMC_ASSERT(inout_cis_size); - - /* - * CIS region exist in 0x1000~0x17FFF of FUNC 0, get the start address of it - * from CCCR register. - */ - uint32_t addr; - ret = sdmmc_io_read_bytes(card, 0, 9, &addr, 3); - if (ret != SDMMC_OK) - return ret; - //the sdmmc_io driver reads 4 bytes, the most significant byte is not the address. - addr &= 0xffffff; - if (addr < 0x1000 || addr > 0x17FFF) - { - return SDMMC_ERR_INVALID_RESPONSE; - } - - /* - * To avoid reading too long, take the input value as limitation if - * existing. - */ - size_t max_reading = UINT32_MAX; - if (*inout_cis_size != 0) - { - max_reading = *inout_cis_size; - } - - /* - * Parse the length while reading. If find the end tuple, or reaches the - * limitation, read no more and return both the data and the size already - * read. - */ - int buffer_offset = 0; - int cur_cis_offset = 0; - bool end_tuple_found = false; - do - { - ret = sdmmc_io_read_bytes(card, 0, addr + buffer_offset, &buf, CIS_GET_MINIMAL_SIZE); - if (ret != SDMMC_OK) - return ret; - - //calculate relative to the beginning of the buffer - int offset = cur_cis_offset - buffer_offset; - bool finish = check_tuples_in_buffer(buf, CIS_GET_MINIMAL_SIZE, &offset); - - int remain_size = buffer_size - buffer_offset; - int copy_len; - if (finish) - { - copy_len = min(offset, remain_size); - end_tuple_found = true; - } - else - { - copy_len = min(CIS_GET_MINIMAL_SIZE, remain_size); - } - if (copy_len > 0) - { - memcpy(out_buffer + buffer_offset, buf, copy_len); - } - cur_cis_offset = buffer_offset + offset; - buffer_offset += CIS_GET_MINIMAL_SIZE; - } while (!end_tuple_found && (size_t)buffer_offset < max_reading); - - if (end_tuple_found) - { - *inout_cis_size = cur_cis_offset; - if ((size_t)cur_cis_offset > buffer_size) - { - return SDMMC_ERR_INVALID_SIZE; - } - else - { - return SDMMC_OK; - } - } - else - { - return SDMMC_ERR_NOT_FOUND; - } -} diff --git a/third-party/sdmmc-1.0/src/sdmmc_mmc.c b/third-party/sdmmc-1.0/src/sdmmc_mmc.c deleted file mode 100644 index 4c6dffed165c333af582f4cc2c8603b353cc947b..0000000000000000000000000000000000000000 --- a/third-party/sdmmc-1.0/src/sdmmc_mmc.c +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Copyright (c) 2006 Uwe Stuehler - * Adaptations to ESP-IDF Copyright (c) 2016-2018 Espressif Systems (Shanghai) PTE LTD - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include -#include -#include "sdmmc_common.h" - -static const char *TAG = "sdmmc_mmc"; - -sdmmc_err_t sdmmc_init_mmc_read_ext_csd(sdmmc_card_t *card) -{ - int card_type; - sdmmc_err_t err = SDMMC_OK; - - uint8_t *ext_csd = sdmmc_port_align_malloc(EXT_CSD_MMC_SIZE, TRUE); - if (!ext_csd) - { - SDMMC_LOGE(TAG, "%s: could not allocate ext_csd", __func__); - return SDMMC_ERR_NO_MEM; - } - - uint32_t sectors = 0; - - SDMMC_LOGD(TAG, "MMC version: %d", card->csd.mmc_ver); - if (card->csd.mmc_ver < MMC_CSD_MMCVER_4_0) - { - err = SDMMC_ERR_NOT_SUPPORTED; - goto out; - } - - /* read EXT_CSD */ - err = sdmmc_mmc_send_ext_csd_data(card, ext_csd, EXT_CSD_MMC_SIZE); - if (err != SDMMC_OK) - { - SDMMC_LOGE(TAG, "%s: send_ext_csd_data error 0x%x", __func__, err); - goto out; - } - card_type = ext_csd[EXT_CSD_CARD_TYPE]; - - card->is_ddr = 0; - if (card_type & EXT_CSD_CARD_TYPE_F_52M_1_8V) - { - card->max_freq_khz = SDMMC_FREQ_52M; - if ((card->host.flags & SDMMC_HOST_FLAG_DDR) && - card->host.max_freq_khz >= SDMMC_FREQ_26M && - card->host.get_bus_width(card->host.slot) == 4) - { - SDMMC_LOGD(TAG, "card and host support DDR mode"); - card->is_ddr = 1; - } - } - else if (card_type & EXT_CSD_CARD_TYPE_F_52M) - { - card->max_freq_khz = SDMMC_FREQ_52M; - } - else if (card_type & EXT_CSD_CARD_TYPE_F_26M) - { - card->max_freq_khz = SDMMC_FREQ_26M; - } - else - { - SDMMC_LOGW(TAG, "%s: unknown CARD_TYPE 0x%x", __func__, card_type); - } - /* For MMC cards, use speed value from EXT_CSD */ - card->csd.tr_speed = card->max_freq_khz * 1000; - SDMMC_LOGD(TAG, "MMC card type %d, max_freq_khz=%d, is_ddr=%d", card_type, card->max_freq_khz, card->is_ddr); - card->max_freq_khz = min((int)card->max_freq_khz, card->host.max_freq_khz); - - if (card->host.flags & SDMMC_HOST_FLAG_8BIT) - { - card->ext_csd.power_class = ext_csd[(card->max_freq_khz > SDMMC_FREQ_26M) ? EXT_CSD_PWR_CL_52_360 : EXT_CSD_PWR_CL_26_360] >> 4; - card->log_bus_width = 3; - } - else if (card->host.flags & SDMMC_HOST_FLAG_4BIT) - { - card->ext_csd.power_class = ext_csd[(card->max_freq_khz > SDMMC_FREQ_26M) ? EXT_CSD_PWR_CL_52_360 : EXT_CSD_PWR_CL_26_360] & 0x0f; - card->log_bus_width = 2; - } - else - { - card->ext_csd.power_class = 0; //card must be able to do full rate at powerclass 0 in 1-bit mode - card->log_bus_width = 0; - } - - sectors = (ext_csd[EXT_CSD_SEC_COUNT + 0] << 0) | (ext_csd[EXT_CSD_SEC_COUNT + 1] << 8) | (ext_csd[EXT_CSD_SEC_COUNT + 2] << 16) | (ext_csd[EXT_CSD_SEC_COUNT + 3] << 24); - - if (sectors > (2u * 1024 * 1024 * 1024) / 512) - { - card->csd.capacity = sectors; - } - -out: - sdmmc_port_align_free(ext_csd); - return err; -} - -sdmmc_err_t sdmmc_init_mmc_bus_width(sdmmc_card_t *card) -{ - sdmmc_err_t err; - if (card->ext_csd.power_class != 0) - { - err = sdmmc_mmc_switch(card, EXT_CSD_CMD_SET_NORMAL, - EXT_CSD_POWER_CLASS, card->ext_csd.power_class); - if (err != SDMMC_OK) - { - SDMMC_LOGE(TAG, "%s: can't change power class (%d bit), 0x%x", __func__, card->ext_csd.power_class, err); - return err; - } - } - - if (card->log_bus_width > 0) - { - int csd_bus_width_value = EXT_CSD_BUS_WIDTH_1; - int bus_width = 1; - if (card->log_bus_width == 2) - { - if (card->is_ddr) - { - csd_bus_width_value = EXT_CSD_BUS_WIDTH_4_DDR; - } - else - { - csd_bus_width_value = EXT_CSD_BUS_WIDTH_4; - } - bus_width = 4; - } - else if (card->log_bus_width == 3) - { - if (card->is_ddr) - { - csd_bus_width_value = EXT_CSD_BUS_WIDTH_8_DDR; - } - else - { - csd_bus_width_value = EXT_CSD_BUS_WIDTH_8; - } - bus_width = 8; - } - err = sdmmc_mmc_switch(card, EXT_CSD_CMD_SET_NORMAL, - EXT_CSD_BUS_WIDTH, csd_bus_width_value); - if (err != SDMMC_OK) - { - SDMMC_LOGE(TAG, "%s: can't change bus width (%d bit), 0x%x", - __func__, bus_width, err); - return err; - } - } - return SDMMC_OK; -} - -sdmmc_err_t sdmmc_mmc_enable_hs_mode(sdmmc_card_t *card) -{ - sdmmc_err_t err; - if (card->max_freq_khz > SDMMC_FREQ_26M) - { - /* switch to high speed timing */ - err = sdmmc_mmc_switch(card, EXT_CSD_CMD_SET_NORMAL, - EXT_CSD_HS_TIMING, EXT_CSD_HS_TIMING_HS); - if (err != SDMMC_OK) - { - SDMMC_LOGE(TAG, "%s: mmc_switch EXT_CSD_HS_TIMING_HS error 0x%x", - __func__, err); - return err; - } - } - return SDMMC_OK; -} - -sdmmc_err_t sdmmc_mmc_decode_cid(int mmc_ver, sdmmc_response_t resp, sdmmc_cid_t *out_cid) -{ - if (mmc_ver == MMC_CSD_MMCVER_1_0 || - mmc_ver == MMC_CSD_MMCVER_1_4) - { - out_cid->mfg_id = MMC_CID_MID_V1(resp); - out_cid->oem_id = 0; - MMC_CID_PNM_V1_CPY(resp, out_cid->name); - out_cid->revision = MMC_CID_REV_V1(resp); - out_cid->serial = MMC_CID_PSN_V1(resp); - out_cid->date = MMC_CID_MDT_V1(resp); - } - else if (mmc_ver == MMC_CSD_MMCVER_2_0 || - mmc_ver == MMC_CSD_MMCVER_3_1 || - mmc_ver == MMC_CSD_MMCVER_4_0) - { - out_cid->mfg_id = MMC_CID_MID_V2(resp); - out_cid->oem_id = MMC_CID_OID_V2(resp); - MMC_CID_PNM_V1_CPY(resp, out_cid->name); - out_cid->revision = 0; - out_cid->serial = MMC_CID_PSN_V1(resp); - out_cid->date = 0; - } - return SDMMC_OK; -} - -sdmmc_err_t sdmmc_mmc_decode_csd(sdmmc_response_t response, sdmmc_csd_t *out_csd) -{ - out_csd->csd_ver = MMC_CSD_CSDVER(response); - if (out_csd->csd_ver == MMC_CSD_CSDVER_1_0 || - out_csd->csd_ver == MMC_CSD_CSDVER_2_0 || - out_csd->csd_ver == MMC_CSD_CSDVER_EXT_CSD) - { - out_csd->mmc_ver = MMC_CSD_MMCVER(response); - out_csd->capacity = MMC_CSD_CAPACITY(response); - out_csd->read_block_len = MMC_CSD_READ_BL_LEN(response); - } - else - { - SDMMC_LOGE(TAG, "unknown MMC CSD structure version 0x%x\n", out_csd->csd_ver); - return 1; - } - int read_bl_size = 1 << out_csd->read_block_len; - out_csd->sector_size = min(read_bl_size, 512); - if (out_csd->sector_size < read_bl_size) - { - out_csd->capacity *= read_bl_size / out_csd->sector_size; - } - /* tr_speed will be determined when reading CXD */ - out_csd->tr_speed = 0; - return SDMMC_OK; -} - -sdmmc_err_t sdmmc_mmc_send_ext_csd_data(sdmmc_card_t *card, void *out_data, size_t datalen) -{ - SDMMC_ASSERT(SDMMC_PTR_DMA_CAP(out_data)); - sdmmc_command_t cmd = { - .data = out_data, - .datalen = datalen, - .blklen = datalen, - .opcode = MMC_SEND_EXT_CSD, - .arg = 0, - .flags = SCF_CMD_ADTC | SCF_RSP_R1 | SCF_CMD_READ}; - return sdmmc_send_cmd(card, &cmd); -} - -sdmmc_err_t sdmmc_mmc_switch(sdmmc_card_t *card, uint8_t set, uint8_t index, uint8_t value) -{ - sdmmc_command_t cmd = { - .opcode = MMC_SWITCH, - .arg = (MMC_SWITCH_MODE_WRITE_BYTE << 24) | (index << 16) | (value << 8) | set, - .flags = SCF_RSP_R1B | SCF_CMD_AC | SCF_WAIT_BUSY, - }; - sdmmc_err_t err = sdmmc_send_cmd(card, &cmd); - if (err == SDMMC_OK) - { - //check response bit to see that switch was accepted - if (MMC_R1(cmd.response) & MMC_R1_SWITCH_ERROR) - err = SDMMC_ERR_INVALID_RESPONSE; - } - - return err; -} - -sdmmc_err_t sdmmc_init_mmc_check_csd(sdmmc_card_t *card) -{ - sdmmc_err_t err; - SDMMC_ASSERT(card->is_mem == 1); - SDMMC_ASSERT(card->rca != 0); - //The card will not respond to send_csd command in the transfer state. - //Deselect it first. - err = sdmmc_send_cmd_select_card(card, 0); - if (err != SDMMC_OK) - { - SDMMC_LOGE(TAG, "%s: select_card returned 0x%x", __func__, err); - return err; - } - - sdmmc_csd_t csd; - /* Get the contents of CSD register to verify the communication over CMD line - is OK. */ - err = sdmmc_send_cmd_send_csd(card, &csd); - if (err != SDMMC_OK) - { - SDMMC_LOGE(TAG, "%s: send_csd returned 0x%x", __func__, err); - return err; - } - - //Select the card again - err = sdmmc_send_cmd_select_card(card, card->rca); - if (err != SDMMC_OK) - { - SDMMC_LOGE(TAG, "%s: select_card returned 0x%x", __func__, err); - return err; - } - return SDMMC_OK; -} diff --git a/third-party/sdmmc-1.0/src/sdmmc_sd.c b/third-party/sdmmc-1.0/src/sdmmc_sd.c deleted file mode 100644 index 247f036cfe7b57e68ecbc136d657cbf0675d9ec7..0000000000000000000000000000000000000000 --- a/third-party/sdmmc-1.0/src/sdmmc_sd.c +++ /dev/null @@ -1,408 +0,0 @@ -/* - * Copyright (c) 2006 Uwe Stuehler - * Adaptations to ESP-IDF Copyright (c) 2016-2018 Espressif Systems (Shanghai) PTE LTD - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include "sdmmc_common.h" - -static const char *TAG = "sdmmc_sd"; - -sdmmc_err_t sdmmc_init_sd_if_cond(sdmmc_card_t *card) -{ - /* SEND_IF_COND (CMD8) command is used to identify SDHC/SDXC cards. - * SD v1 and non-SD cards will not respond to this command. - */ - uint32_t host_ocr = get_host_ocr(card->host.io_voltage); - sdmmc_err_t err = sdmmc_send_cmd_send_if_cond(card, host_ocr); - if (err == SDMMC_OK) - { - SDMMC_LOGD(TAG, "SDHC/SDXC card"); - host_ocr |= SD_OCR_SDHC_CAP; - } - else if (err == SDMMC_ERR_TIMEOUT) - { - SDMMC_LOGD(TAG, "CMD8 timeout; not an SD v2.00 card"); - } - else if (host_is_spi(card) && err == SDMMC_ERR_NOT_SUPPORTED) - { - SDMMC_LOGD(TAG, "CMD8 rejected; not an SD v2.00 card"); - } - else - { - SDMMC_LOGE(TAG, "%s: send_if_cond (1) returned 0x%x", __func__, err); - return err; - } - card->ocr = host_ocr; - return SDMMC_OK; -} - -sdmmc_err_t sdmmc_init_sd_blocklen(sdmmc_card_t *card) -{ - /* SDSC cards support configurable data block lengths. - * We don't use this feature and set the block length to 512 bytes, - * same as the block length for SDHC cards. - */ - if ((card->ocr & SD_OCR_SDHC_CAP) == 0) - { - sdmmc_err_t err = sdmmc_send_cmd_set_blocklen(card, &card->csd); - if (err != SDMMC_OK) - { - SDMMC_LOGE(TAG, "%s: set_blocklen returned 0x%x", __func__, err); - return err; - } - } - return SDMMC_OK; -} - -sdmmc_err_t sdmmc_init_sd_scr(sdmmc_card_t *card) -{ - sdmmc_err_t err; - /* Get the contents of SCR register: bus width and the version of SD spec - * supported by the card. - * In SD mode, this is the first command which uses D0 line. Errors at - * this step usually indicate connection issue or lack of pull-up resistor. - */ - err = sdmmc_send_cmd_send_scr(card, &card->scr); - if (err != SDMMC_OK) - { - SDMMC_LOGE(TAG, "%s: send_scr (1) returned 0x%x", __func__, err); - return err; - } - - if ((card->scr.bus_width & SCR_SD_BUS_WIDTHS_4BIT) && (card->host.flags & SDMMC_HOST_FLAG_4BIT)) - { - card->log_bus_width = 2; - } - else - { - card->log_bus_width = 0; - } - return SDMMC_OK; -} - -sdmmc_err_t sdmmc_init_sd_bus_width(sdmmc_card_t *card) -{ - int width = 1; - if (card->log_bus_width == 2) - { - width = 4; - } - else if (card->log_bus_width == 3) - { - width = 8; - } - sdmmc_err_t err = sdmmc_send_cmd_set_bus_width(card, width); - if (err != SDMMC_OK) - { - SDMMC_LOGE(TAG, "set_bus_width %d failed (0x%x)", width, err); - return err; - } - return SDMMC_OK; -} - -sdmmc_err_t sdmmc_init_sd_wait_data_ready(sdmmc_card_t *card) -{ - /* Wait for the card to be ready for data transfers */ - uint32_t status = 0; - uint32_t count = 0; - while (!host_is_spi(card) && !(status & MMC_R1_READY_FOR_DATA)) - { - // TODO: add some timeout here - sdmmc_err_t err = sdmmc_send_cmd_send_status(card, &status); - if (err != SDMMC_OK) - { - return err; - } - if (++count % 16 == 0) - { - SDMMC_LOGV(TAG, "waiting for card to become ready (%d)", count); - } - } - return SDMMC_OK; -} - -sdmmc_err_t sdmmc_send_cmd_switch_func(sdmmc_card_t *card, - uint32_t mode, uint32_t group, uint32_t function, - sdmmc_switch_func_rsp_t *resp) -{ - if (card->scr.sd_spec < SCR_SD_SPEC_VER_1_10 || - ((card->csd.card_command_class & SD_CSD_CCC_SWITCH) == 0)) - { - return SDMMC_ERR_NOT_SUPPORTED; - } - - if (group == 0 || - group > SD_SFUNC_GROUP_MAX || - function > SD_SFUNC_FUNC_MAX) - { - return SDMMC_ERR_INVALID_ARG; - } - - if (mode > 1) - { - return SDMMC_ERR_INVALID_ARG; - } - - uint32_t group_shift = (group - 1) << 2; - /* all functions which should not be affected are set to 0xf (no change) */ - uint32_t other_func_mask = (0x00ffffff & ~(0xf << group_shift)); - uint32_t func_val = (function << group_shift) | other_func_mask; - - sdmmc_command_t cmd = { - .opcode = MMC_SWITCH, - .flags = SCF_CMD_ADTC | SCF_CMD_READ | SCF_RSP_R1, - .blklen = sizeof(sdmmc_switch_func_rsp_t), - .data = resp->data, - .datalen = sizeof(sdmmc_switch_func_rsp_t), - .arg = (!!mode << 31) | func_val}; - - sdmmc_err_t err = sdmmc_send_cmd(card, &cmd); - if (err != SDMMC_OK) - { - SDMMC_LOGE(TAG, "%s: sdmmc_send_cmd returned 0x%x", __func__, err); - return err; - } - sdmmc_flip_byte_order(resp->data, sizeof(sdmmc_switch_func_rsp_t)); - uint32_t resp_ver = SD_SFUNC_VER(resp->data); - if (resp_ver == 0) - { - /* busy response is never sent */ - } - else if (resp_ver == 1) - { - if (SD_SFUNC_BUSY(resp->data, group) & (1 << function)) - { - SDMMC_LOGD(TAG, "%s: response indicates function %d:%d is busy", - __func__, group, function); - return SDMMC_ERR_INVALID_STATE; - } - } - else - { - SDMMC_LOGE(TAG, "%s: got an invalid version of SWITCH_FUNC response: 0x%02x", - __func__, resp_ver); - return SDMMC_ERR_INVALID_RESPONSE; - } - return SDMMC_OK; -} - -sdmmc_err_t sdmmc_enable_hs_mode(sdmmc_card_t *card) -{ - /* This will determine if the card supports SWITCH_FUNC command, - * and high speed mode. If the cards supports both, this will enable - * high speed mode at the card side. - */ - if (card->scr.sd_spec < SCR_SD_SPEC_VER_1_10 || - ((card->csd.card_command_class & SD_CSD_CCC_SWITCH) == 0)) - { - return SDMMC_ERR_NOT_SUPPORTED; - } - sdmmc_switch_func_rsp_t *response = (sdmmc_switch_func_rsp_t *) - sdmmc_port_align_malloc(sizeof(*response), TRUE); - if (response == NULL) - { - return SDMMC_ERR_NO_MEM; - } - - sdmmc_err_t err = sdmmc_send_cmd_switch_func(card, 0, SD_ACCESS_MODE, 0, response); - if (err != SDMMC_OK) - { - SDMMC_LOGD(TAG, "%s: sdmmc_send_cmd_switch_func (1) returned 0x%x", __func__, err); - goto out; - } - uint32_t supported_mask = SD_SFUNC_SUPPORTED(response->data, 1); - if ((supported_mask & BIT(SD_ACCESS_MODE_SDR25)) == 0) - { - err = SDMMC_ERR_NOT_SUPPORTED; - goto out; - } - err = sdmmc_send_cmd_switch_func(card, 1, SD_ACCESS_MODE, SD_ACCESS_MODE_SDR25, response); - if (err != SDMMC_OK) - { - SDMMC_LOGD(TAG, "%s: sdmmc_send_cmd_switch_func (2) returned 0x%x", __func__, err); - goto out; - } - -out: - sdmmc_port_align_free(response); - return err; -} - -sdmmc_err_t sdmmc_enable_hs_mode_and_check(sdmmc_card_t *card) -{ - /* All cards should support at least default speed */ - card->max_freq_khz = SDMMC_FREQ_DEFAULT; - if (card->host.max_freq_khz <= card->max_freq_khz) - { - /* Host is configured to use low frequency, don't attempt to switch */ - card->max_freq_khz = card->host.max_freq_khz; - return SDMMC_OK; - } - - /* Try to enabled HS mode */ - sdmmc_err_t err = sdmmc_enable_hs_mode(card); - if (err != SDMMC_OK) - { - return err; - } - /* HS mode has been enabled on the card. - * Read CSD again, it should now indicate that the card supports - * 50MHz clock. - * Since SEND_CSD is allowed only in standby mode, and the card is currently in data transfer - * mode, deselect the card first, then get the CSD, then select the card again. This step is - * not required in SPI mode, since CMD7 (select_card) is not supported. - */ - const bool is_spi = host_is_spi(card); - if (!is_spi) - { - err = sdmmc_send_cmd_select_card(card, 0); - if (err != SDMMC_OK) - { - SDMMC_LOGE(TAG, "%s: select_card (1) returned 0x%x", __func__, err); - return err; - } - } - err = sdmmc_send_cmd_send_csd(card, &card->csd); - if (err != SDMMC_OK) - { - SDMMC_LOGE(TAG, "%s: send_csd returned 0x%x", __func__, err); - return err; - } - if (!is_spi) - { - err = sdmmc_send_cmd_select_card(card, card->rca); - if (err != SDMMC_OK) - { - SDMMC_LOGE(TAG, "%s: select_card (2) returned 0x%x", __func__, err); - return err; - } - } - - if (card->csd.tr_speed != 50000000) - { - SDMMC_LOGW(TAG, "unexpected: after enabling HS mode, tr_speed=%d", card->csd.tr_speed); - return SDMMC_ERR_NOT_SUPPORTED; - } - - card->max_freq_khz = SDMMC_FREQ_HIGHSPEED; - return SDMMC_OK; -} - -sdmmc_err_t sdmmc_check_scr(sdmmc_card_t *card) -{ - /* If frequency switch has been performed, read SCR register one more time - * and compare the result with the previous one. Use this simple check as - * an indicator of potential signal integrity issues. - */ - sdmmc_scr_t scr_tmp; - sdmmc_err_t err = sdmmc_send_cmd_send_scr(card, &scr_tmp); - if (err != SDMMC_OK) - { - SDMMC_LOGE(TAG, "%s: send_scr returned 0x%x", __func__, err); - return err; - } - if (memcmp(&card->scr, &scr_tmp, sizeof(scr_tmp)) != 0) - { - SDMMC_LOGE(TAG, "got corrupted data after increasing clock frequency"); - return SDMMC_ERR_INVALID_RESPONSE; - } - return SDMMC_OK; -} - -sdmmc_err_t sdmmc_init_spi_crc(sdmmc_card_t *card) -{ - /* In SD mode, CRC checks of data transfers are mandatory and performed - * by the hardware. In SPI mode, CRC16 of data transfers is optional and - * needs to be enabled. - */ - SDMMC_ASSERT(host_is_spi(card)); - sdmmc_err_t err = sdmmc_send_cmd_crc_on_off(card, true); - if (err != SDMMC_OK) - { - SDMMC_LOGE(TAG, "%s: sdmmc_send_cmd_crc_on_off returned 0x%x", __func__, err); - return err; - } - return SDMMC_OK; -} - -sdmmc_err_t sdmmc_decode_cid(sdmmc_response_t resp, sdmmc_cid_t *out_cid) -{ - out_cid->mfg_id = SD_CID_MID(resp); - out_cid->oem_id = SD_CID_OID(resp); - SD_CID_PNM_CPY(resp, out_cid->name); - out_cid->revision = SD_CID_REV(resp); - out_cid->serial = SD_CID_PSN(resp); - out_cid->date = SD_CID_MDT(resp); - return SDMMC_OK; -} - -sdmmc_err_t sdmmc_decode_csd(sdmmc_response_t response, sdmmc_csd_t *out_csd) -{ - out_csd->csd_ver = SD_CSD_CSDVER(response); - switch (out_csd->csd_ver) - { - case SD_CSD_CSDVER_2_0: - out_csd->capacity = SD_CSD_V2_CAPACITY(response); - out_csd->read_block_len = SD_CSD_V2_BL_LEN; - break; - case SD_CSD_CSDVER_1_0: - out_csd->capacity = SD_CSD_CAPACITY(response); - out_csd->read_block_len = SD_CSD_READ_BL_LEN(response); - break; - default: - SDMMC_LOGE(TAG, "unknown SD CSD structure version 0x%x", out_csd->csd_ver); - return SDMMC_ERR_NOT_SUPPORTED; - } - out_csd->card_command_class = SD_CSD_CCC(response); - int read_bl_size = 1 << out_csd->read_block_len; - out_csd->sector_size = min(read_bl_size, 512); - if (out_csd->sector_size < read_bl_size) - { - out_csd->capacity *= read_bl_size / out_csd->sector_size; - } - int speed = SD_CSD_SPEED(response); - if (speed == SD_CSD_SPEED_50_MHZ) - { - out_csd->tr_speed = 50000000; - } - else - { - out_csd->tr_speed = 25000000; - } - return SDMMC_OK; -} - -sdmmc_err_t sdmmc_decode_scr(uint32_t *raw_scr, sdmmc_scr_t *out_scr) -{ - sdmmc_response_t resp = {0}; - resp[1] = __builtin_bswap32(raw_scr[0]); - resp[0] = __builtin_bswap32(raw_scr[1]); - int ver = SCR_STRUCTURE(resp); - if (ver != 0) - { - SDMMC_LOGE(TAG, "decode scr failed at %s raw_scr: 0x%x ver: 0x%x", - __func__, *raw_scr, ver); - return SDMMC_ERR_NOT_SUPPORTED; - } - out_scr->sd_spec = SCR_SD_SPEC(resp); - out_scr->bus_width = SCR_SD_BUS_WIDTHS(resp); - SDMMC_LOGD(TAG, "sd spec: 0x%x, bus width: %d", out_scr->sd_spec, out_scr->bus_width); - return SDMMC_OK; -} - -sdmmc_err_t sdmmc_init_switch_hs(sdmmc_card_t *card) -{ - return sdmmc_send_cmd_switch(card); -} \ No newline at end of file diff --git a/third-party/sfud-1.1.0/ports/fqspi/fqspi_sfud_core.c b/third-party/sfud-1.1.0/ports/fqspi/fqspi_sfud_core.c index 2c2fd2f21e68248a1898ae01d8b4f0c7bd62d29e..d647d92a06672c12ca4b98b10ace96734680081c 100644 --- a/third-party/sfud-1.1.0/ports/fqspi/fqspi_sfud_core.c +++ b/third-party/sfud-1.1.0/ports/fqspi/fqspi_sfud_core.c @@ -44,13 +44,13 @@ typedef struct static FQspiSfudOs sfud_instance = { - .id = FQSPI_INSTANCE_0, + .id = FQSPI0_ID, .os_qspi_p = NULL, .cs = FQSPI_CS_0, .is_inited = FALSE }; -static FQspiSfudOs fqspi_sfud_os[FQSPI_INSTANCE_NUM] = {0} ; +static FQspiSfudOs fqspi_sfud_os[FQSPI_NUM] = {0} ; #ifdef SFUD_USING_QSPI diff --git a/third-party/third-party.mk b/third-party/third-party.mk index fcf058cce87108c7f320f1285317c75beedd8e51..330a5e28e2b2f5e5453f96600f3fecbd6059de2c 100644 --- a/third-party/third-party.mk +++ b/third-party/third-party.mk @@ -9,6 +9,8 @@ SRC_DIR += $(THIRD_PARTY_CUR_DIR)/freertos/portable/MemMang SRC_DIR += $(THIRD_PARTY_CUR_DIR)/freertos/portable SRC_DIR += $(THIRD_PARTY_CUR_DIR)/freertos +INC_DIR += $(THIRD_PARTY_CUR_DIR)/freertos/portable/GCC/ft_platform + ifdef CONFIG_TARGET_ARMV8_AARCH64 SRC_DIR += $(THIRD_PARTY_CUR_DIR)/freertos/portable/GCC/ft_platform/aarch64 INC_DIR += $(THIRD_PARTY_CUR_DIR)/freertos/portable/GCC/ft_platform/aarch64 @@ -145,6 +147,11 @@ ifdef CONFIG_USE_FATFS endif endif #CONFIG_USE_FATFS +ifdef CONFIG_USE_FATFS_0_1_4 + +include $(THIRD_PARTY_CUR_DIR)/fatfs-0.1.4/fatfs.mk + +endif #CONFIG_USE_FATFS_0_1_4 ifdef CONFIG_USE_SFUD @@ -219,18 +226,8 @@ ifdef CONFIG_USE_SDMMC_CMD $(shell export PATH=$(THIRD_PARTY_CUR_DIR)/sdmmc-1.0:$PATH) - INC_DIR += $(THIRD_PARTY_CUR_DIR)/sdmmc-1.0 \ - $(THIRD_PARTY_CUR_DIR)/sdmmc-1.0/inc \ - $(THIRD_PARTY_CUR_DIR)/sdmmc-1.0/src - SRC_DIR += $(THIRD_PARTY_CUR_DIR)/sdmmc-1.0 \ - $(THIRD_PARTY_CUR_DIR)/sdmmc-1.0/src - - ifdef CONFIG_SDMMC_PORT_FSDIO - INC_DIR += $(THIRD_PARTY_CUR_DIR)/sdmmc-1.0/port \ - $(THIRD_PARTY_CUR_DIR)/sdmmc-1.0/port/fsdio - SRC_DIR += $(THIRD_PARTY_CUR_DIR)/sdmmc-1.0/port \ - $(THIRD_PARTY_CUR_DIR)/sdmmc-1.0/port/fsdio - endif #CONFIG_SDMMC_PORT_FSDIO +include $(THIRD_PARTY_CUR_DIR)/sdmmc-1.0/sdmmc.mk + endif #CONFIG_USE_SDMMC_CMD ifdef CONFIG_USE_CHERRY_USB