Merge pull request #28 from RT-Thread/master

pr
This commit is contained in:
Meco Jianting Man 2021-03-17 02:32:02 +08:00 committed by GitHub
commit 295b95cd75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
744 changed files with 10033 additions and 64240 deletions

View File

@ -68,6 +68,8 @@ ab32vg1-prougen 是 中科蓝讯(Bluetrum) 推出的一款基于 RISC-V 内核
本 BSP 为开发者提供 GCC 开发环境。下面介绍如何将系统运行起来。
教学视频https://www.bilibili.com/video/BV1RV411v75P/
#### 硬件连接
使用数据线连接开发板到 PC打开电源开关。
@ -94,13 +96,12 @@ msh >
此 BSP 默认只开启了 GPIO 和 串口0 的功能,如果需使用 SD 卡、Flash 等更多高级功能,需要利用 ENV 工具对BSP 进行配置,步骤如下:
1. 在 bsp 下打开 env 工具。
2. 输入`menuconfig`命令配置工程,配置好之后保存退出。
3. 输入`pkgs --update`命令更新软件包。
4. 输入`scons` 命令重新编译工程。
更多细节请参见使用指南https://ab32vg1-example.readthedocs.io/zh/latest/introduction.html
## 注意事项
波特率默认为 1.5M,需要使用 [Downloader](https://github.com/BLUETRUM/Downloader) 下载 `.dcf` 到芯片,需要编译后自动下载,需要在 `Downloader` 中的下载的下拉窗中选择 `自动`;目前暂时屏蔽 uart1 打印

View File

@ -15,4 +15,6 @@
#include <rthw.h>
#include <rtdevice.h>
#define GET_PIN(PORTx,PIN) (uint8_t)__AB32_GET_PIN_##PORTx(PIN)
#endif // DRV_COMMON_H__

View File

@ -15,6 +15,10 @@
#include "board.h"
#define __AB32_PORT(port) GPIO##port
#define __AB32_GET_PIN_A(PIN) PIN
#define __AB32_GET_PIN_B(PIN) 8 + PIN
#define __AB32_GET_PIN_E(PIN) 13 + PIN
#define __AB32_GET_PIN_F(PIN) 21 + PIN
int rt_hw_pin_init(void);

View File

@ -1,4 +1,4 @@
# Nuvoton BSP descriptions
ï»? Nuvoton BSP descriptions
Current supported BSP shown in below table:
| **BSP folder** | **Board name** |
@ -6,4 +6,5 @@ Current supported BSP shown in below table:
| [numaker-iot-m487](numaker-iot-m487) | Nuvoton NuMaker-IoT-M487 |
| [numaker-pfm-m487](numaker-pfm-m487) | Nuvoton NuMaker-PFM-M487 |
| [nk-980iot](nk-980iot) | Nuvoton NK-980IOT |
| [numaker-m2354](numaker-m2354) | Nuvoton NuMaker-M2354 |
| [numaker-m2354](numaker-m2354) | Nuvoton NuMaker-M2354 |
| [nk-rtu980](nk-rtu980) | Nuvoton NK-RTU980 |

View File

@ -9,6 +9,7 @@
#ifndef __NUMICRO_H__
#define __NUMICRO_H__
#include "nutool_clkcfg.h"
#include "M2354.h"
#endif /* __NUMICRO_H__ */

View File

@ -49,11 +49,21 @@ extern "C" {
/*----------------------------------------------------------------------------
Define SYSCLK
*----------------------------------------------------------------------------*/
#ifndef __HXT
#define __HXT (12000000UL) /*!< External Crystal Clock Frequency */
#endif
#define __LIRC (32000UL) /*!< Internal 32K RC Oscillator Frequency */
#define __HIRC (12000000UL) /*!< Internal 12M RC Oscillator Frequency */
#ifndef __LXT
#define __LXT (32768UL) /*!< External Crystal Clock Frequency 32.768KHz */
#endif
#ifndef __HSI
#define __HSI (48000000UL) /*!< PLL Output Clock Frequency */
#endif
#define __HIRC48 (48000000UL) /*!< Internal 48M RC Oscillator Frequency */
#define __LIRC32 (32000UL) /*!< Internal 32K RC Oscillator Frequency */
#define __MIRC (4000000UL) /*!< Internal 4M RC Oscillator Frequency */
@ -93,7 +103,7 @@ extern uint32_t __PC(void); /*!< Return the current program counter valu
*/
#define ASSERT_PARAM(expr) { if (!(expr)) { AssertError((uint8_t*)__FILE__, __LINE__); } }
void AssertError(uint8_t* file, uint32_t line);
void AssertError(uint8_t *file, uint32_t line);
#else
#define ASSERT_PARAM(expr)
#endif

View File

@ -348,6 +348,7 @@
<state>$PROJ_DIR$\..\..\Device\Nuvoton\M2354\Include</state>
<state>$PROJ_DIR$\..\..\CMSIS\Include</state>
<state>$PROJ_DIR$\..\inc</state>
<state>$PROJ_DIR$</state>
</option>
<option>
<name>CCStdIncCheck</name>
@ -1385,6 +1386,7 @@
<state>$PROJ_DIR$\..\..\Device\Nuvoton\M2354\Include</state>
<state>$PROJ_DIR$\..\..\CMSIS\Include</state>
<state>$PROJ_DIR$\..\inc</state>
<state>$PROJ_DIR$</state>
</option>
<option>
<name>CCStdIncCheck</name>

View File

@ -338,7 +338,7 @@
<MiscControls></MiscControls>
<Define></Define>
<Undefine></Undefine>
<IncludePath>..\inc;..\..\CMSIS\Include;..\..\Device\Nuvoton\M2354\Include</IncludePath>
<IncludePath>..\inc;..\..\CMSIS\Include;..\..\Device\Nuvoton\M2354\Include;.</IncludePath>
</VariousControls>
</Cads>
<Aads>

View File

@ -14,7 +14,7 @@
#if defined(BSP_USING_BPWM_CAPTURE)
#if ((BSP_USING_BPWM0_CAPTURE_CHMSK+BSP_USING_BPWM1_CAPTURE_CHMSK)!=0)
#include <rtdevice.h>
#include <NuMicro.h>
#include "NuMicro.h"
/* Private typedef --------------------------------------------------------------*/
typedef struct _bpwm_dev

View File

@ -16,7 +16,7 @@
#include <rtdevice.h>
#include <rthw.h>
#include <NuMicro.h>
#include "NuMicro.h"
/* Private Define ---------------------------------------------------------------*/
#define RX_MSG_ID_INDEX 16

View File

@ -18,7 +18,7 @@
#include <rtdbg.h>
#include <stdint.h>
#include <string.h>
#include <NuMicro.h>
#include "NuMicro.h"
/* Private define ---------------------------------------------------------------*/

View File

@ -12,7 +12,7 @@
#include <rtconfig.h>
#include <rtthread.h>
#include <NuMicro.h>
#include "NuMicro.h"
#include <nu_bitutil.h>
#include "drv_uart.h"
#include "board.h"
@ -24,7 +24,7 @@
/**
* This function will initial M487 board.
*/
void rt_hw_board_init(void)
RT_WEAK void rt_hw_board_init(void)
{
/* Init System/modules clock */
nutool_modclkcfg_init();
@ -67,6 +67,41 @@ void rt_hw_board_init(void)
#endif
}
/**
* The time delay function.
*
* @param microseconds.
*/
void rt_hw_us_delay(rt_uint32_t us)
{
rt_uint32_t ticks;
rt_uint32_t told, tnow, tcnt = 0;
rt_uint32_t reload = SysTick->LOAD;
ticks = us * reload / (1000000 / RT_TICK_PER_SECOND);
told = SysTick->VAL;
while (1)
{
tnow = SysTick->VAL;
if (tnow != told)
{
if (tnow < told)
{
tcnt += told - tnow;
}
else
{
tcnt += reload - tnow + told;
}
told = tnow;
if (tcnt >= ticks)
{
break;
}
}
}
}
/**
* This is the timer interrupt service routine.
*

View File

@ -11,7 +11,7 @@
#include <rtconfig.h>
#include <rtdevice.h>
#include <NuMicro.h>
#include "NuMicro.h"
#ifdef BSP_USING_EADC

View File

@ -13,7 +13,7 @@
#define __DRV_EBI_H___
#include <rtdevice.h>
#include <NuMicro.h>
#include "NuMicro.h"
/**
* @brief Initialize EBI for specify Bank

View File

@ -14,7 +14,7 @@
#if defined(BSP_USING_ECAP)
#if ((BSP_USING_ECAP0_CHMSK+BSP_USING_ECAP1_CHMSK)!=0)
#include <rtdevice.h>
#include <NuMicro.h>
#include "NuMicro.h"
#define ECAP_CH0_POS (0)
#define ECAP_CH1_POS (1)

View File

@ -14,7 +14,7 @@
#if defined(BSP_USING_EPWM_CAPTURE)
#if ((BSP_USING_EPWM0_CAPTURE_CHMSK+BSP_USING_EPWM1_CAPTURE_CHMSK)!=0)
#include <rtdevice.h>
#include <NuMicro.h>
#include "NuMicro.h"
#define EPWM_CH0CH1_POS (0)
#define EPWM_CH2CH3_POS (2)

View File

@ -14,7 +14,7 @@
#define __DRV_FMC_H__
#include <rtthread.h>
#include <NuMicro.h>
#include "NuMicro.h"
int nu_fmc_read(long offset, uint8_t *buf, size_t size);
int nu_fmc_write(long offset, const uint8_t *buf, size_t size);

View File

@ -16,7 +16,7 @@
#include <rtdevice.h>
#include <rthw.h>
#include <NuMicro.h>
#include "NuMicro.h"
#include <nu_bitutil.h>
#include <drv_gpio.h>
#include <stdlib.h>

View File

@ -14,7 +14,7 @@
#ifdef BSP_USING_I2C
#include <rtdevice.h>
#include <NuMicro.h>
#include "NuMicro.h"
/* Private define ---------------------------------------------------------------*/
#define LOG_TAG "drv.i2c"

View File

@ -220,7 +220,8 @@ static rt_err_t nu_i2s_dai_setup(nu_i2s_t psNuI2s, struct rt_audio_configure *pc
}
/* Set MCLK and enable MCLK */
I2S_EnableMCLK(psNuI2s->i2s_base, __HXT);
/* The target MCLK is related to audio codec setting. */
I2S_EnableMCLK(psNuI2s->i2s_base, 12000000);
/* Set unmute */
if (pNuACodecOps->nu_acodec_mixer_control)

View File

@ -14,7 +14,7 @@
#define __DRV_I2S_H__
#include <rtdevice.h>
#include <NuMicro.h>
#include "NuMicro.h"
#include <drv_pdma.h>
#if !defined(NU_I2S_DMA_FIFO_SIZE)

View File

@ -14,7 +14,7 @@
#if defined(BSP_USING_OTG)
#include <rtdevice.h>
#include <rtdbg.h>
#include <NuMicro.h>
#include "NuMicro.h"
/* This delay must be at least 10 us */
static void _usb_init_delay(void)

View File

@ -15,7 +15,7 @@
#include <rtconfig.h>
#include <rtthread.h>
#include <NuMicro.h>
#include "NuMicro.h"
#ifndef NU_PDMA_SGTBL_POOL_SIZE
#define NU_PDMA_SGTBL_POOL_SIZE (16)

View File

@ -14,7 +14,8 @@
#if defined (BSP_USING_RTC)
#include <rtdevice.h>
#include <NuMicro.h>
#include <sys/time.h>
#include "NuMicro.h"
/* Private define ---------------------------------------------------------------*/
@ -184,8 +185,8 @@ static rt_err_t nu_rtc_is_date_valid(const time_t *const t)
if (!initialised)
{
t_upper = mktime((struct tm *)&tm_upper);
t_lower = mktime((struct tm *)&tm_lower);
t_upper = timegm((struct tm *)&tm_upper);
t_lower = timegm((struct tm *)&tm_lower);
initialised = RT_TRUE;
}
@ -226,13 +227,13 @@ static rt_err_t nu_rtc_control(rt_device_t dev, int cmd, void *args)
tm_out.tm_hour = hw_time.u32Hour;
tm_out.tm_min = hw_time.u32Minute;
tm_out.tm_sec = hw_time.u32Second;
*time = mktime(&tm_out);
*time = timegm(&tm_out);
break;
case RT_DEVICE_CTRL_RTC_SET_TIME:
time = (time_t *) args;
tm_in = localtime(time);
tm_in = gmtime(time);
if (nu_rtc_is_date_valid(time) != RT_EOK)
return RT_ERROR;

View File

@ -14,7 +14,7 @@
#if defined(BSP_USING_SCUART)
#include <NuMicro.h>
#include "NuMicro.h"
#include <rtdevice.h>
#include <rthw.h>

View File

@ -15,7 +15,7 @@
#if defined(BSP_USING_SDH)
#include <rtdevice.h>
#include <NuMicro.h>
#include "NuMicro.h"
#include <drv_pdma.h>
#include <string.h>

View File

@ -16,7 +16,7 @@
#include <rtdevice.h>
#include <rthw.h>
#include <NuMicro.h>
#include "NuMicro.h"
#include <drv_slcd.h>
/* Private define ---------------------------------------------------------------*/

View File

@ -14,7 +14,7 @@
#define __DRV_SLCD_H__
#include <rtdevice.h>
#include <NuMicro.h>
#include "NuMicro.h"
struct nu_slcd_pixel
{

View File

@ -17,7 +17,7 @@
#include <rtthread.h>
#include <rthw.h>
#include <rtdevice.h>
#include <NuMicro.h>
#include "NuMicro.h"
/* Private define ---------------------------------------------------------------*/
#define LOG_TAG "drv.softi2c"
@ -65,7 +65,6 @@ struct nu_soft_i2c
};
/* Private functions ------------------------------------------------------------*/
static void nu_soft_i2c_udelay(rt_uint32_t us);
static void nu_soft_i2c_set_sda(void *data, rt_int32_t state);
static void nu_soft_i2c_set_scl(void *data, rt_int32_t state);
static rt_int32_t nu_soft_i2c_get_sda(void *data);
@ -91,48 +90,13 @@ static const struct rt_i2c_bit_ops nu_soft_i2c_bit_ops =
.set_scl = nu_soft_i2c_set_scl,
.get_sda = nu_soft_i2c_get_sda,
.get_scl = nu_soft_i2c_get_scl,
.udelay = nu_soft_i2c_udelay,
.udelay = rt_hw_us_delay,
.delay_us = 1,
.timeout = 100
};
/* Functions define ------------------------------------------------------------*/
/**
* The time delay function.
*
* @param microseconds.
*/
static void nu_soft_i2c_udelay(rt_uint32_t us)
{
rt_uint32_t ticks;
rt_uint32_t told, tnow, tcnt = 0;
rt_uint32_t reload = SysTick->LOAD;
ticks = us * reload / (1000000 / RT_TICK_PER_SECOND);
told = SysTick->VAL;
while (1)
{
tnow = SysTick->VAL;
if (tnow != told)
{
if (tnow < told)
{
tcnt += told - tnow;
}
else
{
tcnt += reload - tnow + told;
}
told = tnow;
if (tcnt >= ticks)
{
break;
}
}
}
}
/**
* This function initializes the soft i2c pin.
*
@ -163,9 +127,9 @@ static rt_err_t nu_soft_i2c_bus_unlock(const struct nu_soft_i2c_config *cfg)
while (i++ < 9)
{
rt_pin_write(cfg->scl, PIN_HIGH);
nu_soft_i2c_udelay(100);
rt_hw_us_delay(100);
rt_pin_write(cfg->scl, PIN_LOW);
nu_soft_i2c_udelay(100);
rt_hw_us_delay(100);
}
}
if (PIN_LOW == rt_pin_read(cfg->sda))

View File

@ -16,7 +16,7 @@
#include <rtconfig.h>
#include <rtdevice.h>
#include <NuMicro.h>
#include "NuMicro.h"
#include <nu_bitutil.h>
#if defined(BSP_USING_SPI_PDMA)

View File

@ -282,7 +282,8 @@ static rt_err_t nu_spii2s_dai_setup(nu_i2s_t psNuSPII2s, struct rt_audio_configu
LOG_I("Open SPII2S.");
/* Set MCLK and enable MCLK */
SPII2S_EnableMCLK(spii2s_base, __HXT);
/* The target MCLK is related to audio codec setting. */
SPII2S_EnableMCLK(spii2s_base, 12000000);
/* Set un-mute */
if (pNuACodecOps->nu_acodec_mixer_control)

View File

@ -15,7 +15,7 @@
#if (defined(BSP_USING_TIMER) && defined(RT_USING_HWTIMER))
#include <rtdevice.h>
#include <NuMicro.h>
#include "NuMicro.h"
/* Private define ---------------------------------------------------------------*/
#define NU_TIMER_DEVICE(timer) (nu_timer_t *)(timer)

View File

@ -21,7 +21,7 @@
defined(BSP_USING_TIMER5_CAPTURE)
#include <rtdevice.h>
#include <NuMicro.h>
#include "NuMicro.h"
/* Private typedef --------------------------------------------------------------*/
typedef struct _timer

View File

@ -16,7 +16,7 @@
#include <rtdevice.h>
#include <rthw.h>
#include <NuMicro.h>
#include "NuMicro.h"
#include <drv_uart.h>
#if defined(RT_SERIAL_USING_DMA)

View File

@ -15,7 +15,7 @@
#if (defined(BSP_USING_UI2C) && defined(RT_USING_I2C))
#include <rtdevice.h>
#include <NuMicro.h>
#include "NuMicro.h"
/* Private define ---------------------------------------------------------------*/
#define LOG_TAG "drv.ui2c"

View File

@ -15,7 +15,7 @@
#include <rtdevice.h>
#include <rthw.h>
#include <NuMicro.h>
#include "NuMicro.h"
#include "usb.h"
#include "usbh_lib.h"

View File

@ -24,7 +24,7 @@
#include <rtdevice.h>
#include <rtdef.h>
#include <NuMicro.h>
#include "NuMicro.h"
#include <nu_bitutil.h>
#if defined(BSP_USING_USPI_PDMA)

View File

@ -16,7 +16,7 @@
#include <rtdevice.h>
#include <rthw.h>
#include <NuMicro.h>
#include "NuMicro.h"
#if defined(RT_SERIAL_USING_DMA)
#include <drv_pdma.h>

View File

@ -16,7 +16,7 @@
#include <rthw.h>
#include <rtdevice.h>
#include <rtdbg.h>
#include <NuMicro.h>
#include "NuMicro.h"
/*-------------------------------------------------------------------------------*/
/* watchdog timer timeout look up table */

View File

@ -14,7 +14,7 @@
#if defined(BSP_USING_BPWM_CAPTURE)
#if ((BSP_USING_BPWM0_CAPTURE_CHMSK+BSP_USING_BPWM1_CAPTURE_CHMSK)!=0)
#include <rtdevice.h>
#include <NuMicro.h>
#include "NuMicro.h"
/* Private typedef --------------------------------------------------------------*/
typedef struct _bpwm_dev

View File

@ -16,7 +16,7 @@
#include <rtdevice.h>
#include <rthw.h>
#include <NuMicro.h>
#include "NuMicro.h"
/* Private Define ---------------------------------------------------------------*/
#define RX_MSG_ID_INDEX 16

View File

@ -18,7 +18,7 @@
#include <rtdbg.h>
#include <stdint.h>
#include <string.h>
#include <NuMicro.h>
#include "NuMicro.h"
/* Private define ---------------------------------------------------------------*/

View File

@ -12,7 +12,7 @@
#include <rtconfig.h>
#include <rtthread.h>
#include <NuMicro.h>
#include "NuMicro.h"
#include "drv_uart.h"
#include "board.h"
#include "nutool_pincfg.h"
@ -20,9 +20,9 @@
/**
* This function will initial M487 board.
* This function will initial.
*/
void rt_hw_board_init(void)
RT_WEAK void rt_hw_board_init(void)
{
/* Init System/modules clock */
nutool_modclkcfg_init();
@ -67,6 +67,41 @@ void rt_hw_board_init(void)
#endif
}
/**
* The time delay function.
*
* @param microseconds.
*/
void rt_hw_us_delay(rt_uint32_t us)
{
rt_uint32_t ticks;
rt_uint32_t told, tnow, tcnt = 0;
rt_uint32_t reload = SysTick->LOAD;
ticks = us * reload / (1000000 / RT_TICK_PER_SECOND);
told = SysTick->VAL;
while (1)
{
tnow = SysTick->VAL;
if (tnow != told)
{
if (tnow < told)
{
tcnt += told - tnow;
}
else
{
tcnt += reload - tnow + told;
}
told = tnow;
if (tcnt >= ticks)
{
break;
}
}
}
}
/**
* This is the timer interrupt service routine.
*
@ -89,7 +124,7 @@ void rt_hw_cpu_reset(void)
SYS->IPRST0 |= SYS_IPRST0_CHIPRST_Msk;
}
int reboot(int argc, char** argv)
int reboot(int argc, char **argv)
{
rt_hw_cpu_reset();
return 0;

View File

@ -11,7 +11,7 @@
#include <rtconfig.h>
#include <rtdevice.h>
#include <NuMicro.h>
#include "NuMicro.h"
#ifdef BSP_USING_EADC

View File

@ -13,7 +13,7 @@
#define __DRV_EBI_H___
#include <rtdevice.h>
#include <NuMicro.h>
#include "NuMicro.h"
/**
* @brief Initialize EBI for specify Bank

View File

@ -14,7 +14,7 @@
#if defined(BSP_USING_ECAP)
#if ((BSP_USING_ECAP0_CHMSK+BSP_USING_ECAP1_CHMSK)!=0)
#include <rtdevice.h>
#include <NuMicro.h>
#include "NuMicro.h"
#define ECAP_CH0_POS (0)
#define ECAP_CH1_POS (1)

View File

@ -17,7 +17,7 @@
#if defined(RT_USING_LWIP)
#include <rtdevice.h>
#include <NuMicro.h>
#include "NuMicro.h"
#include <netif/ethernetif.h>
#include <netif/etharp.h>
#include <lwip/icmp.h>

View File

@ -14,7 +14,7 @@
#if defined(BSP_USING_EPWM_CAPTURE)
#if ((BSP_USING_EPWM0_CAPTURE_CHMSK+BSP_USING_EPWM1_CAPTURE_CHMSK)!=0)
#include <rtdevice.h>
#include <NuMicro.h>
#include "NuMicro.h"
#define EPWM_CH0CH1_POS (0)
#define EPWM_CH2CH3_POS (2)

View File

@ -14,7 +14,7 @@
#define __DRV_FMC_H__
#include <rtthread.h>
#include <NuMicro.h>
#include "NuMicro.h"
int nu_fmc_read(long offset, uint8_t *buf, size_t size);
int nu_fmc_write(long offset, const uint8_t *buf, size_t size);

View File

@ -16,7 +16,7 @@
#include <rtdevice.h>
#include <rthw.h>
#include <NuMicro.h>
#include "NuMicro.h"
#include <nu_bitutil.h>
#include <drv_gpio.h>
#include <stdlib.h>

View File

@ -14,7 +14,7 @@
#if defined(BSP_USING_HSOTG)
#include <rtdevice.h>
#include <rtdbg.h>
#include <NuMicro.h>
#include "NuMicro.h"
/* This delay must be at least 10 us */

View File

@ -14,7 +14,7 @@
#ifdef BSP_USING_I2C
#include <rtdevice.h>
#include <NuMicro.h>
#include "NuMicro.h"
/* Private define ---------------------------------------------------------------*/
#define LOG_TAG "drv.i2c"

View File

@ -220,7 +220,8 @@ static rt_err_t nu_i2s_dai_setup(nu_i2s_t psNuI2s, struct rt_audio_configure *pc
}
/* Set MCLK and enable MCLK */
I2S_EnableMCLK(psNuI2s->i2s_base, __HXT);
/* The target MCLK is related to audio codec setting. */
I2S_EnableMCLK(psNuI2s->i2s_base, 12000000);
/* Set unmute */
if (pNuACodecOps->nu_acodec_mixer_control)

View File

@ -14,7 +14,7 @@
#define __DRV_I2S_H__
#include <rtdevice.h>
#include <NuMicro.h>
#include "NuMicro.h"
#include <drv_pdma.h>
#if !defined(NU_I2S_DMA_FIFO_SIZE)

View File

@ -15,7 +15,7 @@
#include <rtconfig.h>
#include <rtthread.h>
#include <NuMicro.h>
#include "NuMicro.h"
#ifndef NU_PDMA_SGTBL_POOL_SIZE
#define NU_PDMA_SGTBL_POOL_SIZE (16)

View File

@ -15,7 +15,7 @@
#include <rtdevice.h>
#include <sys/time.h>
#include <NuMicro.h>
#include "NuMicro.h"
/* Private define ---------------------------------------------------------------*/

View File

@ -14,7 +14,7 @@
#if defined(BSP_USING_SCUART)
#include <NuMicro.h>
#include "NuMicro.h"
#include <rtdevice.h>
#include <rthw.h>

View File

@ -15,7 +15,7 @@
#if defined(BSP_USING_SDH)
#include <rtdevice.h>
#include <NuMicro.h>
#include "NuMicro.h"
#include <drv_pdma.h>
#include <string.h>

View File

@ -17,7 +17,7 @@
#include <rtthread.h>
#include <rthw.h>
#include <rtdevice.h>
#include <NuMicro.h>
#include "NuMicro.h"
/* Private define ---------------------------------------------------------------*/
#define LOG_TAG "drv.softi2c"
@ -65,7 +65,6 @@ struct nu_soft_i2c
};
/* Private functions ------------------------------------------------------------*/
static void nu_soft_i2c_udelay(rt_uint32_t us);
static void nu_soft_i2c_set_sda(void *data, rt_int32_t state);
static void nu_soft_i2c_set_scl(void *data, rt_int32_t state);
static rt_int32_t nu_soft_i2c_get_sda(void *data);
@ -91,48 +90,13 @@ static const struct rt_i2c_bit_ops nu_soft_i2c_bit_ops =
.set_scl = nu_soft_i2c_set_scl,
.get_sda = nu_soft_i2c_get_sda,
.get_scl = nu_soft_i2c_get_scl,
.udelay = nu_soft_i2c_udelay,
.udelay = rt_hw_us_delay,
.delay_us = 1,
.timeout = 100
};
/* Functions define ------------------------------------------------------------*/
/**
* The time delay function.
*
* @param microseconds.
*/
static void nu_soft_i2c_udelay(rt_uint32_t us)
{
rt_uint32_t ticks;
rt_uint32_t told, tnow, tcnt = 0;
rt_uint32_t reload = SysTick->LOAD;
ticks = us * reload / (1000000 / RT_TICK_PER_SECOND);
told = SysTick->VAL;
while (1)
{
tnow = SysTick->VAL;
if (tnow != told)
{
if (tnow < told)
{
tcnt += told - tnow;
}
else
{
tcnt += reload - tnow + told;
}
told = tnow;
if (tcnt >= ticks)
{
break;
}
}
}
}
/**
* This function initializes the soft i2c pin.
*
@ -163,9 +127,9 @@ static rt_err_t nu_soft_i2c_bus_unlock(const struct nu_soft_i2c_config *cfg)
while (i++ < 9)
{
rt_pin_write(cfg->scl, PIN_HIGH);
nu_soft_i2c_udelay(100);
rt_hw_us_delay(100);
rt_pin_write(cfg->scl, PIN_LOW);
nu_soft_i2c_udelay(100);
rt_hw_us_delay(100);
}
}
if (PIN_LOW == rt_pin_read(cfg->sda))

View File

@ -16,7 +16,7 @@
#include <rtconfig.h>
#include <rtdevice.h>
#include <NuMicro.h>
#include "NuMicro.h"
#include <nu_bitutil.h>
#if defined(BSP_USING_SPI_PDMA)

View File

@ -282,7 +282,8 @@ static rt_err_t nu_spii2s_dai_setup(nu_i2s_t psNuSPII2s, struct rt_audio_configu
LOG_I("Open SPII2S.");
/* Set MCLK and enable MCLK */
SPII2S_EnableMCLK(spii2s_base, __HXT);
/* The target MCLK is related to audio codec setting. */
SPII2S_EnableMCLK(spii2s_base, 12000000);
/* Set un-mute */
if (pNuACodecOps->nu_acodec_mixer_control)

