diff --git a/bsp/bluetrum/ab32vg1-ab-prougen/README.md b/bsp/bluetrum/ab32vg1-ab-prougen/README.md index 6f24c84c46..1e56724f35 100644 --- a/bsp/bluetrum/ab32vg1-ab-prougen/README.md +++ b/bsp/bluetrum/ab32vg1-ab-prougen/README.md @@ -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 打印 diff --git a/bsp/bluetrum/libraries/hal_drivers/drv_common.h b/bsp/bluetrum/libraries/hal_drivers/drv_common.h index 0696bb17f3..3af014f49a 100644 --- a/bsp/bluetrum/libraries/hal_drivers/drv_common.h +++ b/bsp/bluetrum/libraries/hal_drivers/drv_common.h @@ -15,4 +15,6 @@ #include #include +#define GET_PIN(PORTx,PIN) (uint8_t)__AB32_GET_PIN_##PORTx(PIN) + #endif // DRV_COMMON_H__ diff --git a/bsp/bluetrum/libraries/hal_drivers/drv_gpio.h b/bsp/bluetrum/libraries/hal_drivers/drv_gpio.h index 7955a47d11..55cf2efc00 100644 --- a/bsp/bluetrum/libraries/hal_drivers/drv_gpio.h +++ b/bsp/bluetrum/libraries/hal_drivers/drv_gpio.h @@ -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); diff --git a/bsp/nuvoton/README.md b/bsp/nuvoton/README.md index dfa048ab2f..9d0c433984 100644 --- a/bsp/nuvoton/README.md +++ b/bsp/nuvoton/README.md @@ -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 | \ No newline at end of file +| [numaker-m2354](numaker-m2354) | Nuvoton NuMaker-M2354 | +| [nk-rtu980](nk-rtu980) | Nuvoton NK-RTU980 | \ No newline at end of file diff --git a/bsp/nuvoton/libraries/m2354/Device/Nuvoton/M2354/Include/NuMicro.h b/bsp/nuvoton/libraries/m2354/Device/Nuvoton/M2354/Include/NuMicro.h index 548ab843cc..cccccd4e7a 100644 --- a/bsp/nuvoton/libraries/m2354/Device/Nuvoton/M2354/Include/NuMicro.h +++ b/bsp/nuvoton/libraries/m2354/Device/Nuvoton/M2354/Include/NuMicro.h @@ -9,6 +9,7 @@ #ifndef __NUMICRO_H__ #define __NUMICRO_H__ +#include "nutool_clkcfg.h" #include "M2354.h" #endif /* __NUMICRO_H__ */ diff --git a/bsp/nuvoton/libraries/m2354/Device/Nuvoton/M2354/Include/system_M2354.h b/bsp/nuvoton/libraries/m2354/Device/Nuvoton/M2354/Include/system_M2354.h index ba5bbc1f4d..edf1e3e6e5 100644 --- a/bsp/nuvoton/libraries/m2354/Device/Nuvoton/M2354/Include/system_M2354.h +++ b/bsp/nuvoton/libraries/m2354/Device/Nuvoton/M2354/Include/system_M2354.h @@ -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 diff --git a/bsp/nuvoton/libraries/m2354/StdDriver/lib/libStdDriver.ewp b/bsp/nuvoton/libraries/m2354/StdDriver/lib/libStdDriver.ewp index 555ab69852..69c44b7d03 100644 --- a/bsp/nuvoton/libraries/m2354/StdDriver/lib/libStdDriver.ewp +++ b/bsp/nuvoton/libraries/m2354/StdDriver/lib/libStdDriver.ewp @@ -348,6 +348,7 @@ $PROJ_DIR$\..\..\Device\Nuvoton\M2354\Include $PROJ_DIR$\..\..\CMSIS\Include $PROJ_DIR$\..\inc + $PROJ_DIR$