diff --git a/bsp/nuvoton/libraries/m031/rtt_port/drv_i2c.c b/bsp/nuvoton/libraries/m031/rtt_port/drv_i2c.c index e507ca6cbe..7487414dec 100644 --- a/bsp/nuvoton/libraries/m031/rtt_port/drv_i2c.c +++ b/bsp/nuvoton/libraries/m031/rtt_port/drv_i2c.c @@ -90,7 +90,7 @@ static rt_err_t nu_i2c_bus_control(struct rt_i2c_bus_device *bus, rt_uint32_t u3 RT_ASSERT(bus != RT_NULL); nu_i2c = (nu_i2c_bus_t *) bus; - switch (RT_I2C_DEV_CTRL_CLK) + switch (u32Cmd) { case RT_I2C_DEV_CTRL_CLK: I2C_SetBusClockFreq(nu_i2c->I2C, u32Value); diff --git a/bsp/nuvoton/libraries/m2354/rtt_port/drv_can.c b/bsp/nuvoton/libraries/m2354/rtt_port/drv_can.c index 614705fcc5..511fb592a2 100644 --- a/bsp/nuvoton/libraries/m2354/rtt_port/drv_can.c +++ b/bsp/nuvoton/libraries/m2354/rtt_port/drv_can.c @@ -7,6 +7,7 @@ * Change Logs: * Date Author Notes * 2020-6-22 ChingI First version +* 2022-1-8 Wayne Fix IE issue * ******************************************************************************/ @@ -42,7 +43,7 @@ enum #if defined(BSP_USING_CAN0) CAN0_IDX, #endif - CAN_CNT, + CAN_CNT }; /* Private Typedef --------------------------------------------------------------*/ @@ -50,9 +51,10 @@ struct nu_can { struct rt_can_device dev; char *name; - CAN_T *can_base; - uint32_t can_rst; - IRQn_Type can_irq_n; + CAN_T *base; + IRQn_Type irqn; + uint32_t rstidx; + uint32_t int_flag; }; typedef struct nu_can *nu_can_t; @@ -68,12 +70,11 @@ static struct nu_can nu_can_arr[] = #if defined(BSP_USING_CAN0) { .name = "can0", - .can_base = CAN0, - .can_rst = CAN0_RST, - .can_irq_n = CAN0_IRQn, + .base = CAN0, + .rstidx = CAN0_RST, + .irqn = CAN0_IRQn, }, #endif - {0} }; /* struct nu_can */ /* Public functions ------------------------------------------------------------*/ @@ -106,266 +107,271 @@ void CAN0_IRQHandler(void) /* Private Variables ------------------------------------------------------------*/ -static void nu_can_isr(nu_can_t can) +static void nu_can_isr(nu_can_t psNuCAN) { - uint32_t u32IIDRstatus; /* Get base address of CAN register */ - CAN_T *can_base = ((nu_can_t)can)->can_base; + CAN_T *base = psNuCAN->base; /* Get interrupt event */ - u32IIDRstatus = CAN_GET_INT_PENDING_STATUS(can_base); + uint32_t u32IIDRstatus = CAN_GET_INT_PENDING_STATUS(base) & CAN_IIDR_INTID_Msk; - if (u32IIDRstatus == 0x00008000) /* Check Status Interrupt Flag (Error status Int and Status change Int) */ + /* Check Status Interrupt Flag (Error status Int and Status change Int) */ + if (u32IIDRstatus == 0x00008000) { /**************************/ /* Status Change interrupt*/ /**************************/ - if (can_base->STATUS & CAN_STATUS_TXOK_Msk) + if (base->STATUS & CAN_STATUS_TXOK_Msk) { - can_base->STATUS &= ~CAN_STATUS_TXOK_Msk; /* Clear Tx Ok status*/ + base->STATUS &= ~CAN_STATUS_TXOK_Msk; /* Clear Tx Ok status*/ #ifndef RT_CAN_USING_HDR - /* Using as Lisen,Loopback,Loopback+Lisen mode*/ - rt_hw_can_isr(&can->dev, RT_CAN_EVENT_TX_DONE); + if (psNuCAN->int_flag & RT_DEVICE_FLAG_INT_TX) + { + /*Using as Lisen,Loopback,Loopback+Lisen mode*/ + rt_hw_can_isr(&psNuCAN->dev, RT_CAN_EVENT_TX_DONE); + } #endif - //rt_kprintf("[%s]TX OK INT\n", can->name) ; } - if (can_base->STATUS & CAN_STATUS_RXOK_Msk) + if (base->STATUS & CAN_STATUS_RXOK_Msk) { - can_base->STATUS &= ~CAN_STATUS_RXOK_Msk; /* Clear Rx Ok status*/ + base->STATUS &= ~CAN_STATUS_RXOK_Msk; /* Clear Rx Ok status*/ #ifndef RT_CAN_USING_HDR - /* Using as Lisen,Loopback,Loopback+Lisen mode*/ - rt_hw_can_isr(&can->dev, RT_CAN_EVENT_RX_IND); + if (psNuCAN->int_flag & RT_DEVICE_FLAG_INT_RX) + { + /*Using as Lisen,Loopback,Loopback+Lisen mode*/ + rt_hw_can_isr(&psNuCAN->dev, RT_CAN_EVENT_RX_IND); + } #endif - //rt_kprintf("[%s]RX OK INT\n", can->name) ; } /**************************/ /* Error Status interrupt */ /**************************/ - if (can_base->STATUS & CAN_STATUS_EWARN_Msk) + if (base->STATUS & CAN_STATUS_EWARN_Msk) { - rt_kprintf("[%s]EWARN INT\n", can->name) ; + rt_kprintf("[%s]EWARN INT\n", psNuCAN->name) ; } - if (can_base->STATUS & CAN_STATUS_BOFF_Msk) + if (base->STATUS & CAN_STATUS_BOFF_Msk) { - rt_kprintf("[%s]BUSOFF INT\n", can->name) ; + rt_kprintf("[%s]BUSOFF INT\n", psNuCAN->name) ; - /* Do Init to release busoff pin */ - can_base->CON = (CAN_CON_INIT_Msk | CAN_CON_CCE_Msk); - can_base->CON &= (~(CAN_CON_INIT_Msk | CAN_CON_CCE_Msk)); - while (can_base->CON & CAN_CON_INIT_Msk); + /* To release busoff pin */ + CAN_EnterInitMode(base, CAN_CON_INIT_Msk | CAN_CON_CCE_Msk); + CAN_LeaveInitMode(base); } + + if (base->STATUS & CAN_STATUS_LEC_Msk) + { + rt_kprintf("[%s] Last Error Code %03x\n", psNuCAN->name, base->STATUS & CAN_STATUS_LEC_Msk) ; + } + } #ifdef RT_CAN_USING_HDR /*IntId: 0x0001-0x0020, Number of Message Object which caused the interrupt.*/ else if (u32IIDRstatus > 0 && u32IIDRstatus <= 32) { - /*Message RAM 0~RX_MSG_ID_INDEX for CAN Tx using*/ - if (u32IIDRstatus <= RX_MSG_ID_INDEX) + if ((psNuCAN->int_flag & RT_DEVICE_FLAG_INT_TX) && + (u32IIDRstatus <= RX_MSG_ID_INDEX)) { - //rt_kprintf("[%s-Tx]IntId = %d\n", can->name, u32IIDRstatus); - rt_hw_can_isr(&can->dev, RT_CAN_EVENT_TX_DONE); + /*Message RAM 0~RX_MSG_ID_INDEX for CAN Tx using*/ + rt_hw_can_isr(&psNuCAN->dev, RT_CAN_EVENT_TX_DONE); } - else /*Message RAM RX_MSG_ID_INDEX~31 for CAN Rx using*/ + else if (psNuCAN->int_flag & RT_DEVICE_FLAG_INT_RX) { - //rt_kprintf("[%s-Rx]IntId = %d\n", can->name, u32IIDRstatus); - rt_hw_can_isr(&can->dev, (RT_CAN_EVENT_RX_IND | ((u32IIDRstatus - 1) << 8))); + /*Message RAM RX_MSG_ID_INDEX~31 for CAN Rx using*/ + rt_hw_can_isr(&psNuCAN->dev, (RT_CAN_EVENT_RX_IND | ((u32IIDRstatus - 1) << 8))); } - CAN_CLR_INT_PENDING_BIT(can_base, (u32IIDRstatus - 1)); /* Clear Interrupt Pending */ + CAN_CLR_INT_PENDING_BIT(base, (u32IIDRstatus - 1)); /* Clear Interrupt Pending */ } #endif - } +static void nu_can_ie(nu_can_t psNuCAN) +{ + uint32_t u32CanIE = CAN_CON_IE_Msk; + + if (psNuCAN->int_flag & (RT_DEVICE_FLAG_INT_RX | RT_DEVICE_FLAG_INT_TX)) + { + u32CanIE |= CAN_CON_SIE_Msk; + } + else + { + u32CanIE &= ~CAN_CON_SIE_Msk; + } + + if (psNuCAN->int_flag & RT_DEVICE_CAN_INT_ERR) + { + u32CanIE |= CAN_CON_EIE_Msk; + } + else + { + u32CanIE &= ~CAN_CON_EIE_Msk; + } + + if (u32CanIE & (CAN_CON_SIE_Msk | CAN_CON_EIE_Msk)) + { + CAN_EnableInt(psNuCAN->base, u32CanIE); + + /* Enable interrupt. */ + NVIC_EnableIRQ(psNuCAN->irqn); + } + else + { + u32CanIE |= (CAN_CON_IE_Msk | CAN_CON_SIE_Msk); + CAN_DisableInt(psNuCAN->base, u32CanIE); + + /* Disable interrupt. */ + NVIC_DisableIRQ(psNuCAN->irqn); + } +} static rt_err_t nu_can_configure(struct rt_can_device *can, struct can_configure *cfg) { + nu_can_t psNuCAN = (nu_can_t)can; + uint32_t u32CANMode; - RT_ASSERT(can != RT_NULL); - RT_ASSERT(cfg != RT_NULL); + RT_ASSERT(can); + RT_ASSERT(cfg); /* Get base address of CAN register */ - CAN_T *can_base = ((nu_can_t)can)->can_base; - - RT_ASSERT(can_base != RT_NULL); + CAN_T *base = psNuCAN->base; /* Reset this module */ - SYS_ResetModule(((nu_can_t)can)->can_rst); + SYS_ResetModule(psNuCAN->rstidx); - switch (cfg->mode) - { - /* CAN default Normal mode */ - case RT_CAN_MODE_NORMAL: - can->config.mode = CAN_NORMAL_MODE; - break; - case RT_CAN_MODE_LISEN: - can->config.mode = RT_CAN_MODE_LISEN; - break; - case RT_CAN_MODE_LOOPBACK: - can->config.mode = RT_CAN_MODE_LOOPBACK; - break; - case RT_CAN_MODE_LOOPBACKANLISEN: - can->config.mode = RT_CAN_MODE_LOOPBACKANLISEN; - break; - default: - rt_kprintf("Unsupported Operating mode"); - goto exit_nu_can_configure; - } + u32CANMode = (cfg->mode == RT_CAN_MODE_NORMAL) ? CAN_NORMAL_MODE : CAN_BASIC_MODE; /*Set the CAN Bit Rate and Operating mode*/ - if (CAN_Open(can_base, can->config.baud_rate, can->config.mode) < 1) - return -(RT_ERROR); - + if (CAN_Open(base, cfg->baud_rate, u32CANMode) != cfg->baud_rate) + goto exit_nu_can_configure; switch (cfg->mode) { - /* CAN default Normal mode */ case RT_CAN_MODE_NORMAL: #ifdef RT_CAN_USING_HDR - CAN_LeaveTestMode(can_base); + CAN_LeaveTestMode(base); #else - CAN_EnterTestMode(can_base, CAN_TEST_BASIC_Msk); + CAN_EnterTestMode(base, CAN_TEST_BASIC_Msk); #endif break; case RT_CAN_MODE_LISEN: - CAN_EnterTestMode(can_base, CAN_TEST_BASIC_Msk | CAN_TEST_SILENT_Msk); + CAN_EnterTestMode(base, CAN_TEST_BASIC_Msk | CAN_TEST_SILENT_Msk); break; case RT_CAN_MODE_LOOPBACK: - CAN_EnterTestMode(can_base, CAN_TEST_BASIC_Msk | CAN_TEST_LBACK_Msk); + CAN_EnterTestMode(base, CAN_TEST_BASIC_Msk | CAN_TEST_LBACK_Msk); break; case RT_CAN_MODE_LOOPBACKANLISEN: - CAN_EnterTestMode(can_base, CAN_TEST_BASIC_Msk | CAN_TEST_SILENT_Msk | CAN_TEST_LBACK_Msk); + CAN_EnterTestMode(base, CAN_TEST_BASIC_Msk | CAN_TEST_SILENT_Msk | CAN_TEST_LBACK_Msk); break; default: rt_kprintf("Unsupported Operating mode"); goto exit_nu_can_configure; } + nu_can_ie(psNuCAN); return RT_EOK; exit_nu_can_configure: - CAN_Close(can_base); + CAN_Close(base); return -(RT_ERROR); } static rt_err_t nu_can_control(struct rt_can_device *can, int cmd, void *arg) { - rt_uint32_t argval; + rt_uint32_t argval = (rt_uint32_t)arg; + nu_can_t psNuCAN = (nu_can_t)can; -#ifdef RT_CAN_USING_HDR - struct rt_can_filter_config *filter_cfg; -#endif - /* Get base address of CAN register */ - CAN_T *can_base = ((nu_can_t)can)->can_base; - - RT_ASSERT(can_base != RT_NULL); - /* Check baud rate */ - RT_ASSERT(can->config.baud_rate != 0); + RT_ASSERT(can); switch (cmd) { - case RT_DEVICE_CTRL_CLR_INT: - argval = (rt_uint32_t) arg; - if ((argval == RT_DEVICE_FLAG_INT_RX) || (argval == RT_DEVICE_FLAG_INT_TX)) - { - /* Disable NVIC interrupt. */ - NVIC_DisableIRQ(((nu_can_t)can)->can_irq_n); - /* Disable Status Change Interrupt */ - CAN_DisableInt(can_base, CAN_CON_IE_Msk | CAN_CON_SIE_Msk); - - } - else if (argval == RT_DEVICE_CAN_INT_ERR) - { - /* Disable NVIC interrupt. */ - NVIC_DisableIRQ(((nu_can_t)can)->can_irq_n); - /* Disable Error Interrupt */ - CAN_DisableInt(can_base, CAN_CON_EIE_Msk); - } - break; - case RT_DEVICE_CTRL_SET_INT: - argval = (rt_uint32_t) arg; - if (argval == RT_DEVICE_FLAG_INT_RX || (argval == RT_DEVICE_FLAG_INT_TX)) - { - /* Enable Status Change Interrupt */ - CAN_EnableInt(can_base, CAN_CON_IE_Msk | CAN_CON_SIE_Msk); - /* Enable NVIC interrupt. */ - NVIC_EnableIRQ(((nu_can_t)can)->can_irq_n); - - } - else if (argval == RT_DEVICE_CAN_INT_ERR) - { - /* Enable Error Status and Status Change Interrupt */ - CAN_EnableInt(can_base, CAN_CON_IE_Msk | CAN_CON_SIE_Msk | CAN_CON_EIE_Msk); - /* Enable NVIC interrupt. */ - NVIC_EnableIRQ(((nu_can_t)can)->can_irq_n); - } + psNuCAN->int_flag |= argval; + nu_can_ie(psNuCAN); + break; + + case RT_DEVICE_CTRL_CLR_INT: + psNuCAN->int_flag &= ~argval; + nu_can_ie(psNuCAN); break; -#ifdef RT_CAN_USING_HDR case RT_CAN_CMD_SET_FILTER: - filter_cfg = (struct rt_can_filter_config *)arg; + { + struct rt_can_filter_config *filter_cfg = (struct rt_can_filter_config *)arg; for (int i = 0; i < filter_cfg->count; i++) { - /*set the filter message object*/ if (filter_cfg->items[i].mode == 1) { - if (CAN_SetRxMsgObjAndMsk(can_base, MSG(filter_cfg->items[i].hdr + RX_MSG_ID_INDEX), filter_cfg->items[i].ide, filter_cfg->items[i].id, filter_cfg->items[i].mask, FALSE) == FALSE) + if (CAN_SetRxMsgObjAndMsk(psNuCAN->base, MSG(filter_cfg->items[i].hdr + RX_MSG_ID_INDEX), filter_cfg->items[i].ide, filter_cfg->items[i].id, filter_cfg->items[i].mask, FALSE) == FALSE) { return -(RT_ERROR); } } else - { /*set the filter message object*/ - if (CAN_SetRxMsgAndMsk(can_base, MSG(filter_cfg->items[i].hdr + RX_MSG_ID_INDEX), filter_cfg->items[i].ide, filter_cfg->items[i].id, filter_cfg->items[i].mask) == FALSE) + if (CAN_SetRxMsgAndMsk(psNuCAN->base, MSG(filter_cfg->items[i].hdr + RX_MSG_ID_INDEX), filter_cfg->items[i].ide, filter_cfg->items[i].id, filter_cfg->items[i].mask) == FALSE) { return -(RT_ERROR); } } } - break; -#endif + } + break; case RT_CAN_CMD_SET_MODE: - argval = (rt_uint32_t) arg; - if (argval != RT_CAN_MODE_NORMAL && argval != RT_CAN_MODE_LISEN && - argval != RT_CAN_MODE_LOOPBACK && argval != RT_CAN_MODE_LOOPBACKANLISEN) + if ((argval == RT_CAN_MODE_NORMAL) || + (argval == RT_CAN_MODE_LISEN) || + (argval == RT_CAN_MODE_LOOPBACK) || + (argval == RT_CAN_MODE_LOOPBACKANLISEN)) + { + if (argval != can->config.mode) + { + can->config.mode = argval; + return nu_can_configure(can, &can->config); + } + } + else { return -(RT_ERROR); } - if (argval != can->config.mode) - { - can->config.mode = argval; - return nu_can_configure(can, &can->config); - } break; case RT_CAN_CMD_SET_BAUD: - argval = (rt_uint32_t) arg; - if (argval != CAN1MBaud && argval != CAN800kBaud && argval != CAN500kBaud && argval != CAN250kBaud && - argval != CAN125kBaud && argval != CAN100kBaud && argval != CAN50kBaud && argval != CAN20kBaud && argval != CAN10kBaud) + { + if ((argval == CAN1MBaud) || + (argval == CAN800kBaud) || + (argval == CAN500kBaud) || + (argval == CAN250kBaud) || + (argval == CAN125kBaud) || + (argval == CAN100kBaud) || + (argval == CAN50kBaud) || + (argval == CAN20kBaud) || + (argval == CAN10kBaud)) + { + if (argval != can->config.baud_rate) + { + can->config.baud_rate = argval; + return nu_can_configure(can, &can->config); + } + } + else { return -(RT_ERROR); } - if (argval != can->config.baud_rate) - { - can->config.baud_rate = argval; - return nu_can_configure(can, &can->config); - } - break; + } + break; case RT_CAN_CMD_SET_PRIV: - argval = (rt_uint32_t) arg; - if (argval != RT_CAN_MODE_PRIV && argval != RT_CAN_MODE_NOPRIV) + if (argval != RT_CAN_MODE_PRIV && + argval != RT_CAN_MODE_NOPRIV) { return -(RT_ERROR); } @@ -375,20 +381,29 @@ static rt_err_t nu_can_control(struct rt_can_device *can, int cmd, void *arg) return nu_can_configure(can, &can->config); } break; + case RT_CAN_CMD_GET_STATUS: { - rt_uint32_t errtype; - errtype = can_base->ERR; - /*Receive Error Counter*/ + rt_uint32_t errtype = psNuCAN->base->ERR; + + RT_ASSERT(arg); + + /*Receive Error Counter, return value is with Receive Error Passive.*/ can->status.rcverrcnt = (errtype >> 8); + /*Transmit Error Counter*/ - can->status.snderrcnt = ((errtype >> 24) & 0xFF); - can->status.lasterrtype = CAN_GET_INT_STATUS(can_base) & 0x8000; - /*status error code*/ - can->status.errcode = CAN_GET_INT_STATUS(can_base) & 0x07; - rt_memcpy(arg, &can->status, sizeof(can->status)); + can->status.snderrcnt = (errtype & 0xFF); + + /*Last Error Type*/ + can->status.lasterrtype = CAN_GET_INT_STATUS(psNuCAN->base) & 0x8000; + + /*Status error code*/ + can->status.errcode = CAN_GET_INT_STATUS(psNuCAN->base) & 0x07; + + rt_memcpy(arg, &can->status, sizeof(struct rt_can_status)); } break; + default: return -(RT_EINVAL); @@ -400,61 +415,91 @@ static rt_err_t nu_can_control(struct rt_can_device *can, int cmd, void *arg) static int nu_can_sendmsg(struct rt_can_device *can, const void *buf, rt_uint32_t boxno) { STR_CANMSG_T tMsg; - struct rt_can_msg *pmsg = (struct rt_can_msg *) buf; - /* Get base address of CAN register */ - CAN_T *can_base = ((nu_can_t)can)->can_base; + struct rt_can_msg *pmsg; + nu_can_t psNuCAN = (nu_can_t)can; - RT_ASSERT(can_base != RT_NULL); - RT_ASSERT(buf != RT_NULL); - /* Check the parameters */ - RT_ASSERT(IS_CAN_DLC(pmsg->len)); - /* Standard ID (11 bits)*/ - if (pmsg->ide == RT_CAN_STDID) + RT_ASSERT(can); + RT_ASSERT(buf); + + pmsg = (struct rt_can_msg *) buf; + + if (pmsg->ide == RT_CAN_STDID && IS_CAN_STDID(pmsg->id)) { + /* Standard ID (11 bits)*/ tMsg.IdType = CAN_STD_ID; - RT_ASSERT(IS_CAN_STDID(pmsg->id)) tMsg.Id = pmsg->id ; } - else + else if (pmsg->ide == RT_CAN_EXTID && IS_CAN_EXTID(pmsg->id)) { /* Extended ID (29 bits)*/ tMsg.IdType = CAN_EXT_ID; - RT_ASSERT(IS_CAN_EXTID(pmsg->id)); tMsg.Id = pmsg->id ; } + else + { + goto exit_nu_can_sendmsg; + } if (pmsg->rtr == RT_CAN_DTR) { /* Data frame */ tMsg.FrameType = CAN_DATA_FRAME; } - else + else if (pmsg->rtr == RT_CAN_RTR) { /* Remote frame */ tMsg.FrameType = CAN_REMOTE_FRAME; } - tMsg.DLC = pmsg->len; - rt_memcpy(tMsg.Data, pmsg->data, pmsg->len); - - if (CAN_Transmit(can_base, MSG(boxno), &tMsg) == FALSE) // Configure Msg RAM and send the Msg in the RAM + else { - return -(RT_ERROR); + goto exit_nu_can_sendmsg; + } + + /* Check the parameters */ + if (IS_CAN_DLC(pmsg->len)) + { + tMsg.DLC = pmsg->len; + } + else + { + goto exit_nu_can_sendmsg; + } + + if (pmsg->data && pmsg->len) + { + rt_memcpy(&tMsg.Data[0], pmsg->data, pmsg->len); + } + else + { + goto exit_nu_can_sendmsg; + } + + /* Configure Msg RAM and send the Msg in the RAM. */ + if (CAN_Transmit(psNuCAN->base, MSG(boxno), &tMsg) == FALSE) + { + goto exit_nu_can_sendmsg; } return RT_EOK; + +exit_nu_can_sendmsg: + + return -(RT_ERROR); } + static int nu_can_recvmsg(struct rt_can_device *can, void *buf, rt_uint32_t boxno) { STR_CANMSG_T tMsg; - struct rt_can_msg *pmsg = (struct rt_can_msg *) buf; - /* Get base address of CAN register */ - CAN_T *can_base = ((nu_can_t)can)->can_base; + struct rt_can_msg *pmsg; + nu_can_t psNuCAN = (nu_can_t)can; - RT_ASSERT(can_base != RT_NULL); - RT_ASSERT(buf != RT_NULL); + RT_ASSERT(can); + RT_ASSERT(buf); + + pmsg = (struct rt_can_msg *) buf; /* get data */ - if (CAN_Receive(can_base, boxno, &tMsg) == FALSE) + if (CAN_Receive(psNuCAN->base, boxno, &tMsg) == FALSE) { rt_kprintf("No available RX Msg.\n"); return -(RT_ERROR); @@ -466,32 +511,13 @@ static int nu_can_recvmsg(struct rt_can_device *can, void *buf, rt_uint32_t boxn can->hdr[pmsg->hdr].connected = 1; #endif - /* Standard ID (11 bits)*/ - if (tMsg.IdType == CAN_STD_ID) - { - pmsg->ide = RT_CAN_STDID; - pmsg->id = tMsg.Id; - } - else /* Extended ID (29 bits)*/ - { - pmsg->ide = RT_CAN_EXTID; - pmsg->id = tMsg.Id; - } - - if (tMsg.FrameType == CAN_DATA_FRAME) - { - /* Data frame */ - pmsg->rtr = RT_CAN_DTR; - } - else - { - /* Remote frame */ - pmsg->rtr = RT_CAN_RTR; - } - + pmsg->ide = (tMsg.IdType == CAN_STD_ID) ? RT_CAN_STDID : RT_CAN_EXTID; + pmsg->rtr = (tMsg.FrameType == CAN_DATA_FRAME) ? RT_CAN_DTR : RT_CAN_RTR; + pmsg->id = tMsg.Id; pmsg->len = tMsg.DLC ; - rt_memcpy(pmsg->data, tMsg.Data, pmsg->len); + if (pmsg->data && pmsg->len) + rt_memcpy(pmsg->data, &tMsg.Data[0], pmsg->len); return RT_EOK; } @@ -506,13 +532,12 @@ static int rt_hw_can_init(void) for (i = (CAN_START + 1); i < CAN_CNT; i++) { - - nu_can_arr[i].dev.ops = &nu_can_ops; nu_can_arr[i].dev.config = nu_can_default_config; #ifdef RT_CAN_USING_HDR nu_can_arr[i].dev.config.maxhdr = RT_CANMSG_BOX_SZ; #endif + /* Register can device */ ret = rt_hw_can_register(&nu_can_arr[i].dev, nu_can_arr[i].name, &nu_can_ops, NULL); RT_ASSERT(ret == RT_EOK); } diff --git a/bsp/nuvoton/libraries/m2354/rtt_port/drv_i2c.c b/bsp/nuvoton/libraries/m2354/rtt_port/drv_i2c.c index fbc38e6e2a..30bffc49bf 100644 --- a/bsp/nuvoton/libraries/m2354/rtt_port/drv_i2c.c +++ b/bsp/nuvoton/libraries/m2354/rtt_port/drv_i2c.c @@ -99,7 +99,7 @@ static rt_err_t nu_i2c_bus_control(struct rt_i2c_bus_device *bus, rt_uint32_t u3 RT_ASSERT(bus != RT_NULL); nu_i2c = (nu_i2c_bus_t *) bus; - switch (RT_I2C_DEV_CTRL_CLK) + switch (u32Cmd) { case RT_I2C_DEV_CTRL_CLK: I2C_SetBusClockFreq(nu_i2c->I2C, u32Value); diff --git a/bsp/nuvoton/libraries/m480/Device/Nuvoton/M480/Include/can_reg.h b/bsp/nuvoton/libraries/m480/Device/Nuvoton/M480/Include/can_reg.h index 86340d99d8..b0152f8011 100644 --- a/bsp/nuvoton/libraries/m480/Device/Nuvoton/M480/Include/can_reg.h +++ b/bsp/nuvoton/libraries/m480/Device/Nuvoton/M480/Include/can_reg.h @@ -10,7 +10,7 @@ #define __CAN_REG_H__ #if defined ( __CC_ARM ) -#pragma anon_unions + #pragma anon_unions #endif /** @@ -586,8 +586,8 @@ typedef struct #define CAN_BTIME_TSEG2_Pos (12) /*!< CAN_T::BTIME: TSeg2 Position */ #define CAN_BTIME_TSEG2_Msk (0x7ul << CAN_BTIME_TSEG2_Pos) /*!< CAN_T::BTIME: TSeg2 Mask */ -#define CAN_IIDR_IntId_Pos (0) /*!< CAN_T::IIDR: IntId Position */ -#define CAN_IIDR_IntId_Msk (0xfffful << CAN_IIDR_IntId_Pos) /*!< CAN_T::IIDR: IntId Mask */ +#define CAN_IIDR_INTID_Pos (0) /*!< CAN_T::IIDR: IntId Position */ +#define CAN_IIDR_INTID_Msk (0xfffful << CAN_IIDR_INTID_Pos) /*!< CAN_T::IIDR: IntId Mask */ #define CAN_TEST_BASIC_Pos (2) /*!< CAN_T::TEST: Basic Position */ #define CAN_TEST_BASIC_Msk (0x1ul << CAN_TEST_BASIC_Pos) /*!< CAN_T::TEST: Basic Mask */ @@ -753,7 +753,7 @@ typedef struct /**@}*/ /* end of REGISTER group */ #if defined ( __CC_ARM ) -#pragma no_anon_unions + #pragma no_anon_unions #endif #endif /* __CAN_REG_H__ */ diff --git a/bsp/nuvoton/libraries/m480/rtt_port/drv_can.c b/bsp/nuvoton/libraries/m480/rtt_port/drv_can.c index a667e34979..14926076c3 100644 --- a/bsp/nuvoton/libraries/m480/rtt_port/drv_can.c +++ b/bsp/nuvoton/libraries/m480/rtt_port/drv_can.c @@ -1,12 +1,13 @@ /**************************************************************************//** * -* @copyright (C) 2019 Nuvoton Technology Corp. All rights reserved. +* @copyright (C) 2020 Nuvoton Technology Corp. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes -* 2020-2-07 ChingI First version +* 2020-6-22 ChingI First version +* 2022-1-8 Wayne Fix IE issue * ******************************************************************************/ @@ -56,9 +57,10 @@ struct nu_can { struct rt_can_device dev; char *name; - CAN_T *can_base; - uint32_t can_rst; - IRQn_Type can_irq_n; + CAN_T *base; + IRQn_Type irqn; + uint32_t rstidx; + uint32_t int_flag; }; typedef struct nu_can *nu_can_t; @@ -74,29 +76,27 @@ static struct nu_can nu_can_arr[] = #if defined(BSP_USING_CAN0) { .name = "can0", - .can_base = CAN0, - .can_rst = CAN0_RST, - .can_irq_n = CAN0_IRQn, + .base = CAN0, + .rstidx = CAN0_RST, + .irqn = CAN0_IRQn, }, #endif #if defined(BSP_USING_CAN1) { .name = "can1", - .can_base = CAN1, - .can_rst = CAN1_RST, - .can_irq_n = CAN1_IRQn, + .base = CAN1, + .rstidx = CAN1_RST, + .irqn = CAN1_IRQn, }, #endif - #if defined(BSP_USING_CAN2) { .name = "can2", - .can_base = CAN2, - .can_rst = CAN2_RST, - .can_irq_n = CAN2_IRQn, + .base = CAN2, + .rstidx = CAN2_RST, + .irqn = CAN2_IRQn, }, #endif - {0} }; /* struct nu_can */ /* Public functions ------------------------------------------------------------*/ @@ -158,267 +158,271 @@ void CAN2_IRQHandler(void) /* Private Variables ------------------------------------------------------------*/ - -static void nu_can_isr(nu_can_t can) +static void nu_can_isr(nu_can_t psNuCAN) { - uint32_t u32IIDRstatus; /* Get base address of CAN register */ - CAN_T *can_base = ((nu_can_t)can)->can_base; + CAN_T *base = psNuCAN->base; /* Get interrupt event */ - u32IIDRstatus = CAN_GET_INT_PENDING_STATUS(can_base); + uint32_t u32IIDRstatus = CAN_GET_INT_PENDING_STATUS(base) & CAN_IIDR_INTID_Msk; - if (u32IIDRstatus == 0x00008000) /* Check Status Interrupt Flag (Error status Int and Status change Int) */ + /* Check Status Interrupt Flag (Error status Int and Status change Int) */ + if (u32IIDRstatus == 0x00008000) { /**************************/ /* Status Change interrupt*/ /**************************/ - if (can_base->STATUS & CAN_STATUS_TXOK_Msk) + if (base->STATUS & CAN_STATUS_TXOK_Msk) { - can_base->STATUS &= ~CAN_STATUS_TXOK_Msk; /* Clear Tx Ok status*/ + base->STATUS &= ~CAN_STATUS_TXOK_Msk; /* Clear Tx Ok status*/ #ifndef RT_CAN_USING_HDR - /* Using as Lisen,Loopback,Loopback+Lisen mode*/ - rt_hw_can_isr(&can->dev, RT_CAN_EVENT_TX_DONE); + if (psNuCAN->int_flag & RT_DEVICE_FLAG_INT_TX) + { + /*Using as Lisen,Loopback,Loopback+Lisen mode*/ + rt_hw_can_isr(&psNuCAN->dev, RT_CAN_EVENT_TX_DONE); + } #endif - //rt_kprintf("[%s]TX OK INT\n", can->name) ; } - if (can_base->STATUS & CAN_STATUS_RXOK_Msk) + if (base->STATUS & CAN_STATUS_RXOK_Msk) { - can_base->STATUS &= ~CAN_STATUS_RXOK_Msk; /* Clear Rx Ok status*/ + base->STATUS &= ~CAN_STATUS_RXOK_Msk; /* Clear Rx Ok status*/ #ifndef RT_CAN_USING_HDR - /* Using as Lisen,Loopback,Loopback+Lisen mode*/ - rt_hw_can_isr(&can->dev, RT_CAN_EVENT_RX_IND); + if (psNuCAN->int_flag & RT_DEVICE_FLAG_INT_RX) + { + /*Using as Lisen,Loopback,Loopback+Lisen mode*/ + rt_hw_can_isr(&psNuCAN->dev, RT_CAN_EVENT_RX_IND); + } #endif - //rt_kprintf("[%s]RX OK INT\n", can->name) ; } /**************************/ /* Error Status interrupt */ /**************************/ - if (can_base->STATUS & CAN_STATUS_EWARN_Msk) + if (base->STATUS & CAN_STATUS_EWARN_Msk) { - rt_kprintf("[%s]EWARN INT\n", can->name) ; + rt_kprintf("[%s]EWARN INT\n", psNuCAN->name) ; } - if (can_base->STATUS & CAN_STATUS_BOFF_Msk) + if (base->STATUS & CAN_STATUS_BOFF_Msk) { - rt_kprintf("[%s]BUSOFF INT\n", can->name) ; + rt_kprintf("[%s]BUSOFF INT\n", psNuCAN->name) ; - /* Do Init to release busoff pin */ - can_base->CON = (CAN_CON_INIT_Msk | CAN_CON_CCE_Msk); - can_base->CON &= (~(CAN_CON_INIT_Msk | CAN_CON_CCE_Msk)); - while (can_base->CON & CAN_CON_INIT_Msk); + /* To release busoff pin */ + CAN_EnterInitMode(base, CAN_CON_INIT_Msk | CAN_CON_CCE_Msk); + CAN_LeaveInitMode(base); } + + if (base->STATUS & CAN_STATUS_LEC_Msk) + { + rt_kprintf("[%s] Last Error Code %03x\n", psNuCAN->name, base->STATUS & CAN_STATUS_LEC_Msk) ; + } + } #ifdef RT_CAN_USING_HDR /*IntId: 0x0001-0x0020, Number of Message Object which caused the interrupt.*/ else if (u32IIDRstatus > 0 && u32IIDRstatus <= 32) { - /*Message RAM 0~RX_MSG_ID_INDEX for CAN Tx using*/ - if (u32IIDRstatus <= RX_MSG_ID_INDEX) + if ((psNuCAN->int_flag & RT_DEVICE_FLAG_INT_TX) && + (u32IIDRstatus <= RX_MSG_ID_INDEX)) { - //rt_kprintf("[%s-Tx]IntId = %d\n", can->name, u32IIDRstatus); - rt_hw_can_isr(&can->dev, RT_CAN_EVENT_TX_DONE); + /*Message RAM 0~RX_MSG_ID_INDEX for CAN Tx using*/ + rt_hw_can_isr(&psNuCAN->dev, RT_CAN_EVENT_TX_DONE); } - else /*Message RAM RX_MSG_ID_INDEX~31 for CAN Rx using*/ + else if (psNuCAN->int_flag & RT_DEVICE_FLAG_INT_RX) { - //rt_kprintf("[%s-Rx]IntId = %d\n", can->name, u32IIDRstatus); - rt_hw_can_isr(&can->dev, (RT_CAN_EVENT_RX_IND | ((u32IIDRstatus - 1) << 8))); + /*Message RAM RX_MSG_ID_INDEX~31 for CAN Rx using*/ + rt_hw_can_isr(&psNuCAN->dev, (RT_CAN_EVENT_RX_IND | ((u32IIDRstatus - 1) << 8))); } - CAN_CLR_INT_PENDING_BIT(can_base, (u32IIDRstatus - 1)); /* Clear Interrupt Pending */ + CAN_CLR_INT_PENDING_BIT(base, (u32IIDRstatus - 1)); /* Clear Interrupt Pending */ } #endif - } +static void nu_can_ie(nu_can_t psNuCAN) +{ + uint32_t u32CanIE = CAN_CON_IE_Msk; + + if (psNuCAN->int_flag & (RT_DEVICE_FLAG_INT_RX | RT_DEVICE_FLAG_INT_TX)) + { + u32CanIE |= CAN_CON_SIE_Msk; + } + else + { + u32CanIE &= ~CAN_CON_SIE_Msk; + } + + if (psNuCAN->int_flag & RT_DEVICE_CAN_INT_ERR) + { + u32CanIE |= CAN_CON_EIE_Msk; + } + else + { + u32CanIE &= ~CAN_CON_EIE_Msk; + } + + if (u32CanIE & (CAN_CON_SIE_Msk | CAN_CON_EIE_Msk)) + { + CAN_EnableInt(psNuCAN->base, u32CanIE); + + /* Enable interrupt. */ + NVIC_EnableIRQ(psNuCAN->irqn); + } + else + { + u32CanIE |= (CAN_CON_IE_Msk | CAN_CON_SIE_Msk); + CAN_DisableInt(psNuCAN->base, u32CanIE); + + /* Disable interrupt. */ + NVIC_DisableIRQ(psNuCAN->irqn); + } +} static rt_err_t nu_can_configure(struct rt_can_device *can, struct can_configure *cfg) { + nu_can_t psNuCAN = (nu_can_t)can; + uint32_t u32CANMode; - RT_ASSERT(can != RT_NULL); - RT_ASSERT(cfg != RT_NULL); + RT_ASSERT(can); + RT_ASSERT(cfg); /* Get base address of CAN register */ - CAN_T *can_base = ((nu_can_t)can)->can_base; - - RT_ASSERT(can_base != RT_NULL); + CAN_T *base = psNuCAN->base; /* Reset this module */ - SYS_ResetModule(((nu_can_t)can)->can_rst); + SYS_ResetModule(psNuCAN->rstidx); - switch (cfg->mode) - { - /* CAN default Normal mode */ - case RT_CAN_MODE_NORMAL: - can->config.mode = CAN_NORMAL_MODE; - break; - case RT_CAN_MODE_LISEN: - can->config.mode = RT_CAN_MODE_LISEN; - break; - case RT_CAN_MODE_LOOPBACK: - can->config.mode = RT_CAN_MODE_LOOPBACK; - break; - case RT_CAN_MODE_LOOPBACKANLISEN: - can->config.mode = RT_CAN_MODE_LOOPBACKANLISEN; - break; - default: - rt_kprintf("Unsupported Operating mode"); - goto exit_nu_can_configure; - } + u32CANMode = (cfg->mode == RT_CAN_MODE_NORMAL) ? CAN_NORMAL_MODE : CAN_BASIC_MODE; /*Set the CAN Bit Rate and Operating mode*/ - if (CAN_Open(can_base, can->config.baud_rate, can->config.mode) < 1) - return -(RT_ERROR); - + if (CAN_Open(base, cfg->baud_rate, u32CANMode) != cfg->baud_rate) + goto exit_nu_can_configure; switch (cfg->mode) { - /* CAN default Normal mode */ case RT_CAN_MODE_NORMAL: #ifdef RT_CAN_USING_HDR - CAN_LeaveTestMode(can_base); + CAN_LeaveTestMode(base); #else - CAN_EnterTestMode(can_base, CAN_TEST_BASIC_Msk); + CAN_EnterTestMode(base, CAN_TEST_BASIC_Msk); #endif break; case RT_CAN_MODE_LISEN: - CAN_EnterTestMode(can_base, CAN_TEST_BASIC_Msk | CAN_TEST_SILENT_Msk); + CAN_EnterTestMode(base, CAN_TEST_BASIC_Msk | CAN_TEST_SILENT_Msk); break; case RT_CAN_MODE_LOOPBACK: - CAN_EnterTestMode(can_base, CAN_TEST_BASIC_Msk | CAN_TEST_LBACK_Msk); + CAN_EnterTestMode(base, CAN_TEST_BASIC_Msk | CAN_TEST_LBACK_Msk); break; case RT_CAN_MODE_LOOPBACKANLISEN: - CAN_EnterTestMode(can_base, CAN_TEST_BASIC_Msk | CAN_TEST_SILENT_Msk | CAN_TEST_LBACK_Msk); + CAN_EnterTestMode(base, CAN_TEST_BASIC_Msk | CAN_TEST_SILENT_Msk | CAN_TEST_LBACK_Msk); break; default: rt_kprintf("Unsupported Operating mode"); goto exit_nu_can_configure; } + nu_can_ie(psNuCAN); return RT_EOK; exit_nu_can_configure: - CAN_Close(can_base); + CAN_Close(base); return -(RT_ERROR); } static rt_err_t nu_can_control(struct rt_can_device *can, int cmd, void *arg) { - rt_uint32_t argval; + rt_uint32_t argval = (rt_uint32_t)arg; + nu_can_t psNuCAN = (nu_can_t)can; -#ifdef RT_CAN_USING_HDR - struct rt_can_filter_config *filter_cfg; -#endif - /* Get base address of CAN register */ - CAN_T *can_base = ((nu_can_t)can)->can_base; - - RT_ASSERT(can_base != RT_NULL); - /* Check baud rate */ - RT_ASSERT(can->config.baud_rate != 0); + RT_ASSERT(can); switch (cmd) { - case RT_DEVICE_CTRL_CLR_INT: - argval = (rt_uint32_t) arg; - if ((argval == RT_DEVICE_FLAG_INT_RX) || (argval == RT_DEVICE_FLAG_INT_TX)) - { - /* Disable NVIC interrupt. */ - NVIC_DisableIRQ(((nu_can_t)can)->can_irq_n); - /* Disable Status Change Interrupt */ - CAN_DisableInt(can_base, CAN_CON_IE_Msk | CAN_CON_SIE_Msk); - - } - else if (argval == RT_DEVICE_CAN_INT_ERR) - { - /* Disable NVIC interrupt. */ - NVIC_DisableIRQ(((nu_can_t)can)->can_irq_n); - /* Disable Error Interrupt */ - CAN_DisableInt(can_base, CAN_CON_EIE_Msk); - } - break; - case RT_DEVICE_CTRL_SET_INT: - argval = (rt_uint32_t) arg; - if (argval == RT_DEVICE_FLAG_INT_RX || (argval == RT_DEVICE_FLAG_INT_TX)) - { - /* Enable Status Change Interrupt */ - CAN_EnableInt(can_base, CAN_CON_IE_Msk | CAN_CON_SIE_Msk); - /* Enable NVIC interrupt. */ - NVIC_EnableIRQ(((nu_can_t)can)->can_irq_n); - - } - else if (argval == RT_DEVICE_CAN_INT_ERR) - { - /* Enable Error Status and Status Change Interrupt */ - CAN_EnableInt(can_base, CAN_CON_IE_Msk | CAN_CON_SIE_Msk | CAN_CON_EIE_Msk); - /* Enable NVIC interrupt. */ - NVIC_EnableIRQ(((nu_can_t)can)->can_irq_n); - } + psNuCAN->int_flag |= argval; + nu_can_ie(psNuCAN); + break; + + case RT_DEVICE_CTRL_CLR_INT: + psNuCAN->int_flag &= ~argval; + nu_can_ie(psNuCAN); break; -#ifdef RT_CAN_USING_HDR case RT_CAN_CMD_SET_FILTER: - filter_cfg = (struct rt_can_filter_config *)arg; + { + struct rt_can_filter_config *filter_cfg = (struct rt_can_filter_config *)arg; for (int i = 0; i < filter_cfg->count; i++) { - /*set the filter message object*/ if (filter_cfg->items[i].mode == 1) { - if (CAN_SetRxMsgObjAndMsk(can_base, MSG(filter_cfg->items[i].hdr + RX_MSG_ID_INDEX), filter_cfg->items[i].ide, filter_cfg->items[i].id, filter_cfg->items[i].mask, FALSE) == FALSE) + if (CAN_SetRxMsgObjAndMsk(psNuCAN->base, MSG(filter_cfg->items[i].hdr + RX_MSG_ID_INDEX), filter_cfg->items[i].ide, filter_cfg->items[i].id, filter_cfg->items[i].mask, FALSE) == FALSE) { return -(RT_ERROR); } } else - { /*set the filter message object*/ - if (CAN_SetRxMsgAndMsk(can_base, MSG(filter_cfg->items[i].hdr + RX_MSG_ID_INDEX), filter_cfg->items[i].ide, filter_cfg->items[i].id, filter_cfg->items[i].mask) == FALSE) + if (CAN_SetRxMsgAndMsk(psNuCAN->base, MSG(filter_cfg->items[i].hdr + RX_MSG_ID_INDEX), filter_cfg->items[i].ide, filter_cfg->items[i].id, filter_cfg->items[i].mask) == FALSE) { return -(RT_ERROR); } } } - break; -#endif + } + break; case RT_CAN_CMD_SET_MODE: - argval = (rt_uint32_t) arg; - if (argval != RT_CAN_MODE_NORMAL && argval != RT_CAN_MODE_LISEN && - argval != RT_CAN_MODE_LOOPBACK && argval != RT_CAN_MODE_LOOPBACKANLISEN) + if ((argval == RT_CAN_MODE_NORMAL) || + (argval == RT_CAN_MODE_LISEN) || + (argval == RT_CAN_MODE_LOOPBACK) || + (argval == RT_CAN_MODE_LOOPBACKANLISEN)) + { + if (argval != can->config.mode) + { + can->config.mode = argval; + return nu_can_configure(can, &can->config); + } + } + else { return -(RT_ERROR); } - if (argval != can->config.mode) - { - can->config.mode = argval; - return nu_can_configure(can, &can->config); - } break; case RT_CAN_CMD_SET_BAUD: - argval = (rt_uint32_t) arg; - if (argval != CAN1MBaud && argval != CAN800kBaud && argval != CAN500kBaud && argval != CAN250kBaud && - argval != CAN125kBaud && argval != CAN100kBaud && argval != CAN50kBaud && argval != CAN20kBaud && argval != CAN10kBaud) + { + if ((argval == CAN1MBaud) || + (argval == CAN800kBaud) || + (argval == CAN500kBaud) || + (argval == CAN250kBaud) || + (argval == CAN125kBaud) || + (argval == CAN100kBaud) || + (argval == CAN50kBaud) || + (argval == CAN20kBaud) || + (argval == CAN10kBaud)) + { + if (argval != can->config.baud_rate) + { + can->config.baud_rate = argval; + return nu_can_configure(can, &can->config); + } + } + else { return -(RT_ERROR); } - if (argval != can->config.baud_rate) - { - can->config.baud_rate = argval; - return nu_can_configure(can, &can->config); - } - break; + } + break; case RT_CAN_CMD_SET_PRIV: - argval = (rt_uint32_t) arg; - if (argval != RT_CAN_MODE_PRIV && argval != RT_CAN_MODE_NOPRIV) + if (argval != RT_CAN_MODE_PRIV && + argval != RT_CAN_MODE_NOPRIV) { return -(RT_ERROR); } @@ -428,20 +432,29 @@ static rt_err_t nu_can_control(struct rt_can_device *can, int cmd, void *arg) return nu_can_configure(can, &can->config); } break; + case RT_CAN_CMD_GET_STATUS: { - rt_uint32_t errtype; - errtype = can_base->ERR; - /*Receive Error Counter*/ + rt_uint32_t errtype = psNuCAN->base->ERR; + + RT_ASSERT(arg); + + /*Receive Error Counter, return value is with Receive Error Passive.*/ can->status.rcverrcnt = (errtype >> 8); + /*Transmit Error Counter*/ - can->status.snderrcnt = ((errtype >> 24) & 0xFF); - can->status.lasterrtype = CAN_GET_INT_STATUS(can_base) & 0x8000; - /*status error code*/ - can->status.errcode = CAN_GET_INT_STATUS(can_base) & 0x07; - rt_memcpy(arg, &can->status, sizeof(can->status)); + can->status.snderrcnt = (errtype & 0xFF); + + /*Last Error Type*/ + can->status.lasterrtype = CAN_GET_INT_STATUS(psNuCAN->base) & 0x8000; + + /*Status error code*/ + can->status.errcode = CAN_GET_INT_STATUS(psNuCAN->base) & 0x07; + + rt_memcpy(arg, &can->status, sizeof(struct rt_can_status)); } break; + default: return -(RT_EINVAL); @@ -453,61 +466,91 @@ static rt_err_t nu_can_control(struct rt_can_device *can, int cmd, void *arg) static int nu_can_sendmsg(struct rt_can_device *can, const void *buf, rt_uint32_t boxno) { STR_CANMSG_T tMsg; - struct rt_can_msg *pmsg = (struct rt_can_msg *) buf; - /* Get base address of CAN register */ - CAN_T *can_base = ((nu_can_t)can)->can_base; + struct rt_can_msg *pmsg; + nu_can_t psNuCAN = (nu_can_t)can; - RT_ASSERT(can_base != RT_NULL); - RT_ASSERT(buf != RT_NULL); - /* Check the parameters */ - RT_ASSERT(IS_CAN_DLC(pmsg->len)); - /* Standard ID (11 bits)*/ - if (pmsg->ide == RT_CAN_STDID) + RT_ASSERT(can); + RT_ASSERT(buf); + + pmsg = (struct rt_can_msg *) buf; + + if (pmsg->ide == RT_CAN_STDID && IS_CAN_STDID(pmsg->id)) { + /* Standard ID (11 bits)*/ tMsg.IdType = CAN_STD_ID; - RT_ASSERT(IS_CAN_STDID(pmsg->id)) tMsg.Id = pmsg->id ; } - else + else if (pmsg->ide == RT_CAN_EXTID && IS_CAN_EXTID(pmsg->id)) { /* Extended ID (29 bits)*/ tMsg.IdType = CAN_EXT_ID; - RT_ASSERT(IS_CAN_EXTID(pmsg->id)); tMsg.Id = pmsg->id ; } + else + { + goto exit_nu_can_sendmsg; + } if (pmsg->rtr == RT_CAN_DTR) { /* Data frame */ tMsg.FrameType = CAN_DATA_FRAME; } - else + else if (pmsg->rtr == RT_CAN_RTR) { /* Remote frame */ tMsg.FrameType = CAN_REMOTE_FRAME; } - tMsg.DLC = pmsg->len; - rt_memcpy(tMsg.Data, pmsg->data, pmsg->len); - - if (CAN_Transmit(can_base, MSG(boxno), &tMsg) == FALSE) // Configure Msg RAM and send the Msg in the RAM + else { - return -(RT_ERROR); + goto exit_nu_can_sendmsg; + } + + /* Check the parameters */ + if (IS_CAN_DLC(pmsg->len)) + { + tMsg.DLC = pmsg->len; + } + else + { + goto exit_nu_can_sendmsg; + } + + if (pmsg->data && pmsg->len) + { + rt_memcpy(&tMsg.Data[0], pmsg->data, pmsg->len); + } + else + { + goto exit_nu_can_sendmsg; + } + + /* Configure Msg RAM and send the Msg in the RAM. */ + if (CAN_Transmit(psNuCAN->base, MSG(boxno), &tMsg) == FALSE) + { + goto exit_nu_can_sendmsg; } return RT_EOK; + +exit_nu_can_sendmsg: + + return -(RT_ERROR); } + static int nu_can_recvmsg(struct rt_can_device *can, void *buf, rt_uint32_t boxno) { STR_CANMSG_T tMsg; - struct rt_can_msg *pmsg = (struct rt_can_msg *) buf; - /* Get base address of CAN register */ - CAN_T *can_base = ((nu_can_t)can)->can_base; + struct rt_can_msg *pmsg; + nu_can_t psNuCAN = (nu_can_t)can; - RT_ASSERT(can_base != RT_NULL); - RT_ASSERT(buf != RT_NULL); + RT_ASSERT(can); + RT_ASSERT(buf); + + pmsg = (struct rt_can_msg *) buf; /* get data */ - if (CAN_Receive(can_base, boxno, &tMsg) == FALSE) + if (CAN_Receive(psNuCAN->base, boxno, &tMsg) == FALSE) { rt_kprintf("No available RX Msg.\n"); return -(RT_ERROR); @@ -519,32 +562,13 @@ static int nu_can_recvmsg(struct rt_can_device *can, void *buf, rt_uint32_t boxn can->hdr[pmsg->hdr].connected = 1; #endif - /* Standard ID (11 bits)*/ - if (tMsg.IdType == CAN_STD_ID) - { - pmsg->ide = RT_CAN_STDID; - pmsg->id = tMsg.Id; - } - else /* Extended ID (29 bits)*/ - { - pmsg->ide = RT_CAN_EXTID; - pmsg->id = tMsg.Id; - } - - if (tMsg.FrameType == CAN_DATA_FRAME) - { - /* Data frame */ - pmsg->rtr = RT_CAN_DTR; - } - else - { - /* Remote frame */ - pmsg->rtr = RT_CAN_RTR; - } - + pmsg->ide = (tMsg.IdType == CAN_STD_ID) ? RT_CAN_STDID : RT_CAN_EXTID; + pmsg->rtr = (tMsg.FrameType == CAN_DATA_FRAME) ? RT_CAN_DTR : RT_CAN_RTR; + pmsg->id = tMsg.Id; pmsg->len = tMsg.DLC ; - rt_memcpy(pmsg->data, tMsg.Data, pmsg->len); + if (pmsg->data && pmsg->len) + rt_memcpy(pmsg->data, &tMsg.Data[0], pmsg->len); return RT_EOK; } @@ -559,13 +583,12 @@ static int rt_hw_can_init(void) for (i = (CAN_START + 1); i < CAN_CNT; i++) { - - nu_can_arr[i].dev.ops = &nu_can_ops; nu_can_arr[i].dev.config = nu_can_default_config; #ifdef RT_CAN_USING_HDR nu_can_arr[i].dev.config.maxhdr = RT_CANMSG_BOX_SZ; #endif + /* Register can device */ ret = rt_hw_can_register(&nu_can_arr[i].dev, nu_can_arr[i].name, &nu_can_ops, NULL); RT_ASSERT(ret == RT_EOK); } diff --git a/bsp/nuvoton/libraries/m480/rtt_port/drv_i2c.c b/bsp/nuvoton/libraries/m480/rtt_port/drv_i2c.c index d1f71407ac..b7082d1ae4 100644 --- a/bsp/nuvoton/libraries/m480/rtt_port/drv_i2c.c +++ b/bsp/nuvoton/libraries/m480/rtt_port/drv_i2c.c @@ -99,7 +99,7 @@ static rt_err_t nu_i2c_bus_control(struct rt_i2c_bus_device *bus, rt_uint32_t u3 RT_ASSERT(bus != RT_NULL); nu_i2c = (nu_i2c_bus_t *) bus; - switch (RT_I2C_DEV_CTRL_CLK) + switch (u32Cmd) { case RT_I2C_DEV_CTRL_CLK: I2C_SetBusClockFreq(nu_i2c->I2C, u32Value); diff --git a/bsp/nuvoton/libraries/n9h30/Driver/Include/nu_can.h b/bsp/nuvoton/libraries/n9h30/Driver/Include/nu_can.h index b13064996d..8eb3a1463c 100644 --- a/bsp/nuvoton/libraries/n9h30/Driver/Include/nu_can.h +++ b/bsp/nuvoton/libraries/n9h30/Driver/Include/nu_can.h @@ -151,8 +151,8 @@ typedef struct #define CAN_BTIME_TSEG2_Pos (12) /*!< CAN_T::BTIME: TSeg2 Position */ #define CAN_BTIME_TSEG2_Msk (0x7ul << CAN_BTIME_TSEG2_Pos) /*!< CAN_T::BTIME: TSeg2 Mask */ -#define CAN_IIDR_IntId_Pos (0) /*!< CAN_T::IIDR: IntId Position */ -#define CAN_IIDR_IntId_Msk (0xfffful << CAN_IIDR_IntId_Pos) /*!< CAN_T::IIDR: IntId Mask */ +#define CAN_IIDR_INTID_Pos (0) /*!< CAN_T::IIDR: IntId Position */ +#define CAN_IIDR_INTID_Msk (0xfffful << CAN_IIDR_INTID_Pos) /*!< CAN_T::IIDR: IntId Mask */ #define CAN_TEST_BASIC_Pos (2) /*!< CAN_T::TEST: Basic Position */ #define CAN_TEST_BASIC_Msk (0x1ul << CAN_TEST_BASIC_Pos) /*!< CAN_T::TEST: Basic Mask */ diff --git a/bsp/nuvoton/libraries/n9h30/Driver/Include/nu_lcd.h b/bsp/nuvoton/libraries/n9h30/Driver/Include/nu_lcd.h index bf05c3f9a9..69b7c747a8 100644 --- a/bsp/nuvoton/libraries/n9h30/Driver/Include/nu_lcd.h +++ b/bsp/nuvoton/libraries/n9h30/Driver/Include/nu_lcd.h @@ -171,11 +171,17 @@ typedef struct uint32_t *pFrameBuffer; /*!< User input, The address of OSD source image */ } OSDFORMATEX; -#define DIS_PANEL_E50A2V1 0 -#define DIS_PANEL_ILI9341_MPU80 1 -#define DIS_LSA40AT9001 2 -#define DIS_PANEL_FW070TFT 3 -#define DIS_PANEL_FW043TFT 4 +enum DIS_PANEL +{ + DIS_PANEL_E50A2V1 = 0, + DIS_PANEL_ILI9341_MPU80, + DIS_LSA40AT9001, + DIS_PANEL_FW070TFT, + DIS_PANEL_FW043TFT, + DIS_PANEL_FW070TFT_WSVGA, + DIS_PANEL_CNT +}; + typedef struct { uint32_t u32DevWidth; /*!< Panel width */ diff --git a/bsp/nuvoton/libraries/n9h30/Driver/Include/nu_uart.h b/bsp/nuvoton/libraries/n9h30/Driver/Include/nu_uart.h index 4f24a2d10d..898c181eb5 100644 --- a/bsp/nuvoton/libraries/n9h30/Driver/Include/nu_uart.h +++ b/bsp/nuvoton/libraries/n9h30/Driver/Include/nu_uart.h @@ -770,4 +770,8 @@ void UART_SetLineConfig(UART_T *uart, uint32_t u32baudrate, uint32_t u32data_wid /*@}*/ /* end of group N9H30_Device_Driver */ +#ifdef __cplusplus +} +#endif + #endif diff --git a/bsp/nuvoton/libraries/n9h30/Driver/Source/nu_lcd.c b/bsp/nuvoton/libraries/n9h30/Driver/Source/nu_lcd.c index d71d110096..82887e427f 100644 --- a/bsp/nuvoton/libraries/n9h30/Driver/Source/nu_lcd.c +++ b/bsp/nuvoton/libraries/n9h30/Driver/Source/nu_lcd.c @@ -168,9 +168,82 @@ static VPOST_T DEF_FW043TFT = } }; +#define FW070TFT_WSVGA_WIDTH 1024 /*!< XRES */ +#define FW070TFT_WSVGA_HEIGHT 600 /*!< YRES */ +#define FW070TFT_WSVGA_MARGIN_LEFT 160 /*!< HBP (Horizontal Back Porch) */ +#define FW070TFT_WSVGA_MARGIN_RIGHT 160 /*!< HFP (Horizontal Front Porch) */ +#define FW070TFT_WSVGA_MARGIN_UPPER 12 /*!< VBP (Vertical Back Porch) */ +#define FW070TFT_WSVGA_MARGIN_LOWER 23 /*!< VFP (Vertical Front Porch) */ +#define FW070TFT_WSVGA_HSYNC_LEN 1 /*!< HPW (HSYNC plus width) */ +#define FW070TFT_WSVGA_VSYNC_LEN 1 /*!< VPW (VSYNC width) */ +static VPOST_T DEF_FW070TFT_WSVGA = +{ + FW070TFT_WSVGA_WIDTH, /*!< Panel width */ + FW070TFT_WSVGA_HEIGHT, /*!< Panel height */ + 0, /*!< MPU command line low indicator */ + 0, /*!< MPU command width */ + 0, /*!< MPU bus width */ + VPOSTB_DATA16or18, /*!< Display bus width */ + 0, /*!< MPU mode */ + VPOSTB_COLORTYPE_16M, /*!< Display colors */ + VPOSTB_DEVICE_SYNC_HIGHCOLOR, /*!< Type of display panel */ + + .sCRTCSIZE = + { + /*!< Horizontal Total */ + .HTT = FW070TFT_WSVGA_MARGIN_LEFT + FW070TFT_WSVGA_WIDTH + FW070TFT_WSVGA_MARGIN_RIGHT, + + /*!< Vertical Total */ + .VTT = FW070TFT_WSVGA_MARGIN_UPPER + FW070TFT_WSVGA_HEIGHT + FW070TFT_WSVGA_MARGIN_LOWER, + }, + .sCRTCDEND = + { + /*!< Horizontal Display Enable End */ + .HDEND = FW070TFT_WSVGA_WIDTH, + + /*!< Vertical Display Enable End */ + .VDEND = FW070TFT_WSVGA_HEIGHT, + }, + .sCRTCHR = + { + /*!< Internal Horizontal Retrace Start Timing */ + .HRS = FW070TFT_WSVGA_WIDTH + 1, + + /*!< Internal Horizontal Retrace End Low */ + .HRE = FW070TFT_WSVGA_WIDTH + 5, + }, + .sCRTCHSYNC = + { + /*!< Horizontal Sync Start Timing */ + .HSYNC_S = FW070TFT_WSVGA_WIDTH + FW070TFT_WSVGA_MARGIN_LEFT, + + /*!< Horizontal Sync End Timing */ + .HSYNC_E = FW070TFT_WSVGA_WIDTH + FW070TFT_WSVGA_MARGIN_LEFT + FW070TFT_WSVGA_HSYNC_LEN, + + /*!< Hsync Signal Adjustment For Multi-Cycles Per Pixel Mode Of Sync-Based Unipac-LCD */ + .HSYNC_SHIFT = 0, + }, + .sCRTCVR = + { + /*!< Vertical Internal Retrace Start Timing */ + .VRS = FW070TFT_WSVGA_HEIGHT + FW070TFT_WSVGA_MARGIN_UPPER, + + /*!< Vertical Internal Retrace End Low */ + .VRE = FW070TFT_WSVGA_HEIGHT + FW070TFT_WSVGA_MARGIN_UPPER + FW070TFT_WSVGA_VSYNC_LEN, + } +}; /* LCD build-in support list */ -static VPOST_T *DisplayDevList[5] = {&DEF_E50A2V1, &DEF_ILI9341_MPU80, &DEF_LSA40AT9001, &DEF_FW070TFT, &DEF_FW043TFT}; +static VPOST_T *DisplayDevList[DIS_PANEL_CNT] = +{ + &DEF_E50A2V1, + &DEF_ILI9341_MPU80, + &DEF_LSA40AT9001, + &DEF_FW070TFT, + &DEF_FW043TFT, + &DEF_FW070TFT_WSVGA +}; + static VPOST_T curDisplayDev; static OSDFORMATEX curOSDDev = {0}; static LCDFORMATEX curVADev = {0}; diff --git a/bsp/nuvoton/libraries/n9h30/rtt_port/Kconfig b/bsp/nuvoton/libraries/n9h30/rtt_port/Kconfig index f57b439f00..4d863f6126 100644 --- a/bsp/nuvoton/libraries/n9h30/rtt_port/Kconfig +++ b/bsp/nuvoton/libraries/n9h30/rtt_port/Kconfig @@ -475,6 +475,9 @@ config SOC_SERIES_N9H30 config LCM_USING_FW043TFT bool "LCM_FW043TFT(480x272-RGB888)" + config LCM_USING_FW070TFT_WSVGA + bool "LCM_USING_FW070TFT_WSVGA(1024x600-RGB888)" + endchoice config VPOST_USING_LCD_IDX @@ -483,6 +486,7 @@ config SOC_SERIES_N9H30 default 2 if LCM_USING_LSA40AT9001 default 3 if LCM_USING_FW070TFT default 4 if LCM_USING_FW043TFT + default 5 if LCM_USING_FW070TFT_WSVGA config BSP_LCD_BPP int @@ -490,6 +494,7 @@ config SOC_SERIES_N9H30 default 16 if LCM_USING_LSA40AT9001 default 32 if LCM_USING_FW070TFT default 32 if LCM_USING_FW043TFT + default 32 if LCM_USING_FW070TFT_WSVGA config BSP_LCD_WIDTH int @@ -497,6 +502,7 @@ config SOC_SERIES_N9H30 default 800 if LCM_USING_LSA40AT9001 default 800 if LCM_USING_FW070TFT default 480 if LCM_USING_FW043TFT + default 1024 if LCM_USING_FW070TFT_WSVGA config BSP_LCD_HEIGHT int @@ -504,6 +510,7 @@ config SOC_SERIES_N9H30 default 600 if LCM_USING_LSA40AT9001 default 480 if LCM_USING_FW070TFT default 272 if LCM_USING_FW043TFT + default 600 if LCM_USING_FW070TFT_WSVGA config BSP_USING_VPOST_OSD bool "Enable VPOST OSD layer" diff --git a/bsp/nuvoton/libraries/n9h30/rtt_port/drv_adc.c b/bsp/nuvoton/libraries/n9h30/rtt_port/drv_adc.c index 5ce1c64276..d1dcba7d5b 100644 --- a/bsp/nuvoton/libraries/n9h30/rtt_port/drv_adc.c +++ b/bsp/nuvoton/libraries/n9h30/rtt_port/drv_adc.c @@ -35,24 +35,27 @@ struct nu_adc uint32_t chn_mask; rt_sem_t m_psSem; +#if defined(BSP_USING_ADC_TOUCH) rt_touch_t psRtTouch; rt_timer_t psRtTouchMenuTimer; + rt_mq_t m_pmqTouchXYZ; +#endif nu_adc_cb m_isr[eAdc_ISR_CNT]; nu_adc_cb m_wkisr[eAdc_WKISR_CNT]; - - rt_mq_t m_pmqTouchXYZ; }; typedef struct nu_adc *nu_adc_t; +#if defined(BSP_USING_ADC_TOUCH) struct nu_adc_touch_data { - uint16_t u16X; - uint16_t u16Y; - uint16_t u16Z0; - uint16_t u16Z1; + uint32_t u32X; + uint32_t u32Y; + uint32_t u32Z0; + uint32_t u32Z1; }; typedef struct nu_adc_touch_data *nu_adc_touch_data_t; +#endif /* Private functions ------------------------------------------------------------*/ static rt_err_t nu_adc_enabled(struct rt_adc_device *device, rt_uint32_t channel, rt_bool_t enabled); @@ -134,6 +137,64 @@ static rt_err_t _nu_adc_init(rt_device_t dev) return RT_EOK; } +static int32_t AdcMenuStartCallback(uint32_t status, uint32_t userData) +{ + nu_adc_t psNuAdc = (nu_adc_t)userData; + +#if defined(BSP_USING_ADC_TOUCH) + + static struct nu_adc_touch_data point; + static rt_bool_t bDrop = RT_FALSE; + static uint32_t u32LastZ0 = 0xffffu; + + if (psNuAdc->psRtTouch != RT_NULL) + { + uint32_t value; + + value = inpw(REG_ADC_XYDATA); + point.u32X = (value & 0x0ffful); + point.u32Y = ((value >> 16) & 0x0ffful); + + value = inpw(REG_ADC_ZDATA); + point.u32Z0 = (value & 0x0ffful); + point.u32Z1 = ((value >> 16) & 0x0ffful); + + /* Trigger next or not. */ + if (point.u32Z0 == 0) + { + /* Stop sampling procedure. */ + rt_timer_stop(g_sNuADC.psRtTouchMenuTimer); + + /* Re-start pendown detection */ + nu_adc_touch_detect(RT_TRUE); + + bDrop = RT_TRUE; + } + else + { + bDrop = RT_FALSE; + } + + /* Notify upper layer. */ + if ((!bDrop || (u32LastZ0 != 0)) && rt_mq_send(psNuAdc->m_pmqTouchXYZ, (const void *)&point, sizeof(struct nu_adc_touch_data)) == RT_EOK) + { + rt_hw_touch_isr(psNuAdc->psRtTouch); + } + + u32LastZ0 = point.u32Z0; + } + else +#endif + { + rt_err_t result = rt_sem_release(psNuAdc->m_psSem); + RT_ASSERT(result == RT_EOK); + } + + return 0; +} + +#if defined(BSP_USING_ADC_TOUCH) + void nu_adc_touch_detect(rt_bool_t bStartDetect) { nu_adc_t psNuAdc = (nu_adc_t)&g_sNuADC; @@ -150,60 +211,6 @@ void nu_adc_touch_detect(rt_bool_t bStartDetect) } } -static int32_t AdcMenuStartCallback(uint32_t status, uint32_t userData) -{ - static struct nu_adc_touch_data point; - static rt_bool_t bDrop = RT_FALSE; - static uint16_t u16LastZ0 = 0xfffful; - - nu_adc_t psNuAdc = (nu_adc_t)userData; - - if (psNuAdc->psRtTouch != RT_NULL) - { - uint32_t value; - - value = inpw(REG_ADC_XYDATA); - point.u16X = (uint16_t)(value & 0x0ffful); - point.u16Y = (uint16_t)((value >> 16) & 0x0ffful); - - value = inpw(REG_ADC_ZDATA); - point.u16Z0 = (uint16_t)(value & 0x0ffful); - point.u16Z1 = (uint16_t)((value >> 16) & 0x0ffful); - - /* Trigger next or not. */ - if (point.u16Z0 == 0) - { - /* Stop sampling procedure. */ - rt_timer_stop(g_sNuADC.psRtTouchMenuTimer); - - /* Re-start pendown detection */ - nu_adc_touch_detect(RT_TRUE); - - bDrop = RT_TRUE; - } - else - { - bDrop = RT_FALSE; - } - - /* Notify upper layer. */ - if ((!bDrop || (u16LastZ0 != 0)) && rt_mq_send(psNuAdc->m_pmqTouchXYZ, (const void *)&point, sizeof(struct nu_adc_touch_data)) == RT_EOK) - { - rt_hw_touch_isr(psNuAdc->psRtTouch); - } - - u16LastZ0 = point.u16Z0; - } - else - { - rt_err_t result = rt_sem_release(psNuAdc->m_psSem); - RT_ASSERT(result == RT_EOK); - } - - return 0; -} - - static int32_t PenDownCallback(uint32_t status, uint32_t userData) { nu_adc_touch_detect(RT_FALSE); @@ -213,7 +220,7 @@ static int32_t PenDownCallback(uint32_t status, uint32_t userData) return 0; } -int32_t nu_adc_read_touch_xyz(uint16_t *bufX, uint16_t *bufY, uint16_t *bufZ0, uint16_t *bufZ1, int32_t dataCnt) +int32_t nu_adc_touch_read_xyz(uint32_t *bufX, uint32_t *bufY, uint32_t *bufZ0, uint32_t *bufZ1, int32_t dataCnt) { int i; struct nu_adc_touch_data value; @@ -223,14 +230,71 @@ int32_t nu_adc_read_touch_xyz(uint16_t *bufX, uint16_t *bufY, uint16_t *bufZ0, u if (rt_mq_recv(g_sNuADC.m_pmqTouchXYZ, (void *)&value, sizeof(struct nu_adc_touch_data), 0) == -RT_ETIMEOUT) break; - bufX[i] = value.u16X; - bufY[i] = value.u16Y; - bufZ0[i] = value.u16Z0; - bufZ1[i] = value.u16Z1; + bufX[i] = value.u32X; + bufY[i] = value.u32Y; + bufZ0[i] = value.u32Z0; + bufZ1[i] = value.u32Z1; } return i; } +void nu_adc_touch_start_conv(void) +{ + nu_adc_t psNuAdc = (nu_adc_t)&g_sNuADC; + _nu_adc_control((rt_device_t)psNuAdc, START_MST, RT_NULL); +} + +rt_err_t nu_adc_touch_enable(rt_touch_t psRtTouch) +{ + nu_adc_t psNuAdc = (nu_adc_t)&g_sNuADC; + nu_adc_cb sNuAdcCb; + + rt_adc_enable((rt_adc_device_t)psNuAdc, 4); + rt_adc_enable((rt_adc_device_t)psNuAdc, 5); + rt_adc_enable((rt_adc_device_t)psNuAdc, 6); + rt_adc_enable((rt_adc_device_t)psNuAdc, 7); + + outpw(REG_ADC_CONF, (inpw(REG_ADC_CONF) & ~(0xfful << 24)) | 0xfful << 24); + + /* Register touch device. */ + psNuAdc->psRtTouch = psRtTouch; + + /* Enable TouchXY. */ + _nu_adc_control((rt_device_t)psNuAdc, T_ON, RT_NULL); + + /* Enable TouchZZ. */ + _nu_adc_control((rt_device_t)psNuAdc, Z_ON, RT_NULL); + + /* Register PenDown callback. */ + sNuAdcCb.cbfunc = PenDownCallback; + sNuAdcCb.private_data = (rt_uint32_t)psRtTouch; + _nu_adc_control((rt_device_t)psNuAdc, PEDEF_ON, (void *)&sNuAdcCb); + + nu_adc_touch_detect(RT_TRUE); + + return RT_EOK; +} + +rt_err_t nu_adc_touch_disable(void) +{ + nu_adc_t psNuAdc = (nu_adc_t)&g_sNuADC; + + nu_adc_touch_detect(RT_FALSE); + + _nu_adc_control((rt_device_t)psNuAdc, T_OFF, RT_NULL); + _nu_adc_control((rt_device_t)psNuAdc, Z_OFF, RT_NULL); + _nu_adc_control((rt_device_t)psNuAdc, PEDEF_OFF, RT_NULL); + + rt_adc_disable((rt_adc_device_t)psNuAdc, 4); + rt_adc_disable((rt_adc_device_t)psNuAdc, 5); + rt_adc_disable((rt_adc_device_t)psNuAdc, 6); + rt_adc_disable((rt_adc_device_t)psNuAdc, 7); + + return RT_EOK; +} + +#endif + static rt_err_t _nu_adc_control(rt_device_t dev, int cmd, void *args) { rt_err_t ret = RT_EINVAL ; @@ -443,7 +507,9 @@ static rt_err_t _nu_adc_control(rt_device_t dev, int cmd, void *args) case Z_OFF: /* Disable Press measure function */ { outpw(REG_ADC_CONF, inpw(REG_ADC_CONF) & ~ADC_CONF_ZEN); +#if defined(BSP_USING_ADC_TOUCH) rt_mq_control(psNuAdc->m_pmqTouchXYZ, RT_IPC_CMD_RESET, RT_NULL); +#endif } break; @@ -522,61 +588,6 @@ static rt_err_t _nu_adc_control(rt_device_t dev, int cmd, void *args) return RT_EOK; } -void nu_adc_touch_start_conv(void) -{ - nu_adc_t psNuAdc = (nu_adc_t)&g_sNuADC; - _nu_adc_control((rt_device_t)psNuAdc, START_MST, RT_NULL); -} - -rt_err_t nu_adc_touch_enable(rt_touch_t psRtTouch) -{ - nu_adc_t psNuAdc = (nu_adc_t)&g_sNuADC; - nu_adc_cb sNuAdcCb; - - rt_adc_enable((rt_adc_device_t)psNuAdc, 4); - rt_adc_enable((rt_adc_device_t)psNuAdc, 5); - rt_adc_enable((rt_adc_device_t)psNuAdc, 6); - rt_adc_enable((rt_adc_device_t)psNuAdc, 7); - - outpw(REG_ADC_CONF, (inpw(REG_ADC_CONF) & ~(0xfful << 24)) | 0xfful << 24); - - /* Register touch device. */ - psNuAdc->psRtTouch = psRtTouch; - - /* Enable TouchXY. */ - _nu_adc_control((rt_device_t)psNuAdc, T_ON, RT_NULL); - - /* Enable TouchZZ. */ - _nu_adc_control((rt_device_t)psNuAdc, Z_ON, RT_NULL); - - /* Register PenDown callback. */ - sNuAdcCb.cbfunc = PenDownCallback; - sNuAdcCb.private_data = (rt_uint32_t)psRtTouch; - _nu_adc_control((rt_device_t)psNuAdc, PEDEF_ON, (void *)&sNuAdcCb); - - nu_adc_touch_detect(RT_TRUE); - - return RT_EOK; -} - -rt_err_t nu_adc_touch_disable(void) -{ - nu_adc_t psNuAdc = (nu_adc_t)&g_sNuADC; - - nu_adc_touch_detect(RT_FALSE); - - _nu_adc_control((rt_device_t)psNuAdc, T_OFF, RT_NULL); - _nu_adc_control((rt_device_t)psNuAdc, Z_OFF, RT_NULL); - _nu_adc_control((rt_device_t)psNuAdc, PEDEF_OFF, RT_NULL); - - rt_adc_disable((rt_adc_device_t)psNuAdc, 4); - rt_adc_disable((rt_adc_device_t)psNuAdc, 5); - rt_adc_disable((rt_adc_device_t)psNuAdc, 6); - rt_adc_disable((rt_adc_device_t)psNuAdc, 7); - - return RT_EOK; -} - static rt_err_t _nu_adc_open(rt_device_t dev, rt_uint16_t oflag) { nu_adc_t psNuAdc = (nu_adc_t)dev; @@ -709,11 +720,13 @@ int rt_hw_adc_init(void) g_sNuADC.m_psSem = rt_sem_create("adc_mst_sem", 0, RT_IPC_FLAG_FIFO); RT_ASSERT(g_sNuADC.m_psSem != RT_NULL); +#if defined(BSP_USING_ADC_TOUCH) g_sNuADC.m_pmqTouchXYZ = rt_mq_create("ADC_TOUCH_XYZ", sizeof(struct nu_adc_touch_data), TOUCH_MQ_LENGTH, RT_IPC_FLAG_FIFO); RT_ASSERT(g_sNuADC.m_pmqTouchXYZ != RT_NULL); g_sNuADC.psRtTouchMenuTimer = rt_timer_create("TOUCH_SMPL_TIMER", nu_adc_touch_smpl, (void *)&g_sNuADC, DEF_ADC_TOUCH_SMPL_TICK, RT_TIMER_FLAG_PERIODIC); RT_ASSERT(g_sNuADC.psRtTouchMenuTimer != RT_NULL); +#endif rt_memset(&g_sNuADC.m_isr, 0, sizeof(g_sNuADC.m_isr)); rt_memset(&g_sNuADC.m_wkisr, 0, sizeof(g_sNuADC.m_wkisr)); diff --git a/bsp/nuvoton/libraries/n9h30/rtt_port/drv_adc.h b/bsp/nuvoton/libraries/n9h30/rtt_port/drv_adc.h index 2269f1f35c..ead185e0c1 100644 --- a/bsp/nuvoton/libraries/n9h30/rtt_port/drv_adc.h +++ b/bsp/nuvoton/libraries/n9h30/rtt_port/drv_adc.h @@ -15,9 +15,13 @@ #include #include "nu_adc.h" -#include "touch.h" +#if defined(BSP_USING_ADC_TOUCH) + #include "touch.h" +#endif -#define TOUCH_MQ_LENGTH 128 +#define TOUCH_MQ_LENGTH 64 + +#define DEF_CAL_POINT_NUM 5 typedef enum { @@ -52,13 +56,29 @@ typedef struct typedef nu_adc_cb *nu_adc_cb_t; -int32_t nu_adc_read_touch_xyz(uint16_t *bufX, uint16_t *bufY, uint16_t *bufZ0, uint16_t *bufZ1, int32_t dataCnt); +#if defined(BSP_USING_ADC_TOUCH) +typedef struct +{ + int32_t x; + int32_t y; +} S_COORDINATE_POINT; + +typedef struct +{ + int32_t a; + int32_t b; + int32_t c; + int32_t d; + int32_t e; + int32_t f; + int32_t div; +} S_CALIBRATION_MATRIX; + +int32_t nu_adc_touch_read_xyz(uint32_t *bufX, uint32_t *bufY, uint32_t *bufZ0, uint32_t *bufZ1, int32_t dataCnt); rt_err_t nu_adc_touch_enable(rt_touch_t psRtTouch); rt_err_t nu_adc_touch_disable(void); void nu_adc_touch_detect(rt_bool_t bStartDetect); void nu_adc_touch_start_conv(void); - -void nu_adc_touch_update_caldata(int *psi32NewValue); -void nu_adc_touch_reset_caldata(int *psi32NewValue); +#endif #endif /* __DRV_ADC_H__ */ diff --git a/bsp/nuvoton/libraries/n9h30/rtt_port/drv_adc_touch.c b/bsp/nuvoton/libraries/n9h30/rtt_port/drv_adc_touch.c index fb1f4433cf..9d4848251c 100644 --- a/bsp/nuvoton/libraries/n9h30/rtt_port/drv_adc_touch.c +++ b/bsp/nuvoton/libraries/n9h30/rtt_port/drv_adc_touch.c @@ -15,9 +15,15 @@ #include "NuMicro.h" #include +#include #include "drv_adc.h" #include "touch.h" +#if !defined(PATH_CALIBRATION_FILE) + #define PATH_CALIBRATION_FILE "/mnt/filesystem/ts_calibration" +#endif + + typedef struct { struct rt_touch_device dev; @@ -28,41 +34,135 @@ typedef nu_adc_touch *nu_adc_touch_t; static nu_adc_touch s_NuAdcTouch = {0}; -#define DEF_CALDATA_LENGTH 7 - -#if defined(LCM_USING_FW043TFT) - #define LCM_WIDTH 480 - #define LCM_HEIGHT 272 - static int cal_data_a[DEF_CALDATA_LENGTH] = { 8824, -34, -2261272, -70, -6302, 21805816, 65536 }; +#if (BSP_LCD_WIDTH==480) && (BSP_LCD_HEIGHT==272) +static S_CALIBRATION_MATRIX g_sCalMat = { 8824, -34, -2261272, -70, -6302, 21805816, 65536 }; +static volatile uint32_t g_u32Calibrated = 1; +#elif (BSP_LCD_WIDTH==800) && (BSP_LCD_HEIGHT==480) +static S_CALIBRATION_MATRIX g_sCalMat = { 13230, -66, -1161952, -85, 8600, -1636996, 65536 }; +static volatile uint32_t g_u32Calibrated = 1; #else - #define LCM_WIDTH 800 - #define LCM_HEIGHT 480 - #if defined(LCM_USING_FW070TFT) - static int cal_data_a[DEF_CALDATA_LENGTH] = { 13230, -66, -1161952, -85, 8600, -1636996, 65536 }; - #else - static int cal_data_a[DEF_CALDATA_LENGTH] = { 1, 0, 0, 0, 1, 0, 1 }; - #endif +static S_CALIBRATION_MATRIX g_sCalMat = { 1, 0, 0, 0, 1, 0, 1 }; +static volatile uint32_t g_u32Calibrated = 0; #endif -static const int cal_zero[DEF_CALDATA_LENGTH] = { 1, 0, 0, 0, 1, 0, 1 }; +static int nu_adc_touch_readfile(void); -static void nu_adc_touch_cal(int *sumx, int *sumy) +static const S_CALIBRATION_MATRIX g_sCalZero = { 1, 0, 0, 0, 1, 0, 1 }; + +static int nu_adc_cal_mat_get(const S_COORDINATE_POINT *psDispCP, S_COORDINATE_POINT *psADCCP, S_CALIBRATION_MATRIX *psCM) { - int xtemp, ytemp; +#if (DEF_CAL_POINT_NUM==3) + + psCM->div = ((psADCCP[0].x - psADCCP[2].x) * (psADCCP[1].y - psADCCP[2].y)) - + ((psADCCP[1].x - psADCCP[2].x) * (psADCCP[0].y - psADCCP[2].y)) ; + + if (psCM->div == 0) + { + return -1; + } + else + { + psCM->a = ((psDispCP[0].x - psDispCP[2].x) * (psADCCP[1].y - psADCCP[2].y)) - + ((psDispCP[1].x - psDispCP[2].x) * (psADCCP[0].y - psADCCP[2].y)) ; + + psCM->b = ((psADCCP[0].x - psADCCP[2].x) * (psDispCP[1].x - psDispCP[2].x)) - + ((psDispCP[0].x - psDispCP[2].x) * (psADCCP[1].x - psADCCP[2].x)) ; + + psCM->c = (psADCCP[2].x * psDispCP[1].x - psADCCP[1].x * psDispCP[2].x) * psADCCP[0].y + + (psADCCP[0].x * psDispCP[2].x - psADCCP[2].x * psDispCP[0].x) * psADCCP[1].y + + (psADCCP[1].x * psDispCP[0].x - psADCCP[0].x * psDispCP[1].x) * psADCCP[2].y ; + + psCM->d = ((psDispCP[0].y - psDispCP[2].y) * (psADCCP[1].y - psADCCP[2].y)) - + ((psDispCP[1].y - psDispCP[2].y) * (psADCCP[0].y - psADCCP[2].y)) ; + + psCM->e = ((psADCCP[0].x - psADCCP[2].x) * (psDispCP[1].y - psDispCP[2].y)) - + ((psDispCP[0].y - psDispCP[2].y) * (psADCCP[1].x - psADCCP[2].x)) ; + + psCM->f = (psADCCP[2].x * psDispCP[1].y - psADCCP[1].x * psDispCP[2].y) * psADCCP[0].y + + (psADCCP[0].x * psDispCP[2].y - psADCCP[2].x * psDispCP[0].y) * psADCCP[1].y + + (psADCCP[1].x * psDispCP[0].y - psADCCP[0].x * psDispCP[1].y) * psADCCP[2].y ; + } + +#elif (DEF_CAL_POINT_NUM==5) + + int i; + float n, x, y, xx, yy, xy, z, zx, zy; + float a, b, c, d, e, f, g; + float scaling = 65536.0f; + + n = x = y = xx = yy = xy = 0; + for (i = 0; i < DEF_CAL_POINT_NUM; i++) + { + n += 1.0; + x += (float)psADCCP[i].x; + y += (float)psADCCP[i].y; + xx += (float)psADCCP[i].x * psADCCP[i].x; + yy += (float)psADCCP[i].y * psADCCP[i].y; + xy += (float)psADCCP[i].x * psADCCP[i].y; + } + + d = n * (xx * yy - xy * xy) + x * (xy * y - x * yy) + y * (x * xy - y * xx); + if (d < 0.1 && d > -0.1) + { + return -1; + } + + a = (xx * yy - xy * xy) / d; + b = (xy * y - x * yy) / d; + c = (x * xy - y * xx) / d; + e = (n * yy - y * y) / d; + f = (x * y - n * xy) / d; + g = (n * xx - x * x) / d; + + z = zx = zy = 0; + for (i = 0; i < DEF_CAL_POINT_NUM; i++) + { + z += (float)psDispCP[i].x; + zx += (float)psDispCP[i].x * psADCCP[i].x; + zy += (float)psDispCP[i].x * psADCCP[i].y; + } + + psCM->c = (int32_t)((a * z + b * zx + c * zy) * scaling); + psCM->a = (int32_t)((b * z + e * zx + f * zy) * scaling); + psCM->b = (int32_t)((c * z + f * zx + g * zy) * scaling); + + z = zx = zy = 0; + for (i = 0; i < DEF_CAL_POINT_NUM; i++) + { + z += (float)psDispCP[i].y; + zx += (float)psDispCP[i].y * psADCCP[i].x; + zy += (float)psDispCP[i].y * psADCCP[i].y; + } + + psCM->f = (int32_t)((a * z + b * zx + c * zy) * scaling); + psCM->d = (int32_t)((b * z + e * zx + f * zy) * scaling); + psCM->e = (int32_t)((c * z + f * zx + g * zy) * scaling); + + psCM->div = (int32_t)scaling; + +#else +#error "Not supported calibration method" +#endif + return 0; +} + +static void nu_adc_touch_cal(int32_t *sumx, int32_t *sumy) +{ + int32_t xtemp, ytemp; xtemp = *sumx; ytemp = *sumy; - *sumx = (cal_data_a[2] + - cal_data_a[0] * xtemp + - cal_data_a[1] * ytemp) / cal_data_a[6]; - *sumy = (cal_data_a[5] + - cal_data_a[3] * xtemp + - cal_data_a[4] * ytemp) / cal_data_a[6]; + *sumx = (g_sCalMat.c + + g_sCalMat.a * xtemp + + g_sCalMat.b * ytemp) / g_sCalMat.div; + *sumy = (g_sCalMat.f + + g_sCalMat.d * xtemp + + g_sCalMat.e * ytemp) / g_sCalMat.div; } static rt_size_t nu_adc_touch_readpoint(struct rt_touch_device *device, void *buf, rt_size_t read_num) { - static int last_report_x = 0, last_report_y = 0; + static uint32_t last_report_x = 0, last_report_y = 0; struct rt_touch_data *pPoint = (struct rt_touch_data *)buf; nu_adc_touch_t psNuAdcTouch = (nu_adc_touch_t)device; @@ -73,38 +173,44 @@ static rt_size_t nu_adc_touch_readpoint(struct rt_touch_device *device, void *bu for (i = 0; i < read_num; i++) { - int bufZ0 = 0, bufZ1 = 0; - int sumx = 0, sumy = 0; + uint32_t bufZ0 = 0, bufZ1 = 0; + int32_t sumx = 0, sumy = 0; pPoint[i].timestamp = rt_touch_get_ts(); pPoint[i].track_id = 0; - if (nu_adc_read_touch_xyz((uint16_t *)&sumx, (uint16_t *)&sumy, (uint16_t *)&bufZ0, (uint16_t *)&bufZ1, 1) != 1) + if (nu_adc_touch_read_xyz((uint32_t *)&sumx, (uint32_t *)&sumy, &bufZ0, &bufZ1, 1) != 1) break; if (bufZ0 == 0) { /* Workaround: In this case, x, y values are unstable. so, report last point's coordinate.*/ pPoint[i].event = RT_TOUCH_EVENT_UP; - pPoint[i].x_coordinate = last_report_x; - pPoint[i].y_coordinate = last_report_y; + pPoint[i].x_coordinate = (uint16_t)last_report_x; + pPoint[i].y_coordinate = (uint16_t)last_report_y; } else { - nu_adc_touch_cal(&sumx, &sumy); - pPoint[i].event = RT_TOUCH_EVENT_DOWN; - pPoint[i].x_coordinate = sumx; - pPoint[i].y_coordinate = sumy; + if (g_u32Calibrated) + { + nu_adc_touch_cal(&sumx, &sumy); + } last_report_x = sumx; last_report_y = sumy; + + pPoint[i].event = RT_TOUCH_EVENT_DOWN; + pPoint[i].x_coordinate = (uint16_t)sumx; + pPoint[i].y_coordinate = (uint16_t)sumy; } - bufZ0 = bufZ0 >> 3; + if (g_u32Calibrated) + { + bufZ0 = bufZ0 >> 3; + pPoint[i].width = (bufZ0 > 255) ? 255 : bufZ0; - pPoint[i].width = (bufZ0 > 255) ? 255 : bufZ0; - - //Limit max x, y coordinate if value is over its range. - pPoint[i].x_coordinate = (pPoint[i].x_coordinate > psNuAdcTouch->x_range) ? psNuAdcTouch->x_range : pPoint[i].x_coordinate; - pPoint[i].y_coordinate = (pPoint[i].y_coordinate > psNuAdcTouch->y_range) ? psNuAdcTouch->y_range : pPoint[i].y_coordinate; + //Limit max x, y coordinate if value is over its range. + pPoint[i].x_coordinate = (pPoint[i].x_coordinate > psNuAdcTouch->x_range) ? psNuAdcTouch->x_range : pPoint[i].x_coordinate; + pPoint[i].y_coordinate = (pPoint[i].y_coordinate > psNuAdcTouch->y_range) ? psNuAdcTouch->y_range : pPoint[i].y_coordinate; + } } return (rt_size_t)i; } @@ -150,14 +256,29 @@ static struct rt_touch_ops touch_ops = .touch_control = nu_adc_touch_control, }; -void nu_adc_touch_update_caldata(int *psi32NewValue) +static void nu_adc_touch_update_calmat(S_CALIBRATION_MATRIX *psNewCalMat) { - rt_memcpy(&cal_data_a[0], &psi32NewValue[0], sizeof(cal_data_a)); + if (psNewCalMat && + psNewCalMat->div != 0) + { + rt_memcpy(&g_sCalMat, psNewCalMat, sizeof(S_CALIBRATION_MATRIX)); + g_u32Calibrated = 1; + rt_kprintf("Applied calibration data: %d, %d, %d, %d, %d, %d, %d\n", + g_sCalMat.a, + g_sCalMat.b, + g_sCalMat.c, + g_sCalMat.d, + g_sCalMat.e, + g_sCalMat.f, + g_sCalMat.div); + + } } -void nu_adc_touch_reset_caldata(int *psi32NewValue) +static void nu_adc_touch_reset_calmat(void) { - rt_memcpy(&cal_data_a[0], &cal_zero[0], sizeof(cal_data_a)); + rt_memcpy(&g_sCalMat, &g_sCalZero, sizeof(S_CALIBRATION_MATRIX)); + g_u32Calibrated = 0; } int rt_hw_adc_touch_init(void) @@ -166,8 +287,8 @@ int rt_hw_adc_touch_init(void) s_NuAdcTouch.dev.info.type = RT_TOUCH_TYPE_RESISTANCE; s_NuAdcTouch.dev.info.vendor = RT_TOUCH_VENDOR_UNKNOWN; s_NuAdcTouch.dev.info.point_num = 1; - s_NuAdcTouch.dev.info.range_x = LCM_WIDTH; - s_NuAdcTouch.dev.info.range_y = LCM_HEIGHT; + s_NuAdcTouch.dev.info.range_x = BSP_LCD_WIDTH; + s_NuAdcTouch.dev.info.range_y = BSP_LCD_HEIGHT; s_NuAdcTouch.dev.ops = &touch_ops; @@ -179,10 +300,268 @@ INIT_DEVICE_EXPORT(rt_hw_adc_touch_init); static rt_thread_t adc_touch_thread = RT_NULL; static rt_sem_t adc_touch_sem = RT_NULL; static int adc_touch_worker_run = 0; + static rt_err_t adc_touch_rx_callback(rt_device_t dev, rt_size_t size) { - rt_sem_release(adc_touch_sem); + //rt_kprintf("[%s %d] %d\n", __func__, __LINE__, size); + return rt_sem_release(adc_touch_sem); +} + +static rt_err_t adc_request_point(rt_device_t pdev, struct rt_touch_data *psTouchPoint) +{ + rt_err_t ret = -RT_ERROR; + + if ((ret = rt_sem_take(adc_touch_sem, rt_tick_from_millisecond(500))) == RT_EOK) + { + rt_memset(psTouchPoint, 0, sizeof(struct rt_touch_data)); + + if (rt_device_read(pdev, 0, psTouchPoint, s_NuAdcTouch.dev.info.point_num) == s_NuAdcTouch.dev.info.point_num) + { + ret = RT_EOK; + } + + } + + return ret; +} + +RT_WEAK void nu_touch_inputevent_cb(rt_int16_t x, rt_int16_t y, rt_uint8_t event) +{ +} + +static rt_device_t lcd_device = 0; +static struct rt_device_graphic_info info; + +static void lcd_cleanscreen(void) +{ + if (info.framebuffer != RT_NULL) + { + /* Rendering */ + struct rt_device_rect_info rect; + + rt_memset(info.framebuffer, 0, (info.pitch * info.height)); + rect.x = 0; + rect.y = 0; + rect.width = info.width; + rect.height = info.height; + rt_device_control(lcd_device, RTGRAPHIC_CTRL_RECT_UPDATE, &rect); + } + else + { + // TODO + } +} + +#define DEF_DOT_NUMBER 9 +#define DOTS_NUMBER (DEF_DOT_NUMBER*DEF_DOT_NUMBER) +static void nu_draw_bots(int x, int y) +{ + if (info.framebuffer != RT_NULL) + { + /* Rendering */ + struct rt_device_rect_info rect; + int i, j; + int start_x = x - (DEF_DOT_NUMBER / 2); + int start_y = y - (DEF_DOT_NUMBER / 2); + + if (info.pixel_format == RTGRAPHIC_PIXEL_FORMAT_RGB565) + { + uint16_t *pu16Start = (uint16_t *)((uint32_t)info.framebuffer + (start_y) * info.pitch + (start_x * 2)); + for (j = 0; j < DEF_DOT_NUMBER; j++) + { + for (i = 0; i < DEF_DOT_NUMBER; i++) + pu16Start[i] = 0x07E0; //Green, RGB + pu16Start += info.width; + } + } + else if (info.pixel_format == RTGRAPHIC_PIXEL_FORMAT_ARGB888) + { + uint32_t *pu32Start = (uint32_t *)((uint32_t)info.framebuffer + (start_y) * info.pitch + (start_x * 4)); + for (j = 0; j < DEF_DOT_NUMBER; j++) + { + for (i = 0; i < DEF_DOT_NUMBER; i++) + pu32Start[i] = 0xff00ff00; //Green, ARGB + pu32Start += info.width; + } + } + else + { + //Not supported + } + + rect.x = 0; + rect.y = 0; + rect.width = info.width; + rect.height = info.height; + rt_device_control(lcd_device, RTGRAPHIC_CTRL_RECT_UPDATE, &rect); + } + else + { + // TODO + } +} + +#if (DEF_CAL_POINT_NUM==3) +const S_COORDINATE_POINT sDispPoints[DEF_CAL_POINT_NUM] = +{ + {BSP_LCD_WIDTH / 4, BSP_LCD_HEIGHT / 2}, + {BSP_LCD_WIDTH - BSP_LCD_WIDTH / 4, BSP_LCD_HEIGHT / 4}, + {BSP_LCD_WIDTH / 2, BSP_LCD_HEIGHT - BSP_LCD_HEIGHT / 4} +}; +#elif (DEF_CAL_POINT_NUM==5) +const static S_COORDINATE_POINT sDispPoints[DEF_CAL_POINT_NUM] = +{ +#define DEF_CUT_PIECES 8 + {BSP_LCD_WIDTH / DEF_CUT_PIECES, BSP_LCD_HEIGHT / DEF_CUT_PIECES}, + {BSP_LCD_WIDTH - BSP_LCD_WIDTH / DEF_CUT_PIECES, BSP_LCD_HEIGHT / DEF_CUT_PIECES}, + {BSP_LCD_WIDTH - BSP_LCD_WIDTH / DEF_CUT_PIECES, BSP_LCD_HEIGHT - BSP_LCD_HEIGHT / DEF_CUT_PIECES}, + {BSP_LCD_WIDTH / DEF_CUT_PIECES, BSP_LCD_HEIGHT - BSP_LCD_HEIGHT / DEF_CUT_PIECES}, + + {BSP_LCD_WIDTH / 2, BSP_LCD_HEIGHT / 2} +}; +#endif + +static int nu_adc_touch_readfile(void) +{ + int fd; + + S_CALIBRATION_MATRIX sCalMat; + + if ((fd = open(PATH_CALIBRATION_FILE, O_RDONLY, 0)) < 0) + { + goto exit_nu_adc_touch_readfile; + } + else if (read(fd, &sCalMat, sizeof(S_CALIBRATION_MATRIX)) == sizeof(S_CALIBRATION_MATRIX)) + { + rt_kprintf("[%s] %s\n", __func__, PATH_CALIBRATION_FILE); + } + + close(fd); + + nu_adc_touch_update_calmat(&sCalMat); + return 0; + +exit_nu_adc_touch_readfile: + + return -1; +} + +static int nu_adc_touch_writefile(void *buf, int buf_len) +{ + int fd; + + if ((fd = open(PATH_CALIBRATION_FILE, O_WRONLY | O_CREAT, 0)) < 0) + { + goto exit_nu_adc_touch_writefile; + } + else if (write(fd, buf, buf_len) == buf_len) + { + rt_kprintf("[%s] %s\n", __func__, PATH_CALIBRATION_FILE); + } + + close(fd); + + return 0; + +exit_nu_adc_touch_writefile: + + return -1; +} + +static void nu_touch_do_calibration(rt_device_t pdev) +{ + int i; + rt_err_t result; + + S_CALIBRATION_MATRIX sCalMat; + S_COORDINATE_POINT sADCPoints[DEF_CAL_POINT_NUM]; + + lcd_device = rt_device_find("lcd"); + if (!lcd_device) + { + rt_kprintf("Not supported graphics ops\n"); + return; + } + + result = rt_device_control(lcd_device, RTGRAPHIC_CTRL_GET_INFO, &info); + if (result != RT_EOK) + { + rt_kprintf("error!"); + return; + } + + result = rt_device_open(lcd_device, 0); + if (result != RT_EOK) + { + rt_kprintf("opened?"); + } + + rt_device_control(lcd_device, RTGRAPHIC_CTRL_PAN_DISPLAY, info.framebuffer); + rt_device_control(lcd_device, RTGRAPHIC_CTRL_POWERON, RT_NULL); + + for (i = 0; i < DEF_CAL_POINT_NUM; i++) + { + struct rt_touch_data sTouchPoint; + int count = 0; + + lcd_cleanscreen(); + + /* Drain RX queue before doing calibrate. */ + while (adc_request_point(pdev, &sTouchPoint) == RT_EOK); + + rt_thread_mdelay(100); + + /* Ready to calibrate */ + nu_draw_bots(sDispPoints[i].x, sDispPoints[i].y); + +#define DEF_MAX_GET_POINT_NUM 5 + + sADCPoints[i].x = 0; + sADCPoints[i].y = 0; + + while (count < DEF_MAX_GET_POINT_NUM) + { + if (adc_request_point(pdev, &sTouchPoint) == RT_EOK) + { + sADCPoints[i].x += (int32_t)sTouchPoint.x_coordinate; + sADCPoints[i].y += (int32_t)sTouchPoint.y_coordinate; + rt_kprintf("[%d %d] - Disp:[%d, %d] -> ADC:[%d, %d]\n", i, count, sDispPoints[i].x, sDispPoints[i].y, sADCPoints[i].x, sADCPoints[i].y); + count++; + } + } + + sADCPoints[i].x = (int32_t)((float)sADCPoints[i].x / DEF_MAX_GET_POINT_NUM); + sADCPoints[i].y = (int32_t)((float)sADCPoints[i].y / DEF_MAX_GET_POINT_NUM); + rt_kprintf("[%d] - Disp:[%d, %d], ADC:[%d, %d]\n", i, sDispPoints[i].x, sDispPoints[i].y, sADCPoints[i].x, sADCPoints[i].y); + + rt_thread_mdelay(300); + } + + lcd_cleanscreen(); + + /* Get calibration matrix. */ + if (nu_adc_cal_mat_get(&sDispPoints[0], &sADCPoints[0], &sCalMat) == 0) + { + /* Finally, update calibration matrix to drivers. */ + nu_adc_touch_update_calmat(&sCalMat); + + nu_adc_touch_writefile(&sCalMat, sizeof(sCalMat)); + + for (i = 0; i < DEF_CAL_POINT_NUM; i++) + { + rt_kprintf("[%d] - Disp:[%d, %d], ADC:[%d, %d]\n", i, sDispPoints[i].x, sDispPoints[i].y, sADCPoints[i].x, sADCPoints[i].y); + } + } + else + { + rt_kprintf("Failed to calibrate.\n"); + } + + rt_device_control(lcd_device, RTGRAPHIC_CTRL_POWEROFF, RT_NULL); + rt_device_close(lcd_device); + + return; } static void adc_touch_entry(void *parameter) @@ -190,66 +569,63 @@ static void adc_touch_entry(void *parameter) struct rt_touch_data touch_point; rt_err_t result; - rt_device_t pdev = &s_NuAdcTouch.dev.parent; + rt_device_t pdev; int max_range; adc_touch_sem = rt_sem_create("adc_touch_sem", 0, RT_IPC_FLAG_FIFO); RT_ASSERT(adc_touch_sem != RT_NULL); + pdev = rt_device_find("adc_touch"); + if (!pdev) + { + rt_kprintf("Not found\n"); + return ; + } + + nu_adc_touch_readfile(); + result = rt_device_open(pdev, RT_DEVICE_FLAG_INT_RX); RT_ASSERT(result == RT_EOK); result = rt_device_set_rx_indicate(pdev, adc_touch_rx_callback); RT_ASSERT(result == RT_EOK); - max_range = LCM_WIDTH; + max_range = BSP_LCD_WIDTH; result = rt_device_control(pdev, RT_TOUCH_CTRL_SET_X_RANGE, (void *)&max_range); RT_ASSERT(result == RT_EOK); - max_range = LCM_HEIGHT; + max_range = BSP_LCD_HEIGHT; result = rt_device_control(pdev, RT_TOUCH_CTRL_SET_Y_RANGE, (void *)&max_range); RT_ASSERT(result == RT_EOK); - // nu_adc_touch_reset_caldata(int *psi32NewValue); - // nu_adc_touch_update_caldata(int *psi32NewValue); - result = rt_device_control(pdev, RT_TOUCH_CTRL_POWER_ON, RT_NULL); RT_ASSERT(result == RT_EOK); while (adc_touch_worker_run) { - if ((-RT_ETIMEOUT == rt_sem_take(adc_touch_sem, rt_tick_from_millisecond(100)))) + if (!g_u32Calibrated) + { + rt_kprintf("Start ADC touching calibration.\n"); + nu_touch_do_calibration(pdev); + rt_kprintf("Stop ADC touching calibration.\n"); continue; + } - rt_memset(&touch_point, 0, sizeof(struct rt_touch_data)); - - if (rt_device_read(pdev, 0, &touch_point, s_NuAdcTouch.dev.info.point_num) == s_NuAdcTouch.dev.info.point_num) + if (adc_request_point(pdev, &touch_point) == RT_EOK) { if (touch_point.event == RT_TOUCH_EVENT_DOWN || touch_point.event == RT_TOUCH_EVENT_UP || touch_point.event == RT_TOUCH_EVENT_MOVE) { - -#if defined(PKG_USING_LVGL) - extern void nu_touch_inputevent_cb(rt_int16_t x, rt_int16_t y, rt_uint8_t state); nu_touch_inputevent_cb(touch_point.x_coordinate, touch_point.y_coordinate, touch_point.event); -#elif defined(PKG_USING_LITTLEVGL2RTT) - extern void littlevgl2rtt_send_input_event(rt_int16_t x, rt_int16_t y, rt_uint8_t state); - littlevgl2rtt_send_input_event(touch_point.x_coordinate, touch_point.y_coordinate, touch_point.event); -#endif -#if defined(PKG_USING_NUEMWIN) - extern void nuemwin_send_input_event(rt_int16_t x, rt_int16_t y, rt_uint8_t state); - nuemwin_send_input_event(touch_point.x_coordinate, touch_point.y_coordinate, touch_point.event); -#endif - rt_kprintf("[%d-%d] id=%d width=%d x=%d y=%d\n", - touch_point.timestamp, - touch_point.event, - touch_point.track_id, - touch_point.width, + rt_kprintf("x=%d y=%d event=%s%s%s\n", touch_point.x_coordinate, - touch_point.y_coordinate); + touch_point.y_coordinate, + (touch_point.event == RT_TOUCH_EVENT_DOWN) ? "DOWN" : "", + (touch_point.event == RT_TOUCH_EVENT_UP) ? "UP" : "", + (touch_point.event == RT_TOUCH_EVENT_MOVE) ? "MOVE" : ""); } } } @@ -270,7 +646,7 @@ static rt_err_t nu_touch_start(int argc, char **argv) adc_touch_thread = rt_thread_create("adc_touch_thread", adc_touch_entry, RT_NULL, - 1024, + 4096, 25, 5); adc_touch_worker_run = 1; @@ -290,4 +666,19 @@ static rt_err_t nu_touch_stop(int argc, char **argv) } MSH_CMD_EXPORT(nu_touch_stop, e.g: stop adc touch); +static int nu_touch_autostart(void) +{ + return nu_touch_start(0, RT_NULL); +} +INIT_APP_EXPORT(nu_touch_autostart); + +static rt_err_t nu_touch_calibration(int argc, char **argv) +{ + /* Clean calibration matrix data for getting raw adc value. */ + nu_adc_touch_reset_calmat(); + + return 0; +} +MSH_CMD_EXPORT(nu_touch_calibration, for adc touch); + #endif //#if defined(BSP_USING_ADC_TOUCH) diff --git a/bsp/nuvoton/libraries/n9h30/rtt_port/drv_can.c b/bsp/nuvoton/libraries/n9h30/rtt_port/drv_can.c index a4da2879cf..aedd61f018 100644 --- a/bsp/nuvoton/libraries/n9h30/rtt_port/drv_can.c +++ b/bsp/nuvoton/libraries/n9h30/rtt_port/drv_can.c @@ -58,6 +58,7 @@ struct nu_can IRQn_Type irqn; E_SYS_IPRST rstidx; E_SYS_IPCLK clkidx; + uint32_t int_flag; }; typedef struct nu_can *nu_can_t; @@ -106,16 +107,16 @@ static const struct can_configure nu_can_default_config = NU_CAN_CONFIG_DEFAULT; /* Interrupt Handle Function ----------------------------------------------------*/ static void nu_can_isr(int vector, void *param) { - uint32_t u32IIDRstatus; nu_can_t psNuCAN = (nu_can_t)param; /* Get base address of CAN register */ CAN_T *base = psNuCAN->base; /* Get interrupt event */ - u32IIDRstatus = CAN_GET_INT_PENDING_STATUS(base); + uint32_t u32IIDRstatus = CAN_GET_INT_PENDING_STATUS(base) & CAN_IIDR_INTID_Msk; - if (u32IIDRstatus == 0x00008000) /* Check Status Interrupt Flag (Error status Int and Status change Int) */ + /* Check Status Interrupt Flag (Error status Int and Status change Int) */ + if (u32IIDRstatus == 0x00008000) { /**************************/ /* Status Change interrupt*/ @@ -123,20 +124,24 @@ static void nu_can_isr(int vector, void *param) if (base->STATUS & CAN_STATUS_TXOK_Msk) { base->STATUS &= ~CAN_STATUS_TXOK_Msk; /* Clear Tx Ok status*/ - //rt_kprintf("%s: TX\n", psNuCAN->name) ; #ifndef RT_CAN_USING_HDR - /* Using as Lisen,Loopback,Loopback+Lisen mode*/ - rt_hw_can_isr(&psNuCAN->dev, RT_CAN_EVENT_TX_DONE); + if (psNuCAN->int_flag & RT_DEVICE_FLAG_INT_TX) + { + /*Using as Lisen,Loopback,Loopback+Lisen mode*/ + rt_hw_can_isr(&psNuCAN->dev, RT_CAN_EVENT_TX_DONE); + } #endif } if (base->STATUS & CAN_STATUS_RXOK_Msk) { base->STATUS &= ~CAN_STATUS_RXOK_Msk; /* Clear Rx Ok status*/ - //rt_kprintf("%s: RX\n", psNuCAN->name) ; #ifndef RT_CAN_USING_HDR - /* Using as Lisen,Loopback,Loopback+Lisen mode*/ - rt_hw_can_isr(&psNuCAN->dev, RT_CAN_EVENT_RX_IND); + if (psNuCAN->int_flag & RT_DEVICE_FLAG_INT_RX) + { + /*Using as Lisen,Loopback,Loopback+Lisen mode*/ + rt_hw_can_isr(&psNuCAN->dev, RT_CAN_EVENT_RX_IND); + } #endif } @@ -145,17 +150,16 @@ static void nu_can_isr(int vector, void *param) /**************************/ if (base->STATUS & CAN_STATUS_EWARN_Msk) { - rt_kprintf("%s: EWARN\n", psNuCAN->name) ; + rt_kprintf("[%s]EWARN INT\n", psNuCAN->name) ; } if (base->STATUS & CAN_STATUS_BOFF_Msk) { - rt_kprintf("%s: BUSOFF\n", psNuCAN->name) ; + rt_kprintf("[%s]BUSOFF INT\n", psNuCAN->name) ; - /* Do Init to release busoff pin */ - base->CON = (CAN_CON_INIT_Msk | CAN_CON_CCE_Msk); - base->CON &= (~(CAN_CON_INIT_Msk | CAN_CON_CCE_Msk)); - while (base->CON & CAN_CON_INIT_Msk); + /* To release busoff pin */ + CAN_EnterInitMode(base, CAN_CON_INIT_Msk | CAN_CON_CCE_Msk); + CAN_LeaveInitMode(base); } if (base->STATUS & CAN_STATUS_LEC_Msk) @@ -168,66 +172,83 @@ static void nu_can_isr(int vector, void *param) /*IntId: 0x0001-0x0020, Number of Message Object which caused the interrupt.*/ else if (u32IIDRstatus > 0 && u32IIDRstatus <= 32) { - /*Message RAM 0~RX_MSG_ID_INDEX for CAN Tx using*/ - if (u32IIDRstatus <= RX_MSG_ID_INDEX) + if ((psNuCAN->int_flag & RT_DEVICE_FLAG_INT_TX) && + (u32IIDRstatus <= RX_MSG_ID_INDEX)) { - //rt_kprintf("[%s-Tx]IntId = %d\n", psNuCAN->name, u32IIDRstatus); + /*Message RAM 0~RX_MSG_ID_INDEX for CAN Tx using*/ rt_hw_can_isr(&psNuCAN->dev, RT_CAN_EVENT_TX_DONE); } - else /*Message RAM RX_MSG_ID_INDEX~31 for CAN Rx using*/ + else if (psNuCAN->int_flag & RT_DEVICE_FLAG_INT_RX) { - //rt_kprintf("[%s-Rx]IntId = %d\n", psNuCAN->name, u32IIDRstatus); + /*Message RAM RX_MSG_ID_INDEX~31 for CAN Rx using*/ rt_hw_can_isr(&psNuCAN->dev, (RT_CAN_EVENT_RX_IND | ((u32IIDRstatus - 1) << 8))); } CAN_CLR_INT_PENDING_BIT(base, (u32IIDRstatus - 1)); /* Clear Interrupt Pending */ } #endif - } +static void nu_can_ie(nu_can_t psNuCAN) +{ + uint32_t u32CanIE = CAN_CON_IE_Msk; + + if (psNuCAN->int_flag & (RT_DEVICE_FLAG_INT_RX | RT_DEVICE_FLAG_INT_TX)) + { + u32CanIE |= CAN_CON_SIE_Msk; + } + else + { + u32CanIE &= ~CAN_CON_SIE_Msk; + } + + if (psNuCAN->int_flag & RT_DEVICE_CAN_INT_ERR) + { + u32CanIE |= CAN_CON_EIE_Msk; + } + else + { + u32CanIE &= ~CAN_CON_EIE_Msk; + } + + if (u32CanIE & (CAN_CON_SIE_Msk | CAN_CON_EIE_Msk)) + { + CAN_EnableInt(psNuCAN->base, u32CanIE); + + /* Enable interrupt. */ + rt_hw_interrupt_umask(psNuCAN->irqn); + } + else + { + u32CanIE |= (CAN_CON_IE_Msk | CAN_CON_SIE_Msk); + CAN_DisableInt(psNuCAN->base, u32CanIE); + + /* Disable interrupt. */ + rt_hw_interrupt_mask(psNuCAN->irqn); + } +} static rt_err_t nu_can_configure(struct rt_can_device *can, struct can_configure *cfg) { nu_can_t psNuCAN = (nu_can_t)can; + uint32_t u32CANMode; - RT_ASSERT(can != RT_NULL); - RT_ASSERT(cfg != RT_NULL); + RT_ASSERT(can); + RT_ASSERT(cfg); /* Get base address of CAN register */ CAN_T *base = psNuCAN->base; - RT_ASSERT(base != RT_NULL); - - switch (cfg->mode) - { - /* CAN default Normal mode */ - case RT_CAN_MODE_NORMAL: - can->config.mode = CAN_NORMAL_MODE; - break; - case RT_CAN_MODE_LISEN: - can->config.mode = RT_CAN_MODE_LISEN; - break; - case RT_CAN_MODE_LOOPBACK: - can->config.mode = RT_CAN_MODE_LOOPBACK; - break; - case RT_CAN_MODE_LOOPBACKANLISEN: - can->config.mode = RT_CAN_MODE_LOOPBACKANLISEN; - break; - default: - rt_kprintf("Unsupported Operating mode"); - goto exit_nu_can_configure; - } - + /* Reset this module */ nu_sys_ip_reset(psNuCAN->rstidx); - /*Set the CAN Bit Rate and Operating mode*/ - if (CAN_Open(base, can->config.baud_rate, can->config.mode) < 1) - return -(RT_ERROR); + u32CANMode = (cfg->mode == RT_CAN_MODE_NORMAL) ? CAN_NORMAL_MODE : CAN_BASIC_MODE; + /*Set the CAN Bit Rate and Operating mode*/ + if (CAN_Open(base, cfg->baud_rate, u32CANMode) != cfg->baud_rate) + goto exit_nu_can_configure; switch (cfg->mode) { - /* CAN default Normal mode */ case RT_CAN_MODE_NORMAL: #ifdef RT_CAN_USING_HDR CAN_LeaveTestMode(base); @@ -249,6 +270,7 @@ static rt_err_t nu_can_configure(struct rt_can_device *can, struct can_configure goto exit_nu_can_configure; } + nu_can_ie(psNuCAN); return RT_EOK; @@ -261,73 +283,33 @@ exit_nu_can_configure: static rt_err_t nu_can_control(struct rt_can_device *can, int cmd, void *arg) { - rt_uint32_t argval; - nu_can_t psNuCAN = (nu_can_t)can; + rt_uint32_t argval = (rt_uint32_t)arg; + nu_can_t psNuCAN = (nu_can_t)can; -#ifdef RT_CAN_USING_HDR - struct rt_can_filter_config *filter_cfg; -#endif - /* Get base address of CAN register */ - CAN_T *base = psNuCAN->base; - - RT_ASSERT(base != RT_NULL); - /* Check baud rate */ - RT_ASSERT(can->config.baud_rate != 0); + RT_ASSERT(can); switch (cmd) { - case RT_DEVICE_CTRL_CLR_INT: - argval = (rt_uint32_t) arg; - if ((argval == RT_DEVICE_FLAG_INT_RX) || (argval == RT_DEVICE_FLAG_INT_TX)) - { - /* Disable NVIC interrupt. */ - rt_hw_interrupt_mask(psNuCAN->irqn); - - /* Disable Status Change Interrupt */ - CAN_DisableInt(base, CAN_CON_IE_Msk | CAN_CON_SIE_Msk); - - } - else if (argval == RT_DEVICE_CAN_INT_ERR) - { - /* Disable interrupt. */ - rt_hw_interrupt_mask(psNuCAN->irqn); - - /* Disable Error Interrupt */ - CAN_DisableInt(base, CAN_CON_EIE_Msk); - } - break; - case RT_DEVICE_CTRL_SET_INT: - argval = (rt_uint32_t) arg; - if (argval == RT_DEVICE_FLAG_INT_RX || (argval == RT_DEVICE_FLAG_INT_TX)) - { - /* Enable Status Change Interrupt */ - CAN_EnableInt(base, CAN_CON_IE_Msk | CAN_CON_SIE_Msk); - - /* Enable interrupt. */ - rt_hw_interrupt_umask(psNuCAN->irqn); - } - else if (argval == RT_DEVICE_CAN_INT_ERR) - { - /* Enable Error Status and Status Change Interrupt */ - CAN_EnableInt(base, CAN_CON_IE_Msk | CAN_CON_SIE_Msk | CAN_CON_EIE_Msk); - - /* Enable interrupt. */ - rt_hw_interrupt_umask(psNuCAN->irqn); - } + psNuCAN->int_flag |= argval; + nu_can_ie(psNuCAN); + break; + + case RT_DEVICE_CTRL_CLR_INT: + psNuCAN->int_flag &= ~argval; + nu_can_ie(psNuCAN); break; -#ifdef RT_CAN_USING_HDR case RT_CAN_CMD_SET_FILTER: - filter_cfg = (struct rt_can_filter_config *)arg; + { + struct rt_can_filter_config *filter_cfg = (struct rt_can_filter_config *)arg; for (int i = 0; i < filter_cfg->count; i++) { - /*set the filter message object*/ if (filter_cfg->items[i].mode == 1) { - if (CAN_SetRxMsgObjAndMsk(base, MSG(filter_cfg->items[i].hdr + RX_MSG_ID_INDEX), filter_cfg->items[i].ide, filter_cfg->items[i].id, filter_cfg->items[i].mask, FALSE) == FALSE) + if (CAN_SetRxMsgObjAndMsk(psNuCAN->base, MSG(filter_cfg->items[i].hdr + RX_MSG_ID_INDEX), filter_cfg->items[i].ide, filter_cfg->items[i].id, filter_cfg->items[i].mask, FALSE) == FALSE) { return -(RT_ERROR); } @@ -335,46 +317,61 @@ static rt_err_t nu_can_control(struct rt_can_device *can, int cmd, void *arg) else { /*set the filter message object*/ - if (CAN_SetRxMsgAndMsk(base, MSG(filter_cfg->items[i].hdr + RX_MSG_ID_INDEX), filter_cfg->items[i].ide, filter_cfg->items[i].id, filter_cfg->items[i].mask) == FALSE) + if (CAN_SetRxMsgAndMsk(psNuCAN->base, MSG(filter_cfg->items[i].hdr + RX_MSG_ID_INDEX), filter_cfg->items[i].ide, filter_cfg->items[i].id, filter_cfg->items[i].mask) == FALSE) { return -(RT_ERROR); } } } - break; -#endif + } + break; case RT_CAN_CMD_SET_MODE: - argval = (rt_uint32_t) arg; - if (argval != RT_CAN_MODE_NORMAL && argval != RT_CAN_MODE_LISEN && - argval != RT_CAN_MODE_LOOPBACK && argval != RT_CAN_MODE_LOOPBACKANLISEN) + if ((argval == RT_CAN_MODE_NORMAL) || + (argval == RT_CAN_MODE_LISEN) || + (argval == RT_CAN_MODE_LOOPBACK) || + (argval == RT_CAN_MODE_LOOPBACKANLISEN)) + { + if (argval != can->config.mode) + { + can->config.mode = argval; + return nu_can_configure(can, &can->config); + } + } + else { return -(RT_ERROR); } - if (argval != can->config.mode) - { - can->config.mode = argval; - return nu_can_configure(can, &can->config); - } break; case RT_CAN_CMD_SET_BAUD: - argval = (rt_uint32_t) arg; - if (argval != CAN1MBaud && argval != CAN800kBaud && argval != CAN500kBaud && argval != CAN250kBaud && - argval != CAN125kBaud && argval != CAN100kBaud && argval != CAN50kBaud && argval != CAN20kBaud && argval != CAN10kBaud) + { + if ((argval == CAN1MBaud) || + (argval == CAN800kBaud) || + (argval == CAN500kBaud) || + (argval == CAN250kBaud) || + (argval == CAN125kBaud) || + (argval == CAN100kBaud) || + (argval == CAN50kBaud) || + (argval == CAN20kBaud) || + (argval == CAN10kBaud)) + { + if (argval != can->config.baud_rate) + { + can->config.baud_rate = argval; + return nu_can_configure(can, &can->config); + } + } + else { return -(RT_ERROR); } - if (argval != can->config.baud_rate) - { - can->config.baud_rate = argval; - return nu_can_configure(can, &can->config); - } - break; + } + break; case RT_CAN_CMD_SET_PRIV: - argval = (rt_uint32_t) arg; - if (argval != RT_CAN_MODE_PRIV && argval != RT_CAN_MODE_NOPRIV) + if (argval != RT_CAN_MODE_PRIV && + argval != RT_CAN_MODE_NOPRIV) { return -(RT_ERROR); } @@ -387,16 +384,23 @@ static rt_err_t nu_can_control(struct rt_can_device *can, int cmd, void *arg) case RT_CAN_CMD_GET_STATUS: { - rt_uint32_t errtype; - errtype = base->ERR; - /*Receive Error Counter*/ + rt_uint32_t errtype = psNuCAN->base->ERR; + + RT_ASSERT(arg); + + /*Receive Error Counter, return value is with Receive Error Passive.*/ can->status.rcverrcnt = (errtype >> 8); + /*Transmit Error Counter*/ - can->status.snderrcnt = ((errtype >> 24) & 0xFF); - can->status.lasterrtype = CAN_GET_INT_STATUS(base) & 0x8000; - /*status error code*/ - can->status.errcode = CAN_GET_INT_STATUS(base) & 0x07; - rt_memcpy(arg, &can->status, sizeof(can->status)); + can->status.snderrcnt = (errtype & 0xFF); + + /*Last Error Type*/ + can->status.lasterrtype = CAN_GET_INT_STATUS(psNuCAN->base) & 0x8000; + + /*Status error code*/ + can->status.errcode = CAN_GET_INT_STATUS(psNuCAN->base) & 0x07; + + rt_memcpy(arg, &can->status, sizeof(struct rt_can_status)); } break; @@ -411,64 +415,91 @@ static rt_err_t nu_can_control(struct rt_can_device *can, int cmd, void *arg) static int nu_can_sendmsg(struct rt_can_device *can, const void *buf, rt_uint32_t boxno) { STR_CANMSG_T tMsg; - struct rt_can_msg *pmsg = (struct rt_can_msg *) buf; + struct rt_can_msg *pmsg; + nu_can_t psNuCAN = (nu_can_t)can; - /* Get base address of CAN register */ - CAN_T *base = ((nu_can_t)can)->base; + RT_ASSERT(can); + RT_ASSERT(buf); - RT_ASSERT(base != RT_NULL); - RT_ASSERT(buf != RT_NULL); + pmsg = (struct rt_can_msg *) buf; - /* Check the parameters */ - RT_ASSERT(IS_CAN_DLC(pmsg->len)); - - /* Standard ID (11 bits)*/ - if (pmsg->ide == RT_CAN_STDID) + if (pmsg->ide == RT_CAN_STDID && IS_CAN_STDID(pmsg->id)) { + /* Standard ID (11 bits)*/ tMsg.IdType = CAN_STD_ID; - RT_ASSERT(IS_CAN_STDID(pmsg->id)) tMsg.Id = pmsg->id ; } - else + else if (pmsg->ide == RT_CAN_EXTID && IS_CAN_EXTID(pmsg->id)) { /* Extended ID (29 bits)*/ tMsg.IdType = CAN_EXT_ID; - RT_ASSERT(IS_CAN_EXTID(pmsg->id)); tMsg.Id = pmsg->id ; } + else + { + goto exit_nu_can_sendmsg; + } if (pmsg->rtr == RT_CAN_DTR) { /* Data frame */ tMsg.FrameType = CAN_DATA_FRAME; } - else + else if (pmsg->rtr == RT_CAN_RTR) { /* Remote frame */ tMsg.FrameType = CAN_REMOTE_FRAME; } - tMsg.DLC = pmsg->len; - rt_memcpy(tMsg.Data, pmsg->data, pmsg->len); - - if (CAN_Transmit(base, MSG(boxno), &tMsg) == FALSE) // Configure Msg RAM and send the Msg in the RAM + else { - return -(RT_ERROR); + goto exit_nu_can_sendmsg; + } + + /* Check the parameters */ + if (IS_CAN_DLC(pmsg->len)) + { + tMsg.DLC = pmsg->len; + } + else + { + goto exit_nu_can_sendmsg; + } + + if (pmsg->data && pmsg->len) + { + rt_memcpy(&tMsg.Data[0], pmsg->data, pmsg->len); + } + else + { + goto exit_nu_can_sendmsg; + } + + /* Configure Msg RAM and send the Msg in the RAM. */ + if (CAN_Transmit(psNuCAN->base, MSG(boxno), &tMsg) == FALSE) + { + goto exit_nu_can_sendmsg; } return RT_EOK; + +exit_nu_can_sendmsg: + + return -(RT_ERROR); } + static int nu_can_recvmsg(struct rt_can_device *can, void *buf, rt_uint32_t boxno) { STR_CANMSG_T tMsg; - struct rt_can_msg *pmsg = (struct rt_can_msg *) buf; - /* Get base address of CAN register */ - CAN_T *base = ((nu_can_t)can)->base; + struct rt_can_msg *pmsg; + nu_can_t psNuCAN = (nu_can_t)can; - RT_ASSERT(base != RT_NULL); - RT_ASSERT(buf != RT_NULL); + RT_ASSERT(can); + RT_ASSERT(buf); + + pmsg = (struct rt_can_msg *) buf; /* get data */ - if (CAN_Receive(base, boxno, &tMsg) == FALSE) + if (CAN_Receive(psNuCAN->base, boxno, &tMsg) == FALSE) { rt_kprintf("No available RX Msg.\n"); return -(RT_ERROR); @@ -480,32 +511,13 @@ static int nu_can_recvmsg(struct rt_can_device *can, void *buf, rt_uint32_t boxn can->hdr[pmsg->hdr].connected = 1; #endif - /* Standard ID (11 bits)*/ - if (tMsg.IdType == CAN_STD_ID) - { - pmsg->ide = RT_CAN_STDID; - pmsg->id = tMsg.Id; - } - else /* Extended ID (29 bits)*/ - { - pmsg->ide = RT_CAN_EXTID; - pmsg->id = tMsg.Id; - } - - if (tMsg.FrameType == CAN_DATA_FRAME) - { - /* Data frame */ - pmsg->rtr = RT_CAN_DTR; - } - else - { - /* Remote frame */ - pmsg->rtr = RT_CAN_RTR; - } - + pmsg->ide = (tMsg.IdType == CAN_STD_ID) ? RT_CAN_STDID : RT_CAN_EXTID; + pmsg->rtr = (tMsg.FrameType == CAN_DATA_FRAME) ? RT_CAN_DTR : RT_CAN_RTR; + pmsg->id = tMsg.Id; pmsg->len = tMsg.DLC ; - rt_memcpy(pmsg->data, tMsg.Data, pmsg->len); + if (pmsg->data && pmsg->len) + rt_memcpy(pmsg->data, &tMsg.Data[0], pmsg->len); return RT_EOK; } @@ -540,5 +552,4 @@ static int rt_hw_can_init(void) return (int)ret; } INIT_DEVICE_EXPORT(rt_hw_can_init); - #endif //#if defined(BSP_USING_CAN) diff --git a/bsp/nuvoton/libraries/n9h30/rtt_port/drv_i2c.c b/bsp/nuvoton/libraries/n9h30/rtt_port/drv_i2c.c index 0b4fbaabf1..987f8b3fd5 100644 --- a/bsp/nuvoton/libraries/n9h30/rtt_port/drv_i2c.c +++ b/bsp/nuvoton/libraries/n9h30/rtt_port/drv_i2c.c @@ -34,6 +34,8 @@ #define I2C_ENABLE(dev) I2C_REG_WRITE(dev, I2C_CSR, 0x3) /* Enable i2c core and interrupt */ #define I2C_ISBUSFREE(dev) (((I2C_REG_READ(dev, I2C_SWR) & 0x18) == 0x18 && (I2C_REG_READ(dev, I2C_CSR) & 0x0400) == 0) ? 1 : 0) +#define I2C_SIGNAL_TIMEOUT 5000 + enum { I2C_START = -1, @@ -50,7 +52,7 @@ enum typedef struct { int32_t base; /* i2c bus number */ - int32_t state; + volatile int32_t state; int32_t addr; uint32_t last_error; int32_t bNackValid; @@ -58,9 +60,11 @@ typedef struct uint32_t subaddr; int32_t subaddr_len; - uint8_t buffer[I2C_MAX_BUF_LEN]; - uint32_t pos, len; + volatile uint32_t pos; + volatile uint32_t len; + uint8_t *buffer; + struct rt_completion signal; } nu_i2c_dev; typedef nu_i2c_dev *nu_i2c_dev_t; @@ -68,7 +72,6 @@ typedef struct { struct rt_i2c_bus_device parent; char *name; - IRQn_Type irqn; E_SYS_IPRST rstidx; E_SYS_IPCLK clkidx; @@ -113,13 +116,13 @@ static nu_i2c_bus nu_i2c_arr [ ] = * @brief Set i2c interface speed * @param[in] dev i2c device structure pointer * @param[in] sp i2c speed - * @return always 0 + * @return 0 or I2C_ERR_NOTTY */ static int32_t nu_i2c_set_speed(nu_i2c_dev_t psNuI2cDev, int32_t sp) { uint32_t d; - if (sp != 100 && sp != 400) + if ((sp != 100) && (sp != 400)) return (I2C_ERR_NOTTY); d = (sysGetClock(SYS_PCLK) * 1000) / (sp * 5) - 1; @@ -205,6 +208,7 @@ static void nu_i2c_isr(int vector, void *param) psNuI2CDev->last_error = I2C_ERR_NACK; nu_i2c_command(psNuI2CDev, I2C_CMD_STOP); psNuI2CDev->state = I2C_STATE_NOP; + rt_completion_done(&psNuI2CDev->signal); } /* Arbitration lost */ else if (csr & 0x200) @@ -212,6 +216,7 @@ static void nu_i2c_isr(int vector, void *param) rt_kprintf("Arbitration lost\n"); psNuI2CDev->last_error = I2C_ERR_LOSTARBITRATION; psNuI2CDev->state = I2C_STATE_NOP; + rt_completion_done(&psNuI2CDev->signal); } /* Transmit complete */ else if (!(csr & 0x100)) @@ -225,6 +230,7 @@ static void nu_i2c_isr(int vector, void *param) } else if (psNuI2CDev->state == I2C_STATE_READ) { + /* Sub-address send over, begin restart a read command */ if (psNuI2CDev->pos == psNuI2CDev->subaddr_len + 1) { @@ -246,6 +252,7 @@ static void nu_i2c_isr(int vector, void *param) else { psNuI2CDev->state = I2C_STATE_NOP; + rt_completion_done(&psNuI2CDev->signal); } } } @@ -270,13 +277,13 @@ static void nu_i2c_isr(int vector, void *param) else { psNuI2CDev->state = I2C_STATE_NOP; + rt_completion_done(&psNuI2CDev->signal); } } } + } - - /** * @brief Read data from I2C slave. * @param[in] psNuI2cDev is interface structure pointer. @@ -294,6 +301,9 @@ static int32_t nu_i2c_read(nu_i2c_dev_t psNuI2cDev, struct rt_i2c_msg *pmsg) uint8_t *buf = pmsg->buf; uint32_t len = pmsg->len; + RT_ASSERT(len); + RT_ASSERT(buf); + if (len > I2C_MAX_BUF_LEN - 10) len = I2C_MAX_BUF_LEN - 10; @@ -317,9 +327,22 @@ static int32_t nu_i2c_read(nu_i2c_dev_t psNuI2cDev, struct rt_i2c_msg *pmsg) if (!I2C_ISBUSFREE(psNuI2cDev)) return (I2C_ERR_BUSY); + rt_completion_init(&psNuI2cDev->signal); + nu_i2c_command(psNuI2cDev, I2C_CMD_START | I2C_CMD_WRITE); - while (psNuI2cDev->state != I2C_STATE_NOP); + if ((RT_EOK == rt_completion_wait(&psNuI2cDev->signal, I2C_SIGNAL_TIMEOUT))) + { + rt_memcpy(buf, psNuI2cDev->buffer + psNuI2cDev->subaddr_len + 3, len); + + psNuI2cDev->subaddr += len; + } + else + { + rt_kprintf("[%s]Wait signal timeout.\n", __func__); + + len = 0; + } /* Disable I2C-EN */ I2C_DISABLE(psNuI2cDev); @@ -327,10 +350,6 @@ static int32_t nu_i2c_read(nu_i2c_dev_t psNuI2cDev, struct rt_i2c_msg *pmsg) if (psNuI2cDev->last_error) return (psNuI2cDev->last_error); - rt_memcpy(buf, psNuI2cDev->buffer + psNuI2cDev->subaddr_len + 3, len); - - psNuI2cDev->subaddr += len; - return len; } @@ -351,6 +370,9 @@ static int32_t nu_i2c_write(nu_i2c_dev_t psNuI2cDev, struct rt_i2c_msg *pmsg) uint8_t *buf = pmsg->buf; uint32_t len = pmsg->len; + RT_ASSERT(len); + RT_ASSERT(buf); + if (len > I2C_MAX_BUF_LEN - 10) len = I2C_MAX_BUF_LEN - 10; @@ -373,9 +395,20 @@ static int32_t nu_i2c_write(nu_i2c_dev_t psNuI2cDev, struct rt_i2c_msg *pmsg) if (!I2C_ISBUSFREE(psNuI2cDev)) return (I2C_ERR_BUSY); + rt_completion_init(&psNuI2cDev->signal); + nu_i2c_command(psNuI2cDev, I2C_CMD_START | I2C_CMD_WRITE); - while (psNuI2cDev->state != I2C_STATE_NOP); + if ((RT_EOK == rt_completion_wait(&psNuI2cDev->signal, I2C_SIGNAL_TIMEOUT))) + { + psNuI2cDev->subaddr += len; + } + else + { + rt_kprintf("[%s]Wait signal timeout.\n", __func__); + + len = 0; + } /* Disable I2C-EN */ I2C_DISABLE(psNuI2cDev); @@ -383,8 +416,6 @@ static int32_t nu_i2c_write(nu_i2c_dev_t psNuI2cDev, struct rt_i2c_msg *pmsg) if (psNuI2cDev->last_error) return (psNuI2cDev->last_error); - psNuI2cDev->subaddr += len; - return len; } @@ -405,16 +436,13 @@ static int32_t nu_i2c_ioctl(nu_i2c_dev_t psNuI2cDev, uint32_t cmd, uint32_t arg0 switch (cmd) { case I2C_IOC_SET_DEV_ADDRESS: - psNuI2cDev->addr = arg0; break; case I2C_IOC_SET_SPEED: - - return (nu_i2c_set_speed(psNuI2cDev, (int32_t)arg0)); + return nu_i2c_set_speed(psNuI2cDev, (int32_t)arg0); case I2C_IOC_SET_SUB_ADDRESS: - if (arg1 > 4) { return (I2C_ERR_NOTTY); @@ -441,7 +469,8 @@ static rt_size_t nu_i2c_mst_xfer(struct rt_i2c_bus_device *bus, rt_err_t ret; struct rt_i2c_msg *pmsg; - RT_ASSERT(bus != RT_NULL); + RT_ASSERT(bus); + psNuI2cBus = (nu_i2c_bus_t) bus; psNuI2cDev = &psNuI2cBus->dev; @@ -459,6 +488,7 @@ static rt_size_t nu_i2c_mst_xfer(struct rt_i2c_bus_device *bus, /* Set device address */ nu_i2c_reset(psNuI2cDev); + nu_i2c_ioctl(psNuI2cDev, I2C_IOC_SET_DEV_ADDRESS, pmsg->addr, 0); if (pmsg->flags & RT_I2C_RD) @@ -470,18 +500,39 @@ static rt_size_t nu_i2c_mst_xfer(struct rt_i2c_bus_device *bus, ret = nu_i2c_write(psNuI2cDev, pmsg); } - if (ret != pmsg->len) break; } return i; } +static rt_err_t nu_i2c_bus_control(struct rt_i2c_bus_device *bus, rt_uint32_t u32Cmd, rt_uint32_t u32Value) +{ + nu_i2c_bus_t psNuI2cBus; + nu_i2c_dev_t psNuI2cDev; + + RT_ASSERT(bus); + + psNuI2cBus = (nu_i2c_bus_t) bus; + psNuI2cDev = &psNuI2cBus->dev; + + switch (u32Cmd) + { + case RT_I2C_DEV_CTRL_CLK: + nu_i2c_set_speed(psNuI2cDev, (int32_t)u32Value); + break; + default: + return -RT_EIO; + } + + return RT_EOK; +} + static const struct rt_i2c_bus_device_ops nu_i2c_ops = { .master_xfer = nu_i2c_mst_xfer, .slave_xfer = NULL, - .i2c_bus_control = NULL, + .i2c_bus_control = nu_i2c_bus_control, }; @@ -489,17 +540,17 @@ static const struct rt_i2c_bus_device_ops nu_i2c_ops = int rt_hw_i2c_init(void) { int i; - rt_err_t ret = RT_EOK; + rt_err_t ret; for (i = (I2C_START + 1); i < I2C_CNT; i++) { nu_i2c_dev_t psNuI2cDev = &nu_i2c_arr[i].dev; - ret = rt_i2c_bus_device_register(&nu_i2c_arr[i].parent, nu_i2c_arr[i].name); - RT_ASSERT(RT_EOK == ret); - nu_i2c_arr[i].parent.ops = &nu_i2c_ops; + psNuI2cDev->buffer = rt_malloc(I2C_MAX_BUF_LEN); + RT_ASSERT(psNuI2cDev->buffer); + /* Enable I2C engine clock and reset. */ nu_sys_ipclk_enable(nu_i2c_arr[i].clkidx); nu_sys_ip_reset(nu_i2c_arr[i].rstidx); @@ -509,6 +560,9 @@ int rt_hw_i2c_init(void) /* Register ISR and Respond IRQ. */ rt_hw_interrupt_install(nu_i2c_arr[i].irqn, nu_i2c_isr, &nu_i2c_arr[i], nu_i2c_arr[i].name); rt_hw_interrupt_umask(nu_i2c_arr[i].irqn); + + ret = rt_i2c_bus_device_register(&nu_i2c_arr[i].parent, nu_i2c_arr[i].name); + RT_ASSERT(RT_EOK == ret); } return 0; diff --git a/bsp/nuvoton/libraries/n9h30/rtt_port/drv_vpost.c b/bsp/nuvoton/libraries/n9h30/rtt_port/drv_vpost.c index 41fae42ae4..0f5f1e23a3 100644 --- a/bsp/nuvoton/libraries/n9h30/rtt_port/drv_vpost.c +++ b/bsp/nuvoton/libraries/n9h30/rtt_port/drv_vpost.c @@ -69,6 +69,9 @@ static struct nu_vpost nu_fbdev[eVpost_Cnt] = #endif }; +RT_WEAK void nu_lcd_backlight_on(void) { } + +RT_WEAK void nu_lcd_backlight_off(void) { } static rt_err_t vpost_layer_open(rt_device_t dev, rt_uint16_t oflag) { nu_vpost_t psVpost = (nu_vpost_t)dev; @@ -149,6 +152,18 @@ static rt_err_t vpost_layer_control(rt_device_t dev, int cmd, void *args) switch (cmd) { + case RTGRAPHIC_CTRL_POWERON: + { + nu_lcd_backlight_on(); + } + break; + + case RTGRAPHIC_CTRL_POWEROFF: + { + nu_lcd_backlight_off(); + } + break; + case RTGRAPHIC_CTRL_GET_INFO: { struct rt_device_graphic_info *info = (struct rt_device_graphic_info *) args; @@ -324,6 +339,11 @@ int rt_hw_vpost_init(void) rt_kprintf("Fail to get VRAM buffer.\n"); RT_ASSERT(0); } + else + { + uint32_t u32FBSize = psVpost->info.pitch * psVpostLcmInst->u32DevHeight; + rt_memset(psVpost->info.framebuffer, 0, u32FBSize); + } /* Register member functions of lcd device */ psVpost->dev.type = RT_Device_Class_Graphic; diff --git a/bsp/nuvoton/libraries/nu_packages/ILI9341/lcd_ili9341.c b/bsp/nuvoton/libraries/nu_packages/ILI9341/lcd_ili9341.c index 31cb6c6d02..5f87e038c1 100644 --- a/bsp/nuvoton/libraries/nu_packages/ILI9341/lcd_ili9341.c +++ b/bsp/nuvoton/libraries/nu_packages/ILI9341/lcd_ili9341.c @@ -27,6 +27,7 @@ static struct rt_device_graphic_info g_Ili9341Info = .pixel_format = RTGRAPHIC_PIXEL_FORMAT_RGB565, .framebuffer = RT_NULL, .width = XSIZE_PHYS, + .pitch = XSIZE_PHYS * 2, .height = YSIZE_PHYS }; @@ -324,7 +325,7 @@ int rt_hw_lcd_ili9341_init(void) lcd_device.user_data = &ili9341_ops; #if defined(NU_PKG_ILI9341_WITH_OFFSCREEN_FRAMEBUFFER) - g_Ili9341Info.framebuffer = rt_malloc_align((DEF_VRAM_BUFFER_NUMBER * g_Ili9341Info.width * g_Ili9341Info.height * (g_Ili9341Info.bits_per_pixel / 8)) + 32, 32); + g_Ili9341Info.framebuffer = rt_malloc_align((DEF_VRAM_BUFFER_NUMBER * g_Ili9341Info.pitch * g_Ili9341Info.height) + 32, 32); RT_ASSERT(g_Ili9341Info.framebuffer != RT_NULL); #endif diff --git a/bsp/nuvoton/libraries/nu_packages/Kconfig b/bsp/nuvoton/libraries/nu_packages/Kconfig index ab3bba4331..b27797f36a 100644 --- a/bsp/nuvoton/libraries/nu_packages/Kconfig +++ b/bsp/nuvoton/libraries/nu_packages/Kconfig @@ -38,7 +38,7 @@ menu "Nuvoton Packages Config" bool "ILI9341 LCD Panel" select BSP_USING_GPIO default n - + if NU_PKG_USING_ILI9341 choice @@ -62,8 +62,20 @@ menu "Nuvoton Packages Config" default n config NU_PKG_ILI9341_HORIZONTAL - bool "Set horizontal view. (320x240)" - default n + bool + default y + + config BSP_LCD_BPP + int + default 16 if NU_PKG_USING_ILI9341 + + config BSP_LCD_WIDTH + int + default 320 if NU_PKG_ILI9341_HORIZONTAL + + config BSP_LCD_HEIGHT + int + default 240 if NU_PKG_ILI9341_HORIZONTAL endif diff --git a/bsp/nuvoton/libraries/nuc980/Driver/Include/nu_adc.h b/bsp/nuvoton/libraries/nuc980/Driver/Include/nu_adc.h index 341e2606f0..6e814049ff 100644 --- a/bsp/nuvoton/libraries/nuc980/Driver/Include/nu_adc.h +++ b/bsp/nuvoton/libraries/nuc980/Driver/Include/nu_adc.h @@ -35,51 +35,142 @@ extern "C" #define ADC_ERR_CMD 2 /*!< The command is wrong */ /// @cond HIDDEN_SYMBOLS -typedef INT32(*ADC_CALLBACK)(UINT32 status, UINT32 userData); +typedef int32_t(*ADC_CALLBACK)(uint32_t status, uint32_t userData); /// @endcond HIDDEN_SYMBOLS /*---------------------------------------------------------------------------------------------------------*/ /* ADC_CTL constant definitions */ /*---------------------------------------------------------------------------------------------------------*/ #define ADC_CTL_ADEN 0x00000001 /*!< ADC Power Control */ -#define ADC_CTL_VBGEN 0x00000002 /*!< ADC Internal Bandgap Power Control */ +#define ADC_CTL_VBGEN 0x00000002 /*!< ADC Internal Bandgap Power Control */ +#define ADC_CTL_PWKPEN 0x00000004 /*!< ADC Keypad Power Enable Control */ #define ADC_CTL_MST 0x00000100 /*!< Menu Start Conversion */ +#define ADC_CTL_PEDEEN 0x00000200 /*!< Pen Down Event Enable */ +#define ADC_CTL_WKPEN 0x00000400 /*!< Keypad Press Wake Up Enable */ +#define ADC_CTL_WKTEN 0x00000800 /*!< Touch Wake Up Enable */ +#define ADC_CTL_WMSWCH 0x00010000 /*!< Wire Mode Switch For 5-Wire/4-Wire Configuration */ /*---------------------------------------------------------------------------------------------------------*/ /* ADC_CONF constant definitions */ /*---------------------------------------------------------------------------------------------------------*/ +#define ADC_CONF_TEN 0x00000001 /*!< Touch Enable */ +#define ADC_CONF_ZEN 0x00000002 /*!< Press Enable */ #define ADC_CONF_NACEN 0x00000004 /*!< Normal AD Conversion Enable */ +#define ADC_CONF_VBATEN 0x00000100 /*!< Voltage Battery Enable */ +#define ADC_CONF_KPCEN 0x00000200 /*!< Keypad Press Conversion Enable */ #define ADC_CONF_SELFTEN 0x00000400 /*!< Selft Test Enable */ +#define ADC_CONF_DISTMAVEN (1<<20) /*!< Display T Mean Average Enable */ +#define ADC_CONF_DISZMAVEN (1<<21) /*!< Display Z Mean Average Enable */ #define ADC_CONF_HSPEED (1<<22) /*!< High Speed Enable */ -#define ADC_CONF_CHSEL_Pos 12 /*!< Channel Selection Position */ -#define ADC_CONF_CHSEL_Msk (0xF<psCurrentRxDesc; @@ -1151,7 +1151,7 @@ EMAC_DESCRIPTOR_T * EMAC_RecvPktDoneWoRxTrigger(EMAC_MEMMGR_T *psMemMgr) return ret; } -void EMAC_RxTrigger(EMAC_MEMMGR_T *psMemMgr, EMAC_DESCRIPTOR_T * rx_desc) +void EMAC_RxTrigger(EMAC_MEMMGR_T *psMemMgr, EMAC_DESCRIPTOR_T *rx_desc) { EMAC_T *EMAC = psMemMgr->psEmac; diff --git a/bsp/nuvoton/libraries/nuc980/rtt_port/Kconfig b/bsp/nuvoton/libraries/nuc980/rtt_port/Kconfig index 08ea27c97a..ffa3e55cc4 100644 --- a/bsp/nuvoton/libraries/nuc980/rtt_port/Kconfig +++ b/bsp/nuvoton/libraries/nuc980/rtt_port/Kconfig @@ -70,6 +70,13 @@ config SOC_SERIES_NUC980 bool "Enable Analog-to-Digital Converter(ADC)" select RT_USING_ADC + if BSP_USING_ADC + config BSP_USING_ADC_TOUCH + bool "Enable ADC Touching function" + select RT_USING_TOUCH + default n + endif + menuconfig BSP_USING_TMR bool "Enable Timer Controller(TIMER)" diff --git a/bsp/nuvoton/libraries/nuc980/rtt_port/drv_adc.c b/bsp/nuvoton/libraries/nuc980/rtt_port/drv_adc.c index 721bd5d6c1..66d93845ab 100644 --- a/bsp/nuvoton/libraries/nuc980/rtt_port/drv_adc.c +++ b/bsp/nuvoton/libraries/nuc980/rtt_port/drv_adc.c @@ -15,9 +15,12 @@ #include #include "NuMicro.h" -#include +#include "drv_sys.h" +#include "nu_bitutil.h" +#include "drv_adc.h" /* Private define ---------------------------------------------------------------*/ +#define DEF_ADC_TOUCH_SMPL_TICK 40 /* Private Typedef --------------------------------------------------------------*/ struct nu_adc @@ -31,12 +34,33 @@ struct nu_adc int chn_num; uint32_t chn_mask; rt_sem_t m_psSem; + +#if defined(BSP_USING_ADC_TOUCH) + rt_touch_t psRtTouch; + rt_timer_t psRtTouchMenuTimer; + rt_mq_t m_pmqTouchXYZ; +#endif + + nu_adc_cb m_isr[eAdc_ISR_CNT]; + nu_adc_cb m_wkisr[eAdc_WKISR_CNT]; }; typedef struct nu_adc *nu_adc_t; +#if defined(BSP_USING_ADC_TOUCH) +struct nu_adc_touch_data +{ + uint32_t u32X; + uint32_t u32Y; + uint32_t u32Z0; + uint32_t u32Z1; +}; +typedef struct nu_adc_touch_data *nu_adc_touch_data_t; +#endif + /* Private functions ------------------------------------------------------------*/ static rt_err_t nu_adc_enabled(struct rt_adc_device *device, rt_uint32_t channel, rt_bool_t enabled); static rt_err_t nu_adc_convert(struct rt_adc_device *device, rt_uint32_t channel, rt_uint32_t *value); +static rt_err_t _nu_adc_control(rt_device_t dev, int cmd, void *args); /* Public functions ------------------------------------------------------------*/ int rt_hw_adc_init(void); @@ -56,24 +80,41 @@ static struct nu_adc g_sNuADC = static void nu_adc_isr(int vector, void *param) { - uint32_t isr, conf; + rt_int32_t isr, wkisr; nu_adc_t psNuAdc = (nu_adc_t)param; + rt_int32_t irqidx; - conf = inpw(REG_ADC_CONF); isr = inpw(REG_ADC_ISR); + wkisr = inpw(REG_ADC_WKISR); - if ((isr & ADC_ISR_NACF) && (conf & ADC_CONF_NACEN)) + while ((irqidx = nu_ctz(isr)) < eAdc_ISR_CNT) { - outpw(REG_ADC_ISR, ADC_ISR_NACF); - } + uint32_t u32IsrBitMask = 1 << irqidx ; - if (isr & ADC_ISR_MF) + if (psNuAdc->m_isr[irqidx].cbfunc != RT_NULL) + { + //rt_kprintf("[%s] %d %x\n", __func__, irqidx, psNuAdc->m_isr[irqidx].cbfunc); + psNuAdc->m_isr[irqidx].cbfunc(isr, psNuAdc->m_isr[irqidx].private_data); + } + + /* Clear sent bit */ + outpw(REG_ADC_ISR, u32IsrBitMask); + isr &= ~(u32IsrBitMask); + } //while + + while ((irqidx = nu_ctz(wkisr)) < eAdc_WKISR_CNT) { - rt_err_t result; - outpw(REG_ADC_ISR, ADC_ISR_MF); - result = rt_sem_release(psNuAdc->m_psSem); - RT_ASSERT(result == RT_EOK); - } + uint32_t u32IsrBitMask = 1 << irqidx ; + + if (psNuAdc->m_wkisr[irqidx].cbfunc != RT_NULL) + { + psNuAdc->m_wkisr[irqidx].cbfunc(wkisr, psNuAdc->m_wkisr[irqidx].private_data); + } + + /* Clear sent bit */ + outpw(REG_ADC_WKISR, u32IsrBitMask); + wkisr &= ~(u32IsrBitMask); + } //while } static rt_err_t _nu_adc_init(rt_device_t dev) @@ -96,11 +137,171 @@ static rt_err_t _nu_adc_init(rt_device_t dev) return RT_EOK; } +static int32_t AdcMenuStartCallback(uint32_t status, uint32_t userData) +{ + nu_adc_t psNuAdc = (nu_adc_t)userData; + +#if defined(BSP_USING_ADC_TOUCH) + + static struct nu_adc_touch_data point; + static rt_bool_t bDrop = RT_FALSE; + static uint32_t u32LastZ0 = 0xffffu; + + if (psNuAdc->psRtTouch != RT_NULL) + { + uint32_t value; + + value = inpw(REG_ADC_XYDATA); + point.u32X = (value & 0x0ffful); + point.u32Y = ((value >> 16) & 0x0ffful); + + value = inpw(REG_ADC_ZDATA); + point.u32Z0 = (value & 0x0ffful); + point.u32Z1 = ((value >> 16) & 0x0ffful); + + /* Trigger next or not. */ + if (point.u32Z0 == 0) + { + /* Stop sampling procedure. */ + rt_timer_stop(g_sNuADC.psRtTouchMenuTimer); + + /* Re-start pendown detection */ + nu_adc_touch_detect(RT_TRUE); + + bDrop = RT_TRUE; + } + else + { + bDrop = RT_FALSE; + } + + /* Notify upper layer. */ + if ((!bDrop || (u32LastZ0 != 0)) && rt_mq_send(psNuAdc->m_pmqTouchXYZ, (const void *)&point, sizeof(struct nu_adc_touch_data)) == RT_EOK) + { + rt_hw_touch_isr(psNuAdc->psRtTouch); + } + + u32LastZ0 = point.u32Z0; + } + else +#endif + { + rt_err_t result = rt_sem_release(psNuAdc->m_psSem); + RT_ASSERT(result == RT_EOK); + } + + return 0; +} + +#if defined(BSP_USING_ADC_TOUCH) + +void nu_adc_touch_detect(rt_bool_t bStartDetect) +{ + nu_adc_t psNuAdc = (nu_adc_t)&g_sNuADC; + + if (bStartDetect) + { + /* Start detect PenDown */ + _nu_adc_control((rt_device_t)psNuAdc, PEPOWER_ON, RT_NULL); + } + else + { + /* Stop detect PenDown */ + _nu_adc_control((rt_device_t)psNuAdc, PEPOWER_OFF, RT_NULL); + } +} + +static int32_t PenDownCallback(uint32_t status, uint32_t userData) +{ + nu_adc_touch_detect(RT_FALSE); + + rt_timer_start(g_sNuADC.psRtTouchMenuTimer); + + return 0; +} + +int32_t nu_adc_touch_read_xyz(uint32_t *bufX, uint32_t *bufY, uint32_t *bufZ0, uint32_t *bufZ1, int32_t dataCnt) +{ + int i; + struct nu_adc_touch_data value; + + for (i = 0 ; i < dataCnt; i++) + { + if (rt_mq_recv(g_sNuADC.m_pmqTouchXYZ, (void *)&value, sizeof(struct nu_adc_touch_data), 0) == -RT_ETIMEOUT) + break; + + bufX[i] = value.u32X; + bufY[i] = value.u32Y; + bufZ0[i] = value.u32Z0; + bufZ1[i] = value.u32Z1; + } + return i; +} + +void nu_adc_touch_start_conv(void) +{ + nu_adc_t psNuAdc = (nu_adc_t)&g_sNuADC; + _nu_adc_control((rt_device_t)psNuAdc, START_MST, RT_NULL); +} + +rt_err_t nu_adc_touch_enable(rt_touch_t psRtTouch) +{ + nu_adc_t psNuAdc = (nu_adc_t)&g_sNuADC; + nu_adc_cb sNuAdcCb; + + rt_adc_enable((rt_adc_device_t)psNuAdc, 4); + rt_adc_enable((rt_adc_device_t)psNuAdc, 5); + rt_adc_enable((rt_adc_device_t)psNuAdc, 6); + rt_adc_enable((rt_adc_device_t)psNuAdc, 7); + + outpw(REG_ADC_CONF, (inpw(REG_ADC_CONF) & ~(0xfful << 24)) | 0xfful << 24); + + /* Register touch device. */ + psNuAdc->psRtTouch = psRtTouch; + + /* Enable TouchXY. */ + _nu_adc_control((rt_device_t)psNuAdc, T_ON, RT_NULL); + + /* Enable TouchZZ. */ + _nu_adc_control((rt_device_t)psNuAdc, Z_ON, RT_NULL); + + /* Register PenDown callback. */ + sNuAdcCb.cbfunc = PenDownCallback; + sNuAdcCb.private_data = (rt_uint32_t)psRtTouch; + _nu_adc_control((rt_device_t)psNuAdc, PEDEF_ON, (void *)&sNuAdcCb); + + nu_adc_touch_detect(RT_TRUE); + + return RT_EOK; +} + +rt_err_t nu_adc_touch_disable(void) +{ + nu_adc_t psNuAdc = (nu_adc_t)&g_sNuADC; + + nu_adc_touch_detect(RT_FALSE); + + _nu_adc_control((rt_device_t)psNuAdc, T_OFF, RT_NULL); + _nu_adc_control((rt_device_t)psNuAdc, Z_OFF, RT_NULL); + _nu_adc_control((rt_device_t)psNuAdc, PEDEF_OFF, RT_NULL); + + rt_adc_disable((rt_adc_device_t)psNuAdc, 4); + rt_adc_disable((rt_adc_device_t)psNuAdc, 5); + rt_adc_disable((rt_adc_device_t)psNuAdc, 6); + rt_adc_disable((rt_adc_device_t)psNuAdc, 7); + + return RT_EOK; +} + +#endif + static rt_err_t _nu_adc_control(rt_device_t dev, int cmd, void *args) { rt_err_t ret = RT_EINVAL ; nu_adc_t psNuAdc = (nu_adc_t)dev; + nu_adc_cb_t psAdcCb = (nu_adc_cb_t)args; + switch (cmd) { case START_MST: /* Menu Start Conversion */ @@ -116,29 +317,259 @@ static rt_err_t _nu_adc_control(rt_device_t dev, int cmd, void *args) RT_ASSERT(ret == RT_EOK); /* Get data: valid data is 12-bit */ - *((uint32_t *)args) = inpw(REG_ADC_DATA) & 0x00000FFF; + if (args != RT_NULL) + *((uint32_t *)args) = inpw(REG_ADC_DATA) & 0x00000FFF; } break; + + /* case START_MST_POLLING: Not supported. */ + case VBPOWER_ON: /* Enable ADC Internal Bandgap Power */ { outpw(REG_ADC_CTL, inpw(REG_ADC_CTL) | ADC_CTL_VBGEN); } break; + case VBPOWER_OFF: /* Disable ADC Internal Bandgap Power */ { outpw(REG_ADC_CTL, inpw(REG_ADC_CTL) & ~ADC_CTL_VBGEN); } break; + + case KPPOWER_ON: /* Enable ADC Keypad Power */ + { + outpw(REG_ADC_CTL, inpw(REG_ADC_CTL) | ADC_CTL_PWKPEN); + } + break; + + case KPPOWER_OFF: /* Disable ADC Keypad Power */ + { + outpw(REG_ADC_CTL, inpw(REG_ADC_CTL) & ~ADC_CTL_PWKPEN); + } + break; + + case PEPOWER_ON: /* Enable Pen Power */ + { + int retry = 100; + uint32_t treg = inpw(REG_ADC_IER); + outpw(REG_ADC_IER, treg & ~(ADC_IER_PEDEIEN | ADC_IER_PEUEIEN)); + outpw(REG_ADC_CTL, inpw(REG_ADC_CTL) | ADC_CTL_PEDEEN); + do + { + outpw(REG_ADC_ISR, ADC_ISR_PEDEF | ADC_ISR_PEUEF); + rt_thread_mdelay(1); + if (retry-- == 0) + break; + } + while (inpw(REG_ADC_ISR) & (ADC_ISR_PEDEF | ADC_ISR_PEUEF)); + outpw(REG_ADC_IER, treg); + } + break; + + case PEPOWER_OFF: /* Disable Pen Power */ + { + outpw(REG_ADC_CTL, inpw(REG_ADC_CTL) & ~ADC_CTL_PEDEEN); + } + break; + + case KPPRESS_ON: /* Enable Keypad press event */ + { + if (psAdcCb) + { + rt_memcpy(&psNuAdc->m_isr[eAdc_KPEF], psAdcCb, sizeof(nu_adc_cb)); + } + outpw(REG_ADC_IER, inpw(REG_ADC_IER) | ADC_IER_KPEIEN); + } + break; + + case KPPRESS_OFF: /* Disable Keypad press event */ + { + outpw(REG_ADC_IER, inpw(REG_ADC_IER & ~ADC_IER_KPEIEN)); + } + break; + + case KPUP_ON: /* Enable Keypad up event */ + { + if (psAdcCb) + { + rt_memcpy(&psNuAdc->m_isr[eAdc_KPUEF], psAdcCb, sizeof(nu_adc_cb)); + } + outpw(REG_ADC_IER, inpw(REG_ADC_IER) | ADC_IER_KPUEIEN); + } + break; + + case KPUP_OFF: /* Disable Keypad up event */ + { + outpw(REG_ADC_IER, inpw(REG_ADC_IER) & ~ADC_IER_KPUEIEN); + } + break; + + case PEDEF_ON: /* Enable Pen Down Event */ + { + if (psAdcCb) + { + rt_memcpy(&psNuAdc->m_isr[eAdc_PEDEF], psAdcCb, sizeof(nu_adc_cb)); + } + outpw(REG_ADC_IER, inpw(REG_ADC_IER) | ADC_IER_PEDEIEN); + } + break; + + case PEDEF_OFF: /* Disable Pen Down Event */ + { + outpw(REG_ADC_IER, inpw(REG_ADC_IER) & ~ADC_IER_PEDEIEN); + } + break; + + case WKP_ON: /* Enable Keypad Press Wake Up */ + { + if (psAdcCb) + { + rt_memcpy(&psNuAdc->m_wkisr[eAdc_WKPEF], psAdcCb, sizeof(nu_adc_cb)); + } + + outpw(REG_ADC_CTL, inpw(REG_ADC_CTL) | ADC_CTL_WKPEN); + outpw(REG_ADC_IER, inpw(REG_ADC_IER) | ADC_IER_WKPIEN); + //outpw(REG_SYS_WKUPSER, inpw(REG_SYS_WKUPSER) | (1 << 26)); + } + break; + + case WKP_OFF: /* Disable Keypad Press Wake Up */ + { + outpw(REG_ADC_CTL, inpw(REG_ADC_CTL) & ~ADC_CTL_WKPEN); + outpw(REG_ADC_IER, inpw(REG_ADC_IER) & ~ADC_IER_WKPIEN); + //outpw(REG_SYS_WKUPSER, inpw(REG_SYS_WKUPSER) & ~(1 << 26)); + } + break; + + case WKT_ON: /* Enable Touch Wake Up */ + { + if (psAdcCb) + { + rt_memcpy(&psNuAdc->m_wkisr[eAdc_WPEDEF], psAdcCb, sizeof(nu_adc_cb)); + } + + outpw(REG_ADC_CTL, inpw(REG_ADC_CTL) | ADC_CTL_WKTEN); + outpw(REG_ADC_IER, inpw(REG_ADC_IER) | ADC_IER_WKTIEN); + //outpw(REG_SYS_WKUPSER, inpw(REG_SYS_WKUPSER) | (1 << 26)); + } + break; + + case WKT_OFF: /* Disable Touch Wake Up */ + { + outpw(REG_ADC_CTL, inpw(REG_ADC_CTL) & ~ADC_CTL_WKTEN); + outpw(REG_ADC_IER, inpw(REG_ADC_IER) & ~ADC_IER_WKTIEN); + //outpw(REG_SYS_WKUPSER, inpw(REG_SYS_WKUPSER) & ~(1 << 26)); + } + break; + + case SWITCH_5WIRE_ON: /* Wire Mode Switch to 5-Wire */ + { + outpw(REG_ADC_CTL, inpw(REG_ADC_CTL) | ADC_CTL_WMSWCH); + } + break; + + case SWITCH_5WIRE_OFF: /* Wire Mode Switch to 4-Wire */ + { + outpw(REG_ADC_CTL, inpw(REG_ADC_CTL) & ~ADC_CTL_WMSWCH); + } + break; + + case T_ON: /* Enable Touch detection function */ + { + outpw(REG_ADC_CONF, inpw(REG_ADC_CONF) | ADC_CONF_TEN); + } + break; + + case T_OFF: /* Disable Touch detection function */ + { + outpw(REG_ADC_CONF, inpw(REG_ADC_CONF) & ~ADC_CONF_TEN); + } + break; + + case TAVG_ON: /* Enable Touch Mean average for X and Y function */ + { + outpw(REG_ADC_CONF, inpw(REG_ADC_CONF) | ADC_CONF_DISTMAVEN); + } + break; + + case TAVG_OFF: /* Disable Touch Mean average for X and Y function */ + { + outpw(REG_ADC_CONF, inpw(REG_ADC_CONF) & ~ADC_CONF_DISTMAVEN); + } + break; + + case Z_ON: /* Enable Press measure function */ + { + outpw(REG_ADC_CONF, inpw(REG_ADC_CONF) | ADC_CONF_ZEN); + } + break; + + case Z_OFF: /* Disable Press measure function */ + { + outpw(REG_ADC_CONF, inpw(REG_ADC_CONF) & ~ADC_CONF_ZEN); +#if defined(BSP_USING_ADC_TOUCH) + rt_mq_control(psNuAdc->m_pmqTouchXYZ, RT_IPC_CMD_RESET, RT_NULL); +#endif + } + break; + + case TZAVG_ON: /* Enable Pressure Mean average for Z1 and Z2 function */ + { + outpw(REG_ADC_CONF, inpw(REG_ADC_CONF) | ADC_CONF_DISZMAVEN); + } + break; + + case TZAVG_OFF: /* Disable Pressure Mean average for Z1 and Z2 function */ + { + outpw(REG_ADC_CONF, inpw(REG_ADC_CONF) & ~ADC_CONF_DISZMAVEN); + } + break; + case NAC_ON: /* Enable Normal AD Conversion */ { outpw(REG_ADC_CONF, inpw(REG_ADC_CONF) | ADC_CONF_NACEN | ADC_CONF_REFSEL_AVDD33); } break; + case NAC_OFF: /* Disable Normal AD Conversion */ { outpw(REG_ADC_CONF, inpw(REG_ADC_CONF) & ~ADC_CONF_NACEN); } break; + + case VBAT_ON: /* Enable Voltage Battery Conversion */ + { + if (psAdcCb) + { + rt_memcpy(&psNuAdc->m_isr[eAdc_VBF], psAdcCb, sizeof(nu_adc_cb)); + } + outpw(REG_ADC_CONF, inpw(REG_ADC_CONF) | ADC_CONF_VBATEN); + } + break; + + case VBAT_OFF: /* Disable Voltage Battery */ + { + outpw(REG_ADC_CONF, inpw(REG_ADC_CONF) & ~ADC_CONF_VBATEN); + } + break; + + case KPCONV_ON: /* Enable Keypad conversion function */ + { + if (psAdcCb) + { + rt_memcpy(&psNuAdc->m_isr[eAdc_KPCF], psAdcCb, sizeof(nu_adc_cb)); + } + outpw(REG_ADC_CONF, inpw(REG_ADC_CONF) | ADC_CONF_KPCEN); + outpw(REG_ADC_IER, inpw(REG_ADC_IER) | ADC_IER_KPEIEN); + } + break; + + case KPCONV_OFF: /* Disable Keypad conversion function */ + { + outpw(REG_ADC_CONF, inpw(REG_ADC_CONF) & ~ADC_CONF_KPCEN); + } + break; + case SWITCH_CH: { int chn = (int)args; @@ -265,6 +696,16 @@ exit_nu_adc_convert: return (-ret) ; } +static void nu_adc_touch_smpl(void *p) +{ + /* Enable interrupt */ + outpw(REG_ADC_IER, inpw(REG_ADC_IER) | ADC_IER_MIEN); + + /* Start conversion */ + outpw(REG_ADC_CTL, inpw(REG_ADC_CTL) | ADC_CTL_MST); +} + + int rt_hw_adc_init(void) { rt_err_t result = RT_ERROR; @@ -279,8 +720,22 @@ int rt_hw_adc_init(void) g_sNuADC.m_psSem = rt_sem_create("adc_mst_sem", 0, RT_IPC_FLAG_FIFO); RT_ASSERT(g_sNuADC.m_psSem != RT_NULL); +#if defined(BSP_USING_ADC_TOUCH) + g_sNuADC.m_pmqTouchXYZ = rt_mq_create("ADC_TOUCH_XYZ", sizeof(struct nu_adc_touch_data), TOUCH_MQ_LENGTH, RT_IPC_FLAG_FIFO); + RT_ASSERT(g_sNuADC.m_pmqTouchXYZ != RT_NULL); + + g_sNuADC.psRtTouchMenuTimer = rt_timer_create("TOUCH_SMPL_TIMER", nu_adc_touch_smpl, (void *)&g_sNuADC, DEF_ADC_TOUCH_SMPL_TICK, RT_TIMER_FLAG_PERIODIC); + RT_ASSERT(g_sNuADC.psRtTouchMenuTimer != RT_NULL); +#endif + + rt_memset(&g_sNuADC.m_isr, 0, sizeof(g_sNuADC.m_isr)); + rt_memset(&g_sNuADC.m_wkisr, 0, sizeof(g_sNuADC.m_wkisr)); + + g_sNuADC.m_isr[eAdc_MF].cbfunc = AdcMenuStartCallback; + g_sNuADC.m_isr[eAdc_MF].private_data = (UINT32)&g_sNuADC; + return (int)result; } INIT_BOARD_EXPORT(rt_hw_adc_init); -#endif //#if defined(BSP_USING_EADC) +#endif //#if defined(BSP_USING_ADC) diff --git a/bsp/nuvoton/libraries/nuc980/rtt_port/drv_adc.h b/bsp/nuvoton/libraries/nuc980/rtt_port/drv_adc.h new file mode 100644 index 0000000000..ead185e0c1 --- /dev/null +++ b/bsp/nuvoton/libraries/nuc980/rtt_port/drv_adc.h @@ -0,0 +1,84 @@ +/**************************************************************************//** +* +* @copyright (C) 2020 Nuvoton Technology Corp. All rights reserved. +* +* SPDX-License-Identifier: Apache-2.0 +* +* Change Logs: +* Date Author Notes +* 2021-4-7 Wayne First version +* +******************************************************************************/ + +#ifndef __DRV_ADC_H__ +#define __DRV_ADC_H__ + +#include +#include "nu_adc.h" +#if defined(BSP_USING_ADC_TOUCH) + #include "touch.h" +#endif + +#define TOUCH_MQ_LENGTH 64 + +#define DEF_CAL_POINT_NUM 5 + +typedef enum +{ + eAdc_MF, //0 + eAdc_KPEF, //1 + eAdc_PEDEF, //2 + eAdc_KPUEF, //3 + eAdc_PEUEF, //4 + eAdc_TF = 8, //8 + eAdc_ZF, //9 + eAdc_NACF, //10 + eAdc_VBF, //11 + eAdc_KPCF, //12 + eAdc_SELFTF, //13 + eAdc_INTKP = 16, //16 + eAdc_INTTC, //17 + eAdc_ISR_CNT //18 +} E_ADC_ISR_EVENT; + +typedef enum +{ + eAdc_WKPEF, + eAdc_WPEDEF, + eAdc_WKISR_CNT +} E_ADC_WKISR_EVENT; + +typedef struct +{ + ADC_CALLBACK cbfunc; + uint32_t private_data; +} nu_adc_cb; + +typedef nu_adc_cb *nu_adc_cb_t; + +#if defined(BSP_USING_ADC_TOUCH) +typedef struct +{ + int32_t x; + int32_t y; +} S_COORDINATE_POINT; + +typedef struct +{ + int32_t a; + int32_t b; + int32_t c; + int32_t d; + int32_t e; + int32_t f; + int32_t div; +} S_CALIBRATION_MATRIX; + +int32_t nu_adc_touch_read_xyz(uint32_t *bufX, uint32_t *bufY, uint32_t *bufZ0, uint32_t *bufZ1, int32_t dataCnt); +rt_err_t nu_adc_touch_enable(rt_touch_t psRtTouch); +rt_err_t nu_adc_touch_disable(void); +void nu_adc_touch_detect(rt_bool_t bStartDetect); +void nu_adc_touch_start_conv(void); +#endif + +#endif /* __DRV_ADC_H__ */ diff --git a/bsp/nuvoton/libraries/nuc980/rtt_port/drv_adc_touch.c b/bsp/nuvoton/libraries/nuc980/rtt_port/drv_adc_touch.c new file mode 100644 index 0000000000..e995f249af --- /dev/null +++ b/bsp/nuvoton/libraries/nuc980/rtt_port/drv_adc_touch.c @@ -0,0 +1,681 @@ +/**************************************************************************//** +* @copyright (C) 2020 Nuvoton Technology Corp. All rights reserved. +* +* SPDX-License-Identifier: Apache-2.0 +* +* Change Logs: +* Date Author Notes +* 2021-04-20 Wayne First version +* +******************************************************************************/ + +#include + +#if defined(BSP_USING_ADC_TOUCH) + +#include "NuMicro.h" +#include +#include +#include "drv_adc.h" +#include "touch.h" + +#if !defined(PATH_CALIBRATION_FILE) + #define PATH_CALIBRATION_FILE "/mnt/filesystem/ts_calibration" +#endif + + +typedef struct +{ + struct rt_touch_device dev; + rt_uint32_t x_range; + rt_uint32_t y_range; +} nu_adc_touch; +typedef nu_adc_touch *nu_adc_touch_t; + +static nu_adc_touch s_NuAdcTouch = {0}; + +#if (BSP_LCD_WIDTH==320) && (BSP_LCD_HEIGHT==240) +static S_CALIBRATION_MATRIX g_sCalMat = { 43, -5839, 21672848, 4193, -11, -747882, 65536 }; +static volatile uint32_t g_u32Calibrated = 1; +#else +static S_CALIBRATION_MATRIX g_sCalMat = { 1, 0, 0, 0, 1, 0, 1 }; +static volatile uint32_t g_u32Calibrated = 0; +#endif + +static int nu_adc_touch_readfile(void); + +static const S_CALIBRATION_MATRIX g_sCalZero = { 1, 0, 0, 0, 1, 0, 1 }; + +static int nu_adc_cal_mat_get(const S_COORDINATE_POINT *psDispCP, S_COORDINATE_POINT *psADCCP, S_CALIBRATION_MATRIX *psCM) +{ +#if (DEF_CAL_POINT_NUM==3) + + psCM->div = ((psADCCP[0].x - psADCCP[2].x) * (psADCCP[1].y - psADCCP[2].y)) - + ((psADCCP[1].x - psADCCP[2].x) * (psADCCP[0].y - psADCCP[2].y)) ; + + if (psCM->div == 0) + { + return -1; + } + else + { + psCM->a = ((psDispCP[0].x - psDispCP[2].x) * (psADCCP[1].y - psADCCP[2].y)) - + ((psDispCP[1].x - psDispCP[2].x) * (psADCCP[0].y - psADCCP[2].y)) ; + + psCM->b = ((psADCCP[0].x - psADCCP[2].x) * (psDispCP[1].x - psDispCP[2].x)) - + ((psDispCP[0].x - psDispCP[2].x) * (psADCCP[1].x - psADCCP[2].x)) ; + + psCM->c = (psADCCP[2].x * psDispCP[1].x - psADCCP[1].x * psDispCP[2].x) * psADCCP[0].y + + (psADCCP[0].x * psDispCP[2].x - psADCCP[2].x * psDispCP[0].x) * psADCCP[1].y + + (psADCCP[1].x * psDispCP[0].x - psADCCP[0].x * psDispCP[1].x) * psADCCP[2].y ; + + psCM->d = ((psDispCP[0].y - psDispCP[2].y) * (psADCCP[1].y - psADCCP[2].y)) - + ((psDispCP[1].y - psDispCP[2].y) * (psADCCP[0].y - psADCCP[2].y)) ; + + psCM->e = ((psADCCP[0].x - psADCCP[2].x) * (psDispCP[1].y - psDispCP[2].y)) - + ((psDispCP[0].y - psDispCP[2].y) * (psADCCP[1].x - psADCCP[2].x)) ; + + psCM->f = (psADCCP[2].x * psDispCP[1].y - psADCCP[1].x * psDispCP[2].y) * psADCCP[0].y + + (psADCCP[0].x * psDispCP[2].y - psADCCP[2].x * psDispCP[0].y) * psADCCP[1].y + + (psADCCP[1].x * psDispCP[0].y - psADCCP[0].x * psDispCP[1].y) * psADCCP[2].y ; + } + +#elif (DEF_CAL_POINT_NUM==5) + + int i; + float n, x, y, xx, yy, xy, z, zx, zy; + float a, b, c, d, e, f, g; + float scaling = 65536.0f; + + n = x = y = xx = yy = xy = 0; + for (i = 0; i < DEF_CAL_POINT_NUM; i++) + { + n += 1.0; + x += (float)psADCCP[i].x; + y += (float)psADCCP[i].y; + xx += (float)psADCCP[i].x * psADCCP[i].x; + yy += (float)psADCCP[i].y * psADCCP[i].y; + xy += (float)psADCCP[i].x * psADCCP[i].y; + } + + d = n * (xx * yy - xy * xy) + x * (xy * y - x * yy) + y * (x * xy - y * xx); + if (d < 0.1 && d > -0.1) + { + return -1; + } + + a = (xx * yy - xy * xy) / d; + b = (xy * y - x * yy) / d; + c = (x * xy - y * xx) / d; + e = (n * yy - y * y) / d; + f = (x * y - n * xy) / d; + g = (n * xx - x * x) / d; + + z = zx = zy = 0; + for (i = 0; i < DEF_CAL_POINT_NUM; i++) + { + z += (float)psDispCP[i].x; + zx += (float)psDispCP[i].x * psADCCP[i].x; + zy += (float)psDispCP[i].x * psADCCP[i].y; + } + + psCM->c = (int32_t)((a * z + b * zx + c * zy) * scaling); + psCM->a = (int32_t)((b * z + e * zx + f * zy) * scaling); + psCM->b = (int32_t)((c * z + f * zx + g * zy) * scaling); + + z = zx = zy = 0; + for (i = 0; i < DEF_CAL_POINT_NUM; i++) + { + z += (float)psDispCP[i].y; + zx += (float)psDispCP[i].y * psADCCP[i].x; + zy += (float)psDispCP[i].y * psADCCP[i].y; + } + + psCM->f = (int32_t)((a * z + b * zx + c * zy) * scaling); + psCM->d = (int32_t)((b * z + e * zx + f * zy) * scaling); + psCM->e = (int32_t)((c * z + f * zx + g * zy) * scaling); + + psCM->div = (int32_t)scaling; + +#else +#error "Not supported calibration method" +#endif + return 0; +} + +static void nu_adc_touch_cal(int32_t *sumx, int32_t *sumy) +{ + int32_t xtemp, ytemp; + + xtemp = *sumx; + ytemp = *sumy; + *sumx = (g_sCalMat.c + + g_sCalMat.a * xtemp + + g_sCalMat.b * ytemp) / g_sCalMat.div; + *sumy = (g_sCalMat.f + + g_sCalMat.d * xtemp + + g_sCalMat.e * ytemp) / g_sCalMat.div; +} + +static rt_size_t nu_adc_touch_readpoint(struct rt_touch_device *device, void *buf, rt_size_t read_num) +{ + static uint32_t last_report_x = 0, last_report_y = 0; + struct rt_touch_data *pPoint = (struct rt_touch_data *)buf; + nu_adc_touch_t psNuAdcTouch = (nu_adc_touch_t)device; + + RT_ASSERT(device != RT_NULL); + RT_ASSERT(buf != RT_NULL); + + int i; + + for (i = 0; i < read_num; i++) + { + uint32_t bufZ0 = 0, bufZ1 = 0; + int32_t sumx = 0, sumy = 0; + pPoint[i].timestamp = rt_touch_get_ts(); + pPoint[i].track_id = 0; + + if (nu_adc_touch_read_xyz((uint32_t *)&sumx, (uint32_t *)&sumy, &bufZ0, &bufZ1, 1) != 1) + break; + + if (bufZ0 == 0) + { + /* Workaround: In this case, x, y values are unstable. so, report last point's coordinate.*/ + pPoint[i].event = RT_TOUCH_EVENT_UP; + pPoint[i].x_coordinate = (uint16_t)last_report_x; + pPoint[i].y_coordinate = (uint16_t)last_report_y; + } + else + { + if (g_u32Calibrated) + { + nu_adc_touch_cal(&sumx, &sumy); + } + last_report_x = sumx; + last_report_y = sumy; + + pPoint[i].event = RT_TOUCH_EVENT_DOWN; + pPoint[i].x_coordinate = (uint16_t)sumx; + pPoint[i].y_coordinate = (uint16_t)sumy; + } + + if (g_u32Calibrated) + { + bufZ0 = bufZ0 >> 3; + pPoint[i].width = (bufZ0 > 255) ? 255 : bufZ0; + + //Limit max x, y coordinate if value is over its range. + pPoint[i].x_coordinate = (pPoint[i].x_coordinate > psNuAdcTouch->x_range) ? psNuAdcTouch->x_range : pPoint[i].x_coordinate; + pPoint[i].y_coordinate = (pPoint[i].y_coordinate > psNuAdcTouch->y_range) ? psNuAdcTouch->y_range : pPoint[i].y_coordinate; + } + } + return (rt_size_t)i; +} + +static rt_err_t nu_adc_touch_control(struct rt_touch_device *device, int cmd, void *data) +{ + nu_adc_touch_t psNuAdcTouch = (nu_adc_touch_t)device; + RT_ASSERT(psNuAdcTouch != RT_NULL); + + switch (cmd) + { + case RT_TOUCH_CTRL_SET_X_RANGE: /* set x range */ + psNuAdcTouch->x_range = *((rt_int32_t *)data); + break; + + case RT_TOUCH_CTRL_SET_Y_RANGE: /* set y range */ + psNuAdcTouch->y_range = *((rt_int32_t *)data); + break; + + case RT_TOUCH_CTRL_ENABLE_INT: /* enable pen_down interrupt */ + nu_adc_touch_detect(RT_TRUE); + break; + + case RT_TOUCH_CTRL_DISABLE_INT: /* disable pen_down interrupt */ + nu_adc_touch_detect(RT_FALSE); + break; + + case RT_TOUCH_CTRL_POWER_ON: /* Touch Power On */ + return nu_adc_touch_enable(device); + + case RT_TOUCH_CTRL_POWER_OFF: /* Touch Power Off */ + return nu_adc_touch_disable(); + + default: + return -RT_ERROR; + } + return RT_EOK; +} + +static struct rt_touch_ops touch_ops = +{ + .touch_readpoint = nu_adc_touch_readpoint, + .touch_control = nu_adc_touch_control, +}; + +static void nu_adc_touch_update_calmat(S_CALIBRATION_MATRIX *psNewCalMat) +{ + if (psNewCalMat && + psNewCalMat->div != 0) + { + rt_memcpy(&g_sCalMat, psNewCalMat, sizeof(S_CALIBRATION_MATRIX)); + g_u32Calibrated = 1; + rt_kprintf("Applied calibration data: %d, %d, %d, %d, %d, %d, %d\n", + g_sCalMat.a, + g_sCalMat.b, + g_sCalMat.c, + g_sCalMat.d, + g_sCalMat.e, + g_sCalMat.f, + g_sCalMat.div); + + } +} + +static void nu_adc_touch_reset_calmat(void) +{ + rt_memcpy(&g_sCalMat, &g_sCalZero, sizeof(S_CALIBRATION_MATRIX)); + g_u32Calibrated = 0; +} + +int rt_hw_adc_touch_init(void) +{ + /* Register touch device */ + s_NuAdcTouch.dev.info.type = RT_TOUCH_TYPE_RESISTANCE; + s_NuAdcTouch.dev.info.vendor = RT_TOUCH_VENDOR_UNKNOWN; + s_NuAdcTouch.dev.info.point_num = 1; + s_NuAdcTouch.dev.info.range_x = BSP_LCD_WIDTH; + s_NuAdcTouch.dev.info.range_y = BSP_LCD_HEIGHT; + + s_NuAdcTouch.dev.ops = &touch_ops; + + return (int)rt_hw_touch_register(&s_NuAdcTouch.dev, "adc_touch", RT_DEVICE_FLAG_INT_RX, RT_NULL); +} +INIT_DEVICE_EXPORT(rt_hw_adc_touch_init); + + +static rt_thread_t adc_touch_thread = RT_NULL; +static rt_sem_t adc_touch_sem = RT_NULL; +static int adc_touch_worker_run = 0; + +static rt_err_t adc_touch_rx_callback(rt_device_t dev, rt_size_t size) +{ + //rt_kprintf("[%s %d] %d\n", __func__, __LINE__, size); + return rt_sem_release(adc_touch_sem); +} + +static rt_err_t adc_request_point(rt_device_t pdev, struct rt_touch_data *psTouchPoint) +{ + rt_err_t ret = -RT_ERROR; + + if ((ret = rt_sem_take(adc_touch_sem, rt_tick_from_millisecond(500))) == RT_EOK) + { + rt_memset(psTouchPoint, 0, sizeof(struct rt_touch_data)); + + if (rt_device_read(pdev, 0, psTouchPoint, s_NuAdcTouch.dev.info.point_num) == s_NuAdcTouch.dev.info.point_num) + { + ret = RT_EOK; + } + + } + + return ret; +} + +RT_WEAK void nu_touch_inputevent_cb(rt_int16_t x, rt_int16_t y, rt_uint8_t event) +{ +} + +static rt_device_t lcd_device = 0; +static struct rt_device_graphic_info info; + +static void lcd_cleanscreen(void) +{ + if (info.framebuffer != RT_NULL) + { + /* Rendering */ + struct rt_device_rect_info rect; + + rt_memset(info.framebuffer, 0, (info.pitch * info.height)); + rect.x = 0; + rect.y = 0; + rect.width = info.width; + rect.height = info.height; + rt_device_control(lcd_device, RTGRAPHIC_CTRL_RECT_UPDATE, &rect); + } + else + { + // TODO + } +} + +#define DEF_DOT_NUMBER 9 +#define DOTS_NUMBER (DEF_DOT_NUMBER*DEF_DOT_NUMBER) +static void nu_draw_bots(int x, int y) +{ + if (info.framebuffer != RT_NULL) + { + /* Rendering */ + struct rt_device_rect_info rect; + int i, j; + int start_x = x - (DEF_DOT_NUMBER / 2); + int start_y = y - (DEF_DOT_NUMBER / 2); + + if (info.pixel_format == RTGRAPHIC_PIXEL_FORMAT_RGB565) + { + uint16_t *pu16Start = (uint16_t *)((uint32_t)info.framebuffer + (start_y) * info.pitch + (start_x * 2)); + for (j = 0; j < DEF_DOT_NUMBER; j++) + { + for (i = 0; i < DEF_DOT_NUMBER; i++) + pu16Start[i] = 0x07E0; //Green, RGB + pu16Start += info.width; + } + } + else if (info.pixel_format == RTGRAPHIC_PIXEL_FORMAT_ARGB888) + { + uint32_t *pu32Start = (uint32_t *)((uint32_t)info.framebuffer + (start_y) * info.pitch + (start_x * 4)); + for (j = 0; j < DEF_DOT_NUMBER; j++) + { + for (i = 0; i < DEF_DOT_NUMBER; i++) + pu32Start[i] = 0xff00ff00; //Green, ARGB + pu32Start += info.width; + } + } + else + { + //Not supported + } + + rect.x = 0; + rect.y = 0; + rect.width = info.width; + rect.height = info.height; + rt_device_control(lcd_device, RTGRAPHIC_CTRL_RECT_UPDATE, &rect); + } + else + { + // TODO + } +} + +#if (DEF_CAL_POINT_NUM==3) +const S_COORDINATE_POINT sDispPoints[DEF_CAL_POINT_NUM] = +{ + {BSP_LCD_WIDTH / 4, BSP_LCD_HEIGHT / 2}, + {BSP_LCD_WIDTH - BSP_LCD_WIDTH / 4, BSP_LCD_HEIGHT / 4}, + {BSP_LCD_WIDTH / 2, BSP_LCD_HEIGHT - BSP_LCD_HEIGHT / 4} +}; +#elif (DEF_CAL_POINT_NUM==5) +const static S_COORDINATE_POINT sDispPoints[DEF_CAL_POINT_NUM] = +{ +#define DEF_CUT_PIECES 8 + {BSP_LCD_WIDTH / DEF_CUT_PIECES, BSP_LCD_HEIGHT / DEF_CUT_PIECES}, + {BSP_LCD_WIDTH - BSP_LCD_WIDTH / DEF_CUT_PIECES, BSP_LCD_HEIGHT / DEF_CUT_PIECES}, + {BSP_LCD_WIDTH - BSP_LCD_WIDTH / DEF_CUT_PIECES, BSP_LCD_HEIGHT - BSP_LCD_HEIGHT / DEF_CUT_PIECES}, + {BSP_LCD_WIDTH / DEF_CUT_PIECES, BSP_LCD_HEIGHT - BSP_LCD_HEIGHT / DEF_CUT_PIECES}, + + {BSP_LCD_WIDTH / 2, BSP_LCD_HEIGHT / 2} +}; +#endif + +static int nu_adc_touch_readfile(void) +{ + int fd; + + S_CALIBRATION_MATRIX sCalMat; + + if ((fd = open(PATH_CALIBRATION_FILE, O_RDONLY, 0)) < 0) + { + goto exit_nu_adc_touch_readfile; + } + else if (read(fd, &sCalMat, sizeof(S_CALIBRATION_MATRIX)) == sizeof(S_CALIBRATION_MATRIX)) + { + rt_kprintf("[%s] %s\n", __func__, PATH_CALIBRATION_FILE); + } + + close(fd); + + nu_adc_touch_update_calmat(&sCalMat); + + return 0; + +exit_nu_adc_touch_readfile: + + return -1; +} + +static int nu_adc_touch_writefile(void *buf, int buf_len) +{ + int fd; + + if ((fd = open(PATH_CALIBRATION_FILE, O_WRONLY | O_CREAT, 0)) < 0) + { + goto exit_nu_adc_touch_writefile; + } + else if (write(fd, buf, buf_len) == buf_len) + { + rt_kprintf("[%s] %s\n", __func__, PATH_CALIBRATION_FILE); + } + + close(fd); + + return 0; + +exit_nu_adc_touch_writefile: + + return -1; +} + +static void nu_touch_do_calibration(rt_device_t pdev) +{ + int i; + rt_err_t result; + + S_CALIBRATION_MATRIX sCalMat; + S_COORDINATE_POINT sADCPoints[DEF_CAL_POINT_NUM]; + + lcd_device = rt_device_find("lcd"); + if (!lcd_device) + { + rt_kprintf("Not supported graphics ops\n"); + return; + } + + result = rt_device_control(lcd_device, RTGRAPHIC_CTRL_GET_INFO, &info); + if (result != RT_EOK) + { + rt_kprintf("error!"); + return; + } + + result = rt_device_open(lcd_device, 0); + if (result != RT_EOK) + { + rt_kprintf("opened?"); + } + + rt_device_control(lcd_device, RTGRAPHIC_CTRL_PAN_DISPLAY, info.framebuffer); + rt_device_control(lcd_device, RTGRAPHIC_CTRL_POWERON, RT_NULL); + + for (i = 0; i < DEF_CAL_POINT_NUM; i++) + { + struct rt_touch_data sTouchPoint; + int count = 0; + + lcd_cleanscreen(); + + /* Drain RX queue before doing calibrate. */ + while (adc_request_point(pdev, &sTouchPoint) == RT_EOK); + + rt_thread_mdelay(100); + + /* Ready to calibrate */ + nu_draw_bots(sDispPoints[i].x, sDispPoints[i].y); + +#define DEF_MAX_GET_POINT_NUM 5 + + sADCPoints[i].x = 0; + sADCPoints[i].y = 0; + + while (count < DEF_MAX_GET_POINT_NUM) + { + if (adc_request_point(pdev, &sTouchPoint) == RT_EOK) + { + sADCPoints[i].x += (int32_t)sTouchPoint.x_coordinate; + sADCPoints[i].y += (int32_t)sTouchPoint.y_coordinate; + rt_kprintf("[%d %d] - Disp:[%d, %d] -> ADC:[%d, %d]\n", i, count, sDispPoints[i].x, sDispPoints[i].y, sADCPoints[i].x, sADCPoints[i].y); + count++; + } + } + + sADCPoints[i].x = (int32_t)((float)sADCPoints[i].x / DEF_MAX_GET_POINT_NUM); + sADCPoints[i].y = (int32_t)((float)sADCPoints[i].y / DEF_MAX_GET_POINT_NUM); + rt_kprintf("[%d] - Disp:[%d, %d], ADC:[%d, %d]\n", i, sDispPoints[i].x, sDispPoints[i].y, sADCPoints[i].x, sADCPoints[i].y); + + rt_thread_mdelay(300); + } + + lcd_cleanscreen(); + + /* Get calibration matrix. */ + if (nu_adc_cal_mat_get(&sDispPoints[0], &sADCPoints[0], &sCalMat) == 0) + { + /* Finally, update calibration matrix to drivers. */ + nu_adc_touch_update_calmat(&sCalMat); + + nu_adc_touch_writefile(&sCalMat, sizeof(sCalMat)); + + for (i = 0; i < DEF_CAL_POINT_NUM; i++) + { + rt_kprintf("[%d] - Disp:[%d, %d], ADC:[%d, %d]\n", i, sDispPoints[i].x, sDispPoints[i].y, sADCPoints[i].x, sADCPoints[i].y); + } + } + else + { + rt_kprintf("Failed to calibrate.\n"); + } + + rt_device_control(lcd_device, RTGRAPHIC_CTRL_POWEROFF, RT_NULL); + rt_device_close(lcd_device); + + return; +} + +static void adc_touch_entry(void *parameter) +{ + struct rt_touch_data touch_point; + + rt_err_t result; + rt_device_t pdev; + + int max_range; + + adc_touch_sem = rt_sem_create("adc_touch_sem", 0, RT_IPC_FLAG_FIFO); + RT_ASSERT(adc_touch_sem != RT_NULL); + + pdev = rt_device_find("adc_touch"); + if (!pdev) + { + rt_kprintf("Not found\n"); + return ; + } + + nu_adc_touch_readfile(); + + result = rt_device_open(pdev, RT_DEVICE_FLAG_INT_RX); + RT_ASSERT(result == RT_EOK); + + result = rt_device_set_rx_indicate(pdev, adc_touch_rx_callback); + RT_ASSERT(result == RT_EOK); + + max_range = BSP_LCD_WIDTH; + result = rt_device_control(pdev, RT_TOUCH_CTRL_SET_X_RANGE, (void *)&max_range); + RT_ASSERT(result == RT_EOK); + + max_range = BSP_LCD_HEIGHT; + result = rt_device_control(pdev, RT_TOUCH_CTRL_SET_Y_RANGE, (void *)&max_range); + RT_ASSERT(result == RT_EOK); + + result = rt_device_control(pdev, RT_TOUCH_CTRL_POWER_ON, RT_NULL); + RT_ASSERT(result == RT_EOK); + + while (adc_touch_worker_run) + { + if (!g_u32Calibrated) + { + rt_kprintf("Start ADC touching calibration.\n"); + nu_touch_do_calibration(pdev); + rt_kprintf("Stop ADC touching calibration.\n"); + continue; + } + + if (adc_request_point(pdev, &touch_point) == RT_EOK) + { + if (touch_point.event == RT_TOUCH_EVENT_DOWN + || touch_point.event == RT_TOUCH_EVENT_UP + || touch_point.event == RT_TOUCH_EVENT_MOVE) + { + nu_touch_inputevent_cb(touch_point.x_coordinate, touch_point.y_coordinate, touch_point.event); + + rt_kprintf("x=%d y=%d event=%s%s%s\n", + touch_point.x_coordinate, + touch_point.y_coordinate, + (touch_point.event == RT_TOUCH_EVENT_DOWN) ? "DOWN" : "", + (touch_point.event == RT_TOUCH_EVENT_UP) ? "UP" : "", + (touch_point.event == RT_TOUCH_EVENT_MOVE) ? "MOVE" : ""); + } + } + } + + result = rt_device_control(pdev, RT_TOUCH_CTRL_POWER_OFF, RT_NULL); + RT_ASSERT(result == RT_EOK); + + result = rt_device_close(pdev); + RT_ASSERT(result == RT_EOK); +} + + +/* Support "nu_touch_start" command line in msh mode */ +static rt_err_t nu_touch_start(int argc, char **argv) +{ + if (adc_touch_thread == RT_NULL) + { + adc_touch_thread = rt_thread_create("adc_touch_thread", + adc_touch_entry, + RT_NULL, + 4096, + 25, + 5); + adc_touch_worker_run = 1; + if (adc_touch_thread != RT_NULL) + rt_thread_startup(adc_touch_thread); + } + return 0; +} +MSH_CMD_EXPORT(nu_touch_start, e.g: start adc touch); + +/* Support "nu_touch_stop" command line in msh mode */ +static rt_err_t nu_touch_stop(int argc, char **argv) +{ + adc_touch_worker_run = 0; + adc_touch_thread = RT_NULL; + return 0; +} +MSH_CMD_EXPORT(nu_touch_stop, e.g: stop adc touch); + +static int nu_touch_autostart(void) +{ + return nu_touch_start(0, RT_NULL); +} +INIT_APP_EXPORT(nu_touch_autostart); + +static rt_err_t nu_touch_calibration(int argc, char **argv) +{ + /* Clean calibration matrix data for getting raw adc value. */ + nu_adc_touch_reset_calmat(); + + return 0; +} +MSH_CMD_EXPORT(nu_touch_calibration, for adc touch); + +#endif //#if defined(BSP_USING_ADC_TOUCH) diff --git a/bsp/nuvoton/libraries/nuc980/rtt_port/drv_can.c b/bsp/nuvoton/libraries/nuc980/rtt_port/drv_can.c index 3b48867bb2..fcdbbe8d74 100644 --- a/bsp/nuvoton/libraries/nuc980/rtt_port/drv_can.c +++ b/bsp/nuvoton/libraries/nuc980/rtt_port/drv_can.c @@ -64,6 +64,7 @@ struct nu_can IRQn_Type irqn; E_SYS_IPRST rstidx; E_SYS_IPCLK clkidx; + uint32_t int_flag; }; typedef struct nu_can *nu_can_t; @@ -130,16 +131,16 @@ static const struct can_configure nu_can_default_config = NU_CAN_CONFIG_DEFAULT; /* Interrupt Handle Function ----------------------------------------------------*/ static void nu_can_isr(int vector, void *param) { - uint32_t u32IIDRstatus; nu_can_t psNuCAN = (nu_can_t)param; /* Get base address of CAN register */ CAN_T *base = psNuCAN->base; /* Get interrupt event */ - u32IIDRstatus = CAN_GET_INT_PENDING_STATUS(base); + uint32_t u32IIDRstatus = CAN_GET_INT_PENDING_STATUS(base) & CAN_IIDR_INTID_Msk; - if (u32IIDRstatus == 0x00008000) /* Check Status Interrupt Flag (Error status Int and Status change Int) */ + /* Check Status Interrupt Flag (Error status Int and Status change Int) */ + if (u32IIDRstatus == 0x00008000) { /**************************/ /* Status Change interrupt*/ @@ -147,20 +148,24 @@ static void nu_can_isr(int vector, void *param) if (base->STATUS & CAN_STATUS_TXOK_Msk) { base->STATUS &= ~CAN_STATUS_TXOK_Msk; /* Clear Tx Ok status*/ - //rt_kprintf("%s: TX\n", psNuCAN->name) ; #ifndef RT_CAN_USING_HDR - /* Using as Lisen,Loopback,Loopback+Lisen mode*/ - rt_hw_can_isr(&psNuCAN->dev, RT_CAN_EVENT_TX_DONE); + if (psNuCAN->int_flag & RT_DEVICE_FLAG_INT_TX) + { + /*Using as Lisen,Loopback,Loopback+Lisen mode*/ + rt_hw_can_isr(&psNuCAN->dev, RT_CAN_EVENT_TX_DONE); + } #endif } if (base->STATUS & CAN_STATUS_RXOK_Msk) { base->STATUS &= ~CAN_STATUS_RXOK_Msk; /* Clear Rx Ok status*/ - //rt_kprintf("%s: RX\n", psNuCAN->name) ; #ifndef RT_CAN_USING_HDR - /* Using as Lisen,Loopback,Loopback+Lisen mode*/ - rt_hw_can_isr(&psNuCAN->dev, RT_CAN_EVENT_RX_IND); + if (psNuCAN->int_flag & RT_DEVICE_FLAG_INT_RX) + { + /*Using as Lisen,Loopback,Loopback+Lisen mode*/ + rt_hw_can_isr(&psNuCAN->dev, RT_CAN_EVENT_RX_IND); + } #endif } @@ -169,17 +174,16 @@ static void nu_can_isr(int vector, void *param) /**************************/ if (base->STATUS & CAN_STATUS_EWARN_Msk) { - rt_kprintf("%s: EWARN\n", psNuCAN->name) ; + rt_kprintf("[%s]EWARN INT\n", psNuCAN->name) ; } if (base->STATUS & CAN_STATUS_BOFF_Msk) { - rt_kprintf("%s: BUSOFF\n", psNuCAN->name) ; + rt_kprintf("[%s]BUSOFF INT\n", psNuCAN->name) ; - /* Do Init to release busoff pin */ - base->CON = (CAN_CON_INIT_Msk | CAN_CON_CCE_Msk); - base->CON &= (~(CAN_CON_INIT_Msk | CAN_CON_CCE_Msk)); - while (base->CON & CAN_CON_INIT_Msk); + /* To release busoff pin */ + CAN_EnterInitMode(base, CAN_CON_INIT_Msk | CAN_CON_CCE_Msk); + CAN_LeaveInitMode(base); } if (base->STATUS & CAN_STATUS_LEC_Msk) @@ -192,66 +196,83 @@ static void nu_can_isr(int vector, void *param) /*IntId: 0x0001-0x0020, Number of Message Object which caused the interrupt.*/ else if (u32IIDRstatus > 0 && u32IIDRstatus <= 32) { - /*Message RAM 0~RX_MSG_ID_INDEX for CAN Tx using*/ - if (u32IIDRstatus <= RX_MSG_ID_INDEX) + if ((psNuCAN->int_flag & RT_DEVICE_FLAG_INT_TX) && + (u32IIDRstatus <= RX_MSG_ID_INDEX)) { - //rt_kprintf("[%s-Tx]IntId = %d\n", psNuCAN->name, u32IIDRstatus); + /*Message RAM 0~RX_MSG_ID_INDEX for CAN Tx using*/ rt_hw_can_isr(&psNuCAN->dev, RT_CAN_EVENT_TX_DONE); } - else /*Message RAM RX_MSG_ID_INDEX~31 for CAN Rx using*/ + else if (psNuCAN->int_flag & RT_DEVICE_FLAG_INT_RX) { - //rt_kprintf("[%s-Rx]IntId = %d\n", psNuCAN->name, u32IIDRstatus); + /*Message RAM RX_MSG_ID_INDEX~31 for CAN Rx using*/ rt_hw_can_isr(&psNuCAN->dev, (RT_CAN_EVENT_RX_IND | ((u32IIDRstatus - 1) << 8))); } CAN_CLR_INT_PENDING_BIT(base, (u32IIDRstatus - 1)); /* Clear Interrupt Pending */ } #endif - } +static void nu_can_ie(nu_can_t psNuCAN) +{ + uint32_t u32CanIE = CAN_CON_IE_Msk; + + if (psNuCAN->int_flag & (RT_DEVICE_FLAG_INT_RX | RT_DEVICE_FLAG_INT_TX)) + { + u32CanIE |= CAN_CON_SIE_Msk; + } + else + { + u32CanIE &= ~CAN_CON_SIE_Msk; + } + + if (psNuCAN->int_flag & RT_DEVICE_CAN_INT_ERR) + { + u32CanIE |= CAN_CON_EIE_Msk; + } + else + { + u32CanIE &= ~CAN_CON_EIE_Msk; + } + + if (u32CanIE & (CAN_CON_SIE_Msk | CAN_CON_EIE_Msk)) + { + CAN_EnableInt(psNuCAN->base, u32CanIE); + + /* Enable interrupt. */ + rt_hw_interrupt_umask(psNuCAN->irqn); + } + else + { + u32CanIE |= (CAN_CON_IE_Msk | CAN_CON_SIE_Msk); + CAN_DisableInt(psNuCAN->base, u32CanIE); + + /* Disable interrupt. */ + rt_hw_interrupt_mask(psNuCAN->irqn); + } +} static rt_err_t nu_can_configure(struct rt_can_device *can, struct can_configure *cfg) { nu_can_t psNuCAN = (nu_can_t)can; + uint32_t u32CANMode; - RT_ASSERT(can != RT_NULL); - RT_ASSERT(cfg != RT_NULL); + RT_ASSERT(can); + RT_ASSERT(cfg); /* Get base address of CAN register */ CAN_T *base = psNuCAN->base; - RT_ASSERT(base != RT_NULL); - - switch (cfg->mode) - { - /* CAN default Normal mode */ - case RT_CAN_MODE_NORMAL: - can->config.mode = CAN_NORMAL_MODE; - break; - case RT_CAN_MODE_LISEN: - can->config.mode = RT_CAN_MODE_LISEN; - break; - case RT_CAN_MODE_LOOPBACK: - can->config.mode = RT_CAN_MODE_LOOPBACK; - break; - case RT_CAN_MODE_LOOPBACKANLISEN: - can->config.mode = RT_CAN_MODE_LOOPBACKANLISEN; - break; - default: - rt_kprintf("Unsupported Operating mode"); - goto exit_nu_can_configure; - } - + /* Reset this module */ nu_sys_ip_reset(psNuCAN->rstidx); - /*Set the CAN Bit Rate and Operating mode*/ - if (CAN_Open(base, can->config.baud_rate, can->config.mode) < 1) - return -(RT_ERROR); + u32CANMode = (cfg->mode == RT_CAN_MODE_NORMAL) ? CAN_NORMAL_MODE : CAN_BASIC_MODE; + /*Set the CAN Bit Rate and Operating mode*/ + if (CAN_Open(base, cfg->baud_rate, u32CANMode) != cfg->baud_rate) + goto exit_nu_can_configure; switch (cfg->mode) { - /* CAN default Normal mode */ case RT_CAN_MODE_NORMAL: #ifdef RT_CAN_USING_HDR CAN_LeaveTestMode(base); @@ -273,6 +294,7 @@ static rt_err_t nu_can_configure(struct rt_can_device *can, struct can_configure goto exit_nu_can_configure; } + nu_can_ie(psNuCAN); return RT_EOK; @@ -285,73 +307,33 @@ exit_nu_can_configure: static rt_err_t nu_can_control(struct rt_can_device *can, int cmd, void *arg) { - rt_uint32_t argval; - nu_can_t psNuCAN = (nu_can_t)can; + rt_uint32_t argval = (rt_uint32_t)arg; + nu_can_t psNuCAN = (nu_can_t)can; -#ifdef RT_CAN_USING_HDR - struct rt_can_filter_config *filter_cfg; -#endif - /* Get base address of CAN register */ - CAN_T *base = psNuCAN->base; - - RT_ASSERT(base != RT_NULL); - /* Check baud rate */ - RT_ASSERT(can->config.baud_rate != 0); + RT_ASSERT(can); switch (cmd) { - case RT_DEVICE_CTRL_CLR_INT: - argval = (rt_uint32_t) arg; - if ((argval == RT_DEVICE_FLAG_INT_RX) || (argval == RT_DEVICE_FLAG_INT_TX)) - { - /* Disable NVIC interrupt. */ - rt_hw_interrupt_mask(psNuCAN->irqn); - - /* Disable Status Change Interrupt */ - CAN_DisableInt(base, CAN_CON_IE_Msk | CAN_CON_SIE_Msk); - - } - else if (argval == RT_DEVICE_CAN_INT_ERR) - { - /* Disable interrupt. */ - rt_hw_interrupt_mask(psNuCAN->irqn); - - /* Disable Error Interrupt */ - CAN_DisableInt(base, CAN_CON_EIE_Msk); - } - break; - case RT_DEVICE_CTRL_SET_INT: - argval = (rt_uint32_t) arg; - if (argval == RT_DEVICE_FLAG_INT_RX || (argval == RT_DEVICE_FLAG_INT_TX)) - { - /* Enable Status Change Interrupt */ - CAN_EnableInt(base, CAN_CON_IE_Msk | CAN_CON_SIE_Msk); - - /* Enable interrupt. */ - rt_hw_interrupt_umask(psNuCAN->irqn); - } - else if (argval == RT_DEVICE_CAN_INT_ERR) - { - /* Enable Error Status and Status Change Interrupt */ - CAN_EnableInt(base, CAN_CON_IE_Msk | CAN_CON_SIE_Msk | CAN_CON_EIE_Msk); - - /* Enable interrupt. */ - rt_hw_interrupt_umask(psNuCAN->irqn); - } + psNuCAN->int_flag |= argval; + nu_can_ie(psNuCAN); + break; + + case RT_DEVICE_CTRL_CLR_INT: + psNuCAN->int_flag &= ~argval; + nu_can_ie(psNuCAN); break; -#ifdef RT_CAN_USING_HDR case RT_CAN_CMD_SET_FILTER: - filter_cfg = (struct rt_can_filter_config *)arg; + { + struct rt_can_filter_config *filter_cfg = (struct rt_can_filter_config *)arg; for (int i = 0; i < filter_cfg->count; i++) { - /*set the filter message object*/ if (filter_cfg->items[i].mode == 1) { - if (CAN_SetRxMsgObjAndMsk(base, MSG(filter_cfg->items[i].hdr + RX_MSG_ID_INDEX), filter_cfg->items[i].ide, filter_cfg->items[i].id, filter_cfg->items[i].mask, FALSE) == FALSE) + if (CAN_SetRxMsgObjAndMsk(psNuCAN->base, MSG(filter_cfg->items[i].hdr + RX_MSG_ID_INDEX), filter_cfg->items[i].ide, filter_cfg->items[i].id, filter_cfg->items[i].mask, FALSE) == FALSE) { return -(RT_ERROR); } @@ -359,46 +341,61 @@ static rt_err_t nu_can_control(struct rt_can_device *can, int cmd, void *arg) else { /*set the filter message object*/ - if (CAN_SetRxMsgAndMsk(base, MSG(filter_cfg->items[i].hdr + RX_MSG_ID_INDEX), filter_cfg->items[i].ide, filter_cfg->items[i].id, filter_cfg->items[i].mask) == FALSE) + if (CAN_SetRxMsgAndMsk(psNuCAN->base, MSG(filter_cfg->items[i].hdr + RX_MSG_ID_INDEX), filter_cfg->items[i].ide, filter_cfg->items[i].id, filter_cfg->items[i].mask) == FALSE) { return -(RT_ERROR); } } } - break; -#endif + } + break; case RT_CAN_CMD_SET_MODE: - argval = (rt_uint32_t) arg; - if (argval != RT_CAN_MODE_NORMAL && argval != RT_CAN_MODE_LISEN && - argval != RT_CAN_MODE_LOOPBACK && argval != RT_CAN_MODE_LOOPBACKANLISEN) + if ((argval == RT_CAN_MODE_NORMAL) || + (argval == RT_CAN_MODE_LISEN) || + (argval == RT_CAN_MODE_LOOPBACK) || + (argval == RT_CAN_MODE_LOOPBACKANLISEN)) + { + if (argval != can->config.mode) + { + can->config.mode = argval; + return nu_can_configure(can, &can->config); + } + } + else { return -(RT_ERROR); } - if (argval != can->config.mode) - { - can->config.mode = argval; - return nu_can_configure(can, &can->config); - } break; case RT_CAN_CMD_SET_BAUD: - argval = (rt_uint32_t) arg; - if (argval != CAN1MBaud && argval != CAN800kBaud && argval != CAN500kBaud && argval != CAN250kBaud && - argval != CAN125kBaud && argval != CAN100kBaud && argval != CAN50kBaud && argval != CAN20kBaud && argval != CAN10kBaud) + { + if ((argval == CAN1MBaud) || + (argval == CAN800kBaud) || + (argval == CAN500kBaud) || + (argval == CAN250kBaud) || + (argval == CAN125kBaud) || + (argval == CAN100kBaud) || + (argval == CAN50kBaud) || + (argval == CAN20kBaud) || + (argval == CAN10kBaud)) + { + if (argval != can->config.baud_rate) + { + can->config.baud_rate = argval; + return nu_can_configure(can, &can->config); + } + } + else { return -(RT_ERROR); } - if (argval != can->config.baud_rate) - { - can->config.baud_rate = argval; - return nu_can_configure(can, &can->config); - } - break; + } + break; case RT_CAN_CMD_SET_PRIV: - argval = (rt_uint32_t) arg; - if (argval != RT_CAN_MODE_PRIV && argval != RT_CAN_MODE_NOPRIV) + if (argval != RT_CAN_MODE_PRIV && + argval != RT_CAN_MODE_NOPRIV) { return -(RT_ERROR); } @@ -411,16 +408,23 @@ static rt_err_t nu_can_control(struct rt_can_device *can, int cmd, void *arg) case RT_CAN_CMD_GET_STATUS: { - rt_uint32_t errtype; - errtype = base->ERR; - /*Receive Error Counter*/ + rt_uint32_t errtype = psNuCAN->base->ERR; + + RT_ASSERT(arg); + + /*Receive Error Counter, return value is with Receive Error Passive.*/ can->status.rcverrcnt = (errtype >> 8); + /*Transmit Error Counter*/ - can->status.snderrcnt = ((errtype >> 24) & 0xFF); - can->status.lasterrtype = CAN_GET_INT_STATUS(base) & 0x8000; - /*status error code*/ - can->status.errcode = CAN_GET_INT_STATUS(base) & 0x07; - rt_memcpy(arg, &can->status, sizeof(can->status)); + can->status.snderrcnt = (errtype & 0xFF); + + /*Last Error Type*/ + can->status.lasterrtype = CAN_GET_INT_STATUS(psNuCAN->base) & 0x8000; + + /*Status error code*/ + can->status.errcode = CAN_GET_INT_STATUS(psNuCAN->base) & 0x07; + + rt_memcpy(arg, &can->status, sizeof(struct rt_can_status)); } break; @@ -435,64 +439,91 @@ static rt_err_t nu_can_control(struct rt_can_device *can, int cmd, void *arg) static int nu_can_sendmsg(struct rt_can_device *can, const void *buf, rt_uint32_t boxno) { STR_CANMSG_T tMsg; - struct rt_can_msg *pmsg = (struct rt_can_msg *) buf; + struct rt_can_msg *pmsg; + nu_can_t psNuCAN = (nu_can_t)can; - /* Get base address of CAN register */ - CAN_T *base = ((nu_can_t)can)->base; + RT_ASSERT(can); + RT_ASSERT(buf); - RT_ASSERT(base != RT_NULL); - RT_ASSERT(buf != RT_NULL); + pmsg = (struct rt_can_msg *) buf; - /* Check the parameters */ - RT_ASSERT(IS_CAN_DLC(pmsg->len)); - - /* Standard ID (11 bits)*/ - if (pmsg->ide == RT_CAN_STDID) + if (pmsg->ide == RT_CAN_STDID && IS_CAN_STDID(pmsg->id)) { + /* Standard ID (11 bits)*/ tMsg.IdType = CAN_STD_ID; - RT_ASSERT(IS_CAN_STDID(pmsg->id)) tMsg.Id = pmsg->id ; } - else + else if (pmsg->ide == RT_CAN_EXTID && IS_CAN_EXTID(pmsg->id)) { /* Extended ID (29 bits)*/ tMsg.IdType = CAN_EXT_ID; - RT_ASSERT(IS_CAN_EXTID(pmsg->id)); tMsg.Id = pmsg->id ; } + else + { + goto exit_nu_can_sendmsg; + } if (pmsg->rtr == RT_CAN_DTR) { /* Data frame */ tMsg.FrameType = CAN_DATA_FRAME; } - else + else if (pmsg->rtr == RT_CAN_RTR) { /* Remote frame */ tMsg.FrameType = CAN_REMOTE_FRAME; } - tMsg.DLC = pmsg->len; - rt_memcpy(tMsg.Data, pmsg->data, pmsg->len); - - if (CAN_Transmit(base, MSG(boxno), &tMsg) == FALSE) // Configure Msg RAM and send the Msg in the RAM + else { - return -(RT_ERROR); + goto exit_nu_can_sendmsg; + } + + /* Check the parameters */ + if (IS_CAN_DLC(pmsg->len)) + { + tMsg.DLC = pmsg->len; + } + else + { + goto exit_nu_can_sendmsg; + } + + if (pmsg->data && pmsg->len) + { + rt_memcpy(&tMsg.Data[0], pmsg->data, pmsg->len); + } + else + { + goto exit_nu_can_sendmsg; + } + + /* Configure Msg RAM and send the Msg in the RAM. */ + if (CAN_Transmit(psNuCAN->base, MSG(boxno), &tMsg) == FALSE) + { + goto exit_nu_can_sendmsg; } return RT_EOK; + +exit_nu_can_sendmsg: + + return -(RT_ERROR); } + static int nu_can_recvmsg(struct rt_can_device *can, void *buf, rt_uint32_t boxno) { STR_CANMSG_T tMsg; - struct rt_can_msg *pmsg = (struct rt_can_msg *) buf; - /* Get base address of CAN register */ - CAN_T *base = ((nu_can_t)can)->base; + struct rt_can_msg *pmsg; + nu_can_t psNuCAN = (nu_can_t)can; - RT_ASSERT(base != RT_NULL); - RT_ASSERT(buf != RT_NULL); + RT_ASSERT(can); + RT_ASSERT(buf); + + pmsg = (struct rt_can_msg *) buf; /* get data */ - if (CAN_Receive(base, boxno, &tMsg) == FALSE) + if (CAN_Receive(psNuCAN->base, boxno, &tMsg) == FALSE) { rt_kprintf("No available RX Msg.\n"); return -(RT_ERROR); @@ -504,32 +535,13 @@ static int nu_can_recvmsg(struct rt_can_device *can, void *buf, rt_uint32_t boxn can->hdr[pmsg->hdr].connected = 1; #endif - /* Standard ID (11 bits)*/ - if (tMsg.IdType == CAN_STD_ID) - { - pmsg->ide = RT_CAN_STDID; - pmsg->id = tMsg.Id; - } - else /* Extended ID (29 bits)*/ - { - pmsg->ide = RT_CAN_EXTID; - pmsg->id = tMsg.Id; - } - - if (tMsg.FrameType == CAN_DATA_FRAME) - { - /* Data frame */ - pmsg->rtr = RT_CAN_DTR; - } - else - { - /* Remote frame */ - pmsg->rtr = RT_CAN_RTR; - } - + pmsg->ide = (tMsg.IdType == CAN_STD_ID) ? RT_CAN_STDID : RT_CAN_EXTID; + pmsg->rtr = (tMsg.FrameType == CAN_DATA_FRAME) ? RT_CAN_DTR : RT_CAN_RTR; + pmsg->id = tMsg.Id; pmsg->len = tMsg.DLC ; - rt_memcpy(pmsg->data, tMsg.Data, pmsg->len); + if (pmsg->data && pmsg->len) + rt_memcpy(pmsg->data, &tMsg.Data[0], pmsg->len); return RT_EOK; } @@ -564,5 +576,4 @@ static int rt_hw_can_init(void) return (int)ret; } INIT_DEVICE_EXPORT(rt_hw_can_init); - #endif //#if defined(BSP_USING_CAN) diff --git a/bsp/nuvoton/libraries/nuc980/rtt_port/drv_emac.c b/bsp/nuvoton/libraries/nuc980/rtt_port/drv_emac.c index 252ca1e1ae..9e94e347ca 100644 --- a/bsp/nuvoton/libraries/nuc980/rtt_port/drv_emac.c +++ b/bsp/nuvoton/libraries/nuc980/rtt_port/drv_emac.c @@ -682,7 +682,7 @@ lwiperf_report(void *arg, enum lwiperf_report_type report_type, (int)report_type, ipaddr_ntoa(remote_addr), (int)remote_port, bytes_transferred, ms_duration, bandwidth_kbitpsec); } -void lwiperf_example_init(void) +void lwiperf_example_init(int argc, char **argv) { lwiperf_start_tcp_server_default(lwiperf_report, NULL); } diff --git a/bsp/nuvoton/libraries/nuc980/rtt_port/drv_i2c.c b/bsp/nuvoton/libraries/nuc980/rtt_port/drv_i2c.c index 423740dfc0..89e80b662f 100644 --- a/bsp/nuvoton/libraries/nuc980/rtt_port/drv_i2c.c +++ b/bsp/nuvoton/libraries/nuc980/rtt_port/drv_i2c.c @@ -118,7 +118,7 @@ static rt_err_t nu_i2c_bus_control(struct rt_i2c_bus_device *bus, rt_uint32_t u3 RT_ASSERT(bus != RT_NULL); nu_i2c = (nu_i2c_bus_t *) bus; - switch (RT_I2C_DEV_CTRL_CLK) + switch (u32Cmd) { case RT_I2C_DEV_CTRL_CLK: I2C_SetBusClockFreq(nu_i2c->I2C, u32Value); diff --git a/bsp/nuvoton/nk-980iot/.config b/bsp/nuvoton/nk-980iot/.config index fa6f45f046..1339d389e1 100644 --- a/bsp/nuvoton/nk-980iot/.config +++ b/bsp/nuvoton/nk-980iot/.config @@ -203,8 +203,7 @@ CONFIG_RT_AUDIO_REPLAY_MP_BLOCK_SIZE=4096 CONFIG_RT_AUDIO_REPLAY_MP_BLOCK_COUNT=2 CONFIG_RT_AUDIO_RECORD_PIPE_SIZE=2048 # CONFIG_RT_USING_SENSOR is not set -CONFIG_RT_USING_TOUCH=y -# CONFIG_RT_TOUCH_PIN_IRQ is not set +# CONFIG_RT_USING_TOUCH is not set CONFIG_RT_USING_HWCRYPTO=y CONFIG_RT_HWCRYPTO_DEFAULT_NAME="hwcryto" CONFIG_RT_HWCRYPTO_IV_MAX_SIZE=16 @@ -550,17 +549,11 @@ CONFIG_PKG_NETUTILS_VER_NUM=0x10301 # # LVGL: powerful and easy-to-use embedded GUI library # -CONFIG_PKG_USING_LVGL=y -CONFIG_PKG_LVGL_PATH="/packages/multimedia/LVGL/LVGL" -# CONFIG_PKG_USING_LVGL_EXAMPLES is not set -CONFIG_PKG_USING_LVGL_V810=y +# CONFIG_PKG_USING_LVGL is not set +# CONFIG_PKG_USING_LVGL_V810 is not set # CONFIG_PKG_USING_LVGL_LATEST_VERSION is not set -CONFIG_PKG_LVGL_VER="v8.1.0" -CONFIG_PKG_LVGL_VER_NUM=0x08010 # CONFIG_PKG_USING_LITTLEVGL2RTT is not set -CONFIG_PKG_USING_LV_MUSIC_DEMO=y -CONFIG_PKG_LV_MUSIC_DEMO_PATH="/packages/multimedia/LVGL/lv_music_demo" -CONFIG_PKG_LV_MUSIC_DEMO_VER="v0.1.1" +# CONFIG_PKG_USING_LV_MUSIC_DEMO is not set # # u8g2: a monochrome graphic library @@ -597,6 +590,7 @@ CONFIG_PKG_WAVPLAYER_VER="latest" # CONFIG_PKG_USING_MCURSES is not set # CONFIG_PKG_USING_TERMBOX is not set # CONFIG_PKG_USING_VT100 is not set +# CONFIG_PKG_USING_QRCODE is not set # # tools packages @@ -607,7 +601,6 @@ CONFIG_PKG_WAVPLAYER_VER="latest" # CONFIG_PKG_USING_SYSTEMVIEW is not set # CONFIG_PKG_USING_SEGGER_RTT is not set # CONFIG_PKG_USING_RDB is not set -# CONFIG_PKG_USING_QRCODE is not set # CONFIG_PKG_USING_ULOG_EASYFLASH is not set # CONFIG_PKG_USING_ULOG_FILE is not set # CONFIG_PKG_USING_LOGMGR is not set @@ -658,6 +651,7 @@ CONFIG_PKG_WAVPLAYER_VER="latest" # CONFIG_PKG_USING_POSIX_GETLINE is not set # CONFIG_PKG_USING_POSIX_WCWIDTH is not set # CONFIG_PKG_USING_POSIX_ITOA is not set +# CONFIG_PKG_USING_POSIX_STRINGS is not set # # acceleration: Assembly language or algorithmic acceleration packages @@ -783,6 +777,7 @@ CONFIG_PKG_RAMDISK_VER="latest" # CONFIG_PKG_USING_SSD1306 is not set # CONFIG_PKG_USING_QKEY is not set # CONFIG_PKG_USING_RS485 is not set +# CONFIG_PKG_USING_RS232 is not set # CONFIG_PKG_USING_NES is not set # CONFIG_PKG_USING_VIRTUAL_SENSOR is not set # CONFIG_PKG_USING_VDEVICE is not set @@ -874,23 +869,8 @@ CONFIG_PKG_OPTPARSE_VER="latest" # CONFIG_PKG_USING_LWGPS is not set # CONFIG_PKG_USING_STATE_MACHINE is not set # CONFIG_PKG_USING_DESIGN_PATTERN is not set - -# -# Nuvoton Packages Config -# -CONFIG_NU_PKG_USING_UTILS=y -CONFIG_NU_PKG_USING_DEMO=y -# CONFIG_NU_PKG_USING_BMX055 is not set -# CONFIG_NU_PKG_USING_MAX31875 is not set -# CONFIG_NU_PKG_USING_NAU88L25 is not set -CONFIG_NU_PKG_USING_NAU8822=y -# CONFIG_NU_PKG_USING_DA9062 is not set -CONFIG_NU_PKG_USING_ILI9341=y -CONFIG_NU_PKG_USING_ILI9341_SPI=y -# CONFIG_NU_PKG_USING_ILI9341_EBI is not set -CONFIG_NU_PKG_ILI9341_WITH_OFFSCREEN_FRAMEBUFFER=y -CONFIG_NU_PKG_ILI9341_HORIZONTAL=y -CONFIG_NU_PKG_USING_SPINAND=y +# CONFIG_PKG_USING_CONTROLLER is not set +# CONFIG_PKG_USING_PHASE_LOCKED_LOOP is not set # # Hardware Drivers Config @@ -913,6 +893,7 @@ CONFIG_BSP_USING_RTC=y CONFIG_NU_RTC_SUPPORT_IO_RW=y CONFIG_NU_RTC_SUPPORT_MSH_CMD=y CONFIG_BSP_USING_ADC=y +# CONFIG_BSP_USING_ADC_TOUCH is not set CONFIG_BSP_USING_TMR=y CONFIG_BSP_USING_TIMER=y CONFIG_BSP_USING_TMR0=y @@ -998,8 +979,20 @@ CONFIG_BOARD_USING_USB1_HOST=y # Board extended module drivers # # CONFIG_BOARD_USING_MAX31875 is not set -CONFIG_BOARD_USING_LCD_ILI9341=y -CONFIG_BOARD_USING_ILI9341_PIN_BACKLIGHT=103 -CONFIG_BOARD_USING_ILI9341_PIN_RESET=90 -CONFIG_BOARD_USING_ILI9341_PIN_DC=89 +# CONFIG_BOARD_USING_LCD_ILI9341 is not set # CONFIG_BOARD_USING_ESP8266 is not set + +# +# Nuvoton Packages Config +# +CONFIG_NU_PKG_USING_UTILS=y +CONFIG_NU_PKG_USING_DEMO=y +# CONFIG_NU_PKG_USING_BMX055 is not set +# CONFIG_NU_PKG_USING_MAX31875 is not set +# CONFIG_NU_PKG_USING_NAU88L25 is not set +CONFIG_NU_PKG_USING_NAU8822=y +# CONFIG_NU_PKG_USING_DA9062 is not set +# CONFIG_NU_PKG_USING_ILI9341 is not set +CONFIG_NU_PKG_USING_SPINAND=y +CONFIG_BOARD_USE_UTEST=y +CONFIG_UTEST_CMD_PREFIX="bsp.nuvoton.nk980-iot.test.utest." diff --git a/bsp/nuvoton/nk-980iot/Kconfig b/bsp/nuvoton/nk-980iot/Kconfig index 5c55e87c61..b396340d12 100644 --- a/bsp/nuvoton/nk-980iot/Kconfig +++ b/bsp/nuvoton/nk-980iot/Kconfig @@ -18,12 +18,6 @@ config PKGS_DIR option env="PKGS_ROOT" default "packages" -config NU_PKGS_DIR - string - option env="NU_PKGS_ROOT" - default "../libraries/nu_packages" - source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" -source "$NU_PKGS_DIR/Kconfig" source "$BSP_DIR/board/Kconfig" diff --git a/bsp/nuvoton/nk-980iot/board/Kconfig b/bsp/nuvoton/nk-980iot/board/Kconfig index 06547f567b..e623161d9e 100644 --- a/bsp/nuvoton/nk-980iot/board/Kconfig +++ b/bsp/nuvoton/nk-980iot/board/Kconfig @@ -72,6 +72,7 @@ menu "Hardware Drivers Config" config BOARD_USING_LCD_ILI9341 bool "LCD ILI9341 (over spi0)" select RT_USING_TOUCH + select BSP_USING_ADC_TOUCH select NU_PKG_USING_ILI9341 select NU_PKG_USING_ILI9341_SPI select NU_PKG_ILI9341_WITH_OFFSCREEN_FRAMEBUFFER @@ -113,5 +114,6 @@ menu "Hardware Drivers Config" endmenu + source "$BSP_DIR/../libraries/nu_packages/Kconfig" endmenu diff --git a/bsp/nuvoton/nk-980iot/board/nu_pin_init.c b/bsp/nuvoton/nk-980iot/board/nu_pin_init.c index 97ab099cfa..0ab0bb1f71 100644 --- a/bsp/nuvoton/nk-980iot/board/nu_pin_init.c +++ b/bsp/nuvoton/nk-980iot/board/nu_pin_init.c @@ -57,8 +57,10 @@ static void nu_pin_i2c_init(void) /* I2C0: PA[0, 1] */ outpw(REG_SYS_GPA_MFPL, (inpw(REG_SYS_GPA_MFPL) & ~0x000000FF) | 0x00000033); +#if !defined(BSP_USING_ADC_TOUCH) /* I2C2: PB5, PB7 */ outpw(REG_SYS_GPB_MFPL, (inpw(REG_SYS_GPB_MFPL) & ~0xF0F00000) | 0x20200000); +#endif } diff --git a/bsp/nuvoton/nk-980iot/project.uvproj b/bsp/nuvoton/nk-980iot/project.uvproj deleted file mode 100644 index edb52cb8a3..0000000000 --- a/bsp/nuvoton/nk-980iot/project.uvproj +++ /dev/null @@ -1,1877 +0,0 @@ - - - 1.1 -
### uVision Project, (C) Keil Software
- - - rtthread - 0x4 - ARM-ADS - - - Nuvoton_ARM9_Series - Nuvoton - - - - - 0 - - - - - - - - - - - - 0 - - - - Atmel\SAM9260\ - Atmel\SAM9260\ - - 0 - 0 - 0 - 0 - 1 - - .\Objects\ - rtthread - 1 - 0 - 0 - 1 - 1 - .\Listings\ - 1 - 0 - 0 - - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 0 - 0 - - - 0 - 0 - - - 0 - 0 - - - 0 - 0 - - 0 - - - - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 3 - - - - - SARM.DLL - -cAT91SAM9 - DARMATS9.DLL - -p91SAM9260 - SARM.DLL - - TARMATS9.DLL - -p91SAM9260 - - - - 1 - 0 - 0 - 0 - 16 - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - - - 1 - 0 - 0 - 1 - 1 - 1 - 0 - 1 - 1 - - 0 - 6 - - - - - - - - - - - - - ..\libraries\nuc980\Script\NUC980xx61.ini - Segger\JLTAgdi.dll - - - - - 1 - 0 - 0 - 0 - 1 - 4098 - - 0 - Segger\JLTAgdi.dll - "" () - - - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 1 - 0 - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 3 - 3 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x200000 - 0x1000 - - - 1 - 0x100000 - 0x8000 - - - 0 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - - - - 1 - 3 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 2 - 0 - 0 - - --c99 - __RTTHREAD__, RT_USING_ARM_LIBC, __CLK_TCK=RT_TICK_PER_SECOND - - applications;.;board;..\..\..\components\libc\compilers\common;..\..\..\components\libc\compilers\common\nogcc;..\..\..\libcpu\arm\common;..\..\..\libcpu\arm\arm926;..\..\..\components\drivers\audio;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\hwcrypto;.;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\spi;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\touch;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\libraries\nuc980\rtt_port;..\..\..\components\dfs\include;..\..\..\components\dfs\filesystems\devfs;..\..\..\components\dfs\filesystems\elmfat;..\..\..\components\finsh;.;..\..\..\include;..\libraries\nuc980\Driver\Include;applications\lvgl;..\..\..\components\net\lwip-2.1.2\src;..\..\..\components\net\lwip-2.1.2\src\include;..\..\..\components\net\lwip-2.1.2\src\arch\include;..\..\..\components\net\lwip-2.1.2\src\include\netif;..\libraries\nu_packages\Demo;..\libraries\nu_packages\ILI9341;..\libraries\nu_packages\AudioCodec;..\libraries\nu_packages\SPINAND;..\libraries\nuc980\UsbHostLib\inc;..\libraries\nu_packages\NuUtils\inc;..\..\..\components\libc\posix\io;..\..\..\components\libc\posix\io\poll;..\..\..\components\libc\posix\ipc;..\..\..\components\drivers\usb\usbdevice;..\..\..\components\drivers\usb\usbhost;..\..\..\components\drivers\usb\usbhost\class;..\..\..\components\drivers\usb\usbhost\core;..\..\..\components\drivers\usb\usbhost\include;..\..\..\components\drivers\include;..\..\..\components\net\netdev\include;..\..\..\components\net\sal_socket\include;..\..\..\components\net\sal_socket\include\socket;..\..\..\components\net\sal_socket\impl;..\..\..\components\net\sal_socket\include\dfs_net;..\..\..\components\net\sal_socket\include\socket\sys_socket;..\..\..\components\utilities\utest;..\..\..\examples\utest\testcases\kernel - - - - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - - - - 0 - 0 - 0 - 0 - 1 - 0 - 0x20000000 - 0x20800000 - .\linking_scripts\nuc980.sct - - - - - - - - - - - Applications - - - main.c - 1 - applications\main.c - - - - - mnt.c - 1 - applications\mnt.c - - - - - board - - - nu_pin_init.c - 1 - board\nu_pin_init.c - - - - - board_dev.c - 1 - board\board_dev.c - - - - - Compiler - - - syscalls.c - 1 - ..\..\..\components\libc\compilers\armlibc\syscalls.c - - - - - syscall_mem.c - 1 - ..\..\..\components\libc\compilers\armlibc\syscall_mem.c - - - - - libc_syms.c - 1 - ..\..\..\components\libc\compilers\armlibc\libc_syms.c - - - - - stdlib.c - 1 - ..\..\..\components\libc\compilers\common\stdlib.c - - - - - time.c - 1 - ..\..\..\components\libc\compilers\common\time.c - - - - - CPU - - - backtrace.c - 1 - ..\..\..\libcpu\arm\common\backtrace.c - - - - - showmem.c - 1 - ..\..\..\libcpu\arm\common\showmem.c - - - - - div0.c - 1 - ..\..\..\libcpu\arm\common\div0.c - - - - - mmu.c - 1 - ..\..\..\libcpu\arm\arm926\mmu.c - - - - - trap.c - 1 - ..\..\..\libcpu\arm\arm926\trap.c - - - - - stack.c - 1 - ..\..\..\libcpu\arm\arm926\stack.c - - - - - context_rvds.S - 2 - ..\..\..\libcpu\arm\arm926\context_rvds.S - - - - - machine.c - 1 - ..\..\..\libcpu\arm\arm926\machine.c - - - - - cpuport.c - 1 - ..\..\..\libcpu\arm\arm926\cpuport.c - - - - - start_rvds.S - 2 - ..\..\..\libcpu\arm\arm926\start_rvds.S - - - - - DeviceDrivers - - - audio.c - 1 - ..\..\..\components\drivers\audio\audio.c - - - - - audio_pipe.c - 1 - ..\..\..\components\drivers\audio\audio_pipe.c - - - - - can.c - 1 - ..\..\..\components\drivers\can\can.c - - - - - cputime.c - 1 - ..\..\..\components\drivers\cputime\cputime.c - - - - - hw_symmetric.c - 1 - ..\..\..\components\drivers\hwcrypto\hw_symmetric.c - - - - - hwcrypto.c - 1 - ..\..\..\components\drivers\hwcrypto\hwcrypto.c - - - - - hw_rng.c - 1 - ..\..\..\components\drivers\hwcrypto\hw_rng.c - - - - - hw_hash.c - 1 - ..\..\..\components\drivers\hwcrypto\hw_hash.c - - - - - hwtimer.c - 1 - ..\..\..\components\drivers\hwtimer\hwtimer.c - - - - - i2c_core.c - 1 - ..\..\..\components\drivers\i2c\i2c_core.c - - - - - i2c_dev.c - 1 - ..\..\..\components\drivers\i2c\i2c_dev.c - - - - - i2c-bit-ops.c - 1 - ..\..\..\components\drivers\i2c\i2c-bit-ops.c - - - - - adc.c - 1 - ..\..\..\components\drivers\misc\adc.c - - - - - rt_drv_pwm.c - 1 - ..\..\..\components\drivers\misc\rt_drv_pwm.c - - - - - pin.c - 1 - ..\..\..\components\drivers\misc\pin.c - - - - - mtd_nand.c - 1 - ..\..\..\components\drivers\mtd\mtd_nand.c - - - - - rtc.c - 1 - ..\..\..\components\drivers\rtc\rtc.c - - - - - alarm.c - 1 - ..\..\..\components\drivers\rtc\alarm.c - - - - - serial.c - 1 - ..\..\..\components\drivers\serial\serial.c - - - - - spi_core.c - 1 - ..\..\..\components\drivers\spi\spi_core.c - - - - - spi_dev.c - 1 - ..\..\..\components\drivers\spi\spi_dev.c - - - - - qspi_core.c - 1 - ..\..\..\components\drivers\spi\qspi_core.c - - - - - completion.c - 1 - ..\..\..\components\drivers\src\completion.c - - - - - workqueue.c - 1 - ..\..\..\components\drivers\src\workqueue.c - - - - - dataqueue.c - 1 - ..\..\..\components\drivers\src\dataqueue.c - - - - - ringbuffer.c - 1 - ..\..\..\components\drivers\src\ringbuffer.c - - - - - ringblk_buf.c - 1 - ..\..\..\components\drivers\src\ringblk_buf.c - - - - - pipe.c - 1 - ..\..\..\components\drivers\src\pipe.c - - - - - waitqueue.c - 1 - ..\..\..\components\drivers\src\waitqueue.c - - - - - touch.c - 1 - ..\..\..\components\drivers\touch\touch.c - - - - - watchdog.c - 1 - ..\..\..\components\drivers\watchdog\watchdog.c - - - - - - - - - - - - - - - - - Drivers - - - drv_uart.c - 1 - ..\libraries\nuc980\rtt_port\drv_uart.c - - - - - drv_etimer_capture.c - 1 - ..\libraries\nuc980\rtt_port\drv_etimer_capture.c - - - - - drv_systick.c - 1 - ..\libraries\nuc980\rtt_port\drv_systick.c - - - - - drv_emac.c - 1 - ..\libraries\nuc980\rtt_port\drv_emac.c - - - - - drv_sys.c - 1 - ..\libraries\nuc980\rtt_port\drv_sys.c - - - - - drv_i2c.c - 1 - ..\libraries\nuc980\rtt_port\drv_i2c.c - - - - - drv_qspi.c - 1 - ..\libraries\nuc980\rtt_port\drv_qspi.c - - - - - drv_etimer.c - 1 - ..\libraries\nuc980\rtt_port\drv_etimer.c - - - - - drv_rtc.c - 1 - ..\libraries\nuc980\rtt_port\drv_rtc.c - - - - - drv_usbhost.c - 1 - ..\libraries\nuc980\rtt_port\drv_usbhost.c - - - - - drv_wdt.c - 1 - ..\libraries\nuc980\rtt_port\drv_wdt.c - - - - - drv_pdma.c - 1 - ..\libraries\nuc980\rtt_port\drv_pdma.c - - - - - drv_sdh.c - 1 - ..\libraries\nuc980\rtt_port\drv_sdh.c - - - - - drv_softi2c.c - 1 - ..\libraries\nuc980\rtt_port\drv_softi2c.c - - - - - drv_usbd.c - 1 - ..\libraries\nuc980\rtt_port\drv_usbd.c - - - - - drv_adc.c - 1 - ..\libraries\nuc980\rtt_port\drv_adc.c - - - - - drv_pwm.c - 1 - ..\libraries\nuc980\rtt_port\drv_pwm.c - - - - - drv_can.c - 1 - ..\libraries\nuc980\rtt_port\drv_can.c - - - - - drv_common.c - 1 - ..\libraries\nuc980\rtt_port\drv_common.c - - - - - drv_i2s.c - 1 - ..\libraries\nuc980\rtt_port\drv_i2s.c - - - - - drv_spi.c - 1 - ..\libraries\nuc980\rtt_port\drv_spi.c - - - - - drv_crypto.c - 1 - ..\libraries\nuc980\rtt_port\drv_crypto.c - - - - - drv_scuart.c - 1 - ..\libraries\nuc980\rtt_port\drv_scuart.c - - - - - drv_ebi.c - 1 - ..\libraries\nuc980\rtt_port\drv_ebi.c - - - - - drv_gpio.c - 1 - ..\libraries\nuc980\rtt_port\drv_gpio.c - - - - - Filesystem - - - dfs_posix.c - 1 - ..\..\..\components\dfs\src\dfs_posix.c - - - - - dfs_fs.c - 1 - ..\..\..\components\dfs\src\dfs_fs.c - - - - - dfs.c - 1 - ..\..\..\components\dfs\src\dfs.c - - - - - dfs_file.c - 1 - ..\..\..\components\dfs\src\dfs_file.c - - - - - devfs.c - 1 - ..\..\..\components\dfs\filesystems\devfs\devfs.c - - - - - dfs_elm.c - 1 - ..\..\..\components\dfs\filesystems\elmfat\dfs_elm.c - - - - - ffunicode.c - 1 - ..\..\..\components\dfs\filesystems\elmfat\ffunicode.c - - - - - ff.c - 1 - ..\..\..\components\dfs\filesystems\elmfat\ff.c - - - - - Finsh - - - shell.c - 1 - ..\..\..\components\finsh\shell.c - - - - - msh.c - 1 - ..\..\..\components\finsh\msh.c - - - - - msh_file.c - 1 - ..\..\..\components\finsh\msh_file.c - - - - - cmd.c - 1 - ..\..\..\components\finsh\cmd.c - - - - - Kernel - - - mem.c - 1 - ..\..\..\src\mem.c - - - - - idle.c - 1 - ..\..\..\src\idle.c - - - - - components.c - 1 - ..\..\..\src\components.c - - - - - timer.c - 1 - ..\..\..\src\timer.c - - - - - kservice.c - 1 - ..\..\..\src\kservice.c - - - - - irq.c - 1 - ..\..\..\src\irq.c - - - - - ipc.c - 1 - ..\..\..\src\ipc.c - - - - - mempool.c - 1 - ..\..\..\src\mempool.c - - - - - memheap.c - 1 - ..\..\..\src\memheap.c - - - - - object.c - 1 - ..\..\..\src\object.c - - - - - scheduler.c - 1 - ..\..\..\src\scheduler.c - - - - - clock.c - 1 - ..\..\..\src\clock.c - - - - - signal.c - 1 - ..\..\..\src\signal.c - - - - - thread.c - 1 - ..\..\..\src\thread.c - - - - - device.c - 1 - ..\..\..\src\device.c - - - - - Libraries - - - nu_qspi.c - 1 - ..\libraries\nuc980\Driver\Source\nu_qspi.c - - - - - nu_sys.c - 1 - ..\libraries\nuc980\Driver\Source\nu_sys.c - - - - - nu_pdma.c - 1 - ..\libraries\nuc980\Driver\Source\nu_pdma.c - - - - - nu_cap.c - 1 - ..\libraries\nuc980\Driver\Source\nu_cap.c - - - - - nu_wdt.c - 1 - ..\libraries\nuc980\Driver\Source\nu_wdt.c - - - - - nu_sdh.c - 1 - ..\libraries\nuc980\Driver\Source\nu_sdh.c - - - - - nu_emac.c - 1 - ..\libraries\nuc980\Driver\Source\nu_emac.c - - - - - nu_rtc.c - 1 - ..\libraries\nuc980\Driver\Source\nu_rtc.c - - - - - nu_scuart.c - 1 - ..\libraries\nuc980\Driver\Source\nu_scuart.c - - - - - nu_etimer.c - 1 - ..\libraries\nuc980\Driver\Source\nu_etimer.c - - - - - nu_wwdt.c - 1 - ..\libraries\nuc980\Driver\Source\nu_wwdt.c - - - - - nu_uart.c - 1 - ..\libraries\nuc980\Driver\Source\nu_uart.c - - - - - nu_i2s.c - 1 - ..\libraries\nuc980\Driver\Source\nu_i2s.c - - - - - nu_gpio.c - 1 - ..\libraries\nuc980\Driver\Source\nu_gpio.c - - - - - nu_can.c - 1 - ..\libraries\nuc980\Driver\Source\nu_can.c - - - - - nu_crypto.c - 1 - ..\libraries\nuc980\Driver\Source\nu_crypto.c - - - - - nu_usbd.c - 1 - ..\libraries\nuc980\Driver\Source\nu_usbd.c - - - - - nu_i2c.c - 1 - ..\libraries\nuc980\Driver\Source\nu_i2c.c - - - - - nu_spi.c - 1 - ..\libraries\nuc980\Driver\Source\nu_spi.c - - - - - nu_ebi.c - 1 - ..\libraries\nuc980\Driver\Source\nu_ebi.c - - - - - LVGL-port - - - lv_port_disp.c - 1 - applications\lvgl\lv_port_disp.c - - - - - lv_port_indev.c - 1 - applications\lvgl\lv_port_indev.c - - - - - lv_demo.c - 1 - applications\lvgl\lv_demo.c - - - - - lwIP - - - netdb.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\api\netdb.c - - - - - ip.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\ip.c - - - - - autoip.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\ipv4\autoip.c - - - - - ethernet.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\netif\ethernet.c - - - - - netif.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\netif.c - - - - - sys.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\sys.c - - - - - sockets.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\api\sockets.c - - - - - altcp_alloc.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\altcp_alloc.c - - - - - netifapi.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\api\netifapi.c - - - - - tcpip.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\api\tcpip.c - - - - - ip4_addr.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\ipv4\ip4_addr.c - - - - - dhcp.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\ipv4\dhcp.c - - - - - init.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\init.c - - - - - ethernetif.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\netif\ethernetif.c - - - - - etharp.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\ipv4\etharp.c - - - - - memp.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\memp.c - - - - - ip4.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\ipv4\ip4.c - - - - - netbuf.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\api\netbuf.c - - - - - raw.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\raw.c - - - - - ip4_frag.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\ipv4\ip4_frag.c - - - - - tcp_out.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\tcp_out.c - - - - - lowpan6.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\netif\lowpan6.c - - - - - icmp.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\ipv4\icmp.c - - - - - api_lib.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\api\api_lib.c - - - - - inet_chksum.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\inet_chksum.c - - - - - stats.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\stats.c - - - - - err.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\api\err.c - - - - - altcp.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\altcp.c - - - - - tcp_in.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\tcp_in.c - - - - - dns.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\dns.c - - - - - sys_arch.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\arch\sys_arch.c - - - - - timeouts.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\timeouts.c - - - - - igmp.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\ipv4\igmp.c - - - - - udp.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\udp.c - - - - - altcp_tcp.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\altcp_tcp.c - - - - - pbuf.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\pbuf.c - - - - - def.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\def.c - - - - - api_msg.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\api\api_msg.c - - - - - ping.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\apps\ping\ping.c - - - - - if_api.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\api\if_api.c - - - - - tcp.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\tcp.c - - - - - nu_pkgs_demo - - - usbd_cdc_vcom_echo.c - 1 - ..\libraries\nu_packages\Demo\usbd_cdc_vcom_echo.c - - - - - slcd_show_tick.c - 1 - ..\libraries\nu_packages\Demo\slcd_show_tick.c - - - - - usbd_hid_dance_mouse.c - 1 - ..\libraries\nu_packages\Demo\usbd_hid_dance_mouse.c - - - - - nu_pkgs_ili9341 - - - lcd_ili9341.c - 1 - ..\libraries\nu_packages\ILI9341\lcd_ili9341.c - - - - - ili9341_spi.c - 1 - ..\libraries\nu_packages\ILI9341\ili9341_spi.c - - - - - nu_pkgs_nau8822 - - - audio_test.c - 1 - ..\libraries\nu_packages\AudioCodec\audio_test.c - - - - - acodec_nau8822.c - 1 - ..\libraries\nu_packages\AudioCodec\acodec_nau8822.c - - - - - nu_pkgs_spinand - - - spinand.c - 1 - ..\libraries\nu_packages\SPINAND\spinand.c - - - - - drv_spinand.c - 1 - ..\libraries\nu_packages\SPINAND\drv_spinand.c - - - - - nuc980_usbhostlib - - - support.c - 1 - ..\libraries\nuc980\UsbHostLib\src\support.c - - - - - mem_alloc.c - 1 - ..\libraries\nuc980\UsbHostLib\src\mem_alloc.c - - - - - usb_core.c - 1 - ..\libraries\nuc980\UsbHostLib\src\usb_core.c - - - - - ehci.c - 1 - ..\libraries\nuc980\UsbHostLib\src\ehci.c - - - - - ohci.c - 1 - ..\libraries\nuc980\UsbHostLib\src\ohci.c - - - - - ehci_iso.c - 1 - ..\libraries\nuc980\UsbHostLib\src\ehci_iso.c - - - - - POSIX - - - select.c - 1 - ..\..\..\components\libc\posix\io\select.c - - - - - poll.c - 1 - ..\..\..\components\libc\posix\io\poll\poll.c - - - - - rt_usbd - - - cdc_vcom.c - 1 - ..\..\..\components\drivers\usb\usbdevice\class\cdc_vcom.c - - - - - usbdevice_core.c - 1 - ..\..\..\components\drivers\usb\usbdevice\core\usbdevice_core.c - - - - - usbdevice.c - 1 - ..\..\..\components\drivers\usb\usbdevice\core\usbdevice.c - - - - - mstorage.c - 1 - ..\..\..\components\drivers\usb\usbdevice\class\mstorage.c - - - - - rt_usbh - - - mass.c - 1 - ..\..\..\components\drivers\usb\usbhost\class\mass.c - - - - - hub.c - 1 - ..\..\..\components\drivers\usb\usbhost\core\hub.c - - - - - usbhost.c - 1 - ..\..\..\components\drivers\usb\usbhost\core\usbhost.c - - - - - usbhost_core.c - 1 - ..\..\..\components\drivers\usb\usbhost\core\usbhost_core.c - - - - - driver.c - 1 - ..\..\..\components\drivers\usb\usbhost\core\driver.c - - - - - udisk.c - 1 - ..\..\..\components\drivers\usb\usbhost\class\udisk.c - - - - - SAL - - - netdev.c - 1 - ..\..\..\components\net\netdev\src\netdev.c - - - - - netdev_ipaddr.c - 1 - ..\..\..\components\net\netdev\src\netdev_ipaddr.c - - - - - net_netdb.c - 1 - ..\..\..\components\net\sal_socket\socket\net_netdb.c - - - - - net_sockets.c - 1 - ..\..\..\components\net\sal_socket\socket\net_sockets.c - - - - - sal_socket.c - 1 - ..\..\..\components\net\sal_socket\src\sal_socket.c - - - - - af_inet_lwip.c - 1 - ..\..\..\components\net\sal_socket\impl\af_inet_lwip.c - - - - - dfs_net.c - 1 - ..\..\..\components\net\sal_socket\dfs_net\dfs_net.c - - - - - UTest - - - utest.c - 1 - ..\..\..\components\utilities\utest\utest.c - - - - - - -
diff --git a/bsp/nuvoton/nk-980iot/project.uvprojx b/bsp/nuvoton/nk-980iot/project.uvprojx deleted file mode 100644 index 7d23d354b5..0000000000 --- a/bsp/nuvoton/nk-980iot/project.uvprojx +++ /dev/null @@ -1,1869 +0,0 @@ - - - 2.1 -
### uVision Project, (C) Keil Software
- - - rtthread - 0x4 - ARM-ADS - 0 - - - Nuvoton_ARM9_Series - Nuvoton - - - - - 0 - - - - - - - - - - - - 0 - 0 - - - - Atmel\SAM9260\ - Atmel\SAM9260\ - - 0 - 0 - 0 - 0 - 1 - - .\build\keil5\ - rtthread - 1 - 0 - 1 - 1 - 1 - .\build\keil5\ - 1 - 0 - 0 - - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 1 - 0 - fromelf.exe --bin --output "$L@L.bin" "$L@L.axf" - - 0 - 0 - 0 - 0 - - 0 - - - - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 3 - - - 1 - - - SARM.DLL - -cAT91SAM9260 - DARMATS9.DLL - -p91SAM9260 - SARM.DLL - - TARMATS9.DLL - -p91SAM9260 - - - - 1 - 0 - 0 - 0 - 16 - - - - - 1 - 0 - 0 - 0 - 1 - 4098 - - 0 - Segger\JLTAgdi.dll - "" () - - - - - 0 - - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 1 - 0 - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - ARM926EJ-S - - 0 - 0 - 0 - 1 - 1 - 0 - 0 - 0 - 0 - 1 - 0 - 8 - 0 - 0 - 0 - 0 - 3 - 3 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x200000 - 0x1000 - - - 1 - 0x100000 - 0x8000 - - - 0 - 0x0 - 0x0 - - - 1 - 0x20000000 - 0x800000 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x100000 - 0x8000 - - - 1 - 0x0 - 0x0 - - - 0 - 0x20800000 - 0x1800000 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x200000 - 0x1000 - - - 0 - 0x300000 - 0x1000 - - - - - - 1 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 2 - 0 - 0 - 0 - 0 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - - --c99 - __RTTHREAD__, RT_USING_ARM_LIBC, __CLK_TCK=RT_TICK_PER_SECOND - - applications;.;board;..\..\..\components\libc\compilers\common;..\..\..\components\libc\compilers\common\nogcc;..\..\..\libcpu\arm\common;..\..\..\libcpu\arm\arm926;..\..\..\components\drivers\audio;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\hwcrypto;.;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\spi;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\touch;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\libraries\nuc980\rtt_port;..\..\..\components\dfs\include;..\..\..\components\dfs\filesystems\devfs;..\..\..\components\dfs\filesystems\elmfat;..\..\..\components\finsh;.;..\..\..\include;..\libraries\nuc980\Driver\Include;applications\lvgl;..\..\..\components\net\lwip-2.1.2\src;..\..\..\components\net\lwip-2.1.2\src\include;..\..\..\components\net\lwip-2.1.2\src\arch\include;..\..\..\components\net\lwip-2.1.2\src\include\netif;..\libraries\nu_packages\Demo;..\libraries\nu_packages\ILI9341;..\libraries\nu_packages\AudioCodec;..\libraries\nu_packages\SPINAND;..\libraries\nuc980\UsbHostLib\inc;..\libraries\nu_packages\NuUtils\inc;..\..\..\components\libc\posix\io;..\..\..\components\libc\posix\io\poll;..\..\..\components\libc\posix\ipc;..\..\..\components\drivers\usb\usbdevice;..\..\..\components\drivers\usb\usbhost;..\..\..\components\drivers\usb\usbhost\class;..\..\..\components\drivers\usb\usbhost\core;..\..\..\components\drivers\usb\usbhost\include;..\..\..\components\drivers\include;..\..\..\components\net\netdev\include;..\..\..\components\net\sal_socket\include;..\..\..\components\net\sal_socket\include\socket;..\..\..\components\net\sal_socket\impl;..\..\..\components\net\sal_socket\include\dfs_net;..\..\..\components\net\sal_socket\include\socket\sys_socket;..\..\..\components\utilities\utest;..\..\..\examples\utest\testcases\kernel - - - - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - - - - 0 - 0 - 0 - 0 - 1 - 0 - 0x20000000 - 0x20800000 - - .\linking_scripts\nuc980.sct - - - - - - - - - - - Applications - - - mnt.c - 1 - applications\mnt.c - - - - - main.c - 1 - applications\main.c - - - - - board - - - nu_pin_init.c - 1 - board\nu_pin_init.c - - - - - board_dev.c - 1 - board\board_dev.c - - - - - Compiler - - - syscall_mem.c - 1 - ..\..\..\components\libc\compilers\armlibc\syscall_mem.c - - - - - syscalls.c - 1 - ..\..\..\components\libc\compilers\armlibc\syscalls.c - - - - - libc_syms.c - 1 - ..\..\..\components\libc\compilers\armlibc\libc_syms.c - - - - - time.c - 1 - ..\..\..\components\libc\compilers\common\time.c - - - - - stdlib.c - 1 - ..\..\..\components\libc\compilers\common\stdlib.c - - - - - CPU - - - div0.c - 1 - ..\..\..\libcpu\arm\common\div0.c - - - - - backtrace.c - 1 - ..\..\..\libcpu\arm\common\backtrace.c - - - - - showmem.c - 1 - ..\..\..\libcpu\arm\common\showmem.c - - - - - machine.c - 1 - ..\..\..\libcpu\arm\arm926\machine.c - - - - - stack.c - 1 - ..\..\..\libcpu\arm\arm926\stack.c - - - - - context_rvds.S - 2 - ..\..\..\libcpu\arm\arm926\context_rvds.S - - - - - cpuport.c - 1 - ..\..\..\libcpu\arm\arm926\cpuport.c - - - - - start_rvds.S - 2 - ..\..\..\libcpu\arm\arm926\start_rvds.S - - - - - mmu.c - 1 - ..\..\..\libcpu\arm\arm926\mmu.c - - - - - trap.c - 1 - ..\..\..\libcpu\arm\arm926\trap.c - - - - - DeviceDrivers - - - audio_pipe.c - 1 - ..\..\..\components\drivers\audio\audio_pipe.c - - - - - audio.c - 1 - ..\..\..\components\drivers\audio\audio.c - - - - - can.c - 1 - ..\..\..\components\drivers\can\can.c - - - - - cputime.c - 1 - ..\..\..\components\drivers\cputime\cputime.c - - - - - hw_symmetric.c - 1 - ..\..\..\components\drivers\hwcrypto\hw_symmetric.c - - - - - hwcrypto.c - 1 - ..\..\..\components\drivers\hwcrypto\hwcrypto.c - - - - - hw_rng.c - 1 - ..\..\..\components\drivers\hwcrypto\hw_rng.c - - - - - hw_hash.c - 1 - ..\..\..\components\drivers\hwcrypto\hw_hash.c - - - - - hwtimer.c - 1 - ..\..\..\components\drivers\hwtimer\hwtimer.c - - - - - i2c_core.c - 1 - ..\..\..\components\drivers\i2c\i2c_core.c - - - - - i2c_dev.c - 1 - ..\..\..\components\drivers\i2c\i2c_dev.c - - - - - i2c-bit-ops.c - 1 - ..\..\..\components\drivers\i2c\i2c-bit-ops.c - - - - - adc.c - 1 - ..\..\..\components\drivers\misc\adc.c - - - - - rt_drv_pwm.c - 1 - ..\..\..\components\drivers\misc\rt_drv_pwm.c - - - - - pin.c - 1 - ..\..\..\components\drivers\misc\pin.c - - - - - mtd_nand.c - 1 - ..\..\..\components\drivers\mtd\mtd_nand.c - - - - - rtc.c - 1 - ..\..\..\components\drivers\rtc\rtc.c - - - - - alarm.c - 1 - ..\..\..\components\drivers\rtc\alarm.c - - - - - serial.c - 1 - ..\..\..\components\drivers\serial\serial.c - - - - - spi_core.c - 1 - ..\..\..\components\drivers\spi\spi_core.c - - - - - spi_dev.c - 1 - ..\..\..\components\drivers\spi\spi_dev.c - - - - - qspi_core.c - 1 - ..\..\..\components\drivers\spi\qspi_core.c - - - - - dataqueue.c - 1 - ..\..\..\components\drivers\src\dataqueue.c - - - - - ringblk_buf.c - 1 - ..\..\..\components\drivers\src\ringblk_buf.c - - - - - pipe.c - 1 - ..\..\..\components\drivers\src\pipe.c - - - - - waitqueue.c - 1 - ..\..\..\components\drivers\src\waitqueue.c - - - - - completion.c - 1 - ..\..\..\components\drivers\src\completion.c - - - - - ringbuffer.c - 1 - ..\..\..\components\drivers\src\ringbuffer.c - - - - - workqueue.c - 1 - ..\..\..\components\drivers\src\workqueue.c - - - - - touch.c - 1 - ..\..\..\components\drivers\touch\touch.c - - - - - watchdog.c - 1 - ..\..\..\components\drivers\watchdog\watchdog.c - - - - - - - - - - - - - - - - - Drivers - - - drv_spi.c - 1 - ..\libraries\nuc980\rtt_port\drv_spi.c - - - - - drv_usbhost.c - 1 - ..\libraries\nuc980\rtt_port\drv_usbhost.c - - - - - drv_sys.c - 1 - ..\libraries\nuc980\rtt_port\drv_sys.c - - - - - drv_common.c - 1 - ..\libraries\nuc980\rtt_port\drv_common.c - - - - - drv_usbd.c - 1 - ..\libraries\nuc980\rtt_port\drv_usbd.c - - - - - drv_gpio.c - 1 - ..\libraries\nuc980\rtt_port\drv_gpio.c - - - - - drv_etimer.c - 1 - ..\libraries\nuc980\rtt_port\drv_etimer.c - - - - - drv_wdt.c - 1 - ..\libraries\nuc980\rtt_port\drv_wdt.c - - - - - drv_systick.c - 1 - ..\libraries\nuc980\rtt_port\drv_systick.c - - - - - drv_qspi.c - 1 - ..\libraries\nuc980\rtt_port\drv_qspi.c - - - - - drv_crypto.c - 1 - ..\libraries\nuc980\rtt_port\drv_crypto.c - - - - - drv_i2s.c - 1 - ..\libraries\nuc980\rtt_port\drv_i2s.c - - - - - drv_scuart.c - 1 - ..\libraries\nuc980\rtt_port\drv_scuart.c - - - - - drv_adc.c - 1 - ..\libraries\nuc980\rtt_port\drv_adc.c - - - - - drv_softi2c.c - 1 - ..\libraries\nuc980\rtt_port\drv_softi2c.c - - - - - drv_i2c.c - 1 - ..\libraries\nuc980\rtt_port\drv_i2c.c - - - - - drv_rtc.c - 1 - ..\libraries\nuc980\rtt_port\drv_rtc.c - - - - - drv_uart.c - 1 - ..\libraries\nuc980\rtt_port\drv_uart.c - - - - - drv_ebi.c - 1 - ..\libraries\nuc980\rtt_port\drv_ebi.c - - - - - drv_sdh.c - 1 - ..\libraries\nuc980\rtt_port\drv_sdh.c - - - - - drv_etimer_capture.c - 1 - ..\libraries\nuc980\rtt_port\drv_etimer_capture.c - - - - - drv_can.c - 1 - ..\libraries\nuc980\rtt_port\drv_can.c - - - - - drv_pwm.c - 1 - ..\libraries\nuc980\rtt_port\drv_pwm.c - - - - - drv_pdma.c - 1 - ..\libraries\nuc980\rtt_port\drv_pdma.c - - - - - drv_emac.c - 1 - ..\libraries\nuc980\rtt_port\drv_emac.c - - - - - Filesystem - - - dfs_posix.c - 1 - ..\..\..\components\dfs\src\dfs_posix.c - - - - - dfs_fs.c - 1 - ..\..\..\components\dfs\src\dfs_fs.c - - - - - dfs.c - 1 - ..\..\..\components\dfs\src\dfs.c - - - - - dfs_file.c - 1 - ..\..\..\components\dfs\src\dfs_file.c - - - - - devfs.c - 1 - ..\..\..\components\dfs\filesystems\devfs\devfs.c - - - - - ffunicode.c - 1 - ..\..\..\components\dfs\filesystems\elmfat\ffunicode.c - - - - - dfs_elm.c - 1 - ..\..\..\components\dfs\filesystems\elmfat\dfs_elm.c - - - - - ff.c - 1 - ..\..\..\components\dfs\filesystems\elmfat\ff.c - - - - - Finsh - - - shell.c - 1 - ..\..\..\components\finsh\shell.c - - - - - msh.c - 1 - ..\..\..\components\finsh\msh.c - - - - - msh_file.c - 1 - ..\..\..\components\finsh\msh_file.c - - - - - cmd.c - 1 - ..\..\..\components\finsh\cmd.c - - - - - Kernel - - - ipc.c - 1 - ..\..\..\src\ipc.c - - - - - thread.c - 1 - ..\..\..\src\thread.c - - - - - clock.c - 1 - ..\..\..\src\clock.c - - - - - mem.c - 1 - ..\..\..\src\mem.c - - - - - components.c - 1 - ..\..\..\src\components.c - - - - - memheap.c - 1 - ..\..\..\src\memheap.c - - - - - mempool.c - 1 - ..\..\..\src\mempool.c - - - - - timer.c - 1 - ..\..\..\src\timer.c - - - - - signal.c - 1 - ..\..\..\src\signal.c - - - - - scheduler.c - 1 - ..\..\..\src\scheduler.c - - - - - idle.c - 1 - ..\..\..\src\idle.c - - - - - device.c - 1 - ..\..\..\src\device.c - - - - - irq.c - 1 - ..\..\..\src\irq.c - - - - - object.c - 1 - ..\..\..\src\object.c - - - - - kservice.c - 1 - ..\..\..\src\kservice.c - - - - - Libraries - - - nu_i2s.c - 1 - ..\libraries\nuc980\Driver\Source\nu_i2s.c - - - - - nu_i2c.c - 1 - ..\libraries\nuc980\Driver\Source\nu_i2c.c - - - - - nu_wdt.c - 1 - ..\libraries\nuc980\Driver\Source\nu_wdt.c - - - - - nu_pdma.c - 1 - ..\libraries\nuc980\Driver\Source\nu_pdma.c - - - - - nu_emac.c - 1 - ..\libraries\nuc980\Driver\Source\nu_emac.c - - - - - nu_uart.c - 1 - ..\libraries\nuc980\Driver\Source\nu_uart.c - - - - - nu_crypto.c - 1 - ..\libraries\nuc980\Driver\Source\nu_crypto.c - - - - - nu_wwdt.c - 1 - ..\libraries\nuc980\Driver\Source\nu_wwdt.c - - - - - nu_rtc.c - 1 - ..\libraries\nuc980\Driver\Source\nu_rtc.c - - - - - nu_cap.c - 1 - ..\libraries\nuc980\Driver\Source\nu_cap.c - - - - - nu_spi.c - 1 - ..\libraries\nuc980\Driver\Source\nu_spi.c - - - - - nu_scuart.c - 1 - ..\libraries\nuc980\Driver\Source\nu_scuart.c - - - - - nu_sys.c - 1 - ..\libraries\nuc980\Driver\Source\nu_sys.c - - - - - nu_etimer.c - 1 - ..\libraries\nuc980\Driver\Source\nu_etimer.c - - - - - nu_can.c - 1 - ..\libraries\nuc980\Driver\Source\nu_can.c - - - - - nu_sdh.c - 1 - ..\libraries\nuc980\Driver\Source\nu_sdh.c - - - - - nu_gpio.c - 1 - ..\libraries\nuc980\Driver\Source\nu_gpio.c - - - - - nu_ebi.c - 1 - ..\libraries\nuc980\Driver\Source\nu_ebi.c - - - - - nu_qspi.c - 1 - ..\libraries\nuc980\Driver\Source\nu_qspi.c - - - - - nu_usbd.c - 1 - ..\libraries\nuc980\Driver\Source\nu_usbd.c - - - - - LVGL-port - - - lv_port_indev.c - 1 - applications\lvgl\lv_port_indev.c - - - - - lv_port_disp.c - 1 - applications\lvgl\lv_port_disp.c - - - - - lv_demo.c - 1 - applications\lvgl\lv_demo.c - - - - - lwIP - - - netdb.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\api\netdb.c - - - - - ip.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\ip.c - - - - - autoip.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\ipv4\autoip.c - - - - - ethernet.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\netif\ethernet.c - - - - - netif.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\netif.c - - - - - sys.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\sys.c - - - - - sockets.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\api\sockets.c - - - - - altcp_alloc.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\altcp_alloc.c - - - - - netifapi.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\api\netifapi.c - - - - - tcpip.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\api\tcpip.c - - - - - ip4_addr.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\ipv4\ip4_addr.c - - - - - dhcp.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\ipv4\dhcp.c - - - - - init.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\init.c - - - - - ethernetif.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\netif\ethernetif.c - - - - - etharp.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\ipv4\etharp.c - - - - - memp.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\memp.c - - - - - ip4.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\ipv4\ip4.c - - - - - netbuf.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\api\netbuf.c - - - - - raw.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\raw.c - - - - - ip4_frag.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\ipv4\ip4_frag.c - - - - - tcp_out.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\tcp_out.c - - - - - lowpan6.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\netif\lowpan6.c - - - - - icmp.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\ipv4\icmp.c - - - - - api_lib.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\api\api_lib.c - - - - - inet_chksum.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\inet_chksum.c - - - - - stats.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\stats.c - - - - - err.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\api\err.c - - - - - altcp.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\altcp.c - - - - - tcp_in.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\tcp_in.c - - - - - dns.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\dns.c - - - - - sys_arch.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\arch\sys_arch.c - - - - - timeouts.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\timeouts.c - - - - - igmp.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\ipv4\igmp.c - - - - - udp.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\udp.c - - - - - altcp_tcp.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\altcp_tcp.c - - - - - pbuf.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\pbuf.c - - - - - def.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\def.c - - - - - api_msg.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\api\api_msg.c - - - - - ping.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\apps\ping\ping.c - - - - - if_api.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\api\if_api.c - - - - - tcp.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\tcp.c - - - - - nu_pkgs_demo - - - usbd_cdc_vcom_echo.c - 1 - ..\libraries\nu_packages\Demo\usbd_cdc_vcom_echo.c - - - - - slcd_show_tick.c - 1 - ..\libraries\nu_packages\Demo\slcd_show_tick.c - - - - - usbd_hid_dance_mouse.c - 1 - ..\libraries\nu_packages\Demo\usbd_hid_dance_mouse.c - - - - - nu_pkgs_ili9341 - - - lcd_ili9341.c - 1 - ..\libraries\nu_packages\ILI9341\lcd_ili9341.c - - - - - ili9341_spi.c - 1 - ..\libraries\nu_packages\ILI9341\ili9341_spi.c - - - - - nu_pkgs_nau8822 - - - audio_test.c - 1 - ..\libraries\nu_packages\AudioCodec\audio_test.c - - - - - acodec_nau8822.c - 1 - ..\libraries\nu_packages\AudioCodec\acodec_nau8822.c - - - - - nu_pkgs_spinand - - - spinand.c - 1 - ..\libraries\nu_packages\SPINAND\spinand.c - - - - - drv_spinand.c - 1 - ..\libraries\nu_packages\SPINAND\drv_spinand.c - - - - - nuc980_usbhostlib - - - support.c - 1 - ..\libraries\nuc980\UsbHostLib\src\support.c - - - - - ohci.c - 1 - ..\libraries\nuc980\UsbHostLib\src\ohci.c - - - - - mem_alloc.c - 1 - ..\libraries\nuc980\UsbHostLib\src\mem_alloc.c - - - - - usb_core.c - 1 - ..\libraries\nuc980\UsbHostLib\src\usb_core.c - - - - - ehci_iso.c - 1 - ..\libraries\nuc980\UsbHostLib\src\ehci_iso.c - - - - - ehci.c - 1 - ..\libraries\nuc980\UsbHostLib\src\ehci.c - - - - - POSIX - - - select.c - 1 - ..\..\..\components\libc\posix\io\select.c - - - - - poll.c - 1 - ..\..\..\components\libc\posix\io\poll\poll.c - - - - - rt_usbd - - - usbdevice_core.c - 1 - ..\..\..\components\drivers\usb\usbdevice\core\usbdevice_core.c - - - - - mstorage.c - 1 - ..\..\..\components\drivers\usb\usbdevice\class\mstorage.c - - - - - usbdevice.c - 1 - ..\..\..\components\drivers\usb\usbdevice\core\usbdevice.c - - - - - cdc_vcom.c - 1 - ..\..\..\components\drivers\usb\usbdevice\class\cdc_vcom.c - - - - - rt_usbh - - - hub.c - 1 - ..\..\..\components\drivers\usb\usbhost\core\hub.c - - - - - usbhost.c - 1 - ..\..\..\components\drivers\usb\usbhost\core\usbhost.c - - - - - usbhost_core.c - 1 - ..\..\..\components\drivers\usb\usbhost\core\usbhost_core.c - - - - - udisk.c - 1 - ..\..\..\components\drivers\usb\usbhost\class\udisk.c - - - - - driver.c - 1 - ..\..\..\components\drivers\usb\usbhost\core\driver.c - - - - - mass.c - 1 - ..\..\..\components\drivers\usb\usbhost\class\mass.c - - - - - SAL - - - netdev.c - 1 - ..\..\..\components\net\netdev\src\netdev.c - - - - - netdev_ipaddr.c - 1 - ..\..\..\components\net\netdev\src\netdev_ipaddr.c - - - - - net_netdb.c - 1 - ..\..\..\components\net\sal_socket\socket\net_netdb.c - - - - - net_sockets.c - 1 - ..\..\..\components\net\sal_socket\socket\net_sockets.c - - - - - dfs_net.c - 1 - ..\..\..\components\net\sal_socket\dfs_net\dfs_net.c - - - - - sal_socket.c - 1 - ..\..\..\components\net\sal_socket\src\sal_socket.c - - - - - af_inet_lwip.c - 1 - ..\..\..\components\net\sal_socket\impl\af_inet_lwip.c - - - - - UTest - - - utest.c - 1 - ..\..\..\components\utilities\utest\utest.c - - - - - - - - - - - -
diff --git a/bsp/nuvoton/nk-980iot/rtconfig.h b/bsp/nuvoton/nk-980iot/rtconfig.h deleted file mode 100644 index b77df08b3f..0000000000 --- a/bsp/nuvoton/nk-980iot/rtconfig.h +++ /dev/null @@ -1,459 +0,0 @@ -#ifndef RT_CONFIG_H__ -#define RT_CONFIG_H__ - -/* Automatically generated file; DO NOT EDIT. */ -/* RT-Thread Configuration */ - -/* RT-Thread Kernel */ - -#define RT_NAME_MAX 16 -#define RT_ALIGN_SIZE 4 -#define RT_THREAD_PRIORITY_32 -#define RT_THREAD_PRIORITY_MAX 32 -#define RT_TICK_PER_SECOND 1000 -#define RT_USING_OVERFLOW_CHECK -#define RT_USING_HOOK -#define RT_HOOK_USING_FUNC_PTR -#define RT_USING_IDLE_HOOK -#define RT_IDLE_HOOK_LIST_SIZE 4 -#define IDLE_THREAD_STACK_SIZE 2048 - -/* kservice optimization */ - -#define RT_DEBUG -#define RT_DEBUG_COLOR - -/* Inter-Thread communication */ - -#define RT_USING_SEMAPHORE -#define RT_USING_MUTEX -#define RT_USING_EVENT -#define RT_USING_MAILBOX -#define RT_USING_MESSAGEQUEUE -#define RT_USING_SIGNALS - -/* Memory Management */ - -#define RT_USING_MEMPOOL -#define RT_USING_SMALL_MEM -#define RT_USING_MEMHEAP -#define RT_MEMHEAP_FAST_MODE -#define RT_USING_SMALL_MEM_AS_HEAP -#define RT_USING_MEMTRACE -#define RT_USING_HEAP - -/* Kernel Device Object */ - -#define RT_USING_DEVICE -#define RT_USING_CONSOLE -#define RT_CONSOLEBUF_SIZE 256 -#define RT_CONSOLE_DEVICE_NAME "uart0" -#define RT_VER_NUM 0x40100 -#define ARCH_ARM -#define ARCH_ARM_ARM9 - -/* RT-Thread Components */ - -#define RT_USING_COMPONENTS_INIT -#define RT_USING_USER_MAIN -#define RT_MAIN_THREAD_STACK_SIZE 2048 -#define RT_MAIN_THREAD_PRIORITY 10 - -/* C++ features */ - - -/* Command shell */ - -#define RT_USING_FINSH -#define RT_USING_MSH -#define FINSH_USING_MSH -#define FINSH_THREAD_NAME "tshell" -#define FINSH_THREAD_PRIORITY 20 -#define FINSH_THREAD_STACK_SIZE 4096 -#define FINSH_USING_HISTORY -#define FINSH_HISTORY_LINES 5 -#define FINSH_USING_SYMTAB -#define FINSH_CMD_SIZE 80 -#define MSH_USING_BUILT_IN_COMMANDS -#define FINSH_USING_DESCRIPTION -#define FINSH_ARG_MAX 10 - -/* Device virtual file system */ - -#define RT_USING_DFS -#define DFS_USING_POSIX -#define DFS_USING_WORKDIR -#define DFS_FILESYSTEMS_MAX 16 -#define DFS_FILESYSTEM_TYPES_MAX 16 -#define DFS_FD_MAX 64 -#define RT_USING_DFS_MNTTABLE -#define RT_USING_DFS_ELMFAT - -/* elm-chan's FatFs, Generic FAT Filesystem Module */ - -#define RT_DFS_ELM_CODE_PAGE 437 -#define RT_DFS_ELM_WORD_ACCESS -#define RT_DFS_ELM_USE_LFN_3 -#define RT_DFS_ELM_USE_LFN 3 -#define RT_DFS_ELM_LFN_UNICODE_0 -#define RT_DFS_ELM_LFN_UNICODE 0 -#define RT_DFS_ELM_MAX_LFN 255 -#define RT_DFS_ELM_DRIVES 8 -#define RT_DFS_ELM_MAX_SECTOR_SIZE 4096 -#define RT_DFS_ELM_REENTRANT -#define RT_DFS_ELM_MUTEX_TIMEOUT 3000 -#define RT_USING_DFS_DEVFS - -/* Device Drivers */ - -#define RT_USING_DEVICE_IPC -#define RT_USING_SYSTEM_WORKQUEUE -#define RT_SYSTEM_WORKQUEUE_STACKSIZE 2048 -#define RT_SYSTEM_WORKQUEUE_PRIORITY 23 -#define RT_USING_SERIAL -#define RT_USING_SERIAL_V1 -#define RT_SERIAL_USING_DMA -#define RT_SERIAL_RB_BUFSZ 2048 -#define RT_USING_CAN -#define RT_CAN_USING_HDR -#define RT_USING_HWTIMER -#define RT_USING_CPUTIME -#define RT_USING_I2C -#define RT_USING_I2C_BITOPS -#define RT_USING_PIN -#define RT_USING_ADC -#define RT_USING_PWM -#define RT_USING_MTD_NAND -#define RT_MTD_NAND_DEBUG -#define RT_USING_RTC -#define RT_USING_ALARM -#define RT_USING_SPI -#define RT_USING_QSPI -#define RT_USING_WDT -#define RT_USING_AUDIO -#define RT_AUDIO_REPLAY_MP_BLOCK_SIZE 4096 -#define RT_AUDIO_REPLAY_MP_BLOCK_COUNT 2 -#define RT_AUDIO_RECORD_PIPE_SIZE 2048 -#define RT_USING_TOUCH -#define RT_USING_HWCRYPTO -#define RT_HWCRYPTO_DEFAULT_NAME "hwcryto" -#define RT_HWCRYPTO_IV_MAX_SIZE 16 -#define RT_HWCRYPTO_KEYBIT_MAX_SIZE 256 -#define RT_HWCRYPTO_USING_AES -#define RT_HWCRYPTO_USING_AES_ECB -#define RT_HWCRYPTO_USING_AES_CBC -#define RT_HWCRYPTO_USING_AES_CFB -#define RT_HWCRYPTO_USING_AES_CTR -#define RT_HWCRYPTO_USING_AES_OFB -#define RT_HWCRYPTO_USING_SHA1 -#define RT_HWCRYPTO_USING_SHA2 -#define RT_HWCRYPTO_USING_SHA2_224 -#define RT_HWCRYPTO_USING_SHA2_256 -#define RT_HWCRYPTO_USING_SHA2_384 -#define RT_HWCRYPTO_USING_SHA2_512 -#define RT_HWCRYPTO_USING_RNG - -/* Using USB */ - -#define RT_USING_USB -#define RT_USING_USB_HOST -#define RT_USBH_MSTORAGE -#define UDISK_MOUNTPOINT "/mnt/udisk" -#define RT_USING_USB_DEVICE -#define RT_USBD_THREAD_STACK_SZ 4096 -#define USB_VENDOR_ID 0x0FFE -#define USB_PRODUCT_ID 0x0001 -#define RT_USB_DEVICE_COMPOSITE -#define RT_USB_DEVICE_CDC -#define RT_USB_DEVICE_NONE -#define RT_USB_DEVICE_MSTORAGE -#define RT_VCOM_TASK_STK_SIZE 2048 -#define RT_CDC_RX_BUFSIZE 128 -#define RT_VCOM_SERNO "32021919830108" -#define RT_VCOM_SER_LEN 14 -#define RT_VCOM_TX_TIMEOUT 1000 -#define RT_USB_MSTORAGE_DISK_NAME "ramdisk1" - -/* POSIX layer and C standard library */ - -#define RT_LIBC_DEFAULT_TIMEZONE 8 - -/* POSIX (Portable Operating System Interface) layer */ - -#define RT_USING_POSIX_FS -#define RT_USING_POSIX_POLL -#define RT_USING_POSIX_SELECT - -/* Interprocess Communication (IPC) */ - - -/* Socket is in the 'Network' category */ - -/* Network */ - -/* Socket abstraction layer */ - -#define RT_USING_SAL - -/* protocol stack implement */ - -#define SAL_USING_LWIP -#define SAL_USING_POSIX - -/* Network interface device */ - -#define RT_USING_NETDEV -#define NETDEV_USING_IFCONFIG -#define NETDEV_USING_PING -#define NETDEV_USING_NETSTAT -#define NETDEV_USING_AUTO_DEFAULT -#define NETDEV_IPV4 1 -#define NETDEV_IPV6 0 - -/* light weight TCP/IP stack */ - -#define RT_USING_LWIP -#define RT_USING_LWIP212 -#define RT_LWIP_MEM_ALIGNMENT 4 -#define RT_LWIP_IGMP -#define RT_LWIP_ICMP -#define RT_LWIP_DNS -#define RT_LWIP_DHCP -#define IP_SOF_BROADCAST 1 -#define IP_SOF_BROADCAST_RECV 1 - -/* Static IPv4 Address */ - -#define RT_LWIP_IPADDR "192.168.31.55" -#define RT_LWIP_GWADDR "192.168.31.1" -#define RT_LWIP_MSKADDR "255.255.255.0" -#define RT_LWIP_UDP -#define RT_LWIP_TCP -#define RT_LWIP_RAW -#define RT_MEMP_NUM_NETCONN 16 -#define RT_LWIP_PBUF_NUM 256 -#define RT_LWIP_RAW_PCB_NUM 16 -#define RT_LWIP_UDP_PCB_NUM 16 -#define RT_LWIP_TCP_PCB_NUM 16 -#define RT_LWIP_TCP_SEG_NUM 64 -#define RT_LWIP_TCP_SND_BUF 16384 -#define RT_LWIP_TCP_WND 65535 -#define RT_LWIP_TCPTHREAD_PRIORITY 10 -#define RT_LWIP_TCPTHREAD_MBOX_SIZE 256 -#define RT_LWIP_TCPTHREAD_STACKSIZE 4096 -#define RT_LWIP_ETHTHREAD_PRIORITY 12 -#define RT_LWIP_ETHTHREAD_STACKSIZE 4096 -#define RT_LWIP_ETHTHREAD_MBOX_SIZE 256 -#define RT_LWIP_REASSEMBLY_FRAG -#define LWIP_NETIF_STATUS_CALLBACK 1 -#define LWIP_NETIF_LINK_CALLBACK 1 -#define SO_REUSE 1 -#define LWIP_SO_RCVTIMEO 1 -#define LWIP_SO_SNDTIMEO 1 -#define LWIP_SO_RCVBUF 1 -#define LWIP_SO_LINGER 0 -#define RT_LWIP_NETIF_LOOPBACK -#define LWIP_NETIF_LOOPBACK 1 -#define RT_LWIP_STATS -#define RT_LWIP_USING_PING - -/* AT commands */ - - -/* VBUS(Virtual Software BUS) */ - - -/* Utilities */ - -#define RT_USING_UTEST -#define UTEST_THR_STACK_SIZE 4096 -#define UTEST_THR_PRIORITY 20 - -/* RT-Thread Utestcases */ - - -/* RT-Thread online packages */ - -/* IoT - internet of things */ - - -/* Wi-Fi */ - -/* Marvell WiFi */ - - -/* Wiced WiFi */ - -#define PKG_USING_NETUTILS -#define PKG_NETUTILS_TFTP -#define PKG_NETUTILS_IPERF -#define PKG_NETUTILS_NTP -#define NTP_USING_AUTO_SYNC -#define NTP_AUTO_SYNC_FIRST_DELAY 30 -#define NTP_AUTO_SYNC_PERIOD 3600 -#define NETUTILS_NTP_HOSTNAME "0.tw.pool.ntp.org" -#define NETUTILS_NTP_HOSTNAME2 "1.tw.pool.ntp.org" -#define NETUTILS_NTP_HOSTNAME3 "2.tw.pool.ntp.org" -#define PKG_USING_NETUTILS_V131 -#define PKG_NETUTILS_VER_NUM 0x10301 - -/* IoT Cloud */ - - -/* security packages */ - - -/* language packages */ - - -/* multimedia packages */ - -/* LVGL: powerful and easy-to-use embedded GUI library */ - -#define PKG_USING_LVGL -#define PKG_USING_LVGL_V810 -#define PKG_LVGL_VER_NUM 0x08010 -#define PKG_USING_LV_MUSIC_DEMO - -/* u8g2: a monochrome graphic library */ - -#define PKG_USING_WAVPLAYER -#define PKG_WP_USING_PLAY -#define PKG_WP_PLAY_DEVICE "sound0" -#define PKG_WP_USING_RECORD -#define PKG_WP_RECORD_DEVICE "sound0" -#define PKG_USING_WAVPLAYER_LATEST_VERSION - -/* PainterEngine: A cross-platform graphics application framework written in C language */ - - -/* tools packages */ - - -/* system packages */ - -/* enhanced kernel services */ - - -/* POSIX extension functions */ - - -/* acceleration: Assembly language or algorithmic acceleration packages */ - - -/* CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */ - - -/* Micrium: Micrium software products porting for RT-Thread */ - -#define PKG_USING_DFS_UFFS -#define RT_USING_DFS_UFFS -#define RT_UFFS_ECC_MODE_3 -#define RT_UFFS_ECC_MODE 3 -#define PKG_USING_DFS_UFFS_LATEST_VERSION -#define PKG_USING_RAMDISK -#define PKG_USING_RAMDISK_LATEST_VERSION - -/* peripheral libraries and drivers */ - - -/* AI packages */ - - -/* miscellaneous packages */ - -/* samples: kernel and components samples */ - - -/* entertainment: terminal games and other interesting software packages */ - -#define PKG_USING_OPTPARSE -#define PKG_USING_OPTPARSE_LATEST_VERSION - -/* Nuvoton Packages Config */ - -#define NU_PKG_USING_UTILS -#define NU_PKG_USING_DEMO -#define NU_PKG_USING_NAU8822 -#define NU_PKG_USING_ILI9341 -#define NU_PKG_USING_ILI9341_SPI -#define NU_PKG_ILI9341_WITH_OFFSCREEN_FRAMEBUFFER -#define NU_PKG_ILI9341_HORIZONTAL -#define NU_PKG_USING_SPINAND - -/* Hardware Drivers Config */ - -/* On-chip Peripheral Drivers */ - -#define SOC_SERIES_NUC980 -#define BSP_USE_STDDRIVER_SOURCE -#define BSP_USING_MMU -#define BSP_USING_PDMA -#define NU_PDMA_MEMFUN_ACTOR_MAX 2 -#define BSP_USING_GPIO -#define BSP_USING_EMAC -#define BSP_USING_EMAC0 -#define BSP_USING_RTC -#define NU_RTC_SUPPORT_IO_RW -#define NU_RTC_SUPPORT_MSH_CMD -#define BSP_USING_ADC -#define BSP_USING_TMR -#define BSP_USING_TIMER -#define BSP_USING_TMR0 -#define BSP_USING_TIMER0 -#define BSP_USING_TMR1 -#define BSP_USING_TIMER1 -#define BSP_USING_TMR2 -#define BSP_USING_TIMER2 -#define BSP_USING_TMR3 -#define BSP_USING_TIMER3 -#define BSP_USING_TMR4 -#define BSP_USING_TIMER4 -#define BSP_USING_UART -#define BSP_USING_UART0 -#define BSP_USING_UART1 -#define BSP_USING_UART1_TX_DMA -#define BSP_USING_UART1_RX_DMA -#define BSP_USING_I2C -#define BSP_USING_I2C0 -#define BSP_USING_I2C2 -#define BSP_USING_SDH -#define BSP_USING_SDH1 -#define NU_SDH_USING_PDMA -#define NU_SDH_HOTPLUG -#define BSP_USING_PWM -#define BSP_USING_PWM0 -#define BSP_USING_SPI -#define BSP_USING_SPI_PDMA -#define BSP_USING_SPI0 -#define BSP_USING_SPI0_PDMA -#define BSP_USING_SPI1_NONE -#define BSP_USING_I2S -#define NU_I2S_DMA_FIFO_SIZE 4096 -#define BSP_USING_QSPI -#define BSP_USING_QSPI_PDMA -#define BSP_USING_QSPI0 -#define BSP_USING_QSPI0_PDMA -#define BSP_USING_CRYPTO -#define BSP_USING_WDT -#define BSP_USING_USBD -#define BSP_USING_USBH - -/* On-board Peripheral Drivers */ - -#define BSP_USING_CONSOLE -#define BOARD_USING_IP101GR -#define BOARD_USING_NAU8822 -#define BOARD_USING_STORAGE_SDCARD -#define BOARD_USING_STORAGE_SPINAND -#define BOARD_USING_USB0_DEVICE_HOST -#define BOARD_USING_USB1_HOST - -/* Board extended module drivers */ - -#define BOARD_USING_LCD_ILI9341 -#define BOARD_USING_ILI9341_PIN_BACKLIGHT 103 -#define BOARD_USING_ILI9341_PIN_RESET 90 -#define BOARD_USING_ILI9341_PIN_DC 89 - -#endif diff --git a/bsp/nuvoton/nk-980iot/rtconfig.py b/bsp/nuvoton/nk-980iot/rtconfig.py index 1f8263adae..7412b89abf 100644 --- a/bsp/nuvoton/nk-980iot/rtconfig.py +++ b/bsp/nuvoton/nk-980iot/rtconfig.py @@ -85,4 +85,10 @@ elif PLATFORM == 'armcc': CFLAGS += ' -O2' POST_ACTION = 'fromelf --bin $TARGET --output ' + TARGET_NAME + ' \n' - POST_ACTION += 'fromelf -z $TARGET\n' \ No newline at end of file + POST_ACTION += 'fromelf -z $TARGET\n' +def dist_handle(BSP_ROOT, dist_dir): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT, dist_dir) diff --git a/bsp/nuvoton/nk-980iot/spinor.config b/bsp/nuvoton/nk-980iot/spinor.config index d93d276436..689099bb5b 100644 --- a/bsp/nuvoton/nk-980iot/spinor.config +++ b/bsp/nuvoton/nk-980iot/spinor.config @@ -7,6 +7,7 @@ # RT-Thread Kernel # CONFIG_RT_NAME_MAX=16 +# CONFIG_RT_USING_BIG_ENDIAN is not set # CONFIG_RT_USING_ARCH_DATA_TYPE is not set # CONFIG_RT_USING_SMP is not set CONFIG_RT_ALIGN_SIZE=4 @@ -17,10 +18,19 @@ CONFIG_RT_THREAD_PRIORITY_MAX=32 CONFIG_RT_TICK_PER_SECOND=1000 CONFIG_RT_USING_OVERFLOW_CHECK=y CONFIG_RT_USING_HOOK=y +CONFIG_RT_HOOK_USING_FUNC_PTR=y CONFIG_RT_USING_IDLE_HOOK=y CONFIG_RT_IDLE_HOOK_LIST_SIZE=4 CONFIG_IDLE_THREAD_STACK_SIZE=2048 # CONFIG_RT_USING_TIMER_SOFT is not set + +# +# kservice optimization +# +# CONFIG_RT_KSERVICE_USING_STDLIB is not set +# CONFIG_RT_KSERVICE_USING_TINY_SIZE is not set +# CONFIG_RT_USING_TINY_FFS is not set +# CONFIG_RT_PRINTF_LONGLONG is not set CONFIG_RT_DEBUG=y CONFIG_RT_DEBUG_COLOR=y # CONFIG_RT_DEBUG_INIT_CONFIG is not set @@ -48,13 +58,18 @@ CONFIG_RT_USING_SIGNALS=y # Memory Management # CONFIG_RT_USING_MEMPOOL=y -CONFIG_RT_USING_MEMHEAP=y -# CONFIG_RT_USING_NOHEAP is not set CONFIG_RT_USING_SMALL_MEM=y # CONFIG_RT_USING_SLAB is not set +CONFIG_RT_USING_MEMHEAP=y +CONFIG_RT_MEMHEAP_FAST_MODE=y +# CONFIG_RT_MEMHEAP_BSET_MODE is not set +CONFIG_RT_USING_SMALL_MEM_AS_HEAP=y # CONFIG_RT_USING_MEMHEAP_AS_HEAP is not set +# CONFIG_RT_USING_SLAB_AS_HEAP is not set # CONFIG_RT_USING_USERHEAP is not set +# CONFIG_RT_USING_NOHEAP is not set CONFIG_RT_USING_MEMTRACE=y +# CONFIG_RT_USING_HEAP_ISR is not set CONFIG_RT_USING_HEAP=y # @@ -66,7 +81,7 @@ CONFIG_RT_USING_DEVICE=y CONFIG_RT_USING_CONSOLE=y CONFIG_RT_CONSOLEBUF_SIZE=256 CONFIG_RT_CONSOLE_DEVICE_NAME="uart0" -CONFIG_RT_VER_NUM=0x40003 +CONFIG_RT_VER_NUM=0x40100 CONFIG_ARCH_ARM=y # CONFIG_RT_USING_CPU_FFS is not set CONFIG_ARCH_ARM_ARM9=y @@ -79,6 +94,7 @@ CONFIG_RT_USING_COMPONENTS_INIT=y CONFIG_RT_USING_USER_MAIN=y CONFIG_RT_MAIN_THREAD_STACK_SIZE=2048 CONFIG_RT_MAIN_THREAD_PRIORITY=10 +# CONFIG_RT_USING_LEGACY is not set # # C++ features @@ -89,25 +105,26 @@ CONFIG_RT_MAIN_THREAD_PRIORITY=10 # Command shell # CONFIG_RT_USING_FINSH=y +CONFIG_RT_USING_MSH=y +CONFIG_FINSH_USING_MSH=y CONFIG_FINSH_THREAD_NAME="tshell" +CONFIG_FINSH_THREAD_PRIORITY=20 +CONFIG_FINSH_THREAD_STACK_SIZE=4096 CONFIG_FINSH_USING_HISTORY=y CONFIG_FINSH_HISTORY_LINES=5 CONFIG_FINSH_USING_SYMTAB=y +CONFIG_FINSH_CMD_SIZE=80 +CONFIG_MSH_USING_BUILT_IN_COMMANDS=y CONFIG_FINSH_USING_DESCRIPTION=y # CONFIG_FINSH_ECHO_DISABLE_DEFAULT is not set -CONFIG_FINSH_THREAD_PRIORITY=20 -CONFIG_FINSH_THREAD_STACK_SIZE=4096 -CONFIG_FINSH_CMD_SIZE=80 # CONFIG_FINSH_USING_AUTH is not set -CONFIG_FINSH_USING_MSH=y -CONFIG_FINSH_USING_MSH_DEFAULT=y -# CONFIG_FINSH_USING_MSH_ONLY is not set CONFIG_FINSH_ARG_MAX=10 # # Device virtual file system # CONFIG_RT_USING_DFS=y +CONFIG_DFS_USING_POSIX=y CONFIG_DFS_USING_WORKDIR=y CONFIG_DFS_FILESYSTEMS_MAX=16 CONFIG_DFS_FILESYSTEM_TYPES_MAX=16 @@ -125,27 +142,32 @@ CONFIG_RT_DFS_ELM_WORD_ACCESS=y # CONFIG_RT_DFS_ELM_USE_LFN_2 is not set CONFIG_RT_DFS_ELM_USE_LFN_3=y CONFIG_RT_DFS_ELM_USE_LFN=3 +CONFIG_RT_DFS_ELM_LFN_UNICODE_0=y +# CONFIG_RT_DFS_ELM_LFN_UNICODE_1 is not set +# CONFIG_RT_DFS_ELM_LFN_UNICODE_2 is not set +# CONFIG_RT_DFS_ELM_LFN_UNICODE_3 is not set +CONFIG_RT_DFS_ELM_LFN_UNICODE=0 CONFIG_RT_DFS_ELM_MAX_LFN=255 CONFIG_RT_DFS_ELM_DRIVES=8 CONFIG_RT_DFS_ELM_MAX_SECTOR_SIZE=4096 # CONFIG_RT_DFS_ELM_USE_ERASE is not set CONFIG_RT_DFS_ELM_REENTRANT=y +CONFIG_RT_DFS_ELM_MUTEX_TIMEOUT=3000 CONFIG_RT_USING_DFS_DEVFS=y # CONFIG_RT_USING_DFS_ROMFS is not set # CONFIG_RT_USING_DFS_RAMFS is not set -# CONFIG_RT_USING_DFS_UFFS is not set -# CONFIG_RT_USING_DFS_JFFS2 is not set # CONFIG_RT_USING_DFS_NFS is not set # # Device Drivers # CONFIG_RT_USING_DEVICE_IPC=y -CONFIG_RT_PIPE_BUFSZ=512 CONFIG_RT_USING_SYSTEM_WORKQUEUE=y CONFIG_RT_SYSTEM_WORKQUEUE_STACKSIZE=2048 CONFIG_RT_SYSTEM_WORKQUEUE_PRIORITY=23 CONFIG_RT_USING_SERIAL=y +CONFIG_RT_USING_SERIAL_V1=y +# CONFIG_RT_USING_SERIAL_V2 is not set CONFIG_RT_SERIAL_USING_DMA=y CONFIG_RT_SERIAL_RB_BUFSZ=2048 CONFIG_RT_USING_CAN=y @@ -167,9 +189,6 @@ CONFIG_RT_USING_PWM=y CONFIG_RT_USING_RTC=y CONFIG_RT_USING_ALARM=y # CONFIG_RT_USING_SOFT_RTC is not set -CONFIG_RTC_SYNC_USING_NTP=y -CONFIG_RTC_NTP_FIRST_SYNC_DELAY=30 -CONFIG_RTC_NTP_SYNC_PERIOD=3600 # CONFIG_RT_USING_SDIO is not set CONFIG_RT_USING_SPI=y CONFIG_RT_USING_QSPI=y @@ -220,9 +239,11 @@ CONFIG_RT_HWCRYPTO_USING_RNG=y # # Using USB # +CONFIG_RT_USING_USB=y CONFIG_RT_USING_USB_HOST=y CONFIG_RT_USBH_MSTORAGE=y CONFIG_UDISK_MOUNTPOINT="/mnt/udisk" +# CONFIG_RT_USBH_HID is not set CONFIG_RT_USING_USB_DEVICE=y CONFIG_RT_USBD_THREAD_STACK_SZ=4096 CONFIG_USB_VENDOR_ID=0x0FFE @@ -247,14 +268,34 @@ CONFIG_RT_USB_MSTORAGE_DISK_NAME="ramdisk1" # # POSIX layer and C standard library # -CONFIG_RT_USING_LIBC=y -# CONFIG_RT_USING_PTHREADS is not set -CONFIG_RT_USING_POSIX=y -# CONFIG_RT_USING_POSIX_MMAP is not set -# CONFIG_RT_USING_POSIX_TERMIOS is not set -# CONFIG_RT_USING_POSIX_GETLINE is not set -# CONFIG_RT_USING_POSIX_AIO is not set # CONFIG_RT_USING_MODULE is not set +CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8 + +# +# POSIX (Portable Operating System Interface) layer +# +CONFIG_RT_USING_POSIX_FS=y +CONFIG_RT_USING_POSIX_DEVIO=y +CONFIG_RT_USING_POSIX_STDIO=y +CONFIG_RT_USING_POSIX_POLL=y +CONFIG_RT_USING_POSIX_SELECT=y +# CONFIG_RT_USING_POSIX_TERMIOS is not set +# CONFIG_RT_USING_POSIX_AIO is not set +# CONFIG_RT_USING_POSIX_MMAN is not set +# CONFIG_RT_USING_POSIX_DELAY is not set +# CONFIG_RT_USING_POSIX_CLOCK is not set +# CONFIG_RT_USING_PTHREADS is not set + +# +# Interprocess Communication (IPC) +# +# CONFIG_RT_USING_POSIX_PIPE is not set +# CONFIG_RT_USING_POSIX_MESSAGE_QUEUE is not set +# CONFIG_RT_USING_POSIX_MESSAGE_SEMAPHORE is not set + +# +# Socket is in the 'Network' category +# # # Network @@ -264,7 +305,7 @@ CONFIG_RT_USING_POSIX=y # Socket abstraction layer # CONFIG_RT_USING_SAL=y -CONFIG_SAL_INTERNET_CHECK=y +# CONFIG_SAL_INTERNET_CHECK is not set # # protocol stack implement @@ -290,8 +331,9 @@ CONFIG_NETDEV_IPV6=0 # CONFIG_RT_USING_LWIP=y # CONFIG_RT_USING_LWIP141 is not set -CONFIG_RT_USING_LWIP202=y -# CONFIG_RT_USING_LWIP212 is not set +# CONFIG_RT_USING_LWIP202 is not set +# CONFIG_RT_USING_LWIP203 is not set +CONFIG_RT_USING_LWIP212=y # CONFIG_RT_USING_LWIP_IPV6 is not set CONFIG_RT_LWIP_MEM_ALIGNMENT=4 CONFIG_RT_LWIP_IGMP=y @@ -305,30 +347,30 @@ CONFIG_IP_SOF_BROADCAST_RECV=1 # # Static IPv4 Address # -CONFIG_RT_LWIP_IPADDR="192.168.1.30" -CONFIG_RT_LWIP_GWADDR="192.168.1.1" +CONFIG_RT_LWIP_IPADDR="192.168.31.55" +CONFIG_RT_LWIP_GWADDR="192.168.31.1" CONFIG_RT_LWIP_MSKADDR="255.255.255.0" CONFIG_RT_LWIP_UDP=y CONFIG_RT_LWIP_TCP=y CONFIG_RT_LWIP_RAW=y # CONFIG_RT_LWIP_PPP is not set -CONFIG_RT_MEMP_NUM_NETCONN=32 +CONFIG_RT_MEMP_NUM_NETCONN=16 CONFIG_RT_LWIP_PBUF_NUM=256 -CONFIG_RT_LWIP_RAW_PCB_NUM=32 -CONFIG_RT_LWIP_UDP_PCB_NUM=32 -CONFIG_RT_LWIP_TCP_PCB_NUM=32 -CONFIG_RT_LWIP_TCP_SEG_NUM=256 -CONFIG_RT_LWIP_TCP_SND_BUF=32768 -CONFIG_RT_LWIP_TCP_WND=10240 +CONFIG_RT_LWIP_RAW_PCB_NUM=16 +CONFIG_RT_LWIP_UDP_PCB_NUM=16 +CONFIG_RT_LWIP_TCP_PCB_NUM=16 +CONFIG_RT_LWIP_TCP_SEG_NUM=64 +CONFIG_RT_LWIP_TCP_SND_BUF=16384 +CONFIG_RT_LWIP_TCP_WND=65535 CONFIG_RT_LWIP_TCPTHREAD_PRIORITY=10 -CONFIG_RT_LWIP_TCPTHREAD_MBOX_SIZE=32 +CONFIG_RT_LWIP_TCPTHREAD_MBOX_SIZE=256 CONFIG_RT_LWIP_TCPTHREAD_STACKSIZE=4096 # CONFIG_LWIP_NO_RX_THREAD is not set # CONFIG_LWIP_NO_TX_THREAD is not set CONFIG_RT_LWIP_ETHTHREAD_PRIORITY=12 -CONFIG_RT_LWIP_ETHTHREAD_STACKSIZE=1024 -CONFIG_RT_LWIP_ETHTHREAD_MBOX_SIZE=32 -# CONFIG_RT_LWIP_REASSEMBLY_FRAG is not set +CONFIG_RT_LWIP_ETHTHREAD_STACKSIZE=4096 +CONFIG_RT_LWIP_ETHTHREAD_MBOX_SIZE=256 +CONFIG_RT_LWIP_REASSEMBLY_FRAG=y CONFIG_LWIP_NETIF_STATUS_CALLBACK=1 CONFIG_LWIP_NETIF_LINK_CALLBACK=1 CONFIG_SO_REUSE=1 @@ -362,8 +404,15 @@ CONFIG_RT_LWIP_USING_PING=y CONFIG_RT_USING_UTEST=y CONFIG_UTEST_THR_STACK_SIZE=4096 CONFIG_UTEST_THR_PRIORITY=20 +# CONFIG_RT_USING_VAR_EXPORT is not set +# CONFIG_RT_USING_RT_LINK is not set # CONFIG_RT_USING_LWP is not set +# +# RT-Thread Utestcases +# +# CONFIG_RT_USING_UTESTCASES is not set + # # RT-Thread online packages # @@ -411,22 +460,25 @@ CONFIG_PKG_NETUTILS_TFTP=y CONFIG_PKG_NETUTILS_IPERF=y # CONFIG_PKG_NETUTILS_NETIO is not set CONFIG_PKG_NETUTILS_NTP=y -CONFIG_NETUTILS_NTP_TIMEZONE=8 +CONFIG_NTP_USING_AUTO_SYNC=y +CONFIG_NTP_AUTO_SYNC_FIRST_DELAY=30 +CONFIG_NTP_AUTO_SYNC_PERIOD=3600 CONFIG_NETUTILS_NTP_HOSTNAME="0.tw.pool.ntp.org" CONFIG_NETUTILS_NTP_HOSTNAME2="1.tw.pool.ntp.org" CONFIG_NETUTILS_NTP_HOSTNAME3="2.tw.pool.ntp.org" # CONFIG_PKG_NETUTILS_TELNET is not set # CONFIG_PKG_NETUTILS_TCPDUMP is not set -CONFIG_PKG_USING_NETUTILS_V120=y -# CONFIG_PKG_USING_NETUTILS_V110 is not set -# CONFIG_PKG_USING_NETUTILS_V100 is not set # CONFIG_PKG_USING_NETUTILS_LATEST_VERSION is not set -CONFIG_PKG_NETUTILS_VER="v1.2.0" +CONFIG_PKG_USING_NETUTILS_V131=y +# CONFIG_PKG_USING_NETUTILS_V130 is not set +CONFIG_PKG_NETUTILS_VER="v1.3.1" +CONFIG_PKG_NETUTILS_VER_NUM=0x10301 # CONFIG_PKG_USING_CMUX is not set # CONFIG_PKG_USING_PPP_DEVICE is not set # CONFIG_PKG_USING_AT_DEVICE is not set # CONFIG_PKG_USING_ATSRV_SOCKET is not set # CONFIG_PKG_USING_WIZNET is not set +# CONFIG_PKG_USING_ZB_COORDINATOR is not set # # IoT Cloud @@ -439,6 +491,7 @@ CONFIG_PKG_NETUTILS_VER="v1.2.0" # CONFIG_PKG_USING_JIOT-C-SDK is not set # CONFIG_PKG_USING_UCLOUD_IOT_SDK is not set # CONFIG_PKG_USING_JOYLINK is not set +# CONFIG_PKG_USING_EZ_IOT_OS is not set # CONFIG_PKG_USING_NIMBLE is not set # CONFIG_PKG_USING_OTA_DOWNLOADER is not set # CONFIG_PKG_USING_IPMSG is not set @@ -447,8 +500,6 @@ CONFIG_PKG_NETUTILS_VER="v1.2.0" # CONFIG_PKG_USING_LIBRWS is not set # CONFIG_PKG_USING_TCPSERVER is not set # CONFIG_PKG_USING_PROTOBUF_C is not set -# CONFIG_PKG_USING_ONNX_PARSER is not set -# CONFIG_PKG_USING_ONNX_BACKEND is not set # CONFIG_PKG_USING_DLT645 is not set # CONFIG_PKG_USING_QXWZ is not set # CONFIG_PKG_USING_SMTP_CLIENT is not set @@ -462,12 +513,26 @@ CONFIG_PKG_NETUTILS_VER="v1.2.0" # CONFIG_PKG_USING_PDULIB is not set # CONFIG_PKG_USING_BTSTACK is not set # CONFIG_PKG_USING_LORAWAN_ED_STACK is not set +# CONFIG_PKG_USING_WAYZ_IOTKIT is not set +# CONFIG_PKG_USING_MAVLINK is not set +# CONFIG_PKG_USING_RAPIDJSON is not set +# CONFIG_PKG_USING_BSAL is not set +# CONFIG_PKG_USING_AGILE_MODBUS is not set +# CONFIG_PKG_USING_AGILE_FTP is not set +# CONFIG_PKG_USING_EMBEDDEDPROTO is not set +# CONFIG_PKG_USING_RT_LINK_HW is not set +# CONFIG_PKG_USING_LORA_PKT_FWD is not set +# CONFIG_PKG_USING_LORA_GW_DRIVER_LIB is not set +# CONFIG_PKG_USING_LORA_PKT_SNIFFER is not set +# CONFIG_PKG_USING_HM is not set +# CONFIG_PKG_USING_SMALL_MODBUS is not set +# CONFIG_PKG_USING_NET_SERVER is not set # # security packages # # CONFIG_PKG_USING_MBEDTLS is not set -# CONFIG_PKG_USING_libsodium is not set +# CONFIG_PKG_USING_LIBSODIUM is not set # CONFIG_PKG_USING_TINYCRYPT is not set # CONFIG_PKG_USING_TFM is not set # CONFIG_PKG_USING_YD_CRYPTO is not set @@ -475,21 +540,51 @@ CONFIG_PKG_NETUTILS_VER="v1.2.0" # # language packages # +# CONFIG_PKG_USING_LUATOS_SOC is not set # CONFIG_PKG_USING_LUA is not set # CONFIG_PKG_USING_JERRYSCRIPT is not set # CONFIG_PKG_USING_MICROPYTHON is not set +# CONFIG_PKG_USING_PIKASCRIPT is not set # # multimedia packages # + +# +# LVGL: powerful and easy-to-use embedded GUI library +# +# CONFIG_PKG_USING_LVGL is not set +# CONFIG_PKG_USING_LITTLEVGL2RTT is not set +# CONFIG_PKG_USING_LV_MUSIC_DEMO is not set + +# +# u8g2: a monochrome graphic library +# +# CONFIG_PKG_USING_U8G2_OFFICIAL is not set +# CONFIG_PKG_USING_U8G2 is not set # CONFIG_PKG_USING_OPENMV is not set # CONFIG_PKG_USING_MUPDF is not set # CONFIG_PKG_USING_STEMWIN is not set # CONFIG_PKG_USING_WAVPLAYER is not set # CONFIG_PKG_USING_TJPGD is not set +# CONFIG_PKG_USING_PDFGEN is not set # CONFIG_PKG_USING_HELIX is not set # CONFIG_PKG_USING_AZUREGUIX is not set # CONFIG_PKG_USING_TOUCHGFX2RTT is not set +# CONFIG_PKG_USING_NUEMWIN is not set +# CONFIG_PKG_USING_MP3PLAYER is not set +# CONFIG_PKG_USING_TINYJPEG is not set +# CONFIG_PKG_USING_UGUI is not set + +# +# PainterEngine: A cross-platform graphics application framework written in C language +# +# CONFIG_PKG_USING_PAINTERENGINE is not set +# CONFIG_PKG_USING_PAINTERENGINE_AUX is not set +# CONFIG_PKG_USING_MCURSES is not set +# CONFIG_PKG_USING_TERMBOX is not set +# CONFIG_PKG_USING_VT100 is not set +# CONFIG_PKG_USING_QRCODE is not set # # tools packages @@ -498,9 +593,11 @@ CONFIG_PKG_NETUTILS_VER="v1.2.0" # CONFIG_PKG_USING_EASYFLASH is not set # CONFIG_PKG_USING_EASYLOGGER is not set # CONFIG_PKG_USING_SYSTEMVIEW is not set +# CONFIG_PKG_USING_SEGGER_RTT is not set # CONFIG_PKG_USING_RDB is not set -# CONFIG_PKG_USING_QRCODE is not set # CONFIG_PKG_USING_ULOG_EASYFLASH is not set +# CONFIG_PKG_USING_ULOG_FILE is not set +# CONFIG_PKG_USING_LOGMGR is not set # CONFIG_PKG_USING_ADBD is not set # CONFIG_PKG_USING_COREMARK is not set # CONFIG_PKG_USING_DHRYSTONE is not set @@ -514,15 +611,72 @@ CONFIG_PKG_NETUTILS_VER="v1.2.0" # CONFIG_PKG_USING_UMCN is not set # CONFIG_PKG_USING_LWRB2RTT is not set # CONFIG_PKG_USING_CPU_USAGE is not set +# CONFIG_PKG_USING_GBK2UTF8 is not set +# CONFIG_PKG_USING_VCONSOLE is not set +# CONFIG_PKG_USING_KDB is not set +# CONFIG_PKG_USING_WAMR is not set +# CONFIG_PKG_USING_MICRO_XRCE_DDS_CLIENT is not set +# CONFIG_PKG_USING_LWLOG is not set +# CONFIG_PKG_USING_ANV_TRACE is not set +# CONFIG_PKG_USING_ANV_MEMLEAK is not set +# CONFIG_PKG_USING_ANV_TESTSUIT is not set +# CONFIG_PKG_USING_ANV_BENCH is not set +# CONFIG_PKG_USING_DEVMEM is not set +# CONFIG_PKG_USING_REGEX is not set +CONFIG_PKG_USING_MEM_SANDBOX=y +CONFIG_PKG_MEM_SANDBOX_PATH="/packages/tools/mem_sandbox" +CONFIG_PKG_USING_MEM_SANDBOX_LATEST_VERSION=y +CONFIG_PKG_MEM_SANDBOX_VER="latest" +# CONFIG_PKG_USING_SOLAR_TERMS is not set +# CONFIG_PKG_USING_GAN_ZHI is not set +# CONFIG_PKG_USING_FDT is not set # # system packages # + +# +# enhanced kernel services +# +# CONFIG_PKG_USING_RT_MEMCPY_CM is not set +# CONFIG_PKG_USING_RT_KPRINTF_THREADSAFE is not set +# CONFIG_PKG_USING_RT_VSNPRINTF_FULL is not set + +# +# POSIX extension functions +# +# CONFIG_PKG_USING_POSIX_GETLINE is not set +# CONFIG_PKG_USING_POSIX_WCWIDTH is not set +# CONFIG_PKG_USING_POSIX_ITOA is not set +# CONFIG_PKG_USING_POSIX_STRINGS is not set + +# +# acceleration: Assembly language or algorithmic acceleration packages +# +# CONFIG_PKG_USING_QFPLIB_M0_FULL is not set +# CONFIG_PKG_USING_QFPLIB_M0_TINY is not set +# CONFIG_PKG_USING_QFPLIB_M3 is not set + +# +# CMSIS: ARM Cortex-M Microcontroller Software Interface Standard +# +# CONFIG_PKG_USING_CMSIS_5 is not set +# CONFIG_PKG_USING_CMSIS_RTOS2 is not set + +# +# Micrium: Micrium software products porting for RT-Thread +# +# CONFIG_PKG_USING_UCOSIII_WRAPPER is not set +# CONFIG_PKG_USING_UCOSII_WRAPPER is not set +# CONFIG_PKG_USING_UC_CRC is not set +# CONFIG_PKG_USING_UC_CLK is not set +# CONFIG_PKG_USING_UC_COMMON is not set +# CONFIG_PKG_USING_UC_MODBUS is not set +# CONFIG_RT_USING_ARDUINO is not set # CONFIG_PKG_USING_GUIENGINE is not set # CONFIG_PKG_USING_PERSIMMON is not set # CONFIG_PKG_USING_CAIRO is not set # CONFIG_PKG_USING_PIXMAN is not set -# CONFIG_PKG_USING_LWEXT4 is not set # CONFIG_PKG_USING_PARTITION is not set CONFIG_PKG_USING_FAL=y CONFIG_PKG_FAL_PATH="/packages/system/fal" @@ -542,10 +696,11 @@ CONFIG_PKG_FAL_VER_NUM=0x99999 # CONFIG_PKG_USING_FLASHDB is not set # CONFIG_PKG_USING_SQLITE is not set # CONFIG_PKG_USING_RTI is not set -# CONFIG_PKG_USING_LITTLEVGL2RTT is not set -# CONFIG_PKG_USING_CMSIS is not set # CONFIG_PKG_USING_DFS_YAFFS is not set # CONFIG_PKG_USING_LITTLEFS is not set +# CONFIG_PKG_USING_DFS_JFFS2 is not set +# CONFIG_PKG_USING_DFS_UFFS is not set +# CONFIG_PKG_USING_LWEXT4 is not set # CONFIG_PKG_USING_THREAD_POOL is not set # CONFIG_PKG_USING_ROBOTS is not set # CONFIG_PKG_USING_EV is not set @@ -559,17 +714,15 @@ CONFIG_PKG_USING_RAMDISK_LATEST_VERSION=y CONFIG_PKG_RAMDISK_VER="latest" # CONFIG_PKG_USING_MININI is not set # CONFIG_PKG_USING_QBOOT is not set - -# -# Micrium: Micrium software products porting for RT-Thread -# -# CONFIG_PKG_USING_UCOSIII_WRAPPER is not set -# CONFIG_PKG_USING_UCOSII_WRAPPER is not set -# CONFIG_PKG_USING_UC_CRC is not set -# CONFIG_PKG_USING_UC_CLK is not set -# CONFIG_PKG_USING_UC_COMMON is not set -# CONFIG_PKG_USING_UC_MODBUS is not set # CONFIG_PKG_USING_PPOOL is not set +# CONFIG_PKG_USING_OPENAMP is not set +# CONFIG_PKG_USING_LPM is not set +# CONFIG_PKG_USING_TLSF is not set +# CONFIG_PKG_USING_EVENT_RECORDER is not set +# CONFIG_PKG_USING_ARM_2D is not set +# CONFIG_PKG_USING_MCUBOOT is not set +# CONFIG_PKG_USING_TINYUSB is not set +# CONFIG_PKG_USING_USB_STACK is not set # # peripheral libraries and drivers @@ -578,9 +731,9 @@ CONFIG_PKG_RAMDISK_VER="latest" # CONFIG_PKG_USING_REALTEK_AMEBA is not set # CONFIG_PKG_USING_SHT2X is not set # CONFIG_PKG_USING_SHT3X is not set +# CONFIG_PKG_USING_AS7341 is not set # CONFIG_PKG_USING_STM32_SDIO is not set # CONFIG_PKG_USING_ICM20608 is not set -# CONFIG_PKG_USING_U8G2 is not set # CONFIG_PKG_USING_BUTTON is not set # CONFIG_PKG_USING_PCF8574 is not set # CONFIG_PKG_USING_SX12XX is not set @@ -593,7 +746,6 @@ CONFIG_PKG_RAMDISK_VER="latest" # CONFIG_PKG_USING_WM_LIBRARIES is not set # CONFIG_PKG_USING_KENDRYTE_SDK is not set # CONFIG_PKG_USING_INFRARED is not set -# CONFIG_PKG_USING_ROSSERIAL is not set # CONFIG_PKG_USING_AGILE_BUTTON is not set # CONFIG_PKG_USING_AGILE_LED is not set # CONFIG_PKG_USING_AT24CXX is not set @@ -627,16 +779,73 @@ CONFIG_PKG_RAMDISK_VER="latest" # CONFIG_PKG_USING_SSD1306 is not set # CONFIG_PKG_USING_QKEY is not set # CONFIG_PKG_USING_RS485 is not set +# CONFIG_PKG_USING_RS232 is not set +# CONFIG_PKG_USING_NES is not set +# CONFIG_PKG_USING_VIRTUAL_SENSOR is not set +# CONFIG_PKG_USING_VDEVICE is not set +# CONFIG_PKG_USING_SGM706 is not set +# CONFIG_PKG_USING_STM32WB55_SDK is not set +# CONFIG_PKG_USING_RDA58XX is not set +# CONFIG_PKG_USING_LIBNFC is not set +# CONFIG_PKG_USING_MFOC is not set +# CONFIG_PKG_USING_TMC51XX is not set +# CONFIG_PKG_USING_TCA9534 is not set +# CONFIG_PKG_USING_KOBUKI is not set +# CONFIG_PKG_USING_ROSSERIAL is not set +# CONFIG_PKG_USING_MICRO_ROS is not set +# CONFIG_PKG_USING_MCP23008 is not set +# CONFIG_PKG_USING_BLUETRUM_SDK is not set +# CONFIG_PKG_USING_MISAKA_AT24CXX is not set +# CONFIG_PKG_USING_MISAKA_RGB_BLING is not set +# CONFIG_PKG_USING_LORA_MODEM_DRIVER is not set +# CONFIG_PKG_USING_BL_MCU_SDK is not set +# CONFIG_PKG_USING_SOFT_SERIAL is not set +# CONFIG_PKG_USING_MB85RS16 is not set +# CONFIG_PKG_USING_CW2015 is not set + +# +# AI packages +# +# CONFIG_PKG_USING_LIBANN is not set +# CONFIG_PKG_USING_NNOM is not set +# CONFIG_PKG_USING_ONNX_BACKEND is not set +# CONFIG_PKG_USING_ONNX_PARSER is not set +# CONFIG_PKG_USING_TENSORFLOWLITEMICRO is not set +# CONFIG_PKG_USING_ELAPACK is not set +# CONFIG_PKG_USING_ULAPACK is not set +# CONFIG_PKG_USING_QUEST is not set +# CONFIG_PKG_USING_NAXOS is not set # # miscellaneous packages # + +# +# samples: kernel and components samples +# +# CONFIG_PKG_USING_KERNEL_SAMPLES is not set +# CONFIG_PKG_USING_FILESYSTEM_SAMPLES is not set +# CONFIG_PKG_USING_NETWORK_SAMPLES is not set +# CONFIG_PKG_USING_PERIPHERAL_SAMPLES is not set + +# +# entertainment: terminal games and other interesting software packages +# +# CONFIG_PKG_USING_CMATRIX is not set +# CONFIG_PKG_USING_SL is not set +# CONFIG_PKG_USING_CAL is not set +# CONFIG_PKG_USING_ACLOCK is not set +# CONFIG_PKG_USING_THREES is not set +# CONFIG_PKG_USING_2048 is not set +# CONFIG_PKG_USING_SNAKE is not set +# CONFIG_PKG_USING_TETRIS is not set +# CONFIG_PKG_USING_DONUT is not set +# CONFIG_PKG_USING_COWSAY is not set # CONFIG_PKG_USING_LIBCSV is not set CONFIG_PKG_USING_OPTPARSE=y CONFIG_PKG_OPTPARSE_PATH="/packages/misc/optparse" -CONFIG_PKG_USING_OPTPARSE_V100=y -# CONFIG_PKG_USING_OPTPARSE_LATEST_VERSION is not set -CONFIG_PKG_OPTPARSE_VER="v1.0.0" +CONFIG_PKG_USING_OPTPARSE_LATEST_VERSION=y +CONFIG_PKG_OPTPARSE_VER="latest" # CONFIG_OPTPARSE_USING_DEMO is not set # CONFIG_PKG_USING_FASTLZ is not set # CONFIG_PKG_USING_MINILZO is not set @@ -646,69 +855,44 @@ CONFIG_PKG_OPTPARSE_VER="v1.0.0" # CONFIG_PKG_USING_FLEXIBLE_BUTTON is not set # CONFIG_PKG_USING_CANFESTIVAL is not set # CONFIG_PKG_USING_ZLIB is not set +# CONFIG_PKG_USING_MINIZIP is not set # CONFIG_PKG_USING_DSTR is not set # CONFIG_PKG_USING_TINYFRAME is not set # CONFIG_PKG_USING_KENDRYTE_DEMO is not set # CONFIG_PKG_USING_DIGITALCTRL is not set # CONFIG_PKG_USING_UPACKER is not set # CONFIG_PKG_USING_UPARAM is not set - -# -# samples: kernel and components samples -# -# CONFIG_PKG_USING_KERNEL_SAMPLES is not set -# CONFIG_PKG_USING_FILESYSTEM_SAMPLES is not set -# CONFIG_PKG_USING_NETWORK_SAMPLES is not set -# CONFIG_PKG_USING_PERIPHERAL_SAMPLES is not set # CONFIG_PKG_USING_HELLO is not set CONFIG_PKG_USING_VI=y CONFIG_PKG_VI_PATH="/packages/misc/vi" +CONFIG_VI_SANDBOX_SIZE_KB=20 CONFIG_VI_MAX_LEN=4096 # CONFIG_VI_ENABLE_8BIT is not set CONFIG_VI_ENABLE_COLON=y +CONFIG_VI_ENABLE_COLON_EXPAND=y CONFIG_VI_ENABLE_YANKMARK=y CONFIG_VI_ENABLE_SEARCH=y CONFIG_VI_ENABLE_DOT_CMD=y CONFIG_VI_ENABLE_READONLY=y CONFIG_VI_ENABLE_SETOPTS=y CONFIG_VI_ENABLE_SET=y +# CONFIG_VI_ENABLE_WIN_RESIZE is not set CONFIG_VI_ENABLE_VI_ASK_TERMINAL=y CONFIG_VI_ENABLE_UNDO=y CONFIG_VI_ENABLE_UNDO_QUEUE=y CONFIG_VI_UNDO_QUEUE_MAX=256 +CONFIG_VI_ENABLE_VERBOSE_STATUS=y CONFIG_PKG_USING_VI_LATEST_VERSION=y CONFIG_PKG_VI_VER="latest" # CONFIG_PKG_USING_KI is not set -# CONFIG_PKG_USING_NNOM is not set -# CONFIG_PKG_USING_LIBANN is not set -# CONFIG_PKG_USING_ELAPACK is not set # CONFIG_PKG_USING_ARMv7M_DWT is not set -# CONFIG_PKG_USING_VT100 is not set -# CONFIG_PKG_USING_ULAPACK is not set # CONFIG_PKG_USING_UKAL is not set # CONFIG_PKG_USING_CRCLIB is not set - -# -# games: games run on RT-Thread console -# -# CONFIG_PKG_USING_THREES is not set -# CONFIG_PKG_USING_2048 is not set -# CONFIG_PKG_USING_SNAKE is not set -# CONFIG_PKG_USING_TETRIS is not set # CONFIG_PKG_USING_LWGPS is not set -# CONFIG_PKG_USING_TENSORFLOWLITEMICRO is not set - -# -# Nuvoton Packages Config -# -CONFIG_NU_PKG_USING_UTILS=y -CONFIG_NU_PKG_USING_DEMO=y -# CONFIG_NU_PKG_USING_BMX055 is not set -# CONFIG_NU_PKG_USING_MAX31875 is not set -# CONFIG_NU_PKG_USING_NAU88L25 is not set -CONFIG_NU_PKG_USING_NAU8822=y -# CONFIG_NU_PKG_USING_ILI9341 is not set -# CONFIG_NU_PKG_USING_SPINAND is not set +# CONFIG_PKG_USING_STATE_MACHINE is not set +# CONFIG_PKG_USING_DESIGN_PATTERN is not set +# CONFIG_PKG_USING_CONTROLLER is not set +# CONFIG_PKG_USING_PHASE_LOCKED_LOOP is not set # # Hardware Drivers Config @@ -718,12 +902,11 @@ CONFIG_NU_PKG_USING_NAU8822=y # On-chip Peripheral Drivers # CONFIG_SOC_SERIES_NUC980=y -# CONFIG_BSP_USE_STDDRIVER_SOURCE is not set +CONFIG_BSP_USE_STDDRIVER_SOURCE=y CONFIG_BSP_USING_MMU=y CONFIG_BSP_USING_PDMA=y CONFIG_NU_PDMA_MEMFUN_ACTOR_MAX=2 CONFIG_BSP_USING_GPIO=y -# CONFIG_BSP_USING_CLK is not set CONFIG_BSP_USING_EMAC=y CONFIG_BSP_USING_EMAC0=y # CONFIG_BSP_USING_EMAC1 is not set @@ -732,27 +915,23 @@ CONFIG_BSP_USING_RTC=y CONFIG_NU_RTC_SUPPORT_IO_RW=y CONFIG_NU_RTC_SUPPORT_MSH_CMD=y CONFIG_BSP_USING_ADC=y +# CONFIG_BSP_USING_ADC_TOUCH is not set CONFIG_BSP_USING_TMR=y CONFIG_BSP_USING_TIMER=y CONFIG_BSP_USING_TMR0=y CONFIG_BSP_USING_TIMER0=y -# CONFIG_BSP_USING_TPWM0 is not set # CONFIG_BSP_USING_TIMER0_CAPTURE is not set CONFIG_BSP_USING_TMR1=y CONFIG_BSP_USING_TIMER1=y -# CONFIG_BSP_USING_TPWM1 is not set # CONFIG_BSP_USING_TIMER1_CAPTURE is not set CONFIG_BSP_USING_TMR2=y CONFIG_BSP_USING_TIMER2=y -# CONFIG_BSP_USING_TPWM2 is not set # CONFIG_BSP_USING_TIMER2_CAPTURE is not set CONFIG_BSP_USING_TMR3=y CONFIG_BSP_USING_TIMER3=y -# CONFIG_BSP_USING_TPWM3 is not set # CONFIG_BSP_USING_TIMER3_CAPTURE is not set CONFIG_BSP_USING_TMR4=y CONFIG_BSP_USING_TIMER4=y -# CONFIG_BSP_USING_TPWM4 is not set # CONFIG_BSP_USING_TIMER4_CAPTURE is not set CONFIG_BSP_USING_UART=y CONFIG_BSP_USING_UART0=y @@ -794,8 +973,9 @@ CONFIG_BSP_USING_SPI1_NONE=y CONFIG_BSP_USING_I2S=y CONFIG_NU_I2S_DMA_FIFO_SIZE=4096 CONFIG_BSP_USING_QSPI=y +# CONFIG_BSP_USING_QSPI_PDMA is not set CONFIG_BSP_USING_QSPI0=y -CONFIG_BSP_USING_QSPI0_PDMA=y +# CONFIG_BSP_USING_QSPI0_PDMA is not set # CONFIG_BSP_USING_SCUART is not set CONFIG_BSP_USING_CRYPTO=y # CONFIG_NU_PRNG_USE_SEED is not set @@ -823,5 +1003,18 @@ CONFIG_BOARD_USING_USB1_HOST=y # CONFIG_BOARD_USING_MAX31875 is not set # CONFIG_BOARD_USING_LCD_ILI9341 is not set # CONFIG_BOARD_USING_ESP8266 is not set + +# +# Nuvoton Packages Config +# +CONFIG_NU_PKG_USING_UTILS=y +CONFIG_NU_PKG_USING_DEMO=y +# CONFIG_NU_PKG_USING_BMX055 is not set +# CONFIG_NU_PKG_USING_MAX31875 is not set +# CONFIG_NU_PKG_USING_NAU88L25 is not set +CONFIG_NU_PKG_USING_NAU8822=y +# CONFIG_NU_PKG_USING_DA9062 is not set +# CONFIG_NU_PKG_USING_ILI9341 is not set +# CONFIG_NU_PKG_USING_SPINAND is not set CONFIG_BOARD_USE_UTEST=y CONFIG_UTEST_CMD_PREFIX="bsp.nuvoton.nk980-iot.test.utest." diff --git a/bsp/nuvoton/nk-n9h30/.config b/bsp/nuvoton/nk-n9h30/.config index d235edc087..5fc517cbdb 100644 --- a/bsp/nuvoton/nk-n9h30/.config +++ b/bsp/nuvoton/nk-n9h30/.config @@ -744,6 +744,7 @@ CONFIG_PKG_RAMDISK_VER="latest" # CONFIG_PKG_USING_SSD1306 is not set # CONFIG_PKG_USING_QKEY is not set # CONFIG_PKG_USING_RS485 is not set +# CONFIG_PKG_USING_RS232 is not set # CONFIG_PKG_USING_NES is not set # CONFIG_PKG_USING_VIRTUAL_SENSOR is not set # CONFIG_PKG_USING_VDEVICE is not set @@ -832,19 +833,6 @@ CONFIG_PKG_RAMDISK_VER="latest" # CONFIG_PKG_USING_STATE_MACHINE is not set # CONFIG_PKG_USING_DESIGN_PATTERN is not set -# -# Nuvoton Packages Config -# -CONFIG_NU_PKG_USING_UTILS=y -# CONFIG_NU_PKG_USING_DEMO is not set -# CONFIG_NU_PKG_USING_BMX055 is not set -# CONFIG_NU_PKG_USING_MAX31875 is not set -# CONFIG_NU_PKG_USING_NAU88L25 is not set -CONFIG_NU_PKG_USING_NAU8822=y -# CONFIG_NU_PKG_USING_DA9062 is not set -# CONFIG_NU_PKG_USING_ILI9341 is not set -# CONFIG_NU_PKG_USING_SPINAND is not set - # # Hardware Drivers Config # @@ -929,6 +917,7 @@ CONFIG_BSP_USING_VPOST=y # CONFIG_LCM_USING_LSA40AT9001 is not set CONFIG_LCM_USING_FW070TFT=y # CONFIG_LCM_USING_FW043TFT is not set +# CONFIG_LCM_USING_FW070TFT_WSVGA is not set CONFIG_VPOST_USING_LCD_IDX=3 CONFIG_BSP_LCD_BPP=32 CONFIG_BSP_LCD_WIDTH=800 @@ -946,10 +935,30 @@ CONFIG_BOARD_USING_NAU8822=y CONFIG_BOARD_USING_STORAGE_SDCARD=y CONFIG_BOARD_USING_STORAGE_SPIFLASH=y CONFIG_BOARD_USING_BUZZER=y -CONFIG_BOARD_USING_LCM=y CONFIG_BOARD_USING_USB0_DEVICE_HOST=y CONFIG_BOARD_USING_USB1_HOST=y # # Board extended module drivers # +CONFIG_BOARD_USING_LCM=y +CONFIG_BOARD_USING_LCM_FW070TFT_WVGA=y +# CONFIG_BOARD_USING_LCM_FW043TFT_HVGA is not set +# CONFIG_BOARD_USING_LCM_FW070TFT_WSVGA is not set +CONFIG_BOARD_USING_ADCTOUCH=y +# CONFIG_BOARD_USING_GT911 is not set + +# +# Nuvoton Packages Config +# +CONFIG_NU_PKG_USING_UTILS=y +# CONFIG_NU_PKG_USING_DEMO is not set +# CONFIG_NU_PKG_USING_BMX055 is not set +# CONFIG_NU_PKG_USING_MAX31875 is not set +# CONFIG_NU_PKG_USING_NAU88L25 is not set +CONFIG_NU_PKG_USING_NAU8822=y +# CONFIG_NU_PKG_USING_DA9062 is not set +# CONFIG_NU_PKG_USING_ILI9341 is not set +# CONFIG_NU_PKG_USING_SPINAND is not set +CONFIG_BOARD_USE_UTEST=y +CONFIG_UTEST_CMD_PREFIX="bsp.nuvoton.nk-n9h30.test.utest." diff --git a/bsp/nuvoton/nk-n9h30/Kconfig b/bsp/nuvoton/nk-n9h30/Kconfig index 5c55e87c61..b396340d12 100644 --- a/bsp/nuvoton/nk-n9h30/Kconfig +++ b/bsp/nuvoton/nk-n9h30/Kconfig @@ -18,12 +18,6 @@ config PKGS_DIR option env="PKGS_ROOT" default "packages" -config NU_PKGS_DIR - string - option env="NU_PKGS_ROOT" - default "../libraries/nu_packages" - source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" -source "$NU_PKGS_DIR/Kconfig" source "$BSP_DIR/board/Kconfig" diff --git a/bsp/nuvoton/nk-n9h30/applications/lvgl/lv_port_disp.c b/bsp/nuvoton/nk-n9h30/applications/lvgl/lv_port_disp.c index 266be12a31..3162bf8d2b 100644 --- a/bsp/nuvoton/nk-n9h30/applications/lvgl/lv_port_disp.c +++ b/bsp/nuvoton/nk-n9h30/applications/lvgl/lv_port_disp.c @@ -26,9 +26,30 @@ static lv_disp_drv_t disp_drv; /*Descriptor of a display driver*/ static void *buf3_next = RT_NULL; +static uint32_t u32FirstFlush = 0; + +static void nu_antitearing(lv_disp_draw_buf_t *draw_buf, lv_color_t *color_p) +{ + if (buf3_next) + { + /* vsync-none: Use triple screen-sized buffers. */ + if (draw_buf->buf1 == color_p) + draw_buf->buf1 = buf3_next; + else + draw_buf->buf2 = buf3_next; + + draw_buf->buf_act = buf3_next; + buf3_next = color_p; + } + else + { + /* vsync-after: Use ping-pong screen-sized buffers only.*/ + rt_device_control(lcd_device, RTGRAPHIC_CTRL_WAIT_VSYNC, RT_NULL); + } +} + static void nu_flush_direct(lv_disp_drv_t *disp_drv, const lv_area_t *area, lv_color_t *color_p) { - lv_disp_t *psDisp = _lv_refr_get_disp_refreshing(); void *pvDstReDraw; #if (LV_USE_GPU_N9H30_GE2D==0) @@ -55,8 +76,14 @@ static void nu_flush_direct(lv_disp_drv_t *disp_drv, const lv_area_t *area, lv_c mmu_invalidate_dcache((uint32_t)pvDstReDraw, disp_drv->draw_buf->size * sizeof(lv_color_t)); #endif - /* WAIT_VSYNC */ - rt_device_control(lcd_device, RTGRAPHIC_CTRL_WAIT_VSYNC, RT_NULL); + nu_antitearing(disp_drv->draw_buf, color_p); + + if (!u32FirstFlush) + { + /* Enable backlight at first flushing. */ + rt_device_control(lcd_device, RTGRAPHIC_CTRL_POWERON, RT_NULL); + u32FirstFlush = 1; + } lv_disp_flush_ready(disp_drv); } @@ -70,21 +97,13 @@ static void nu_flush_full_refresh(lv_disp_drv_t *disp_drv, const lv_area_t *area /* Use PANDISPLAY without H/W copying */ rt_device_control(lcd_device, RTGRAPHIC_CTRL_PAN_DISPLAY, color_p); - if (buf3_next) - { - /* vsync-none: Use triple screen-sized buffers. */ - if (disp_drv->draw_buf->buf1 == color_p) - disp_drv->draw_buf->buf1 = buf3_next; - else - disp_drv->draw_buf->buf2 = buf3_next; + nu_antitearing(disp_drv->draw_buf, color_p); - disp_drv->draw_buf->buf_act = buf3_next; - buf3_next = color_p; - } - else + if (!u32FirstFlush) { - /* vsync-after: Use ping-pong screen-sized buffers only.*/ - rt_device_control(lcd_device, RTGRAPHIC_CTRL_WAIT_VSYNC, RT_NULL); + /* Enable backlight at first flushing. */ + rt_device_control(lcd_device, RTGRAPHIC_CTRL_POWERON, RT_NULL); + u32FirstFlush = 1; } lv_disp_flush_ready(disp_drv); @@ -106,6 +125,13 @@ static void nu_flush(lv_disp_drv_t *disp_drv, const lv_area_t *area, lv_color_t ge2dSpriteBlt_Screen(area->x1, area->y1, flush_area_w, flush_area_h, (void *)color_p); // -> Leave GE2D + if (!u32FirstFlush) + { + /* Enable backlight at first flushing. */ + rt_device_control(lcd_device, RTGRAPHIC_CTRL_POWERON, RT_NULL); + u32FirstFlush = 1; + } + lv_disp_flush_ready(disp_drv); } @@ -188,6 +214,9 @@ void lv_port_disp_init(void) return; } + /* Disable backlight at startup. */ + rt_device_control(lcd_device, RTGRAPHIC_CTRL_POWEROFF, RT_NULL); + RT_ASSERT(info.bits_per_pixel == 8 || info.bits_per_pixel == 16 || info.bits_per_pixel == 24 || info.bits_per_pixel == 32); diff --git a/bsp/nuvoton/nk-n9h30/board/Kconfig b/bsp/nuvoton/nk-n9h30/board/Kconfig index c26e25fb65..379add6d0b 100644 --- a/bsp/nuvoton/nk-n9h30/board/Kconfig +++ b/bsp/nuvoton/nk-n9h30/board/Kconfig @@ -45,12 +45,6 @@ menu "Hardware Drivers Config" select BSP_USING_PWM0 default n - config BOARD_USING_LCM - bool "NuDesign TFT-LCD7(over vpost)" - select BSP_USING_VPOST - select LCM_USING_FW070TFT - default y - config BOARD_USING_USB0_DEVICE_HOST select BSP_USING_USBH select BSP_USING_USBD @@ -69,7 +63,61 @@ menu "Hardware Drivers Config" menu "Board extended module drivers" + config BOARD_USING_LCM + bool "Use LCD panel." + default y + + if BOARD_USING_LCM + + choice + prompt "Select LCD panel devices.(Over VPOST)" + default BOARD_USING_LCM_FW070TFT_WVGA + + config BOARD_USING_LCM_FW070TFT_WVGA + bool "NuDesign TFT-LCD7-WVGA" + select BSP_USING_VPOST + select LCM_USING_FW070TFT + help + Choose this option if you use 7" 800x480x32b LCD panel. + + config BOARD_USING_LCM_FW043TFT_HVGA + bool "NuDesign TFT-LCD43-HVGA" + select BSP_USING_VPOST + select LCM_USING_FW043TFT + help + Choose this option if you use 4.3" 480x272x32b LCD panel. + + config BOARD_USING_LCM_FW070TFT_WSVGA + bool "NuDesign TFT-LCD7-WSVGA" + select BSP_USING_VPOST + select LCM_USING_FW070TFT_WSVGA + help + Choose this option if you use 7" 1024x600x32b LCD panel. + endchoice + + choice + prompt "Select Touch devices." + default BOARD_USING_ADCTOUCH + + config BOARD_USING_ADCTOUCH + bool "ADC touching" + select BSP_USING_ADC_TOUCH + help + Choose this option if you use internal ADC touching function. + + config BOARD_USING_GT911 + bool "GT911 TSC" + select BSP_USING_I2C + select BSP_USING_I2C0 + select PKG_USING_GT911 + help + Choose this option if you use GT911 external TSC touching function. + endchoice + + endif + endmenu + source "$BSP_DIR/../libraries/nu_packages/Kconfig" endmenu diff --git a/bsp/nuvoton/nk-n9h30/board/board_dev.c b/bsp/nuvoton/nk-n9h30/board/board_dev.c index 42d1bdac94..ba21df17dd 100644 --- a/bsp/nuvoton/nk-n9h30/board/board_dev.c +++ b/bsp/nuvoton/nk-n9h30/board/board_dev.c @@ -173,6 +173,34 @@ int rt_hw_nau8822_port(void) INIT_COMPONENT_EXPORT(rt_hw_nau8822_port); #endif /* BOARD_USING_NAU8822 */ +//#if defined(BOARD_USING_GT911) && defined(PKG_USING_GT911) +#if defined(PKG_USING_GT911) +#include "drv_gpio.h" +#include "gt911.h" + +#define GT911_RST_PIN NU_GET_PININDEX(NU_PG, 4) +#define GT911_IRQ_PIN NU_GET_PININDEX(NU_PG, 5) + +extern int gt911_sample(const char *name, rt_uint16_t x, rt_uint16_t y); +int rt_hw_gt911_port(void) +{ + struct rt_touch_config cfg; + rt_uint8_t rst_pin; + + rst_pin = GT911_RST_PIN; + cfg.dev_name = "i2c0"; + cfg.irq_pin.pin = GT911_IRQ_PIN; + cfg.irq_pin.mode = PIN_MODE_INPUT_PULLDOWN; + cfg.user_data = &rst_pin; + + rt_hw_gt911_init("gt911", &cfg); + gt911_sample("gt911", BSP_LCD_WIDTH, BSP_LCD_HEIGHT); + + return 0; +} +INIT_ENV_EXPORT(rt_hw_gt911_port); +#endif /* if defined(BOARD_USING_GT911) && defined(PKG_USING_GT911) */ + #if defined(BOARD_USING_BUZZER) #define PWM_DEV_NAME "pwm0" @@ -224,13 +252,13 @@ static void PlayRingTone(void) #include /* defined the LCM_BLEN pin: PH3 */ - #define LCM_BLEN NU_GET_PININDEX(NU_PH, 3) + #define LCM_BACKLIGHT_CTRL NU_GET_PININDEX(NU_PH, 3) #endif -#define PWM_DEV_NAME "pwm0" -#define LCM_PWM_CHANNEL (0) +#define PWM_DEV_NAME "pwm0" +#define LCM_PWM_CHANNEL (0) -static void LCMLightOn(void) +void nu_lcd_backlight_on(void) { struct rt_device_pwm *pwm_dev; @@ -243,10 +271,27 @@ static void LCMLightOn(void) { rt_kprintf("Can't find %s\n", PWM_DEV_NAME); } + + rt_pin_mode(LCM_BACKLIGHT_CTRL, PIN_MODE_OUTPUT); + rt_pin_write(LCM_BACKLIGHT_CTRL, PIN_HIGH); +} + +void nu_lcd_backlight_off(void) +{ + struct rt_device_pwm *pwm_dev; + + if ((pwm_dev = (struct rt_device_pwm *)rt_device_find(PWM_DEV_NAME)) != RT_NULL) + { + rt_pwm_disable(pwm_dev, LCM_PWM_CHANNEL); + } + else + { + rt_kprintf("Can't find %s\n", PWM_DEV_NAME); + } + + rt_pin_mode(LCM_BACKLIGHT_CTRL, PIN_MODE_OUTPUT); + rt_pin_write(LCM_BACKLIGHT_CTRL, PIN_LOW); } -#ifdef FINSH_USING_MSH - MSH_CMD_EXPORT(LCMLightOn, LCM - light on panel); -#endif int rt_hw_lcm_port(void) { @@ -259,9 +304,6 @@ int rt_hw_lcm_port(void) } #endif - /* Use PWM to control backlight. */ - LCMLightOn(); - return 0; } INIT_COMPONENT_EXPORT(rt_hw_lcm_port); diff --git a/bsp/nuvoton/nk-n9h30/project.uvproj b/bsp/nuvoton/nk-n9h30/project.uvproj deleted file mode 100644 index f3ff2ed8d7..0000000000 --- a/bsp/nuvoton/nk-n9h30/project.uvproj +++ /dev/null @@ -1,1791 +0,0 @@ - - - 1.1 -
### uVision Project, (C) Keil Software
- - - rtthread - 0x4 - ARM-ADS - - - Nuvoton_ARM9_Series - Nuvoton - - - - - 0 - - - - - - - - - - - - 0 - - - - Atmel\SAM9260\ - Atmel\SAM9260\ - - 0 - 0 - 0 - 0 - 1 - - .\Objects\ - rtthread - 1 - 0 - 0 - 1 - 1 - .\Listings\ - 1 - 0 - 0 - - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 0 - 0 - - - 0 - 0 - - - 0 - 0 - - - 0 - 0 - - 0 - - - - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 3 - - - - - SARM.DLL - -cAT91SAM9 - DARMATS9.DLL - -p91SAM9260 - SARM.DLL - - TARMATS9.DLL - -p91SAM9260 - - - - 1 - 0 - 0 - 0 - 16 - - - 0 - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - - - 1 - 1 - 0 - 1 - 1 - 1 - 0 - 1 - 1 - - 0 - 6 - - - - - - - - - - - - - ..\libraries\nuc980\Script\NUC980xx61.ini - Segger\JLTAgdi.dll - - - - - 1 - 0 - 0 - 0 - 1 - 4098 - - 0 - Segger\JLTAgdi.dll - "" () - - - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 1 - 0 - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 3 - 3 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x200000 - 0x1000 - - - 1 - 0x100000 - 0x8000 - - - 0 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - - - - 1 - 3 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 2 - 0 - 0 - - --c99 - __RTTHREAD__, RT_USING_ARM_LIBC, __CLK_TCK=RT_TICK_PER_SECOND - - applications;.;board;..\..\..\components\libc\compilers\common;..\..\..\components\libc\compilers\common\nogcc;..\..\..\libcpu\arm\common;..\..\..\libcpu\arm\arm926;..\..\..\components\drivers\audio;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\spi;..\..\..\components\drivers\include;..\..\..\components\drivers\spi\sfud\inc;..\..\..\components\drivers\include;..\..\..\components\drivers\touch;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\libraries\n9h30\rtt_port;..\..\..\components\dfs\include;..\..\..\components\dfs\filesystems\devfs;..\..\..\components\dfs\filesystems\elmfat;..\..\..\components\finsh;.;..\..\..\include;..\libraries\n9h30\Driver\Include;applications\lvgl;..\..\..\components\net\lwip-2.0.2\src;..\..\..\components\net\lwip-2.0.2\src\include;..\..\..\components\net\lwip-2.0.2\src\include\ipv4;..\..\..\components\net\lwip-2.0.2\src\arch\include;..\..\..\components\net\lwip-2.0.2\src\include\netif;..\libraries\n9h30\UsbHostLib\inc;..\libraries\nu_packages\AudioCodec;..\libraries\nu_packages\NuUtils\inc;..\..\..\components\libc\posix\io;..\..\..\components\libc\posix\io\poll;..\..\..\components\libc\posix\ipc;..\..\..\components\drivers\usb\usbdevice;..\..\..\components\drivers\usb\usbhost;..\..\..\components\drivers\usb\usbhost\class;..\..\..\components\drivers\usb\usbhost\core;..\..\..\components\drivers\usb\usbhost\include;..\..\..\components\drivers\include;..\..\..\components\net\netdev\include;..\..\..\components\net\sal_socket\include;..\..\..\components\net\sal_socket\include\socket;..\..\..\components\net\sal_socket\impl;..\..\..\components\net\sal_socket\include\dfs_net;..\..\..\components\net\sal_socket\include\socket\sys_socket;..\..\..\components\utilities\utest;..\..\..\examples\utest\testcases\kernel - - - - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - - - - 0 - 0 - 0 - 0 - 1 - 0 - 0x20000000 - 0x20800000 - .\linking_scripts\n9h30.sct - - - - - - - - - - - Applications - - - main.c - 1 - applications\main.c - - - - - mnt.c - 1 - applications\mnt.c - - - - - board - - - board_dev.c - 1 - board\board_dev.c - - - - - nu_pin_init.c - 1 - board\nu_pin_init.c - - - - - Compiler - - - syscall_mem.c - 1 - ..\..\..\components\libc\compilers\armlibc\syscall_mem.c - - - - - syscalls.c - 1 - ..\..\..\components\libc\compilers\armlibc\syscalls.c - - - - - libc_syms.c - 1 - ..\..\..\components\libc\compilers\armlibc\libc_syms.c - - - - - time.c - 1 - ..\..\..\components\libc\compilers\common\time.c - - - - - stdlib.c - 1 - ..\..\..\components\libc\compilers\common\stdlib.c - - - - - CPU - - - backtrace.c - 1 - ..\..\..\libcpu\arm\common\backtrace.c - - - - - div0.c - 1 - ..\..\..\libcpu\arm\common\div0.c - - - - - showmem.c - 1 - ..\..\..\libcpu\arm\common\showmem.c - - - - - cpuport.c - 1 - ..\..\..\libcpu\arm\arm926\cpuport.c - - - - - mmu.c - 1 - ..\..\..\libcpu\arm\arm926\mmu.c - - - - - stack.c - 1 - ..\..\..\libcpu\arm\arm926\stack.c - - - - - context_rvds.S - 2 - ..\..\..\libcpu\arm\arm926\context_rvds.S - - - - - trap.c - 1 - ..\..\..\libcpu\arm\arm926\trap.c - - - - - machine.c - 1 - ..\..\..\libcpu\arm\arm926\machine.c - - - - - start_rvds.S - 2 - ..\..\..\libcpu\arm\arm926\start_rvds.S - - - - - DeviceDrivers - - - audio.c - 1 - ..\..\..\components\drivers\audio\audio.c - - - - - audio_pipe.c - 1 - ..\..\..\components\drivers\audio\audio_pipe.c - - - - - can.c - 1 - ..\..\..\components\drivers\can\can.c - - - - - hwtimer.c - 1 - ..\..\..\components\drivers\hwtimer\hwtimer.c - - - - - i2c_core.c - 1 - ..\..\..\components\drivers\i2c\i2c_core.c - - - - - i2c_dev.c - 1 - ..\..\..\components\drivers\i2c\i2c_dev.c - - - - - i2c-bit-ops.c - 1 - ..\..\..\components\drivers\i2c\i2c-bit-ops.c - - - - - adc.c - 1 - ..\..\..\components\drivers\misc\adc.c - - - - - rt_drv_pwm.c - 1 - ..\..\..\components\drivers\misc\rt_drv_pwm.c - - - - - pin.c - 1 - ..\..\..\components\drivers\misc\pin.c - - - - - rt_inputcapture.c - 1 - ..\..\..\components\drivers\misc\rt_inputcapture.c - - - - - rtc.c - 1 - ..\..\..\components\drivers\rtc\rtc.c - - - - - alarm.c - 1 - ..\..\..\components\drivers\rtc\alarm.c - - - - - serial.c - 1 - ..\..\..\components\drivers\serial\serial.c - - - - - sfud.c - 1 - ..\..\..\components\drivers\spi\sfud\src\sfud.c - - - - - spi_core.c - 1 - ..\..\..\components\drivers\spi\spi_core.c - - - - - sfud_sfdp.c - 1 - ..\..\..\components\drivers\spi\sfud\src\sfud_sfdp.c - - - - - spi_dev.c - 1 - ..\..\..\components\drivers\spi\spi_dev.c - - - - - qspi_core.c - 1 - ..\..\..\components\drivers\spi\qspi_core.c - - - - - spi_flash_sfud.c - 1 - ..\..\..\components\drivers\spi\spi_flash_sfud.c - - - - - waitqueue.c - 1 - ..\..\..\components\drivers\src\waitqueue.c - - - - - pipe.c - 1 - ..\..\..\components\drivers\src\pipe.c - - - - - ringbuffer.c - 1 - ..\..\..\components\drivers\src\ringbuffer.c - - - - - dataqueue.c - 1 - ..\..\..\components\drivers\src\dataqueue.c - - - - - completion.c - 1 - ..\..\..\components\drivers\src\completion.c - - - - - workqueue.c - 1 - ..\..\..\components\drivers\src\workqueue.c - - - - - ringblk_buf.c - 1 - ..\..\..\components\drivers\src\ringblk_buf.c - - - - - touch.c - 1 - ..\..\..\components\drivers\touch\touch.c - - - - - watchdog.c - 1 - ..\..\..\components\drivers\watchdog\watchdog.c - - - - - - - --c99 - - - - - - - - - - Drivers - - - drv_usbd.c - 1 - ..\libraries\n9h30\rtt_port\drv_usbd.c - - - - - drv_timer.c - 1 - ..\libraries\n9h30\rtt_port\drv_timer.c - - - - - drv_vpost.c - 1 - ..\libraries\n9h30\rtt_port\drv_vpost.c - - - - - drv_adc.c - 1 - ..\libraries\n9h30\rtt_port\drv_adc.c - - - - - drv_can.c - 1 - ..\libraries\n9h30\rtt_port\drv_can.c - - - - - drv_pwm.c - 1 - ..\libraries\n9h30\rtt_port\drv_pwm.c - - - - - drv_systick.c - 1 - ..\libraries\n9h30\rtt_port\drv_systick.c - - - - - drv_common.c - 1 - ..\libraries\n9h30\rtt_port\drv_common.c - - - - - drv_jpegcodec.c - 1 - ..\libraries\n9h30\rtt_port\drv_jpegcodec.c - - - - - drv_usbhost.c - 1 - ..\libraries\n9h30\rtt_port\drv_usbhost.c - - - - - drv_emac.c - 1 - ..\libraries\n9h30\rtt_port\drv_emac.c - - - - - drv_scuart.c - 1 - ..\libraries\n9h30\rtt_port\drv_scuart.c - - - - - drv_adc_touch.c - 1 - ..\libraries\n9h30\rtt_port\drv_adc_touch.c - - - - - drv_qspi.c - 1 - ..\libraries\n9h30\rtt_port\drv_qspi.c - - - - - drv_sys.c - 1 - ..\libraries\n9h30\rtt_port\drv_sys.c - - - - - drv_gpio.c - 1 - ..\libraries\n9h30\rtt_port\drv_gpio.c - - - - - drv_etimer.c - 1 - ..\libraries\n9h30\rtt_port\drv_etimer.c - - - - - drv_wdt.c - 1 - ..\libraries\n9h30\rtt_port\drv_wdt.c - - - - - drv_ge2d.c - 1 - ..\libraries\n9h30\rtt_port\drv_ge2d.c - - - - - drv_etimer_capture.c - 1 - ..\libraries\n9h30\rtt_port\drv_etimer_capture.c - - - - - drv_uart.c - 1 - ..\libraries\n9h30\rtt_port\drv_uart.c - - - - - drv_i2c.c - 1 - ..\libraries\n9h30\rtt_port\drv_i2c.c - - - - - drv_sdh.c - 1 - ..\libraries\n9h30\rtt_port\drv_sdh.c - - - - - drv_rtc.c - 1 - ..\libraries\n9h30\rtt_port\drv_rtc.c - - - - - drv_crypto.c - 1 - ..\libraries\n9h30\rtt_port\drv_crypto.c - - - - - drv_softi2c.c - 1 - ..\libraries\n9h30\rtt_port\drv_softi2c.c - - - - - drv_i2s.c - 1 - ..\libraries\n9h30\rtt_port\drv_i2s.c - - - - - Filesystem - - - dfs_posix.c - 1 - ..\..\..\components\dfs\src\dfs_posix.c - - - - - dfs_fs.c - 1 - ..\..\..\components\dfs\src\dfs_fs.c - - - - - dfs.c - 1 - ..\..\..\components\dfs\src\dfs.c - - - - - dfs_file.c - 1 - ..\..\..\components\dfs\src\dfs_file.c - - - - - devfs.c - 1 - ..\..\..\components\dfs\filesystems\devfs\devfs.c - - - - - ffunicode.c - 1 - ..\..\..\components\dfs\filesystems\elmfat\ffunicode.c - - - - - dfs_elm.c - 1 - ..\..\..\components\dfs\filesystems\elmfat\dfs_elm.c - - - - - ff.c - 1 - ..\..\..\components\dfs\filesystems\elmfat\ff.c - - - - - Finsh - - - shell.c - 1 - ..\..\..\components\finsh\shell.c - - - - - msh.c - 1 - ..\..\..\components\finsh\msh.c - - - - - msh_file.c - 1 - ..\..\..\components\finsh\msh_file.c - - - - - cmd.c - 1 - ..\..\..\components\finsh\cmd.c - - - - - Kernel - - - mempool.c - 1 - ..\..\..\src\mempool.c - - - - - scheduler.c - 1 - ..\..\..\src\scheduler.c - - - - - irq.c - 1 - ..\..\..\src\irq.c - - - - - thread.c - 1 - ..\..\..\src\thread.c - - - - - timer.c - 1 - ..\..\..\src\timer.c - - - - - memheap.c - 1 - ..\..\..\src\memheap.c - - - - - components.c - 1 - ..\..\..\src\components.c - - - - - mem.c - 1 - ..\..\..\src\mem.c - - - - - clock.c - 1 - ..\..\..\src\clock.c - - - - - object.c - 1 - ..\..\..\src\object.c - - - - - kservice.c - 1 - ..\..\..\src\kservice.c - - - - - ipc.c - 1 - ..\..\..\src\ipc.c - - - - - idle.c - 1 - ..\..\..\src\idle.c - - - - - signal.c - 1 - ..\..\..\src\signal.c - - - - - device.c - 1 - ..\..\..\src\device.c - - - - - Libraries - - - nu_timer.c - 1 - ..\libraries\n9h30\Driver\Source\nu_timer.c - - - - - nu_emac.c - 1 - ..\libraries\n9h30\Driver\Source\nu_emac.c - - - - - nu_sys.c - 1 - ..\libraries\n9h30\Driver\Source\nu_sys.c - - - - - nu_gpio.c - 1 - ..\libraries\n9h30\Driver\Source\nu_gpio.c - - - - - nu_wwdt.c - 1 - ..\libraries\n9h30\Driver\Source\nu_wwdt.c - - - - - nu_etimer.c - 1 - ..\libraries\n9h30\Driver\Source\nu_etimer.c - - - - - nu_spi.c - 1 - ..\libraries\n9h30\Driver\Source\nu_spi.c - - - - - nu_can.c - 1 - ..\libraries\n9h30\Driver\Source\nu_can.c - - - - - nu_wdt.c - 1 - ..\libraries\n9h30\Driver\Source\nu_wdt.c - - - - - nu_fmi.c - 1 - ..\libraries\n9h30\Driver\Source\nu_fmi.c - - - - - nu_lcd.c - 1 - ..\libraries\n9h30\Driver\Source\nu_lcd.c - - - - - nu_sdh.c - 1 - ..\libraries\n9h30\Driver\Source\nu_sdh.c - - - - - nu_usbd.c - 1 - ..\libraries\n9h30\Driver\Source\nu_usbd.c - - - - - nu_cap.c - 1 - ..\libraries\n9h30\Driver\Source\nu_cap.c - - - - - nu_scuart.c - 1 - ..\libraries\n9h30\Driver\Source\nu_scuart.c - - - - - nu_i2s.c - 1 - ..\libraries\n9h30\Driver\Source\nu_i2s.c - - - - - nu_rtc.c - 1 - ..\libraries\n9h30\Driver\Source\nu_rtc.c - - - - - nu_pwm.c - 1 - ..\libraries\n9h30\Driver\Source\nu_pwm.c - - - - - nu_crypto.c - 1 - ..\libraries\n9h30\Driver\Source\nu_crypto.c - - - - - nu_uart.c - 1 - ..\libraries\n9h30\Driver\Source\nu_uart.c - - - - - LVGL-port - - - lv_demo.c - 1 - applications\lvgl\lv_demo.c - - - - - lv_port_indev.c - 1 - applications\lvgl\lv_port_indev.c - - - - - lv_port_disp.c - 1 - applications\lvgl\lv_port_disp.c - - - - - lwIP - - - netdb.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\api\netdb.c - - - - - ip.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\ip.c - - - - - autoip.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\ipv4\autoip.c - - - - - ethernet.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\netif\ethernet.c - - - - - netif.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\netif.c - - - - - sys.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\sys.c - - - - - sockets.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\api\sockets.c - - - - - netifapi.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\api\netifapi.c - - - - - tcpip.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\api\tcpip.c - - - - - ip4_addr.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\ipv4\ip4_addr.c - - - - - dhcp.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\ipv4\dhcp.c - - - - - init.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\init.c - - - - - ping.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\apps\ping\ping.c - - - - - ethernetif.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\netif\ethernetif.c - - - - - etharp.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\ipv4\etharp.c - - - - - memp.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\memp.c - - - - - ip4.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\ipv4\ip4.c - - - - - netbuf.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\api\netbuf.c - - - - - raw.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\raw.c - - - - - ip4_frag.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\ipv4\ip4_frag.c - - - - - tcp_out.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\tcp_out.c - - - - - lowpan6.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\netif\lowpan6.c - - - - - icmp.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\ipv4\icmp.c - - - - - api_lib.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\api\api_lib.c - - - - - inet_chksum.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\inet_chksum.c - - - - - stats.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\stats.c - - - - - err.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\api\err.c - - - - - tcp_in.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\tcp_in.c - - - - - dns.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\dns.c - - - - - sys_arch.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\arch\sys_arch.c - - - - - timeouts.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\timeouts.c - - - - - igmp.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\ipv4\igmp.c - - - - - udp.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\udp.c - - - - - pbuf.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\pbuf.c - - - - - def.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\def.c - - - - - api_msg.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\api\api_msg.c - - - - - tcp.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\tcp.c - - - - - n9h30_usbhostlib - - - ehci.c - 1 - ..\libraries\n9h30\UsbHostLib\src\ehci.c - - - - - ohci.c - 1 - ..\libraries\n9h30\UsbHostLib\src\ohci.c - - - - - mem_alloc.c - 1 - ..\libraries\n9h30\UsbHostLib\src\mem_alloc.c - - - - - ehci_iso.c - 1 - ..\libraries\n9h30\UsbHostLib\src\ehci_iso.c - - - - - support.c - 1 - ..\libraries\n9h30\UsbHostLib\src\support.c - - - - - usb_core.c - 1 - ..\libraries\n9h30\UsbHostLib\src\usb_core.c - - - - - nu_pkgs_nau8822 - - - audio_test.c - 1 - ..\libraries\nu_packages\AudioCodec\audio_test.c - - - - - acodec_nau8822.c - 1 - ..\libraries\nu_packages\AudioCodec\acodec_nau8822.c - - - - - POSIX - - - select.c - 1 - ..\..\..\components\libc\posix\io\select.c - - - - - poll.c - 1 - ..\..\..\components\libc\posix\io\poll\poll.c - - - - - rt_usbd - - - cdc_vcom.c - 1 - ..\..\..\components\drivers\usb\usbdevice\class\cdc_vcom.c - - - - - usbdevice_core.c - 1 - ..\..\..\components\drivers\usb\usbdevice\core\usbdevice_core.c - - - - - mstorage.c - 1 - ..\..\..\components\drivers\usb\usbdevice\class\mstorage.c - - - - - usbdevice.c - 1 - ..\..\..\components\drivers\usb\usbdevice\core\usbdevice.c - - - - - rt_usbh - - - hub.c - 1 - ..\..\..\components\drivers\usb\usbhost\core\hub.c - - - - - usbhost.c - 1 - ..\..\..\components\drivers\usb\usbhost\core\usbhost.c - - - - - usbhost_core.c - 1 - ..\..\..\components\drivers\usb\usbhost\core\usbhost_core.c - - - - - driver.c - 1 - ..\..\..\components\drivers\usb\usbhost\core\driver.c - - - - - mass.c - 1 - ..\..\..\components\drivers\usb\usbhost\class\mass.c - - - - - udisk.c - 1 - ..\..\..\components\drivers\usb\usbhost\class\udisk.c - - - - - SAL - - - netdev_ipaddr.c - 1 - ..\..\..\components\net\netdev\src\netdev_ipaddr.c - - - - - netdev.c - 1 - ..\..\..\components\net\netdev\src\netdev.c - - - - - net_netdb.c - 1 - ..\..\..\components\net\sal_socket\socket\net_netdb.c - - - - - af_inet_lwip.c - 1 - ..\..\..\components\net\sal_socket\impl\af_inet_lwip.c - - - - - net_sockets.c - 1 - ..\..\..\components\net\sal_socket\socket\net_sockets.c - - - - - dfs_net.c - 1 - ..\..\..\components\net\sal_socket\dfs_net\dfs_net.c - - - - - sal_socket.c - 1 - ..\..\..\components\net\sal_socket\src\sal_socket.c - - - - - UTest - - - utest.c - 1 - ..\..\..\components\utilities\utest\utest.c - - - - - - -
diff --git a/bsp/nuvoton/nk-n9h30/project.uvprojx b/bsp/nuvoton/nk-n9h30/project.uvprojx deleted file mode 100644 index 6dc5488c5c..0000000000 --- a/bsp/nuvoton/nk-n9h30/project.uvprojx +++ /dev/null @@ -1,1783 +0,0 @@ - - - 2.1 -
### uVision Project, (C) Keil Software
- - - rtthread - 0x4 - ARM-ADS - 0 - - - Nuvoton_ARM9_Series - Nuvoton - - - - - 0 - - - - - - - - - - - - 0 - 0 - - - - Atmel\SAM9260\ - Atmel\SAM9260\ - - 0 - 0 - 0 - 0 - 1 - - .\build\keil5\ - rtthread - 1 - 0 - 1 - 1 - 1 - .\build\keil5\ - 1 - 0 - 0 - - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 1 - 0 - fromelf.exe --bin --output "$L@L.bin" "$L@L.axf" - - 0 - 0 - 0 - 0 - - 0 - - - - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 3 - - - 1 - - - SARM.DLL - -cAT91SAM9260 - DARMATS9.DLL - -p91SAM9260 - SARM.DLL - - TARMATS9.DLL - -p91SAM9260 - - - - 1 - 0 - 0 - 0 - 16 - - - - - 1 - 0 - 0 - 0 - 1 - 4098 - - 0 - Segger\JLTAgdi.dll - "" () - - - - - 0 - - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 1 - 0 - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - ARM926EJ-S - - 0 - 0 - 0 - 1 - 1 - 0 - 0 - 0 - 0 - 1 - 0 - 8 - 0 - 0 - 0 - 0 - 3 - 3 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x200000 - 0x1000 - - - 1 - 0x100000 - 0x8000 - - - 0 - 0x0 - 0x0 - - - 1 - 0x20000000 - 0x800000 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x100000 - 0x8000 - - - 1 - 0x0 - 0x0 - - - 0 - 0x20800000 - 0x1800000 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x200000 - 0x1000 - - - 0 - 0x300000 - 0x1000 - - - - - - 1 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 2 - 0 - 0 - 0 - 0 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - - --c99 - __RTTHREAD__, RT_USING_ARM_LIBC, __CLK_TCK=RT_TICK_PER_SECOND - - applications;.;board;..\..\..\components\libc\compilers\common;..\..\..\components\libc\compilers\common\nogcc;..\..\..\libcpu\arm\common;..\..\..\libcpu\arm\arm926;..\..\..\components\drivers\audio;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\spi;..\..\..\components\drivers\include;..\..\..\components\drivers\spi\sfud\inc;..\..\..\components\drivers\include;..\..\..\components\drivers\touch;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\libraries\n9h30\rtt_port;..\..\..\components\dfs\include;..\..\..\components\dfs\filesystems\devfs;..\..\..\components\dfs\filesystems\elmfat;..\..\..\components\finsh;.;..\..\..\include;..\libraries\n9h30\Driver\Include;applications\lvgl;..\..\..\components\net\lwip-2.0.2\src;..\..\..\components\net\lwip-2.0.2\src\include;..\..\..\components\net\lwip-2.0.2\src\include\ipv4;..\..\..\components\net\lwip-2.0.2\src\arch\include;..\..\..\components\net\lwip-2.0.2\src\include\netif;..\libraries\n9h30\UsbHostLib\inc;..\libraries\nu_packages\AudioCodec;..\libraries\nu_packages\NuUtils\inc;..\..\..\components\libc\posix\io;..\..\..\components\libc\posix\io\poll;..\..\..\components\libc\posix\ipc;..\..\..\components\drivers\usb\usbdevice;..\..\..\components\drivers\usb\usbhost;..\..\..\components\drivers\usb\usbhost\class;..\..\..\components\drivers\usb\usbhost\core;..\..\..\components\drivers\usb\usbhost\include;..\..\..\components\drivers\include;..\..\..\components\net\netdev\include;..\..\..\components\net\sal_socket\include;..\..\..\components\net\sal_socket\include\socket;..\..\..\components\net\sal_socket\impl;..\..\..\components\net\sal_socket\include\dfs_net;..\..\..\components\net\sal_socket\include\socket\sys_socket;..\..\..\components\utilities\utest;..\..\..\examples\utest\testcases\kernel - - - - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - - - - 0 - 0 - 0 - 0 - 1 - 0 - 0x20000000 - 0x20800000 - - .\linking_scripts\n9h30.sct - - - - - - - - - - - Applications - - - mnt.c - 1 - applications\mnt.c - - - - - main.c - 1 - applications\main.c - - - - - board - - - board_dev.c - 1 - board\board_dev.c - - - - - nu_pin_init.c - 1 - board\nu_pin_init.c - - - - - Compiler - - - syscall_mem.c - 1 - ..\..\..\components\libc\compilers\armlibc\syscall_mem.c - - - - - libc_syms.c - 1 - ..\..\..\components\libc\compilers\armlibc\libc_syms.c - - - - - syscalls.c - 1 - ..\..\..\components\libc\compilers\armlibc\syscalls.c - - - - - stdlib.c - 1 - ..\..\..\components\libc\compilers\common\stdlib.c - - - - - time.c - 1 - ..\..\..\components\libc\compilers\common\time.c - - - - - CPU - - - showmem.c - 1 - ..\..\..\libcpu\arm\common\showmem.c - - - - - div0.c - 1 - ..\..\..\libcpu\arm\common\div0.c - - - - - backtrace.c - 1 - ..\..\..\libcpu\arm\common\backtrace.c - - - - - context_rvds.S - 2 - ..\..\..\libcpu\arm\arm926\context_rvds.S - - - - - mmu.c - 1 - ..\..\..\libcpu\arm\arm926\mmu.c - - - - - trap.c - 1 - ..\..\..\libcpu\arm\arm926\trap.c - - - - - cpuport.c - 1 - ..\..\..\libcpu\arm\arm926\cpuport.c - - - - - machine.c - 1 - ..\..\..\libcpu\arm\arm926\machine.c - - - - - start_rvds.S - 2 - ..\..\..\libcpu\arm\arm926\start_rvds.S - - - - - stack.c - 1 - ..\..\..\libcpu\arm\arm926\stack.c - - - - - DeviceDrivers - - - audio.c - 1 - ..\..\..\components\drivers\audio\audio.c - - - - - audio_pipe.c - 1 - ..\..\..\components\drivers\audio\audio_pipe.c - - - - - can.c - 1 - ..\..\..\components\drivers\can\can.c - - - - - hwtimer.c - 1 - ..\..\..\components\drivers\hwtimer\hwtimer.c - - - - - i2c_core.c - 1 - ..\..\..\components\drivers\i2c\i2c_core.c - - - - - i2c_dev.c - 1 - ..\..\..\components\drivers\i2c\i2c_dev.c - - - - - i2c-bit-ops.c - 1 - ..\..\..\components\drivers\i2c\i2c-bit-ops.c - - - - - adc.c - 1 - ..\..\..\components\drivers\misc\adc.c - - - - - rt_drv_pwm.c - 1 - ..\..\..\components\drivers\misc\rt_drv_pwm.c - - - - - pin.c - 1 - ..\..\..\components\drivers\misc\pin.c - - - - - rt_inputcapture.c - 1 - ..\..\..\components\drivers\misc\rt_inputcapture.c - - - - - rtc.c - 1 - ..\..\..\components\drivers\rtc\rtc.c - - - - - alarm.c - 1 - ..\..\..\components\drivers\rtc\alarm.c - - - - - serial.c - 1 - ..\..\..\components\drivers\serial\serial.c - - - - - sfud.c - 1 - ..\..\..\components\drivers\spi\sfud\src\sfud.c - - - - - spi_core.c - 1 - ..\..\..\components\drivers\spi\spi_core.c - - - - - sfud_sfdp.c - 1 - ..\..\..\components\drivers\spi\sfud\src\sfud_sfdp.c - - - - - spi_dev.c - 1 - ..\..\..\components\drivers\spi\spi_dev.c - - - - - qspi_core.c - 1 - ..\..\..\components\drivers\spi\qspi_core.c - - - - - spi_flash_sfud.c - 1 - ..\..\..\components\drivers\spi\spi_flash_sfud.c - - - - - dataqueue.c - 1 - ..\..\..\components\drivers\src\dataqueue.c - - - - - ringblk_buf.c - 1 - ..\..\..\components\drivers\src\ringblk_buf.c - - - - - completion.c - 1 - ..\..\..\components\drivers\src\completion.c - - - - - workqueue.c - 1 - ..\..\..\components\drivers\src\workqueue.c - - - - - waitqueue.c - 1 - ..\..\..\components\drivers\src\waitqueue.c - - - - - ringbuffer.c - 1 - ..\..\..\components\drivers\src\ringbuffer.c - - - - - pipe.c - 1 - ..\..\..\components\drivers\src\pipe.c - - - - - touch.c - 1 - ..\..\..\components\drivers\touch\touch.c - - - - - watchdog.c - 1 - ..\..\..\components\drivers\watchdog\watchdog.c - - - - - - - --c99 - - - - - - - - - - Drivers - - - drv_common.c - 1 - ..\libraries\n9h30\rtt_port\drv_common.c - - - - - drv_can.c - 1 - ..\libraries\n9h30\rtt_port\drv_can.c - - - - - drv_emac.c - 1 - ..\libraries\n9h30\rtt_port\drv_emac.c - - - - - drv_timer.c - 1 - ..\libraries\n9h30\rtt_port\drv_timer.c - - - - - drv_pwm.c - 1 - ..\libraries\n9h30\rtt_port\drv_pwm.c - - - - - drv_usbd.c - 1 - ..\libraries\n9h30\rtt_port\drv_usbd.c - - - - - drv_usbhost.c - 1 - ..\libraries\n9h30\rtt_port\drv_usbhost.c - - - - - drv_crypto.c - 1 - ..\libraries\n9h30\rtt_port\drv_crypto.c - - - - - drv_systick.c - 1 - ..\libraries\n9h30\rtt_port\drv_systick.c - - - - - drv_gpio.c - 1 - ..\libraries\n9h30\rtt_port\drv_gpio.c - - - - - drv_scuart.c - 1 - ..\libraries\n9h30\rtt_port\drv_scuart.c - - - - - drv_etimer.c - 1 - ..\libraries\n9h30\rtt_port\drv_etimer.c - - - - - drv_wdt.c - 1 - ..\libraries\n9h30\rtt_port\drv_wdt.c - - - - - drv_adc.c - 1 - ..\libraries\n9h30\rtt_port\drv_adc.c - - - - - drv_qspi.c - 1 - ..\libraries\n9h30\rtt_port\drv_qspi.c - - - - - drv_i2s.c - 1 - ..\libraries\n9h30\rtt_port\drv_i2s.c - - - - - drv_sdh.c - 1 - ..\libraries\n9h30\rtt_port\drv_sdh.c - - - - - drv_i2c.c - 1 - ..\libraries\n9h30\rtt_port\drv_i2c.c - - - - - drv_softi2c.c - 1 - ..\libraries\n9h30\rtt_port\drv_softi2c.c - - - - - drv_uart.c - 1 - ..\libraries\n9h30\rtt_port\drv_uart.c - - - - - drv_etimer_capture.c - 1 - ..\libraries\n9h30\rtt_port\drv_etimer_capture.c - - - - - drv_vpost.c - 1 - ..\libraries\n9h30\rtt_port\drv_vpost.c - - - - - drv_adc_touch.c - 1 - ..\libraries\n9h30\rtt_port\drv_adc_touch.c - - - - - drv_rtc.c - 1 - ..\libraries\n9h30\rtt_port\drv_rtc.c - - - - - drv_sys.c - 1 - ..\libraries\n9h30\rtt_port\drv_sys.c - - - - - drv_jpegcodec.c - 1 - ..\libraries\n9h30\rtt_port\drv_jpegcodec.c - - - - - drv_ge2d.c - 1 - ..\libraries\n9h30\rtt_port\drv_ge2d.c - - - - - Filesystem - - - dfs_posix.c - 1 - ..\..\..\components\dfs\src\dfs_posix.c - - - - - dfs_fs.c - 1 - ..\..\..\components\dfs\src\dfs_fs.c - - - - - dfs.c - 1 - ..\..\..\components\dfs\src\dfs.c - - - - - dfs_file.c - 1 - ..\..\..\components\dfs\src\dfs_file.c - - - - - devfs.c - 1 - ..\..\..\components\dfs\filesystems\devfs\devfs.c - - - - - ff.c - 1 - ..\..\..\components\dfs\filesystems\elmfat\ff.c - - - - - dfs_elm.c - 1 - ..\..\..\components\dfs\filesystems\elmfat\dfs_elm.c - - - - - ffunicode.c - 1 - ..\..\..\components\dfs\filesystems\elmfat\ffunicode.c - - - - - Finsh - - - shell.c - 1 - ..\..\..\components\finsh\shell.c - - - - - msh.c - 1 - ..\..\..\components\finsh\msh.c - - - - - msh_file.c - 1 - ..\..\..\components\finsh\msh_file.c - - - - - cmd.c - 1 - ..\..\..\components\finsh\cmd.c - - - - - Kernel - - - timer.c - 1 - ..\..\..\src\timer.c - - - - - device.c - 1 - ..\..\..\src\device.c - - - - - object.c - 1 - ..\..\..\src\object.c - - - - - memheap.c - 1 - ..\..\..\src\memheap.c - - - - - thread.c - 1 - ..\..\..\src\thread.c - - - - - scheduler.c - 1 - ..\..\..\src\scheduler.c - - - - - ipc.c - 1 - ..\..\..\src\ipc.c - - - - - mem.c - 1 - ..\..\..\src\mem.c - - - - - clock.c - 1 - ..\..\..\src\clock.c - - - - - irq.c - 1 - ..\..\..\src\irq.c - - - - - signal.c - 1 - ..\..\..\src\signal.c - - - - - mempool.c - 1 - ..\..\..\src\mempool.c - - - - - idle.c - 1 - ..\..\..\src\idle.c - - - - - kservice.c - 1 - ..\..\..\src\kservice.c - - - - - components.c - 1 - ..\..\..\src\components.c - - - - - Libraries - - - nu_wwdt.c - 1 - ..\libraries\n9h30\Driver\Source\nu_wwdt.c - - - - - nu_lcd.c - 1 - ..\libraries\n9h30\Driver\Source\nu_lcd.c - - - - - nu_usbd.c - 1 - ..\libraries\n9h30\Driver\Source\nu_usbd.c - - - - - nu_i2s.c - 1 - ..\libraries\n9h30\Driver\Source\nu_i2s.c - - - - - nu_rtc.c - 1 - ..\libraries\n9h30\Driver\Source\nu_rtc.c - - - - - nu_pwm.c - 1 - ..\libraries\n9h30\Driver\Source\nu_pwm.c - - - - - nu_emac.c - 1 - ..\libraries\n9h30\Driver\Source\nu_emac.c - - - - - nu_sys.c - 1 - ..\libraries\n9h30\Driver\Source\nu_sys.c - - - - - nu_spi.c - 1 - ..\libraries\n9h30\Driver\Source\nu_spi.c - - - - - nu_etimer.c - 1 - ..\libraries\n9h30\Driver\Source\nu_etimer.c - - - - - nu_timer.c - 1 - ..\libraries\n9h30\Driver\Source\nu_timer.c - - - - - nu_can.c - 1 - ..\libraries\n9h30\Driver\Source\nu_can.c - - - - - nu_fmi.c - 1 - ..\libraries\n9h30\Driver\Source\nu_fmi.c - - - - - nu_gpio.c - 1 - ..\libraries\n9h30\Driver\Source\nu_gpio.c - - - - - nu_wdt.c - 1 - ..\libraries\n9h30\Driver\Source\nu_wdt.c - - - - - nu_scuart.c - 1 - ..\libraries\n9h30\Driver\Source\nu_scuart.c - - - - - nu_crypto.c - 1 - ..\libraries\n9h30\Driver\Source\nu_crypto.c - - - - - nu_uart.c - 1 - ..\libraries\n9h30\Driver\Source\nu_uart.c - - - - - nu_sdh.c - 1 - ..\libraries\n9h30\Driver\Source\nu_sdh.c - - - - - nu_cap.c - 1 - ..\libraries\n9h30\Driver\Source\nu_cap.c - - - - - LVGL-port - - - lv_port_disp.c - 1 - applications\lvgl\lv_port_disp.c - - - - - lv_port_indev.c - 1 - applications\lvgl\lv_port_indev.c - - - - - lv_demo.c - 1 - applications\lvgl\lv_demo.c - - - - - lwIP - - - netdb.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\api\netdb.c - - - - - ip.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\ip.c - - - - - autoip.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\ipv4\autoip.c - - - - - ethernet.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\netif\ethernet.c - - - - - netif.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\netif.c - - - - - sys.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\sys.c - - - - - sockets.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\api\sockets.c - - - - - netifapi.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\api\netifapi.c - - - - - tcpip.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\api\tcpip.c - - - - - ip4_addr.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\ipv4\ip4_addr.c - - - - - dhcp.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\ipv4\dhcp.c - - - - - init.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\init.c - - - - - ethernetif.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\netif\ethernetif.c - - - - - etharp.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\ipv4\etharp.c - - - - - memp.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\memp.c - - - - - ping.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\apps\ping\ping.c - - - - - ip4.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\ipv4\ip4.c - - - - - netbuf.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\api\netbuf.c - - - - - raw.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\raw.c - - - - - ip4_frag.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\ipv4\ip4_frag.c - - - - - tcp_out.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\tcp_out.c - - - - - lowpan6.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\netif\lowpan6.c - - - - - icmp.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\ipv4\icmp.c - - - - - api_lib.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\api\api_lib.c - - - - - inet_chksum.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\inet_chksum.c - - - - - stats.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\stats.c - - - - - err.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\api\err.c - - - - - tcp_in.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\tcp_in.c - - - - - dns.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\dns.c - - - - - sys_arch.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\arch\sys_arch.c - - - - - timeouts.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\timeouts.c - - - - - igmp.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\ipv4\igmp.c - - - - - udp.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\udp.c - - - - - pbuf.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\pbuf.c - - - - - def.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\def.c - - - - - api_msg.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\api\api_msg.c - - - - - tcp.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\tcp.c - - - - - n9h30_usbhostlib - - - ohci.c - 1 - ..\libraries\n9h30\UsbHostLib\src\ohci.c - - - - - usb_core.c - 1 - ..\libraries\n9h30\UsbHostLib\src\usb_core.c - - - - - mem_alloc.c - 1 - ..\libraries\n9h30\UsbHostLib\src\mem_alloc.c - - - - - support.c - 1 - ..\libraries\n9h30\UsbHostLib\src\support.c - - - - - ehci.c - 1 - ..\libraries\n9h30\UsbHostLib\src\ehci.c - - - - - ehci_iso.c - 1 - ..\libraries\n9h30\UsbHostLib\src\ehci_iso.c - - - - - nu_pkgs_nau8822 - - - audio_test.c - 1 - ..\libraries\nu_packages\AudioCodec\audio_test.c - - - - - acodec_nau8822.c - 1 - ..\libraries\nu_packages\AudioCodec\acodec_nau8822.c - - - - - POSIX - - - select.c - 1 - ..\..\..\components\libc\posix\io\select.c - - - - - poll.c - 1 - ..\..\..\components\libc\posix\io\poll\poll.c - - - - - rt_usbd - - - mstorage.c - 1 - ..\..\..\components\drivers\usb\usbdevice\class\mstorage.c - - - - - usbdevice_core.c - 1 - ..\..\..\components\drivers\usb\usbdevice\core\usbdevice_core.c - - - - - cdc_vcom.c - 1 - ..\..\..\components\drivers\usb\usbdevice\class\cdc_vcom.c - - - - - usbdevice.c - 1 - ..\..\..\components\drivers\usb\usbdevice\core\usbdevice.c - - - - - rt_usbh - - - mass.c - 1 - ..\..\..\components\drivers\usb\usbhost\class\mass.c - - - - - hub.c - 1 - ..\..\..\components\drivers\usb\usbhost\core\hub.c - - - - - usbhost.c - 1 - ..\..\..\components\drivers\usb\usbhost\core\usbhost.c - - - - - udisk.c - 1 - ..\..\..\components\drivers\usb\usbhost\class\udisk.c - - - - - usbhost_core.c - 1 - ..\..\..\components\drivers\usb\usbhost\core\usbhost_core.c - - - - - driver.c - 1 - ..\..\..\components\drivers\usb\usbhost\core\driver.c - - - - - SAL - - - netdev.c - 1 - ..\..\..\components\net\netdev\src\netdev.c - - - - - netdev_ipaddr.c - 1 - ..\..\..\components\net\netdev\src\netdev_ipaddr.c - - - - - sal_socket.c - 1 - ..\..\..\components\net\sal_socket\src\sal_socket.c - - - - - net_netdb.c - 1 - ..\..\..\components\net\sal_socket\socket\net_netdb.c - - - - - net_sockets.c - 1 - ..\..\..\components\net\sal_socket\socket\net_sockets.c - - - - - af_inet_lwip.c - 1 - ..\..\..\components\net\sal_socket\impl\af_inet_lwip.c - - - - - dfs_net.c - 1 - ..\..\..\components\net\sal_socket\dfs_net\dfs_net.c - - - - - UTest - - - utest.c - 1 - ..\..\..\components\utilities\utest\utest.c - - - - - - - - - - - -
diff --git a/bsp/nuvoton/nk-n9h30/rtconfig.h b/bsp/nuvoton/nk-n9h30/rtconfig.h deleted file mode 100644 index 1138f94322..0000000000 --- a/bsp/nuvoton/nk-n9h30/rtconfig.h +++ /dev/null @@ -1,422 +0,0 @@ -#ifndef RT_CONFIG_H__ -#define RT_CONFIG_H__ - -/* Automatically generated file; DO NOT EDIT. */ -/* RT-Thread Configuration */ - -/* RT-Thread Kernel */ - -#define RT_NAME_MAX 16 -#define RT_ALIGN_SIZE 4 -#define RT_THREAD_PRIORITY_32 -#define RT_THREAD_PRIORITY_MAX 32 -#define RT_TICK_PER_SECOND 1000 -#define RT_USING_OVERFLOW_CHECK -#define RT_USING_HOOK -#define RT_HOOK_USING_FUNC_PTR -#define RT_USING_IDLE_HOOK -#define RT_IDLE_HOOK_LIST_SIZE 4 -#define IDLE_THREAD_STACK_SIZE 2048 - -/* kservice optimization */ - -#define RT_DEBUG -#define RT_DEBUG_COLOR - -/* Inter-Thread communication */ - -#define RT_USING_SEMAPHORE -#define RT_USING_MUTEX -#define RT_USING_EVENT -#define RT_USING_MAILBOX -#define RT_USING_MESSAGEQUEUE -#define RT_USING_SIGNALS - -/* Memory Management */ - -#define RT_USING_MEMPOOL -#define RT_USING_SMALL_MEM -#define RT_USING_MEMHEAP -#define RT_MEMHEAP_FAST_MODE -#define RT_USING_SMALL_MEM_AS_HEAP -#define RT_USING_MEMTRACE -#define RT_USING_HEAP - -/* Kernel Device Object */ - -#define RT_USING_DEVICE -#define RT_USING_INTERRUPT_INFO -#define RT_USING_CONSOLE -#define RT_CONSOLEBUF_SIZE 256 -#define RT_CONSOLE_DEVICE_NAME "uart0" -#define RT_VER_NUM 0x40100 -#define ARCH_ARM -#define ARCH_ARM_ARM9 - -/* RT-Thread Components */ - -#define RT_USING_COMPONENTS_INIT -#define RT_USING_USER_MAIN -#define RT_MAIN_THREAD_STACK_SIZE 2048 -#define RT_MAIN_THREAD_PRIORITY 10 - -/* C++ features */ - - -/* Command shell */ - -#define RT_USING_FINSH -#define RT_USING_MSH -#define FINSH_USING_MSH -#define FINSH_THREAD_NAME "tshell" -#define FINSH_THREAD_PRIORITY 20 -#define FINSH_THREAD_STACK_SIZE 4096 -#define FINSH_USING_HISTORY -#define FINSH_HISTORY_LINES 5 -#define FINSH_USING_SYMTAB -#define FINSH_CMD_SIZE 80 -#define MSH_USING_BUILT_IN_COMMANDS -#define FINSH_USING_DESCRIPTION -#define FINSH_ARG_MAX 10 - -/* Device virtual file system */ - -#define RT_USING_DFS -#define DFS_USING_POSIX -#define DFS_USING_WORKDIR -#define DFS_FILESYSTEMS_MAX 16 -#define DFS_FILESYSTEM_TYPES_MAX 16 -#define DFS_FD_MAX 64 -#define RT_USING_DFS_MNTTABLE -#define RT_USING_DFS_ELMFAT - -/* elm-chan's FatFs, Generic FAT Filesystem Module */ - -#define RT_DFS_ELM_CODE_PAGE 437 -#define RT_DFS_ELM_WORD_ACCESS -#define RT_DFS_ELM_USE_LFN_3 -#define RT_DFS_ELM_USE_LFN 3 -#define RT_DFS_ELM_LFN_UNICODE_0 -#define RT_DFS_ELM_LFN_UNICODE 0 -#define RT_DFS_ELM_MAX_LFN 255 -#define RT_DFS_ELM_DRIVES 8 -#define RT_DFS_ELM_MAX_SECTOR_SIZE 4096 -#define RT_DFS_ELM_REENTRANT -#define RT_DFS_ELM_MUTEX_TIMEOUT 3000 -#define RT_USING_DFS_DEVFS - -/* Device Drivers */ - -#define RT_USING_DEVICE_IPC -#define RT_USING_SYSTEM_WORKQUEUE -#define RT_SYSTEM_WORKQUEUE_STACKSIZE 2048 -#define RT_SYSTEM_WORKQUEUE_PRIORITY 23 -#define RT_USING_SERIAL -#define RT_USING_SERIAL_V1 -#define RT_SERIAL_RB_BUFSZ 2048 -#define RT_USING_CAN -#define RT_USING_HWTIMER -#define RT_USING_I2C -#define RT_USING_I2C_BITOPS -#define RT_USING_PIN -#define RT_USING_ADC -#define RT_USING_PWM -#define RT_USING_RTC -#define RT_USING_ALARM -#define RT_USING_SPI -#define RT_USING_QSPI -#define RT_USING_SFUD -#define RT_SFUD_USING_SFDP -#define RT_SFUD_USING_FLASH_INFO_TABLE -#define RT_SFUD_USING_QSPI -#define RT_SFUD_SPI_MAX_HZ 50000000 -#define RT_USING_WDT -#define RT_USING_AUDIO -#define RT_AUDIO_REPLAY_MP_BLOCK_SIZE 4096 -#define RT_AUDIO_REPLAY_MP_BLOCK_COUNT 2 -#define RT_AUDIO_RECORD_PIPE_SIZE 2048 -#define RT_USING_TOUCH -#define RT_USING_INPUT_CAPTURE -#define RT_INPUT_CAPTURE_RB_SIZE 100 - -/* Using USB */ - -#define RT_USING_USB -#define RT_USING_USB_HOST -#define RT_USBH_MSTORAGE -#define UDISK_MOUNTPOINT "/mnt/udisk" -#define RT_USING_USB_DEVICE -#define RT_USBD_THREAD_STACK_SZ 4096 -#define USB_VENDOR_ID 0x0FFE -#define USB_PRODUCT_ID 0x0001 -#define RT_USB_DEVICE_COMPOSITE -#define RT_USB_DEVICE_CDC -#define RT_USB_DEVICE_NONE -#define RT_USB_DEVICE_MSTORAGE -#define RT_VCOM_TASK_STK_SIZE 512 -#define RT_CDC_RX_BUFSIZE 128 -#define RT_VCOM_SERNO "32021919830108" -#define RT_VCOM_SER_LEN 14 -#define RT_VCOM_TX_TIMEOUT 1000 -#define RT_USB_MSTORAGE_DISK_NAME "ramdisk1" - -/* POSIX layer and C standard library */ - -#define RT_LIBC_DEFAULT_TIMEZONE 8 - -/* POSIX (Portable Operating System Interface) layer */ - -#define RT_USING_POSIX_FS -#define RT_USING_POSIX_DEVIO -#define RT_USING_POSIX_POLL -#define RT_USING_POSIX_SELECT - -/* Interprocess Communication (IPC) */ - - -/* Socket is in the 'Network' category */ - -/* Network */ - -/* Socket abstraction layer */ - -#define RT_USING_SAL -#define SAL_INTERNET_CHECK - -/* protocol stack implement */ - -#define SAL_USING_LWIP -#define SAL_USING_POSIX - -/* Network interface device */ - -#define RT_USING_NETDEV -#define NETDEV_USING_IFCONFIG -#define NETDEV_USING_PING -#define NETDEV_USING_NETSTAT -#define NETDEV_USING_AUTO_DEFAULT -#define NETDEV_IPV4 1 -#define NETDEV_IPV6 0 - -/* light weight TCP/IP stack */ - -#define RT_USING_LWIP -#define RT_USING_LWIP202 -#define RT_LWIP_MEM_ALIGNMENT 4 -#define RT_LWIP_IGMP -#define RT_LWIP_ICMP -#define RT_LWIP_DNS -#define RT_LWIP_DHCP -#define IP_SOF_BROADCAST 1 -#define IP_SOF_BROADCAST_RECV 1 - -/* Static IPv4 Address */ - -#define RT_LWIP_IPADDR "192.168.1.30" -#define RT_LWIP_GWADDR "192.168.1.1" -#define RT_LWIP_MSKADDR "255.255.255.0" -#define RT_LWIP_UDP -#define RT_LWIP_TCP -#define RT_LWIP_RAW -#define RT_MEMP_NUM_NETCONN 32 -#define RT_LWIP_PBUF_NUM 256 -#define RT_LWIP_RAW_PCB_NUM 32 -#define RT_LWIP_UDP_PCB_NUM 32 -#define RT_LWIP_TCP_PCB_NUM 32 -#define RT_LWIP_TCP_SEG_NUM 256 -#define RT_LWIP_TCP_SND_BUF 32768 -#define RT_LWIP_TCP_WND 10240 -#define RT_LWIP_TCPTHREAD_PRIORITY 10 -#define RT_LWIP_TCPTHREAD_MBOX_SIZE 32 -#define RT_LWIP_TCPTHREAD_STACKSIZE 4096 -#define RT_LWIP_ETHTHREAD_PRIORITY 12 -#define RT_LWIP_ETHTHREAD_STACKSIZE 1024 -#define RT_LWIP_ETHTHREAD_MBOX_SIZE 32 -#define LWIP_NETIF_STATUS_CALLBACK 1 -#define LWIP_NETIF_LINK_CALLBACK 1 -#define SO_REUSE 1 -#define LWIP_SO_RCVTIMEO 1 -#define LWIP_SO_SNDTIMEO 1 -#define LWIP_SO_RCVBUF 1 -#define LWIP_SO_LINGER 0 -#define RT_LWIP_NETIF_LOOPBACK -#define LWIP_NETIF_LOOPBACK 1 -#define RT_LWIP_STATS -#define RT_LWIP_USING_PING - -/* AT commands */ - - -/* VBUS(Virtual Software BUS) */ - - -/* Utilities */ - -#define RT_USING_UTEST -#define UTEST_THR_STACK_SIZE 4096 -#define UTEST_THR_PRIORITY 20 - -/* RT-Thread Utestcases */ - - -/* RT-Thread online packages */ - -/* IoT - internet of things */ - - -/* Wi-Fi */ - -/* Marvell WiFi */ - - -/* Wiced WiFi */ - - -/* IoT Cloud */ - - -/* security packages */ - - -/* language packages */ - - -/* multimedia packages */ - -/* LVGL: powerful and easy-to-use embedded GUI library */ - -#define PKG_USING_LVGL -#define PKG_USING_LVGL_V810 -#define PKG_LVGL_VER_NUM 0x08010 -#define PKG_USING_LV_MUSIC_DEMO - -/* u8g2: a monochrome graphic library */ - - -/* PainterEngine: A cross-platform graphics application framework written in C language */ - - -/* tools packages */ - - -/* system packages */ - -/* enhanced kernel services */ - - -/* POSIX extension functions */ - - -/* acceleration: Assembly language or algorithmic acceleration packages */ - - -/* CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */ - - -/* Micrium: Micrium software products porting for RT-Thread */ - -#define PKG_USING_FAL -#define FAL_DEBUG_CONFIG -#define FAL_DEBUG 1 -#define FAL_PART_HAS_TABLE_CFG -#define FAL_USING_SFUD_PORT -#define FAL_USING_NOR_FLASH_DEV_NAME "norflash0" -#define PKG_USING_FAL_LATEST_VERSION -#define PKG_FAL_VER_NUM 0x99999 -#define PKG_USING_RAMDISK -#define PKG_USING_RAMDISK_LATEST_VERSION - -/* peripheral libraries and drivers */ - - -/* AI packages */ - - -/* miscellaneous packages */ - -/* samples: kernel and components samples */ - - -/* entertainment: terminal games and other interesting software packages */ - - -/* Nuvoton Packages Config */ - -#define NU_PKG_USING_UTILS -#define NU_PKG_USING_NAU8822 - -/* Hardware Drivers Config */ - -/* On-chip Peripheral Drivers */ - -#define SOC_SERIES_N9H30 -#define BSP_USING_MMU -#define BSP_USING_GPIO -#define BSP_USING_EMAC -#define BSP_USING_EMAC0 -#define BSP_USING_EMAC1 -#define BSP_USING_RTC -#define BSP_USING_ADC -#define BSP_USING_ADC_TOUCH -#define BSP_USING_ETMR -#define BSP_USING_ETIMER -#define BSP_USING_ETIMER_CAPTURE -#define BSP_USING_ETMR0 -#define BSP_USING_ETIMER0 -#define BSP_USING_ETMR1 -#define BSP_USING_ETIMER1 -#define BSP_USING_ETMR2 -#define BSP_USING_ETIMER2_CAPTURE -#define BSP_USING_ETMR3 -#define BSP_USING_ETIMER3_CAPTURE -#define BSP_USING_TMR -#define BSP_USING_TIMER -#define BSP_USING_TIMER0 -#define BSP_USING_TIMER1 -#define BSP_USING_TIMER2 -#define BSP_USING_TIMER3 -#define BSP_USING_UART -#define BSP_USING_UART0 -#define BSP_USING_I2C -#define BSP_USING_I2C0 -#define BSP_USING_SDH -#define BSP_USING_SDH0 -#define BSP_USING_SDH1 -#define NU_SDH_HOTPLUG -#define BSP_USING_CAN -#define BSP_USING_CAN0 -#define BSP_USING_PWM -#define BSP_USING_PWM0 -#define BSP_USING_QSPI -#define BSP_USING_QSPI0 -#define BSP_USING_QSPI1_NONE -#define BSP_USING_I2S -#define NU_I2S_DMA_FIFO_SIZE 2048 -#define BSP_USING_WDT -#define BSP_USING_EBI -#define BSP_USING_VPOST -#define LCM_USING_FW070TFT -#define VPOST_USING_LCD_IDX 3 -#define BSP_LCD_BPP 32 -#define BSP_LCD_WIDTH 800 -#define BSP_LCD_HEIGHT 480 -#define BSP_USING_VPOST_OSD -#define BSP_USING_USBD -#define BSP_USING_USBH - -/* On-board Peripheral Drivers */ - -#define BSP_USING_CONSOLE -#define BOARD_USING_IP101GR -#define BOARD_USING_NAU8822 -#define BOARD_USING_STORAGE_SDCARD -#define BOARD_USING_STORAGE_SPIFLASH -#define BOARD_USING_BUZZER -#define BOARD_USING_LCM -#define BOARD_USING_USB0_DEVICE_HOST -#define BOARD_USING_USB1_HOST - -/* Board extended module drivers */ - - -#endif diff --git a/bsp/nuvoton/nk-n9h30/rtconfig.py b/bsp/nuvoton/nk-n9h30/rtconfig.py index 79a4da1d49..cdca30ea1a 100644 --- a/bsp/nuvoton/nk-n9h30/rtconfig.py +++ b/bsp/nuvoton/nk-n9h30/rtconfig.py @@ -85,4 +85,10 @@ elif PLATFORM == 'armcc': CFLAGS += ' -O2' POST_ACTION = 'fromelf --bin $TARGET --output ' + TARGET_NAME + ' \n' - POST_ACTION += 'fromelf -z $TARGET\n' \ No newline at end of file + POST_ACTION += 'fromelf -z $TARGET\n' +def dist_handle(BSP_ROOT, dist_dir): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT, dist_dir) diff --git a/bsp/nuvoton/nk-rtu980/.config b/bsp/nuvoton/nk-rtu980/.config index 853e905aed..566468f589 100644 --- a/bsp/nuvoton/nk-rtu980/.config +++ b/bsp/nuvoton/nk-rtu980/.config @@ -974,3 +974,5 @@ CONFIG_BOARD_USING_USB0_DEVICE_HOST=y # Board extended module drivers # CONFIG_BOARD_USING_IP101GR=y +CONFIG_BOARD_USE_UTEST=y +CONFIG_UTEST_CMD_PREFIX="bsp.nuvoton.nk-rtu980.test.utest." diff --git a/bsp/nuvoton/nk-rtu980/Kconfig b/bsp/nuvoton/nk-rtu980/Kconfig index 5c55e87c61..b396340d12 100644 --- a/bsp/nuvoton/nk-rtu980/Kconfig +++ b/bsp/nuvoton/nk-rtu980/Kconfig @@ -18,12 +18,6 @@ config PKGS_DIR option env="PKGS_ROOT" default "packages" -config NU_PKGS_DIR - string - option env="NU_PKGS_ROOT" - default "../libraries/nu_packages" - source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" -source "$NU_PKGS_DIR/Kconfig" source "$BSP_DIR/board/Kconfig" diff --git a/bsp/nuvoton/nk-rtu980/board/Kconfig b/bsp/nuvoton/nk-rtu980/board/Kconfig index 2682f8b89f..04cc595e7a 100644 --- a/bsp/nuvoton/nk-rtu980/board/Kconfig +++ b/bsp/nuvoton/nk-rtu980/board/Kconfig @@ -44,5 +44,6 @@ menu "Hardware Drivers Config" endmenu + source "$BSP_DIR/../libraries/nu_packages/Kconfig" endmenu diff --git a/bsp/nuvoton/nk-rtu980/project.uvproj b/bsp/nuvoton/nk-rtu980/project.uvproj deleted file mode 100644 index 9c0d498aed..0000000000 --- a/bsp/nuvoton/nk-rtu980/project.uvproj +++ /dev/null @@ -1,1774 +0,0 @@ - - - 1.1 -
### uVision Project, (C) Keil Software
- - - rtthread - 0x4 - ARM-ADS - - - Nuvoton_ARM9_Series - Nuvoton - - - - - 0 - - - - - - - - - - - - 0 - - - - Atmel\SAM9260\ - Atmel\SAM9260\ - - 0 - 0 - 0 - 0 - 1 - - .\Objects\ - rtthread - 1 - 0 - 0 - 1 - 1 - .\Listings\ - 1 - 0 - 0 - - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 0 - 0 - - - 0 - 0 - - - 0 - 0 - - - 0 - 0 - - 0 - - - - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 3 - - - - - SARM.DLL - -cAT91SAM9 - DARMATS9.DLL - -p91SAM9260 - SARM.DLL - - TARMATS9.DLL - -p91SAM9260 - - - - 1 - 0 - 0 - 0 - 16 - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - - - 1 - 0 - 0 - 1 - 1 - 1 - 0 - 1 - 1 - - 0 - 6 - - - - - - - - - - - - - ..\libraries\nuc980\Script\NUC980xx61.ini - Segger\JLTAgdi.dll - - - - - 1 - 0 - 0 - 0 - 1 - 4098 - - 0 - Segger\JLTAgdi.dll - "" () - - - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 1 - 0 - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 3 - 3 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x200000 - 0x1000 - - - 1 - 0x100000 - 0x8000 - - - 0 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - - - - 1 - 3 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 2 - 0 - 0 - - --c99 - __RTTHREAD__, RT_USING_ARM_LIBC, __CLK_TCK=RT_TICK_PER_SECOND - - applications;.;board;..\..\..\components\libc\compilers\common;..\..\..\components\libc\compilers\common\nogcc;..\..\..\libcpu\arm\common;..\..\..\libcpu\arm\arm926;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\hwcrypto;.;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\spi;..\..\..\components\drivers\include;..\..\..\components\drivers\spi\sfud\inc;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\libraries\nuc980\rtt_port;..\..\..\components\dfs\include;..\..\..\components\dfs\filesystems\devfs;..\..\..\components\dfs\filesystems\elmfat;..\..\..\components\finsh;.;..\..\..\include;..\libraries\nuc980\Driver\Include;..\..\..\components\net\lwip-2.1.2\src;..\..\..\components\net\lwip-2.1.2\src\include;..\..\..\components\net\lwip-2.1.2\src\arch\include;..\..\..\components\net\lwip-2.1.2\src\include\netif;..\libraries\nu_packages\Demo;..\libraries\nuc980\UsbHostLib\inc;..\libraries\nu_packages\NuUtils\inc;..\..\..\components\libc\posix\io;..\..\..\components\libc\posix\io\poll;..\..\..\components\libc\posix\ipc;..\..\..\components\drivers\usb\usbdevice;..\..\..\components\drivers\usb\usbhost;..\..\..\components\drivers\usb\usbhost\class;..\..\..\components\drivers\usb\usbhost\core;..\..\..\components\drivers\usb\usbhost\include;..\..\..\components\drivers\include;..\..\..\components\net\netdev\include;..\..\..\components\net\sal_socket\include;..\..\..\components\net\sal_socket\include\socket;..\..\..\components\net\sal_socket\impl;..\..\..\components\net\sal_socket\include\dfs_net;..\..\..\components\net\sal_socket\include\socket\sys_socket;..\..\..\components\utilities\utest;..\..\..\examples\utest\testcases\kernel - - - - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - - - - 0 - 0 - 0 - 0 - 1 - 0 - 0x20000000 - 0x20800000 - .\linking_scripts\nuc980.sct - - - - - - - - - - - Applications - - - mnt.c - 1 - applications\mnt.c - - - - - main.c - 1 - applications\main.c - - - - - board - - - board_dev.c - 1 - board\board_dev.c - - - - - nu_pin_init.c - 1 - board\nu_pin_init.c - - - - - Compiler - - - libc_syms.c - 1 - ..\..\..\components\libc\compilers\armlibc\libc_syms.c - - - - - syscall_mem.c - 1 - ..\..\..\components\libc\compilers\armlibc\syscall_mem.c - - - - - syscalls.c - 1 - ..\..\..\components\libc\compilers\armlibc\syscalls.c - - - - - stdlib.c - 1 - ..\..\..\components\libc\compilers\common\stdlib.c - - - - - time.c - 1 - ..\..\..\components\libc\compilers\common\time.c - - - - - CPU - - - div0.c - 1 - ..\..\..\libcpu\arm\common\div0.c - - - - - showmem.c - 1 - ..\..\..\libcpu\arm\common\showmem.c - - - - - backtrace.c - 1 - ..\..\..\libcpu\arm\common\backtrace.c - - - - - cpuport.c - 1 - ..\..\..\libcpu\arm\arm926\cpuport.c - - - - - context_rvds.S - 2 - ..\..\..\libcpu\arm\arm926\context_rvds.S - - - - - start_rvds.S - 2 - ..\..\..\libcpu\arm\arm926\start_rvds.S - - - - - stack.c - 1 - ..\..\..\libcpu\arm\arm926\stack.c - - - - - machine.c - 1 - ..\..\..\libcpu\arm\arm926\machine.c - - - - - trap.c - 1 - ..\..\..\libcpu\arm\arm926\trap.c - - - - - mmu.c - 1 - ..\..\..\libcpu\arm\arm926\mmu.c - - - - - DeviceDrivers - - - can.c - 1 - ..\..\..\components\drivers\can\can.c - - - - - cputime.c - 1 - ..\..\..\components\drivers\cputime\cputime.c - - - - - hw_symmetric.c - 1 - ..\..\..\components\drivers\hwcrypto\hw_symmetric.c - - - - - hwcrypto.c - 1 - ..\..\..\components\drivers\hwcrypto\hwcrypto.c - - - - - hw_rng.c - 1 - ..\..\..\components\drivers\hwcrypto\hw_rng.c - - - - - hw_hash.c - 1 - ..\..\..\components\drivers\hwcrypto\hw_hash.c - - - - - hwtimer.c - 1 - ..\..\..\components\drivers\hwtimer\hwtimer.c - - - - - i2c_core.c - 1 - ..\..\..\components\drivers\i2c\i2c_core.c - - - - - i2c_dev.c - 1 - ..\..\..\components\drivers\i2c\i2c_dev.c - - - - - i2c-bit-ops.c - 1 - ..\..\..\components\drivers\i2c\i2c-bit-ops.c - - - - - adc.c - 1 - ..\..\..\components\drivers\misc\adc.c - - - - - pin.c - 1 - ..\..\..\components\drivers\misc\pin.c - - - - - serial.c - 1 - ..\..\..\components\drivers\serial\serial.c - - - - - sfud.c - 1 - ..\..\..\components\drivers\spi\sfud\src\sfud.c - - - - - spi_core.c - 1 - ..\..\..\components\drivers\spi\spi_core.c - - - - - sfud_sfdp.c - 1 - ..\..\..\components\drivers\spi\sfud\src\sfud_sfdp.c - - - - - spi_dev.c - 1 - ..\..\..\components\drivers\spi\spi_dev.c - - - - - qspi_core.c - 1 - ..\..\..\components\drivers\spi\qspi_core.c - - - - - spi_flash_sfud.c - 1 - ..\..\..\components\drivers\spi\spi_flash_sfud.c - - - - - ringbuffer.c - 1 - ..\..\..\components\drivers\src\ringbuffer.c - - - - - dataqueue.c - 1 - ..\..\..\components\drivers\src\dataqueue.c - - - - - workqueue.c - 1 - ..\..\..\components\drivers\src\workqueue.c - - - - - waitqueue.c - 1 - ..\..\..\components\drivers\src\waitqueue.c - - - - - pipe.c - 1 - ..\..\..\components\drivers\src\pipe.c - - - - - completion.c - 1 - ..\..\..\components\drivers\src\completion.c - - - - - ringblk_buf.c - 1 - ..\..\..\components\drivers\src\ringblk_buf.c - - - - - watchdog.c - 1 - ..\..\..\components\drivers\watchdog\watchdog.c - - - - - - - --c99 - - - - - - - - - - Drivers - - - drv_uart.c - 1 - ..\libraries\nuc980\rtt_port\drv_uart.c - - - - - drv_pwm.c - 1 - ..\libraries\nuc980\rtt_port\drv_pwm.c - - - - - drv_ebi.c - 1 - ..\libraries\nuc980\rtt_port\drv_ebi.c - - - - - drv_i2c.c - 1 - ..\libraries\nuc980\rtt_port\drv_i2c.c - - - - - drv_rtc.c - 1 - ..\libraries\nuc980\rtt_port\drv_rtc.c - - - - - drv_common.c - 1 - ..\libraries\nuc980\rtt_port\drv_common.c - - - - - drv_usbd.c - 1 - ..\libraries\nuc980\rtt_port\drv_usbd.c - - - - - drv_crypto.c - 1 - ..\libraries\nuc980\rtt_port\drv_crypto.c - - - - - drv_usbhost.c - 1 - ..\libraries\nuc980\rtt_port\drv_usbhost.c - - - - - drv_gpio.c - 1 - ..\libraries\nuc980\rtt_port\drv_gpio.c - - - - - drv_softi2c.c - 1 - ..\libraries\nuc980\rtt_port\drv_softi2c.c - - - - - drv_spi.c - 1 - ..\libraries\nuc980\rtt_port\drv_spi.c - - - - - drv_pdma.c - 1 - ..\libraries\nuc980\rtt_port\drv_pdma.c - - - - - drv_sdh.c - 1 - ..\libraries\nuc980\rtt_port\drv_sdh.c - - - - - drv_emac.c - 1 - ..\libraries\nuc980\rtt_port\drv_emac.c - - - - - drv_etimer.c - 1 - ..\libraries\nuc980\rtt_port\drv_etimer.c - - - - - drv_wdt.c - 1 - ..\libraries\nuc980\rtt_port\drv_wdt.c - - - - - drv_scuart.c - 1 - ..\libraries\nuc980\rtt_port\drv_scuart.c - - - - - drv_i2s.c - 1 - ..\libraries\nuc980\rtt_port\drv_i2s.c - - - - - drv_sys.c - 1 - ..\libraries\nuc980\rtt_port\drv_sys.c - - - - - drv_systick.c - 1 - ..\libraries\nuc980\rtt_port\drv_systick.c - - - - - drv_etimer_capture.c - 1 - ..\libraries\nuc980\rtt_port\drv_etimer_capture.c - - - - - drv_adc.c - 1 - ..\libraries\nuc980\rtt_port\drv_adc.c - - - - - drv_can.c - 1 - ..\libraries\nuc980\rtt_port\drv_can.c - - - - - drv_qspi.c - 1 - ..\libraries\nuc980\rtt_port\drv_qspi.c - - - - - Filesystem - - - dfs_posix.c - 1 - ..\..\..\components\dfs\src\dfs_posix.c - - - - - dfs_fs.c - 1 - ..\..\..\components\dfs\src\dfs_fs.c - - - - - dfs.c - 1 - ..\..\..\components\dfs\src\dfs.c - - - - - dfs_file.c - 1 - ..\..\..\components\dfs\src\dfs_file.c - - - - - devfs.c - 1 - ..\..\..\components\dfs\filesystems\devfs\devfs.c - - - - - dfs_elm.c - 1 - ..\..\..\components\dfs\filesystems\elmfat\dfs_elm.c - - - - - ffunicode.c - 1 - ..\..\..\components\dfs\filesystems\elmfat\ffunicode.c - - - - - ff.c - 1 - ..\..\..\components\dfs\filesystems\elmfat\ff.c - - - - - Finsh - - - shell.c - 1 - ..\..\..\components\finsh\shell.c - - - - - msh.c - 1 - ..\..\..\components\finsh\msh.c - - - - - msh_file.c - 1 - ..\..\..\components\finsh\msh_file.c - - - - - cmd.c - 1 - ..\..\..\components\finsh\cmd.c - - - - - Kernel - - - irq.c - 1 - ..\..\..\src\irq.c - - - - - device.c - 1 - ..\..\..\src\device.c - - - - - clock.c - 1 - ..\..\..\src\clock.c - - - - - object.c - 1 - ..\..\..\src\object.c - - - - - signal.c - 1 - ..\..\..\src\signal.c - - - - - memheap.c - 1 - ..\..\..\src\memheap.c - - - - - idle.c - 1 - ..\..\..\src\idle.c - - - - - mempool.c - 1 - ..\..\..\src\mempool.c - - - - - ipc.c - 1 - ..\..\..\src\ipc.c - - - - - thread.c - 1 - ..\..\..\src\thread.c - - - - - kservice.c - 1 - ..\..\..\src\kservice.c - - - - - components.c - 1 - ..\..\..\src\components.c - - - - - scheduler.c - 1 - ..\..\..\src\scheduler.c - - - - - mem.c - 1 - ..\..\..\src\mem.c - - - - - timer.c - 1 - ..\..\..\src\timer.c - - - - - Libraries - - - nu_sys.c - 1 - ..\libraries\nuc980\Driver\Source\nu_sys.c - - - - - nu_rtc.c - 1 - ..\libraries\nuc980\Driver\Source\nu_rtc.c - - - - - nu_spi.c - 1 - ..\libraries\nuc980\Driver\Source\nu_spi.c - - - - - nu_etimer.c - 1 - ..\libraries\nuc980\Driver\Source\nu_etimer.c - - - - - nu_ebi.c - 1 - ..\libraries\nuc980\Driver\Source\nu_ebi.c - - - - - nu_sdh.c - 1 - ..\libraries\nuc980\Driver\Source\nu_sdh.c - - - - - nu_uart.c - 1 - ..\libraries\nuc980\Driver\Source\nu_uart.c - - - - - nu_wdt.c - 1 - ..\libraries\nuc980\Driver\Source\nu_wdt.c - - - - - nu_i2c.c - 1 - ..\libraries\nuc980\Driver\Source\nu_i2c.c - - - - - nu_wwdt.c - 1 - ..\libraries\nuc980\Driver\Source\nu_wwdt.c - - - - - nu_gpio.c - 1 - ..\libraries\nuc980\Driver\Source\nu_gpio.c - - - - - nu_i2s.c - 1 - ..\libraries\nuc980\Driver\Source\nu_i2s.c - - - - - nu_can.c - 1 - ..\libraries\nuc980\Driver\Source\nu_can.c - - - - - nu_emac.c - 1 - ..\libraries\nuc980\Driver\Source\nu_emac.c - - - - - nu_crypto.c - 1 - ..\libraries\nuc980\Driver\Source\nu_crypto.c - - - - - nu_pdma.c - 1 - ..\libraries\nuc980\Driver\Source\nu_pdma.c - - - - - nu_usbd.c - 1 - ..\libraries\nuc980\Driver\Source\nu_usbd.c - - - - - nu_cap.c - 1 - ..\libraries\nuc980\Driver\Source\nu_cap.c - - - - - nu_scuart.c - 1 - ..\libraries\nuc980\Driver\Source\nu_scuart.c - - - - - nu_qspi.c - 1 - ..\libraries\nuc980\Driver\Source\nu_qspi.c - - - - - lwIP - - - netdb.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\api\netdb.c - - - - - ip.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\ip.c - - - - - autoip.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\ipv4\autoip.c - - - - - ethernet.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\netif\ethernet.c - - - - - netif.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\netif.c - - - - - sys.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\sys.c - - - - - sockets.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\api\sockets.c - - - - - altcp_alloc.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\altcp_alloc.c - - - - - netifapi.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\api\netifapi.c - - - - - tcpip.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\api\tcpip.c - - - - - ip4_addr.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\ipv4\ip4_addr.c - - - - - dhcp.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\ipv4\dhcp.c - - - - - init.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\init.c - - - - - ethernetif.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\netif\ethernetif.c - - - - - etharp.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\ipv4\etharp.c - - - - - memp.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\memp.c - - - - - ip4.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\ipv4\ip4.c - - - - - netbuf.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\api\netbuf.c - - - - - raw.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\raw.c - - - - - ip4_frag.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\ipv4\ip4_frag.c - - - - - tcp_out.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\tcp_out.c - - - - - lowpan6.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\netif\lowpan6.c - - - - - icmp.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\ipv4\icmp.c - - - - - api_lib.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\api\api_lib.c - - - - - inet_chksum.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\inet_chksum.c - - - - - stats.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\stats.c - - - - - err.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\api\err.c - - - - - altcp.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\altcp.c - - - - - tcp_in.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\tcp_in.c - - - - - dns.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\dns.c - - - - - sys_arch.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\arch\sys_arch.c - - - - - timeouts.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\timeouts.c - - - - - igmp.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\ipv4\igmp.c - - - - - udp.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\udp.c - - - - - altcp_tcp.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\altcp_tcp.c - - - - - pbuf.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\pbuf.c - - - - - def.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\def.c - - - - - api_msg.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\api\api_msg.c - - - - - ping.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\apps\ping\ping.c - - - - - if_api.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\api\if_api.c - - - - - tcp.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\tcp.c - - - - - nu_pkgs_demo - - - usbd_cdc_vcom_echo.c - 1 - ..\libraries\nu_packages\Demo\usbd_cdc_vcom_echo.c - - - - - slcd_show_tick.c - 1 - ..\libraries\nu_packages\Demo\slcd_show_tick.c - - - - - usbd_hid_dance_mouse.c - 1 - ..\libraries\nu_packages\Demo\usbd_hid_dance_mouse.c - - - - - nuc980_usbhostlib - - - support.c - 1 - ..\libraries\nuc980\UsbHostLib\src\support.c - - - - - ehci.c - 1 - ..\libraries\nuc980\UsbHostLib\src\ehci.c - - - - - ehci_iso.c - 1 - ..\libraries\nuc980\UsbHostLib\src\ehci_iso.c - - - - - mem_alloc.c - 1 - ..\libraries\nuc980\UsbHostLib\src\mem_alloc.c - - - - - usb_core.c - 1 - ..\libraries\nuc980\UsbHostLib\src\usb_core.c - - - - - ohci.c - 1 - ..\libraries\nuc980\UsbHostLib\src\ohci.c - - - - - POSIX - - - select.c - 1 - ..\..\..\components\libc\posix\io\select.c - - - - - poll.c - 1 - ..\..\..\components\libc\posix\io\poll\poll.c - - - - - rt_usbd - - - cdc_vcom.c - 1 - ..\..\..\components\drivers\usb\usbdevice\class\cdc_vcom.c - - - - - usbdevice_core.c - 1 - ..\..\..\components\drivers\usb\usbdevice\core\usbdevice_core.c - - - - - usbdevice.c - 1 - ..\..\..\components\drivers\usb\usbdevice\core\usbdevice.c - - - - - mstorage.c - 1 - ..\..\..\components\drivers\usb\usbdevice\class\mstorage.c - - - - - rt_usbh - - - hub.c - 1 - ..\..\..\components\drivers\usb\usbhost\core\hub.c - - - - - usbhost.c - 1 - ..\..\..\components\drivers\usb\usbhost\core\usbhost.c - - - - - mass.c - 1 - ..\..\..\components\drivers\usb\usbhost\class\mass.c - - - - - usbhost_core.c - 1 - ..\..\..\components\drivers\usb\usbhost\core\usbhost_core.c - - - - - udisk.c - 1 - ..\..\..\components\drivers\usb\usbhost\class\udisk.c - - - - - driver.c - 1 - ..\..\..\components\drivers\usb\usbhost\core\driver.c - - - - - SAL - - - netdev.c - 1 - ..\..\..\components\net\netdev\src\netdev.c - - - - - netdev_ipaddr.c - 1 - ..\..\..\components\net\netdev\src\netdev_ipaddr.c - - - - - net_netdb.c - 1 - ..\..\..\components\net\sal_socket\socket\net_netdb.c - - - - - af_inet_lwip.c - 1 - ..\..\..\components\net\sal_socket\impl\af_inet_lwip.c - - - - - dfs_net.c - 1 - ..\..\..\components\net\sal_socket\dfs_net\dfs_net.c - - - - - sal_socket.c - 1 - ..\..\..\components\net\sal_socket\src\sal_socket.c - - - - - net_sockets.c - 1 - ..\..\..\components\net\sal_socket\socket\net_sockets.c - - - - - UTest - - - utest.c - 1 - ..\..\..\components\utilities\utest\utest.c - - - - - - -
diff --git a/bsp/nuvoton/nk-rtu980/project.uvprojx b/bsp/nuvoton/nk-rtu980/project.uvprojx deleted file mode 100644 index bc477201f8..0000000000 --- a/bsp/nuvoton/nk-rtu980/project.uvprojx +++ /dev/null @@ -1,1766 +0,0 @@ - - - 2.1 -
### uVision Project, (C) Keil Software
- - - rtthread - 0x4 - ARM-ADS - 0 - - - Nuvoton_ARM9_Series - Nuvoton - - - - - 0 - - - - - - - - - - - - 0 - 0 - - - - Atmel\SAM9260\ - Atmel\SAM9260\ - - 0 - 0 - 0 - 0 - 1 - - .\build\keil5\ - rtthread - 1 - 0 - 1 - 1 - 1 - .\build\keil5\ - 1 - 0 - 0 - - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 1 - 0 - fromelf.exe --bin --output "$L@L.bin" "$L@L.axf" - - 0 - 0 - 0 - 0 - - 0 - - - - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 3 - - - 1 - - - SARM.DLL - -cAT91SAM9260 - DARMATS9.DLL - -p91SAM9260 - SARM.DLL - - TARMATS9.DLL - -p91SAM9260 - - - - 1 - 0 - 0 - 0 - 16 - - - - - 1 - 0 - 0 - 0 - 1 - 4098 - - 0 - Segger\JLTAgdi.dll - "" () - - - - - 0 - - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 1 - 0 - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - ARM926EJ-S - - 0 - 0 - 0 - 1 - 1 - 0 - 0 - 0 - 0 - 1 - 0 - 8 - 0 - 0 - 0 - 0 - 3 - 3 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x200000 - 0x1000 - - - 1 - 0x100000 - 0x8000 - - - 0 - 0x0 - 0x0 - - - 1 - 0x20000000 - 0x800000 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x100000 - 0x8000 - - - 1 - 0x0 - 0x0 - - - 0 - 0x20800000 - 0x1800000 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x200000 - 0x1000 - - - 0 - 0x300000 - 0x1000 - - - - - - 1 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 2 - 0 - 0 - 0 - 0 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - - --c99 - __RTTHREAD__, RT_USING_ARM_LIBC, __CLK_TCK=RT_TICK_PER_SECOND - - applications;.;board;..\..\..\components\libc\compilers\common;..\..\..\components\libc\compilers\common\nogcc;..\..\..\libcpu\arm\common;..\..\..\libcpu\arm\arm926;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\hwcrypto;.;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\spi;..\..\..\components\drivers\include;..\..\..\components\drivers\spi\sfud\inc;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\libraries\nuc980\rtt_port;..\..\..\components\dfs\include;..\..\..\components\dfs\filesystems\devfs;..\..\..\components\dfs\filesystems\elmfat;..\..\..\components\finsh;.;..\..\..\include;..\libraries\nuc980\Driver\Include;..\..\..\components\net\lwip-2.1.2\src;..\..\..\components\net\lwip-2.1.2\src\include;..\..\..\components\net\lwip-2.1.2\src\arch\include;..\..\..\components\net\lwip-2.1.2\src\include\netif;..\libraries\nu_packages\Demo;..\libraries\nuc980\UsbHostLib\inc;..\libraries\nu_packages\NuUtils\inc;..\..\..\components\libc\posix\io;..\..\..\components\libc\posix\io\poll;..\..\..\components\libc\posix\ipc;..\..\..\components\drivers\usb\usbdevice;..\..\..\components\drivers\usb\usbhost;..\..\..\components\drivers\usb\usbhost\class;..\..\..\components\drivers\usb\usbhost\core;..\..\..\components\drivers\usb\usbhost\include;..\..\..\components\drivers\include;..\..\..\components\net\netdev\include;..\..\..\components\net\sal_socket\include;..\..\..\components\net\sal_socket\include\socket;..\..\..\components\net\sal_socket\impl;..\..\..\components\net\sal_socket\include\dfs_net;..\..\..\components\net\sal_socket\include\socket\sys_socket;..\..\..\components\utilities\utest;..\..\..\examples\utest\testcases\kernel - - - - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - - - - 0 - 0 - 0 - 0 - 1 - 0 - 0x20000000 - 0x20800000 - - .\linking_scripts\nuc980.sct - - - - - - - - - - - Applications - - - main.c - 1 - applications\main.c - - - - - mnt.c - 1 - applications\mnt.c - - - - - board - - - nu_pin_init.c - 1 - board\nu_pin_init.c - - - - - board_dev.c - 1 - board\board_dev.c - - - - - Compiler - - - syscalls.c - 1 - ..\..\..\components\libc\compilers\armlibc\syscalls.c - - - - - libc_syms.c - 1 - ..\..\..\components\libc\compilers\armlibc\libc_syms.c - - - - - syscall_mem.c - 1 - ..\..\..\components\libc\compilers\armlibc\syscall_mem.c - - - - - stdlib.c - 1 - ..\..\..\components\libc\compilers\common\stdlib.c - - - - - time.c - 1 - ..\..\..\components\libc\compilers\common\time.c - - - - - CPU - - - showmem.c - 1 - ..\..\..\libcpu\arm\common\showmem.c - - - - - div0.c - 1 - ..\..\..\libcpu\arm\common\div0.c - - - - - backtrace.c - 1 - ..\..\..\libcpu\arm\common\backtrace.c - - - - - start_rvds.S - 2 - ..\..\..\libcpu\arm\arm926\start_rvds.S - - - - - cpuport.c - 1 - ..\..\..\libcpu\arm\arm926\cpuport.c - - - - - stack.c - 1 - ..\..\..\libcpu\arm\arm926\stack.c - - - - - context_rvds.S - 2 - ..\..\..\libcpu\arm\arm926\context_rvds.S - - - - - trap.c - 1 - ..\..\..\libcpu\arm\arm926\trap.c - - - - - machine.c - 1 - ..\..\..\libcpu\arm\arm926\machine.c - - - - - mmu.c - 1 - ..\..\..\libcpu\arm\arm926\mmu.c - - - - - DeviceDrivers - - - can.c - 1 - ..\..\..\components\drivers\can\can.c - - - - - cputime.c - 1 - ..\..\..\components\drivers\cputime\cputime.c - - - - - hw_symmetric.c - 1 - ..\..\..\components\drivers\hwcrypto\hw_symmetric.c - - - - - hwcrypto.c - 1 - ..\..\..\components\drivers\hwcrypto\hwcrypto.c - - - - - hw_rng.c - 1 - ..\..\..\components\drivers\hwcrypto\hw_rng.c - - - - - hw_hash.c - 1 - ..\..\..\components\drivers\hwcrypto\hw_hash.c - - - - - hwtimer.c - 1 - ..\..\..\components\drivers\hwtimer\hwtimer.c - - - - - i2c_core.c - 1 - ..\..\..\components\drivers\i2c\i2c_core.c - - - - - i2c_dev.c - 1 - ..\..\..\components\drivers\i2c\i2c_dev.c - - - - - i2c-bit-ops.c - 1 - ..\..\..\components\drivers\i2c\i2c-bit-ops.c - - - - - adc.c - 1 - ..\..\..\components\drivers\misc\adc.c - - - - - pin.c - 1 - ..\..\..\components\drivers\misc\pin.c - - - - - serial.c - 1 - ..\..\..\components\drivers\serial\serial.c - - - - - sfud.c - 1 - ..\..\..\components\drivers\spi\sfud\src\sfud.c - - - - - spi_core.c - 1 - ..\..\..\components\drivers\spi\spi_core.c - - - - - sfud_sfdp.c - 1 - ..\..\..\components\drivers\spi\sfud\src\sfud_sfdp.c - - - - - spi_dev.c - 1 - ..\..\..\components\drivers\spi\spi_dev.c - - - - - qspi_core.c - 1 - ..\..\..\components\drivers\spi\qspi_core.c - - - - - spi_flash_sfud.c - 1 - ..\..\..\components\drivers\spi\spi_flash_sfud.c - - - - - pipe.c - 1 - ..\..\..\components\drivers\src\pipe.c - - - - - dataqueue.c - 1 - ..\..\..\components\drivers\src\dataqueue.c - - - - - ringblk_buf.c - 1 - ..\..\..\components\drivers\src\ringblk_buf.c - - - - - completion.c - 1 - ..\..\..\components\drivers\src\completion.c - - - - - ringbuffer.c - 1 - ..\..\..\components\drivers\src\ringbuffer.c - - - - - waitqueue.c - 1 - ..\..\..\components\drivers\src\waitqueue.c - - - - - workqueue.c - 1 - ..\..\..\components\drivers\src\workqueue.c - - - - - watchdog.c - 1 - ..\..\..\components\drivers\watchdog\watchdog.c - - - - - - - --c99 - - - - - - - - - - Drivers - - - drv_usbd.c - 1 - ..\libraries\nuc980\rtt_port\drv_usbd.c - - - - - drv_etimer.c - 1 - ..\libraries\nuc980\rtt_port\drv_etimer.c - - - - - drv_gpio.c - 1 - ..\libraries\nuc980\rtt_port\drv_gpio.c - - - - - drv_adc.c - 1 - ..\libraries\nuc980\rtt_port\drv_adc.c - - - - - drv_spi.c - 1 - ..\libraries\nuc980\rtt_port\drv_spi.c - - - - - drv_sdh.c - 1 - ..\libraries\nuc980\rtt_port\drv_sdh.c - - - - - drv_crypto.c - 1 - ..\libraries\nuc980\rtt_port\drv_crypto.c - - - - - drv_can.c - 1 - ..\libraries\nuc980\rtt_port\drv_can.c - - - - - drv_ebi.c - 1 - ..\libraries\nuc980\rtt_port\drv_ebi.c - - - - - drv_sys.c - 1 - ..\libraries\nuc980\rtt_port\drv_sys.c - - - - - drv_qspi.c - 1 - ..\libraries\nuc980\rtt_port\drv_qspi.c - - - - - drv_scuart.c - 1 - ..\libraries\nuc980\rtt_port\drv_scuart.c - - - - - drv_uart.c - 1 - ..\libraries\nuc980\rtt_port\drv_uart.c - - - - - drv_common.c - 1 - ..\libraries\nuc980\rtt_port\drv_common.c - - - - - drv_emac.c - 1 - ..\libraries\nuc980\rtt_port\drv_emac.c - - - - - drv_softi2c.c - 1 - ..\libraries\nuc980\rtt_port\drv_softi2c.c - - - - - drv_i2c.c - 1 - ..\libraries\nuc980\rtt_port\drv_i2c.c - - - - - drv_usbhost.c - 1 - ..\libraries\nuc980\rtt_port\drv_usbhost.c - - - - - drv_etimer_capture.c - 1 - ..\libraries\nuc980\rtt_port\drv_etimer_capture.c - - - - - drv_wdt.c - 1 - ..\libraries\nuc980\rtt_port\drv_wdt.c - - - - - drv_pdma.c - 1 - ..\libraries\nuc980\rtt_port\drv_pdma.c - - - - - drv_systick.c - 1 - ..\libraries\nuc980\rtt_port\drv_systick.c - - - - - drv_i2s.c - 1 - ..\libraries\nuc980\rtt_port\drv_i2s.c - - - - - drv_rtc.c - 1 - ..\libraries\nuc980\rtt_port\drv_rtc.c - - - - - drv_pwm.c - 1 - ..\libraries\nuc980\rtt_port\drv_pwm.c - - - - - Filesystem - - - dfs_posix.c - 1 - ..\..\..\components\dfs\src\dfs_posix.c - - - - - dfs_fs.c - 1 - ..\..\..\components\dfs\src\dfs_fs.c - - - - - dfs.c - 1 - ..\..\..\components\dfs\src\dfs.c - - - - - dfs_file.c - 1 - ..\..\..\components\dfs\src\dfs_file.c - - - - - devfs.c - 1 - ..\..\..\components\dfs\filesystems\devfs\devfs.c - - - - - ffunicode.c - 1 - ..\..\..\components\dfs\filesystems\elmfat\ffunicode.c - - - - - ff.c - 1 - ..\..\..\components\dfs\filesystems\elmfat\ff.c - - - - - dfs_elm.c - 1 - ..\..\..\components\dfs\filesystems\elmfat\dfs_elm.c - - - - - Finsh - - - shell.c - 1 - ..\..\..\components\finsh\shell.c - - - - - msh.c - 1 - ..\..\..\components\finsh\msh.c - - - - - msh_file.c - 1 - ..\..\..\components\finsh\msh_file.c - - - - - cmd.c - 1 - ..\..\..\components\finsh\cmd.c - - - - - Kernel - - - thread.c - 1 - ..\..\..\src\thread.c - - - - - idle.c - 1 - ..\..\..\src\idle.c - - - - - ipc.c - 1 - ..\..\..\src\ipc.c - - - - - timer.c - 1 - ..\..\..\src\timer.c - - - - - clock.c - 1 - ..\..\..\src\clock.c - - - - - signal.c - 1 - ..\..\..\src\signal.c - - - - - mempool.c - 1 - ..\..\..\src\mempool.c - - - - - kservice.c - 1 - ..\..\..\src\kservice.c - - - - - device.c - 1 - ..\..\..\src\device.c - - - - - scheduler.c - 1 - ..\..\..\src\scheduler.c - - - - - components.c - 1 - ..\..\..\src\components.c - - - - - irq.c - 1 - ..\..\..\src\irq.c - - - - - mem.c - 1 - ..\..\..\src\mem.c - - - - - memheap.c - 1 - ..\..\..\src\memheap.c - - - - - object.c - 1 - ..\..\..\src\object.c - - - - - Libraries - - - nu_wdt.c - 1 - ..\libraries\nuc980\Driver\Source\nu_wdt.c - - - - - nu_rtc.c - 1 - ..\libraries\nuc980\Driver\Source\nu_rtc.c - - - - - nu_crypto.c - 1 - ..\libraries\nuc980\Driver\Source\nu_crypto.c - - - - - nu_pdma.c - 1 - ..\libraries\nuc980\Driver\Source\nu_pdma.c - - - - - nu_uart.c - 1 - ..\libraries\nuc980\Driver\Source\nu_uart.c - - - - - nu_qspi.c - 1 - ..\libraries\nuc980\Driver\Source\nu_qspi.c - - - - - nu_sdh.c - 1 - ..\libraries\nuc980\Driver\Source\nu_sdh.c - - - - - nu_scuart.c - 1 - ..\libraries\nuc980\Driver\Source\nu_scuart.c - - - - - nu_sys.c - 1 - ..\libraries\nuc980\Driver\Source\nu_sys.c - - - - - nu_can.c - 1 - ..\libraries\nuc980\Driver\Source\nu_can.c - - - - - nu_usbd.c - 1 - ..\libraries\nuc980\Driver\Source\nu_usbd.c - - - - - nu_cap.c - 1 - ..\libraries\nuc980\Driver\Source\nu_cap.c - - - - - nu_i2s.c - 1 - ..\libraries\nuc980\Driver\Source\nu_i2s.c - - - - - nu_ebi.c - 1 - ..\libraries\nuc980\Driver\Source\nu_ebi.c - - - - - nu_gpio.c - 1 - ..\libraries\nuc980\Driver\Source\nu_gpio.c - - - - - nu_wwdt.c - 1 - ..\libraries\nuc980\Driver\Source\nu_wwdt.c - - - - - nu_i2c.c - 1 - ..\libraries\nuc980\Driver\Source\nu_i2c.c - - - - - nu_spi.c - 1 - ..\libraries\nuc980\Driver\Source\nu_spi.c - - - - - nu_emac.c - 1 - ..\libraries\nuc980\Driver\Source\nu_emac.c - - - - - nu_etimer.c - 1 - ..\libraries\nuc980\Driver\Source\nu_etimer.c - - - - - lwIP - - - netdb.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\api\netdb.c - - - - - ip.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\ip.c - - - - - autoip.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\ipv4\autoip.c - - - - - ethernet.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\netif\ethernet.c - - - - - netif.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\netif.c - - - - - sys.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\sys.c - - - - - sockets.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\api\sockets.c - - - - - altcp_alloc.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\altcp_alloc.c - - - - - netifapi.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\api\netifapi.c - - - - - tcpip.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\api\tcpip.c - - - - - ip4_addr.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\ipv4\ip4_addr.c - - - - - dhcp.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\ipv4\dhcp.c - - - - - init.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\init.c - - - - - ethernetif.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\netif\ethernetif.c - - - - - etharp.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\ipv4\etharp.c - - - - - memp.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\memp.c - - - - - ip4.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\ipv4\ip4.c - - - - - netbuf.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\api\netbuf.c - - - - - raw.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\raw.c - - - - - ip4_frag.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\ipv4\ip4_frag.c - - - - - tcp_out.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\tcp_out.c - - - - - lowpan6.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\netif\lowpan6.c - - - - - icmp.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\ipv4\icmp.c - - - - - api_lib.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\api\api_lib.c - - - - - inet_chksum.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\inet_chksum.c - - - - - stats.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\stats.c - - - - - err.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\api\err.c - - - - - altcp.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\altcp.c - - - - - tcp_in.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\tcp_in.c - - - - - dns.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\dns.c - - - - - sys_arch.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\arch\sys_arch.c - - - - - timeouts.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\timeouts.c - - - - - igmp.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\ipv4\igmp.c - - - - - udp.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\udp.c - - - - - altcp_tcp.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\altcp_tcp.c - - - - - pbuf.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\pbuf.c - - - - - def.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\def.c - - - - - api_msg.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\api\api_msg.c - - - - - ping.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\apps\ping\ping.c - - - - - if_api.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\api\if_api.c - - - - - tcp.c - 1 - ..\..\..\components\net\lwip-2.1.2\src\core\tcp.c - - - - - nu_pkgs_demo - - - usbd_cdc_vcom_echo.c - 1 - ..\libraries\nu_packages\Demo\usbd_cdc_vcom_echo.c - - - - - slcd_show_tick.c - 1 - ..\libraries\nu_packages\Demo\slcd_show_tick.c - - - - - usbd_hid_dance_mouse.c - 1 - ..\libraries\nu_packages\Demo\usbd_hid_dance_mouse.c - - - - - nuc980_usbhostlib - - - ehci.c - 1 - ..\libraries\nuc980\UsbHostLib\src\ehci.c - - - - - ehci_iso.c - 1 - ..\libraries\nuc980\UsbHostLib\src\ehci_iso.c - - - - - mem_alloc.c - 1 - ..\libraries\nuc980\UsbHostLib\src\mem_alloc.c - - - - - ohci.c - 1 - ..\libraries\nuc980\UsbHostLib\src\ohci.c - - - - - support.c - 1 - ..\libraries\nuc980\UsbHostLib\src\support.c - - - - - usb_core.c - 1 - ..\libraries\nuc980\UsbHostLib\src\usb_core.c - - - - - POSIX - - - select.c - 1 - ..\..\..\components\libc\posix\io\select.c - - - - - poll.c - 1 - ..\..\..\components\libc\posix\io\poll\poll.c - - - - - rt_usbd - - - usbdevice_core.c - 1 - ..\..\..\components\drivers\usb\usbdevice\core\usbdevice_core.c - - - - - mstorage.c - 1 - ..\..\..\components\drivers\usb\usbdevice\class\mstorage.c - - - - - usbdevice.c - 1 - ..\..\..\components\drivers\usb\usbdevice\core\usbdevice.c - - - - - cdc_vcom.c - 1 - ..\..\..\components\drivers\usb\usbdevice\class\cdc_vcom.c - - - - - rt_usbh - - - hub.c - 1 - ..\..\..\components\drivers\usb\usbhost\core\hub.c - - - - - usbhost.c - 1 - ..\..\..\components\drivers\usb\usbhost\core\usbhost.c - - - - - usbhost_core.c - 1 - ..\..\..\components\drivers\usb\usbhost\core\usbhost_core.c - - - - - udisk.c - 1 - ..\..\..\components\drivers\usb\usbhost\class\udisk.c - - - - - mass.c - 1 - ..\..\..\components\drivers\usb\usbhost\class\mass.c - - - - - driver.c - 1 - ..\..\..\components\drivers\usb\usbhost\core\driver.c - - - - - SAL - - - netdev.c - 1 - ..\..\..\components\net\netdev\src\netdev.c - - - - - netdev_ipaddr.c - 1 - ..\..\..\components\net\netdev\src\netdev_ipaddr.c - - - - - net_netdb.c - 1 - ..\..\..\components\net\sal_socket\socket\net_netdb.c - - - - - af_inet_lwip.c - 1 - ..\..\..\components\net\sal_socket\impl\af_inet_lwip.c - - - - - sal_socket.c - 1 - ..\..\..\components\net\sal_socket\src\sal_socket.c - - - - - net_sockets.c - 1 - ..\..\..\components\net\sal_socket\socket\net_sockets.c - - - - - dfs_net.c - 1 - ..\..\..\components\net\sal_socket\dfs_net\dfs_net.c - - - - - UTest - - - utest.c - 1 - ..\..\..\components\utilities\utest\utest.c - - - - - - - - - - - -
diff --git a/bsp/nuvoton/nk-rtu980/rtconfig.h b/bsp/nuvoton/nk-rtu980/rtconfig.h deleted file mode 100644 index 6da5ab3233..0000000000 --- a/bsp/nuvoton/nk-rtu980/rtconfig.h +++ /dev/null @@ -1,431 +0,0 @@ -#ifndef RT_CONFIG_H__ -#define RT_CONFIG_H__ - -/* Automatically generated file; DO NOT EDIT. */ -/* RT-Thread Configuration */ - -/* RT-Thread Kernel */ - -#define RT_NAME_MAX 16 -#define RT_ALIGN_SIZE 4 -#define RT_THREAD_PRIORITY_32 -#define RT_THREAD_PRIORITY_MAX 32 -#define RT_TICK_PER_SECOND 1000 -#define RT_USING_OVERFLOW_CHECK -#define RT_USING_HOOK -#define RT_HOOK_USING_FUNC_PTR -#define RT_USING_IDLE_HOOK -#define RT_IDLE_HOOK_LIST_SIZE 4 -#define IDLE_THREAD_STACK_SIZE 2048 - -/* kservice optimization */ - -#define RT_DEBUG -#define RT_DEBUG_COLOR - -/* Inter-Thread communication */ - -#define RT_USING_SEMAPHORE -#define RT_USING_MUTEX -#define RT_USING_EVENT -#define RT_USING_MAILBOX -#define RT_USING_MESSAGEQUEUE -#define RT_USING_SIGNALS - -/* Memory Management */ - -#define RT_USING_MEMPOOL -#define RT_USING_SMALL_MEM -#define RT_USING_MEMHEAP -#define RT_MEMHEAP_FAST_MODE -#define RT_USING_SMALL_MEM_AS_HEAP -#define RT_USING_MEMTRACE -#define RT_USING_HEAP - -/* Kernel Device Object */ - -#define RT_USING_DEVICE -#define RT_USING_CONSOLE -#define RT_CONSOLEBUF_SIZE 256 -#define RT_CONSOLE_DEVICE_NAME "uart0" -#define RT_VER_NUM 0x40100 -#define ARCH_ARM -#define ARCH_ARM_ARM9 - -/* RT-Thread Components */ - -#define RT_USING_COMPONENTS_INIT -#define RT_USING_USER_MAIN -#define RT_MAIN_THREAD_STACK_SIZE 2048 -#define RT_MAIN_THREAD_PRIORITY 10 - -/* C++ features */ - - -/* Command shell */ - -#define RT_USING_FINSH -#define RT_USING_MSH -#define FINSH_USING_MSH -#define FINSH_THREAD_NAME "tshell" -#define FINSH_THREAD_PRIORITY 20 -#define FINSH_THREAD_STACK_SIZE 4096 -#define FINSH_USING_HISTORY -#define FINSH_HISTORY_LINES 5 -#define FINSH_USING_SYMTAB -#define FINSH_CMD_SIZE 80 -#define MSH_USING_BUILT_IN_COMMANDS -#define FINSH_USING_DESCRIPTION -#define FINSH_ARG_MAX 10 - -/* Device virtual file system */ - -#define RT_USING_DFS -#define DFS_USING_POSIX -#define DFS_USING_WORKDIR -#define DFS_FILESYSTEMS_MAX 16 -#define DFS_FILESYSTEM_TYPES_MAX 16 -#define DFS_FD_MAX 64 -#define RT_USING_DFS_MNTTABLE -#define RT_USING_DFS_ELMFAT - -/* elm-chan's FatFs, Generic FAT Filesystem Module */ - -#define RT_DFS_ELM_CODE_PAGE 437 -#define RT_DFS_ELM_WORD_ACCESS -#define RT_DFS_ELM_USE_LFN_3 -#define RT_DFS_ELM_USE_LFN 3 -#define RT_DFS_ELM_LFN_UNICODE_0 -#define RT_DFS_ELM_LFN_UNICODE 0 -#define RT_DFS_ELM_MAX_LFN 255 -#define RT_DFS_ELM_DRIVES 8 -#define RT_DFS_ELM_MAX_SECTOR_SIZE 4096 -#define RT_DFS_ELM_REENTRANT -#define RT_DFS_ELM_MUTEX_TIMEOUT 3000 -#define RT_USING_DFS_DEVFS - -/* Device Drivers */ - -#define RT_USING_DEVICE_IPC -#define RT_USING_SYSTEM_WORKQUEUE -#define RT_SYSTEM_WORKQUEUE_STACKSIZE 2048 -#define RT_SYSTEM_WORKQUEUE_PRIORITY 23 -#define RT_USING_SERIAL -#define RT_USING_SERIAL_V1 -#define RT_SERIAL_USING_DMA -#define RT_SERIAL_RB_BUFSZ 2048 -#define RT_USING_CAN -#define RT_CAN_USING_HDR -#define RT_USING_HWTIMER -#define RT_USING_CPUTIME -#define RT_USING_I2C -#define RT_USING_I2C_BITOPS -#define RT_USING_PIN -#define RT_USING_ADC -#define RT_USING_SPI -#define RT_USING_QSPI -#define RT_USING_SFUD -#define RT_SFUD_USING_SFDP -#define RT_SFUD_USING_FLASH_INFO_TABLE -#define RT_SFUD_USING_QSPI -#define RT_SFUD_SPI_MAX_HZ 50000000 -#define RT_USING_WDT -#define RT_USING_HWCRYPTO -#define RT_HWCRYPTO_DEFAULT_NAME "hwcryto" -#define RT_HWCRYPTO_IV_MAX_SIZE 16 -#define RT_HWCRYPTO_KEYBIT_MAX_SIZE 256 -#define RT_HWCRYPTO_USING_AES -#define RT_HWCRYPTO_USING_AES_ECB -#define RT_HWCRYPTO_USING_AES_CBC -#define RT_HWCRYPTO_USING_AES_CFB -#define RT_HWCRYPTO_USING_AES_CTR -#define RT_HWCRYPTO_USING_AES_OFB -#define RT_HWCRYPTO_USING_SHA1 -#define RT_HWCRYPTO_USING_SHA2 -#define RT_HWCRYPTO_USING_SHA2_224 -#define RT_HWCRYPTO_USING_SHA2_256 -#define RT_HWCRYPTO_USING_SHA2_384 -#define RT_HWCRYPTO_USING_SHA2_512 -#define RT_HWCRYPTO_USING_RNG - -/* Using USB */ - -#define RT_USING_USB -#define RT_USING_USB_HOST -#define RT_USBH_MSTORAGE -#define UDISK_MOUNTPOINT "/mnt/udisk" -#define RT_USING_USB_DEVICE -#define RT_USBD_THREAD_STACK_SZ 4096 -#define USB_VENDOR_ID 0x0FFE -#define USB_PRODUCT_ID 0x0001 -#define RT_USB_DEVICE_COMPOSITE -#define RT_USB_DEVICE_CDC -#define RT_USB_DEVICE_NONE -#define RT_USB_DEVICE_MSTORAGE -#define RT_VCOM_TASK_STK_SIZE 2048 -#define RT_CDC_RX_BUFSIZE 128 -#define RT_VCOM_SERNO "32021919830108" -#define RT_VCOM_SER_LEN 14 -#define RT_VCOM_TX_TIMEOUT 1000 -#define RT_USB_MSTORAGE_DISK_NAME "ramdisk1" - -/* POSIX layer and C standard library */ - -#define RT_LIBC_DEFAULT_TIMEZONE 8 - -/* POSIX (Portable Operating System Interface) layer */ - -#define RT_USING_POSIX_FS -#define RT_USING_POSIX_DEVIO -#define RT_USING_POSIX_POLL -#define RT_USING_POSIX_SELECT - -/* Interprocess Communication (IPC) */ - - -/* Socket is in the 'Network' category */ - -/* Network */ - -/* Socket abstraction layer */ - -#define RT_USING_SAL - -/* protocol stack implement */ - -#define SAL_USING_LWIP -#define SAL_USING_POSIX - -/* Network interface device */ - -#define RT_USING_NETDEV -#define NETDEV_USING_IFCONFIG -#define NETDEV_USING_PING -#define NETDEV_USING_NETSTAT -#define NETDEV_USING_AUTO_DEFAULT -#define NETDEV_IPV4 1 -#define NETDEV_IPV6 0 - -/* light weight TCP/IP stack */ - -#define RT_USING_LWIP -#define RT_USING_LWIP212 -#define RT_LWIP_MEM_ALIGNMENT 4 -#define RT_LWIP_IGMP -#define RT_LWIP_ICMP -#define RT_LWIP_DNS -#define RT_LWIP_DHCP -#define IP_SOF_BROADCAST 1 -#define IP_SOF_BROADCAST_RECV 1 - -/* Static IPv4 Address */ - -#define RT_LWIP_IPADDR "192.168.31.55" -#define RT_LWIP_GWADDR "192.168.31.1" -#define RT_LWIP_MSKADDR "255.255.255.0" -#define RT_LWIP_UDP -#define RT_LWIP_TCP -#define RT_LWIP_RAW -#define RT_MEMP_NUM_NETCONN 16 -#define RT_LWIP_PBUF_NUM 256 -#define RT_LWIP_RAW_PCB_NUM 16 -#define RT_LWIP_UDP_PCB_NUM 16 -#define RT_LWIP_TCP_PCB_NUM 16 -#define RT_LWIP_TCP_SEG_NUM 64 -#define RT_LWIP_TCP_SND_BUF 16384 -#define RT_LWIP_TCP_WND 65535 -#define RT_LWIP_TCPTHREAD_PRIORITY 10 -#define RT_LWIP_TCPTHREAD_MBOX_SIZE 256 -#define RT_LWIP_TCPTHREAD_STACKSIZE 4096 -#define RT_LWIP_ETHTHREAD_PRIORITY 12 -#define RT_LWIP_ETHTHREAD_STACKSIZE 4096 -#define RT_LWIP_ETHTHREAD_MBOX_SIZE 256 -#define RT_LWIP_REASSEMBLY_FRAG -#define LWIP_NETIF_STATUS_CALLBACK 1 -#define LWIP_NETIF_LINK_CALLBACK 1 -#define SO_REUSE 1 -#define LWIP_SO_RCVTIMEO 1 -#define LWIP_SO_SNDTIMEO 1 -#define LWIP_SO_RCVBUF 1 -#define LWIP_SO_LINGER 0 -#define RT_LWIP_NETIF_LOOPBACK -#define LWIP_NETIF_LOOPBACK 1 -#define RT_LWIP_STATS -#define RT_LWIP_USING_PING - -/* AT commands */ - - -/* VBUS(Virtual Software BUS) */ - - -/* Utilities */ - -#define RT_USING_UTEST -#define UTEST_THR_STACK_SIZE 4096 -#define UTEST_THR_PRIORITY 20 - -/* RT-Thread Utestcases */ - - -/* RT-Thread online packages */ - -/* IoT - internet of things */ - - -/* Wi-Fi */ - -/* Marvell WiFi */ - - -/* Wiced WiFi */ - -#define PKG_USING_NETUTILS -#define PKG_NETUTILS_TFTP -#define PKG_NETUTILS_IPERF -#define PKG_NETUTILS_NTP -#define NTP_USING_AUTO_SYNC -#define NTP_AUTO_SYNC_FIRST_DELAY 30 -#define NTP_AUTO_SYNC_PERIOD 3600 -#define NETUTILS_NTP_HOSTNAME "0.tw.pool.ntp.org" -#define NETUTILS_NTP_HOSTNAME2 "1.tw.pool.ntp.org" -#define NETUTILS_NTP_HOSTNAME3 "2.tw.pool.ntp.org" -#define PKG_USING_NETUTILS_V131 -#define PKG_NETUTILS_VER_NUM 0x10301 - -/* IoT Cloud */ - - -/* security packages */ - - -/* language packages */ - - -/* multimedia packages */ - -/* LVGL: powerful and easy-to-use embedded GUI library */ - - -/* u8g2: a monochrome graphic library */ - - -/* PainterEngine: A cross-platform graphics application framework written in C language */ - - -/* tools packages */ - - -/* system packages */ - -/* enhanced kernel services */ - - -/* POSIX extension functions */ - - -/* acceleration: Assembly language or algorithmic acceleration packages */ - - -/* CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */ - - -/* Micrium: Micrium software products porting for RT-Thread */ - -#define PKG_USING_FAL -#define FAL_DEBUG_CONFIG -#define FAL_DEBUG 1 -#define FAL_PART_HAS_TABLE_CFG -#define FAL_USING_SFUD_PORT -#define FAL_USING_NOR_FLASH_DEV_NAME "norflash0" -#define PKG_USING_FAL_LATEST_VERSION -#define PKG_FAL_VER_NUM 0x99999 -#define PKG_USING_RAMDISK -#define PKG_USING_RAMDISK_LATEST_VERSION - -/* peripheral libraries and drivers */ - - -/* AI packages */ - - -/* miscellaneous packages */ - -/* samples: kernel and components samples */ - - -/* entertainment: terminal games and other interesting software packages */ - -#define PKG_USING_OPTPARSE -#define PKG_USING_OPTPARSE_LATEST_VERSION - -/* Nuvoton Packages Config */ - -#define NU_PKG_USING_UTILS -#define NU_PKG_USING_DEMO - -/* Hardware Drivers Config */ - -/* On-chip Peripheral Drivers */ - -#define SOC_SERIES_NUC980 -#define BSP_USE_STDDRIVER_SOURCE -#define BSP_USING_MMU -#define BSP_USING_PDMA -#define NU_PDMA_MEMFUN_ACTOR_MAX 2 -#define BSP_USING_GPIO -#define BSP_USING_EMAC -#define BSP_USING_EMAC1 -#define NU_EMAC_PDMA_MEMCOPY -#define NU_EMAC_PDMA_MEMCOPY_THRESHOLD 128 -#define BSP_USING_ADC -#define BSP_USING_TMR -#define BSP_USING_TIMER -#define BSP_USING_TMR0 -#define BSP_USING_TIMER0 -#define BSP_USING_TMR1 -#define BSP_USING_TIMER1 -#define BSP_USING_TMR2 -#define BSP_USING_TIMER2 -#define BSP_USING_TMR3 -#define BSP_USING_TIMER3 -#define BSP_USING_TMR4 -#define BSP_USING_TIMER4 -#define BSP_USING_UART -#define BSP_USING_UART0 -#define BSP_USING_UART4 -#define BSP_USING_UART4_TX_DMA -#define BSP_USING_UART4_RX_DMA -#define BSP_USING_UART8 -#define BSP_USING_UART8_TX_DMA -#define BSP_USING_UART8_RX_DMA -#define BSP_USING_I2C -#define BSP_USING_I2C1 -#define BSP_USING_CAN -#define BSP_USING_CAN3 -#define BSP_USING_SPI -#define BSP_USING_SPI_PDMA -#define BSP_USING_SPI0 -#define BSP_USING_SPI0_PDMA -#define BSP_USING_SPI1_NONE -#define BSP_USING_QSPI -#define BSP_USING_QSPI_PDMA -#define BSP_USING_QSPI0 -#define BSP_USING_QSPI0_PDMA -#define BSP_USING_CRYPTO -#define BSP_USING_WDT -#define BSP_USING_USBD -#define BSP_USING_USBH - -/* On-board Peripheral Drivers */ - -#define BSP_USING_CONSOLE -#define BOARD_USING_UART8_RS485 -#define BOARD_USING_STORAGE_SPIFLASH -#define BOARD_USING_USB0_DEVICE_HOST - -/* Board extended module drivers */ - -#define BOARD_USING_IP101GR - -#endif diff --git a/bsp/nuvoton/nk-rtu980/rtconfig.py b/bsp/nuvoton/nk-rtu980/rtconfig.py index c246b656ad..07f75ed3e0 100644 --- a/bsp/nuvoton/nk-rtu980/rtconfig.py +++ b/bsp/nuvoton/nk-rtu980/rtconfig.py @@ -85,4 +85,10 @@ elif PLATFORM == 'armcc': CFLAGS += ' -O2' POST_ACTION = 'fromelf --bin $TARGET --output ' + TARGET_NAME + ' \n' - POST_ACTION += 'fromelf -z $TARGET\n' \ No newline at end of file + POST_ACTION += 'fromelf -z $TARGET\n' +def dist_handle(BSP_ROOT, dist_dir): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT, dist_dir) diff --git a/bsp/nuvoton/numaker-iot-m487/.config b/bsp/nuvoton/numaker-iot-m487/.config index c10d9235f9..58d95746ed 100644 --- a/bsp/nuvoton/numaker-iot-m487/.config +++ b/bsp/nuvoton/numaker-iot-m487/.config @@ -973,3 +973,5 @@ CONFIG_BOARD_USING_HSUSBH_USBD=y # # CONFIG_BOARD_USING_MAX31875 is not set # CONFIG_BOARD_USING_LCD_ILI9341 is not set +CONFIG_BOARD_USE_UTEST=y +CONFIG_UTEST_CMD_PREFIX="bsp.nuvoton.numaker-iot-m487.test.utest." diff --git a/bsp/nuvoton/numaker-iot-m487/Kconfig b/bsp/nuvoton/numaker-iot-m487/Kconfig index 5c55e87c61..b396340d12 100644 --- a/bsp/nuvoton/numaker-iot-m487/Kconfig +++ b/bsp/nuvoton/numaker-iot-m487/Kconfig @@ -18,12 +18,6 @@ config PKGS_DIR option env="PKGS_ROOT" default "packages" -config NU_PKGS_DIR - string - option env="NU_PKGS_ROOT" - default "../libraries/nu_packages" - source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" -source "$NU_PKGS_DIR/Kconfig" source "$BSP_DIR/board/Kconfig" diff --git a/bsp/nuvoton/numaker-iot-m487/board/Kconfig b/bsp/nuvoton/numaker-iot-m487/board/Kconfig index 7b2fb2683a..0e81a45529 100644 --- a/bsp/nuvoton/numaker-iot-m487/board/Kconfig +++ b/bsp/nuvoton/numaker-iot-m487/board/Kconfig @@ -129,5 +129,6 @@ menu "Hardware Drivers Config" endmenu + source "$BSP_DIR/../libraries/nu_packages/Kconfig" endmenu diff --git a/bsp/nuvoton/numaker-iot-m487/project.uvproj b/bsp/nuvoton/numaker-iot-m487/project.uvproj deleted file mode 100644 index b26994de86..0000000000 --- a/bsp/nuvoton/numaker-iot-m487/project.uvproj +++ /dev/null @@ -1,1814 +0,0 @@ - - - 1.1 -
### uVision Project, (C) Keil Software
- - - rtthread-m480 - 0x4 - ARM-ADS - - - M487JIDAE - Nuvoton - IRAM(0x20000000-0x20027FFF) IROM(0-0x7FFFF) CLOCK(192000000) CPUTYPE("Cortex-M4") FPU2 - - undefined - - 0 - - - - - - - - - - - SFD\Nuvoton\M481_v1.SFR - 0 - 0 - - - - - - - 0 - 0 - 0 - 0 - 1 - - .\build\keil4\ - rtthread - 1 - 0 - 1 - 1 - 1 - .\build\keil4\ - 1 - 0 - 0 - - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 0 - 0 - - - 0 - 0 - - - 1 - 0 - fromelf.exe --bin --output "$L@L.bin" "$L@L.axf" - - 0 - 0 - - 0 - - - - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 3 - - - 1 - - - SARMCM3.DLL - - DARMCM1.DLL - - SARMCM3.DLL - - TARMCM1.DLL - - - - - 1 - 0 - 0 - 0 - 16 - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - - 0 - 10 - - - - - - - - - - - - - - NULink\Nu_Link.dll - - - - - 1 - 0 - 0 - 1 - 1 - 4101 - - 0 - NULink\Nu_Link.dll - "" () - - - - - 0 - - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 1 - 0 - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - "Cortex-M4" - - 0 - 0 - 0 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 8 - 0 - 0 - 0 - 3 - 3 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 1 - 0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x20000000 - 0x28000 - - - 1 - 0x0 - 0x80000 - - - 0 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x80000 - - - 1 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x20000000 - 0x28000 - - - 0 - 0x0 - 0x0 - - - - - - 1 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - --c99 - __RTTHREAD__, RT_USING_ARM_LIBC, __CLK_TCK=RT_TICK_PER_SECOND - - applications;.;..\..\..\components\net\at\include;..\..\..\components\net\at\at_socket;..\libraries\m480\CMSIS\Include;..\..\..\components\libc\compilers\common;..\..\..\components\libc\compilers\common\nogcc;..\..\..\libcpu\arm\common;..\..\..\libcpu\arm\cortex-m4;..\..\..\components\drivers\audio;..\..\..\components\drivers\include;..\..\..\components\drivers\hwcrypto;.;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\spi;..\..\..\components\drivers\include;..\..\..\components\drivers\spi\sfud\inc;..\..\..\components\drivers\include;..\..\..\components\drivers\include;board;board\NuClockConfig;board\NuPinConfig;..\libraries\m480\Device\Nuvoton\M480\Include;..\libraries\m480\rtt_port;..\..\..\components\dfs\include;..\..\..\components\dfs\filesystems\devfs;..\..\..\components\dfs\filesystems\elmfat;..\..\..\components\finsh;.;..\..\..\include;..\libraries\m480\StdDriver\inc;..\libraries\m480\USBHostLib\inc;..\libraries\nu_packages\BMX055;..\libraries\nu_packages\BMX055\libraries\BMA2x2_driver;..\libraries\nu_packages\BMX055\libraries\BMG160_driver;..\libraries\nu_packages\BMX055\libraries\BMM050_driver;..\libraries\nu_packages\Demo;..\libraries\nu_packages\AudioCodec;..\libraries\nu_packages\NuUtils\inc;..\..\..\components\libc\posix\io;..\..\..\components\libc\posix\io\poll;..\..\..\components\libc\posix\ipc;..\..\..\components\drivers\usb\usbdevice;..\..\..\components\drivers\usb\usbhost;..\..\..\components\drivers\usb\usbhost\class;..\..\..\components\drivers\usb\usbhost\core;..\..\..\components\drivers\usb\usbhost\include;..\..\..\components\drivers\include;..\..\..\components\net\netdev\include;..\..\..\components\net\sal_socket\include;..\..\..\components\net\sal_socket\include\socket;..\..\..\components\net\sal_socket\impl;..\..\..\components\net\sal_socket\include\dfs_net;..\..\..\components\net\sal_socket\include\socket\sys_socket;..\..\..\components\drivers\sensors;..\..\..\components\drivers\include;..\..\..\components\utilities\utest;..\..\..\examples\utest\testcases\kernel - - - - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - - - - 0 - 0 - 0 - 0 - 1 - 0 - 0x00000000 - 0x20000000 - .\linking_scripts\m480_flash.sct - - - - - - - - - - - Applications - - - main.c - 1 - applications\main.c - - - - - mnt.c - 1 - applications\mnt.c - - - - - AT - - - at_socket.c - 1 - ..\..\..\components\net\at\at_socket\at_socket.c - - - - - at_utils.c - 1 - ..\..\..\components\net\at\src\at_utils.c - - - - - at_client.c - 1 - ..\..\..\components\net\at\src\at_client.c - - - - - at_cli.c - 1 - ..\..\..\components\net\at\src\at_cli.c - - - - - Compiler - - - libc_syms.c - 1 - ..\..\..\components\libc\compilers\armlibc\libc_syms.c - - - - - syscall_mem.c - 1 - ..\..\..\components\libc\compilers\armlibc\syscall_mem.c - - - - - syscalls.c - 1 - ..\..\..\components\libc\compilers\armlibc\syscalls.c - - - - - time.c - 1 - ..\..\..\components\libc\compilers\common\time.c - - - - - stdlib.c - 1 - ..\..\..\components\libc\compilers\common\stdlib.c - - - - - CPU - - - showmem.c - 1 - ..\..\..\libcpu\arm\common\showmem.c - - - - - div0.c - 1 - ..\..\..\libcpu\arm\common\div0.c - - - - - backtrace.c - 1 - ..\..\..\libcpu\arm\common\backtrace.c - - - - - cpuport.c - 1 - ..\..\..\libcpu\arm\cortex-m4\cpuport.c - - - - - context_rvds.S - 2 - ..\..\..\libcpu\arm\cortex-m4\context_rvds.S - - - - - DeviceDrivers - - - audio_pipe.c - 1 - ..\..\..\components\drivers\audio\audio_pipe.c - - - - - audio.c - 1 - ..\..\..\components\drivers\audio\audio.c - - - - - can.c - 1 - ..\..\..\components\drivers\can\can.c - - - - - hw_symmetric.c - 1 - ..\..\..\components\drivers\hwcrypto\hw_symmetric.c - - - - - hwcrypto.c - 1 - ..\..\..\components\drivers\hwcrypto\hwcrypto.c - - - - - hw_rng.c - 1 - ..\..\..\components\drivers\hwcrypto\hw_rng.c - - - - - hw_crc.c - 1 - ..\..\..\components\drivers\hwcrypto\hw_crc.c - - - - - hw_hash.c - 1 - ..\..\..\components\drivers\hwcrypto\hw_hash.c - - - - - hwtimer.c - 1 - ..\..\..\components\drivers\hwtimer\hwtimer.c - - - - - i2c_core.c - 1 - ..\..\..\components\drivers\i2c\i2c_core.c - - - - - i2c_dev.c - 1 - ..\..\..\components\drivers\i2c\i2c_dev.c - - - - - i2c-bit-ops.c - 1 - ..\..\..\components\drivers\i2c\i2c-bit-ops.c - - - - - adc.c - 1 - ..\..\..\components\drivers\misc\adc.c - - - - - rt_drv_pwm.c - 1 - ..\..\..\components\drivers\misc\rt_drv_pwm.c - - - - - pin.c - 1 - ..\..\..\components\drivers\misc\pin.c - - - - - lptimer.c - 1 - ..\..\..\components\drivers\pm\lptimer.c - - - - - pm.c - 1 - ..\..\..\components\drivers\pm\pm.c - - - - - rtc.c - 1 - ..\..\..\components\drivers\rtc\rtc.c - - - - - serial.c - 1 - ..\..\..\components\drivers\serial\serial.c - - - - - sfud.c - 1 - ..\..\..\components\drivers\spi\sfud\src\sfud.c - - - - - spi_core.c - 1 - ..\..\..\components\drivers\spi\spi_core.c - - - - - sfud_sfdp.c - 1 - ..\..\..\components\drivers\spi\sfud\src\sfud_sfdp.c - - - - - spi_dev.c - 1 - ..\..\..\components\drivers\spi\spi_dev.c - - - - - qspi_core.c - 1 - ..\..\..\components\drivers\spi\qspi_core.c - - - - - spi_flash_sfud.c - 1 - ..\..\..\components\drivers\spi\spi_flash_sfud.c - - - - - ringbuffer.c - 1 - ..\..\..\components\drivers\src\ringbuffer.c - - - - - dataqueue.c - 1 - ..\..\..\components\drivers\src\dataqueue.c - - - - - ringblk_buf.c - 1 - ..\..\..\components\drivers\src\ringblk_buf.c - - - - - pipe.c - 1 - ..\..\..\components\drivers\src\pipe.c - - - - - workqueue.c - 1 - ..\..\..\components\drivers\src\workqueue.c - - - - - completion.c - 1 - ..\..\..\components\drivers\src\completion.c - - - - - waitqueue.c - 1 - ..\..\..\components\drivers\src\waitqueue.c - - - - - watchdog.c - 1 - ..\..\..\components\drivers\watchdog\watchdog.c - - - - - - - --c99 - - - - - - - - - - Drivers - - - nutool_pincfg.c - 1 - board\NuPinConfig\nutool_pincfg.c - - - - - nutool_modclkcfg.c - 1 - board\NuClockConfig\nutool_modclkcfg.c - - - - - board_dev.c - 1 - board\board_dev.c - - - - - system_M480.c - 1 - ..\libraries\m480\Device\Nuvoton\M480\Source\system_M480.c - - - - - startup_M480.s - 2 - ..\libraries\m480\Device\Nuvoton\M480\Source\ARM\startup_M480.s - - - - - drv_ebi.c - 1 - ..\libraries\m480\rtt_port\drv_ebi.c - - - - - drv_usbd.c - 1 - ..\libraries\m480\rtt_port\drv_usbd.c - - - - - drv_uuart.c - 1 - ..\libraries\m480\rtt_port\drv_uuart.c - - - - - drv_rtc.c - 1 - ..\libraries\m480\rtt_port\drv_rtc.c - - - - - drv_pdma.c - 1 - ..\libraries\m480\rtt_port\drv_pdma.c - - - - - drv_bpwm_capture.c - 1 - ..\libraries\m480\rtt_port\drv_bpwm_capture.c - - - - - drv_qspi.c - 1 - ..\libraries\m480\rtt_port\drv_qspi.c - - - - - drv_trng.c - 1 - ..\libraries\m480\rtt_port\drv_trng.c - - - - - drv_epwm.c - 1 - ..\libraries\m480\rtt_port\drv_epwm.c - - - - - drv_wdt.c - 1 - ..\libraries\m480\rtt_port\drv_wdt.c - - - - - drv_clk.c - 1 - ..\libraries\m480\rtt_port\drv_clk.c - - - - - drv_timer.c - 1 - ..\libraries\m480\rtt_port\drv_timer.c - - - - - drv_uspi.c - 1 - ..\libraries\m480\rtt_port\drv_uspi.c - - - - - drv_emac.c - 1 - ..\libraries\m480\rtt_port\drv_emac.c - - - - - drv_uart.c - 1 - ..\libraries\m480\rtt_port\drv_uart.c - - - - - drv_timer_capture.c - 1 - ..\libraries\m480\rtt_port\drv_timer_capture.c - - - - - drv_crypto.c - 1 - ..\libraries\m480\rtt_port\drv_crypto.c - - - - - drv_qei.c - 1 - ..\libraries\m480\rtt_port\drv_qei.c - - - - - drv_usbhost.c - 1 - ..\libraries\m480\rtt_port\drv_usbhost.c - - - - - drv_hsusbd.c - 1 - ..\libraries\m480\rtt_port\drv_hsusbd.c - - - - - drv_gpio.c - 1 - ..\libraries\m480\rtt_port\drv_gpio.c - - - - - drv_ecap.c - 1 - ..\libraries\m480\rtt_port\drv_ecap.c - - - - - drv_crc.c - 1 - ..\libraries\m480\rtt_port\drv_crc.c - - - - - drv_bpwm.c - 1 - ..\libraries\m480\rtt_port\drv_bpwm.c - - - - - drv_ui2c.c - 1 - ..\libraries\m480\rtt_port\drv_ui2c.c - - - - - drv_scuart.c - 1 - ..\libraries\m480\rtt_port\drv_scuart.c - - - - - drv_spi.c - 1 - ..\libraries\m480\rtt_port\drv_spi.c - - - - - drv_spii2s.c - 1 - ..\libraries\m480\rtt_port\drv_spii2s.c - - - - - drv_i2c.c - 1 - ..\libraries\m480\rtt_port\drv_i2c.c - - - - - drv_i2s.c - 1 - ..\libraries\m480\rtt_port\drv_i2s.c - - - - - drv_sdh.c - 1 - ..\libraries\m480\rtt_port\drv_sdh.c - - - - - drv_hsotg.c - 1 - ..\libraries\m480\rtt_port\drv_hsotg.c - - - - - drv_tpwm.c - 1 - ..\libraries\m480\rtt_port\drv_tpwm.c - - - - - drv_epwm_capture.c - 1 - ..\libraries\m480\rtt_port\drv_epwm_capture.c - - - - - drv_common.c - 1 - ..\libraries\m480\rtt_port\drv_common.c - - - - - drv_fmc.c - 1 - ..\libraries\m480\rtt_port\drv_fmc.c - - - - - drv_softi2c.c - 1 - ..\libraries\m480\rtt_port\drv_softi2c.c - - - - - drv_eadc.c - 1 - ..\libraries\m480\rtt_port\drv_eadc.c - - - - - drv_can.c - 1 - ..\libraries\m480\rtt_port\drv_can.c - - - - - Filesystem - - - dfs_posix.c - 1 - ..\..\..\components\dfs\src\dfs_posix.c - - - - - dfs_fs.c - 1 - ..\..\..\components\dfs\src\dfs_fs.c - - - - - dfs.c - 1 - ..\..\..\components\dfs\src\dfs.c - - - - - dfs_file.c - 1 - ..\..\..\components\dfs\src\dfs_file.c - - - - - devfs.c - 1 - ..\..\..\components\dfs\filesystems\devfs\devfs.c - - - - - ff.c - 1 - ..\..\..\components\dfs\filesystems\elmfat\ff.c - - - - - ffunicode.c - 1 - ..\..\..\components\dfs\filesystems\elmfat\ffunicode.c - - - - - dfs_elm.c - 1 - ..\..\..\components\dfs\filesystems\elmfat\dfs_elm.c - - - - - Finsh - - - shell.c - 1 - ..\..\..\components\finsh\shell.c - - - - - msh.c - 1 - ..\..\..\components\finsh\msh.c - - - - - msh_file.c - 1 - ..\..\..\components\finsh\msh_file.c - - - - - cmd.c - 1 - ..\..\..\components\finsh\cmd.c - - - - - Kernel - - - mempool.c - 1 - ..\..\..\src\mempool.c - - - - - signal.c - 1 - ..\..\..\src\signal.c - - - - - thread.c - 1 - ..\..\..\src\thread.c - - - - - device.c - 1 - ..\..\..\src\device.c - - - - - kservice.c - 1 - ..\..\..\src\kservice.c - - - - - idle.c - 1 - ..\..\..\src\idle.c - - - - - ipc.c - 1 - ..\..\..\src\ipc.c - - - - - object.c - 1 - ..\..\..\src\object.c - - - - - irq.c - 1 - ..\..\..\src\irq.c - - - - - mem.c - 1 - ..\..\..\src\mem.c - - - - - scheduler.c - 1 - ..\..\..\src\scheduler.c - - - - - clock.c - 1 - ..\..\..\src\clock.c - - - - - timer.c - 1 - ..\..\..\src\timer.c - - - - - components.c - 1 - ..\..\..\src\components.c - - - - - Libraries - - - nu_can.c - 1 - ..\libraries\m480\StdDriver\src\nu_can.c - - - - - nu_sys.c - 1 - ..\libraries\m480\StdDriver\src\nu_sys.c - - - - - nu_crc.c - 1 - ..\libraries\m480\StdDriver\src\nu_crc.c - - - - - nu_spi.c - 1 - ..\libraries\m480\StdDriver\src\nu_spi.c - - - - - nu_qspi.c - 1 - ..\libraries\m480\StdDriver\src\nu_qspi.c - - - - - nu_hsusbd.c - 1 - ..\libraries\m480\StdDriver\src\nu_hsusbd.c - - - - - nu_bpwm.c - 1 - ..\libraries\m480\StdDriver\src\nu_bpwm.c - - - - - nu_ebi.c - 1 - ..\libraries\m480\StdDriver\src\nu_ebi.c - - - - - nu_dac.c - 1 - ..\libraries\m480\StdDriver\src\nu_dac.c - - - - - nu_usci_spi.c - 1 - ..\libraries\m480\StdDriver\src\nu_usci_spi.c - - - - - nu_crypto.c - 1 - ..\libraries\m480\StdDriver\src\nu_crypto.c - - - - - nu_i2c.c - 1 - ..\libraries\m480\StdDriver\src\nu_i2c.c - - - - - nu_scuart.c - 1 - ..\libraries\m480\StdDriver\src\nu_scuart.c - - - - - nu_timer.c - 1 - ..\libraries\m480\StdDriver\src\nu_timer.c - - - - - nu_usci_uart.c - 1 - ..\libraries\m480\StdDriver\src\nu_usci_uart.c - - - - - nu_pdma.c - 1 - ..\libraries\m480\StdDriver\src\nu_pdma.c - - - - - nu_usci_i2c.c - 1 - ..\libraries\m480\StdDriver\src\nu_usci_i2c.c - - - - - nu_uart.c - 1 - ..\libraries\m480\StdDriver\src\nu_uart.c - - - - - nu_rtc.c - 1 - ..\libraries\m480\StdDriver\src\nu_rtc.c - - - - - nu_clk.c - 1 - ..\libraries\m480\StdDriver\src\nu_clk.c - - - - - nu_ecap.c - 1 - ..\libraries\m480\StdDriver\src\nu_ecap.c - - - - - nu_acmp.c - 1 - ..\libraries\m480\StdDriver\src\nu_acmp.c - - - - - nu_ccap.c - 1 - ..\libraries\m480\StdDriver\src\nu_ccap.c - - - - - nu_epwm.c - 1 - ..\libraries\m480\StdDriver\src\nu_epwm.c - - - - - nu_trng.c - 1 - ..\libraries\m480\StdDriver\src\nu_trng.c - - - - - nu_spim.c - 1 - ..\libraries\m480\StdDriver\src\nu_spim.c - - - - - nu_usbd.c - 1 - ..\libraries\m480\StdDriver\src\nu_usbd.c - - - - - nu_wwdt.c - 1 - ..\libraries\m480\StdDriver\src\nu_wwdt.c - - - - - nu_timer_pwm.c - 1 - ..\libraries\m480\StdDriver\src\nu_timer_pwm.c - - - - - nu_sc.c - 1 - ..\libraries\m480\StdDriver\src\nu_sc.c - - - - - nu_emac.c - 1 - ..\libraries\m480\StdDriver\src\nu_emac.c - - - - - nu_fmc.c - 1 - ..\libraries\m480\StdDriver\src\nu_fmc.c - - - - - nu_sdh.c - 1 - ..\libraries\m480\StdDriver\src\nu_sdh.c - - - - - nu_eadc.c - 1 - ..\libraries\m480\StdDriver\src\nu_eadc.c - - - - - nu_qei.c - 1 - ..\libraries\m480\StdDriver\src\nu_qei.c - - - - - nu_gpio.c - 1 - ..\libraries\m480\StdDriver\src\nu_gpio.c - - - - - nu_i2s.c - 1 - ..\libraries\m480\StdDriver\src\nu_i2s.c - - - - - nu_wdt.c - 1 - ..\libraries\m480\StdDriver\src\nu_wdt.c - - - - - m480_usbhostlib - - - mem_alloc.c - 1 - ..\libraries\m480\USBHostLib\src\mem_alloc.c - - - - - ehci.c - 1 - ..\libraries\m480\USBHostLib\src\ehci.c - - - - - ehci_iso.c - 1 - ..\libraries\m480\USBHostLib\src\ehci_iso.c - - - - - ohci.c - 1 - ..\libraries\m480\USBHostLib\src\ohci.c - - - - - usb_core.c - 1 - ..\libraries\m480\USBHostLib\src\usb_core.c - - - - - nu_pkgs_bmx055 - - - bmg160.c - 1 - ..\libraries\nu_packages\BMX055\libraries\BMG160_driver\bmg160.c - - - - - bma2x2.c - 1 - ..\libraries\nu_packages\BMX055\libraries\BMA2x2_driver\bma2x2.c - - - - - sensor_bmx055.c - 1 - ..\libraries\nu_packages\BMX055\sensor_bmx055.c - - - - - bmm050.c - 1 - ..\libraries\nu_packages\BMX055\libraries\BMM050_driver\bmm050.c - - - - - nu_pkgs_demo - - - usbd_cdc_vcom_echo.c - 1 - ..\libraries\nu_packages\Demo\usbd_cdc_vcom_echo.c - - - - - slcd_show_tick.c - 1 - ..\libraries\nu_packages\Demo\slcd_show_tick.c - - - - - usbd_hid_dance_mouse.c - 1 - ..\libraries\nu_packages\Demo\usbd_hid_dance_mouse.c - - - - - nu_pkgs_nau88l25 - - - audio_test.c - 1 - ..\libraries\nu_packages\AudioCodec\audio_test.c - - - - - acodec_nau88l25.c - 1 - ..\libraries\nu_packages\AudioCodec\acodec_nau88l25.c - - - - - POSIX - - - select.c - 1 - ..\..\..\components\libc\posix\io\select.c - - - - - poll.c - 1 - ..\..\..\components\libc\posix\io\poll\poll.c - - - - - rt_usbd - - - usbdevice_core.c - 1 - ..\..\..\components\drivers\usb\usbdevice\core\usbdevice_core.c - - - - - usbdevice.c - 1 - ..\..\..\components\drivers\usb\usbdevice\core\usbdevice.c - - - - - hid.c - 1 - ..\..\..\components\drivers\usb\usbdevice\class\hid.c - - - - - rt_usbh - - - hub.c - 1 - ..\..\..\components\drivers\usb\usbhost\core\hub.c - - - - - usbhost.c - 1 - ..\..\..\components\drivers\usb\usbhost\core\usbhost.c - - - - - usbhost_core.c - 1 - ..\..\..\components\drivers\usb\usbhost\core\usbhost_core.c - - - - - udisk.c - 1 - ..\..\..\components\drivers\usb\usbhost\class\udisk.c - - - - - driver.c - 1 - ..\..\..\components\drivers\usb\usbhost\core\driver.c - - - - - mass.c - 1 - ..\..\..\components\drivers\usb\usbhost\class\mass.c - - - - - SAL - - - netdev.c - 1 - ..\..\..\components\net\netdev\src\netdev.c - - - - - netdev_ipaddr.c - 1 - ..\..\..\components\net\netdev\src\netdev_ipaddr.c - - - - - af_inet_at.c - 1 - ..\..\..\components\net\sal_socket\impl\af_inet_at.c - - - - - sal_socket.c - 1 - ..\..\..\components\net\sal_socket\src\sal_socket.c - - - - - net_sockets.c - 1 - ..\..\..\components\net\sal_socket\socket\net_sockets.c - - - - - dfs_net.c - 1 - ..\..\..\components\net\sal_socket\dfs_net\dfs_net.c - - - - - net_netdb.c - 1 - ..\..\..\components\net\sal_socket\socket\net_netdb.c - - - - - Sensors - - - sensor_cmd.c - 1 - ..\..\..\components\drivers\sensors\sensor_cmd.c - - - - - sensor.c - 1 - ..\..\..\components\drivers\sensors\sensor.c - - - - - UTest - - - utest.c - 1 - ..\..\..\components\utilities\utest\utest.c - - - - - - -
diff --git a/bsp/nuvoton/numaker-iot-m487/project.uvprojx b/bsp/nuvoton/numaker-iot-m487/project.uvprojx deleted file mode 100644 index bf9144d3c4..0000000000 --- a/bsp/nuvoton/numaker-iot-m487/project.uvprojx +++ /dev/null @@ -1,1809 +0,0 @@ - - - 2.1 -
### uVision Project, (C) Keil Software
- - - rtthread-m480 - 0x4 - ARM-ADS - 0 - - - M487JIDAE - Nuvoton - Nuvoton.NuMicro_DFP.1.3.5 - http://www.nuvoton.com/hq/enu/Documents/KEILSoftwarePack - IRAM(0x20000000,0x28000) IROM(0x00000000,0x80000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) - - - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0M481_AP_512 -FS00 -FL080000 -FP0($$Device:M487JIDAE$Flash\M481_AP_512.FLM)) - 0 - $$Device:M487JIDAE$Device\M480\Include\M480.h - - - - - - - - - - $$Device:M487JIDAE$SVD\Nuvoton\M481_v1.svd - 0 - 0 - - - - - - - 0 - 0 - 0 - 0 - 1 - - .\build\keil5\ - rtthread - 1 - 0 - 1 - 1 - 1 - .\build\keil5\ - 1 - 0 - 0 - - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 1 - 0 - fromelf.exe --bin --output "$L@L.bin" "$L@L.axf" - - 0 - 0 - 0 - 0 - - 0 - - - - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 3 - - - 1 - - - SARMCM3.DLL - - DARMCM1.DLL - - SARMCM3.DLL - - TARMCM1.DLL - - - - - 1 - 0 - 0 - 0 - 16 - - - - - 1 - 0 - 0 - 1 - 1 - 4103 - - 1 - NULink\Nu_Link.dll - "" () - - - - - 0 - - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 1 - 0 - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - "Cortex-M4" - - 0 - 0 - 0 - 1 - 1 - 0 - 0 - 2 - 0 - 0 - 0 - 8 - 0 - 0 - 0 - 0 - 3 - 3 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 1 - 0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x20000000 - 0x28000 - - - 1 - 0x0 - 0x80000 - - - 0 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x80000 - - - 1 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x20000000 - 0x28000 - - - 0 - 0x0 - 0x0 - - - - - - 1 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - - --c99 - __RTTHREAD__, RT_USING_ARM_LIBC, __CLK_TCK=RT_TICK_PER_SECOND - - applications;.;..\..\..\components\net\at\include;..\..\..\components\net\at\at_socket;..\libraries\m480\CMSIS\Include;..\..\..\components\libc\compilers\common;..\..\..\components\libc\compilers\common\nogcc;..\..\..\libcpu\arm\common;..\..\..\libcpu\arm\cortex-m4;..\..\..\components\drivers\audio;..\..\..\components\drivers\include;..\..\..\components\drivers\hwcrypto;.;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\spi;..\..\..\components\drivers\include;..\..\..\components\drivers\spi\sfud\inc;..\..\..\components\drivers\include;..\..\..\components\drivers\include;board;board\NuClockConfig;board\NuPinConfig;..\libraries\m480\Device\Nuvoton\M480\Include;..\libraries\m480\rtt_port;..\..\..\components\dfs\include;..\..\..\components\dfs\filesystems\devfs;..\..\..\components\dfs\filesystems\elmfat;..\..\..\components\finsh;.;..\..\..\include;..\libraries\m480\StdDriver\inc;..\libraries\m480\USBHostLib\inc;..\libraries\nu_packages\BMX055;..\libraries\nu_packages\BMX055\libraries\BMA2x2_driver;..\libraries\nu_packages\BMX055\libraries\BMG160_driver;..\libraries\nu_packages\BMX055\libraries\BMM050_driver;..\libraries\nu_packages\Demo;..\libraries\nu_packages\AudioCodec;..\libraries\nu_packages\NuUtils\inc;..\..\..\components\libc\posix\io;..\..\..\components\libc\posix\io\poll;..\..\..\components\libc\posix\ipc;..\..\..\components\drivers\usb\usbdevice;..\..\..\components\drivers\usb\usbhost;..\..\..\components\drivers\usb\usbhost\class;..\..\..\components\drivers\usb\usbhost\core;..\..\..\components\drivers\usb\usbhost\include;..\..\..\components\drivers\include;..\..\..\components\net\netdev\include;..\..\..\components\net\sal_socket\include;..\..\..\components\net\sal_socket\include\socket;..\..\..\components\net\sal_socket\impl;..\..\..\components\net\sal_socket\include\dfs_net;..\..\..\components\net\sal_socket\include\socket\sys_socket;..\..\..\components\drivers\sensors;..\..\..\components\drivers\include;..\..\..\components\utilities\utest;..\..\..\examples\utest\testcases\kernel - - - - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - - - - 0 - 0 - 0 - 0 - 1 - 0 - 0x00000000 - 0x20000000 - - .\linking_scripts\m480_flash.sct - - - - - - - - - - - Applications - - - mnt.c - 1 - applications\mnt.c - - - - - main.c - 1 - applications\main.c - - - - - AT - - - at_client.c - 1 - ..\..\..\components\net\at\src\at_client.c - - - - - at_cli.c - 1 - ..\..\..\components\net\at\src\at_cli.c - - - - - at_utils.c - 1 - ..\..\..\components\net\at\src\at_utils.c - - - - - at_socket.c - 1 - ..\..\..\components\net\at\at_socket\at_socket.c - - - - - Compiler - - - syscall_mem.c - 1 - ..\..\..\components\libc\compilers\armlibc\syscall_mem.c - - - - - syscalls.c - 1 - ..\..\..\components\libc\compilers\armlibc\syscalls.c - - - - - libc_syms.c - 1 - ..\..\..\components\libc\compilers\armlibc\libc_syms.c - - - - - time.c - 1 - ..\..\..\components\libc\compilers\common\time.c - - - - - stdlib.c - 1 - ..\..\..\components\libc\compilers\common\stdlib.c - - - - - CPU - - - showmem.c - 1 - ..\..\..\libcpu\arm\common\showmem.c - - - - - backtrace.c - 1 - ..\..\..\libcpu\arm\common\backtrace.c - - - - - div0.c - 1 - ..\..\..\libcpu\arm\common\div0.c - - - - - context_rvds.S - 2 - ..\..\..\libcpu\arm\cortex-m4\context_rvds.S - - - - - cpuport.c - 1 - ..\..\..\libcpu\arm\cortex-m4\cpuport.c - - - - - DeviceDrivers - - - audio.c - 1 - ..\..\..\components\drivers\audio\audio.c - - - - - audio_pipe.c - 1 - ..\..\..\components\drivers\audio\audio_pipe.c - - - - - can.c - 1 - ..\..\..\components\drivers\can\can.c - - - - - hw_symmetric.c - 1 - ..\..\..\components\drivers\hwcrypto\hw_symmetric.c - - - - - hwcrypto.c - 1 - ..\..\..\components\drivers\hwcrypto\hwcrypto.c - - - - - hw_rng.c - 1 - ..\..\..\components\drivers\hwcrypto\hw_rng.c - - - - - hw_crc.c - 1 - ..\..\..\components\drivers\hwcrypto\hw_crc.c - - - - - hw_hash.c - 1 - ..\..\..\components\drivers\hwcrypto\hw_hash.c - - - - - hwtimer.c - 1 - ..\..\..\components\drivers\hwtimer\hwtimer.c - - - - - i2c_core.c - 1 - ..\..\..\components\drivers\i2c\i2c_core.c - - - - - i2c_dev.c - 1 - ..\..\..\components\drivers\i2c\i2c_dev.c - - - - - i2c-bit-ops.c - 1 - ..\..\..\components\drivers\i2c\i2c-bit-ops.c - - - - - adc.c - 1 - ..\..\..\components\drivers\misc\adc.c - - - - - rt_drv_pwm.c - 1 - ..\..\..\components\drivers\misc\rt_drv_pwm.c - - - - - pin.c - 1 - ..\..\..\components\drivers\misc\pin.c - - - - - lptimer.c - 1 - ..\..\..\components\drivers\pm\lptimer.c - - - - - pm.c - 1 - ..\..\..\components\drivers\pm\pm.c - - - - - rtc.c - 1 - ..\..\..\components\drivers\rtc\rtc.c - - - - - serial.c - 1 - ..\..\..\components\drivers\serial\serial.c - - - - - sfud.c - 1 - ..\..\..\components\drivers\spi\sfud\src\sfud.c - - - - - spi_core.c - 1 - ..\..\..\components\drivers\spi\spi_core.c - - - - - sfud_sfdp.c - 1 - ..\..\..\components\drivers\spi\sfud\src\sfud_sfdp.c - - - - - spi_dev.c - 1 - ..\..\..\components\drivers\spi\spi_dev.c - - - - - qspi_core.c - 1 - ..\..\..\components\drivers\spi\qspi_core.c - - - - - spi_flash_sfud.c - 1 - ..\..\..\components\drivers\spi\spi_flash_sfud.c - - - - - waitqueue.c - 1 - ..\..\..\components\drivers\src\waitqueue.c - - - - - dataqueue.c - 1 - ..\..\..\components\drivers\src\dataqueue.c - - - - - workqueue.c - 1 - ..\..\..\components\drivers\src\workqueue.c - - - - - pipe.c - 1 - ..\..\..\components\drivers\src\pipe.c - - - - - completion.c - 1 - ..\..\..\components\drivers\src\completion.c - - - - - ringblk_buf.c - 1 - ..\..\..\components\drivers\src\ringblk_buf.c - - - - - ringbuffer.c - 1 - ..\..\..\components\drivers\src\ringbuffer.c - - - - - watchdog.c - 1 - ..\..\..\components\drivers\watchdog\watchdog.c - - - - - - - --c99 - - - - - - - - - - Drivers - - - nutool_pincfg.c - 1 - board\NuPinConfig\nutool_pincfg.c - - - - - nutool_modclkcfg.c - 1 - board\NuClockConfig\nutool_modclkcfg.c - - - - - board_dev.c - 1 - board\board_dev.c - - - - - system_M480.c - 1 - ..\libraries\m480\Device\Nuvoton\M480\Source\system_M480.c - - - - - startup_M480.s - 2 - ..\libraries\m480\Device\Nuvoton\M480\Source\ARM\startup_M480.s - - - - - drv_crypto.c - 1 - ..\libraries\m480\rtt_port\drv_crypto.c - - - - - drv_gpio.c - 1 - ..\libraries\m480\rtt_port\drv_gpio.c - - - - - drv_spii2s.c - 1 - ..\libraries\m480\rtt_port\drv_spii2s.c - - - - - drv_ui2c.c - 1 - ..\libraries\m480\rtt_port\drv_ui2c.c - - - - - drv_hsotg.c - 1 - ..\libraries\m480\rtt_port\drv_hsotg.c - - - - - drv_timer.c - 1 - ..\libraries\m480\rtt_port\drv_timer.c - - - - - drv_wdt.c - 1 - ..\libraries\m480\rtt_port\drv_wdt.c - - - - - drv_rtc.c - 1 - ..\libraries\m480\rtt_port\drv_rtc.c - - - - - drv_timer_capture.c - 1 - ..\libraries\m480\rtt_port\drv_timer_capture.c - - - - - drv_hsusbd.c - 1 - ..\libraries\m480\rtt_port\drv_hsusbd.c - - - - - drv_i2c.c - 1 - ..\libraries\m480\rtt_port\drv_i2c.c - - - - - drv_epwm.c - 1 - ..\libraries\m480\rtt_port\drv_epwm.c - - - - - drv_tpwm.c - 1 - ..\libraries\m480\rtt_port\drv_tpwm.c - - - - - drv_bpwm_capture.c - 1 - ..\libraries\m480\rtt_port\drv_bpwm_capture.c - - - - - drv_ecap.c - 1 - ..\libraries\m480\rtt_port\drv_ecap.c - - - - - drv_crc.c - 1 - ..\libraries\m480\rtt_port\drv_crc.c - - - - - drv_epwm_capture.c - 1 - ..\libraries\m480\rtt_port\drv_epwm_capture.c - - - - - drv_common.c - 1 - ..\libraries\m480\rtt_port\drv_common.c - - - - - drv_can.c - 1 - ..\libraries\m480\rtt_port\drv_can.c - - - - - drv_softi2c.c - 1 - ..\libraries\m480\rtt_port\drv_softi2c.c - - - - - drv_qei.c - 1 - ..\libraries\m480\rtt_port\drv_qei.c - - - - - drv_bpwm.c - 1 - ..\libraries\m480\rtt_port\drv_bpwm.c - - - - - drv_eadc.c - 1 - ..\libraries\m480\rtt_port\drv_eadc.c - - - - - drv_i2s.c - 1 - ..\libraries\m480\rtt_port\drv_i2s.c - - - - - drv_pdma.c - 1 - ..\libraries\m480\rtt_port\drv_pdma.c - - - - - drv_uart.c - 1 - ..\libraries\m480\rtt_port\drv_uart.c - - - - - drv_clk.c - 1 - ..\libraries\m480\rtt_port\drv_clk.c - - - - - drv_usbd.c - 1 - ..\libraries\m480\rtt_port\drv_usbd.c - - - - - drv_sdh.c - 1 - ..\libraries\m480\rtt_port\drv_sdh.c - - - - - drv_fmc.c - 1 - ..\libraries\m480\rtt_port\drv_fmc.c - - - - - drv_uuart.c - 1 - ..\libraries\m480\rtt_port\drv_uuart.c - - - - - drv_ebi.c - 1 - ..\libraries\m480\rtt_port\drv_ebi.c - - - - - drv_spi.c - 1 - ..\libraries\m480\rtt_port\drv_spi.c - - - - - drv_scuart.c - 1 - ..\libraries\m480\rtt_port\drv_scuart.c - - - - - drv_emac.c - 1 - ..\libraries\m480\rtt_port\drv_emac.c - - - - - drv_usbhost.c - 1 - ..\libraries\m480\rtt_port\drv_usbhost.c - - - - - drv_uspi.c - 1 - ..\libraries\m480\rtt_port\drv_uspi.c - - - - - drv_qspi.c - 1 - ..\libraries\m480\rtt_port\drv_qspi.c - - - - - drv_trng.c - 1 - ..\libraries\m480\rtt_port\drv_trng.c - - - - - Filesystem - - - dfs_posix.c - 1 - ..\..\..\components\dfs\src\dfs_posix.c - - - - - dfs_fs.c - 1 - ..\..\..\components\dfs\src\dfs_fs.c - - - - - dfs.c - 1 - ..\..\..\components\dfs\src\dfs.c - - - - - dfs_file.c - 1 - ..\..\..\components\dfs\src\dfs_file.c - - - - - devfs.c - 1 - ..\..\..\components\dfs\filesystems\devfs\devfs.c - - - - - ffunicode.c - 1 - ..\..\..\components\dfs\filesystems\elmfat\ffunicode.c - - - - - ff.c - 1 - ..\..\..\components\dfs\filesystems\elmfat\ff.c - - - - - dfs_elm.c - 1 - ..\..\..\components\dfs\filesystems\elmfat\dfs_elm.c - - - - - Finsh - - - shell.c - 1 - ..\..\..\components\finsh\shell.c - - - - - msh.c - 1 - ..\..\..\components\finsh\msh.c - - - - - msh_file.c - 1 - ..\..\..\components\finsh\msh_file.c - - - - - cmd.c - 1 - ..\..\..\components\finsh\cmd.c - - - - - Kernel - - - device.c - 1 - ..\..\..\src\device.c - - - - - idle.c - 1 - ..\..\..\src\idle.c - - - - - object.c - 1 - ..\..\..\src\object.c - - - - - mem.c - 1 - ..\..\..\src\mem.c - - - - - signal.c - 1 - ..\..\..\src\signal.c - - - - - components.c - 1 - ..\..\..\src\components.c - - - - - mempool.c - 1 - ..\..\..\src\mempool.c - - - - - timer.c - 1 - ..\..\..\src\timer.c - - - - - irq.c - 1 - ..\..\..\src\irq.c - - - - - ipc.c - 1 - ..\..\..\src\ipc.c - - - - - scheduler.c - 1 - ..\..\..\src\scheduler.c - - - - - kservice.c - 1 - ..\..\..\src\kservice.c - - - - - thread.c - 1 - ..\..\..\src\thread.c - - - - - clock.c - 1 - ..\..\..\src\clock.c - - - - - Libraries - - - nu_sys.c - 1 - ..\libraries\m480\StdDriver\src\nu_sys.c - - - - - nu_clk.c - 1 - ..\libraries\m480\StdDriver\src\nu_clk.c - - - - - nu_usci_i2c.c - 1 - ..\libraries\m480\StdDriver\src\nu_usci_i2c.c - - - - - nu_bpwm.c - 1 - ..\libraries\m480\StdDriver\src\nu_bpwm.c - - - - - nu_gpio.c - 1 - ..\libraries\m480\StdDriver\src\nu_gpio.c - - - - - nu_usbd.c - 1 - ..\libraries\m480\StdDriver\src\nu_usbd.c - - - - - nu_rtc.c - 1 - ..\libraries\m480\StdDriver\src\nu_rtc.c - - - - - nu_fmc.c - 1 - ..\libraries\m480\StdDriver\src\nu_fmc.c - - - - - nu_crc.c - 1 - ..\libraries\m480\StdDriver\src\nu_crc.c - - - - - nu_emac.c - 1 - ..\libraries\m480\StdDriver\src\nu_emac.c - - - - - nu_timer.c - 1 - ..\libraries\m480\StdDriver\src\nu_timer.c - - - - - nu_qei.c - 1 - ..\libraries\m480\StdDriver\src\nu_qei.c - - - - - nu_trng.c - 1 - ..\libraries\m480\StdDriver\src\nu_trng.c - - - - - nu_qspi.c - 1 - ..\libraries\m480\StdDriver\src\nu_qspi.c - - - - - nu_pdma.c - 1 - ..\libraries\m480\StdDriver\src\nu_pdma.c - - - - - nu_spi.c - 1 - ..\libraries\m480\StdDriver\src\nu_spi.c - - - - - nu_can.c - 1 - ..\libraries\m480\StdDriver\src\nu_can.c - - - - - nu_epwm.c - 1 - ..\libraries\m480\StdDriver\src\nu_epwm.c - - - - - nu_wdt.c - 1 - ..\libraries\m480\StdDriver\src\nu_wdt.c - - - - - nu_i2c.c - 1 - ..\libraries\m480\StdDriver\src\nu_i2c.c - - - - - nu_ebi.c - 1 - ..\libraries\m480\StdDriver\src\nu_ebi.c - - - - - nu_acmp.c - 1 - ..\libraries\m480\StdDriver\src\nu_acmp.c - - - - - nu_crypto.c - 1 - ..\libraries\m480\StdDriver\src\nu_crypto.c - - - - - nu_hsusbd.c - 1 - ..\libraries\m480\StdDriver\src\nu_hsusbd.c - - - - - nu_sdh.c - 1 - ..\libraries\m480\StdDriver\src\nu_sdh.c - - - - - nu_sc.c - 1 - ..\libraries\m480\StdDriver\src\nu_sc.c - - - - - nu_ecap.c - 1 - ..\libraries\m480\StdDriver\src\nu_ecap.c - - - - - nu_usci_spi.c - 1 - ..\libraries\m480\StdDriver\src\nu_usci_spi.c - - - - - nu_scuart.c - 1 - ..\libraries\m480\StdDriver\src\nu_scuart.c - - - - - nu_spim.c - 1 - ..\libraries\m480\StdDriver\src\nu_spim.c - - - - - nu_eadc.c - 1 - ..\libraries\m480\StdDriver\src\nu_eadc.c - - - - - nu_usci_uart.c - 1 - ..\libraries\m480\StdDriver\src\nu_usci_uart.c - - - - - nu_timer_pwm.c - 1 - ..\libraries\m480\StdDriver\src\nu_timer_pwm.c - - - - - nu_uart.c - 1 - ..\libraries\m480\StdDriver\src\nu_uart.c - - - - - nu_ccap.c - 1 - ..\libraries\m480\StdDriver\src\nu_ccap.c - - - - - nu_dac.c - 1 - ..\libraries\m480\StdDriver\src\nu_dac.c - - - - - nu_wwdt.c - 1 - ..\libraries\m480\StdDriver\src\nu_wwdt.c - - - - - nu_i2s.c - 1 - ..\libraries\m480\StdDriver\src\nu_i2s.c - - - - - m480_usbhostlib - - - ohci.c - 1 - ..\libraries\m480\USBHostLib\src\ohci.c - - - - - ehci.c - 1 - ..\libraries\m480\USBHostLib\src\ehci.c - - - - - ehci_iso.c - 1 - ..\libraries\m480\USBHostLib\src\ehci_iso.c - - - - - mem_alloc.c - 1 - ..\libraries\m480\USBHostLib\src\mem_alloc.c - - - - - usb_core.c - 1 - ..\libraries\m480\USBHostLib\src\usb_core.c - - - - - nu_pkgs_bmx055 - - - bmg160.c - 1 - ..\libraries\nu_packages\BMX055\libraries\BMG160_driver\bmg160.c - - - - - bma2x2.c - 1 - ..\libraries\nu_packages\BMX055\libraries\BMA2x2_driver\bma2x2.c - - - - - sensor_bmx055.c - 1 - ..\libraries\nu_packages\BMX055\sensor_bmx055.c - - - - - bmm050.c - 1 - ..\libraries\nu_packages\BMX055\libraries\BMM050_driver\bmm050.c - - - - - nu_pkgs_demo - - - usbd_cdc_vcom_echo.c - 1 - ..\libraries\nu_packages\Demo\usbd_cdc_vcom_echo.c - - - - - slcd_show_tick.c - 1 - ..\libraries\nu_packages\Demo\slcd_show_tick.c - - - - - usbd_hid_dance_mouse.c - 1 - ..\libraries\nu_packages\Demo\usbd_hid_dance_mouse.c - - - - - nu_pkgs_nau88l25 - - - audio_test.c - 1 - ..\libraries\nu_packages\AudioCodec\audio_test.c - - - - - acodec_nau88l25.c - 1 - ..\libraries\nu_packages\AudioCodec\acodec_nau88l25.c - - - - - POSIX - - - select.c - 1 - ..\..\..\components\libc\posix\io\select.c - - - - - poll.c - 1 - ..\..\..\components\libc\posix\io\poll\poll.c - - - - - rt_usbd - - - usbdevice_core.c - 1 - ..\..\..\components\drivers\usb\usbdevice\core\usbdevice_core.c - - - - - usbdevice.c - 1 - ..\..\..\components\drivers\usb\usbdevice\core\usbdevice.c - - - - - hid.c - 1 - ..\..\..\components\drivers\usb\usbdevice\class\hid.c - - - - - rt_usbh - - - mass.c - 1 - ..\..\..\components\drivers\usb\usbhost\class\mass.c - - - - - hub.c - 1 - ..\..\..\components\drivers\usb\usbhost\core\hub.c - - - - - usbhost.c - 1 - ..\..\..\components\drivers\usb\usbhost\core\usbhost.c - - - - - usbhost_core.c - 1 - ..\..\..\components\drivers\usb\usbhost\core\usbhost_core.c - - - - - udisk.c - 1 - ..\..\..\components\drivers\usb\usbhost\class\udisk.c - - - - - driver.c - 1 - ..\..\..\components\drivers\usb\usbhost\core\driver.c - - - - - SAL - - - netdev.c - 1 - ..\..\..\components\net\netdev\src\netdev.c - - - - - netdev_ipaddr.c - 1 - ..\..\..\components\net\netdev\src\netdev_ipaddr.c - - - - - dfs_net.c - 1 - ..\..\..\components\net\sal_socket\dfs_net\dfs_net.c - - - - - net_sockets.c - 1 - ..\..\..\components\net\sal_socket\socket\net_sockets.c - - - - - sal_socket.c - 1 - ..\..\..\components\net\sal_socket\src\sal_socket.c - - - - - af_inet_at.c - 1 - ..\..\..\components\net\sal_socket\impl\af_inet_at.c - - - - - net_netdb.c - 1 - ..\..\..\components\net\sal_socket\socket\net_netdb.c - - - - - Sensors - - - sensor_cmd.c - 1 - ..\..\..\components\drivers\sensors\sensor_cmd.c - - - - - sensor.c - 1 - ..\..\..\components\drivers\sensors\sensor.c - - - - - UTest - - - utest.c - 1 - ..\..\..\components\utilities\utest\utest.c - - - - - - - - - - - - - - - - - - -
diff --git a/bsp/nuvoton/numaker-iot-m487/rtconfig.h b/bsp/nuvoton/numaker-iot-m487/rtconfig.h deleted file mode 100644 index 670d11e494..0000000000 --- a/bsp/nuvoton/numaker-iot-m487/rtconfig.h +++ /dev/null @@ -1,400 +0,0 @@ -#ifndef RT_CONFIG_H__ -#define RT_CONFIG_H__ - -/* Automatically generated file; DO NOT EDIT. */ -/* RT-Thread Configuration */ - -/* RT-Thread Kernel */ - -#define RT_NAME_MAX 8 -#define RT_ALIGN_SIZE 4 -#define RT_THREAD_PRIORITY_32 -#define RT_THREAD_PRIORITY_MAX 32 -#define RT_TICK_PER_SECOND 1000 -#define RT_USING_OVERFLOW_CHECK -#define RT_USING_HOOK -#define RT_HOOK_USING_FUNC_PTR -#define RT_USING_IDLE_HOOK -#define RT_IDLE_HOOK_LIST_SIZE 4 -#define IDLE_THREAD_STACK_SIZE 1024 - -/* kservice optimization */ - -#define RT_DEBUG -#define RT_DEBUG_COLOR - -/* Inter-Thread communication */ - -#define RT_USING_SEMAPHORE -#define RT_USING_MUTEX -#define RT_USING_EVENT -#define RT_USING_MAILBOX -#define RT_USING_MESSAGEQUEUE -#define RT_USING_SIGNALS - -/* Memory Management */ - -#define RT_USING_MEMPOOL -#define RT_USING_SMALL_MEM -#define RT_USING_SMALL_MEM_AS_HEAP -#define RT_USING_HEAP - -/* Kernel Device Object */ - -#define RT_USING_DEVICE -#define RT_USING_CONSOLE -#define RT_CONSOLEBUF_SIZE 256 -#define RT_CONSOLE_DEVICE_NAME "uart0" -#define RT_VER_NUM 0x40100 -#define ARCH_ARM -#define RT_USING_CPU_FFS -#define ARCH_ARM_CORTEX_M -#define ARCH_ARM_CORTEX_M4 - -/* RT-Thread Components */ - -#define RT_USING_COMPONENTS_INIT -#define RT_USING_USER_MAIN -#define RT_MAIN_THREAD_STACK_SIZE 2048 -#define RT_MAIN_THREAD_PRIORITY 10 - -/* C++ features */ - - -/* Command shell */ - -#define RT_USING_FINSH -#define RT_USING_MSH -#define FINSH_USING_MSH -#define FINSH_THREAD_NAME "tshell" -#define FINSH_THREAD_PRIORITY 20 -#define FINSH_THREAD_STACK_SIZE 2048 -#define FINSH_USING_HISTORY -#define FINSH_HISTORY_LINES 5 -#define FINSH_USING_SYMTAB -#define FINSH_CMD_SIZE 80 -#define MSH_USING_BUILT_IN_COMMANDS -#define FINSH_USING_DESCRIPTION -#define FINSH_ARG_MAX 10 - -/* Device virtual file system */ - -#define RT_USING_DFS -#define DFS_USING_POSIX -#define DFS_USING_WORKDIR -#define DFS_FILESYSTEMS_MAX 8 -#define DFS_FILESYSTEM_TYPES_MAX 4 -#define DFS_FD_MAX 32 -#define RT_USING_DFS_ELMFAT - -/* elm-chan's FatFs, Generic FAT Filesystem Module */ - -#define RT_DFS_ELM_CODE_PAGE 437 -#define RT_DFS_ELM_WORD_ACCESS -#define RT_DFS_ELM_USE_LFN_3 -#define RT_DFS_ELM_USE_LFN 3 -#define RT_DFS_ELM_LFN_UNICODE_0 -#define RT_DFS_ELM_LFN_UNICODE 0 -#define RT_DFS_ELM_MAX_LFN 255 -#define RT_DFS_ELM_DRIVES 8 -#define RT_DFS_ELM_MAX_SECTOR_SIZE 4096 -#define RT_DFS_ELM_REENTRANT -#define RT_DFS_ELM_MUTEX_TIMEOUT 3000 -#define RT_USING_DFS_DEVFS - -/* Device Drivers */ - -#define RT_USING_DEVICE_IPC -#define RT_USING_SYSTEM_WORKQUEUE -#define RT_SYSTEM_WORKQUEUE_STACKSIZE 2048 -#define RT_SYSTEM_WORKQUEUE_PRIORITY 23 -#define RT_USING_SERIAL -#define RT_USING_SERIAL_V1 -#define RT_SERIAL_USING_DMA -#define RT_SERIAL_RB_BUFSZ 2048 -#define RT_USING_CAN -#define RT_USING_HWTIMER -#define RT_USING_I2C -#define RT_USING_I2C_BITOPS -#define RT_USING_PIN -#define RT_USING_ADC -#define RT_USING_PWM -#define RT_USING_PM -#define PM_TICKLESS_THRESHOLD_TIME 2 -#define RT_USING_RTC -#define RT_USING_SPI -#define RT_USING_QSPI -#define RT_USING_SFUD -#define RT_SFUD_USING_SFDP -#define RT_SFUD_USING_FLASH_INFO_TABLE -#define RT_SFUD_SPI_MAX_HZ 50000000 -#define RT_USING_WDT -#define RT_USING_AUDIO -#define RT_AUDIO_REPLAY_MP_BLOCK_SIZE 4096 -#define RT_AUDIO_REPLAY_MP_BLOCK_COUNT 2 -#define RT_AUDIO_RECORD_PIPE_SIZE 2048 -#define RT_USING_SENSOR -#define RT_USING_SENSOR_CMD -#define RT_USING_HWCRYPTO -#define RT_HWCRYPTO_DEFAULT_NAME "hwcryto" -#define RT_HWCRYPTO_IV_MAX_SIZE 16 -#define RT_HWCRYPTO_KEYBIT_MAX_SIZE 256 -#define RT_HWCRYPTO_USING_AES -#define RT_HWCRYPTO_USING_AES_ECB -#define RT_HWCRYPTO_USING_AES_CBC -#define RT_HWCRYPTO_USING_AES_CFB -#define RT_HWCRYPTO_USING_AES_CTR -#define RT_HWCRYPTO_USING_AES_OFB -#define RT_HWCRYPTO_USING_DES -#define RT_HWCRYPTO_USING_DES_ECB -#define RT_HWCRYPTO_USING_DES_CBC -#define RT_HWCRYPTO_USING_3DES -#define RT_HWCRYPTO_USING_3DES_ECB -#define RT_HWCRYPTO_USING_3DES_CBC -#define RT_HWCRYPTO_USING_SHA1 -#define RT_HWCRYPTO_USING_SHA2 -#define RT_HWCRYPTO_USING_SHA2_224 -#define RT_HWCRYPTO_USING_SHA2_256 -#define RT_HWCRYPTO_USING_SHA2_384 -#define RT_HWCRYPTO_USING_SHA2_512 -#define RT_HWCRYPTO_USING_RNG -#define RT_HWCRYPTO_USING_CRC -#define RT_HWCRYPTO_USING_CRC_07 -#define RT_HWCRYPTO_USING_CRC_8005 -#define RT_HWCRYPTO_USING_CRC_1021 -#define RT_HWCRYPTO_USING_CRC_04C11DB7 - -/* Using USB */ - -#define RT_USING_USB -#define RT_USING_USB_HOST -#define RT_USBH_MSTORAGE -#define UDISK_MOUNTPOINT "/mnt/udisk/" -#define RT_USING_USB_DEVICE -#define RT_USBD_THREAD_STACK_SZ 4096 -#define USB_VENDOR_ID 0x0FFE -#define USB_PRODUCT_ID 0x0001 -#define _RT_USB_DEVICE_HID -#define RT_USB_DEVICE_HID -#define RT_USB_DEVICE_HID_MOUSE - -/* POSIX layer and C standard library */ - -#define RT_LIBC_DEFAULT_TIMEZONE 8 - -/* POSIX (Portable Operating System Interface) layer */ - -#define RT_USING_POSIX_FS -#define RT_USING_POSIX_DEVIO -#define RT_USING_POSIX_POLL -#define RT_USING_POSIX_SELECT - -/* Interprocess Communication (IPC) */ - - -/* Socket is in the 'Network' category */ - -/* Network */ - -/* Socket abstraction layer */ - -#define RT_USING_SAL -#define SAL_INTERNET_CHECK - -/* protocol stack implement */ - -#define SAL_USING_AT -#define SAL_USING_POSIX - -/* Network interface device */ - -#define RT_USING_NETDEV -#define NETDEV_USING_IFCONFIG -#define NETDEV_USING_PING -#define NETDEV_USING_NETSTAT -#define NETDEV_USING_AUTO_DEFAULT -#define NETDEV_IPV4 1 -#define NETDEV_IPV6 0 - -/* light weight TCP/IP stack */ - - -/* AT commands */ - -#define RT_USING_AT -#define AT_USING_CLIENT -#define AT_CLIENT_NUM_MAX 1 -#define AT_USING_SOCKET -#define AT_USING_CLI -#define AT_CMD_MAX_LEN 512 -#define AT_SW_VERSION_NUM 0x10301 - -/* VBUS(Virtual Software BUS) */ - - -/* Utilities */ - -#define RT_USING_UTEST -#define UTEST_THR_STACK_SIZE 4096 -#define UTEST_THR_PRIORITY 20 - -/* RT-Thread Utestcases */ - - -/* RT-Thread online packages */ - -/* IoT - internet of things */ - - -/* Wi-Fi */ - -/* Marvell WiFi */ - - -/* Wiced WiFi */ - -#define PKG_USING_AT_DEVICE -#define AT_DEVICE_USING_ESP8266 -#define AT_DEVICE_ESP8266_INIT_ASYN -#define PKG_USING_AT_DEVICE_LATEST_VERSION -#define PKG_AT_DEVICE_VER_NUM 0x99999 - -/* IoT Cloud */ - - -/* security packages */ - - -/* language packages */ - - -/* multimedia packages */ - -/* LVGL: powerful and easy-to-use embedded GUI library */ - - -/* u8g2: a monochrome graphic library */ - - -/* PainterEngine: A cross-platform graphics application framework written in C language */ - - -/* tools packages */ - - -/* system packages */ - -/* enhanced kernel services */ - - -/* POSIX extension functions */ - - -/* acceleration: Assembly language or algorithmic acceleration packages */ - - -/* CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */ - - -/* Micrium: Micrium software products porting for RT-Thread */ - -#define PKG_USING_FAL -#define FAL_DEBUG_CONFIG -#define FAL_DEBUG 1 -#define FAL_PART_HAS_TABLE_CFG -#define PKG_USING_FAL_LATEST_VERSION -#define PKG_FAL_VER_NUM 0x99999 - -/* peripheral libraries and drivers */ - - -/* AI packages */ - - -/* miscellaneous packages */ - -/* samples: kernel and components samples */ - - -/* entertainment: terminal games and other interesting software packages */ - - -/* Nuvoton Packages Config */ - -#define NU_PKG_USING_UTILS -#define NU_PKG_USING_DEMO -#define NU_PKG_USING_BMX055 -#define NU_PKG_USING_NAU88L25 - -/* Hardware Drivers Config */ - -/* On-chip Peripheral Drivers */ - -#define SOC_SERIES_M480 -#define BSP_USE_STDDRIVER_SOURCE -#define BSP_USING_PDMA -#define NU_PDMA_MEMFUN_ACTOR_MAX 2 -#define NU_PDMA_SGTBL_POOL_SIZE 16 -#define BSP_USING_FMC -#define BSP_USING_GPIO -#define BSP_USING_CLK -#define NU_CLK_INVOKE_WKTMR -#define BSP_USING_RTC -#define NU_RTC_SUPPORT_MSH_CMD -#define BSP_USING_TMR -#define BSP_USING_UART -#define BSP_USING_UART0 -#define BSP_USING_UART1 -#define BSP_USING_UART1_TX_DMA -#define BSP_USING_UART1_RX_DMA -#define BSP_USING_UART2 -#define BSP_USING_UART2_TX_DMA -#define BSP_USING_UART2_RX_DMA -#define BSP_USING_I2C -#define BSP_USING_I2C0 -#define BSP_USING_I2C1 -#define BSP_USING_I2C2 -#define BSP_USING_USCI -#define BSP_USING_UUART -#define BSP_USING_USCI0 -#define BSP_USING_UUART0 -#define BSP_USING_UUART0_TX_DMA -#define BSP_USING_UUART0_RX_DMA -#define BSP_USING_SDH -#define BSP_USING_SDH0 -#define NU_SDH_USING_PDMA -#define NU_SDH_HOTPLUG -#define BSP_USING_SPI -#define BSP_USING_SPI_PDMA -#define BSP_USING_SPI0_NONE -#define BSP_USING_SPI1 -#define BSP_USING_SPI1_PDMA -#define BSP_USING_SPI2 -#define BSP_USING_SPI3_NONE -#define BSP_USING_I2S -#define NU_I2S_DMA_FIFO_SIZE 2048 -#define BSP_USING_QSPI -#define BSP_USING_QSPI0 -#define BSP_USING_CRYPTO -#define BSP_USING_TRNG -#define BSP_USING_CRC -#define NU_CRC_USE_PDMA -#define BSP_USING_WDT -#define BSP_USING_USBD -#define BSP_USING_HSUSBH -#define NU_USBHOST_HUB_POLLING_INTERVAL 100 - -/* On-board Peripheral Drivers */ - -#define BSP_USING_NULINKME -#define BOARD_USING_ESP8266 -#define BOARD_USING_BMX055 -#define BOARD_USING_NAU88L25 -#define BOARD_USING_STORAGE_SDCARD -#define BOARD_USING_STORAGE_SPIFLASH -#define BOARD_USING_HSUSBH_USBD - -/* Board extended module drivers */ - - -#endif diff --git a/bsp/nuvoton/numaker-iot-m487/rtconfig.py b/bsp/nuvoton/numaker-iot-m487/rtconfig.py index 902a2bdce9..7beeafe88a 100644 --- a/bsp/nuvoton/numaker-iot-m487/rtconfig.py +++ b/bsp/nuvoton/numaker-iot-m487/rtconfig.py @@ -130,3 +130,11 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = '' + +def dist_handle(BSP_ROOT, dist_dir): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT, dist_dir) + diff --git a/bsp/nuvoton/numaker-m032ki/.config b/bsp/nuvoton/numaker-m032ki/.config index acdfc2eb88..13bed80dd6 100644 --- a/bsp/nuvoton/numaker-m032ki/.config +++ b/bsp/nuvoton/numaker-m032ki/.config @@ -797,3 +797,5 @@ CONFIG_BSP_USING_NULINKME=y # Board extended module drivers # # CONFIG_BOARD_USING_STORAGE_SPIFLASH is not set +CONFIG_BOARD_USE_UTEST=y +CONFIG_UTEST_CMD_PREFIX="bsp.nuvoton.numaker-m032ki.test.utest." diff --git a/bsp/nuvoton/numaker-m032ki/Kconfig b/bsp/nuvoton/numaker-m032ki/Kconfig index 5c55e87c61..b396340d12 100644 --- a/bsp/nuvoton/numaker-m032ki/Kconfig +++ b/bsp/nuvoton/numaker-m032ki/Kconfig @@ -18,12 +18,6 @@ config PKGS_DIR option env="PKGS_ROOT" default "packages" -config NU_PKGS_DIR - string - option env="NU_PKGS_ROOT" - default "../libraries/nu_packages" - source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" -source "$NU_PKGS_DIR/Kconfig" source "$BSP_DIR/board/Kconfig" diff --git a/bsp/nuvoton/numaker-m032ki/board/Kconfig b/bsp/nuvoton/numaker-m032ki/board/Kconfig index a3f0437b7b..bc112e0583 100644 --- a/bsp/nuvoton/numaker-m032ki/board/Kconfig +++ b/bsp/nuvoton/numaker-m032ki/board/Kconfig @@ -24,4 +24,5 @@ menu "Hardware Drivers Config" endmenu + source "$BSP_DIR/../libraries/nu_packages/Kconfig" endmenu diff --git a/bsp/nuvoton/numaker-m032ki/project.uvprojx b/bsp/nuvoton/numaker-m032ki/project.uvprojx deleted file mode 100644 index dbefa40af7..0000000000 --- a/bsp/nuvoton/numaker-m032ki/project.uvprojx +++ /dev/null @@ -1,1228 +0,0 @@ - - - 2.1 -
### uVision Project, (C) Keil Software
- - - rtthread-m031 - 0x4 - ARM-ADS - 5060750::V5.06 update 6 (build 750)::ARMCC - 5060750::V5.06 update 6 (build 750)::ARMCC - 0 - - - M032KIAAE - Nuvoton - Nuvoton.NuMicro_DFP.1.3.10 - http://www.nuvoton.com/hq/enu/Documents/KEILSoftwarePack - IRAM(0x20000000,0x18000) IROM(0x00000000,0x80000) CPUTYPE("Cortex-M0") CLOCK(12000000) - - - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0M031_AP_512 -FS00 -FL080000 -FP0($$Device:M032KIAAE$Flash\M031_AP_512.FLM)) - 0 - $$Device:M032KIAAE$Device\M031\Include\M031Series.h - - - - - - - - - - $$Device:M032KIAAE$SVD\Nuvoton\M031AE_v1.svd - 0 - 0 - - - - - - - 0 - 0 - 0 - 0 - 1 - - .\build\keil5\ - rtthread - 1 - 0 - 1 - 1 - 1 - .\build\keil5\ - 1 - 0 - 0 - - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 1 - 1 - fromelf --bin ".\build\keil5\\@L.axf" --output ".\build\keil5\\@L.bin" - fromelf --text -c ".\build\keil5\\@L.axf" --output ".\build\keil5\\@L.txt" - 0 - 0 - 0 - 0 - - 1 - - - - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 3 - - - 1 - - - SARMCM3.DLL - - DARMCM1.DLL - -pCM0 - SARMCM3.DLL - - TARMCM1.DLL - -pCM0 - - - - 1 - 0 - 0 - 0 - 16 - - - - - 1 - 0 - 0 - 1 - 1 - 4103 - - 1 - NULink\Nu_Link.dll - "" () - - - - - 0 - - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 1 - 0 - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - "Cortex-M0" - - 0 - 0 - 0 - 1 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 8 - 0 - 0 - 0 - 0 - 3 - 3 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x20000000 - 0x18000 - - - 1 - 0x0 - 0x80000 - - - 0 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x80000 - - - 1 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x20000000 - 0x18000 - - - 0 - 0x0 - 0x0 - - - - - - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 1 - 0 - 0 - 5 - 3 - 0 - 0 - 0 - 1 - 0 - - - __RTTHREAD__, RT_USING_ARM_LIBC, __CLK_TCK=RT_TICK_PER_SECOND - - applications;.;board;board\NuClockConfig;board\NuPinConfig;..\libraries\m031\CMSIS\Include;..\..\..\components\libc\compilers\common;..\..\..\components\libc\compilers\common\nogcc;..\..\..\libcpu\arm\common;..\..\..\libcpu\arm\cortex-m0;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\libraries\m031\Device\Nuvoton\M031\Include;..\libraries\m031\rtt_port;..\..\..\components\dfs\include;..\..\..\components\dfs\filesystems\devfs;..\..\..\components\finsh;.;..\..\..\include;..\libraries\m031\StdDriver\inc;..\libraries\nu_packages\Demo;..\libraries\nu_packages\NuUtils\inc;..\..\..\components\libc\posix\io\poll;..\..\..\components\libc\posix\ipc;..\..\..\components\drivers\usb\usbdevice;..\..\..\components\utilities\utest;..\..\..\examples\utest\testcases\kernel;..\..\..\examples\utest\testcases\utest - - - - 1 - 0 - 0 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - 0 - 0 - 0 - 0 - 1 - 0 - 0x00000000 - 0x20000000 - - .\linking_scripts\m031_flash.sct - - - - - - - - - - - Applications - - - main.c - 1 - applications\main.c - - - - - mnt.c - 1 - applications\mnt.c - - - - - board - - - nutool_pincfg.c - 1 - board\NuPinConfig\nutool_pincfg.c - - - - - nutool_modclkcfg.c - 1 - board\NuClockConfig\nutool_modclkcfg.c - - - - - board_dev.c - 1 - board\board_dev.c - - - - - Compiler - - - libc_syms.c - 1 - ..\..\..\components\libc\compilers\armlibc\libc_syms.c - - - - - syscalls.c - 1 - ..\..\..\components\libc\compilers\armlibc\syscalls.c - - - - - syscall_mem.c - 1 - ..\..\..\components\libc\compilers\armlibc\syscall_mem.c - - - - - stdlib.c - 1 - ..\..\..\components\libc\compilers\common\stdlib.c - - - - - time.c - 1 - ..\..\..\components\libc\compilers\common\time.c - - - - - CPU - - - showmem.c - 1 - ..\..\..\libcpu\arm\common\showmem.c - - - - - backtrace.c - 1 - ..\..\..\libcpu\arm\common\backtrace.c - - - - - div0.c - 1 - ..\..\..\libcpu\arm\common\div0.c - - - - - context_rvds.S - 2 - ..\..\..\libcpu\arm\cortex-m0\context_rvds.S - - - - - cpuport.c - 1 - ..\..\..\libcpu\arm\cortex-m0\cpuport.c - - - - - DeviceDrivers - - - hwtimer.c - 1 - ..\..\..\components\drivers\hwtimer\hwtimer.c - - - - - adc.c - 1 - ..\..\..\components\drivers\misc\adc.c - - - - - rt_drv_pwm.c - 1 - ..\..\..\components\drivers\misc\rt_drv_pwm.c - - - - - pin.c - 1 - ..\..\..\components\drivers\misc\pin.c - - - - - lptimer.c - 1 - ..\..\..\components\drivers\pm\lptimer.c - - - - - pm.c - 1 - ..\..\..\components\drivers\pm\pm.c - - - - - rtc.c - 1 - ..\..\..\components\drivers\rtc\rtc.c - - - - - serial.c - 1 - ..\..\..\components\drivers\serial\serial.c - - - - - dataqueue.c - 1 - ..\..\..\components\drivers\src\dataqueue.c - - - - - pipe.c - 1 - ..\..\..\components\drivers\src\pipe.c - - - - - ringbuffer.c - 1 - ..\..\..\components\drivers\src\ringbuffer.c - - - - - workqueue.c - 1 - ..\..\..\components\drivers\src\workqueue.c - - - - - waitqueue.c - 1 - ..\..\..\components\drivers\src\waitqueue.c - - - - - ringblk_buf.c - 1 - ..\..\..\components\drivers\src\ringblk_buf.c - - - - - completion.c - 1 - ..\..\..\components\drivers\src\completion.c - - - - - watchdog.c - 1 - ..\..\..\components\drivers\watchdog\watchdog.c - - - - - Drivers - - - system_M031Series.c - 1 - ..\libraries\m031\Device\Nuvoton\M031\Source\system_M031Series.c - - - - - startup_M031Series.s - 2 - ..\libraries\m031\Device\Nuvoton\M031\Source\ARM\startup_M031Series.s - - - - - drv_timer.c - 1 - ..\libraries\m031\rtt_port\drv_timer.c - - - - - drv_bpwm_capture.c - 1 - ..\libraries\m031\rtt_port\drv_bpwm_capture.c - - - - - drv_pwm_capture.c - 1 - ..\libraries\m031\rtt_port\drv_pwm_capture.c - - - - - drv_ebi.c - 1 - ..\libraries\m031\rtt_port\drv_ebi.c - - - - - drv_adc.c - 1 - ..\libraries\m031\rtt_port\drv_adc.c - - - - - drv_common.c - 1 - ..\libraries\m031\rtt_port\drv_common.c - - - - - drv_uuart.c - 1 - ..\libraries\m031\rtt_port\drv_uuart.c - - - - - drv_wdt.c - 1 - ..\libraries\m031\rtt_port\drv_wdt.c - - - - - drv_uspi.c - 1 - ..\libraries\m031\rtt_port\drv_uspi.c - - - - - drv_qspi.c - 1 - ..\libraries\m031\rtt_port\drv_qspi.c - - - - - drv_spi.c - 1 - ..\libraries\m031\rtt_port\drv_spi.c - - - - - drv_fmc.c - 1 - ..\libraries\m031\rtt_port\drv_fmc.c - - - - - drv_crc.c - 1 - ..\libraries\m031\rtt_port\drv_crc.c - - - - - drv_i2c.c - 1 - ..\libraries\m031\rtt_port\drv_i2c.c - - - - - drv_gpio.c - 1 - ..\libraries\m031\rtt_port\drv_gpio.c - - - - - drv_timer_capture.c - 1 - ..\libraries\m031\rtt_port\drv_timer_capture.c - - - - - drv_crypto.c - 1 - ..\libraries\m031\rtt_port\drv_crypto.c - - - - - drv_rtc.c - 1 - ..\libraries\m031\rtt_port\drv_rtc.c - - - - - drv_bpwm.c - 1 - ..\libraries\m031\rtt_port\drv_bpwm.c - - - - - drv_uart.c - 1 - ..\libraries\m031\rtt_port\drv_uart.c - - - - - drv_spii2s.c - 1 - ..\libraries\m031\rtt_port\drv_spii2s.c - - - - - drv_pdma.c - 1 - ..\libraries\m031\rtt_port\drv_pdma.c - - - - - drv_pwm.c - 1 - ..\libraries\m031\rtt_port\drv_pwm.c - - - - - drv_softi2c.c - 1 - ..\libraries\m031\rtt_port\drv_softi2c.c - - - - - drv_clk.c - 1 - ..\libraries\m031\rtt_port\drv_clk.c - - - - - drv_ui2c.c - 1 - ..\libraries\m031\rtt_port\drv_ui2c.c - - - - - drv_usbd.c - 1 - ..\libraries\m031\rtt_port\drv_usbd.c - - - - - Filesystem - - - dfs_posix.c - 1 - ..\..\..\components\dfs\src\dfs_posix.c - - - - - dfs_fs.c - 1 - ..\..\..\components\dfs\src\dfs_fs.c - - - - - dfs.c - 1 - ..\..\..\components\dfs\src\dfs.c - - - - - dfs_file.c - 1 - ..\..\..\components\dfs\src\dfs_file.c - - - - - devfs.c - 1 - ..\..\..\components\dfs\filesystems\devfs\devfs.c - - - - - Finsh - - - shell.c - 1 - ..\..\..\components\finsh\shell.c - - - - - msh.c - 1 - ..\..\..\components\finsh\msh.c - - - - - msh_file.c - 1 - ..\..\..\components\finsh\msh_file.c - - - - - cmd.c - 1 - ..\..\..\components\finsh\cmd.c - - - - - Kernel - - - scheduler.c - 1 - ..\..\..\src\scheduler.c - - - - - idle.c - 1 - ..\..\..\src\idle.c - - - - - object.c - 1 - ..\..\..\src\object.c - - - - - clock.c - 1 - ..\..\..\src\clock.c - - - - - mem.c - 1 - ..\..\..\src\mem.c - - - - - timer.c - 1 - ..\..\..\src\timer.c - - - - - device.c - 1 - ..\..\..\src\device.c - - - - - irq.c - 1 - ..\..\..\src\irq.c - - - - - kservice.c - 1 - ..\..\..\src\kservice.c - - - - - components.c - 1 - ..\..\..\src\components.c - - - - - mempool.c - 1 - ..\..\..\src\mempool.c - - - - - thread.c - 1 - ..\..\..\src\thread.c - - - - - ipc.c - 1 - ..\..\..\src\ipc.c - - - - - Libraries - - - nu_ebi.c - 1 - ..\libraries\m031\StdDriver\src\nu_ebi.c - - - - - nu_adc.c - 1 - ..\libraries\m031\StdDriver\src\nu_adc.c - - - - - nu_clk.c - 1 - ..\libraries\m031\StdDriver\src\nu_clk.c - - - - - nu_uart.c - 1 - ..\libraries\m031\StdDriver\src\nu_uart.c - - - - - nu_usbd.c - 1 - ..\libraries\m031\StdDriver\src\nu_usbd.c - - - - - nu_pdma.c - 1 - ..\libraries\m031\StdDriver\src\nu_pdma.c - - - - - nu_i2c.c - 1 - ..\libraries\m031\StdDriver\src\nu_i2c.c - - - - - nu_spi.c - 1 - ..\libraries\m031\StdDriver\src\nu_spi.c - - - - - nu_wwdt.c - 1 - ..\libraries\m031\StdDriver\src\nu_wwdt.c - - - - - nu_pwm.c - 1 - ..\libraries\m031\StdDriver\src\nu_pwm.c - - - - - nu_rtc.c - 1 - ..\libraries\m031\StdDriver\src\nu_rtc.c - - - - - nu_bpwm.c - 1 - ..\libraries\m031\StdDriver\src\nu_bpwm.c - - - - - nu_usci_i2c.c - 1 - ..\libraries\m031\StdDriver\src\nu_usci_i2c.c - - - - - nu_gpio.c - 1 - ..\libraries\m031\StdDriver\src\nu_gpio.c - - - - - nu_usci_spi.c - 1 - ..\libraries\m031\StdDriver\src\nu_usci_spi.c - - - - - nu_wdt.c - 1 - ..\libraries\m031\StdDriver\src\nu_wdt.c - - - - - nu_usci_uart.c - 1 - ..\libraries\m031\StdDriver\src\nu_usci_uart.c - - - - - nu_sys.c - 1 - ..\libraries\m031\StdDriver\src\nu_sys.c - - - - - nu_qspi.c - 1 - ..\libraries\m031\StdDriver\src\nu_qspi.c - - - - - nu_timer.c - 1 - ..\libraries\m031\StdDriver\src\nu_timer.c - - - - - nu_acmp.c - 1 - ..\libraries\m031\StdDriver\src\nu_acmp.c - - - - - nu_fmc.c - 1 - ..\libraries\m031\StdDriver\src\nu_fmc.c - - - - - nu_crc.c - 1 - ..\libraries\m031\StdDriver\src\nu_crc.c - - - - - nu_pkgs_demo - - - usbd_cdc_vcom_echo.c - 1 - ..\libraries\nu_packages\Demo\usbd_cdc_vcom_echo.c - - - - - slcd_show_tick.c - 1 - ..\libraries\nu_packages\Demo\slcd_show_tick.c - - - - - usbd_hid_dance_mouse.c - 1 - ..\libraries\nu_packages\Demo\usbd_hid_dance_mouse.c - - - - - rt_usbd - - - usbdevice_core.c - 1 - ..\..\..\components\drivers\usb\usbdevice\core\usbdevice_core.c - - - - - usbdevice.c - 1 - ..\..\..\components\drivers\usb\usbdevice\core\usbdevice.c - - - - - hid.c - 1 - ..\..\..\components\drivers\usb\usbdevice\class\hid.c - - - - - UTest - - - utest.c - 1 - ..\..\..\components\utilities\utest\utest.c - - - - - utestcases - - - mem_tc.c - 1 - ..\..\..\examples\utest\testcases\kernel\mem_tc.c - - - - - pass_tc.c - 1 - ..\..\..\examples\utest\testcases\utest\pass_tc.c - - - - - - - - - - - -
diff --git a/bsp/nuvoton/numaker-m032ki/rtconfig.h b/bsp/nuvoton/numaker-m032ki/rtconfig.h deleted file mode 100644 index f2184d36fa..0000000000 --- a/bsp/nuvoton/numaker-m032ki/rtconfig.h +++ /dev/null @@ -1,286 +0,0 @@ -#ifndef RT_CONFIG_H__ -#define RT_CONFIG_H__ - -/* Automatically generated file; DO NOT EDIT. */ -/* RT-Thread Configuration */ - -/* RT-Thread Kernel */ - -#define RT_NAME_MAX 8 -#define RT_ALIGN_SIZE 4 -#define RT_THREAD_PRIORITY_32 -#define RT_THREAD_PRIORITY_MAX 32 -#define RT_TICK_PER_SECOND 1000 -#define RT_USING_OVERFLOW_CHECK -#define RT_USING_HOOK -#define RT_HOOK_USING_FUNC_PTR -#define RT_USING_IDLE_HOOK -#define RT_IDLE_HOOK_LIST_SIZE 4 -#define IDLE_THREAD_STACK_SIZE 512 -#define RT_USING_TIMER_SOFT -#define RT_TIMER_THREAD_PRIO 4 -#define RT_TIMER_THREAD_STACK_SIZE 512 - -/* kservice optimization */ - -#define RT_DEBUG - -/* Inter-Thread communication */ - -#define RT_USING_SEMAPHORE -#define RT_USING_MUTEX -#define RT_USING_EVENT -#define RT_USING_MAILBOX -#define RT_USING_MESSAGEQUEUE - -/* Memory Management */ - -#define RT_USING_MEMPOOL -#define RT_USING_SMALL_MEM -#define RT_USING_SMALL_MEM_AS_HEAP -#define RT_USING_HEAP - -/* Kernel Device Object */ - -#define RT_USING_DEVICE -#define RT_USING_CONSOLE -#define RT_CONSOLEBUF_SIZE 256 -#define RT_CONSOLE_DEVICE_NAME "uart0" -#define RT_VER_NUM 0x40100 -#define ARCH_ARM -#define ARCH_ARM_CORTEX_M -#define ARCH_ARM_CORTEX_M0 - -/* RT-Thread Components */ - -#define RT_USING_COMPONENTS_INIT -#define RT_USING_USER_MAIN -#define RT_MAIN_THREAD_STACK_SIZE 2048 -#define RT_MAIN_THREAD_PRIORITY 10 - -/* C++ features */ - - -/* Command shell */ - -#define RT_USING_FINSH -#define RT_USING_MSH -#define FINSH_USING_MSH -#define FINSH_THREAD_NAME "tshell" -#define FINSH_THREAD_PRIORITY 20 -#define FINSH_THREAD_STACK_SIZE 4096 -#define FINSH_USING_HISTORY -#define FINSH_HISTORY_LINES 5 -#define FINSH_USING_SYMTAB -#define FINSH_CMD_SIZE 80 -#define MSH_USING_BUILT_IN_COMMANDS -#define FINSH_USING_DESCRIPTION -#define FINSH_ARG_MAX 10 - -/* Device virtual file system */ - -#define RT_USING_DFS -#define DFS_USING_POSIX -#define DFS_USING_WORKDIR -#define DFS_FILESYSTEMS_MAX 2 -#define DFS_FILESYSTEM_TYPES_MAX 2 -#define DFS_FD_MAX 16 -#define RT_USING_DFS_DEVFS - -/* Device Drivers */ - -#define RT_USING_DEVICE_IPC -#define RT_USING_SERIAL -#define RT_USING_SERIAL_V1 -#define RT_SERIAL_USING_DMA -#define RT_SERIAL_RB_BUFSZ 64 -#define RT_USING_HWTIMER -#define RT_USING_PIN -#define RT_USING_ADC -#define RT_USING_PWM -#define RT_USING_PM -#define PM_TICKLESS_THRESHOLD_TIME 2 -#define RT_USING_RTC -#define RT_USING_WDT - -/* Using USB */ - -#define RT_USING_USB -#define RT_USING_USB_DEVICE -#define RT_USBD_THREAD_STACK_SZ 4096 -#define USB_VENDOR_ID 0x0FFE -#define USB_PRODUCT_ID 0x0001 -#define RT_USB_DEVICE_COMPOSITE -#define RT_USB_DEVICE_NONE -#define RT_USB_DEVICE_HID -#define RT_USB_DEVICE_HID_MOUSE - -/* POSIX layer and C standard library */ - -#define RT_LIBC_DEFAULT_TIMEZONE 8 - -/* POSIX (Portable Operating System Interface) layer */ - - -/* Interprocess Communication (IPC) */ - - -/* Socket is in the 'Network' category */ - -/* Network */ - -/* Socket abstraction layer */ - - -/* Network interface device */ - - -/* light weight TCP/IP stack */ - - -/* AT commands */ - - -/* VBUS(Virtual Software BUS) */ - - -/* Utilities */ - -#define RT_USING_UTEST -#define UTEST_THR_STACK_SIZE 4096 -#define UTEST_THR_PRIORITY 20 - -/* RT-Thread Utestcases */ - -#define RT_USING_UTESTCASES - -/* Utest Self Testcase */ - -#define UTEST_SELF_PASS_TC - -/* Kernel Testcase */ - -#define UTEST_SMALL_MEM_TC - -/* Utest Serial Testcase */ - - -/* RT-Thread online packages */ - -/* IoT - internet of things */ - - -/* Wi-Fi */ - -/* Marvell WiFi */ - - -/* Wiced WiFi */ - - -/* IoT Cloud */ - - -/* security packages */ - - -/* language packages */ - - -/* multimedia packages */ - -/* LVGL: powerful and easy-to-use embedded GUI library */ - - -/* u8g2: a monochrome graphic library */ - - -/* PainterEngine: A cross-platform graphics application framework written in C language */ - - -/* tools packages */ - - -/* system packages */ - -/* enhanced kernel services */ - - -/* POSIX extension functions */ - - -/* acceleration: Assembly language or algorithmic acceleration packages */ - - -/* CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */ - - -/* Micrium: Micrium software products porting for RT-Thread */ - - -/* peripheral libraries and drivers */ - - -/* AI packages */ - - -/* miscellaneous packages */ - -/* samples: kernel and components samples */ - - -/* entertainment: terminal games and other interesting software packages */ - - -/* Nuvoton Packages Config */ - -#define NU_PKG_USING_UTILS -#define NU_PKG_USING_DEMO - -/* Hardware Drivers Config */ - -/* On-chip Peripheral Drivers */ - -#define SOC_SERIES_M032 -#define BSP_USE_STDDRIVER_SOURCE -#define BSP_USING_PDMA -#define NU_PDMA_MEMFUN_ACTOR_MAX 4 -#define NU_PDMA_SGTBL_POOL_SIZE 16 -#define BSP_USING_GPIO -#define BSP_USING_CLK -#define NU_CLK_INVOKE_WKTMR -#define BSP_USING_RTC -#define NU_RTC_SUPPORT_IO_RW -#define NU_RTC_SUPPORT_MSH_CMD -#define BSP_USING_ADC -#define BSP_USING_ADC0 -#define BSP_USING_TMR -#define BSP_USING_TIMER -#define BSP_USING_TMR0 -#define BSP_USING_TIMER0 -#define BSP_USING_TMR1 -#define BSP_USING_TIMER1 -#define BSP_USING_TMR2 -#define BSP_USING_TIMER2 -#define BSP_USING_UART -#define BSP_USING_UART0 -#define BSP_USING_UART1 -#define BSP_USING_UART1_TX_DMA -#define BSP_USING_UART1_RX_DMA -#define BSP_USING_UART2 -#define BSP_USING_UART3 -#define BSP_USING_UART4 -#define BSP_USING_UART5 -#define BSP_USING_UART6 -#define BSP_USING_UART7 -#define BSP_USING_WDT -#define BSP_USING_USBD - -/* On-board Peripheral Drivers */ - -#define BSP_USING_NULINKME - -/* Board extended module drivers */ - - -#endif diff --git a/bsp/nuvoton/numaker-m032ki/rtconfig.py b/bsp/nuvoton/numaker-m032ki/rtconfig.py index bc7ec5b5c1..1061a7f5fd 100644 --- a/bsp/nuvoton/numaker-m032ki/rtconfig.py +++ b/bsp/nuvoton/numaker-m032ki/rtconfig.py @@ -122,3 +122,11 @@ elif PLATFORM == 'iar': EXEC_PATH += '/arm/bin/' POST_ACTION = '' + +def dist_handle(BSP_ROOT, dist_dir): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT, dist_dir) + diff --git a/bsp/nuvoton/numaker-m2354/.config b/bsp/nuvoton/numaker-m2354/.config index 0ff7f7a969..12f8e22bcc 100644 --- a/bsp/nuvoton/numaker-m2354/.config +++ b/bsp/nuvoton/numaker-m2354/.config @@ -557,6 +557,7 @@ CONFIG_PKG_AT_DEVICE_VER_NUM=0x99999 # CONFIG_PKG_USING_MCURSES is not set # CONFIG_PKG_USING_TERMBOX is not set # CONFIG_PKG_USING_VT100 is not set +# CONFIG_PKG_USING_QRCODE is not set # # tools packages @@ -567,7 +568,6 @@ CONFIG_PKG_AT_DEVICE_VER_NUM=0x99999 # CONFIG_PKG_USING_SYSTEMVIEW is not set # CONFIG_PKG_USING_SEGGER_RTT is not set # CONFIG_PKG_USING_RDB is not set -# CONFIG_PKG_USING_QRCODE is not set # CONFIG_PKG_USING_ULOG_EASYFLASH is not set # CONFIG_PKG_USING_ULOG_FILE is not set # CONFIG_PKG_USING_LOGMGR is not set @@ -618,6 +618,7 @@ CONFIG_PKG_AT_DEVICE_VER_NUM=0x99999 # CONFIG_PKG_USING_POSIX_GETLINE is not set # CONFIG_PKG_USING_POSIX_WCWIDTH is not set # CONFIG_PKG_USING_POSIX_ITOA is not set +# CONFIG_PKG_USING_POSIX_STRINGS is not set # # acceleration: Assembly language or algorithmic acceleration packages @@ -652,14 +653,14 @@ CONFIG_FAL_DEBUG_CONFIG=y CONFIG_FAL_DEBUG=1 CONFIG_FAL_PART_HAS_TABLE_CFG=y # CONFIG_FAL_USING_SFUD_PORT is not set -CONFIG_PKG_USING_FAL_V00500=y +# CONFIG_PKG_USING_FAL_V00500 is not set # CONFIG_PKG_USING_FAL_V00400 is not set # CONFIG_PKG_USING_FAL_V00300 is not set # CONFIG_PKG_USING_FAL_V00200 is not set # CONFIG_PKG_USING_FAL_V00100 is not set -# CONFIG_PKG_USING_FAL_LATEST_VERSION is not set -CONFIG_PKG_FAL_VER="v0.5.0" -CONFIG_PKG_FAL_VER_NUM=0x00500 +CONFIG_PKG_USING_FAL_LATEST_VERSION=y +CONFIG_PKG_FAL_VER="latest" +CONFIG_PKG_FAL_VER_NUM=0x99999 # CONFIG_PKG_USING_FLASHDB is not set # CONFIG_PKG_USING_SQLITE is not set # CONFIG_PKG_USING_RTI is not set @@ -742,6 +743,7 @@ CONFIG_PKG_FAL_VER_NUM=0x00500 # CONFIG_PKG_USING_SSD1306 is not set # CONFIG_PKG_USING_QKEY is not set # CONFIG_PKG_USING_RS485 is not set +# CONFIG_PKG_USING_RS232 is not set # CONFIG_PKG_USING_NES is not set # CONFIG_PKG_USING_VIRTUAL_SENSOR is not set # CONFIG_PKG_USING_VDEVICE is not set @@ -829,19 +831,8 @@ CONFIG_PKG_FAL_VER_NUM=0x00500 # CONFIG_PKG_USING_LWGPS is not set # CONFIG_PKG_USING_STATE_MACHINE is not set # CONFIG_PKG_USING_DESIGN_PATTERN is not set - -# -# Nuvoton Packages Config -# -CONFIG_NU_PKG_USING_UTILS=y -CONFIG_NU_PKG_USING_DEMO=y -# CONFIG_NU_PKG_USING_BMX055 is not set -# CONFIG_NU_PKG_USING_MAX31875 is not set -# CONFIG_NU_PKG_USING_NAU88L25 is not set -# CONFIG_NU_PKG_USING_NAU8822 is not set -# CONFIG_NU_PKG_USING_DA9062 is not set -# CONFIG_NU_PKG_USING_ILI9341 is not set -# CONFIG_NU_PKG_USING_SPINAND is not set +# CONFIG_PKG_USING_CONTROLLER is not set +# CONFIG_PKG_USING_PHASE_LOCKED_LOOP is not set # # Hardware Drivers Config @@ -947,3 +938,18 @@ CONFIG_BOARD_USING_OTG=y # Board extended module drivers # CONFIG_BOARD_USING_SEGMENT_LCD=y + +# +# Nuvoton Packages Config +# +CONFIG_NU_PKG_USING_UTILS=y +CONFIG_NU_PKG_USING_DEMO=y +# CONFIG_NU_PKG_USING_BMX055 is not set +# CONFIG_NU_PKG_USING_MAX31875 is not set +# CONFIG_NU_PKG_USING_NAU88L25 is not set +# CONFIG_NU_PKG_USING_NAU8822 is not set +# CONFIG_NU_PKG_USING_DA9062 is not set +# CONFIG_NU_PKG_USING_ILI9341 is not set +# CONFIG_NU_PKG_USING_SPINAND is not set +CONFIG_BOARD_USE_UTEST=y +CONFIG_UTEST_CMD_PREFIX="bsp.nuvoton.numaker-m2354.test.utest." diff --git a/bsp/nuvoton/numaker-m2354/Kconfig b/bsp/nuvoton/numaker-m2354/Kconfig index 90354447b3..b396340d12 100644 --- a/bsp/nuvoton/numaker-m2354/Kconfig +++ b/bsp/nuvoton/numaker-m2354/Kconfig @@ -9,7 +9,7 @@ config RTT_DIR string option env="RTT_ROOT" default "../../.." - + # you can change the RTT_ROOT default "../../.." to your rtthread_root, # example : default "F:/git_repositories/rt-thread" @@ -18,12 +18,6 @@ config PKGS_DIR option env="PKGS_ROOT" default "packages" -config NU_PKGS_DIR - string - option env="NU_PKGS_ROOT" - default "../libraries/nu_packages" - source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" -source "$NU_PKGS_DIR/Kconfig" source "$BSP_DIR/board/Kconfig" diff --git a/bsp/nuvoton/numaker-m2354/board/Kconfig b/bsp/nuvoton/numaker-m2354/board/Kconfig index a3e751aa42..3c71934493 100644 --- a/bsp/nuvoton/numaker-m2354/board/Kconfig +++ b/bsp/nuvoton/numaker-m2354/board/Kconfig @@ -68,4 +68,6 @@ menu "Hardware Drivers Config" endmenu + source "$BSP_DIR/../libraries/nu_packages/Kconfig" + endmenu diff --git a/bsp/nuvoton/numaker-m2354/project.uvprojx b/bsp/nuvoton/numaker-m2354/project.uvprojx deleted file mode 100644 index c15ccbb19a..0000000000 --- a/bsp/nuvoton/numaker-m2354/project.uvprojx +++ /dev/null @@ -1,1768 +0,0 @@ - - - 2.1 -
### uVision Project, (C) Keil Software
- - - rtthread-m2354 - 0x4 - ARM-ADS - 6100001::V6.10.1::.\ARMCLANG - 1 - - - M2354KJFAE - Nuvoton - Nuvoton.NuMicro_DFP.1.3.10 - http://www.nuvoton.com/hq/enu/Documents/KEILSoftwarePack - IRAM(0x20000000,0x40000) IROM(0x00000000,0x100000) CPUTYPE("Cortex-M23") TZ CLOCK(12000000) ESEL ELITTLE - - - UL2V8M(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0M2354_AP_1M -FS00 -FL0100000 -FP0($$Device:M2354KJFAE$Flash\M2354_AP_1M.FLM)) - 0 - $$Device:M2354KJFAE$Device\M2354\Include\M2354.h - - - - - - - - - - $$Device:M2354KJFAE$SVD\Nuvoton\M2354.svd - 0 - 0 - - - - - - - 0 - 0 - 0 - 0 - 1 - - .\build\keil5\ - rtthread - 1 - 0 - 1 - 1 - 1 - .\build\keil5\ - 1 - 0 - 0 - - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 1 - 1 - fromelf --bin ".\build\keil5\\@L.axf" --output ".\build\keil5\\@L.bin" - fromelf --text -c ".\build\keil5\\@L.axf" --output ".\build\keil5\\@L.txt" - 0 - 0 - 0 - 0 - - 1 - - - - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 3 - - - 1 - - - - - - - SARMV8M.DLL - -MPU - TCM.DLL - -pCM23 - - - - 1 - 0 - 0 - 0 - 16 - - - - - 1 - 0 - 0 - 1 - 1 - 4101 - - 1 - BIN\UL2V8M.DLL - "" () - - - - - 0 - - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 1 - 0 - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - "Cortex-M23" - - 0 - 0 - 0 - 1 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 8 - 0 - 1 - 0 - 0 - 3 - 3 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 1 - 0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x20000000 - 0x40000 - - - 1 - 0x0 - 0x100000 - - - 0 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x100000 - - - 1 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x20000000 - 0x40000 - - - 0 - 0x0 - 0x0 - - - - - - 1 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 0 - 5 - 3 - 0 - 0 - 0 - 1 - 0 - - - __RTTHREAD__, RT_USING_ARM_LIBC, __CLK_TCK=RT_TICK_PER_SECOND - - applications;.;..\..\..\components\net\at\include;..\..\..\components\net\at\at_socket;board;board\NuClockConfig;board\NuPinConfig;..\libraries\m2354\CMSIS\Include;..\..\..\components\libc\compilers\common;..\..\..\components\libc\compilers\common\nogcc;..\..\..\libcpu\arm\common;..\..\..\libcpu\arm\cortex-m23;..\..\..\components\drivers\audio;..\..\..\components\drivers\include;..\..\..\components\drivers\hwcrypto;.;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\spi;..\..\..\components\drivers\include;..\..\..\components\drivers\spi\sfud\inc;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\libraries\m2354\Device\Nuvoton\M2354\Include;..\libraries\m2354\rtt_port;..\..\..\components\dfs\include;..\..\..\components\dfs\filesystems\devfs;..\..\..\components\dfs\filesystems\elmfat;..\..\..\components\finsh;.;..\..\..\include;..\libraries\m2354\StdDriver\inc;..\libraries\m2354\USBHostLib\inc;..\libraries\nu_packages\Demo;..\libraries\nu_packages\SLCD;..\libraries\nu_packages\NuUtils\inc;..\..\..\components\libc\posix\io;..\..\..\components\libc\posix\io\poll;..\..\..\components\libc\posix\ipc;..\..\..\components\drivers\usb\usbdevice;..\..\..\components\drivers\usb\usbhost;..\..\..\components\drivers\usb\usbhost\class;..\..\..\components\drivers\usb\usbhost\core;..\..\..\components\drivers\usb\usbhost\include;..\..\..\components\drivers\include;..\..\..\components\net\netdev\include;..\..\..\components\net\sal_socket\include;..\..\..\components\net\sal_socket\include\socket;..\..\..\components\net\sal_socket\impl;..\..\..\components\net\sal_socket\include\dfs_net;..\..\..\components\net\sal_socket\include\socket\sys_socket;..\..\..\components\drivers\sensors;..\..\..\components\drivers\include;..\..\..\components\utilities\utest;..\..\..\examples\utest\testcases\kernel - - - - 1 - 0 - 0 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - 0 - 0 - 0 - 0 - 1 - 0 - 0x00000000 - 0x20000000 - - .\linking_scripts\m2354_flash.sct - - - - - - - - - - - Applications - - - main.c - 1 - applications\main.c - - - - - mnt.c - 1 - applications\mnt.c - - - - - AT - - - at_socket.c - 1 - ..\..\..\components\net\at\at_socket\at_socket.c - - - - - at_cli.c - 1 - ..\..\..\components\net\at\src\at_cli.c - - - - - at_utils.c - 1 - ..\..\..\components\net\at\src\at_utils.c - - - - - at_client.c - 1 - ..\..\..\components\net\at\src\at_client.c - - - - - board - - - nutool_pincfg.c - 1 - board\NuPinConfig\nutool_pincfg.c - - - - - board_dev.c - 1 - board\board_dev.c - - - - - nutool_modclkcfg.c - 1 - board\NuClockConfig\nutool_modclkcfg.c - - - - - Compiler - - - syscall_mem.c - 1 - ..\..\..\components\libc\compilers\armlibc\syscall_mem.c - - - - - libc_syms.c - 1 - ..\..\..\components\libc\compilers\armlibc\libc_syms.c - - - - - syscalls.c - 1 - ..\..\..\components\libc\compilers\armlibc\syscalls.c - - - - - stdlib.c - 1 - ..\..\..\components\libc\compilers\common\stdlib.c - - - - - time.c - 1 - ..\..\..\components\libc\compilers\common\time.c - - - - - CPU - - - div0.c - 1 - ..\..\..\libcpu\arm\common\div0.c - - - - - showmem.c - 1 - ..\..\..\libcpu\arm\common\showmem.c - - - - - backtrace.c - 1 - ..\..\..\libcpu\arm\common\backtrace.c - - - - - context_rvds.S - 2 - ..\..\..\libcpu\arm\cortex-m23\context_rvds.S - - - - - cpuport.c - 1 - ..\..\..\libcpu\arm\cortex-m23\cpuport.c - - - - - DeviceDrivers - - - audio_pipe.c - 1 - ..\..\..\components\drivers\audio\audio_pipe.c - - - - - audio.c - 1 - ..\..\..\components\drivers\audio\audio.c - - - - - can.c - 1 - ..\..\..\components\drivers\can\can.c - - - - - hw_symmetric.c - 1 - ..\..\..\components\drivers\hwcrypto\hw_symmetric.c - - - - - hwcrypto.c - 1 - ..\..\..\components\drivers\hwcrypto\hwcrypto.c - - - - - hw_rng.c - 1 - ..\..\..\components\drivers\hwcrypto\hw_rng.c - - - - - hw_crc.c - 1 - ..\..\..\components\drivers\hwcrypto\hw_crc.c - - - - - hw_hash.c - 1 - ..\..\..\components\drivers\hwcrypto\hw_hash.c - - - - - hwtimer.c - 1 - ..\..\..\components\drivers\hwtimer\hwtimer.c - - - - - i2c_core.c - 1 - ..\..\..\components\drivers\i2c\i2c_core.c - - - - - i2c_dev.c - 1 - ..\..\..\components\drivers\i2c\i2c_dev.c - - - - - i2c-bit-ops.c - 1 - ..\..\..\components\drivers\i2c\i2c-bit-ops.c - - - - - adc.c - 1 - ..\..\..\components\drivers\misc\adc.c - - - - - rt_drv_pwm.c - 1 - ..\..\..\components\drivers\misc\rt_drv_pwm.c - - - - - pin.c - 1 - ..\..\..\components\drivers\misc\pin.c - - - - - lptimer.c - 1 - ..\..\..\components\drivers\pm\lptimer.c - - - - - pm.c - 1 - ..\..\..\components\drivers\pm\pm.c - - - - - rtc.c - 1 - ..\..\..\components\drivers\rtc\rtc.c - - - - - serial.c - 1 - ..\..\..\components\drivers\serial\serial.c - - - - - sfud.c - 1 - ..\..\..\components\drivers\spi\sfud\src\sfud.c - - - - - spi_core.c - 1 - ..\..\..\components\drivers\spi\spi_core.c - - - - - sfud_sfdp.c - 1 - ..\..\..\components\drivers\spi\sfud\src\sfud_sfdp.c - - - - - spi_dev.c - 1 - ..\..\..\components\drivers\spi\spi_dev.c - - - - - qspi_core.c - 1 - ..\..\..\components\drivers\spi\qspi_core.c - - - - - spi_flash_sfud.c - 1 - ..\..\..\components\drivers\spi\spi_flash_sfud.c - - - - - workqueue.c - 1 - ..\..\..\components\drivers\src\workqueue.c - - - - - completion.c - 1 - ..\..\..\components\drivers\src\completion.c - - - - - waitqueue.c - 1 - ..\..\..\components\drivers\src\waitqueue.c - - - - - dataqueue.c - 1 - ..\..\..\components\drivers\src\dataqueue.c - - - - - ringblk_buf.c - 1 - ..\..\..\components\drivers\src\ringblk_buf.c - - - - - ringbuffer.c - 1 - ..\..\..\components\drivers\src\ringbuffer.c - - - - - pipe.c - 1 - ..\..\..\components\drivers\src\pipe.c - - - - - watchdog.c - 1 - ..\..\..\components\drivers\watchdog\watchdog.c - - - - - - - -std=c99 - - - - - - - - - - Drivers - - - startup_M2354.s - 2 - ..\libraries\m2354\Device\Nuvoton\M2354\Source\ARM\startup_M2354.s - - - - - system_M2354.c - 1 - ..\libraries\m2354\Device\Nuvoton\M2354\Source\system_M2354.c - - - - - drv_crc.c - 1 - ..\libraries\m2354\rtt_port\drv_crc.c - - - - - drv_usbd.c - 1 - ..\libraries\m2354\rtt_port\drv_usbd.c - - - - - drv_ecap.c - 1 - ..\libraries\m2354\rtt_port\drv_ecap.c - - - - - drv_common.c - 1 - ..\libraries\m2354\rtt_port\drv_common.c - - - - - drv_eadc.c - 1 - ..\libraries\m2354\rtt_port\drv_eadc.c - - - - - drv_pdma.c - 1 - ..\libraries\m2354\rtt_port\drv_pdma.c - - - - - drv_qspi.c - 1 - ..\libraries\m2354\rtt_port\drv_qspi.c - - - - - drv_gpio.c - 1 - ..\libraries\m2354\rtt_port\drv_gpio.c - - - - - drv_tpwm.c - 1 - ..\libraries\m2354\rtt_port\drv_tpwm.c - - - - - drv_spi.c - 1 - ..\libraries\m2354\rtt_port\drv_spi.c - - - - - drv_wdt.c - 1 - ..\libraries\m2354\rtt_port\drv_wdt.c - - - - - drv_bpwm_capture.c - 1 - ..\libraries\m2354\rtt_port\drv_bpwm_capture.c - - - - - drv_spii2s.c - 1 - ..\libraries\m2354\rtt_port\drv_spii2s.c - - - - - drv_bpwm.c - 1 - ..\libraries\m2354\rtt_port\drv_bpwm.c - - - - - drv_usbhost.c - 1 - ..\libraries\m2354\rtt_port\drv_usbhost.c - - - - - drv_epwm.c - 1 - ..\libraries\m2354\rtt_port\drv_epwm.c - - - - - drv_can.c - 1 - ..\libraries\m2354\rtt_port\drv_can.c - - - - - drv_sdh.c - 1 - ..\libraries\m2354\rtt_port\drv_sdh.c - - - - - drv_trng.c - 1 - ..\libraries\m2354\rtt_port\drv_trng.c - - - - - drv_timer.c - 1 - ..\libraries\m2354\rtt_port\drv_timer.c - - - - - drv_fmc.c - 1 - ..\libraries\m2354\rtt_port\drv_fmc.c - - - - - drv_timer_capture.c - 1 - ..\libraries\m2354\rtt_port\drv_timer_capture.c - - - - - drv_softi2c.c - 1 - ..\libraries\m2354\rtt_port\drv_softi2c.c - - - - - drv_uspi.c - 1 - ..\libraries\m2354\rtt_port\drv_uspi.c - - - - - drv_epwm_capture.c - 1 - ..\libraries\m2354\rtt_port\drv_epwm_capture.c - - - - - drv_i2s.c - 1 - ..\libraries\m2354\rtt_port\drv_i2s.c - - - - - drv_uart.c - 1 - ..\libraries\m2354\rtt_port\drv_uart.c - - - - - drv_ebi.c - 1 - ..\libraries\m2354\rtt_port\drv_ebi.c - - - - - drv_clk.c - 1 - ..\libraries\m2354\rtt_port\drv_clk.c - - - - - drv_otg.c - 1 - ..\libraries\m2354\rtt_port\drv_otg.c - - - - - drv_i2c.c - 1 - ..\libraries\m2354\rtt_port\drv_i2c.c - - - - - drv_rtc.c - 1 - ..\libraries\m2354\rtt_port\drv_rtc.c - - - - - drv_scuart.c - 1 - ..\libraries\m2354\rtt_port\drv_scuart.c - - - - - drv_uuart.c - 1 - ..\libraries\m2354\rtt_port\drv_uuart.c - - - - - drv_crypto.c - 1 - ..\libraries\m2354\rtt_port\drv_crypto.c - - - - - drv_qei.c - 1 - ..\libraries\m2354\rtt_port\drv_qei.c - - - - - drv_slcd.c - 1 - ..\libraries\m2354\rtt_port\drv_slcd.c - - - - - drv_ui2c.c - 1 - ..\libraries\m2354\rtt_port\drv_ui2c.c - - - - - Filesystem - - - dfs_posix.c - 1 - ..\..\..\components\dfs\src\dfs_posix.c - - - - - dfs_fs.c - 1 - ..\..\..\components\dfs\src\dfs_fs.c - - - - - dfs.c - 1 - ..\..\..\components\dfs\src\dfs.c - - - - - dfs_file.c - 1 - ..\..\..\components\dfs\src\dfs_file.c - - - - - devfs.c - 1 - ..\..\..\components\dfs\filesystems\devfs\devfs.c - - - - - ffunicode.c - 1 - ..\..\..\components\dfs\filesystems\elmfat\ffunicode.c - - - - - ff.c - 1 - ..\..\..\components\dfs\filesystems\elmfat\ff.c - - - - - dfs_elm.c - 1 - ..\..\..\components\dfs\filesystems\elmfat\dfs_elm.c - - - - - Finsh - - - shell.c - 1 - ..\..\..\components\finsh\shell.c - - - - - msh.c - 1 - ..\..\..\components\finsh\msh.c - - - - - msh_file.c - 1 - ..\..\..\components\finsh\msh_file.c - - - - - cmd.c - 1 - ..\..\..\components\finsh\cmd.c - - - - - Kernel - - - idle.c - 1 - ..\..\..\src\idle.c - - - - - timer.c - 1 - ..\..\..\src\timer.c - - - - - mempool.c - 1 - ..\..\..\src\mempool.c - - - - - signal.c - 1 - ..\..\..\src\signal.c - - - - - mem.c - 1 - ..\..\..\src\mem.c - - - - - ipc.c - 1 - ..\..\..\src\ipc.c - - - - - kservice.c - 1 - ..\..\..\src\kservice.c - - - - - components.c - 1 - ..\..\..\src\components.c - - - - - object.c - 1 - ..\..\..\src\object.c - - - - - scheduler.c - 1 - ..\..\..\src\scheduler.c - - - - - clock.c - 1 - ..\..\..\src\clock.c - - - - - thread.c - 1 - ..\..\..\src\thread.c - - - - - device.c - 1 - ..\..\..\src\device.c - - - - - irq.c - 1 - ..\..\..\src\irq.c - - - - - Libraries - - - nu_ewwdt.c - 1 - ..\libraries\m2354\StdDriver\src\nu_ewwdt.c - - - - - nu_wwdt.c - 1 - ..\libraries\m2354\StdDriver\src\nu_wwdt.c - - - - - nu_usbd.c - 1 - ..\libraries\m2354\StdDriver\src\nu_usbd.c - - - - - nu_crypto.c - 1 - ..\libraries\m2354\StdDriver\src\nu_crypto.c - - - - - nu_usci_i2c.c - 1 - ..\libraries\m2354\StdDriver\src\nu_usci_i2c.c - - - - - nu_qspi.c - 1 - ..\libraries\m2354\StdDriver\src\nu_qspi.c - - - - - nu_clk.c - 1 - ..\libraries\m2354\StdDriver\src\nu_clk.c - - - - - nu_lcd.c - 1 - ..\libraries\m2354\StdDriver\src\nu_lcd.c - - - - - nu_scuart.c - 1 - ..\libraries\m2354\StdDriver\src\nu_scuart.c - - - - - nu_sys.c - 1 - ..\libraries\m2354\StdDriver\src\nu_sys.c - - - - - nu_sc.c - 1 - ..\libraries\m2354\StdDriver\src\nu_sc.c - - - - - nu_sdh.c - 1 - ..\libraries\m2354\StdDriver\src\nu_sdh.c - - - - - nu_spi.c - 1 - ..\libraries\m2354\StdDriver\src\nu_spi.c - - - - - nu_ewdt.c - 1 - ..\libraries\m2354\StdDriver\src\nu_ewdt.c - - - - - nu_usci_uart.c - 1 - ..\libraries\m2354\StdDriver\src\nu_usci_uart.c - - - - - nu_acmp.c - 1 - ..\libraries\m2354\StdDriver\src\nu_acmp.c - - - - - nu_wdt.c - 1 - ..\libraries\m2354\StdDriver\src\nu_wdt.c - - - - - nu_i2c.c - 1 - ..\libraries\m2354\StdDriver\src\nu_i2c.c - - - - - nu_fmc.c - 1 - ..\libraries\m2354\StdDriver\src\nu_fmc.c - - - - - nu_dac.c - 1 - ..\libraries\m2354\StdDriver\src\nu_dac.c - - - - - nu_rtc.c - 1 - ..\libraries\m2354\StdDriver\src\nu_rtc.c - - - - - nu_timer_pwm.c - 1 - ..\libraries\m2354\StdDriver\src\nu_timer_pwm.c - - - - - nu_uart.c - 1 - ..\libraries\m2354\StdDriver\src\nu_uart.c - - - - - nu_ecap.c - 1 - ..\libraries\m2354\StdDriver\src\nu_ecap.c - - - - - nu_eadc.c - 1 - ..\libraries\m2354\StdDriver\src\nu_eadc.c - - - - - nu_can.c - 1 - ..\libraries\m2354\StdDriver\src\nu_can.c - - - - - nu_epwm.c - 1 - ..\libraries\m2354\StdDriver\src\nu_epwm.c - - - - - nu_bpwm.c - 1 - ..\libraries\m2354\StdDriver\src\nu_bpwm.c - - - - - nu_dpm.c - 1 - ..\libraries\m2354\StdDriver\src\nu_dpm.c - - - - - nu_pdma.c - 1 - ..\libraries\m2354\StdDriver\src\nu_pdma.c - - - - - nu_qei.c - 1 - ..\libraries\m2354\StdDriver\src\nu_qei.c - - - - - nu_timer.c - 1 - ..\libraries\m2354\StdDriver\src\nu_timer.c - - - - - nu_usci_spi.c - 1 - ..\libraries\m2354\StdDriver\src\nu_usci_spi.c - - - - - nu_ebi.c - 1 - ..\libraries\m2354\StdDriver\src\nu_ebi.c - - - - - nu_crc.c - 1 - ..\libraries\m2354\StdDriver\src\nu_crc.c - - - - - nu_fvc.c - 1 - ..\libraries\m2354\StdDriver\src\nu_fvc.c - - - - - nu_i2s.c - 1 - ..\libraries\m2354\StdDriver\src\nu_i2s.c - - - - - nu_rng.c - 1 - ..\libraries\m2354\StdDriver\src\nu_rng.c - - - - - nu_gpio.c - 1 - ..\libraries\m2354\StdDriver\src\nu_gpio.c - - - - - nu_keystore.c - 1 - ..\libraries\m2354\StdDriver\src\nu_keystore.c - - - - - nu_tamper.c - 1 - ..\libraries\m2354\StdDriver\src\nu_tamper.c - - - - - m2354_usbhostlib - - - mem_alloc.c - 1 - ..\libraries\m2354\USBHostLib\src\mem_alloc.c - - - - - ohci.c - 1 - ..\libraries\m2354\USBHostLib\src\ohci.c - - - - - usb_core.c - 1 - ..\libraries\m2354\USBHostLib\src\usb_core.c - - - - - nu_pkgs_demo - - - usbd_cdc_vcom_echo.c - 1 - ..\libraries\nu_packages\Demo\usbd_cdc_vcom_echo.c - - - - - slcd_show_tick.c - 1 - ..\libraries\nu_packages\Demo\slcd_show_tick.c - - - - - usbd_hid_dance_mouse.c - 1 - ..\libraries\nu_packages\Demo\usbd_hid_dance_mouse.c - - - - - nu_pkgs_slcd - - - slcd_rhe6616tp01.c - 1 - ..\libraries\nu_packages\SLCD\slcd_rhe6616tp01.c - - - - - POSIX - - - select.c - 1 - ..\..\..\components\libc\posix\io\select.c - - - - - poll.c - 1 - ..\..\..\components\libc\posix\io\poll\poll.c - - - - - rt_usbd - - - hid.c - 1 - ..\..\..\components\drivers\usb\usbdevice\class\hid.c - - - - - usbdevice_core.c - 1 - ..\..\..\components\drivers\usb\usbdevice\core\usbdevice_core.c - - - - - usbdevice.c - 1 - ..\..\..\components\drivers\usb\usbdevice\core\usbdevice.c - - - - - rt_usbh - - - udisk.c - 1 - ..\..\..\components\drivers\usb\usbhost\class\udisk.c - - - - - usbhost.c - 1 - ..\..\..\components\drivers\usb\usbhost\core\usbhost.c - - - - - mass.c - 1 - ..\..\..\components\drivers\usb\usbhost\class\mass.c - - - - - usbhost_core.c - 1 - ..\..\..\components\drivers\usb\usbhost\core\usbhost_core.c - - - - - hub.c - 1 - ..\..\..\components\drivers\usb\usbhost\core\hub.c - - - - - driver.c - 1 - ..\..\..\components\drivers\usb\usbhost\core\driver.c - - - - - SAL - - - netdev_ipaddr.c - 1 - ..\..\..\components\net\netdev\src\netdev_ipaddr.c - - - - - netdev.c - 1 - ..\..\..\components\net\netdev\src\netdev.c - - - - - dfs_net.c - 1 - ..\..\..\components\net\sal_socket\dfs_net\dfs_net.c - - - - - sal_socket.c - 1 - ..\..\..\components\net\sal_socket\src\sal_socket.c - - - - - net_sockets.c - 1 - ..\..\..\components\net\sal_socket\socket\net_sockets.c - - - - - net_netdb.c - 1 - ..\..\..\components\net\sal_socket\socket\net_netdb.c - - - - - af_inet_at.c - 1 - ..\..\..\components\net\sal_socket\impl\af_inet_at.c - - - - - Sensors - - - sensor_cmd.c - 1 - ..\..\..\components\drivers\sensors\sensor_cmd.c - - - - - sensor.c - 1 - ..\..\..\components\drivers\sensors\sensor.c - - - - - UTest - - - utest.c - 1 - ..\..\..\components\utilities\utest\utest.c - - - - - - - - - - - -
diff --git a/bsp/nuvoton/numaker-m2354/rtconfig.h b/bsp/nuvoton/numaker-m2354/rtconfig.h deleted file mode 100644 index 81c3909d82..0000000000 --- a/bsp/nuvoton/numaker-m2354/rtconfig.h +++ /dev/null @@ -1,383 +0,0 @@ -#ifndef RT_CONFIG_H__ -#define RT_CONFIG_H__ - -/* Automatically generated file; DO NOT EDIT. */ -/* RT-Thread Configuration */ - -/* RT-Thread Kernel */ - -#define RT_NAME_MAX 8 -#define RT_ALIGN_SIZE 4 -#define RT_THREAD_PRIORITY_32 -#define RT_THREAD_PRIORITY_MAX 32 -#define RT_TICK_PER_SECOND 1000 -#define RT_USING_OVERFLOW_CHECK -#define RT_USING_HOOK -#define RT_HOOK_USING_FUNC_PTR -#define RT_USING_IDLE_HOOK -#define RT_IDLE_HOOK_LIST_SIZE 4 -#define IDLE_THREAD_STACK_SIZE 2048 - -/* kservice optimization */ - -#define RT_DEBUG -#define RT_DEBUG_COLOR - -/* Inter-Thread communication */ - -#define RT_USING_SEMAPHORE -#define RT_USING_MUTEX -#define RT_USING_EVENT -#define RT_USING_MAILBOX -#define RT_USING_MESSAGEQUEUE -#define RT_USING_SIGNALS - -/* Memory Management */ - -#define RT_USING_MEMPOOL -#define RT_USING_SMALL_MEM -#define RT_USING_SMALL_MEM_AS_HEAP -#define RT_USING_HEAP - -/* Kernel Device Object */ - -#define RT_USING_DEVICE -#define RT_USING_CONSOLE -#define RT_CONSOLEBUF_SIZE 256 -#define RT_CONSOLE_DEVICE_NAME "uart0" -#define RT_VER_NUM 0x40100 - -/* RT-Thread Components */ - -#define RT_USING_COMPONENTS_INIT -#define RT_USING_USER_MAIN -#define RT_MAIN_THREAD_STACK_SIZE 2048 -#define RT_MAIN_THREAD_PRIORITY 10 - -/* C++ features */ - - -/* Command shell */ - -#define RT_USING_FINSH -#define RT_USING_MSH -#define FINSH_USING_MSH -#define FINSH_THREAD_NAME "tshell" -#define FINSH_THREAD_PRIORITY 20 -#define FINSH_THREAD_STACK_SIZE 4096 -#define FINSH_USING_HISTORY -#define FINSH_HISTORY_LINES 5 -#define FINSH_USING_SYMTAB -#define FINSH_CMD_SIZE 80 -#define MSH_USING_BUILT_IN_COMMANDS -#define FINSH_USING_DESCRIPTION -#define FINSH_ARG_MAX 10 - -/* Device virtual file system */ - -#define RT_USING_DFS -#define DFS_USING_POSIX -#define DFS_USING_WORKDIR -#define DFS_FILESYSTEMS_MAX 4 -#define DFS_FILESYSTEM_TYPES_MAX 4 -#define DFS_FD_MAX 32 -#define RT_USING_DFS_ELMFAT - -/* elm-chan's FatFs, Generic FAT Filesystem Module */ - -#define RT_DFS_ELM_CODE_PAGE 437 -#define RT_DFS_ELM_WORD_ACCESS -#define RT_DFS_ELM_USE_LFN_3 -#define RT_DFS_ELM_USE_LFN 3 -#define RT_DFS_ELM_LFN_UNICODE_0 -#define RT_DFS_ELM_LFN_UNICODE 0 -#define RT_DFS_ELM_MAX_LFN 255 -#define RT_DFS_ELM_DRIVES 2 -#define RT_DFS_ELM_MAX_SECTOR_SIZE 4096 -#define RT_DFS_ELM_REENTRANT -#define RT_DFS_ELM_MUTEX_TIMEOUT 3000 -#define RT_USING_DFS_DEVFS - -/* Device Drivers */ - -#define RT_USING_DEVICE_IPC -#define RT_USING_SYSTEM_WORKQUEUE -#define RT_SYSTEM_WORKQUEUE_STACKSIZE 2048 -#define RT_SYSTEM_WORKQUEUE_PRIORITY 23 -#define RT_USING_SERIAL -#define RT_USING_SERIAL_V1 -#define RT_SERIAL_USING_DMA -#define RT_SERIAL_RB_BUFSZ 2048 -#define RT_USING_CAN -#define RT_USING_HWTIMER -#define RT_USING_I2C -#define RT_USING_I2C_BITOPS -#define RT_USING_PIN -#define RT_USING_ADC -#define RT_USING_PWM -#define RT_USING_PM -#define PM_TICKLESS_THRESHOLD_TIME 2 -#define RT_USING_RTC -#define RT_USING_SPI -#define RT_USING_QSPI -#define RT_USING_SFUD -#define RT_SFUD_USING_SFDP -#define RT_SFUD_USING_FLASH_INFO_TABLE -#define RT_SFUD_USING_QSPI -#define RT_SFUD_SPI_MAX_HZ 50000000 -#define RT_DEBUG_SFUD -#define RT_USING_WDT -#define RT_USING_AUDIO -#define RT_AUDIO_REPLAY_MP_BLOCK_SIZE 4096 -#define RT_AUDIO_REPLAY_MP_BLOCK_COUNT 2 -#define RT_AUDIO_RECORD_PIPE_SIZE 2048 -#define RT_USING_SENSOR -#define RT_USING_SENSOR_CMD -#define RT_USING_HWCRYPTO -#define RT_HWCRYPTO_DEFAULT_NAME "hwcryto" -#define RT_HWCRYPTO_IV_MAX_SIZE 16 -#define RT_HWCRYPTO_KEYBIT_MAX_SIZE 256 -#define RT_HWCRYPTO_USING_AES -#define RT_HWCRYPTO_USING_AES_ECB -#define RT_HWCRYPTO_USING_AES_CBC -#define RT_HWCRYPTO_USING_AES_CFB -#define RT_HWCRYPTO_USING_AES_CTR -#define RT_HWCRYPTO_USING_AES_OFB -#define RT_HWCRYPTO_USING_DES -#define RT_HWCRYPTO_USING_DES_ECB -#define RT_HWCRYPTO_USING_DES_CBC -#define RT_HWCRYPTO_USING_3DES -#define RT_HWCRYPTO_USING_3DES_ECB -#define RT_HWCRYPTO_USING_3DES_CBC -#define RT_HWCRYPTO_USING_SHA1 -#define RT_HWCRYPTO_USING_SHA2 -#define RT_HWCRYPTO_USING_SHA2_224 -#define RT_HWCRYPTO_USING_SHA2_256 -#define RT_HWCRYPTO_USING_SHA2_384 -#define RT_HWCRYPTO_USING_SHA2_512 -#define RT_HWCRYPTO_USING_RNG -#define RT_HWCRYPTO_USING_CRC -#define RT_HWCRYPTO_USING_CRC_07 -#define RT_HWCRYPTO_USING_CRC_8005 -#define RT_HWCRYPTO_USING_CRC_1021 -#define RT_HWCRYPTO_USING_CRC_04C11DB7 - -/* Using USB */ - -#define RT_USING_USB -#define RT_USING_USB_HOST -#define RT_USBH_MSTORAGE -#define UDISK_MOUNTPOINT "/" -#define RT_USING_USB_DEVICE -#define RT_USBD_THREAD_STACK_SZ 4096 -#define USB_VENDOR_ID 0x0FFE -#define USB_PRODUCT_ID 0x0001 -#define _RT_USB_DEVICE_HID -#define RT_USB_DEVICE_HID -#define RT_USB_DEVICE_HID_MOUSE - -/* POSIX layer and C standard library */ - -#define RT_LIBC_DEFAULT_TIMEZONE 8 - -/* POSIX (Portable Operating System Interface) layer */ - -#define RT_USING_POSIX_FS -#define RT_USING_POSIX_DEVIO -#define RT_USING_POSIX_POLL -#define RT_USING_POSIX_SELECT - -/* Interprocess Communication (IPC) */ - - -/* Socket is in the 'Network' category */ - -/* Network */ - -/* Socket abstraction layer */ - -#define RT_USING_SAL -#define SAL_INTERNET_CHECK - -/* protocol stack implement */ - -#define SAL_USING_AT -#define SAL_USING_POSIX - -/* Network interface device */ - -#define RT_USING_NETDEV -#define NETDEV_USING_IFCONFIG -#define NETDEV_USING_PING -#define NETDEV_USING_NETSTAT -#define NETDEV_USING_AUTO_DEFAULT -#define NETDEV_IPV4 1 -#define NETDEV_IPV6 0 - -/* light weight TCP/IP stack */ - - -/* AT commands */ - -#define RT_USING_AT -#define AT_USING_CLIENT -#define AT_CLIENT_NUM_MAX 1 -#define AT_USING_SOCKET -#define AT_USING_CLI -#define AT_CMD_MAX_LEN 2048 -#define AT_SW_VERSION_NUM 0x10301 - -/* VBUS(Virtual Software BUS) */ - - -/* Utilities */ - -#define RT_USING_UTEST -#define UTEST_THR_STACK_SIZE 4096 -#define UTEST_THR_PRIORITY 20 - -/* RT-Thread Utestcases */ - - -/* RT-Thread online packages */ - -/* IoT - internet of things */ - - -/* Wi-Fi */ - -/* Marvell WiFi */ - - -/* Wiced WiFi */ - -#define PKG_USING_AT_DEVICE -#define AT_DEVICE_USING_ESP8266 -#define AT_DEVICE_ESP8266_INIT_ASYN -#define PKG_USING_AT_DEVICE_LATEST_VERSION -#define PKG_AT_DEVICE_VER_NUM 0x99999 - -/* IoT Cloud */ - - -/* security packages */ - - -/* language packages */ - - -/* multimedia packages */ - -/* LVGL: powerful and easy-to-use embedded GUI library */ - - -/* u8g2: a monochrome graphic library */ - - -/* PainterEngine: A cross-platform graphics application framework written in C language */ - - -/* tools packages */ - - -/* system packages */ - -/* enhanced kernel services */ - - -/* POSIX extension functions */ - - -/* acceleration: Assembly language or algorithmic acceleration packages */ - - -/* CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */ - - -/* Micrium: Micrium software products porting for RT-Thread */ - -#define PKG_USING_FAL -#define FAL_DEBUG_CONFIG -#define FAL_DEBUG 1 -#define FAL_PART_HAS_TABLE_CFG -#define PKG_USING_FAL_V00500 -#define PKG_FAL_VER_NUM 0x00500 - -/* peripheral libraries and drivers */ - - -/* AI packages */ - - -/* miscellaneous packages */ - -/* samples: kernel and components samples */ - - -/* entertainment: terminal games and other interesting software packages */ - - -/* Nuvoton Packages Config */ - -#define NU_PKG_USING_UTILS -#define NU_PKG_USING_DEMO - -/* Hardware Drivers Config */ - -/* On-chip Peripheral Drivers */ - -#define SOC_SERIES_M2354 -#define BSP_USE_STDDRIVER_SOURCE -#define BSP_USING_PDMA -#define NU_PDMA_MEMFUN_ACTOR_MAX 2 -#define NU_PDMA_SGTBL_POOL_SIZE 16 -#define BSP_USING_FMC -#define BSP_USING_GPIO -#define BSP_USING_CLK -#define NU_CLK_INVOKE_WKTMR -#define BSP_USING_RTC -#define NU_RTC_SUPPORT_MSH_CMD -#define BSP_USING_EADC -#define BSP_USING_EADC0 -#define BSP_USING_TMR -#define BSP_USING_UART -#define BSP_USING_UART0 -#define BSP_USING_UART1 -#define BSP_USING_UART4 -#define BSP_USING_UART4_TX_DMA -#define BSP_USING_UART4_RX_DMA -#define BSP_USING_I2C -#define BSP_USING_I2C1 -#define BSP_USING_SDH -#define BSP_USING_SDH0 -#define NU_SDH_USING_PDMA -#define NU_SDH_HOTPLUG -#define NU_SDH_MOUNT_ON_ROOT -#define BSP_USING_SPI -#define BSP_USING_SPI0 -#define BSP_USING_SPI1 -#define BSP_USING_SPI2_NONE -#define BSP_USING_SPI3_NONE -#define BSP_USING_CRYPTO -#define BSP_USING_TRNG -#define BSP_USING_CRC -#define NU_CRC_USE_PDMA -#define BSP_USING_WDT -#define BSP_USING_SLCD -#define BSP_USING_USBD -#define BSP_USING_USBH -#define NU_USBHOST_HUB_POLLING_INTERVAL 100 -#define BSP_USING_OTG - -/* On-board Peripheral Drivers */ - -#define BSP_USING_NULINKME -#define BOARD_USING_ESP8266 -#define BOARD_USING_STORAGE_SDCARD -#define BOARD_USING_OTG - -/* Board extended module drivers */ - -#define BOARD_USING_SEGMENT_LCD - -#endif diff --git a/bsp/nuvoton/numaker-m2354/rtconfig.py b/bsp/nuvoton/numaker-m2354/rtconfig.py index 2a59f1a4f0..2b2d5c86f7 100644 --- a/bsp/nuvoton/numaker-m2354/rtconfig.py +++ b/bsp/nuvoton/numaker-m2354/rtconfig.py @@ -122,3 +122,11 @@ elif PLATFORM == 'iar': EXEC_PATH += '/arm/bin/' POST_ACTION = '' + +def dist_handle(BSP_ROOT, dist_dir): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT, dist_dir) + diff --git a/bsp/nuvoton/numaker-pfm-m487/.config b/bsp/nuvoton/numaker-pfm-m487/.config index d0bd4b04bf..84c9359e02 100644 --- a/bsp/nuvoton/numaker-pfm-m487/.config +++ b/bsp/nuvoton/numaker-pfm-m487/.config @@ -578,6 +578,7 @@ CONFIG_UTEST_THR_PRIORITY=20 # CONFIG_PKG_USING_MCURSES is not set # CONFIG_PKG_USING_TERMBOX is not set # CONFIG_PKG_USING_VT100 is not set +# CONFIG_PKG_USING_QRCODE is not set # # tools packages @@ -588,7 +589,6 @@ CONFIG_UTEST_THR_PRIORITY=20 # CONFIG_PKG_USING_SYSTEMVIEW is not set # CONFIG_PKG_USING_SEGGER_RTT is not set # CONFIG_PKG_USING_RDB is not set -# CONFIG_PKG_USING_QRCODE is not set # CONFIG_PKG_USING_ULOG_EASYFLASH is not set # CONFIG_PKG_USING_ULOG_FILE is not set # CONFIG_PKG_USING_LOGMGR is not set @@ -639,6 +639,7 @@ CONFIG_UTEST_THR_PRIORITY=20 # CONFIG_PKG_USING_POSIX_GETLINE is not set # CONFIG_PKG_USING_POSIX_WCWIDTH is not set # CONFIG_PKG_USING_POSIX_ITOA is not set +# CONFIG_PKG_USING_POSIX_STRINGS is not set # # acceleration: Assembly language or algorithmic acceleration packages @@ -675,13 +676,13 @@ CONFIG_FAL_DEBUG=1 CONFIG_FAL_PART_HAS_TABLE_CFG=y # CONFIG_FAL_USING_SFUD_PORT is not set # CONFIG_PKG_USING_FAL_V00500 is not set -CONFIG_PKG_USING_FAL_V00400=y +# CONFIG_PKG_USING_FAL_V00400 is not set # CONFIG_PKG_USING_FAL_V00300 is not set # CONFIG_PKG_USING_FAL_V00200 is not set # CONFIG_PKG_USING_FAL_V00100 is not set -# CONFIG_PKG_USING_FAL_LATEST_VERSION is not set -CONFIG_PKG_FAL_VER="v0.4.0" -CONFIG_PKG_FAL_VER_NUM=0x00400 +CONFIG_PKG_USING_FAL_LATEST_VERSION=y +CONFIG_PKG_FAL_VER="latest" +CONFIG_PKG_FAL_VER_NUM=0x99999 # CONFIG_PKG_USING_FLASHDB is not set # CONFIG_PKG_USING_SQLITE is not set # CONFIG_PKG_USING_RTI is not set @@ -764,6 +765,7 @@ CONFIG_PKG_FAL_VER_NUM=0x00400 # CONFIG_PKG_USING_SSD1306 is not set # CONFIG_PKG_USING_QKEY is not set # CONFIG_PKG_USING_RS485 is not set +# CONFIG_PKG_USING_RS232 is not set # CONFIG_PKG_USING_NES is not set # CONFIG_PKG_USING_VIRTUAL_SENSOR is not set # CONFIG_PKG_USING_VDEVICE is not set @@ -851,19 +853,8 @@ CONFIG_PKG_FAL_VER_NUM=0x00400 # CONFIG_PKG_USING_LWGPS is not set # CONFIG_PKG_USING_STATE_MACHINE is not set # CONFIG_PKG_USING_DESIGN_PATTERN is not set - -# -# Nuvoton Packages Config -# -CONFIG_NU_PKG_USING_UTILS=y -CONFIG_NU_PKG_USING_DEMO=y -# CONFIG_NU_PKG_USING_BMX055 is not set -# CONFIG_NU_PKG_USING_MAX31875 is not set -CONFIG_NU_PKG_USING_NAU88L25=y -# CONFIG_NU_PKG_USING_NAU8822 is not set -# CONFIG_NU_PKG_USING_DA9062 is not set -# CONFIG_NU_PKG_USING_ILI9341 is not set -# CONFIG_NU_PKG_USING_SPINAND is not set +# CONFIG_PKG_USING_CONTROLLER is not set +# CONFIG_PKG_USING_PHASE_LOCKED_LOOP is not set # # Hardware Drivers Config @@ -975,3 +966,18 @@ CONFIG_BOARD_USING_HSUSBH_USBD=y # Board extended module drivers # # CONFIG_BOARD_USING_ADVANCE_V4 is not set + +# +# Nuvoton Packages Config +# +CONFIG_NU_PKG_USING_UTILS=y +CONFIG_NU_PKG_USING_DEMO=y +# CONFIG_NU_PKG_USING_BMX055 is not set +# CONFIG_NU_PKG_USING_MAX31875 is not set +CONFIG_NU_PKG_USING_NAU88L25=y +# CONFIG_NU_PKG_USING_NAU8822 is not set +# CONFIG_NU_PKG_USING_DA9062 is not set +# CONFIG_NU_PKG_USING_ILI9341 is not set +# CONFIG_NU_PKG_USING_SPINAND is not set +CONFIG_BOARD_USE_UTEST=y +CONFIG_UTEST_CMD_PREFIX="bsp.nuvoton.numaker-pfm-m487.test.utest." diff --git a/bsp/nuvoton/numaker-pfm-m487/Kconfig b/bsp/nuvoton/numaker-pfm-m487/Kconfig index 5c55e87c61..b396340d12 100644 --- a/bsp/nuvoton/numaker-pfm-m487/Kconfig +++ b/bsp/nuvoton/numaker-pfm-m487/Kconfig @@ -18,12 +18,6 @@ config PKGS_DIR option env="PKGS_ROOT" default "packages" -config NU_PKGS_DIR - string - option env="NU_PKGS_ROOT" - default "../libraries/nu_packages" - source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" -source "$NU_PKGS_DIR/Kconfig" source "$BSP_DIR/board/Kconfig" diff --git a/bsp/nuvoton/numaker-pfm-m487/board/Kconfig b/bsp/nuvoton/numaker-pfm-m487/board/Kconfig index fc56305c9d..a4f4e0c69a 100644 --- a/bsp/nuvoton/numaker-pfm-m487/board/Kconfig +++ b/bsp/nuvoton/numaker-pfm-m487/board/Kconfig @@ -162,4 +162,6 @@ menu "Hardware Drivers Config" endmenu + source "$BSP_DIR/../libraries/nu_packages/Kconfig" + endmenu diff --git a/bsp/nuvoton/numaker-pfm-m487/project.uvproj b/bsp/nuvoton/numaker-pfm-m487/project.uvproj deleted file mode 100644 index 9e8d850de2..0000000000 --- a/bsp/nuvoton/numaker-pfm-m487/project.uvproj +++ /dev/null @@ -1,1966 +0,0 @@ - - - 1.1 -
### uVision Project, (C) Keil Software
- - - rtthread-m480 - 0x4 - ARM-ADS - - - M487JIDAE - Nuvoton - IRAM(0x20000000-0x20027FFF) IROM(0-0x7FFFF) CLOCK(192000000) CPUTYPE("Cortex-M4") FPU2 - - undefined - - 0 - - - - - - - - - - - SFD\Nuvoton\M481_v1.SFR - 0 - 0 - - - - - - - 0 - 0 - 0 - 0 - 1 - - .\build\keil4\ - rtthread - 1 - 0 - 1 - 1 - 1 - .\build\keil4\ - 1 - 0 - 0 - - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 0 - 0 - - - 0 - 0 - - - 1 - 0 - fromelf.exe --bin --output "$L@L.bin" "$L@L.axf" - - 0 - 0 - - 0 - - - - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 3 - - - 1 - - - SARMCM3.DLL - - DARMCM1.DLL - - SARMCM3.DLL - - TARMCM1.DLL - - - - - 1 - 0 - 0 - 0 - 16 - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - - 0 - 10 - - - - - - - - - - - - - - NULink\Nu_Link.dll - - - - - 1 - 0 - 0 - 1 - 1 - 4101 - - 0 - NULink\Nu_Link.dll - "" () - - - - - 0 - - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 1 - 0 - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - "Cortex-M4" - - 0 - 0 - 0 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 8 - 0 - 0 - 0 - 3 - 3 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 1 - 0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x20000000 - 0x28000 - - - 1 - 0x0 - 0x80000 - - - 0 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x80000 - - - 1 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x20000000 - 0x28000 - - - 0 - 0x0 - 0x0 - - - - - - 1 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - --c99 - __RTTHREAD__, RT_USING_ARM_LIBC, __CLK_TCK=RT_TICK_PER_SECOND - - applications;.;..\libraries\m480\CMSIS\Include;..\..\..\components\libc\compilers\common;..\..\..\components\libc\compilers\common\nogcc;..\..\..\libcpu\arm\common;..\..\..\libcpu\arm\cortex-m4;..\..\..\components\drivers\audio;..\..\..\components\drivers\include;..\..\..\components\drivers\hwcrypto;.;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\spi;..\..\..\components\drivers\include;..\..\..\components\drivers\spi\sfud\inc;..\..\..\components\drivers\include;..\..\..\components\drivers\include;board;board\NuClockConfig;board\NuPinConfig;..\libraries\m480\Device\Nuvoton\M480\Include;..\libraries\m480\rtt_port;..\..\..\components\dfs\include;..\..\..\components\dfs\filesystems\devfs;..\..\..\components\dfs\filesystems\elmfat;..\..\..\components\finsh;.;..\..\..\include;..\libraries\m480\StdDriver\inc;..\..\..\components\net\lwip-2.0.2\src;..\..\..\components\net\lwip-2.0.2\src\include;..\..\..\components\net\lwip-2.0.2\src\include\ipv4;..\..\..\components\net\lwip-2.0.2\src\arch\include;..\..\..\components\net\lwip-2.0.2\src\include\netif;..\libraries\m480\USBHostLib\inc;..\libraries\nu_packages\Demo;..\libraries\nu_packages\AudioCodec;..\libraries\nu_packages\NuUtils\inc;..\..\..\components\libc\posix\io\poll;..\..\..\components\libc\posix\ipc;..\..\..\components\drivers\usb\usbdevice;..\..\..\components\drivers\usb\usbhost;..\..\..\components\drivers\usb\usbhost\class;..\..\..\components\drivers\usb\usbhost\core;..\..\..\components\drivers\usb\usbhost\include;..\..\..\components\drivers\include;..\..\..\components\net\netdev\include;..\..\..\components\net\sal_socket\include;..\..\..\components\net\sal_socket\include\socket;..\..\..\components\net\sal_socket\impl;..\..\..\components\net\sal_socket\include\socket\sys_socket;..\..\..\components\utilities\utest;..\..\..\examples\utest\testcases\kernel - - - - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - - - - 0 - 0 - 0 - 0 - 1 - 0 - 0x00000000 - 0x20000000 - .\linking_scripts\m480_flash.sct - - - - - - - - - - - Applications - - - mnt.c - 1 - applications\mnt.c - - - - - main.c - 1 - applications\main.c - - - - - Compiler - - - syscalls.c - 1 - ..\..\..\components\libc\compilers\armlibc\syscalls.c - - - - - libc_syms.c - 1 - ..\..\..\components\libc\compilers\armlibc\libc_syms.c - - - - - syscall_mem.c - 1 - ..\..\..\components\libc\compilers\armlibc\syscall_mem.c - - - - - stdlib.c - 1 - ..\..\..\components\libc\compilers\common\stdlib.c - - - - - time.c - 1 - ..\..\..\components\libc\compilers\common\time.c - - - - - CPU - - - backtrace.c - 1 - ..\..\..\libcpu\arm\common\backtrace.c - - - - - showmem.c - 1 - ..\..\..\libcpu\arm\common\showmem.c - - - - - div0.c - 1 - ..\..\..\libcpu\arm\common\div0.c - - - - - cpuport.c - 1 - ..\..\..\libcpu\arm\cortex-m4\cpuport.c - - - - - context_rvds.S - 2 - ..\..\..\libcpu\arm\cortex-m4\context_rvds.S - - - - - DeviceDrivers - - - audio.c - 1 - ..\..\..\components\drivers\audio\audio.c - - - - - audio_pipe.c - 1 - ..\..\..\components\drivers\audio\audio_pipe.c - - - - - can.c - 1 - ..\..\..\components\drivers\can\can.c - - - - - hw_symmetric.c - 1 - ..\..\..\components\drivers\hwcrypto\hw_symmetric.c - - - - - hwcrypto.c - 1 - ..\..\..\components\drivers\hwcrypto\hwcrypto.c - - - - - hw_rng.c - 1 - ..\..\..\components\drivers\hwcrypto\hw_rng.c - - - - - hw_crc.c - 1 - ..\..\..\components\drivers\hwcrypto\hw_crc.c - - - - - hw_hash.c - 1 - ..\..\..\components\drivers\hwcrypto\hw_hash.c - - - - - hwtimer.c - 1 - ..\..\..\components\drivers\hwtimer\hwtimer.c - - - - - i2c_core.c - 1 - ..\..\..\components\drivers\i2c\i2c_core.c - - - - - i2c_dev.c - 1 - ..\..\..\components\drivers\i2c\i2c_dev.c - - - - - i2c-bit-ops.c - 1 - ..\..\..\components\drivers\i2c\i2c-bit-ops.c - - - - - adc.c - 1 - ..\..\..\components\drivers\misc\adc.c - - - - - rt_drv_pwm.c - 1 - ..\..\..\components\drivers\misc\rt_drv_pwm.c - - - - - pin.c - 1 - ..\..\..\components\drivers\misc\pin.c - - - - - lptimer.c - 1 - ..\..\..\components\drivers\pm\lptimer.c - - - - - pm.c - 1 - ..\..\..\components\drivers\pm\pm.c - - - - - rtc.c - 1 - ..\..\..\components\drivers\rtc\rtc.c - - - - - serial.c - 1 - ..\..\..\components\drivers\serial\serial.c - - - - - sfud.c - 1 - ..\..\..\components\drivers\spi\sfud\src\sfud.c - - - - - spi_core.c - 1 - ..\..\..\components\drivers\spi\spi_core.c - - - - - sfud_sfdp.c - 1 - ..\..\..\components\drivers\spi\sfud\src\sfud_sfdp.c - - - - - spi_dev.c - 1 - ..\..\..\components\drivers\spi\spi_dev.c - - - - - qspi_core.c - 1 - ..\..\..\components\drivers\spi\qspi_core.c - - - - - spi_flash_sfud.c - 1 - ..\..\..\components\drivers\spi\spi_flash_sfud.c - - - - - ringbuffer.c - 1 - ..\..\..\components\drivers\src\ringbuffer.c - - - - - pipe.c - 1 - ..\..\..\components\drivers\src\pipe.c - - - - - dataqueue.c - 1 - ..\..\..\components\drivers\src\dataqueue.c - - - - - completion.c - 1 - ..\..\..\components\drivers\src\completion.c - - - - - workqueue.c - 1 - ..\..\..\components\drivers\src\workqueue.c - - - - - waitqueue.c - 1 - ..\..\..\components\drivers\src\waitqueue.c - - - - - ringblk_buf.c - 1 - ..\..\..\components\drivers\src\ringblk_buf.c - - - - - watchdog.c - 1 - ..\..\..\components\drivers\watchdog\watchdog.c - - - - - - - --c99 - - - - - - - - - - Drivers - - - nutool_pincfg.c - 1 - board\NuPinConfig\nutool_pincfg.c - - - - - board_dev.c - 1 - board\board_dev.c - - - - - nutool_modclkcfg.c - 1 - board\NuClockConfig\nutool_modclkcfg.c - - - - - system_M480.c - 1 - ..\libraries\m480\Device\Nuvoton\M480\Source\system_M480.c - - - - - startup_M480.s - 2 - ..\libraries\m480\Device\Nuvoton\M480\Source\ARM\startup_M480.s - - - - - drv_fmc.c - 1 - ..\libraries\m480\rtt_port\drv_fmc.c - - - - - drv_sdh.c - 1 - ..\libraries\m480\rtt_port\drv_sdh.c - - - - - drv_clk.c - 1 - ..\libraries\m480\rtt_port\drv_clk.c - - - - - drv_crc.c - 1 - ..\libraries\m480\rtt_port\drv_crc.c - - - - - drv_bpwm_capture.c - 1 - ..\libraries\m480\rtt_port\drv_bpwm_capture.c - - - - - drv_usbd.c - 1 - ..\libraries\m480\rtt_port\drv_usbd.c - - - - - drv_epwm.c - 1 - ..\libraries\m480\rtt_port\drv_epwm.c - - - - - drv_ui2c.c - 1 - ..\libraries\m480\rtt_port\drv_ui2c.c - - - - - drv_trng.c - 1 - ..\libraries\m480\rtt_port\drv_trng.c - - - - - drv_rtc.c - 1 - ..\libraries\m480\rtt_port\drv_rtc.c - - - - - drv_ecap.c - 1 - ..\libraries\m480\rtt_port\drv_ecap.c - - - - - drv_uuart.c - 1 - ..\libraries\m480\rtt_port\drv_uuart.c - - - - - drv_gpio.c - 1 - ..\libraries\m480\rtt_port\drv_gpio.c - - - - - drv_pdma.c - 1 - ..\libraries\m480\rtt_port\drv_pdma.c - - - - - drv_timer_capture.c - 1 - ..\libraries\m480\rtt_port\drv_timer_capture.c - - - - - drv_tpwm.c - 1 - ..\libraries\m480\rtt_port\drv_tpwm.c - - - - - drv_spi.c - 1 - ..\libraries\m480\rtt_port\drv_spi.c - - - - - drv_crypto.c - 1 - ..\libraries\m480\rtt_port\drv_crypto.c - - - - - drv_ebi.c - 1 - ..\libraries\m480\rtt_port\drv_ebi.c - - - - - drv_i2c.c - 1 - ..\libraries\m480\rtt_port\drv_i2c.c - - - - - drv_uart.c - 1 - ..\libraries\m480\rtt_port\drv_uart.c - - - - - drv_common.c - 1 - ..\libraries\m480\rtt_port\drv_common.c - - - - - drv_hsusbd.c - 1 - ..\libraries\m480\rtt_port\drv_hsusbd.c - - - - - drv_eadc.c - 1 - ..\libraries\m480\rtt_port\drv_eadc.c - - - - - drv_qei.c - 1 - ..\libraries\m480\rtt_port\drv_qei.c - - - - - drv_spii2s.c - 1 - ..\libraries\m480\rtt_port\drv_spii2s.c - - - - - drv_bpwm.c - 1 - ..\libraries\m480\rtt_port\drv_bpwm.c - - - - - drv_usbhost.c - 1 - ..\libraries\m480\rtt_port\drv_usbhost.c - - - - - drv_hsotg.c - 1 - ..\libraries\m480\rtt_port\drv_hsotg.c - - - - - drv_softi2c.c - 1 - ..\libraries\m480\rtt_port\drv_softi2c.c - - - - - drv_can.c - 1 - ..\libraries\m480\rtt_port\drv_can.c - - - - - drv_timer.c - 1 - ..\libraries\m480\rtt_port\drv_timer.c - - - - - drv_i2s.c - 1 - ..\libraries\m480\rtt_port\drv_i2s.c - - - - - drv_scuart.c - 1 - ..\libraries\m480\rtt_port\drv_scuart.c - - - - - drv_qspi.c - 1 - ..\libraries\m480\rtt_port\drv_qspi.c - - - - - drv_wdt.c - 1 - ..\libraries\m480\rtt_port\drv_wdt.c - - - - - drv_uspi.c - 1 - ..\libraries\m480\rtt_port\drv_uspi.c - - - - - drv_emac.c - 1 - ..\libraries\m480\rtt_port\drv_emac.c - - - - - drv_epwm_capture.c - 1 - ..\libraries\m480\rtt_port\drv_epwm_capture.c - - - - - Filesystem - - - dfs_posix.c - 1 - ..\..\..\components\dfs\src\dfs_posix.c - - - - - dfs_fs.c - 1 - ..\..\..\components\dfs\src\dfs_fs.c - - - - - dfs.c - 1 - ..\..\..\components\dfs\src\dfs.c - - - - - dfs_file.c - 1 - ..\..\..\components\dfs\src\dfs_file.c - - - - - devfs.c - 1 - ..\..\..\components\dfs\filesystems\devfs\devfs.c - - - - - dfs_elm.c - 1 - ..\..\..\components\dfs\filesystems\elmfat\dfs_elm.c - - - - - ffunicode.c - 1 - ..\..\..\components\dfs\filesystems\elmfat\ffunicode.c - - - - - ff.c - 1 - ..\..\..\components\dfs\filesystems\elmfat\ff.c - - - - - Finsh - - - shell.c - 1 - ..\..\..\components\finsh\shell.c - - - - - msh.c - 1 - ..\..\..\components\finsh\msh.c - - - - - msh_file.c - 1 - ..\..\..\components\finsh\msh_file.c - - - - - cmd.c - 1 - ..\..\..\components\finsh\cmd.c - - - - - Kernel - - - timer.c - 1 - ..\..\..\src\timer.c - - - - - ipc.c - 1 - ..\..\..\src\ipc.c - - - - - mempool.c - 1 - ..\..\..\src\mempool.c - - - - - idle.c - 1 - ..\..\..\src\idle.c - - - - - components.c - 1 - ..\..\..\src\components.c - - - - - signal.c - 1 - ..\..\..\src\signal.c - - - - - kservice.c - 1 - ..\..\..\src\kservice.c - - - - - thread.c - 1 - ..\..\..\src\thread.c - - - - - irq.c - 1 - ..\..\..\src\irq.c - - - - - scheduler.c - 1 - ..\..\..\src\scheduler.c - - - - - clock.c - 1 - ..\..\..\src\clock.c - - - - - device.c - 1 - ..\..\..\src\device.c - - - - - mem.c - 1 - ..\..\..\src\mem.c - - - - - object.c - 1 - ..\..\..\src\object.c - - - - - Libraries - - - nu_trng.c - 1 - ..\libraries\m480\StdDriver\src\nu_trng.c - - - - - nu_i2s.c - 1 - ..\libraries\m480\StdDriver\src\nu_i2s.c - - - - - nu_crc.c - 1 - ..\libraries\m480\StdDriver\src\nu_crc.c - - - - - nu_sc.c - 1 - ..\libraries\m480\StdDriver\src\nu_sc.c - - - - - nu_ecap.c - 1 - ..\libraries\m480\StdDriver\src\nu_ecap.c - - - - - nu_usbd.c - 1 - ..\libraries\m480\StdDriver\src\nu_usbd.c - - - - - nu_ebi.c - 1 - ..\libraries\m480\StdDriver\src\nu_ebi.c - - - - - nu_acmp.c - 1 - ..\libraries\m480\StdDriver\src\nu_acmp.c - - - - - nu_can.c - 1 - ..\libraries\m480\StdDriver\src\nu_can.c - - - - - nu_usci_spi.c - 1 - ..\libraries\m480\StdDriver\src\nu_usci_spi.c - - - - - nu_i2c.c - 1 - ..\libraries\m480\StdDriver\src\nu_i2c.c - - - - - nu_spim.c - 1 - ..\libraries\m480\StdDriver\src\nu_spim.c - - - - - nu_pdma.c - 1 - ..\libraries\m480\StdDriver\src\nu_pdma.c - - - - - nu_usci_uart.c - 1 - ..\libraries\m480\StdDriver\src\nu_usci_uart.c - - - - - nu_epwm.c - 1 - ..\libraries\m480\StdDriver\src\nu_epwm.c - - - - - nu_usci_i2c.c - 1 - ..\libraries\m480\StdDriver\src\nu_usci_i2c.c - - - - - nu_scuart.c - 1 - ..\libraries\m480\StdDriver\src\nu_scuart.c - - - - - nu_gpio.c - 1 - ..\libraries\m480\StdDriver\src\nu_gpio.c - - - - - nu_emac.c - 1 - ..\libraries\m480\StdDriver\src\nu_emac.c - - - - - nu_qei.c - 1 - ..\libraries\m480\StdDriver\src\nu_qei.c - - - - - nu_clk.c - 1 - ..\libraries\m480\StdDriver\src\nu_clk.c - - - - - nu_timer_pwm.c - 1 - ..\libraries\m480\StdDriver\src\nu_timer_pwm.c - - - - - nu_qspi.c - 1 - ..\libraries\m480\StdDriver\src\nu_qspi.c - - - - - nu_bpwm.c - 1 - ..\libraries\m480\StdDriver\src\nu_bpwm.c - - - - - nu_wdt.c - 1 - ..\libraries\m480\StdDriver\src\nu_wdt.c - - - - - nu_sys.c - 1 - ..\libraries\m480\StdDriver\src\nu_sys.c - - - - - nu_sdh.c - 1 - ..\libraries\m480\StdDriver\src\nu_sdh.c - - - - - nu_hsusbd.c - 1 - ..\libraries\m480\StdDriver\src\nu_hsusbd.c - - - - - nu_eadc.c - 1 - ..\libraries\m480\StdDriver\src\nu_eadc.c - - - - - nu_uart.c - 1 - ..\libraries\m480\StdDriver\src\nu_uart.c - - - - - nu_crypto.c - 1 - ..\libraries\m480\StdDriver\src\nu_crypto.c - - - - - nu_wwdt.c - 1 - ..\libraries\m480\StdDriver\src\nu_wwdt.c - - - - - nu_rtc.c - 1 - ..\libraries\m480\StdDriver\src\nu_rtc.c - - - - - nu_fmc.c - 1 - ..\libraries\m480\StdDriver\src\nu_fmc.c - - - - - nu_ccap.c - 1 - ..\libraries\m480\StdDriver\src\nu_ccap.c - - - - - nu_timer.c - 1 - ..\libraries\m480\StdDriver\src\nu_timer.c - - - - - nu_dac.c - 1 - ..\libraries\m480\StdDriver\src\nu_dac.c - - - - - nu_spi.c - 1 - ..\libraries\m480\StdDriver\src\nu_spi.c - - - - - lwIP - - - netdb.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\api\netdb.c - - - - - ip.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\ip.c - - - - - autoip.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\ipv4\autoip.c - - - - - ethernet.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\netif\ethernet.c - - - - - netif.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\netif.c - - - - - sys.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\sys.c - - - - - sockets.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\api\sockets.c - - - - - netifapi.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\api\netifapi.c - - - - - tcpip.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\api\tcpip.c - - - - - ip4_addr.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\ipv4\ip4_addr.c - - - - - dhcp.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\ipv4\dhcp.c - - - - - init.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\init.c - - - - - ethernetif.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\netif\ethernetif.c - - - - - etharp.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\ipv4\etharp.c - - - - - memp.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\memp.c - - - - - ip4.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\ipv4\ip4.c - - - - - ping.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\apps\ping\ping.c - - - - - netbuf.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\api\netbuf.c - - - - - raw.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\raw.c - - - - - ip4_frag.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\ipv4\ip4_frag.c - - - - - tcp_out.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\tcp_out.c - - - - - lowpan6.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\netif\lowpan6.c - - - - - icmp.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\ipv4\icmp.c - - - - - api_lib.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\api\api_lib.c - - - - - inet_chksum.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\inet_chksum.c - - - - - stats.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\stats.c - - - - - err.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\api\err.c - - - - - tcp_in.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\tcp_in.c - - - - - dns.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\dns.c - - - - - sys_arch.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\arch\sys_arch.c - - - - - timeouts.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\timeouts.c - - - - - igmp.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\ipv4\igmp.c - - - - - udp.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\udp.c - - - - - pbuf.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\pbuf.c - - - - - def.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\def.c - - - - - api_msg.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\api\api_msg.c - - - - - tcp.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\tcp.c - - - - - m480_usbhostlib - - - ohci.c - 1 - ..\libraries\m480\USBHostLib\src\ohci.c - - - - - mem_alloc.c - 1 - ..\libraries\m480\USBHostLib\src\mem_alloc.c - - - - - ehci_iso.c - 1 - ..\libraries\m480\USBHostLib\src\ehci_iso.c - - - - - usb_core.c - 1 - ..\libraries\m480\USBHostLib\src\usb_core.c - - - - - ehci.c - 1 - ..\libraries\m480\USBHostLib\src\ehci.c - - - - - nu_pkgs_demo - - - usbd_cdc_vcom_echo.c - 1 - ..\libraries\nu_packages\Demo\usbd_cdc_vcom_echo.c - - - - - slcd_show_tick.c - 1 - ..\libraries\nu_packages\Demo\slcd_show_tick.c - - - - - usbd_hid_dance_mouse.c - 1 - ..\libraries\nu_packages\Demo\usbd_hid_dance_mouse.c - - - - - nu_pkgs_nau88l25 - - - audio_test.c - 1 - ..\libraries\nu_packages\AudioCodec\audio_test.c - - - - - acodec_nau88l25.c - 1 - ..\libraries\nu_packages\AudioCodec\acodec_nau88l25.c - - - - - rt_usbd - - - usbdevice_core.c - 1 - ..\..\..\components\drivers\usb\usbdevice\core\usbdevice_core.c - - - - - usbdevice.c - 1 - ..\..\..\components\drivers\usb\usbdevice\core\usbdevice.c - - - - - hid.c - 1 - ..\..\..\components\drivers\usb\usbdevice\class\hid.c - - - - - rt_usbh - - - udisk.c - 1 - ..\..\..\components\drivers\usb\usbhost\class\udisk.c - - - - - hub.c - 1 - ..\..\..\components\drivers\usb\usbhost\core\hub.c - - - - - usbhost.c - 1 - ..\..\..\components\drivers\usb\usbhost\core\usbhost.c - - - - - usbhost_core.c - 1 - ..\..\..\components\drivers\usb\usbhost\core\usbhost_core.c - - - - - mass.c - 1 - ..\..\..\components\drivers\usb\usbhost\class\mass.c - - - - - driver.c - 1 - ..\..\..\components\drivers\usb\usbhost\core\driver.c - - - - - SAL - - - netdev.c - 1 - ..\..\..\components\net\netdev\src\netdev.c - - - - - netdev_ipaddr.c - 1 - ..\..\..\components\net\netdev\src\netdev_ipaddr.c - - - - - af_inet_lwip.c - 1 - ..\..\..\components\net\sal_socket\impl\af_inet_lwip.c - - - - - sal_socket.c - 1 - ..\..\..\components\net\sal_socket\src\sal_socket.c - - - - - net_netdb.c - 1 - ..\..\..\components\net\sal_socket\socket\net_netdb.c - - - - - UTest - - - utest.c - 1 - ..\..\..\components\utilities\utest\utest.c - - - - - - -
diff --git a/bsp/nuvoton/numaker-pfm-m487/project.uvprojx b/bsp/nuvoton/numaker-pfm-m487/project.uvprojx deleted file mode 100644 index 0050c2f13a..0000000000 --- a/bsp/nuvoton/numaker-pfm-m487/project.uvprojx +++ /dev/null @@ -1,1961 +0,0 @@ - - - 2.1 -
### uVision Project, (C) Keil Software
- - - rtthread-m480 - 0x4 - ARM-ADS - 0 - - - M487JIDAE - Nuvoton - Nuvoton.NuMicro_DFP.1.3.5 - http://www.nuvoton.com/hq/enu/Documents/KEILSoftwarePack - IRAM(0x20000000,0x28000) IROM(0x00000000,0x80000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) - - - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0M481_AP_512 -FS00 -FL080000 -FP0($$Device:M487JIDAE$Flash\M481_AP_512.FLM)) - 0 - $$Device:M487JIDAE$Device\M480\Include\M480.h - - - - - - - - - - $$Device:M487JIDAE$SVD\Nuvoton\M481_v1.svd - 0 - 0 - - - - - - - 0 - 0 - 0 - 0 - 1 - - .\build\keil5\ - rtthread - 1 - 0 - 1 - 1 - 1 - .\build\keil5\ - 1 - 0 - 0 - - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 1 - 0 - fromelf.exe --bin --output "$L@L.bin" "$L@L.axf" - - 0 - 0 - 0 - 0 - - 0 - - - - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 3 - - - 1 - - - SARMCM3.DLL - - DARMCM1.DLL - - SARMCM3.DLL - - TARMCM1.DLL - - - - - 1 - 0 - 0 - 0 - 16 - - - - - 1 - 0 - 0 - 1 - 1 - 4103 - - 1 - NULink\Nu_Link.dll - "" () - - - - - 0 - - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 1 - 0 - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - "Cortex-M4" - - 0 - 0 - 0 - 1 - 1 - 0 - 0 - 2 - 0 - 0 - 0 - 8 - 0 - 0 - 0 - 0 - 3 - 3 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 1 - 0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x20000000 - 0x28000 - - - 1 - 0x0 - 0x80000 - - - 0 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x80000 - - - 1 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x20000000 - 0x28000 - - - 0 - 0x0 - 0x0 - - - - - - 1 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - - --c99 - __RTTHREAD__, RT_USING_ARM_LIBC, __CLK_TCK=RT_TICK_PER_SECOND - - applications;.;..\libraries\m480\CMSIS\Include;..\..\..\components\libc\compilers\common;..\..\..\components\libc\compilers\common\nogcc;..\..\..\libcpu\arm\common;..\..\..\libcpu\arm\cortex-m4;..\..\..\components\drivers\audio;..\..\..\components\drivers\include;..\..\..\components\drivers\hwcrypto;.;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\spi;..\..\..\components\drivers\include;..\..\..\components\drivers\spi\sfud\inc;..\..\..\components\drivers\include;..\..\..\components\drivers\include;board;board\NuClockConfig;board\NuPinConfig;..\libraries\m480\Device\Nuvoton\M480\Include;..\libraries\m480\rtt_port;..\..\..\components\dfs\include;..\..\..\components\dfs\filesystems\devfs;..\..\..\components\dfs\filesystems\elmfat;..\..\..\components\finsh;.;..\..\..\include;..\libraries\m480\StdDriver\inc;..\..\..\components\net\lwip-2.0.2\src;..\..\..\components\net\lwip-2.0.2\src\include;..\..\..\components\net\lwip-2.0.2\src\include\ipv4;..\..\..\components\net\lwip-2.0.2\src\arch\include;..\..\..\components\net\lwip-2.0.2\src\include\netif;..\libraries\m480\USBHostLib\inc;..\libraries\nu_packages\Demo;..\libraries\nu_packages\AudioCodec;..\libraries\nu_packages\NuUtils\inc;..\..\..\components\libc\posix\io\poll;..\..\..\components\libc\posix\ipc;..\..\..\components\drivers\usb\usbdevice;..\..\..\components\drivers\usb\usbhost;..\..\..\components\drivers\usb\usbhost\class;..\..\..\components\drivers\usb\usbhost\core;..\..\..\components\drivers\usb\usbhost\include;..\..\..\components\drivers\include;..\..\..\components\net\netdev\include;..\..\..\components\net\sal_socket\include;..\..\..\components\net\sal_socket\include\socket;..\..\..\components\net\sal_socket\impl;..\..\..\components\net\sal_socket\include\socket\sys_socket;..\..\..\components\utilities\utest;..\..\..\examples\utest\testcases\kernel - - - - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - - - - 0 - 0 - 0 - 0 - 1 - 0 - 0x00000000 - 0x20000000 - - .\linking_scripts\m480_flash.sct - - - - - - - - - - - Applications - - - main.c - 1 - applications\main.c - - - - - mnt.c - 1 - applications\mnt.c - - - - - Compiler - - - libc_syms.c - 1 - ..\..\..\components\libc\compilers\armlibc\libc_syms.c - - - - - syscalls.c - 1 - ..\..\..\components\libc\compilers\armlibc\syscalls.c - - - - - syscall_mem.c - 1 - ..\..\..\components\libc\compilers\armlibc\syscall_mem.c - - - - - stdlib.c - 1 - ..\..\..\components\libc\compilers\common\stdlib.c - - - - - time.c - 1 - ..\..\..\components\libc\compilers\common\time.c - - - - - CPU - - - div0.c - 1 - ..\..\..\libcpu\arm\common\div0.c - - - - - showmem.c - 1 - ..\..\..\libcpu\arm\common\showmem.c - - - - - backtrace.c - 1 - ..\..\..\libcpu\arm\common\backtrace.c - - - - - cpuport.c - 1 - ..\..\..\libcpu\arm\cortex-m4\cpuport.c - - - - - context_rvds.S - 2 - ..\..\..\libcpu\arm\cortex-m4\context_rvds.S - - - - - DeviceDrivers - - - audio_pipe.c - 1 - ..\..\..\components\drivers\audio\audio_pipe.c - - - - - audio.c - 1 - ..\..\..\components\drivers\audio\audio.c - - - - - can.c - 1 - ..\..\..\components\drivers\can\can.c - - - - - hw_symmetric.c - 1 - ..\..\..\components\drivers\hwcrypto\hw_symmetric.c - - - - - hwcrypto.c - 1 - ..\..\..\components\drivers\hwcrypto\hwcrypto.c - - - - - hw_rng.c - 1 - ..\..\..\components\drivers\hwcrypto\hw_rng.c - - - - - hw_crc.c - 1 - ..\..\..\components\drivers\hwcrypto\hw_crc.c - - - - - hw_hash.c - 1 - ..\..\..\components\drivers\hwcrypto\hw_hash.c - - - - - hwtimer.c - 1 - ..\..\..\components\drivers\hwtimer\hwtimer.c - - - - - i2c_core.c - 1 - ..\..\..\components\drivers\i2c\i2c_core.c - - - - - i2c_dev.c - 1 - ..\..\..\components\drivers\i2c\i2c_dev.c - - - - - i2c-bit-ops.c - 1 - ..\..\..\components\drivers\i2c\i2c-bit-ops.c - - - - - adc.c - 1 - ..\..\..\components\drivers\misc\adc.c - - - - - rt_drv_pwm.c - 1 - ..\..\..\components\drivers\misc\rt_drv_pwm.c - - - - - pin.c - 1 - ..\..\..\components\drivers\misc\pin.c - - - - - lptimer.c - 1 - ..\..\..\components\drivers\pm\lptimer.c - - - - - pm.c - 1 - ..\..\..\components\drivers\pm\pm.c - - - - - rtc.c - 1 - ..\..\..\components\drivers\rtc\rtc.c - - - - - serial.c - 1 - ..\..\..\components\drivers\serial\serial.c - - - - - sfud.c - 1 - ..\..\..\components\drivers\spi\sfud\src\sfud.c - - - - - spi_core.c - 1 - ..\..\..\components\drivers\spi\spi_core.c - - - - - sfud_sfdp.c - 1 - ..\..\..\components\drivers\spi\sfud\src\sfud_sfdp.c - - - - - spi_dev.c - 1 - ..\..\..\components\drivers\spi\spi_dev.c - - - - - qspi_core.c - 1 - ..\..\..\components\drivers\spi\qspi_core.c - - - - - spi_flash_sfud.c - 1 - ..\..\..\components\drivers\spi\spi_flash_sfud.c - - - - - ringbuffer.c - 1 - ..\..\..\components\drivers\src\ringbuffer.c - - - - - dataqueue.c - 1 - ..\..\..\components\drivers\src\dataqueue.c - - - - - workqueue.c - 1 - ..\..\..\components\drivers\src\workqueue.c - - - - - completion.c - 1 - ..\..\..\components\drivers\src\completion.c - - - - - ringblk_buf.c - 1 - ..\..\..\components\drivers\src\ringblk_buf.c - - - - - pipe.c - 1 - ..\..\..\components\drivers\src\pipe.c - - - - - waitqueue.c - 1 - ..\..\..\components\drivers\src\waitqueue.c - - - - - watchdog.c - 1 - ..\..\..\components\drivers\watchdog\watchdog.c - - - - - - - --c99 - - - - - - - - - - Drivers - - - nutool_pincfg.c - 1 - board\NuPinConfig\nutool_pincfg.c - - - - - board_dev.c - 1 - board\board_dev.c - - - - - nutool_modclkcfg.c - 1 - board\NuClockConfig\nutool_modclkcfg.c - - - - - system_M480.c - 1 - ..\libraries\m480\Device\Nuvoton\M480\Source\system_M480.c - - - - - startup_M480.s - 2 - ..\libraries\m480\Device\Nuvoton\M480\Source\ARM\startup_M480.s - - - - - drv_fmc.c - 1 - ..\libraries\m480\rtt_port\drv_fmc.c - - - - - drv_bpwm.c - 1 - ..\libraries\m480\rtt_port\drv_bpwm.c - - - - - drv_eadc.c - 1 - ..\libraries\m480\rtt_port\drv_eadc.c - - - - - drv_common.c - 1 - ..\libraries\m480\rtt_port\drv_common.c - - - - - drv_bpwm_capture.c - 1 - ..\libraries\m480\rtt_port\drv_bpwm_capture.c - - - - - drv_timer.c - 1 - ..\libraries\m480\rtt_port\drv_timer.c - - - - - drv_pdma.c - 1 - ..\libraries\m480\rtt_port\drv_pdma.c - - - - - drv_emac.c - 1 - ..\libraries\m480\rtt_port\drv_emac.c - - - - - drv_usbd.c - 1 - ..\libraries\m480\rtt_port\drv_usbd.c - - - - - drv_clk.c - 1 - ..\libraries\m480\rtt_port\drv_clk.c - - - - - drv_trng.c - 1 - ..\libraries\m480\rtt_port\drv_trng.c - - - - - drv_uspi.c - 1 - ..\libraries\m480\rtt_port\drv_uspi.c - - - - - drv_tpwm.c - 1 - ..\libraries\m480\rtt_port\drv_tpwm.c - - - - - drv_crypto.c - 1 - ..\libraries\m480\rtt_port\drv_crypto.c - - - - - drv_qei.c - 1 - ..\libraries\m480\rtt_port\drv_qei.c - - - - - drv_hsusbd.c - 1 - ..\libraries\m480\rtt_port\drv_hsusbd.c - - - - - drv_spi.c - 1 - ..\libraries\m480\rtt_port\drv_spi.c - - - - - drv_uuart.c - 1 - ..\libraries\m480\rtt_port\drv_uuart.c - - - - - drv_qspi.c - 1 - ..\libraries\m480\rtt_port\drv_qspi.c - - - - - drv_scuart.c - 1 - ..\libraries\m480\rtt_port\drv_scuart.c - - - - - drv_rtc.c - 1 - ..\libraries\m480\rtt_port\drv_rtc.c - - - - - drv_gpio.c - 1 - ..\libraries\m480\rtt_port\drv_gpio.c - - - - - drv_spii2s.c - 1 - ..\libraries\m480\rtt_port\drv_spii2s.c - - - - - drv_uart.c - 1 - ..\libraries\m480\rtt_port\drv_uart.c - - - - - drv_hsotg.c - 1 - ..\libraries\m480\rtt_port\drv_hsotg.c - - - - - drv_timer_capture.c - 1 - ..\libraries\m480\rtt_port\drv_timer_capture.c - - - - - drv_ebi.c - 1 - ..\libraries\m480\rtt_port\drv_ebi.c - - - - - drv_sdh.c - 1 - ..\libraries\m480\rtt_port\drv_sdh.c - - - - - drv_wdt.c - 1 - ..\libraries\m480\rtt_port\drv_wdt.c - - - - - drv_i2c.c - 1 - ..\libraries\m480\rtt_port\drv_i2c.c - - - - - drv_epwm.c - 1 - ..\libraries\m480\rtt_port\drv_epwm.c - - - - - drv_usbhost.c - 1 - ..\libraries\m480\rtt_port\drv_usbhost.c - - - - - drv_crc.c - 1 - ..\libraries\m480\rtt_port\drv_crc.c - - - - - drv_ecap.c - 1 - ..\libraries\m480\rtt_port\drv_ecap.c - - - - - drv_i2s.c - 1 - ..\libraries\m480\rtt_port\drv_i2s.c - - - - - drv_ui2c.c - 1 - ..\libraries\m480\rtt_port\drv_ui2c.c - - - - - drv_softi2c.c - 1 - ..\libraries\m480\rtt_port\drv_softi2c.c - - - - - drv_can.c - 1 - ..\libraries\m480\rtt_port\drv_can.c - - - - - drv_epwm_capture.c - 1 - ..\libraries\m480\rtt_port\drv_epwm_capture.c - - - - - Filesystem - - - dfs_posix.c - 1 - ..\..\..\components\dfs\src\dfs_posix.c - - - - - dfs_fs.c - 1 - ..\..\..\components\dfs\src\dfs_fs.c - - - - - dfs.c - 1 - ..\..\..\components\dfs\src\dfs.c - - - - - dfs_file.c - 1 - ..\..\..\components\dfs\src\dfs_file.c - - - - - devfs.c - 1 - ..\..\..\components\dfs\filesystems\devfs\devfs.c - - - - - dfs_elm.c - 1 - ..\..\..\components\dfs\filesystems\elmfat\dfs_elm.c - - - - - ffunicode.c - 1 - ..\..\..\components\dfs\filesystems\elmfat\ffunicode.c - - - - - ff.c - 1 - ..\..\..\components\dfs\filesystems\elmfat\ff.c - - - - - Finsh - - - shell.c - 1 - ..\..\..\components\finsh\shell.c - - - - - msh.c - 1 - ..\..\..\components\finsh\msh.c - - - - - msh_file.c - 1 - ..\..\..\components\finsh\msh_file.c - - - - - cmd.c - 1 - ..\..\..\components\finsh\cmd.c - - - - - Kernel - - - mempool.c - 1 - ..\..\..\src\mempool.c - - - - - irq.c - 1 - ..\..\..\src\irq.c - - - - - mem.c - 1 - ..\..\..\src\mem.c - - - - - object.c - 1 - ..\..\..\src\object.c - - - - - thread.c - 1 - ..\..\..\src\thread.c - - - - - kservice.c - 1 - ..\..\..\src\kservice.c - - - - - device.c - 1 - ..\..\..\src\device.c - - - - - scheduler.c - 1 - ..\..\..\src\scheduler.c - - - - - timer.c - 1 - ..\..\..\src\timer.c - - - - - clock.c - 1 - ..\..\..\src\clock.c - - - - - signal.c - 1 - ..\..\..\src\signal.c - - - - - idle.c - 1 - ..\..\..\src\idle.c - - - - - components.c - 1 - ..\..\..\src\components.c - - - - - ipc.c - 1 - ..\..\..\src\ipc.c - - - - - Libraries - - - nu_hsusbd.c - 1 - ..\libraries\m480\StdDriver\src\nu_hsusbd.c - - - - - nu_epwm.c - 1 - ..\libraries\m480\StdDriver\src\nu_epwm.c - - - - - nu_qspi.c - 1 - ..\libraries\m480\StdDriver\src\nu_qspi.c - - - - - nu_clk.c - 1 - ..\libraries\m480\StdDriver\src\nu_clk.c - - - - - nu_crc.c - 1 - ..\libraries\m480\StdDriver\src\nu_crc.c - - - - - nu_i2s.c - 1 - ..\libraries\m480\StdDriver\src\nu_i2s.c - - - - - nu_trng.c - 1 - ..\libraries\m480\StdDriver\src\nu_trng.c - - - - - nu_ebi.c - 1 - ..\libraries\m480\StdDriver\src\nu_ebi.c - - - - - nu_sys.c - 1 - ..\libraries\m480\StdDriver\src\nu_sys.c - - - - - nu_ccap.c - 1 - ..\libraries\m480\StdDriver\src\nu_ccap.c - - - - - nu_wwdt.c - 1 - ..\libraries\m480\StdDriver\src\nu_wwdt.c - - - - - nu_acmp.c - 1 - ..\libraries\m480\StdDriver\src\nu_acmp.c - - - - - nu_qei.c - 1 - ..\libraries\m480\StdDriver\src\nu_qei.c - - - - - nu_fmc.c - 1 - ..\libraries\m480\StdDriver\src\nu_fmc.c - - - - - nu_sdh.c - 1 - ..\libraries\m480\StdDriver\src\nu_sdh.c - - - - - nu_timer_pwm.c - 1 - ..\libraries\m480\StdDriver\src\nu_timer_pwm.c - - - - - nu_pdma.c - 1 - ..\libraries\m480\StdDriver\src\nu_pdma.c - - - - - nu_i2c.c - 1 - ..\libraries\m480\StdDriver\src\nu_i2c.c - - - - - nu_emac.c - 1 - ..\libraries\m480\StdDriver\src\nu_emac.c - - - - - nu_bpwm.c - 1 - ..\libraries\m480\StdDriver\src\nu_bpwm.c - - - - - nu_usci_spi.c - 1 - ..\libraries\m480\StdDriver\src\nu_usci_spi.c - - - - - nu_dac.c - 1 - ..\libraries\m480\StdDriver\src\nu_dac.c - - - - - nu_wdt.c - 1 - ..\libraries\m480\StdDriver\src\nu_wdt.c - - - - - nu_can.c - 1 - ..\libraries\m480\StdDriver\src\nu_can.c - - - - - nu_spi.c - 1 - ..\libraries\m480\StdDriver\src\nu_spi.c - - - - - nu_usbd.c - 1 - ..\libraries\m480\StdDriver\src\nu_usbd.c - - - - - nu_uart.c - 1 - ..\libraries\m480\StdDriver\src\nu_uart.c - - - - - nu_crypto.c - 1 - ..\libraries\m480\StdDriver\src\nu_crypto.c - - - - - nu_eadc.c - 1 - ..\libraries\m480\StdDriver\src\nu_eadc.c - - - - - nu_sc.c - 1 - ..\libraries\m480\StdDriver\src\nu_sc.c - - - - - nu_gpio.c - 1 - ..\libraries\m480\StdDriver\src\nu_gpio.c - - - - - nu_ecap.c - 1 - ..\libraries\m480\StdDriver\src\nu_ecap.c - - - - - nu_rtc.c - 1 - ..\libraries\m480\StdDriver\src\nu_rtc.c - - - - - nu_spim.c - 1 - ..\libraries\m480\StdDriver\src\nu_spim.c - - - - - nu_usci_i2c.c - 1 - ..\libraries\m480\StdDriver\src\nu_usci_i2c.c - - - - - nu_timer.c - 1 - ..\libraries\m480\StdDriver\src\nu_timer.c - - - - - nu_usci_uart.c - 1 - ..\libraries\m480\StdDriver\src\nu_usci_uart.c - - - - - nu_scuart.c - 1 - ..\libraries\m480\StdDriver\src\nu_scuart.c - - - - - lwIP - - - netdb.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\api\netdb.c - - - - - ip.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\ip.c - - - - - autoip.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\ipv4\autoip.c - - - - - ethernet.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\netif\ethernet.c - - - - - netif.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\netif.c - - - - - sys.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\sys.c - - - - - sockets.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\api\sockets.c - - - - - netifapi.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\api\netifapi.c - - - - - tcpip.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\api\tcpip.c - - - - - ip4_addr.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\ipv4\ip4_addr.c - - - - - dhcp.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\ipv4\dhcp.c - - - - - init.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\init.c - - - - - ethernetif.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\netif\ethernetif.c - - - - - etharp.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\ipv4\etharp.c - - - - - memp.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\memp.c - - - - - ip4.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\ipv4\ip4.c - - - - - netbuf.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\api\netbuf.c - - - - - raw.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\raw.c - - - - - ping.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\apps\ping\ping.c - - - - - ip4_frag.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\ipv4\ip4_frag.c - - - - - tcp_out.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\tcp_out.c - - - - - lowpan6.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\netif\lowpan6.c - - - - - icmp.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\ipv4\icmp.c - - - - - api_lib.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\api\api_lib.c - - - - - inet_chksum.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\inet_chksum.c - - - - - stats.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\stats.c - - - - - err.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\api\err.c - - - - - tcp_in.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\tcp_in.c - - - - - dns.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\dns.c - - - - - sys_arch.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\arch\sys_arch.c - - - - - timeouts.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\timeouts.c - - - - - igmp.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\ipv4\igmp.c - - - - - udp.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\udp.c - - - - - pbuf.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\pbuf.c - - - - - def.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\def.c - - - - - api_msg.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\api\api_msg.c - - - - - tcp.c - 1 - ..\..\..\components\net\lwip-2.0.2\src\core\tcp.c - - - - - m480_usbhostlib - - - mem_alloc.c - 1 - ..\libraries\m480\USBHostLib\src\mem_alloc.c - - - - - ehci.c - 1 - ..\libraries\m480\USBHostLib\src\ehci.c - - - - - usb_core.c - 1 - ..\libraries\m480\USBHostLib\src\usb_core.c - - - - - ohci.c - 1 - ..\libraries\m480\USBHostLib\src\ohci.c - - - - - ehci_iso.c - 1 - ..\libraries\m480\USBHostLib\src\ehci_iso.c - - - - - nu_pkgs_demo - - - usbd_cdc_vcom_echo.c - 1 - ..\libraries\nu_packages\Demo\usbd_cdc_vcom_echo.c - - - - - slcd_show_tick.c - 1 - ..\libraries\nu_packages\Demo\slcd_show_tick.c - - - - - usbd_hid_dance_mouse.c - 1 - ..\libraries\nu_packages\Demo\usbd_hid_dance_mouse.c - - - - - nu_pkgs_nau88l25 - - - audio_test.c - 1 - ..\libraries\nu_packages\AudioCodec\audio_test.c - - - - - acodec_nau88l25.c - 1 - ..\libraries\nu_packages\AudioCodec\acodec_nau88l25.c - - - - - rt_usbd - - - usbdevice_core.c - 1 - ..\..\..\components\drivers\usb\usbdevice\core\usbdevice_core.c - - - - - usbdevice.c - 1 - ..\..\..\components\drivers\usb\usbdevice\core\usbdevice.c - - - - - hid.c - 1 - ..\..\..\components\drivers\usb\usbdevice\class\hid.c - - - - - rt_usbh - - - mass.c - 1 - ..\..\..\components\drivers\usb\usbhost\class\mass.c - - - - - hub.c - 1 - ..\..\..\components\drivers\usb\usbhost\core\hub.c - - - - - usbhost.c - 1 - ..\..\..\components\drivers\usb\usbhost\core\usbhost.c - - - - - udisk.c - 1 - ..\..\..\components\drivers\usb\usbhost\class\udisk.c - - - - - usbhost_core.c - 1 - ..\..\..\components\drivers\usb\usbhost\core\usbhost_core.c - - - - - driver.c - 1 - ..\..\..\components\drivers\usb\usbhost\core\driver.c - - - - - SAL - - - netdev_ipaddr.c - 1 - ..\..\..\components\net\netdev\src\netdev_ipaddr.c - - - - - netdev.c - 1 - ..\..\..\components\net\netdev\src\netdev.c - - - - - net_netdb.c - 1 - ..\..\..\components\net\sal_socket\socket\net_netdb.c - - - - - sal_socket.c - 1 - ..\..\..\components\net\sal_socket\src\sal_socket.c - - - - - af_inet_lwip.c - 1 - ..\..\..\components\net\sal_socket\impl\af_inet_lwip.c - - - - - UTest - - - utest.c - 1 - ..\..\..\components\utilities\utest\utest.c - - - - - - - - - - - - - - - - - - -
diff --git a/bsp/nuvoton/numaker-pfm-m487/rtconfig.h b/bsp/nuvoton/numaker-pfm-m487/rtconfig.h deleted file mode 100644 index 4f9e169ee4..0000000000 --- a/bsp/nuvoton/numaker-pfm-m487/rtconfig.h +++ /dev/null @@ -1,413 +0,0 @@ -#ifndef RT_CONFIG_H__ -#define RT_CONFIG_H__ - -/* Automatically generated file; DO NOT EDIT. */ -/* RT-Thread Configuration */ - -/* RT-Thread Kernel */ - -#define RT_NAME_MAX 8 -#define RT_ALIGN_SIZE 4 -#define RT_THREAD_PRIORITY_32 -#define RT_THREAD_PRIORITY_MAX 32 -#define RT_TICK_PER_SECOND 1000 -#define RT_USING_OVERFLOW_CHECK -#define RT_USING_HOOK -#define RT_HOOK_USING_FUNC_PTR -#define RT_USING_IDLE_HOOK -#define RT_IDLE_HOOK_LIST_SIZE 4 -#define IDLE_THREAD_STACK_SIZE 1024 - -/* kservice optimization */ - -#define RT_DEBUG -#define RT_DEBUG_COLOR - -/* Inter-Thread communication */ - -#define RT_USING_SEMAPHORE -#define RT_USING_MUTEX -#define RT_USING_EVENT -#define RT_USING_MAILBOX -#define RT_USING_MESSAGEQUEUE -#define RT_USING_SIGNALS - -/* Memory Management */ - -#define RT_USING_MEMPOOL -#define RT_USING_SMALL_MEM -#define RT_USING_SMALL_MEM_AS_HEAP -#define RT_USING_HEAP - -/* Kernel Device Object */ - -#define RT_USING_DEVICE -#define RT_USING_CONSOLE -#define RT_CONSOLEBUF_SIZE 256 -#define RT_CONSOLE_DEVICE_NAME "uart0" -#define RT_VER_NUM 0x40100 -#define ARCH_ARM -#define RT_USING_CPU_FFS -#define ARCH_ARM_CORTEX_M -#define ARCH_ARM_CORTEX_M4 - -/* RT-Thread Components */ - -#define RT_USING_COMPONENTS_INIT -#define RT_USING_USER_MAIN -#define RT_MAIN_THREAD_STACK_SIZE 2048 -#define RT_MAIN_THREAD_PRIORITY 10 - -/* C++ features */ - - -/* Command shell */ - -#define RT_USING_FINSH -#define RT_USING_MSH -#define FINSH_USING_MSH -#define FINSH_THREAD_NAME "tshell" -#define FINSH_THREAD_PRIORITY 20 -#define FINSH_THREAD_STACK_SIZE 2048 -#define FINSH_USING_HISTORY -#define FINSH_HISTORY_LINES 5 -#define FINSH_USING_SYMTAB -#define FINSH_CMD_SIZE 80 -#define MSH_USING_BUILT_IN_COMMANDS -#define FINSH_USING_DESCRIPTION -#define FINSH_ARG_MAX 10 - -/* Device virtual file system */ - -#define RT_USING_DFS -#define DFS_USING_POSIX -#define DFS_USING_WORKDIR -#define DFS_FILESYSTEMS_MAX 8 -#define DFS_FILESYSTEM_TYPES_MAX 4 -#define DFS_FD_MAX 32 -#define RT_USING_DFS_ELMFAT - -/* elm-chan's FatFs, Generic FAT Filesystem Module */ - -#define RT_DFS_ELM_CODE_PAGE 437 -#define RT_DFS_ELM_WORD_ACCESS -#define RT_DFS_ELM_USE_LFN_3 -#define RT_DFS_ELM_USE_LFN 3 -#define RT_DFS_ELM_LFN_UNICODE_0 -#define RT_DFS_ELM_LFN_UNICODE 0 -#define RT_DFS_ELM_MAX_LFN 255 -#define RT_DFS_ELM_DRIVES 8 -#define RT_DFS_ELM_MAX_SECTOR_SIZE 4096 -#define RT_DFS_ELM_REENTRANT -#define RT_DFS_ELM_MUTEX_TIMEOUT 3000 -#define RT_USING_DFS_DEVFS - -/* Device Drivers */ - -#define RT_USING_DEVICE_IPC -#define RT_USING_SYSTEM_WORKQUEUE -#define RT_SYSTEM_WORKQUEUE_STACKSIZE 2048 -#define RT_SYSTEM_WORKQUEUE_PRIORITY 23 -#define RT_USING_SERIAL -#define RT_USING_SERIAL_V1 -#define RT_SERIAL_USING_DMA -#define RT_SERIAL_RB_BUFSZ 128 -#define RT_USING_CAN -#define RT_USING_HWTIMER -#define RT_USING_I2C -#define RT_USING_I2C_BITOPS -#define RT_USING_PIN -#define RT_USING_ADC -#define RT_USING_PWM -#define RT_USING_PM -#define PM_TICKLESS_THRESHOLD_TIME 2 -#define RT_USING_RTC -#define RT_USING_SPI -#define RT_USING_QSPI -#define RT_USING_SFUD -#define RT_SFUD_USING_SFDP -#define RT_SFUD_USING_FLASH_INFO_TABLE -#define RT_SFUD_SPI_MAX_HZ 50000000 -#define RT_USING_WDT -#define RT_USING_AUDIO -#define RT_AUDIO_REPLAY_MP_BLOCK_SIZE 4096 -#define RT_AUDIO_REPLAY_MP_BLOCK_COUNT 2 -#define RT_AUDIO_RECORD_PIPE_SIZE 2048 -#define RT_USING_HWCRYPTO -#define RT_HWCRYPTO_DEFAULT_NAME "hwcryto" -#define RT_HWCRYPTO_IV_MAX_SIZE 16 -#define RT_HWCRYPTO_KEYBIT_MAX_SIZE 256 -#define RT_HWCRYPTO_USING_AES -#define RT_HWCRYPTO_USING_AES_ECB -#define RT_HWCRYPTO_USING_AES_CBC -#define RT_HWCRYPTO_USING_AES_CFB -#define RT_HWCRYPTO_USING_AES_CTR -#define RT_HWCRYPTO_USING_AES_OFB -#define RT_HWCRYPTO_USING_DES -#define RT_HWCRYPTO_USING_DES_ECB -#define RT_HWCRYPTO_USING_DES_CBC -#define RT_HWCRYPTO_USING_3DES -#define RT_HWCRYPTO_USING_3DES_ECB -#define RT_HWCRYPTO_USING_3DES_CBC -#define RT_HWCRYPTO_USING_SHA1 -#define RT_HWCRYPTO_USING_SHA2 -#define RT_HWCRYPTO_USING_SHA2_224 -#define RT_HWCRYPTO_USING_SHA2_256 -#define RT_HWCRYPTO_USING_SHA2_384 -#define RT_HWCRYPTO_USING_SHA2_512 -#define RT_HWCRYPTO_USING_RNG -#define RT_HWCRYPTO_USING_CRC -#define RT_HWCRYPTO_USING_CRC_07 -#define RT_HWCRYPTO_USING_CRC_8005 -#define RT_HWCRYPTO_USING_CRC_1021 -#define RT_HWCRYPTO_USING_CRC_04C11DB7 - -/* Using USB */ - -#define RT_USING_USB -#define RT_USING_USB_HOST -#define RT_USBH_MSTORAGE -#define UDISK_MOUNTPOINT "/mnt/udisk/" -#define RT_USING_USB_DEVICE -#define RT_USBD_THREAD_STACK_SZ 4096 -#define USB_VENDOR_ID 0x0FFE -#define USB_PRODUCT_ID 0x0001 -#define _RT_USB_DEVICE_HID -#define RT_USB_DEVICE_HID -#define RT_USB_DEVICE_HID_MOUSE - -/* POSIX layer and C standard library */ - -#define RT_LIBC_DEFAULT_TIMEZONE 8 - -/* POSIX (Portable Operating System Interface) layer */ - -#define RT_USING_POSIX_FS -#define RT_USING_POSIX_DEVIO - -/* Interprocess Communication (IPC) */ - - -/* Socket is in the 'Network' category */ - -/* Network */ - -/* Socket abstraction layer */ - -#define RT_USING_SAL -#define SAL_INTERNET_CHECK - -/* protocol stack implement */ - -#define SAL_USING_LWIP -#define SAL_SOCKETS_NUM 16 - -/* Network interface device */ - -#define RT_USING_NETDEV -#define NETDEV_USING_IFCONFIG -#define NETDEV_USING_PING -#define NETDEV_USING_NETSTAT -#define NETDEV_USING_AUTO_DEFAULT -#define NETDEV_IPV4 1 -#define NETDEV_IPV6 0 - -/* light weight TCP/IP stack */ - -#define RT_USING_LWIP -#define RT_USING_LWIP202 -#define RT_LWIP_MEM_ALIGNMENT 4 -#define RT_LWIP_IGMP -#define RT_LWIP_ICMP -#define RT_LWIP_DNS -#define RT_LWIP_DHCP -#define IP_SOF_BROADCAST 1 -#define IP_SOF_BROADCAST_RECV 1 - -/* Static IPv4 Address */ - -#define RT_LWIP_IPADDR "192.168.1.30" -#define RT_LWIP_GWADDR "192.168.1.1" -#define RT_LWIP_MSKADDR "255.255.255.0" -#define RT_LWIP_UDP -#define RT_LWIP_TCP -#define RT_LWIP_RAW -#define RT_MEMP_NUM_NETCONN 8 -#define RT_LWIP_PBUF_NUM 16 -#define RT_LWIP_RAW_PCB_NUM 4 -#define RT_LWIP_UDP_PCB_NUM 4 -#define RT_LWIP_TCP_PCB_NUM 4 -#define RT_LWIP_TCP_SEG_NUM 40 -#define RT_LWIP_TCP_SND_BUF 8196 -#define RT_LWIP_TCP_WND 8196 -#define RT_LWIP_TCPTHREAD_PRIORITY 10 -#define RT_LWIP_TCPTHREAD_MBOX_SIZE 8 -#define RT_LWIP_TCPTHREAD_STACKSIZE 1024 -#define RT_LWIP_ETHTHREAD_PRIORITY 12 -#define RT_LWIP_ETHTHREAD_STACKSIZE 1024 -#define RT_LWIP_ETHTHREAD_MBOX_SIZE 8 -#define LWIP_NETIF_STATUS_CALLBACK 1 -#define LWIP_NETIF_LINK_CALLBACK 1 -#define SO_REUSE 1 -#define LWIP_SO_RCVTIMEO 1 -#define LWIP_SO_SNDTIMEO 1 -#define LWIP_SO_RCVBUF 1 -#define LWIP_SO_LINGER 0 -#define LWIP_NETIF_LOOPBACK 0 -#define RT_LWIP_USING_PING - -/* AT commands */ - - -/* VBUS(Virtual Software BUS) */ - - -/* Utilities */ - -#define RT_USING_UTEST -#define UTEST_THR_STACK_SIZE 4096 -#define UTEST_THR_PRIORITY 20 - -/* RT-Thread Utestcases */ - - -/* RT-Thread online packages */ - -/* IoT - internet of things */ - - -/* Wi-Fi */ - -/* Marvell WiFi */ - - -/* Wiced WiFi */ - - -/* IoT Cloud */ - - -/* security packages */ - - -/* language packages */ - - -/* multimedia packages */ - -/* LVGL: powerful and easy-to-use embedded GUI library */ - - -/* u8g2: a monochrome graphic library */ - - -/* PainterEngine: A cross-platform graphics application framework written in C language */ - - -/* tools packages */ - - -/* system packages */ - -/* enhanced kernel services */ - - -/* POSIX extension functions */ - - -/* acceleration: Assembly language or algorithmic acceleration packages */ - - -/* CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */ - - -/* Micrium: Micrium software products porting for RT-Thread */ - -#define PKG_USING_FAL -#define FAL_DEBUG_CONFIG -#define FAL_DEBUG 1 -#define FAL_PART_HAS_TABLE_CFG -#define PKG_USING_FAL_V00400 -#define PKG_FAL_VER_NUM 0x00400 - -/* peripheral libraries and drivers */ - - -/* AI packages */ - - -/* miscellaneous packages */ - -/* samples: kernel and components samples */ - - -/* entertainment: terminal games and other interesting software packages */ - - -/* Nuvoton Packages Config */ - -#define NU_PKG_USING_UTILS -#define NU_PKG_USING_DEMO -#define NU_PKG_USING_NAU88L25 - -/* Hardware Drivers Config */ - -/* On-chip Peripheral Drivers */ - -#define SOC_SERIES_M480 -#define BSP_USE_STDDRIVER_SOURCE -#define BSP_USING_PDMA -#define NU_PDMA_MEMFUN_ACTOR_MAX 2 -#define NU_PDMA_SGTBL_POOL_SIZE 16 -#define BSP_USING_FMC -#define BSP_USING_GPIO -#define BSP_USING_CLK -#define NU_CLK_INVOKE_WKTMR -#define BSP_USING_EMAC -#define NU_EMAC_PDMA_MEMCOPY -#define NU_EMAC_PDMA_MEMCOPY_THRESHOLD 128 -#define BSP_USING_RTC -#define NU_RTC_SUPPORT_MSH_CMD -#define BSP_USING_TMR -#define BSP_USING_UART -#define BSP_USING_UART0 -#define BSP_USING_I2C -#define BSP_USING_I2C1 -#define BSP_USING_I2C2 -#define BSP_USING_SDH -#define BSP_USING_SDH0 -#define NU_SDH_USING_PDMA -#define NU_SDH_HOTPLUG -#define BSP_USING_SPI -#define BSP_USING_SPI_PDMA -#define BSP_USING_SPI0_NONE -#define BSP_USING_SPI1_NONE -#define BSP_USING_SPI2_NONE -#define BSP_USING_SPI3 -#define BSP_USING_I2S -#define NU_I2S_DMA_FIFO_SIZE 2048 -#define BSP_USING_QSPI -#define BSP_USING_QSPI0 -#define BSP_USING_QSPI0_PDMA -#define BSP_USING_CRYPTO -#define BSP_USING_TRNG -#define BSP_USING_CRC -#define NU_CRC_USE_PDMA -#define BSP_USING_WDT -#define BSP_USING_USBD -#define BSP_USING_HSUSBH -#define NU_USBHOST_HUB_POLLING_INTERVAL 100 - -/* On-board Peripheral Drivers */ - -#define BSP_USING_NULINKME -#define BOARD_USING_IP101GR -#define BOARD_USING_NAU88L25 -#define BOARD_USING_STORAGE_SDCARD -#define BOARD_USING_STORAGE_SPIFLASH -#define BOARD_USING_HSUSBH_USBD - -/* Board extended module drivers */ - - -#endif diff --git a/bsp/nuvoton/numaker-pfm-m487/rtconfig.py b/bsp/nuvoton/numaker-pfm-m487/rtconfig.py index 902a2bdce9..7beeafe88a 100644 --- a/bsp/nuvoton/numaker-pfm-m487/rtconfig.py +++ b/bsp/nuvoton/numaker-pfm-m487/rtconfig.py @@ -130,3 +130,11 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = '' + +def dist_handle(BSP_ROOT, dist_dir): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT, dist_dir) + diff --git a/bsp/nuvoton/tools/sdk_dist.py b/bsp/nuvoton/tools/sdk_dist.py new file mode 100644 index 0000000000..d76f7fcfc8 --- /dev/null +++ b/bsp/nuvoton/tools/sdk_dist.py @@ -0,0 +1,39 @@ +import os +import sys +import shutil +cwd_path = os.getcwd() +sys.path.append(os.path.join(os.path.dirname(cwd_path), 'rt-thread', 'tools')) + +def dist_modify_relative_path(board_kconfig_path): + # Read in the file + with open(board_kconfig_path, 'r') as file : + filedata = file.read() + + # Replace the target string + filedata = filedata.replace('$BSP_DIR/../libraries', './libraries') + + # Write the file out again + with open(board_kconfig_path, 'w') as file: + file.write(filedata) + +# BSP dist function +def dist_do_building(BSP_ROOT, dist_dir): + from mkdist import bsp_copy_files + import rtconfig + + library_path = os.path.join(os.path.dirname(BSP_ROOT), 'libraries') + library_dir = os.path.join(dist_dir, 'libraries') + + print('=> copy nuvoton bsp drivers') + bsp_copy_files(os.path.join(library_path, rtconfig.BSP_LIBRARY_TYPE), + os.path.join(library_dir, rtconfig.BSP_LIBRARY_TYPE)) + + print('=> copy nu_packages') + bsp_copy_files(os.path.join(library_path, 'nu_packages'), + os.path.join(library_dir, 'nu_packages')) + + print('=> copy Kconfig') + shutil.copyfile(os.path.join(library_path, 'Kconfig'), os.path.join(library_dir, 'Kconfig')) + + print('=> Modify libraries relative path in board/Kconfig ') + dist_modify_relative_path(os.path.join(dist_dir, 'board', 'Kconfig')) \ No newline at end of file