View File

@ -15,7 +15,7 @@
#if (defined(BSP_USING_TIMER) && defined(RT_USING_HWTIMER))
#include <rtdevice.h>
#include <NuMicro.h>
#include "NuMicro.h"
/* Private define ---------------------------------------------------------------*/
#define NU_TIMER_DEVICE(timer) (nu_timer_t *)(timer)

View File

@ -19,7 +19,7 @@
defined(BSP_USING_TIMER3_CAPTURE)
#include <rtdevice.h>
#include <NuMicro.h>
#include "NuMicro.h"
/* Private typedef --------------------------------------------------------------*/
typedef struct _timer

View File

@ -16,7 +16,7 @@
#include <rtdevice.h>
#include <rthw.h>
#include <NuMicro.h>
#include "NuMicro.h"
#include <drv_uart.h>
#if defined(RT_SERIAL_USING_DMA)

View File

@ -15,7 +15,7 @@
#if (defined(BSP_USING_UI2C) && defined(RT_USING_I2C))
#include <rtdevice.h>
#include <NuMicro.h>
#include "NuMicro.h"
/* Private define ---------------------------------------------------------------*/
#define LOG_TAG "drv.ui2c"

View File

@ -17,7 +17,7 @@
#include <rtdevice.h>
#include <rthw.h>
#include <NuMicro.h>
#include "NuMicro.h"
#include "usb.h"
#include "usbh_lib.h"

View File

@ -24,7 +24,7 @@
#include <rtdevice.h>
#include <rtdef.h>
#include <NuMicro.h>
#include "NuMicro.h"
#include <nu_bitutil.h>
#if defined(BSP_USING_USPI_PDMA)

View File

@ -16,7 +16,7 @@
#include <rtdevice.h>
#include <rthw.h>
#include <NuMicro.h>
#include "NuMicro.h"
#if defined(RT_SERIAL_USING_DMA)
#include <drv_pdma.h>

View File

@ -16,7 +16,7 @@
#include <rthw.h>
#include <rtdevice.h>
#include <rtdbg.h>
#include <NuMicro.h>
#include "NuMicro.h"
/*-------------------------------------------------------------------------------*/
/* watchdog timer timeout look up table */

View File

@ -88,10 +88,10 @@ static int I2C_WriteNAU88L25(uint16_t u16addr, uint16_t u16data)
static int I2C_ReadNAU88L25(uint16_t u16addr, uint16_t *pu16data)
{
struct rt_i2c_msg msgs[2];
uint16_t u16data = 0;
char au8TxData[2];
RT_ASSERT(g_I2cBusDev != NULL);
RT_ASSERT(pu16data != NULL);
au8TxData[0] = (uint8_t)((u16addr >> 8) & 0x00FF); //addr [15:8]
au8TxData[1] = (uint8_t)(u16addr & 0x00FF); //addr [ 7:0]
@ -103,8 +103,8 @@ static int I2C_ReadNAU88L25(uint16_t u16addr, uint16_t *pu16data)
msgs[1].addr = DEF_NAU88L25_ADDR; /* Slave address */
msgs[1].flags = RT_I2C_RD; /* Read flag */
msgs[1].buf = (rt_uint8_t *)&u16data; /* Read data pointer */
msgs[1].len = sizeof(u16data); /* Number of bytes read */
msgs[1].buf = (rt_uint8_t *)pu16data; /* Read data pointer */
msgs[1].len = sizeof(uint16_t); /* Number of bytes read */
if (rt_i2c_transfer(g_I2cBusDev, &msgs[0], 2) != 2)
{

View File

@ -26,6 +26,8 @@
static int audio_test(int argc, char **argv)
{
#define DEF_MAX_ARGV_NUM 8
#define DEF_MAX_TEST_SECOND 5
int smplrate[] = {8000, 16000, 44100, 48000};
int smplbit[] = {16};
int chnum[] = {1, 2};
@ -54,9 +56,9 @@ static int audio_test(int argc, char **argv)
info.samplebits = smplbit[j];
info.channels = chnum[k];
wavrecorder_start(&info);
rt_thread_mdelay(10000);
rt_thread_mdelay(DEF_MAX_TEST_SECOND * 1000);
wavrecorder_stop();
rt_thread_mdelay(1000);
rt_thread_mdelay(DEF_MAX_TEST_SECOND * 1000);
}
else
{
@ -68,7 +70,7 @@ static int audio_test(int argc, char **argv)
rt_kprintf("Replay file at %s\n", strbuf);
wavplayer_play(strbuf);
rt_thread_mdelay(10000);
rt_thread_mdelay(DEF_MAX_TEST_SECOND * 1000);
wavplayer_stop();
}
} // k

View File

@ -30,21 +30,6 @@ config SOC_SERIES_NUC980
select RT_USING_PIN
default y
menuconfig BSP_USING_CLK
bool "Enable Clock Controller(CLK)"
select RT_USING_PM
select BSP_USING_TMR
default y
help
Choose this option if you need CLK/PM function.
Notice: Enable the option will hold timer3 resource
if BSP_USING_CLK
config NU_CLK_INVOKE_WKTMR
bool "Enable SPD1 and DPD mode wakeup timer. (About 6.6 Secs)"
default y
endif
menuconfig BSP_USING_EMAC
bool "Enable Ethernet MAC Controller(EMAC)"
select RT_USING_LWIP

View File

@ -14,7 +14,7 @@
#if defined(BSP_USING_ADC)
#include <rtdevice.h>
#include <NuMicro.h>
#include "NuMicro.h"
#include <drv_sys.h>
/* Private define ---------------------------------------------------------------*/

View File

@ -16,7 +16,7 @@
#include <rtdevice.h>
#include <rthw.h>
#include <NuMicro.h>
#include "NuMicro.h"
#include <drv_sys.h>
/* Private Define ---------------------------------------------------------------*/

View File

@ -13,7 +13,7 @@
#define __DRV_EBI_H___
#include <rtdevice.h>
#include <NuMicro.h>
#include "NuMicro.h"
#define MAX_BANK EBI_BANK2

View File

@ -17,7 +17,7 @@
#if defined(RT_USING_LWIP)
#include <rtdevice.h>
#include <NuMicro.h>
#include "NuMicro.h"
#include <netif/ethernetif.h>
#include <netif/etharp.h>
#include <lwip/icmp.h>
@ -117,7 +117,7 @@ static struct nu_emac nu_emac_arr[] =
.name = "e1",
.memmgr.psEmac = (EMAC_T *)EMC1_BA,
.irqn_tx = IRQ_EMC1_TX,
.irqn_rx = IRQ_EMC1_RX
.irqn_rx = IRQ_EMC1_RX,
.rstidx = EMAC1RST,
.clkidx = EMAC1CKEN,
},

View File

@ -15,7 +15,7 @@
#if defined(BSP_USING_TIMER) && defined(RT_USING_HWTIMER)
#include <rtdevice.h>
#include <NuMicro.h>
#include "NuMicro.h"
#include <drv_sys.h>
/* Private define ---------------------------------------------------------------*/

View File

@ -15,7 +15,7 @@
#if defined(BSP_USING_TIMER_CAPTURE)
#include <rtdevice.h>
#include <NuMicro.h>
#include "NuMicro.h"
#include <drv_sys.h>
/* Private define ---------------------------------------------------------------*/

View File

@ -16,7 +16,7 @@
#include <rtdevice.h>
#include <rthw.h>
#include <NuMicro.h>
#include "NuMicro.h"
#include <nu_bitutil.h>
#include <drv_gpio.h>
#include <stdlib.h>

View File

@ -15,7 +15,7 @@
#if defined( BSP_USING_I2C)
#include <rtdevice.h>
#include <NuMicro.h>
#include "NuMicro.h"
#include <drv_i2c.h>
#include <drv_sys.h>

View File

@ -16,7 +16,7 @@
#include <rtdevice.h>
#include <drv_i2s.h>
#include <NuMicro.h>
#include "NuMicro.h"
/* Private define ---------------------------------------------------------------*/
#define DBG_ENABLE

View File

@ -15,7 +15,7 @@
#include <rtthread.h>
#include <drv_sys.h>
#include <NuMicro.h>
#include "NuMicro.h"
#if !defined(NU_I2S_DMA_FIFO_SIZE)
#define NU_I2S_DMA_FIFO_SIZE (2048)

View File

@ -15,7 +15,7 @@
#include <rtconfig.h>
#include <rtthread.h>
#include <NuMicro.h>
#include "NuMicro.h"
#include <board.h>
#define NU_PDMA_CAP_NONE (0 << 0)

View File

@ -15,7 +15,7 @@
#include <rtdevice.h>
#include <sys/time.h>
#include <NuMicro.h>
#include "NuMicro.h"
#include <drv_sys.h>
/* Private define ---------------------------------------------------------------*/

View File

@ -12,12 +12,9 @@
#include <rtconfig.h>
#define BSP_USING_SCUART
#define BSP_USING_SCUART0
#if defined(BSP_USING_SCUART)
#include <NuMicro.h>
#include "NuMicro.h"
#include <rtdevice.h>
#include <rthw.h>
#include <drv_sys.h>

View File

@ -16,7 +16,7 @@
#include <rtdevice.h>
#include <string.h>
#include <NuMicro.h>
#include "NuMicro.h"
#include <drv_pdma.h>
#include <drv_sys.h>

View File

@ -17,7 +17,7 @@
#include <rtthread.h>
#include <rthw.h>
#include <rtdevice.h>
#include <NuMicro.h>
#include "NuMicro.h"
#include "drv_sys.h"
/* Private define ---------------------------------------------------------------*/
@ -106,7 +106,7 @@ static const struct rt_i2c_bit_ops nu_soft_i2c_bit_ops =
*/
static void nu_soft_i2c_udelay(rt_uint32_t us)
{
nu_systick_udelay(us);
rt_hw_us_delay(us);
}
/**

View File

@ -16,7 +16,7 @@
#include <rtconfig.h>
#include <rtdevice.h>
#include <NuMicro.h>
#include "NuMicro.h"
#include <nu_bitutil.h>
#if defined(BSP_USING_SPI_PDMA)

View File

@ -348,4 +348,22 @@ int nu_clocks(int argc, char **argv)
MSH_CMD_EXPORT(nu_clocks, Get all system clocks);
#endif
#ifdef RT_USING_INTERRUPT_INFO
int list_interrupt(int argc, char **argv)
{
int i;
for (i = 1; i <= SYS_MAX_INT_SOURCE; i++)
{
if (irq_desc[i].handler != rt_hw_interrupt_dummy_handler)
{
rt_kprintf("[%d] %s: %d\n", i, irq_desc[i].name, irq_desc[i].counter);
}
}
return 0;
}
MSH_CMD_EXPORT(list_interrupt, list registered interrupts);
#endif
#endif

View File

@ -49,13 +49,13 @@ void rt_hw_systick_init(void)
ETIMER_Start(USE_TIMER);
} /* rt_hw_systick_init */
void nu_systick_udelay(uint32_t delay_us)
void rt_hw_us_delay(rt_uint32_t us)
{
rt_uint32_t ticks;
rt_uint32_t told, tnow, tcnt = 0;
rt_uint32_t cmp = ETIMER_GetCompareData(USE_TIMER);
ticks = delay_us * cmp / (1000000 / RT_TICK_PER_SECOND);
ticks = us * cmp / (1000000 / RT_TICK_PER_SECOND);
told = ETIMER_GetCounter(USE_TIMER);
while (1)
{
@ -82,5 +82,4 @@ void nu_systick_udelay(uint32_t delay_us)
}
}
}
} /* nu_systick_udelay */
} /* rt_hw_us_delay */

View File

@ -16,7 +16,7 @@
#include <rtdevice.h>
#include <rthw.h>
#include <NuMicro.h>
#include "NuMicro.h"
#include <drv_uart.h>
#include <drv_sys.h>
@ -25,6 +25,7 @@
#endif
/* Private define ---------------------------------------------------------------*/
enum
{
UART_START = -1,
@ -70,6 +71,7 @@ struct nu_uart
IRQn_Type irqn;
E_SYS_IPRST rstidx;
E_SYS_IPCLK clkidx;
#if defined(RT_SERIAL_USING_DMA)
uint32_t dma_flag;
int16_t pdma_perp_tx;
@ -81,7 +83,6 @@ struct nu_uart
int32_t rxdma_trigger_len;
nu_pdma_desc_t pdma_rx_desc;
#endif
};
@ -395,6 +396,34 @@ static void nu_uart_isr(int vector, void *param)
uart_base->FIFOSTS = u32FIFOSts;
}
/**
* Set RS-485 AUD mode
*/
void nu_uart_set_rs485aud(struct rt_serial_device *serial, rt_bool_t bRTSActiveLowLevel)
{
UART_T *uart_base;
RT_ASSERT(serial != RT_NULL);
/* Get base address of uart register */
uart_base = ((nu_uart_t)serial)->uart_base;
/* Set RTS as RS-485 phy direction controlling ping. */
UART_SelectRS485Mode(uart_base, UART_ALTCTL_RS485AUD_Msk, 0);
if (bRTSActiveLowLevel)
{
/* Set direction pin as active-low. */
uart_base->MODEM |= UART_MODEM_RTSACTLV_Msk;
}
else
{
/* Set direction pin as active-high. */
uart_base->MODEM &= ~UART_MODEM_RTSACTLV_Msk;
}
rt_kprintf("Set %s to RS-485 AUD function mode. ActiveLowLevel-%s\n", ((nu_uart_t)serial)->name, bRTSActiveLowLevel ? "YES" : "NO");
}
/**
* Configure uart port
*/

View File

@ -16,5 +16,6 @@
#include <rtdevice.h>
rt_err_t rt_hw_uart_init(void);
void nu_uart_set_rs485aud(struct rt_serial_device *serial, rt_bool_t bRTSActiveLowLevel);
#endif /* __DRV_UART_H__ */

View File

@ -829,7 +829,7 @@ static rt_err_t _init(rt_device_t device)
nu_sys_ip_reset(nu_usbd.rstidx);
nu_systick_udelay(1000);
rt_hw_us_delay(1000);
/* USBD Open */
USBD_ENABLE_USB();

View File

@ -15,7 +15,7 @@
#include <rtdevice.h>
#include <rthw.h>
#include <NuMicro.h>
#include "NuMicro.h"
#include "usb.h"
#include "usbh_lib.h"

View File

@ -16,7 +16,7 @@
#include <rthw.h>
#include <rtdevice.h>
#include <rtdbg.h>
#include <NuMicro.h>
#include "NuMicro.h"
#include <drv_sys.h>
/* Private define ---------------------------------------------------------------*/

View File

@ -13,7 +13,7 @@
#ifndef __BOARD_H__
#define __BOARD_H__
#include <NuMicro.h>
#include "NuMicro.h"
#include "drv_sys.h"
#if defined(__CC_ARM)

View File

@ -0,0 +1,828 @@
#
# Automatically generated file; DO NOT EDIT.
# RT-Thread Configuration
#
#
# RT-Thread Kernel
#
CONFIG_RT_NAME_MAX=16
# CONFIG_RT_USING_ARCH_DATA_TYPE is not set
# CONFIG_RT_USING_SMP is not set
CONFIG_RT_ALIGN_SIZE=4
# CONFIG_RT_THREAD_PRIORITY_8 is not set
CONFIG_RT_THREAD_PRIORITY_32=y
# CONFIG_RT_THREAD_PRIORITY_256 is not set
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_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
CONFIG_RT_DEBUG=y
CONFIG_RT_DEBUG_COLOR=y
# CONFIG_RT_DEBUG_INIT_CONFIG is not set
# CONFIG_RT_DEBUG_THREAD_CONFIG is not set
# CONFIG_RT_DEBUG_SCHEDULER_CONFIG is not set
# CONFIG_RT_DEBUG_IPC_CONFIG is not set
# CONFIG_RT_DEBUG_TIMER_CONFIG is not set
# CONFIG_RT_DEBUG_IRQ_CONFIG is not set
# CONFIG_RT_DEBUG_MEM_CONFIG is not set
# CONFIG_RT_DEBUG_SLAB_CONFIG is not set
# CONFIG_RT_DEBUG_MEMHEAP_CONFIG is not set
# CONFIG_RT_DEBUG_MODULE_CONFIG is not set
#
# Inter-Thread communication
#
CONFIG_RT_USING_SEMAPHORE=y
CONFIG_RT_USING_MUTEX=y
CONFIG_RT_USING_EVENT=y
CONFIG_RT_USING_MAILBOX=y
CONFIG_RT_USING_MESSAGEQUEUE=y
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_AS_HEAP is not set
# CONFIG_RT_USING_USERHEAP is not set
CONFIG_RT_USING_MEMTRACE=y
CONFIG_RT_USING_HEAP=y
#
# Kernel Device Object
#
CONFIG_RT_USING_DEVICE=y
# CONFIG_RT_USING_DEVICE_OPS is not set
# CONFIG_RT_USING_INTERRUPT_INFO is not set
CONFIG_RT_USING_CONSOLE=y
CONFIG_RT_CONSOLEBUF_SIZE=256
CONFIG_RT_CONSOLE_DEVICE_NAME="uart0"
CONFIG_RT_VER_NUM=0x40003
CONFIG_ARCH_ARM=y
# CONFIG_RT_USING_CPU_FFS is not set
CONFIG_ARCH_ARM_ARM9=y
# CONFIG_ARCH_CPU_STACK_GROWS_UPWARD is not set
#
# RT-Thread Components
#
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
#
# C++ features
#
# CONFIG_RT_USING_CPLUSPLUS is not set
#
# Command shell
#
CONFIG_RT_USING_FINSH=y
CONFIG_FINSH_THREAD_NAME="tshell"
CONFIG_FINSH_USING_HISTORY=y
CONFIG_FINSH_HISTORY_LINES=5
CONFIG_FINSH_USING_SYMTAB=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_WORKDIR=y
CONFIG_DFS_FILESYSTEMS_MAX=16
CONFIG_DFS_FILESYSTEM_TYPES_MAX=16
CONFIG_DFS_FD_MAX=64
CONFIG_RT_USING_DFS_MNTTABLE=y
CONFIG_RT_USING_DFS_ELMFAT=y
#
# elm-chan's FatFs, Generic FAT Filesystem Module
#
CONFIG_RT_DFS_ELM_CODE_PAGE=437
CONFIG_RT_DFS_ELM_WORD_ACCESS=y
# CONFIG_RT_DFS_ELM_USE_LFN_0 is not set
# CONFIG_RT_DFS_ELM_USE_LFN_1 is not set
# 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_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_SERIAL_USING_DMA=y
CONFIG_RT_SERIAL_RB_BUFSZ=2048
CONFIG_RT_USING_CAN=y
CONFIG_RT_CAN_USING_HDR=y
CONFIG_RT_USING_HWTIMER=y
CONFIG_RT_USING_CPUTIME=y
CONFIG_RT_USING_I2C=y
# CONFIG_RT_I2C_DEBUG is not set
CONFIG_RT_USING_I2C_BITOPS=y
# CONFIG_RT_I2C_BITOPS_DEBUG is not set
# CONFIG_RT_USING_PHY is not set
CONFIG_RT_USING_PIN=y
CONFIG_RT_USING_ADC=y
# CONFIG_RT_USING_DAC is not set
# CONFIG_RT_USING_PWM is not set
# CONFIG_RT_USING_MTD_NOR is not set
# CONFIG_RT_USING_MTD_NAND is not set
# CONFIG_RT_USING_PM is not set
# CONFIG_RT_USING_RTC is not set
# CONFIG_RT_USING_SDIO is not set
CONFIG_RT_USING_SPI=y
CONFIG_RT_USING_QSPI=y
# CONFIG_RT_USING_SPI_MSD is not set
CONFIG_RT_USING_SFUD=y
CONFIG_RT_SFUD_USING_SFDP=y
CONFIG_RT_SFUD_USING_FLASH_INFO_TABLE=y
CONFIG_RT_SFUD_USING_QSPI=y
CONFIG_RT_SFUD_SPI_MAX_HZ=50000000
CONFIG_RT_DEBUG_SFUD=y
# CONFIG_RT_USING_ENC28J60 is not set
# CONFIG_RT_USING_SPI_WIFI is not set
CONFIG_RT_USING_WDT=y
# CONFIG_RT_USING_AUDIO is not set
# CONFIG_RT_USING_SENSOR 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
CONFIG_RT_HWCRYPTO_KEYBIT_MAX_SIZE=256
# CONFIG_RT_HWCRYPTO_USING_GCM is not set
CONFIG_RT_HWCRYPTO_USING_AES=y
CONFIG_RT_HWCRYPTO_USING_AES_ECB=y
CONFIG_RT_HWCRYPTO_USING_AES_CBC=y
CONFIG_RT_HWCRYPTO_USING_AES_CFB=y
CONFIG_RT_HWCRYPTO_USING_AES_CTR=y
CONFIG_RT_HWCRYPTO_USING_AES_OFB=y
# CONFIG_RT_HWCRYPTO_USING_DES is not set
# CONFIG_RT_HWCRYPTO_USING_3DES is not set
# CONFIG_RT_HWCRYPTO_USING_RC4 is not set
# CONFIG_RT_HWCRYPTO_USING_MD5 is not set
CONFIG_RT_HWCRYPTO_USING_SHA1=y
CONFIG_RT_HWCRYPTO_USING_SHA2=y
CONFIG_RT_HWCRYPTO_USING_SHA2_224=y
CONFIG_RT_HWCRYPTO_USING_SHA2_256=y
CONFIG_RT_HWCRYPTO_USING_SHA2_384=y
CONFIG_RT_HWCRYPTO_USING_SHA2_512=y
CONFIG_RT_HWCRYPTO_USING_RNG=y
# CONFIG_RT_HWCRYPTO_USING_CRC is not set
# CONFIG_RT_HWCRYPTO_USING_BIGNUM is not set
# CONFIG_RT_USING_PULSE_ENCODER is not set
# CONFIG_RT_USING_INPUT_CAPTURE is not set
# CONFIG_RT_USING_WIFI is not set
#
# Using USB
#
CONFIG_RT_USING_USB_HOST=y
CONFIG_RT_USBH_MSTORAGE=y
CONFIG_UDISK_MOUNTPOINT="/mnt/udisk"
CONFIG_RT_USING_USB_DEVICE=y
CONFIG_RT_USBD_THREAD_STACK_SZ=4096
CONFIG_USB_VENDOR_ID=0x0FFE
CONFIG_USB_PRODUCT_ID=0x0001
CONFIG_RT_USB_DEVICE_COMPOSITE=y
CONFIG_RT_USB_DEVICE_CDC=y
CONFIG_RT_USB_DEVICE_NONE=y
CONFIG_RT_USB_DEVICE_MSTORAGE=y
# CONFIG_RT_USB_DEVICE_HID is not set
# CONFIG_RT_USB_DEVICE_RNDIS is not set
# CONFIG_RT_USB_DEVICE_ECM is not set
# CONFIG_RT_USB_DEVICE_WINUSB is not set
# CONFIG_RT_USB_DEVICE_AUDIO is not set
CONFIG_RT_VCOM_TASK_STK_SIZE=2048
CONFIG_RT_CDC_RX_BUFSIZE=128
# CONFIG_RT_VCOM_TX_USE_DMA is not set
CONFIG_RT_VCOM_SERNO="32021919830108"
CONFIG_RT_VCOM_SER_LEN=14
CONFIG_RT_VCOM_TX_TIMEOUT=1000
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
#
# Network
#
#
# Socket abstraction layer
#
CONFIG_RT_USING_SAL=y
CONFIG_SAL_INTERNET_CHECK=y
#
# protocol stack implement
#
CONFIG_SAL_USING_LWIP=y
CONFIG_SAL_USING_POSIX=y
#
# Network interface device
#
CONFIG_RT_USING_NETDEV=y
CONFIG_NETDEV_USING_IFCONFIG=y
CONFIG_NETDEV_USING_PING=y
CONFIG_NETDEV_USING_NETSTAT=y
CONFIG_NETDEV_USING_AUTO_DEFAULT=y
# CONFIG_NETDEV_USING_IPV6 is not set
CONFIG_NETDEV_IPV4=1
CONFIG_NETDEV_IPV6=0
# CONFIG_NETDEV_IPV6_SCOPES is not set
#
# light weight TCP/IP stack
#
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_LWIP_IPV6 is not set
CONFIG_RT_LWIP_MEM_ALIGNMENT=4
CONFIG_RT_LWIP_IGMP=y
CONFIG_RT_LWIP_ICMP=y
# CONFIG_RT_LWIP_SNMP is not set
CONFIG_RT_LWIP_DNS=y
CONFIG_RT_LWIP_DHCP=y
CONFIG_IP_SOF_BROADCAST=1
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_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_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_TCPTHREAD_PRIORITY=10
CONFIG_RT_LWIP_TCPTHREAD_MBOX_SIZE=32
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_LWIP_NETIF_STATUS_CALLBACK=1
CONFIG_LWIP_NETIF_LINK_CALLBACK=1
CONFIG_SO_REUSE=1
CONFIG_LWIP_SO_RCVTIMEO=1
CONFIG_LWIP_SO_SNDTIMEO=1
CONFIG_LWIP_SO_RCVBUF=1
CONFIG_LWIP_SO_LINGER=0
CONFIG_RT_LWIP_NETIF_LOOPBACK=y
CONFIG_LWIP_NETIF_LOOPBACK=1
CONFIG_RT_LWIP_STATS=y
# CONFIG_RT_LWIP_USING_HW_CHECKSUM is not set
CONFIG_RT_LWIP_USING_PING=y
# CONFIG_RT_LWIP_DEBUG is not set
#
# AT commands
#
# CONFIG_RT_USING_AT is not set
# CONFIG_LWIP_USING_DHCPD is not set
#
# VBUS(Virtual Software BUS)
#
# CONFIG_RT_USING_VBUS is not set
#
# Utilities
#
# CONFIG_RT_USING_RYM is not set
# CONFIG_RT_USING_ULOG is not set
CONFIG_RT_USING_UTEST=y
CONFIG_UTEST_THR_STACK_SIZE=4096
CONFIG_UTEST_THR_PRIORITY=20
# CONFIG_RT_USING_LWP is not set
#
# RT-Thread online packages
#
#
# IoT - internet of things
#
# CONFIG_PKG_USING_LORAWAN_DRIVER is not set
# CONFIG_PKG_USING_PAHOMQTT is not set
# CONFIG_PKG_USING_UMQTT is not set
# CONFIG_PKG_USING_WEBCLIENT is not set
# CONFIG_PKG_USING_WEBNET is not set
# CONFIG_PKG_USING_MONGOOSE is not set
# CONFIG_PKG_USING_MYMQTT is not set
# CONFIG_PKG_USING_KAWAII_MQTT is not set
# CONFIG_PKG_USING_BC28_MQTT is not set
# CONFIG_PKG_USING_WEBTERMINAL is not set
# CONFIG_PKG_USING_CJSON is not set
# CONFIG_PKG_USING_JSMN is not set
# CONFIG_PKG_USING_LIBMODBUS is not set
# CONFIG_PKG_USING_FREEMODBUS is not set
# CONFIG_PKG_USING_LJSON is not set
# CONFIG_PKG_USING_EZXML is not set
# CONFIG_PKG_USING_NANOPB is not set
#
# Wi-Fi
#
#
# Marvell WiFi
#
# CONFIG_PKG_USING_WLANMARVELL is not set
#
# Wiced WiFi
#
# CONFIG_PKG_USING_WLAN_WICED is not set
# CONFIG_PKG_USING_RW007 is not set
# CONFIG_PKG_USING_COAP is not set
# CONFIG_PKG_USING_NOPOLL is not set
CONFIG_PKG_USING_NETUTILS=y
CONFIG_PKG_NETUTILS_PATH="/packages/iot/netutils"
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_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_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
#
# IoT Cloud
#
# CONFIG_PKG_USING_ONENET is not set
# CONFIG_PKG_USING_GAGENT_CLOUD is not set
# CONFIG_PKG_USING_ALI_IOTKIT is not set
# CONFIG_PKG_USING_AZURE is not set
# CONFIG_PKG_USING_TENCENT_IOT_EXPLORER is not set
# 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_NIMBLE is not set
# CONFIG_PKG_USING_OTA_DOWNLOADER is not set
# CONFIG_PKG_USING_IPMSG is not set
# CONFIG_PKG_USING_LSSDP is not set
# CONFIG_PKG_USING_AIRKISS_OPEN is not set
# 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
# CONFIG_PKG_USING_ABUP_FOTA is not set
# CONFIG_PKG_USING_LIBCURL2RTT is not set
# CONFIG_PKG_USING_CAPNP is not set
# CONFIG_PKG_USING_RT_CJSON_TOOLS is not set
# CONFIG_PKG_USING_AGILE_TELNET is not set
# CONFIG_PKG_USING_NMEALIB is not set
# CONFIG_PKG_USING_AGILE_JSMN is not set
# 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
#
# security packages
#
# CONFIG_PKG_USING_MBEDTLS 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
#
# language packages
#
# CONFIG_PKG_USING_LUA is not set
# CONFIG_PKG_USING_JERRYSCRIPT is not set
# CONFIG_PKG_USING_MICROPYTHON is not set
#
# multimedia packages
#
# 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_HELIX is not set
# CONFIG_PKG_USING_AZUREGUIX is not set
# CONFIG_PKG_USING_TOUCHGFX2RTT is not set
#
# tools packages
#
# CONFIG_PKG_USING_CMBACKTRACE is not set
# CONFIG_PKG_USING_EASYFLASH is not set
# CONFIG_PKG_USING_EASYLOGGER is not set
# CONFIG_PKG_USING_SYSTEMVIEW 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
# CONFIG_PKG_USING_MEMORYPERF is not set
# CONFIG_PKG_USING_NR_MICRO_SHELL is not set
# CONFIG_PKG_USING_CHINESE_FONT_LIBRARY is not set
# CONFIG_PKG_USING_LUNAR_CALENDAR is not set
# CONFIG_PKG_USING_BS8116A is not set
# CONFIG_PKG_USING_GPS_RMC is not set
# CONFIG_PKG_USING_URLENCODE is not set
# 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
#
# system packages
#
# 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"
CONFIG_FAL_DEBUG_CONFIG=y
CONFIG_FAL_DEBUG=1
CONFIG_FAL_PART_HAS_TABLE_CFG=y
CONFIG_FAL_USING_SFUD_PORT=y
CONFIG_FAL_USING_NOR_FLASH_DEV_NAME="norflash0"
# 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=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
# 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_THREAD_POOL is not set
# CONFIG_PKG_USING_ROBOTS is not set
# CONFIG_PKG_USING_EV is not set
# CONFIG_PKG_USING_SYSWATCH is not set
# CONFIG_PKG_USING_SYS_LOAD_MONITOR is not set
# CONFIG_PKG_USING_PLCCORE is not set
CONFIG_PKG_USING_RAMDISK=y
CONFIG_PKG_RAMDISK_PATH="/packages/system/ramdisk"
# CONFIG_PKG_USING_RAMDISK_V010 is not set
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_RT_PRINTF is not set
# CONFIG_PKG_USING_RT_MEMCPY_CM is not set
# 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
#
# peripheral libraries and drivers
#
# CONFIG_PKG_USING_SENSORS_DRIVERS is not set
# 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
# CONFIG_PKG_USING_SIGNAL_LED is not set
# CONFIG_PKG_USING_LEDBLINK is not set
# CONFIG_PKG_USING_LITTLED is not set
# CONFIG_PKG_USING_LKDGUI is not set
# CONFIG_PKG_USING_NRF5X_SDK is not set
# CONFIG_PKG_USING_NRFX is not set
# 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
# CONFIG_PKG_USING_MOTIONDRIVER2RTT is not set
# CONFIG_PKG_USING_AD7746 is not set
# CONFIG_PKG_USING_PCA9685 is not set
# CONFIG_PKG_USING_I2C_TOOLS is not set
# CONFIG_PKG_USING_NRF24L01 is not set
# CONFIG_PKG_USING_TOUCH_DRIVERS is not set
# CONFIG_PKG_USING_MAX17048 is not set
# CONFIG_PKG_USING_RPLIDAR is not set
# CONFIG_PKG_USING_AS608 is not set
# CONFIG_PKG_USING_RC522 is not set
# CONFIG_PKG_USING_WS2812B is not set
# CONFIG_PKG_USING_EMBARC_BSP is not set
# CONFIG_PKG_USING_EXTERN_RTC_DRIVERS is not set
# CONFIG_PKG_USING_MULTI_RTIMER is not set
# CONFIG_PKG_USING_MAX7219 is not set
# CONFIG_PKG_USING_BEEP is not set
# CONFIG_PKG_USING_EASYBLINK is not set
# CONFIG_PKG_USING_PMS_SERIES is not set
# CONFIG_PKG_USING_CAN_YMODEM is not set
# CONFIG_PKG_USING_LORA_RADIO_DRIVER is not set
# CONFIG_PKG_USING_QLED is not set
# CONFIG_PKG_USING_PAJ7620 is not set
# CONFIG_PKG_USING_AGILE_CONSOLE is not set
# CONFIG_PKG_USING_LD3320 is not set
# CONFIG_PKG_USING_WK2124 is not set
# CONFIG_PKG_USING_LY68L6400 is not set
# CONFIG_PKG_USING_DM9051 is not set
# CONFIG_PKG_USING_SSD1306 is not set
# CONFIG_PKG_USING_QKEY is not set
# CONFIG_PKG_USING_RS485 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
#
# miscellaneous packages
#
# 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_OPTPARSE_USING_DEMO is not set
# CONFIG_PKG_USING_FASTLZ is not set
# CONFIG_PKG_USING_MINILZO is not set
# CONFIG_PKG_USING_QUICKLZ is not set
# CONFIG_PKG_USING_LZMA is not set
# CONFIG_PKG_USING_MULTIBUTTON is not set
# 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_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_MAX_LEN=4096
# CONFIG_VI_ENABLE_8BIT is not set
CONFIG_VI_ENABLE_COLON=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_VI_ASK_TERMINAL=y
CONFIG_VI_ENABLE_UNDO=y
CONFIG_VI_ENABLE_UNDO_QUEUE=y
CONFIG_VI_UNDO_QUEUE_MAX=256
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
# CONFIG_PKG_USING_STATE_MACHINE 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_ILI9341 is not set
# CONFIG_NU_PKG_USING_SPINAND is not set
#
# Hardware Drivers Config
#
#
# On-chip Peripheral Drivers
#
CONFIG_SOC_SERIES_NUC980=y
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_EMAC=y
# CONFIG_BSP_USING_EMAC0 is not set
CONFIG_BSP_USING_EMAC1=y
CONFIG_NU_EMAC_PDMA_MEMCOPY=y
CONFIG_NU_EMAC_PDMA_MEMCOPY_THRESHOLD=128
# CONFIG_BSP_USING_RTC is not set
CONFIG_BSP_USING_ADC=y
CONFIG_BSP_USING_TMR=y
CONFIG_BSP_USING_TIMER=y
CONFIG_BSP_USING_TMR0=y
CONFIG_BSP_USING_TIMER0=y
# CONFIG_BSP_USING_TIMER0_CAPTURE is not set
CONFIG_BSP_USING_TMR1=y
CONFIG_BSP_USING_TIMER1=y
# CONFIG_BSP_USING_TIMER1_CAPTURE is not set
CONFIG_BSP_USING_TMR2=y
CONFIG_BSP_USING_TIMER2=y
# CONFIG_BSP_USING_TIMER2_CAPTURE is not set
CONFIG_BSP_USING_TMR3=y
CONFIG_BSP_USING_TIMER3=y
# CONFIG_BSP_USING_TIMER3_CAPTURE is not set
CONFIG_BSP_USING_TMR4=y
CONFIG_BSP_USING_TIMER4=y
# CONFIG_BSP_USING_TIMER4_CAPTURE is not set
CONFIG_BSP_USING_UART=y
CONFIG_BSP_USING_UART0=y
# CONFIG_BSP_USING_UART0_TX_DMA is not set
# CONFIG_BSP_USING_UART0_RX_DMA is not set
# CONFIG_BSP_USING_UART1 is not set
# CONFIG_BSP_USING_UART2 is not set
# CONFIG_BSP_USING_UART3 is not set
CONFIG_BSP_USING_UART4=y
CONFIG_BSP_USING_UART4_TX_DMA=y
CONFIG_BSP_USING_UART4_RX_DMA=y
# CONFIG_BSP_USING_UART5 is not set
# CONFIG_BSP_USING_UART6 is not set
# CONFIG_BSP_USING_UART7 is not set
CONFIG_BSP_USING_UART8=y
CONFIG_BSP_USING_UART8_TX_DMA=y
CONFIG_BSP_USING_UART8_RX_DMA=y
# CONFIG_BSP_USING_UART9 is not set
CONFIG_BSP_USING_I2C=y
# CONFIG_BSP_USING_I2C0 is not set
CONFIG_BSP_USING_I2C1=y
# CONFIG_BSP_USING_I2C2 is not set
# CONFIG_BSP_USING_I2C3 is not set
# CONFIG_BSP_USING_SDH is not set
CONFIG_BSP_USING_CAN=y
# CONFIG_BSP_USING_CAN0 is not set
# CONFIG_BSP_USING_CAN1 is not set
# CONFIG_BSP_USING_CAN2 is not set
CONFIG_BSP_USING_CAN3=y
# CONFIG_BSP_USING_PWM is not set
CONFIG_BSP_USING_SPI=y
CONFIG_BSP_USING_SPI_PDMA=y
# CONFIG_BSP_USING_SPI0_NONE is not set
CONFIG_BSP_USING_SPI0=y
CONFIG_BSP_USING_SPI0_PDMA=y
CONFIG_BSP_USING_SPI1_NONE=y
# CONFIG_BSP_USING_SPI1 is not set
# CONFIG_BSP_USING_I2S is not set
CONFIG_BSP_USING_QSPI=y
CONFIG_BSP_USING_QSPI0=y
CONFIG_BSP_USING_QSPI0_PDMA=y
# CONFIG_BSP_USING_SCUART is not set
CONFIG_BSP_USING_CRYPTO=y
# CONFIG_NU_PRNG_USE_SEED is not set
# CONFIG_BSP_USING_SOFT_I2C is not set
CONFIG_BSP_USING_WDT=y
# CONFIG_BSP_USING_EBI is not set
CONFIG_BSP_USING_USBD=y
CONFIG_BSP_USING_USBH=y
#
# On-board Peripheral Drivers
#
CONFIG_BSP_USING_CONSOLE=y
CONFIG_BOARD_USING_UART8_RS485=y
CONFIG_BOARD_USING_STORAGE_SPIFLASH=y
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."

View File

@ -0,0 +1,29 @@
mainmenu "RT-Thread Configuration"
config BSP_DIR
string
option env="BSP_ROOT"
default "."
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"
config PKGS_DIR
string
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"

View File

@ -0,0 +1,106 @@
# NK-RTU980
## 1. Introduction
NuMaker-RTU-NUC980, also known as Chili, is a Nuvotons development platform that uses NUC980DR61YC microprocessor with a 64-pin package on a 50 mm x 50 mm dimension PCB. Chili board provides a high-end hardware features including a NUC980DR61YC ARM926EJ-S processor with 64 MB DRAM, 32MB SPI NOR Flash, 10/100 Ethernet MAC interface, USB 2.0 High Speed host/device connector, CAN bus, RS-485 and five GPIOs. Crypto engine supports RSA2048, AES256, ECC, SHA512 algorithm and a Pseudo Random Number Generator for communication security protection.
[![NK-RTU980](https://i.imgur.com/gCKG4PN.png "NK-RTU980")](https://i.imgur.com/gCKG4PN.png "NK-RTU980")
### 1.1 MCU specification
| | Features |
| -- | -- |
| Part NO. | NUC980DR61YC |
| CPU ARCH. | 32-bit ARM926EJ-STM |
| Operation frequency | 300 MHz |
| Embedded SDRAM size | Built-in 64MB |
| Crypto engine | AES, RSA, ECC, HMAC and SHA crypto accelerator |
| RMII interface | 10/100 Mbps x1 |
| USB 2.0 | High Speed Host x1, High Speed Host/Device x1 |
| Extern storage | 32 MB SPI-NOR Flash |
### 1.2 Interface
| Interface |
| -- |
| Arduino UNO |
| A RJ45 Ethernet |
| An USB 2.0 HS port |
| An USB 2.0 HS OTG port |
| A RS-485 |
| A CAN bus |
| An ICE connector |
### 1.3 On-board devices
| Device | Description | Driver supporting status |
| -- | -- | -- |
|Ethernet PHY | IP101GR | Supported |
|Button | | Supported |
|LEDs | | Supported |
|USB Device | VCOM + MStorage | Supported |
|USB Host | MStorage | Supported |
|SPI NOR flash | W25Q256F | Supported |
|VCOM | For console | Ready.(Need to install VCOM driver) |
## 2. Supported compiler
Support GCC, MDK4 and MDK5 IDE/compilers. More information of these compiler version as following:
| IDE/Compiler | Tested version |
| ---------- | ---------------------------- |
| MDK4 | 4.76 |
| MDK5 | 5.26.2 |
| GCC | GCC 5.4.1 20160919 (release) |
Notice: Please install ICE driver for development.
## 3. Program firmware
### 3.1 SDRAM Downloading using NuWriter
You can use NuWriter to download rtthread.bin into SDRAM, then run it.
[![SDRAM Downloading using NuWriter](https://i.imgur.com/NvbzsRp.gif "SDRAM Downloading using NuWriter")](https://i.imgur.com/NvbzsRp.gif "SDRAM Downloading using NuWriter")
<br>
Choose type: DDR/SRAM<br>
<< Press Re-Connect >><br>
Choose file: Specify your rtthread.bin file.<br>
Execute Address: 0x0<br>
Option: Download and run<br>
<< Press Download >><br>
Enjoy!! <br>
<br>
### 3.2 SPI NOR flash using NuWriter
You can use NuWriter to program rtthread.bin into SPI NOR flash.
[![SPI NOR flash](https://i.imgur.com/8OtXGSQ.gif "SPI NOR flash")](https://i.imgur.com/8OtXGSQ.gif "SPI NOR flash using NuWriter")
<br>
Choose type: SPI<br>
<< Press Re-Connect >><br>
Choose file: Specify your rtthread.bin file.<br>
Image Type: Loader<br>
Execute Address: 0x0<br>
<< Press Program >><br>
<< Press OK & Wait it down >><br>
<< Set Power-on setting to SPI NOR booting >><br>
<< Press Reset button on board >><br>
Enjoy!! <br>
<br>
## 4. Test
You can use Tera Term terminate emulator (or other software) to type commands of RTT. All parameters of serial communication are shown in below image. Here, you can find out the corresponding port number of Nuvoton Virtual Com Port in window device manager.
[![Serial settings](https://i.imgur.com/5NYuSNM.png "Serial settings")](https://i.imgur.com/5NYuSNM.png "Serial settings")
## 5. Purchase
* [Nuvoton Direct][1]
## 6. Resources
* [Download Board Schematics][2]
* [Download NK-RTU980 Quick Start Guide][3]
* [Download TRM][4]
* [Download NuWriter][5]
[1]: https://direct.nuvoton.com/tw/numaker-rtu-nuc980
[2]: https://www.nuvoton.com/resource-download.jsp?tp_GUID=HL1020200508155209
[3]: https://www.nuvoton.com/resource-download.jsp?tp_GUID=UG1320200623183237
[4]: https://www.nuvoton.com/resource-download.jsp?tp_GUID=DA05-NUC980-1
[5]: https://github.com/OpenNuvoton/NUC980_NuWriter

View File

@ -0,0 +1,14 @@
# for module compiling
import os
Import('RTT_ROOT')
cwd = str(Dir('#'))
objs = []
list = os.listdir(cwd)
for d in list:
path = os.path.join(cwd, d)
if os.path.isfile(os.path.join(path, 'SConscript')):
objs = objs + SConscript(os.path.join(d, 'SConscript'))
Return('objs')

Some files were not shown because too many files have changed in this diff Show More