mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-11-08 14:43:04 +08:00
Merge branch 'master' of https://github.com/RT-Thread/rt-thread into malloc
This commit is contained in:
commit
6e46b3fec0
101 files changed
+2801
-3156
No files matched your search
@@ -47,12 +47,6 @@ void rtthread_startup(void)
|
||||
/* show version */
|
||||
rt_show_version();
|
||||
|
||||
/* init tick */
|
||||
rt_system_tick_init();
|
||||
|
||||
/* init kernel object */
|
||||
rt_system_object_init();
|
||||
|
||||
/* init timer system */
|
||||
rt_system_timer_init();
|
||||
|
||||
|
||||
@@ -30,8 +30,6 @@ int main(void)
|
||||
#endif
|
||||
|
||||
rt_hw_board_init();
|
||||
rt_system_tick_init();
|
||||
rt_system_object_init();
|
||||
rt_system_timer_init();
|
||||
|
||||
#ifdef RT_USING_HEAP
|
||||
|
||||
@@ -35,12 +35,6 @@ void rtthread_startup(void)
|
||||
/* show version */
|
||||
rt_show_version();
|
||||
|
||||
/* init tick */
|
||||
rt_system_tick_init();
|
||||
|
||||
/* init kernel object */
|
||||
rt_system_object_init();
|
||||
|
||||
/* init timer system */
|
||||
rt_system_timer_init();
|
||||
|
||||
|
||||
@@ -102,12 +102,6 @@ void rtthread_startup(void)
|
||||
/* show version */
|
||||
rt_show_version();
|
||||
|
||||
/* init tick */
|
||||
rt_system_tick_init();
|
||||
|
||||
/* init kernel object */
|
||||
rt_system_object_init();
|
||||
|
||||
/* init timer system */
|
||||
rt_system_timer_init();
|
||||
|
||||
|
||||
@@ -93,12 +93,6 @@ void rtthread_startup(void)
|
||||
/* show version */
|
||||
rt_show_version();
|
||||
|
||||
/* initialize tick */
|
||||
rt_system_tick_init();
|
||||
|
||||
/* initialize kernel object */
|
||||
rt_system_object_init();
|
||||
|
||||
/* initialize timer system */
|
||||
rt_system_timer_init();
|
||||
|
||||
|
||||
@@ -65,12 +65,6 @@ void rtthread_startup(void)
|
||||
/* show version */
|
||||
rt_show_version();
|
||||
|
||||
/* init tick */
|
||||
rt_system_tick_init();
|
||||
|
||||
/* init kernel object */
|
||||
rt_system_object_init();
|
||||
|
||||
/* init timer system */
|
||||
rt_system_timer_init();
|
||||
|
||||
|
||||
@@ -1095,14 +1095,9 @@ U32 RTOS_InitKernel(U32 Heap_size)
|
||||
/* show version */
|
||||
//rt_show_version();
|
||||
|
||||
/* initialize tick */
|
||||
//rt_system_tick_init();
|
||||
RTOS_HwTickInit();
|
||||
//rt_kprintf("set tick\n");
|
||||
|
||||
/* initialize kernel object */
|
||||
rt_system_object_init();
|
||||
|
||||
/* initialize timer system */
|
||||
rt_system_timer_init();
|
||||
|
||||
|
||||
+28
-1
@@ -70,6 +70,8 @@ CONFIG_RT_VER_NUM=0x40003
|
||||
CONFIG_ARCH_CPU_64BIT=y
|
||||
# CONFIG_RT_USING_CPU_FFS is not set
|
||||
CONFIG_ARCH_RISCV=y
|
||||
CONFIG_ARCH_RISCV_FPU=y
|
||||
CONFIG_ARCH_RISCV_FPU_S=y
|
||||
CONFIG_ARCH_RISCV64=y
|
||||
# CONFIG_ARCH_CPU_STACK_GROWS_UPWARD is not set
|
||||
|
||||
@@ -150,8 +152,10 @@ CONFIG_RT_SERIAL_RB_BUFSZ=64
|
||||
# CONFIG_RT_USING_HWTIMER is not set
|
||||
# CONFIG_RT_USING_CPUTIME is not set
|
||||
# CONFIG_RT_USING_I2C is not set
|
||||
# CONFIG_RT_USING_PHY is not set
|
||||
CONFIG_RT_USING_PIN=y
|
||||
# CONFIG_RT_USING_ADC is not set
|
||||
# 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
|
||||
@@ -192,6 +196,7 @@ CONFIG_RT_USING_LIBC=y
|
||||
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
|
||||
|
||||
@@ -262,7 +267,9 @@ CONFIG_ULOG_BACKEND_USING_CONSOLE=y
|
||||
#
|
||||
# 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
|
||||
@@ -308,7 +315,7 @@ CONFIG_ULOG_BACKEND_USING_CONSOLE=y
|
||||
# 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_IOTHUB 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
|
||||
@@ -330,6 +337,9 @@ CONFIG_ULOG_BACKEND_USING_CONSOLE=y
|
||||
# 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
|
||||
|
||||
#
|
||||
# security packages
|
||||
@@ -338,6 +348,7 @@ CONFIG_ULOG_BACKEND_USING_CONSOLE=y
|
||||
# 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
|
||||
@@ -372,7 +383,9 @@ CONFIG_ULOG_BACKEND_USING_CONSOLE=y
|
||||
# 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
|
||||
|
||||
#
|
||||
# system packages
|
||||
@@ -396,6 +409,10 @@ CONFIG_ULOG_BACKEND_USING_CONSOLE=y
|
||||
# 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 is not set
|
||||
# CONFIG_PKG_USING_MININI is not set
|
||||
# CONFIG_PKG_USING_QBOOT is not set
|
||||
# CONFIG_PKG_USING_UCOSIII_WRAPPER is not set
|
||||
|
||||
#
|
||||
# peripheral libraries and drivers
|
||||
@@ -441,6 +458,7 @@ CONFIG_PKG_KENDRYTE_SDK_VERNUM=0x0055
|
||||
# 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
|
||||
@@ -450,6 +468,12 @@ CONFIG_PKG_KENDRYTE_SDK_VERNUM=0x0055
|
||||
# CONFIG_PKG_USING_PMS_SERIES is not set
|
||||
# CONFIG_PKG_USING_NUCLEI_SDK 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
|
||||
|
||||
#
|
||||
# miscellaneous packages
|
||||
@@ -486,6 +510,9 @@ CONFIG_PKG_KENDRYTE_SDK_VERNUM=0x0055
|
||||
# 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
|
||||
# CONFIG_PKG_USING_THREES is not set
|
||||
# CONFIG_PKG_USING_2048 is not set
|
||||
CONFIG_BOARD_K210_EVB=y
|
||||
CONFIG_BSP_USING_UART_HS=y
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ source "$PKGS_DIR/Kconfig"
|
||||
config BOARD_K210_EVB
|
||||
bool
|
||||
select ARCH_RISCV64
|
||||
select ARCH_RISCV_FPU_S
|
||||
select PKG_USING_KENDRYTE_SDK
|
||||
select RT_USING_COMPONENTS_INIT
|
||||
select RT_USING_USER_MAIN
|
||||
|
||||
@@ -48,6 +48,8 @@
|
||||
#define RT_VER_NUM 0x40003
|
||||
#define ARCH_CPU_64BIT
|
||||
#define ARCH_RISCV
|
||||
#define ARCH_RISCV_FPU
|
||||
#define ARCH_RISCV_FPU_S
|
||||
#define ARCH_RISCV64
|
||||
|
||||
/* RT-Thread Components */
|
||||
|
||||
@@ -38,7 +38,7 @@ if PLATFORM == 'gcc':
|
||||
OBJDUMP = PREFIX + 'objdump'
|
||||
OBJCPY = PREFIX + 'objcopy'
|
||||
|
||||
DEVICE = ' -mcmodel=medany -march=rv64imafdc -mabi=lp64d'
|
||||
DEVICE = ' -mcmodel=medany -march=rv64imafc -mabi=lp64f -fsingle-precision-constant'
|
||||
CFLAGS = DEVICE + ' -fno-common -ffunction-sections -fdata-sections -fstrict-volatile-bitfields'
|
||||
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp'
|
||||
LFLAGS = DEVICE + ' -nostartfiles -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,_start -T link.lds'
|
||||
|
||||
@@ -77,12 +77,6 @@ void rtthread_startup(void)
|
||||
/* show version */
|
||||
rt_show_version();
|
||||
|
||||
/* init tick */
|
||||
rt_system_tick_init();
|
||||
|
||||
/* init kernel object */
|
||||
rt_system_object_init();
|
||||
|
||||
/* init timer system */
|
||||
rt_system_timer_init();
|
||||
|
||||
|
||||
@@ -77,12 +77,6 @@ void rtthread_startup(void)
|
||||
/* show version */
|
||||
rt_show_version();
|
||||
|
||||
/* init tick */
|
||||
rt_system_tick_init();
|
||||
|
||||
/* init kernel object */
|
||||
rt_system_object_init();
|
||||
|
||||
/* init timer system */
|
||||
rt_system_timer_init();
|
||||
|
||||
|
||||
@@ -77,12 +77,6 @@ void rtthread_startup(void)
|
||||
/* show version */
|
||||
rt_show_version();
|
||||
|
||||
/* init tick */
|
||||
rt_system_tick_init();
|
||||
|
||||
/* init kernel object */
|
||||
rt_system_object_init();
|
||||
|
||||
/* init timer system */
|
||||
rt_system_timer_init();
|
||||
|
||||
|
||||
@@ -52,12 +52,6 @@ void rtthread_startup(void)
|
||||
/* init board */
|
||||
rt_hw_board_init();
|
||||
|
||||
/* init tick */
|
||||
rt_system_tick_init();
|
||||
|
||||
/* init kernel object */
|
||||
rt_system_object_init();
|
||||
|
||||
rt_show_version();
|
||||
|
||||
/* init timer system */
|
||||
|
||||
@@ -38,12 +38,6 @@ void rtthread_startup(void)
|
||||
/* init board */
|
||||
rt_hw_board_init();
|
||||
|
||||
/* init tick */
|
||||
rt_system_tick_init();
|
||||
|
||||
/* init kernel object */
|
||||
rt_system_object_init();
|
||||
|
||||
rt_show_version();
|
||||
|
||||
/* init timer system */
|
||||
|
||||
@@ -27,12 +27,6 @@ void rtthread_startup(void)
|
||||
/* show version */
|
||||
rt_show_version();
|
||||
|
||||
/* initialize tick */
|
||||
rt_system_tick_init();
|
||||
|
||||
/* initialize kernel object */
|
||||
rt_system_object_init();
|
||||
|
||||
/* initialize timer system */
|
||||
rt_system_timer_init();
|
||||
|
||||
|
||||
@@ -52,12 +52,6 @@ void rtthread_startup(void)
|
||||
/* show version */
|
||||
rt_show_version();
|
||||
|
||||
/* init tick */
|
||||
rt_system_tick_init();
|
||||
|
||||
/* init kernel object */
|
||||
rt_system_object_init();
|
||||
|
||||
/* init timer system */
|
||||
rt_system_timer_init();
|
||||
|
||||
|
||||
@@ -48,13 +48,7 @@ void rtthread_startup(void)
|
||||
|
||||
/* show version */
|
||||
rt_show_version();
|
||||
|
||||
/* init tick */
|
||||
rt_system_tick_init();
|
||||
|
||||
/* init kernel object */
|
||||
rt_system_object_init();
|
||||
|
||||
|
||||
/* init timer system */
|
||||
rt_system_timer_init();
|
||||
|
||||
|
||||
@@ -44,12 +44,6 @@ void rtthread_startup(void)
|
||||
/* show version */
|
||||
rt_show_version();
|
||||
|
||||
/* init tick */
|
||||
rt_system_tick_init();
|
||||
|
||||
/* init kernel object */
|
||||
rt_system_object_init();
|
||||
|
||||
/* init timer system */
|
||||
rt_system_timer_init();
|
||||
|
||||
|
||||
@@ -55,12 +55,6 @@ void rtthread_startup(void)
|
||||
|
||||
rt_show_version();
|
||||
|
||||
/* init tick */
|
||||
rt_system_tick_init();
|
||||
|
||||
/* init kernel object */
|
||||
rt_system_object_init();
|
||||
|
||||
/* init timer system */
|
||||
rt_system_timer_init();
|
||||
|
||||
|
||||
@@ -49,12 +49,6 @@ void rtthread_startup()
|
||||
/* show version */
|
||||
rt_show_version();
|
||||
|
||||
/* init tick */
|
||||
rt_system_tick_init();
|
||||
|
||||
/* init kernel object */
|
||||
rt_system_object_init();
|
||||
|
||||
/* init timer system */
|
||||
rt_system_timer_init();
|
||||
|
||||
|
||||
@@ -45,12 +45,6 @@ void rtthread_startup(void)
|
||||
/* show version */
|
||||
rt_show_version();
|
||||
|
||||
/* init tick */
|
||||
rt_system_tick_init();
|
||||
|
||||
/* init kernel object */
|
||||
rt_system_object_init();
|
||||
|
||||
/* init timer system */
|
||||
rt_system_timer_init();
|
||||
|
||||
|
||||
@@ -48,12 +48,6 @@ void rtthread_startup(void)
|
||||
/* show version */
|
||||
rt_show_version();
|
||||
|
||||
/* init tick */
|
||||
rt_system_tick_init();
|
||||
|
||||
/* init kernel object */
|
||||
rt_system_object_init();
|
||||
|
||||
/* init timer system */
|
||||
rt_system_timer_init();
|
||||
|
||||
|
||||
@@ -48,12 +48,6 @@ void rtthread_startup(void)
|
||||
/* show version */
|
||||
rt_show_version();
|
||||
|
||||
/* init tick */
|
||||
rt_system_tick_init();
|
||||
|
||||
/* init kernel object */
|
||||
rt_system_object_init();
|
||||
|
||||
/* init timer system */
|
||||
rt_system_timer_init();
|
||||
|
||||
|
||||
@@ -48,12 +48,6 @@ void rtthread_startup(void)
|
||||
/* show version */
|
||||
rt_show_version();
|
||||
|
||||
/* init tick */
|
||||
rt_system_tick_init();
|
||||
|
||||
/* init kernel object */
|
||||
rt_system_object_init();
|
||||
|
||||
/* init timer system */
|
||||
rt_system_timer_init();
|
||||
|
||||
|
||||
@@ -35,12 +35,6 @@ void rtthread_startup(void)
|
||||
/* show version */
|
||||
rt_show_version();
|
||||
|
||||
/* init tick */
|
||||
rt_system_tick_init();
|
||||
|
||||
/* init kernel object */
|
||||
rt_system_object_init();
|
||||
|
||||
/* init timer system */
|
||||
rt_system_timer_init();
|
||||
|
||||
|
||||
@@ -81,12 +81,6 @@ void rtthread_startup(void)
|
||||
/* init board */
|
||||
rt_hw_board_init();
|
||||
|
||||
/* init tick */
|
||||
rt_system_tick_init();
|
||||
|
||||
/* init kernel object */
|
||||
rt_system_object_init();
|
||||
|
||||
rt_show_version();
|
||||
|
||||
/* init timer system */
|
||||
|
||||
@@ -82,12 +82,6 @@ void rtthread_startup(void)
|
||||
|
||||
rt_show_version();
|
||||
|
||||
/* init tick */
|
||||
rt_system_tick_init();
|
||||
|
||||
/* init kernel object */
|
||||
rt_system_object_init();
|
||||
|
||||
/* init timer system */
|
||||
rt_system_timer_init();
|
||||
|
||||
|
||||
@@ -68,12 +68,6 @@ void rtthread_startup(void)
|
||||
/* show version */
|
||||
rt_show_version();
|
||||
|
||||
/* init tick */
|
||||
rt_system_tick_init();
|
||||
|
||||
/* init kernel object */
|
||||
rt_system_object_init();
|
||||
|
||||
/* init timer system */
|
||||
rt_system_timer_init();
|
||||
|
||||
|
||||
@@ -63,12 +63,6 @@ void rtthread_startup()
|
||||
/* show version */
|
||||
rt_show_version();
|
||||
|
||||
/* init tick */
|
||||
rt_system_tick_init();
|
||||
|
||||
/* init kernel object */
|
||||
rt_system_object_init();
|
||||
|
||||
/* init timer system */
|
||||
rt_system_timer_init();
|
||||
|
||||
|
||||
@@ -47,12 +47,6 @@ void rtthread_startup(void)
|
||||
/* show version */
|
||||
rt_show_version();
|
||||
|
||||
/* init tick */
|
||||
rt_system_tick_init();
|
||||
|
||||
/* init kernel object */
|
||||
rt_system_object_init();
|
||||
|
||||
/* init timer system */
|
||||
rt_system_timer_init();
|
||||
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
* Date Author Notes
|
||||
* 2018-06-22 tyx first
|
||||
* 2018-12-12 balanceTWK first version
|
||||
* 2019-06-11 WillianChan Add SD card hot plug detection
|
||||
* 2019-06-11 WillianChan Add SD card hot plug detection
|
||||
* 2020-11-09 whj4674672 fix sdio non-aligned access problem
|
||||
*/
|
||||
|
||||
#include "board.h"
|
||||
@@ -366,7 +367,7 @@ static void rthw_sdio_request(struct rt_mmcsd_host *host, struct rt_mmcsd_req *r
|
||||
|
||||
if (req->cmd != RT_NULL)
|
||||
{
|
||||
memset(&pkg, 0, sizeof(pkg));
|
||||
rt_memset(&pkg, 0, sizeof(pkg));
|
||||
data = req->cmd->data;
|
||||
pkg.cmd = req->cmd;
|
||||
|
||||
@@ -382,7 +383,7 @@ static void rthw_sdio_request(struct rt_mmcsd_host *host, struct rt_mmcsd_req *r
|
||||
pkg.buff = cache_buf;
|
||||
if (data->flags & DATA_DIR_WRITE)
|
||||
{
|
||||
memcpy(cache_buf, data->buf, size);
|
||||
rt_memcpy(cache_buf, data->buf, size);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -391,13 +392,13 @@ static void rthw_sdio_request(struct rt_mmcsd_host *host, struct rt_mmcsd_req *r
|
||||
|
||||
if ((data != RT_NULL) && (data->flags & DATA_DIR_READ) && ((rt_uint32_t)data->buf & (SDIO_ALIGN_LEN - 1)))
|
||||
{
|
||||
memcpy(data->buf, cache_buf, data->blksize * data->blks);
|
||||
rt_memcpy(data->buf, cache_buf, data->blksize * data->blks);
|
||||
}
|
||||
}
|
||||
|
||||
if (req->stop != RT_NULL)
|
||||
{
|
||||
memset(&pkg, 0, sizeof(pkg));
|
||||
rt_memset(&pkg, 0, sizeof(pkg));
|
||||
pkg.cmd = req->stop;
|
||||
rthw_sdio_send_command(sdio, &pkg);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# STM32F401 Nucleo-64 BSP (Board Support Package) Execution Instruction
|
||||
# STM32F401 Nucleo-64 BSP Introduction
|
||||
|
||||
[中文页](README_zh.md) |
|
||||
|
||||
@@ -33,9 +33,11 @@ The mainly-used **on-board resources** are shown as follows:
|
||||
- Common-used interface: USB, Arduino Uno, and ST morpho
|
||||
- Debug interface: ST-LINK/V2-1
|
||||
|
||||
For more details about this board, please refer to the ST official documentation: [STM32 Nucleo-64 development board with STM32F401RE MCU](https://www.st.com/zh/evaluation-tools/nucleo-f401re.html)
|
||||
#### For more details about this board, please refer to the [ST official documentation](https://www.st.com/zh/evaluation-tools/nucleo-f401re.html)
|
||||
|
||||
## Peripheral Condition
|
||||
|
||||
|
||||
### Peripheral Condition
|
||||
|
||||
Each peripheral supporting condition for this BSP is as follows:
|
||||
|
||||
@@ -45,11 +47,11 @@ Each peripheral supporting condition for this BSP is as follows:
|
||||
| UART | Support | UART2 |
|
||||
| SPI | Support | SPI1 |
|
||||
|
||||
## Execution Instruction
|
||||
|
||||
### Quickly Get Started
|
||||
|
||||
This BSP provides MDK5 and IAR projects for developers. Also support GCC development environment Here's an example of the MDK5 development environment, to introduce how to run the system.
|
||||
## Quickly Get Started
|
||||
|
||||
This BSP provides MDK5 and IAR projects for developers. Also support GCC development environment. Here's an example of the MDK5 development environment, to introduce how to run the system.
|
||||
|
||||
#### Hardware Connection
|
||||
|
||||
@@ -57,7 +59,7 @@ Use a Type-A to Mini-B cable to connect the development board to the PC and turn
|
||||
|
||||
#### Compile And Download
|
||||
|
||||
Double-click the project.uvprojx file, to open the MDK5 project, compile and download the program to the board.
|
||||
Double-click the `project.uvprojx` file, to open the MDK5 project, compile and download the program to the board.
|
||||
|
||||
> By default, the project uses ST_LINK simulator to download the program, when the ST_LINK connects the board, clicking the download button can download the program to the board.
|
||||
|
||||
@@ -93,8 +95,6 @@ This BSP only enables GPIO and serial port 2 by default. If need more advanced f
|
||||
|
||||
According to the pin number specification, in the new stm32 bsp framework, the GPIO driver is managed in a sequential numbering manner.
|
||||
|
||||
## Notes
|
||||
|
||||
The pin serial number corresponds to the pin name as shown in the following table:
|
||||
|
||||
| STM32 Pin Name | Pin Sequence Number |
|
||||
@@ -104,3 +104,8 @@ The pin serial number corresponds to the pin name as shown in the following tabl
|
||||
| PC0 - PC15 | 32 - 47 |
|
||||
| PD0 - ... | 48 - ... |
|
||||
|
||||
|
||||
|
||||
## Maintained By
|
||||
|
||||
[shaoguoji](https://github.com/shaoguoji) 752147916@qq.com
|
||||
@@ -1,107 +1,88 @@
|
||||
# NUCLEO-F412ZG 开发板 BSP 说明
|
||||
# STM32F412-Nucleo BSP Introduction
|
||||
|
||||
## 简介
|
||||
[中文](README_zh.md)
|
||||
|
||||
本文档为 RT-Thread 开发团队为 NUCLEO-F412ZG 开发板提供的 BSP (板级支持包) 说明。
|
||||
## MCU: STM32F412ZG @100MHz, 1024KB FLASH, 256KB RAM
|
||||
|
||||
主要内容如下:
|
||||
STM32F412xE/G devices are based on the high-performance Arm® Cortex® -M4 32-bit RISC core operating at a frequency of up to 100 MHz. Their Cortex®-M4 core features a Floating point unit (FPU) single precision which supports all Arm single-precision data-processing instructions and data types. It also implements a full set of DSP instructions and a memory protection unit (MPU) which enhances application security.
|
||||
|
||||
- 开发板资源介绍
|
||||
- BSP 快速上手
|
||||
- 进阶使用方法
|
||||
STM32F412xE/G devices belong to the STM32 Dynamic Efficiency™ product line (with products combining power efficiency, performance and integration) while adding a new innovative feature called Batch Acquisition Mode (BAM) allowing even more power consumption saving during data batching.
|
||||
STM32F412xE/G devices incorporate high-speed embedded memories (up to 1 Mbyte of Flash memory, 256 Kbytes of SRAM), and an extensive range of enhanced I/Os and peripherals connected to two APB buses, three AHB buses and a 32-bit multi-AHB bus matrix.
|
||||
All devices offer one 12-bit ADC, a low-power RTC, twelve general-purpose 16-bit timers, two PWM timers for motor control and two general-purpose 32-bit timers.
|
||||
They also feature standard and advanced communication interfaces:
|
||||
In addition, STM32F412xE/G devices embed advanced peripherals:
|
||||
STM32F412xE/G devices are offered in 7 packages ranging from 48 to 144 pins. The set of available peripherals depends on the selected package.
|
||||
The STM32F412xE/G operates in the -40 to +125 °C temperature range from a 1.7 (PDR OFF) to 3.6 V power supply. A comprehensive set of power-saving modes allows the design of low-power applications.
|
||||
These features make the STM32F412xE/G microcontrollers suitable for a wide range of applications.
|
||||
|
||||
通过阅读快速上手章节开发者可以快速地上手该 BSP,将 RT-Thread 运行在开发板上。在进阶使用指南章节,将会介绍更多高级功能,帮助开发者利用 RT-Thread 驱动更多板载资源。
|
||||
#### KEY FEATURES
|
||||
|
||||
## 开发板介绍
|
||||
- Dynamic Efficiency Line with BAM (Batch Acquisition Mode)
|
||||
- Core: Arm® 32-bit Cortex®-M4 CPU with FPU, Adaptive real-time accelerator (ART Accelerator™) allowing 0-wait state execution from Flash memory, frequency up to 100 MHz, memory protection unit, 125 DMIPS/1.25 DMIPS/MHz (Dhrystone 2.1), and DSP instructions
|
||||
- Memories
|
||||
- Up to 1 Mbyte of Flash memory
|
||||
- 256 Kbyte of SRAM
|
||||
- Flexible external static memory controller with up to 16-bit data bus: SRAM, PSRAM, NOR Flash memory
|
||||
- Dual mode Quad-SPI interface
|
||||
- LCD parallel interface, 8080/6800 modes
|
||||
- Clock, reset and supply management
|
||||
- 1.7 V to 3.6 V application supply and I/Os
|
||||
- POR, PDR, PVD and BOR
|
||||
- 4-to-26 MHz crystal oscillator
|
||||
- Internal 16 MHz factory-trimmed RC
|
||||
- 32 kHz oscillator for RTC with calibration
|
||||
- Internal 32 kHz RC with calibration
|
||||
- Power consumption
|
||||
- Run: 112 μA/MHz (peripheral off)
|
||||
- Stop (Flash in Stop mode, fast wakeup time): 50 μA Typ @ 25 °C; 75 μA max @25 °C
|
||||
- Stop (Flash in Deep power down mode, slow wakeup time): down to 18 μA @ 25 °C; 40 μA max @25 °C
|
||||
- Standby: 2.4 μA @25 °C / 1.7 V without RTC; 12 μA @85 °C @1.7 V
|
||||
- VBAT supply for RTC: 1 μA @25 °C
|
||||
- 1×12-bit, 2.4 MSPS ADC: up to 16 channels
|
||||
- 2xdigital filters for sigma delta modulator, 4xPDM interfaces, stereo microphone support
|
||||
- General-purpose DMA: 16-stream DMA
|
||||
|
||||
探索者 NUCLEO-F412ZG 是意法半导体推出的一款基于 ARM Cortex-M4 内核的开发板,最高主频为 100Mhz,该开发板具有丰富的板载资源,可以充分发挥 STM32F411ZG 的芯片性能。
|
||||
|
||||
开发板外观如下图所示:
|
||||
|
||||

|
||||
|
||||
该开发板常用 **板载资源** 如下:
|
||||
|
||||
- MCU:STM32F412ZG,主频 100MHz,1024KB FLASH ,256KB RAM。
|
||||
- 常用外设
|
||||
- LED:3 个,USB communication (LD1), user LED (LD2), power LED (LD3) 。
|
||||
- 按键,2 个,USER and RESET 。
|
||||
- 常用接口:USB 支持 3 种不同接口:虚拟 COM 端口、大容量存储和调试端口。
|
||||
- 调试接口,板载 ST-LINK/V2-1 调试器。
|
||||
|
||||
开发板更多详细信息请参考意法半导体 [NUCLEO-F412ZG 开发板介绍](https://www.st.com/en/evaluation-tools/nucleo-f412zg.html)。
|
||||
|
||||
## 外设支持
|
||||
|
||||
本 BSP 目前对外设的支持情况如下:
|
||||
|
||||
| **片上外设** | **支持情况** | **备注** |
|
||||
| :------------ | :----------: | :-----------------------------------: |
|
||||
| GPIO | 支持 | PA0, PA1... PH1 ---> PIN: 0, 1...63 |
|
||||
| UART | 支持 | UART2,UART3 |
|
||||
| Onchip Flash | 支持 | |
|
||||
| USB Device | 支持 | |
|
||||
|
||||
## 使用说明
|
||||
|
||||
使用说明分为如下两个章节:
|
||||
|
||||
- 快速上手
|
||||
|
||||
本章节是为刚接触 RT-Thread 的新手准备的使用说明,遵循简单的步骤即可将 RT-Thread 操作系统运行在该开发板上,看到实验效果 。
|
||||
|
||||
- 进阶使用
|
||||
|
||||
本章节是为需要在 RT-Thread 操作系统上使用更多开发板资源的开发者准备的。通过使用 ENV 工具对 BSP 进行配置,可以开启更多板载资源,实现更多高级功能。
|
||||
- Up to 17 timers: up to twelve 16-bit timers, two 32-bit timers up to 100 MHz each with up to four IC/OC/PWM or pulse counter and quadrature (incremental) encoder input, two watchdog timers (independent and window), one SysTick timer
|
||||
- Debug mode
|
||||
- Serial wire debug (SWD) & JTAG
|
||||
- Cortex®-M4 Embedded Trace Macrocell™
|
||||
- Up to 114 I/O ports with interrupt capability
|
||||
- Up to 109 fast I/Os up to 100 MHz
|
||||
- Up to 114 five V-tolerant I/Os
|
||||
- Up to 17 communication interfaces
|
||||
- Up to 4xI2C interfaces (SMBus/PMBus)
|
||||
- Up to 4 USARTs (2x12.5 Mbit/s, 2x6.25 Mbit/s), ISO 7816 interface, LIN, IrDA, modem control)
|
||||
- Up to 5 SPI/I2Ss (up to 50 Mbit/s, SPI or I2S audio protocol), out of which 2 muxed full-duplex I2S interfaces
|
||||
- SDIO interface (SD/MMC/eMMC)
|
||||
- Advanced connectivity: USB 2.0 full-speed device/host/OTG controller with PHY
|
||||
- 2xCAN (2.0B Active)
|
||||
- True random number generator
|
||||
- CRC calculation unit
|
||||
- 96-bit unique ID
|
||||
- RTC: subsecond accuracy, hardware calendar
|
||||
- All packages are ECOPACK®2
|
||||
|
||||
|
||||
### 快速上手
|
||||
|
||||
本 BSP 为开发者提供 MDK5 和 IAR 工程,并且支持 GCC 开发环境。下面以 MDK5 开发环境为例,介绍如何将系统运行起来。
|
||||
## Read more
|
||||
|
||||
#### 硬件连接
|
||||
| Documents | Description |
|
||||
| :----------------------------------------------------------: | :----------------------------------------------------------: |
|
||||
| [STM32_Nucleo-144_BSP_Introduction](../docs/STM32_Nucleo-144_BSP_Introduction.md) | How to run RT-Thread on STM32 Nucleo-144 boards (**Must-Read**) |
|
||||
| [STM32F412ZG ST Official Website](https://www.st.com/en/microcontrollers-microprocessors/stm32f412zg.html#documentation) | STM32F412ZG datasheet and other resources |
|
||||
|
||||
使用 Type-A to Micro-B 线连接开发板和 PC 供电,红色 LED LD3 (PWR) 和 LD1 (COM) 会点亮。
|
||||
|
||||
#### 编译下载
|
||||
|
||||
双击 project.uvprojx 文件,打开 MDK5 工程,编译并下载程序到开发板。
|
||||
## Maintained By
|
||||
|
||||
> 工程默认配置使用 ST-LINK 下载程序,点击下载按钮即可下载程序到开发板。
|
||||
[flybreak](https://github.com/guozhanxin) g1171407708@163.com
|
||||
|
||||
#### 运行结果
|
||||
|
||||
下载程序成功之后,系统会自动运行,观察开发板上 LED 的运行效果,红色 LD3 和 LD1 常亮、蓝色 LD2 会周期性闪烁。
|
||||
|
||||
USB 虚拟 COM 端口默认连接串口 3,在终端工具里打开相应的串口(115200-8-1-N),复位设备后,可以看到 RT-Thread 的输出信息:
|
||||
## Translated By
|
||||
|
||||
```bash
|
||||
\ | /
|
||||
- RT - Thread Operating System
|
||||
/ | \ 4.0.2 build Oct 20 2019
|
||||
2006 - 2019 Copyright by rt-thread team
|
||||
msh >
|
||||
```
|
||||
### 进阶使用
|
||||
Meco Man @ RT-Thread Community
|
||||
|
||||
此 BSP 默认只开启了 GPIO 和 串口 3 的功能,更多高级功能需要利用 ENV 工具对 BSP 进行配置,步骤如下:
|
||||
|
||||
1. 在 BSP 下打开 env 工具。
|
||||
|
||||
2. 输入 `menuconfig` 命令配置工程,配置好之后保存退出。
|
||||
|
||||
3. 输入 `pkgs --update` 命令更新软件包。
|
||||
|
||||
4. 输入 `scons --target=mdk5/iar` 命令重新生成工程。
|
||||
|
||||
本章节更多详细的介绍请参考 [STM32 系列 BSP 外设驱动使用教程](../docs/STM32 系列 BSP 外设驱动使用教程. md)。
|
||||
|
||||
## 注意事项
|
||||
|
||||
暂无
|
||||
|
||||
## 联系人信息
|
||||
|
||||
维护人:
|
||||
|
||||
- [flybreak](https://github.com/guozhanxin) ,邮箱:<g1171407708@163.com>
|
||||
> jiantingman@foxmail.com
|
||||
>
|
||||
> https://github.com/mysterywolf
|
||||
@@ -0,0 +1,107 @@
|
||||
# NUCLEO-F412ZG 开发板 BSP 说明
|
||||
|
||||
## 简介
|
||||
|
||||
本文档为 RT-Thread 开发团队为 NUCLEO-F412ZG 开发板提供的 BSP (板级支持包) 说明。
|
||||
|
||||
主要内容如下:
|
||||
|
||||
- 开发板资源介绍
|
||||
- BSP 快速上手
|
||||
- 进阶使用方法
|
||||
|
||||
通过阅读快速上手章节开发者可以快速地上手该 BSP,将 RT-Thread 运行在开发板上。在进阶使用指南章节,将会介绍更多高级功能,帮助开发者利用 RT-Thread 驱动更多板载资源。
|
||||
|
||||
## 开发板介绍
|
||||
|
||||
探索者 NUCLEO-F412ZG 是意法半导体推出的一款基于 ARM Cortex-M4 内核的开发板,最高主频为 100Mhz,该开发板具有丰富的板载资源,可以充分发挥 STM32F411ZG 的芯片性能。
|
||||
|
||||
开发板外观如下图所示:
|
||||
|
||||

|
||||
|
||||
该开发板常用 **板载资源** 如下:
|
||||
|
||||
- MCU:STM32F412ZG,主频 100MHz,1024KB FLASH ,256KB RAM。
|
||||
- 常用外设
|
||||
- LED:3 个,USB communication (LD1), user LED (LD2), power LED (LD3) 。
|
||||
- 按键,2 个,USER and RESET 。
|
||||
- 常用接口:USB 支持 3 种不同接口:虚拟 COM 端口、大容量存储和调试端口。
|
||||
- 调试接口,板载 ST-LINK/V2-1 调试器。
|
||||
|
||||
开发板更多详细信息请参考意法半导体 [NUCLEO-F412ZG 开发板介绍](https://www.st.com/en/evaluation-tools/nucleo-f412zg.html)。
|
||||
|
||||
## 外设支持
|
||||
|
||||
本 BSP 目前对外设的支持情况如下:
|
||||
|
||||
| **片上外设** | **支持情况** | **备注** |
|
||||
| :------------ | :----------: | :-----------------------------------: |
|
||||
| GPIO | 支持 | PA0, PA1... PH1 ---> PIN: 0, 1...63 |
|
||||
| UART | 支持 | UART2,UART3 |
|
||||
| Onchip Flash | 支持 | |
|
||||
| USB Device | 支持 | |
|
||||
|
||||
## 使用说明
|
||||
|
||||
使用说明分为如下两个章节:
|
||||
|
||||
- 快速上手
|
||||
|
||||
本章节是为刚接触 RT-Thread 的新手准备的使用说明,遵循简单的步骤即可将 RT-Thread 操作系统运行在该开发板上,看到实验效果 。
|
||||
|
||||
- 进阶使用
|
||||
|
||||
本章节是为需要在 RT-Thread 操作系统上使用更多开发板资源的开发者准备的。通过使用 ENV 工具对 BSP 进行配置,可以开启更多板载资源,实现更多高级功能。
|
||||
|
||||
|
||||
### 快速上手
|
||||
|
||||
本 BSP 为开发者提供 MDK5 和 IAR 工程,并且支持 GCC 开发环境。下面以 MDK5 开发环境为例,介绍如何将系统运行起来。
|
||||
|
||||
#### 硬件连接
|
||||
|
||||
使用 Type-A to Micro-B 线连接开发板和 PC 供电,红色 LED LD3 (PWR) 和 LD1 (COM) 会点亮。
|
||||
|
||||
#### 编译下载
|
||||
|
||||
双击 project.uvprojx 文件,打开 MDK5 工程,编译并下载程序到开发板。
|
||||
|
||||
> 工程默认配置使用 ST-LINK 下载程序,点击下载按钮即可下载程序到开发板。
|
||||
|
||||
#### 运行结果
|
||||
|
||||
下载程序成功之后,系统会自动运行,观察开发板上 LED 的运行效果,红色 LD3 和 LD1 常亮、蓝色 LD2 会周期性闪烁。
|
||||
|
||||
USB 虚拟 COM 端口默认连接串口 3,在终端工具里打开相应的串口(115200-8-1-N),复位设备后,可以看到 RT-Thread 的输出信息:
|
||||
|
||||
```bash
|
||||
\ | /
|
||||
- RT - Thread Operating System
|
||||
/ | \ 4.0.2 build Oct 20 2019
|
||||
2006 - 2019 Copyright by rt-thread team
|
||||
msh >
|
||||
```
|
||||
### 进阶使用
|
||||
|
||||
此 BSP 默认只开启了 GPIO 和 串口 3 的功能,更多高级功能需要利用 ENV 工具对 BSP 进行配置,步骤如下:
|
||||
|
||||
1. 在 BSP 下打开 env 工具。
|
||||
|
||||
2. 输入 `menuconfig` 命令配置工程,配置好之后保存退出。
|
||||
|
||||
3. 输入 `pkgs --update` 命令更新软件包。
|
||||
|
||||
4. 输入 `scons --target=mdk5/iar` 命令重新生成工程。
|
||||
|
||||
本章节更多详细的介绍请参考 [STM32 系列 BSP 外设驱动使用教程](../docs/STM32 系列 BSP 外设驱动使用教程. md)。
|
||||
|
||||
## 注意事项
|
||||
|
||||
暂无
|
||||
|
||||
## 联系人信息
|
||||
|
||||
维护人:
|
||||
|
||||
- [flybreak](https://github.com/guozhanxin) ,邮箱:<g1171407708@163.com>
|
||||
@@ -1,122 +1,88 @@
|
||||
# NUCLEO-F413ZH 开发板 BSP 说明
|
||||
# STM32F413-Nucleo BSP Introduction
|
||||
|
||||
## 简介
|
||||
[中文](README_zh.md)
|
||||
|
||||
本文档为 RT-Thread 开发团队为 NUCLEO-F413ZH 开发板的 BSP (板级支持包) 说明。
|
||||
## MCU: STM32F413ZH @100MHz, 1.5 MB FLASH, 320KB RAM
|
||||
|
||||
主要内容如下:
|
||||
The STM32F413xG/H devices are based on the high-performance Arm® Cortex®-M4 32-bit RISC core operating at a frequency of up to 100 MHz. Their Cortex®-M4 core features a Floating point unit (FPU) single precision which supports all Arm single-precision data-processing instructions and data types. It also implements a full set of DSP instructions and a memory protection unit (MPU) which enhances application security.
|
||||
|
||||
- 开发板资源介绍
|
||||
- BSP 快速上手
|
||||
- 进阶使用方法
|
||||
The STM32F413xG/H devices belong to the STM32F4 access product lines (with products combining power efficiency, performance and integration) while adding a new innovative feature called Batch Acquisition Mode (BAM) allowing to save even more power consumption during data batching.
|
||||
The STM32F413xG/H devices incorporate high-speed embedded memories (up to 1.5 Mbytes of Flash memory, 320 Kbytes of SRAM), and an extensive range of enhanced I/Os and peripherals connected to two APB buses, three AHB buses and a 32-bit multi-AHB bus matrix.
|
||||
All devices offer a 12-bit ADC, two 12-bit DACs, a low-power RTC, twelve general-purpose 16-bit timers including two PWM timer for motor control, two general-purpose 32-bit timers and a low power timer.
|
||||
They also feature standard and advanced communication interfaces.
|
||||
|
||||
通过阅读快速上手章节开发者可以快速地上手该 BSP,将 RT-Thread 运行在开发板上。在进阶使用指南章节,将会介绍更多高级功能,帮助开发者利用 RT-Thread 驱动更多板载资源。
|
||||
#### KEY FEATURES
|
||||
|
||||
## 开发板介绍
|
||||
- Dynamic Efficiency Line with eBAM (enhanced Batch Acquisition Mode)
|
||||
- 1.7 V to 3.6 V power supply
|
||||
- -40 °C to 85/105/125 °C temperature range
|
||||
- Core: Arm® 32-bit Cortex®-M4 CPU with FPU, Adaptive real-time accelerator (ART Accelerator™) allowing 0-wait state execution from Flash memory, frequency up to 100 MHz, memory protection unit, 125 DMIPS/ 1.25 DMIPS/MHz (Dhrystone 2.1), and DSP instructions
|
||||
- Memories
|
||||
- Up to 1.5 Mbytes of Flash memory
|
||||
- 320 Kbytes of SRAM
|
||||
- Flexible external static memory controller with up to 16-bit data bus: SRAM, PSRAM, NOR Flash memory
|
||||
- Dual mode Quad-SPI interface
|
||||
- LCD parallel interface, 8080/6800 modes
|
||||
- Clock, reset and supply management
|
||||
- 1.7 to 3.6 V application supply and I/Os
|
||||
- POR, PDR, PVD and BOR
|
||||
- 4-to-26 MHz crystal oscillator
|
||||
- Internal 16 MHz factory-trimmed RC
|
||||
- 32 kHz oscillator for RTC with calibration
|
||||
- Internal 32 kHz RC with calibration
|
||||
- Power consumption
|
||||
- Run: 112 μA/MHz (peripheral off)
|
||||
- Stop (Flash in Stop mode, fast wakeup time): 42 μA Typ.; 80 μA max @25 °C
|
||||
- Stop (Flash in Deep power down mode, slow wakeup time): 15 μA Typ.; 46 μA max @25 °C
|
||||
- Standby without RTC: 1.1 μA Typ.; 14.7 μA max at @85 °C
|
||||
- VBAT supply for RTC: 1 μA @25 °C
|
||||
- 2x12-bit D/A converters
|
||||
- 1×12-bit, 2.4 MSPS ADC: up to 16 channels
|
||||
- 6x digital filters for sigma delta modulator, 12x PDM interfaces, with stereo microphone and sound source localization support
|
||||
- General-purpose DMA: 16-stream DMA
|
||||
|
||||
探索者 NUCLEO-F413ZH 是意法半导体推出的一款基于 ARM Cortex-M4 内核的开发板,最高主频为 100Mhz,该开发板具有丰富的板载资源,可以充分发挥 NUCLEO-F413ZH 的芯片性能。
|
||||
|
||||
开发板外观如下图所示:
|
||||
|
||||

|
||||
|
||||
该开发板常用 **板载资源** 如下:
|
||||
|
||||
- MCU:STM32F413ZH,主频 100MHz,1536KB FLASH ,320KB RAM
|
||||
- 常用外设
|
||||
- LED:8个,user LED (JP5跳帽需连接)(黄色,PB0,LD1;蓝色,PB7,LD2;红色,PB14,LD3), USB communication (LD4), over current (LD5), power LED (黄色,LD6), USB FAULT (LD7), VBUS (LD8)。
|
||||
- 按键:2个,B1(USER,PC13),B2(RESET)
|
||||
- 常用接口:USB 支持 3 种不同接口:虚拟 COM 端口、大容量存储和调试端口等。
|
||||
- 调试接口,板载 ST-LINK/V2-1 调试器。
|
||||
|
||||
开发板更多详细信息请参考意法半导体 [NUCLEO-F413ZH 开发板介绍](https://www.st.com/content/st_com/en/products/evaluation-tools/product-evaluation-tools/mcu-mpu-eval-tools/stm32-mcu-mpu-eval-tools/stm32-nucleo-boards/nucleo-f413zh.html)。
|
||||
|
||||
## 外设支持
|
||||
|
||||
本 BSP 目前对外设的支持情况如下:
|
||||
|
||||
| **板载外设** | **支持情况** | **备注** |
|
||||
| :------------ | :----------: | :-----------------------------------: |
|
||||
|STLINK TO USART| 支持 | UART3 |
|
||||
|
||||
| **片上外设** | **支持情况** | **备注** |
|
||||
| :------------ | :----------: | :-----------------------------------: |
|
||||
| GPIO | 支持 | |
|
||||
| UART | 支持 | UART2/3 |
|
||||
| SPI | 支持 | SPI2 |
|
||||
| I2C | 支持 | I2C1(软件模拟) |
|
||||
| TIMER | 支持 | TIM11/13/14 |
|
||||
| PWM | 支持 | PWM2_CH4 |
|
||||
| ADC | 支持 | ADC1_IN5 |
|
||||
| RTC | 支持 | 支持外部晶振和内部低速时钟 |
|
||||
| WDT | 支持 | 独立看门狗 |
|
||||
| Onchip Flash | 支持 | 片上Flash |
|
||||
| USB OTG_FS | 支持 | OTGFS as USB device |
|
||||
| Onchip Flash | 支持 | 片上Flash |
|
||||
| USB Device | 支持 | OTGFS as USB device |
|
||||
| RNG | 支持 | Random Number Generator |
|
||||
| UDID | 支持 | Unique Device Identifier |
|
||||
|
||||
## 使用说明
|
||||
|
||||
使用说明分为如下两个章节:
|
||||
|
||||
- 快速上手
|
||||
|
||||
本章节是为刚接触 RT-Thread 的新手准备的使用说明,遵循简单的步骤即可将 RT-Thread 操作系统运行在该开发板上,看到实验效果 。
|
||||
|
||||
- 进阶使用
|
||||
|
||||
本章节是为需要在 RT-Thread 操作系统上使用更多开发板资源的开发者准备的。通过使用 ENV 工具对 BSP 进行配置,可以开启更多板载资源,实现更多高级功能。
|
||||
- Up to 18 timers: up to twelve 16-bit timers, two 32-bit timers up to 100 MHz each with up to four IC/OC/PWM or pulse counter and quadrature (incremental) encoder input, two watchdog timers (independent and window), one SysTick timer, and a low-power timer
|
||||
- Debug mode
|
||||
- Serial wire debug (SWD) & JTAG
|
||||
- Cortex®-M4 Embedded Trace Macrocell™
|
||||
- Up to 114 I/O ports with interrupt capability
|
||||
- Up to 109 fast I/Os up to 100 MHz
|
||||
- Up to 114 five V-tolerant I/Os
|
||||
- Up to 24 communication interfaces
|
||||
- Up to 4x I2C interfaces (SMBus/PMBus)
|
||||
- Up to 10 UARTS: 4 USARTs / 6 UARTs (2 x 12.5 Mbit/s, 2 x 6.25 Mbit/s), ISO 7816 interface, LIN, IrDA, modem control)
|
||||
- Up to 5 SPI/I2Ss (up to 50 Mbit/s, SPI or I2S audio protocol), out of which 2 muxed full-duplex I2S interfaces
|
||||
- SDIO interface (SD/MMC/eMMC)
|
||||
- Advanced connectivity: USB 2.0 full-speed device/host/OTG controller with PHY
|
||||
- 3x CAN (2.0B Active)
|
||||
- 1xSAI
|
||||
- True random number generator
|
||||
- CRC calculation unit
|
||||
- 96-bit unique ID
|
||||
- RTC: subsecond accuracy, hardware calendar
|
||||
- All packages are ECOPACK®2
|
||||
|
||||
|
||||
### 快速上手
|
||||
|
||||
本 BSP 为开发者提供 MDK4、MDK5 和 IAR 工程,并且支持 GCC 开发环境。下面以 MDK5 开发环境为例,介绍如何将系统运行起来。
|
||||
## Read more
|
||||
|
||||
#### 硬件连接
|
||||
| Documents | Description |
|
||||
| :----------------------------------------------------------: | :----------------------------------------------------------: |
|
||||
| [STM32_Nucleo-144_BSP_Introduction](../docs/STM32_Nucleo-144_BSP_Introduction.md) | How to run RT-Thread on STM32 Nucleo-144 boards (**Must-Read**) |
|
||||
| [STM32F413ZH ST Official Website](https://www.st.com/zh/microcontrollers-microprocessors/stm32f413zh.html#documentation) | STM32F413ZH datasheet and other resources |
|
||||
|
||||
使用 Type-A to Micro-B 线连接开发板和 PC 供电,黄色 LED LD6 (PWR) 和 LD4 (COM) 会点亮。
|
||||
|
||||
#### 编译下载
|
||||
|
||||
双击 project.uvprojx 文件,打开 MDK5 工程,编译并下载程序到开发板。
|
||||
## Maintained By
|
||||
|
||||
> 工程默认配置使用 板载ST-LINK 仿真器下载程序,在通过 Micro USB线 连接开发板的基础上,点击下载按钮即可下载程序到开发板
|
||||
[flybreak](https://github.com/guozhanxin) g1171407708@163.com
|
||||
|
||||
#### 运行结果
|
||||
|
||||
下载程序成功之后,系统会自动运行,在JP5跳帽连接时,观察开发板上LD1的运行效果,黄色LED会周期性闪烁。
|
||||
|
||||
连接开发板对应串口到 PC , 在终端工具里打开相应的串口(115200-8-1-N),复位设备后,可以看到 RT-Thread 的输出信息:
|
||||
## Translated By
|
||||
|
||||
```bash
|
||||
\ | /
|
||||
- RT - Thread Operating System
|
||||
/ | \ 4.0.3 build Apr 28 2020
|
||||
2006 - 2020 Copyright by rt-thread team
|
||||
msh >
|
||||
```
|
||||
### 进阶使用
|
||||
Meco Man @ RT-Thread Community
|
||||
|
||||
此 BSP 默认只开启了 GPIO 和 UART3 的功能,更多高级功能需要利用 ENV 工具对 BSP 进行配置,步骤如下:
|
||||
|
||||
1. 在 bsp 下打开 env 工具。
|
||||
|
||||
2. 输入`menuconfig`命令配置工程,配置好之后保存退出。
|
||||
|
||||
3. 输入`pkgs --update`命令更新软件包。
|
||||
|
||||
4. 输入`scons --target=mdk4/mdk5/iar` 命令重新生成工程。
|
||||
|
||||
本章节更多详细的介绍请参考 [STM32 系列 BSP 外设驱动使用教程](../docs/STM32系列BSP外设驱动使用教程.md)。
|
||||
|
||||
## 注意事项
|
||||
|
||||
暂无
|
||||
|
||||
## 联系人信息
|
||||
|
||||
维护人:
|
||||
|
||||
- [flybreak](https://github.com/XYX12306) ,邮箱:<2669599387@qq.com>
|
||||
> jiantingman@foxmail.com
|
||||
>
|
||||
> https://github.com/mysterywolf
|
||||
@@ -0,0 +1,122 @@
|
||||
# NUCLEO-F413ZH 开发板 BSP 说明
|
||||
|
||||
## 简介
|
||||
|
||||
本文档为 RT-Thread 开发团队为 NUCLEO-F413ZH 开发板的 BSP (板级支持包) 说明。
|
||||
|
||||
主要内容如下:
|
||||
|
||||
- 开发板资源介绍
|
||||
- BSP 快速上手
|
||||
- 进阶使用方法
|
||||
|
||||
通过阅读快速上手章节开发者可以快速地上手该 BSP,将 RT-Thread 运行在开发板上。在进阶使用指南章节,将会介绍更多高级功能,帮助开发者利用 RT-Thread 驱动更多板载资源。
|
||||
|
||||
## 开发板介绍
|
||||
|
||||
探索者 NUCLEO-F413ZH 是意法半导体推出的一款基于 ARM Cortex-M4 内核的开发板,最高主频为 100Mhz,该开发板具有丰富的板载资源,可以充分发挥 NUCLEO-F413ZH 的芯片性能。
|
||||
|
||||
开发板外观如下图所示:
|
||||
|
||||

|
||||
|
||||
该开发板常用 **板载资源** 如下:
|
||||
|
||||
- MCU:STM32F413ZH,主频 100MHz,1536KB FLASH ,320KB RAM
|
||||
- 常用外设
|
||||
- LED:8个,user LED (JP5跳帽需连接)(黄色,PB0,LD1;蓝色,PB7,LD2;红色,PB14,LD3), USB communication (LD4), over current (LD5), power LED (黄色,LD6), USB FAULT (LD7), VBUS (LD8)。
|
||||
- 按键:2个,B1(USER,PC13),B2(RESET)
|
||||
- 常用接口:USB 支持 3 种不同接口:虚拟 COM 端口、大容量存储和调试端口等。
|
||||
- 调试接口,板载 ST-LINK/V2-1 调试器。
|
||||
|
||||
开发板更多详细信息请参考意法半导体 [NUCLEO-F413ZH 开发板介绍](https://www.st.com/content/st_com/en/products/evaluation-tools/product-evaluation-tools/mcu-mpu-eval-tools/stm32-mcu-mpu-eval-tools/stm32-nucleo-boards/nucleo-f413zh.html)。
|
||||
|
||||
## 外设支持
|
||||
|
||||
本 BSP 目前对外设的支持情况如下:
|
||||
|
||||
| **板载外设** | **支持情况** | **备注** |
|
||||
| :------------ | :----------: | :-----------------------------------: |
|
||||
|STLINK TO USART| 支持 | UART3 |
|
||||
|
||||
| **片上外设** | **支持情况** | **备注** |
|
||||
| :------------ | :----------: | :-----------------------------------: |
|
||||
| GPIO | 支持 | |
|
||||
| UART | 支持 | UART2/3 |
|
||||
| SPI | 支持 | SPI2 |
|
||||
| I2C | 支持 | I2C1(软件模拟) |
|
||||
| TIMER | 支持 | TIM11/13/14 |
|
||||
| PWM | 支持 | PWM2_CH4 |
|
||||
| ADC | 支持 | ADC1_IN5 |
|
||||
| RTC | 支持 | 支持外部晶振和内部低速时钟 |
|
||||
| WDT | 支持 | 独立看门狗 |
|
||||
| Onchip Flash | 支持 | 片上Flash |
|
||||
| USB OTG_FS | 支持 | OTGFS as USB device |
|
||||
| Onchip Flash | 支持 | 片上Flash |
|
||||
| USB Device | 支持 | OTGFS as USB device |
|
||||
| RNG | 支持 | Random Number Generator |
|
||||
| UDID | 支持 | Unique Device Identifier |
|
||||
|
||||
## 使用说明
|
||||
|
||||
使用说明分为如下两个章节:
|
||||
|
||||
- 快速上手
|
||||
|
||||
本章节是为刚接触 RT-Thread 的新手准备的使用说明,遵循简单的步骤即可将 RT-Thread 操作系统运行在该开发板上,看到实验效果 。
|
||||
|
||||
- 进阶使用
|
||||
|
||||
本章节是为需要在 RT-Thread 操作系统上使用更多开发板资源的开发者准备的。通过使用 ENV 工具对 BSP 进行配置,可以开启更多板载资源,实现更多高级功能。
|
||||
|
||||
|
||||
### 快速上手
|
||||
|
||||
本 BSP 为开发者提供 MDK4、MDK5 和 IAR 工程,并且支持 GCC 开发环境。下面以 MDK5 开发环境为例,介绍如何将系统运行起来。
|
||||
|
||||
#### 硬件连接
|
||||
|
||||
使用 Type-A to Micro-B 线连接开发板和 PC 供电,黄色 LED LD6 (PWR) 和 LD4 (COM) 会点亮。
|
||||
|
||||
#### 编译下载
|
||||
|
||||
双击 project.uvprojx 文件,打开 MDK5 工程,编译并下载程序到开发板。
|
||||
|
||||
> 工程默认配置使用 板载ST-LINK 仿真器下载程序,在通过 Micro USB线 连接开发板的基础上,点击下载按钮即可下载程序到开发板
|
||||
|
||||
#### 运行结果
|
||||
|
||||
下载程序成功之后,系统会自动运行,在JP5跳帽连接时,观察开发板上LD1的运行效果,黄色LED会周期性闪烁。
|
||||
|
||||
连接开发板对应串口到 PC , 在终端工具里打开相应的串口(115200-8-1-N),复位设备后,可以看到 RT-Thread 的输出信息:
|
||||
|
||||
```bash
|
||||
\ | /
|
||||
- RT - Thread Operating System
|
||||
/ | \ 4.0.3 build Apr 28 2020
|
||||
2006 - 2020 Copyright by rt-thread team
|
||||
msh >
|
||||
```
|
||||
### 进阶使用
|
||||
|
||||
此 BSP 默认只开启了 GPIO 和 UART3 的功能,更多高级功能需要利用 ENV 工具对 BSP 进行配置,步骤如下:
|
||||
|
||||
1. 在 bsp 下打开 env 工具。
|
||||
|
||||
2. 输入`menuconfig`命令配置工程,配置好之后保存退出。
|
||||
|
||||
3. 输入`pkgs --update`命令更新软件包。
|
||||
|
||||
4. 输入`scons --target=mdk4/mdk5/iar` 命令重新生成工程。
|
||||
|
||||
本章节更多详细的介绍请参考 [STM32 系列 BSP 外设驱动使用教程](../docs/STM32系列BSP外设驱动使用教程.md)。
|
||||
|
||||
## 注意事项
|
||||
|
||||
暂无
|
||||
|
||||
## 联系人信息
|
||||
|
||||
维护人:
|
||||
|
||||
- [flybreak](https://github.com/XYX12306) ,邮箱:<2669599387@qq.com>
|
||||
File diff suppressed because it is too large.
Load diff
@@ -135,6 +135,7 @@ 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 is not set
|
||||
# CONFIG_RT_USING_DAC is not set
|
||||
@@ -145,6 +146,11 @@ CONFIG_RT_USING_PIN=y
|
||||
# CONFIG_RT_USING_RTC is not set
|
||||
# CONFIG_RT_USING_SDIO is not set
|
||||
CONFIG_RT_USING_SPI=y
|
||||
# CONFIG_RT_USING_QSPI is not set
|
||||
# CONFIG_RT_USING_SPI_MSD is not set
|
||||
# CONFIG_RT_USING_SFUD is not set
|
||||
# CONFIG_RT_USING_ENC28J60 is not set
|
||||
# CONFIG_RT_USING_SPI_WIFI is not set
|
||||
# CONFIG_RT_USING_WDT is not set
|
||||
# CONFIG_RT_USING_AUDIO is not set
|
||||
# CONFIG_RT_USING_SENSOR is not set
|
||||
@@ -164,11 +170,11 @@ CONFIG_RT_USING_SPI=y
|
||||
# POSIX layer and C standard library
|
||||
#
|
||||
CONFIG_RT_USING_LIBC=y
|
||||
CONFIG_RT_USING_PTHREADS=y
|
||||
CONFIG_PTHREAD_NUM_MAX=8
|
||||
# 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
|
||||
|
||||
@@ -287,6 +293,9 @@ CONFIG_RT_USING_POSIX=y
|
||||
# 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
|
||||
|
||||
#
|
||||
# security packages
|
||||
@@ -312,6 +321,7 @@ CONFIG_RT_USING_POSIX=y
|
||||
# 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
|
||||
|
||||
#
|
||||
# tools packages
|
||||
@@ -332,6 +342,7 @@ CONFIG_RT_USING_POSIX=y
|
||||
# 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
|
||||
|
||||
#
|
||||
# system packages
|
||||
@@ -359,6 +370,8 @@ CONFIG_RT_USING_POSIX=y
|
||||
# CONFIG_PKG_USING_RAMDISK is not set
|
||||
# CONFIG_PKG_USING_MININI is not set
|
||||
# CONFIG_PKG_USING_QBOOT is not set
|
||||
# CONFIG_PKG_USING_UCOSIII_WRAPPER is not set
|
||||
# CONFIG_PKG_USING_PPOOL is not set
|
||||
|
||||
#
|
||||
# peripheral libraries and drivers
|
||||
@@ -409,6 +422,10 @@ CONFIG_RT_USING_POSIX=y
|
||||
# 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
|
||||
|
||||
#
|
||||
# miscellaneous packages
|
||||
@@ -446,39 +463,10 @@ CONFIG_RT_USING_POSIX=y
|
||||
# CONFIG_PKG_USING_ULAPACK is not set
|
||||
# CONFIG_PKG_USING_UKAL is not set
|
||||
# CONFIG_PKG_USING_CRCLIB is not set
|
||||
|
||||
#
|
||||
# Privated Packages of RealThread
|
||||
#
|
||||
# CONFIG_PKG_USING_CODEC is not set
|
||||
# CONFIG_PKG_USING_PLAYER is not set
|
||||
# CONFIG_PKG_USING_MPLAYER is not set
|
||||
# CONFIG_PKG_USING_PERSIMMON_SRC is not set
|
||||
# CONFIG_PKG_USING_JS_PERSIMMON is not set
|
||||
# CONFIG_PKG_USING_JERRYSCRIPT_WIN32 is not set
|
||||
|
||||
#
|
||||
# Network Utilities
|
||||
#
|
||||
# CONFIG_PKG_USING_WICED is not set
|
||||
# CONFIG_PKG_USING_CLOUDSDK is not set
|
||||
# CONFIG_PKG_USING_POWER_MANAGER is not set
|
||||
# CONFIG_PKG_USING_RT_OTA is not set
|
||||
# CONFIG_PKG_USING_RDBD_SRC is not set
|
||||
# CONFIG_PKG_USING_RTINSIGHT is not set
|
||||
# CONFIG_PKG_USING_SMARTCONFIG is not set
|
||||
# CONFIG_PKG_USING_RTX is not set
|
||||
# CONFIG_RT_USING_TESTCASE is not set
|
||||
# CONFIG_PKG_USING_NGHTTP2 is not set
|
||||
# CONFIG_PKG_USING_AVS is not set
|
||||
# CONFIG_PKG_USING_ALI_LINKKIT is not set
|
||||
# CONFIG_PKG_USING_STS is not set
|
||||
# CONFIG_PKG_USING_DLMS is not set
|
||||
# CONFIG_PKG_USING_AUDIO_FRAMEWORK is not set
|
||||
# CONFIG_PKG_USING_ZBAR is not set
|
||||
# CONFIG_PKG_USING_MCF is not set
|
||||
# CONFIG_PKG_USING_URPC is not set
|
||||
# CONFIG_PKG_USING_BSAL is not set
|
||||
# CONFIG_PKG_USING_THREES is not set
|
||||
# CONFIG_PKG_USING_2048 is not set
|
||||
# CONFIG_PKG_USING_LWGPS is not set
|
||||
# CONFIG_PKG_USING_TENSORFLOWLITEMICRO is not set
|
||||
CONFIG_SOC_FAMILY_STM32=y
|
||||
CONFIG_SOC_SERIES_STM32F4=y
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
define symbol __ICFEDIT_intvec_start__ = 0x08000000;
|
||||
/*-Memory Regions-*/
|
||||
define symbol __ICFEDIT_region_ROM_start__ = 0x08000000;
|
||||
define symbol __ICFEDIT_region_ROM_end__ = 0x080FFFFF;
|
||||
define symbol __ICFEDIT_region_ROM_end__ = 0x081FFFFF;
|
||||
define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
|
||||
define symbol __ICFEDIT_region_RAM_end__ = 0x2002FFFF;
|
||||
/*-Sizes-*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* linker script for STM32F4xx with GNU ld
|
||||
* linker script for STM32F429xx with GNU ld
|
||||
* bernard.xiong 2009-10-14
|
||||
*/
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
MEMORY
|
||||
{
|
||||
ROM (rx) : ORIGIN = 0x08000000, LENGTH = 2048k /* 2048KB flash */
|
||||
RAM (rw) : ORIGIN = 0x20000000, LENGTH = 320k /* 320K sram */
|
||||
RAM (rw) : ORIGIN = 0x20000000, LENGTH = 192k /* 192K sram */
|
||||
}
|
||||
ENTRY(Reset_Handler)
|
||||
_system_stack_size = 0x200;
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
; *** Scatter-Loading Description File generated by uVision ***
|
||||
; *************************************************************
|
||||
|
||||
LR_IROM1 0x08000000 0x00100000 { ; load region size_region
|
||||
ER_IROM1 0x08000000 0x00100000 { ; load address = execution address
|
||||
LR_IROM1 0x08000000 0x00200000 { ; load region size_region
|
||||
ER_IROM1 0x08000000 0x00200000 { ; load address = execution address
|
||||
*.o (RESET, +First)
|
||||
*(InRoot$$Sections)
|
||||
.ANY (+RO)
|
||||
}
|
||||
RW_IRAM1 0x20000000 0x00020000 { ; RW data
|
||||
RW_IRAM1 0x20000000 0x00030000 { ; RW data
|
||||
.ANY (+RW +ZI)
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -93,14 +93,13 @@
|
||||
#define RT_USING_I2C_BITOPS
|
||||
#define RT_USING_PIN
|
||||
#define RT_USING_SPI
|
||||
|
||||
/* Using USB */
|
||||
|
||||
|
||||
/* POSIX layer and C standard library */
|
||||
|
||||
#define RT_USING_LIBC
|
||||
#define RT_USING_PTHREADS
|
||||
#define PTHREAD_NUM_MAX 8
|
||||
#define RT_USING_POSIX
|
||||
|
||||
/* Network */
|
||||
@@ -162,12 +161,6 @@
|
||||
|
||||
/* samples: kernel and components samples */
|
||||
|
||||
|
||||
/* Privated Packages of RealThread */
|
||||
|
||||
|
||||
/* Network Utilities */
|
||||
|
||||
#define SOC_FAMILY_STM32
|
||||
#define SOC_SERIES_STM32F4
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/*
|
||||
* linker script for STM32F10x with GNU ld
|
||||
* linker script for STM32F429xx with GNU ld
|
||||
* bernard.xiong 2009-10-14
|
||||
*/
|
||||
|
||||
/* Program Entry, set to mark it as "used" and avoid gc */
|
||||
MEMORY
|
||||
{
|
||||
CODE (rx) : ORIGIN = 0x08000000, LENGTH = 1024k /* 1024KB flash */
|
||||
DATA (rw) : ORIGIN = 0x20000000, LENGTH = 128k /* 128K sram */
|
||||
CODE (rx) : ORIGIN = 0x08000000, LENGTH = 2048k /* 1024KB flash */
|
||||
DATA (rw) : ORIGIN = 0x20000000, LENGTH = 192k /* 128K sram */
|
||||
}
|
||||
ENTRY(Reset_Handler)
|
||||
_system_stack_size = 0x200;
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
; *** Scatter-Loading Description File generated by uVision ***
|
||||
; *************************************************************
|
||||
|
||||
LR_IROM1 0x08000000 0x00100000 { ; load region size_region
|
||||
ER_IROM1 0x08000000 0x00100000 { ; load address = execution address
|
||||
LR_IROM1 0x08000000 0x00200000 { ; load region size_region
|
||||
ER_IROM1 0x08000000 0x00200000 { ; load address = execution address
|
||||
*.o (RESET, +First)
|
||||
*(InRoot$$Sections)
|
||||
.ANY (+RO)
|
||||
}
|
||||
RW_IRAM1 0x20000000 0x00020000 { ; RW data
|
||||
RW_IRAM1 0x20000000 0x00030000 { ; RW data
|
||||
.ANY (+RW +ZI)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
/*-Editor annotation file-*/
|
||||
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
|
||||
/*-Specials-*/
|
||||
define symbol __ICFEDIT_intvec_start__ = 0x08000000;
|
||||
define symbol __ICFEDIT_intvec_start__ = 0x08000000;
|
||||
/*-Memory Regions-*/
|
||||
define symbol __ICFEDIT_region_ROM_start__ = 0x08000000;
|
||||
define symbol __ICFEDIT_region_ROM_end__ = 0x080FFFFF;
|
||||
define symbol __ICFEDIT_region_ROM_start__ = 0x08000000;
|
||||
define symbol __ICFEDIT_region_ROM_end__ = 0x081FFFFF;
|
||||
define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
|
||||
define symbol __ICFEDIT_region_RAM_end__ = 0x2002FFFF;
|
||||
/*-Sizes-*/
|
||||
|
||||
@@ -1,106 +1,84 @@
|
||||
# NUCLEO-F446ZE 开发板 BSP 说明
|
||||
# STM32F446-Nucleo BSP Introduction
|
||||
|
||||
## 简介
|
||||
[中文](README_zh.md)
|
||||
|
||||
本文档为 NUCLEO-F446ZE 开发板的 BSP (板级支持包) 说明。
|
||||
## MCU: STM32F446ZE @180MHz, 512KB FLASH, 128KB RAM
|
||||
|
||||
主要内容如下:
|
||||
The STM32F446xC/E devices are based on the high-performance Arm® Cortex®-M4 32-bit RISC core operating at a frequency of up to 180 MHz. The Cortex-M4 core features a floating point unit (FPU) single precision supporting all Arm® single-precision data-processing instructions and data types. It also implements a full set of DSP instructions and a memory protection unit (MPU) that enhances application security.
|
||||
|
||||
- 开发板资源介绍
|
||||
- BSP 快速上手
|
||||
- 进阶使用方法
|
||||
The STM32F446xC/E devices incorporate high-speed embedded memories (Flash memory up to 512 Kbytes, up to 128 Kbytes of SRAM), up to 4 Kbytes of backup SRAM, and an extensive range of enhanced I/Os and peripherals connected to two APB buses, two AHB buses and a 32-bit multi-AHB bus matrix.
|
||||
All devices offer three 12-bit ADCs, two DACs, a low-power RTC, twelve general-purpose 16-bit timers including two PWM timers for motor control, two general-purpose 32-bit timers.
|
||||
They also feature standard and advanced communication interfaces.
|
||||
|
||||
通过阅读快速上手章节开发者可以快速地上手该 BSP,将 RT-Thread 运行在开发板上。在进阶使用指南章节,将会介绍更多高级功能,帮助开发者利用 RT-Thread 驱动更多板载资源。
|
||||
#### KEY FEATURES
|
||||
|
||||
## 开发板介绍
|
||||
- Core: Arm® 32-bit Cortex®-M4 CPU with FPU, Adaptive real-time accelerator (ART Accelerator) allowing 0-wait state execution from Flash memory, frequency up to 180 MHz, MPU, 225 DMIPS/1.25 DMIPS/MHz (Dhrystone 2.1), and DSP instructions
|
||||
- Memories
|
||||
- 512 Kbytes of Flash memory
|
||||
- 128 Kbytes of SRAM
|
||||
- Flexible external memory controller with up to 16-bit data bus: SRAM, PSRAM, SDRAM/LPSDR SDRAM, NOR/NAND Flash memories
|
||||
- Dual mode QuadSPI interface
|
||||
- LCD parallel interface, 8080/6800 modes
|
||||
- Clock, reset and supply management
|
||||
- 1.7 V to 3.6 V application supply and I/Os
|
||||
- POR, PDR, PVD and BOR
|
||||
- 4 to 26 MHz crystal oscillator
|
||||
- Internal 16 MHz factory-trimmed RC (1% accuracy)
|
||||
- 32 kHz oscillator for RTC with calibration
|
||||
- Internal 32 kHz RC with calibration
|
||||
- Low power
|
||||
- Sleep, Stop and Standby modes
|
||||
- VBAT supply for RTC, 20×32 bit backup registers plus optional 4 KB backup SRAM
|
||||
- 3× 12-bit, 2.4 MSPS ADC: up to 24 channels and 7.2 MSPS in triple interleaved mode
|
||||
- 2× 12-bit D/A converters
|
||||
- General-purpose DMA: 16-stream DMA controller with FIFOs and burst support
|
||||
- Up to 17 timers: 2x watchdog, 1x SysTick timer and up to twelve 16-bit and two 32-bit timers up to 180 MHz, each with up to four IC/OC/PWM or pulse counter
|
||||
|
||||
NUCLEO-F446ZE 是 ST 公司推出的一款针对 STM32F4 系列设计的 Cortex-M4 Nucleo-144 开发板,支持 mbed,兼容 Arduino、还带有ST Zio和 ST Morpho 扩展接口,可连接微控制器的所有周边外设。
|
||||
|
||||
开发板外观如下图所示:
|
||||
|
||||

|
||||
|
||||
该开发板常用 **板载资源** 如下:
|
||||
|
||||
- MCU:STM32f446ZE,主频 180MHz,512KB FLASH ,128KB RAM
|
||||
- 常用外设
|
||||
- LED:3个,LED1 (绿色,PB0),LED2(蓝色,PB7),LED3(红色,PB14)
|
||||
- 常用接口:USB 转串口
|
||||
- 调试接口,标准 ST-LINK/SWD
|
||||
|
||||
开发板更多详细信息请参考【NUCLEO-F446ZE】 [开发板介绍](https://www.st.com/zh/evaluation-tools/nucleo-f446ze.html)。
|
||||
|
||||
## 外设支持
|
||||
|
||||
本 BSP 目前对外设的支持情况如下:
|
||||
|
||||
| **板载外设** | **支持情况** | **备注** |
|
||||
| :----------------- | :----------: | :------------------------------------- |
|
||||
| USB 转串口 | 支持 | |
|
||||
| **片上外设** | **支持情况** | **备注** |
|
||||
| GPIO | 支持 | |
|
||||
| UART | 支持 | UART1 |
|
||||
|
||||
## 使用说明
|
||||
|
||||
使用说明分为如下两个章节:
|
||||
|
||||
- 快速上手
|
||||
|
||||
本章节是为刚接触 RT-Thread 的新手准备的使用说明,遵循简单的步骤即可将 RT-Thread 操作系统运行在该开发板上,看到实验效果 。
|
||||
|
||||
- 进阶使用
|
||||
|
||||
本章节是为需要在 RT-Thread 操作系统上使用更多开发板资源的开发者准备的。通过使用 ENV 工具对 BSP 进行配置,可以开启更多板载资源,实现更多高级功能。
|
||||
- Debug mode
|
||||
- SWD and JTAG interfaces
|
||||
- Cortex®-M4 Trace Macrocell™
|
||||
- Up to 114 I/O ports with interrupt capability
|
||||
- Up to 111 fast I/Os up to 90 MHz
|
||||
- Up to 112 5 V-tolerant I/Os
|
||||
- Up to 20 communication interfaces
|
||||
- SPDIF-Rx
|
||||
- Up to 4× I2C interfaces (SMBus/PMBus)
|
||||
- Up to four USARTs and two UARTs (11.25 Mbit/s, ISO7816 interface, LIN, IrDA, modem control)
|
||||
- Up to four SPIs (45 Mbits/s), three with muxed I2S for audio class accuracy via internal audio PLL or external clock
|
||||
- 2x SAI (serial audio interface)
|
||||
- 2× CAN (2.0B Active)
|
||||
- SDIO interface
|
||||
- Consumer electronics control (CEC) I/F
|
||||
- Advanced connectivity
|
||||
- USB 2.0 full-speed device/host/OTG controller with on-chip PHY
|
||||
- USB 2.0 high-speed/full-speed device/host/OTG controller with dedicated DMA, on-chip full-speed PHY and ULPI
|
||||
- Dedicated USB power rail enabling on-chip PHYs operation throughout the entire MCU power supply range
|
||||
- 8- to 14-bit parallel camera interface up to 54 Mbytes/s
|
||||
- CRC calculation unit
|
||||
- RTC: subsecond accuracy, hardware calendar
|
||||
- 96-bit unique ID
|
||||
|
||||
|
||||
### 快速上手
|
||||
|
||||
本 BSP 为开发者提供 MDK5 和 IAR 工程,并且支持 GCC 开发环境。下面以 MDK5 开发环境为例,介绍如何将系统运行起来。
|
||||
## Read more
|
||||
|
||||
#### 硬件连接
|
||||
| Documents | Description |
|
||||
| :----------------------------------------------------------: | :----------------------------------------------------------: |
|
||||
| [STM32_Nucleo-144_BSP_Introduction](../docs/STM32_Nucleo-144_BSP_Introduction.md) | How to run RT-Thread on STM32 Nucleo-144 boards (**Must-Read**) |
|
||||
| [STM32F446ZE ST Official Website](https://www.st.com/content/st_com/en/products/microcontrollers-microprocessors/stm32-32-bit-arm-cortex-mcus/stm32-high-performance-mcus/stm32f4-series/stm32f446/stm32f446ze.html#documentation) | STM32F446ZE datasheet and other resources |
|
||||
|
||||
使用数据线连接开发板到 PC,通过数据线对开发板供电,下载,调试。
|
||||
|
||||
#### 编译下载
|
||||
|
||||
双击 project.uvprojx 文件,打开 MDK5 工程,编译并下载程序到开发板。
|
||||
## Maintained By
|
||||
|
||||
> 工程默认配置使用 ST-LINK 仿真器下载程序,在通过 ST-LINK 连接开发板的基础上,点击下载按钮即可下载程序到开发板
|
||||
qihengchuan8888@163.com
|
||||
|
||||
#### 运行结果
|
||||
|
||||
下载程序成功之后,系统会自动运行,蓝色的 LED2 以 500MS 周期闪烁。
|
||||
|
||||
连接开发板对应串口到 PC , 在终端工具里打开相应的串口(115200-8-1-N),复位设备后,可以看到 RT-Thread 的输出信息:
|
||||
## Translated By
|
||||
|
||||
```bash
|
||||
\ | /
|
||||
- RT - Thread Operating System
|
||||
/ | \ 4.0.0 build Jan 7 2019
|
||||
2006 - 2018 Copyright by rt-thread team
|
||||
msh >
|
||||
```
|
||||
### 进阶使用
|
||||
Meco Man @ RT-Thread Community
|
||||
|
||||
此 BSP 默认只开启了 GPIO 和 串口1 的功能,如果需使用 SD 卡、Flash 等更多高级功能,需要利用 ENV 工具对BSP 进行配置,步骤如下:
|
||||
|
||||
1. 在 bsp 下打开 env 工具。
|
||||
|
||||
2. 输入`menuconfig`命令配置工程,配置好之后保存退出。
|
||||
|
||||
3. 输入`pkgs --update`命令更新软件包。
|
||||
|
||||
4. 输入`scons --target=mdk4/mdk5/iar` 命令重新生成工程。
|
||||
|
||||
本章节更多详细的介绍请参考 [STM32 系列 BSP 外设驱动使用教程](../docs/STM32系列BSP外设驱动使用教程.md)。
|
||||
|
||||
## 注意事项
|
||||
|
||||
- 默认终端输出设备是 UART1
|
||||
|
||||
## 联系人信息
|
||||
|
||||
维护人:
|
||||
|
||||
- 邮箱:<qihengchuan8888@163.com>
|
||||
> jiantingman@foxmail.com
|
||||
>
|
||||
> https://github.com/mysterywolf
|
||||
@@ -0,0 +1,106 @@
|
||||
# NUCLEO-F446ZE 开发板 BSP 说明
|
||||
|
||||
## 简介
|
||||
|
||||
本文档为 NUCLEO-F446ZE 开发板的 BSP (板级支持包) 说明。
|
||||
|
||||
主要内容如下:
|
||||
|
||||
- 开发板资源介绍
|
||||
- BSP 快速上手
|
||||
- 进阶使用方法
|
||||
|
||||
通过阅读快速上手章节开发者可以快速地上手该 BSP,将 RT-Thread 运行在开发板上。在进阶使用指南章节,将会介绍更多高级功能,帮助开发者利用 RT-Thread 驱动更多板载资源。
|
||||
|
||||
## 开发板介绍
|
||||
|
||||
NUCLEO-F446ZE 是 ST 公司推出的一款针对 STM32F4 系列设计的 Cortex-M4 Nucleo-144 开发板,支持 mbed,兼容 Arduino、还带有ST Zio和 ST Morpho 扩展接口,可连接微控制器的所有周边外设。
|
||||
|
||||
开发板外观如下图所示:
|
||||
|
||||

|
||||
|
||||
该开发板常用 **板载资源** 如下:
|
||||
|
||||
- MCU:STM32f446ZE,主频 180MHz,512KB FLASH ,128KB RAM
|
||||
- 常用外设
|
||||
- LED:3个,LED1 (绿色,PB0),LED2(蓝色,PB7),LED3(红色,PB14)
|
||||
- 常用接口:USB 转串口
|
||||
- 调试接口,标准 ST-LINK/SWD
|
||||
|
||||
开发板更多详细信息请参考【NUCLEO-F446ZE】 [开发板介绍](https://www.st.com/zh/evaluation-tools/nucleo-f446ze.html)。
|
||||
|
||||
## 外设支持
|
||||
|
||||
本 BSP 目前对外设的支持情况如下:
|
||||
|
||||
| **板载外设** | **支持情况** | **备注** |
|
||||
| :----------------- | :----------: | :------------------------------------- |
|
||||
| USB 转串口 | 支持 | |
|
||||
| **片上外设** | **支持情况** | **备注** |
|
||||
| GPIO | 支持 | |
|
||||
| UART | 支持 | UART1 |
|
||||
|
||||
## 使用说明
|
||||
|
||||
使用说明分为如下两个章节:
|
||||
|
||||
- 快速上手
|
||||
|
||||
本章节是为刚接触 RT-Thread 的新手准备的使用说明,遵循简单的步骤即可将 RT-Thread 操作系统运行在该开发板上,看到实验效果 。
|
||||
|
||||
- 进阶使用
|
||||
|
||||
本章节是为需要在 RT-Thread 操作系统上使用更多开发板资源的开发者准备的。通过使用 ENV 工具对 BSP 进行配置,可以开启更多板载资源,实现更多高级功能。
|
||||
|
||||
|
||||
### 快速上手
|
||||
|
||||
本 BSP 为开发者提供 MDK5 和 IAR 工程,并且支持 GCC 开发环境。下面以 MDK5 开发环境为例,介绍如何将系统运行起来。
|
||||
|
||||
#### 硬件连接
|
||||
|
||||
使用数据线连接开发板到 PC,通过数据线对开发板供电,下载,调试。
|
||||
|
||||
#### 编译下载
|
||||
|
||||
双击 project.uvprojx 文件,打开 MDK5 工程,编译并下载程序到开发板。
|
||||
|
||||
> 工程默认配置使用 ST-LINK 仿真器下载程序,在通过 ST-LINK 连接开发板的基础上,点击下载按钮即可下载程序到开发板
|
||||
|
||||
#### 运行结果
|
||||
|
||||
下载程序成功之后,系统会自动运行,蓝色的 LED2 以 500MS 周期闪烁。
|
||||
|
||||
连接开发板对应串口到 PC , 在终端工具里打开相应的串口(115200-8-1-N),复位设备后,可以看到 RT-Thread 的输出信息:
|
||||
|
||||
```bash
|
||||
\ | /
|
||||
- RT - Thread Operating System
|
||||
/ | \ 4.0.0 build Jan 7 2019
|
||||
2006 - 2018 Copyright by rt-thread team
|
||||
msh >
|
||||
```
|
||||
### 进阶使用
|
||||
|
||||
此 BSP 默认只开启了 GPIO 和 串口1 的功能,如果需使用 SD 卡、Flash 等更多高级功能,需要利用 ENV 工具对BSP 进行配置,步骤如下:
|
||||
|
||||
1. 在 bsp 下打开 env 工具。
|
||||
|
||||
2. 输入`menuconfig`命令配置工程,配置好之后保存退出。
|
||||
|
||||
3. 输入`pkgs --update`命令更新软件包。
|
||||
|
||||
4. 输入`scons --target=mdk4/mdk5/iar` 命令重新生成工程。
|
||||
|
||||
本章节更多详细的介绍请参考 [STM32 系列 BSP 外设驱动使用教程](../docs/STM32系列BSP外设驱动使用教程.md)。
|
||||
|
||||
## 注意事项
|
||||
|
||||
- 默认终端输出设备是 UART1
|
||||
|
||||
## 联系人信息
|
||||
|
||||
维护人:
|
||||
|
||||
- 邮箱:<qihengchuan8888@163.com>
|
||||
@@ -1,110 +1,95 @@
|
||||
# STM32F767 NUCLEO-F767ZI开发板 BSP 说明
|
||||
## 简介
|
||||
# STM32F767-Nucleo BSP Introduction
|
||||
|
||||
本文档为 NUCLEO-F767ZI 开发板的 BSP (板级支持包) 说明。
|
||||
[中文](README_zh.md)
|
||||
|
||||
主要内容如下:
|
||||
## MCU: STM32F767ZI @216MHz, 2MB FLASH, 512KB RAM
|
||||
|
||||
- 开发板资源介绍
|
||||
- BSP 快速上手
|
||||
- 进阶使用方法
|
||||
The STM32F765xx, STM32F767xx, STM32F768Ax and STM32F769xx devices are based on the high-performance Arm® Cortex®-M7 32-bit RISC core operating at up to 216 MHz frequency. The Cortex®-M7 core features a floating point unit (FPU) which supports Arm® double-precision and single-precision data-processing instructions and data types. It also implements a full set of DSP instructions and a memory protection unit (MPU) which enhances the application security.
|
||||
|
||||
通过阅读快速上手章节开发者可以快速地上手该 BSP,将 RT-Thread 运行在开发板上。在进阶使用指南章节,将会介绍更多高级功能,帮助开发者利用 RT-Thread 驱动更多板载资源。
|
||||
The STM32F765xx, STM32F767xx, STM32F768Ax and STM32F769xx devices incorporate high-speed embedded memories with a Flash memory up to 2 Mbytes, 512 Kbytes of SRAM (including 128 Kbytes of Data TCM RAM for critical real-time data), 16 Kbytes of instruction TCM RAM (for critical real-time routines), 4 Kbytes of backup SRAM available in the lowest power modes, and an extensive range of enhanced I/Os and peripherals connected to two APB buses, two AHB buses, a 32-bit multi-AHB bus matrix and a multi layer AXI interconnect supporting internal and external memories access.
|
||||
All the devices offer three 12-bit ADCs, two DACs, a low-power RTC, twelve general-purpose 16-bit timers including two PWM timers for motor control, two general-purpose 32-bit timers, a true random number generator (RNG). They also feature standard and advanced communication interfaces.
|
||||
Advanced peripherals include two SDMMC interfaces, a flexible memory control (FMC) interface, a Quad-SPI Flash memory interface, a camera interface for CMOS sensors.
|
||||
The STM32F765xx, STM32F767xx, STM32F768Ax and STM32F769xx devices operate in the –40 to +105 °C temperature range from a 1.7 to 3.6 V power supply. Dedicated supply inputs for USB (OTG_FS and OTG_HS) and SDMMC2 (clock, command and 4-bit data) are available on all the packages except LQFP100 for a greater power supply choice.
|
||||
The supply voltage can drop to 1.7 V with the use of an external power supply supervisor. A comprehensive set of power-saving mode allows the design of low-power applications.
|
||||
The STM32F765xx, STM32F767xx, STM32F768Ax and STM32F769xx devices offer devices in 11 packages ranging from 100 pins to 216 pins. The set of included peripherals changes with the device chosen.
|
||||
These features make the STM32F765xx, STM32F767xx, STM32F768Ax and STM32F769xx microcontrollers suitable for a wide range of applications.
|
||||
|
||||
## 开发板介绍
|
||||
#### KEY FEATURES
|
||||
|
||||
NUCLEO-F767ZI 是st推出的一款基于 ARM Cortex-M7 内核的开发板,最高主频为 216Mhz,该开发板具有丰富的板载资源,可以充分发挥 STM32F767 的芯片性能。
|
||||
- Core: Arm® 32-bit Cortex®-M7 CPU with DPFPU, ART Accelerator™ and L1-cache: 16 Kbytes I/D cache, allowing 0-wait state execution from embedded Flash and external memories, up to 216 MHz, MPU, 462 DMIPS/2.14 DMIPS/MHz (Dhrystone 2.1), and DSP instructions.
|
||||
- Memories
|
||||
- Up to 2 Mbytes of Flash memory organized into two banks allowing read-while-write
|
||||
- SRAM: 512 Kbytes (including 128 Kbytes of data TCM RAM for critical real-time data) + 16 Kbytes of instruction TCM RAM (for critical real-time routines) + 4 Kbytes of backup SRAM
|
||||
- Flexible external memory controller with up to 32-bit data bus: SRAM, PSRAM, SDRAM/LPSDR SDRAM, NOR/NAND memories
|
||||
- Dual mode Quad-SPI
|
||||
- Graphics
|
||||
- Chrom-ART Accelerator™ (DMA2D), graphical hardware accelerator enabling enhanced graphical user interface
|
||||
- Hardware JPEG codec
|
||||
- LCD-TFT controller supporting up to XGA resolution
|
||||
- MIPI® DSI host controller supporting up to 720p 30 Hz resolution
|
||||
- Clock, reset and supply management
|
||||
- 1.7 V to 3.6 V application supply and I/Os
|
||||
- POR, PDR, PVD and BOR
|
||||
- Dedicated USB power
|
||||
- 4-to-26 MHz crystal oscillator
|
||||
- Internal 16 MHz factory-trimmed RC (1% accuracy)
|
||||
- 32 kHz oscillator for RTC with calibration
|
||||
- Internal 32 kHz RC with calibration
|
||||
- Low-power
|
||||
- Sleep, Stop and Standby modes
|
||||
- VBAT supply for RTC, 32×32 bit backup registers + 4 Kbytes backup SRAM
|
||||
- 3×12-bit, 2.4 MSPS ADC: up to 24 channels
|
||||
- Digital filters for sigma delta modulator (DFSDM), 8 channels / 4 filters
|
||||
- 2×12-bit D/A converters
|
||||
- General-purpose DMA: 16-stream DMA controller with FIFOs and burst support
|
||||
|
||||
开发板外观如下图所示:
|
||||
|
||||

|
||||
|
||||
该开发板常用 **板载资源** 如下:
|
||||
|
||||
- MCU:STM32f767,主频 216MHz,2MB FLASH ,512KB RAM ,16K CACHE
|
||||
|
||||
- 常用外设
|
||||
- LED :3个,LED1 (绿色,PB0),LED2(蓝色,PB7),LED3(红色,PB14)
|
||||
- 按键:2个,B1(用户按键,PC13),B2(复位引脚)
|
||||
- 常用接口:USB 转串口3、以太网接口
|
||||
- 调试接口:ST-LINK
|
||||
|
||||
开发板更多详细信息请参考ST [NUCLEO-F767ZI开发板介绍](https://www.st.com/en/evaluation-tools/nucleo-f767zi.html)。
|
||||
|
||||
## 外设支持
|
||||
|
||||
本 BSP 目前对外设的支持情况如下:
|
||||
|
||||
| **板载外设** | **支持情况** | **备注** |
|
||||
| :-----------------| :----------: | :-------------------------------------|
|
||||
| USB 转串口3 | 支持 | |
|
||||
| 以太网 | 支持 | PHY 选项 LAN8720A(兼容 LAN8742A) |
|
||||
| **片上外设** | **支持情况** | **备注** |
|
||||
| GPIO | 支持 | PA0, PA1... PK15 ---> PIN: 0, 1...144 |
|
||||
| UART | 支持 | UART3 |
|
||||
| **扩展模块** | **支持情况** | **备注** |
|
||||
| 暂无 | 暂不支持 | 暂不支持 |
|
||||
|
||||
## 使用说明
|
||||
|
||||
使用说明分为如下两个章节:
|
||||
|
||||
- 快速上手
|
||||
|
||||
本章节是为刚接触 RT-Thread 的新手准备的使用说明,遵循简单的步骤即可将 RT-Thread 操作系统运行在该开发板上,看到实验效果 。
|
||||
|
||||
- 进阶使用
|
||||
|
||||
本章节是为需要在 RT-Thread 操作系统上使用更多开发板资源的开发者准备的。通过使用 ENV 工具对 BSP 进行配置,可以开启更多板载资源,实现更多高级功能。
|
||||
- Up to 18 timers: up to thirteen 16-bit (1x low- power 16-bit timer available in Stop mode) and two 32-bit timers, each with up to 4 IC/OC/PWM or pulse counter and quadrature (incremental) encoder input. All 15 timers running up to 216 MHz. 2x watchdogs, SysTick timer
|
||||
- Debug mode
|
||||
- SWD & JTAG interfaces
|
||||
- Cortex®-M7 Trace Macrocell™
|
||||
- Up to 168 I/O ports with interrupt capability
|
||||
- Up to 164 fast I/Os up to 108 MHz
|
||||
- Up to 166 5 V-tolerant I/Os
|
||||
- Up to 28 communication interfaces
|
||||
- Up to 4 I2C interfaces (SMBus/PMBus)
|
||||
- Up to 4 USARTs/4 UARTs (12.5 Mbit/s, ISO7816 interface, LIN, IrDA, modem control)
|
||||
- Up to 6 SPIs (up to 54 Mbit/s), 3 with muxed simplex I2S for audio
|
||||
- 2 x SAIs (serial audio interface)
|
||||
- 3 x CANs (2.0B Active) and 2 x SDMMCs
|
||||
- SPDIFRX interface
|
||||
- HDMI-CEC
|
||||
- MDIO slave interface
|
||||
- Advanced connectivity
|
||||
- USB 2.0 full-speed device/host/OTG controller with on-chip PHY
|
||||
- USB 2.0 high-speed/full-speed device/host/OTG controller with dedicated DMA, on-chip full-speed PHY and ULPI
|
||||
- 10/100 Ethernet MAC with dedicated DMA: supports IEEE 1588v2 hardware, MII/RMII
|
||||
- 8- to 14-bit camera interface up to 54 Mbyte/s
|
||||
- True random number generator
|
||||
- CRC calculation unit
|
||||
- RTC: subsecond accuracy, hardware calendar
|
||||
- 96-bit unique ID
|
||||
|
||||
|
||||
### 快速上手
|
||||
|
||||
本 BSP 为开发者提供 MDK5 和 IAR 工程,并且支持 GCC 开发环境。下面以 MDK5 开发环境为例,介绍如何将系统运行起来。
|
||||
## Read more
|
||||
|
||||
#### 硬件连接
|
||||
| Documents | Description |
|
||||
| :----------------------------------------------------------: | :----------------------------------------------------------: |
|
||||
| [STM32_Nucleo-144_BSP_Introduction](../docs/STM32_Nucleo-144_BSP_Introduction.md) | How to run RT-Thread on STM32 Nucleo-144 boards (**Must-Read**) |
|
||||
| [STM32F767ZI ST Official Website](https://www.st.com/en/microcontrollers-microprocessors/stm32f767zi.html#documentation) | STM32F767ZI datasheet and other resources |
|
||||
|
||||
使用数据线连接开发板到 PC,打开电源开关。
|
||||
|
||||
#### 编译下载
|
||||
|
||||
双击 project.uvprojx 文件,打开 MDK5 工程,编译并下载程序到开发板。
|
||||
## Maintained By
|
||||
|
||||
> 工程默认配置使用 ST-LINK 仿真器下载程序,在通过 ST-LINK 连接开发板的基础上,点击下载按钮即可下载程序到开发板
|
||||
[e31207077](https://github.com/e31207077) <e31207077@yahoo.com.tw>
|
||||
|
||||
#### 运行结果
|
||||
|
||||
下载程序成功之后,系统会自动运行,LED 闪烁。
|
||||
|
||||
连接开发板对应串口到 PC , 在终端工具里打开相应的串口(115200-8-1-N),复位设备后,可以看到 RT-Thread 的输出信息:
|
||||
## Translated By
|
||||
|
||||
```bash
|
||||
\ | /
|
||||
- RT - Thread Operating System
|
||||
/ | \ 4.0.0 build Jan 9 2019
|
||||
2006 - 2018 Copyright by rt-thread team
|
||||
msh >
|
||||
```
|
||||
### 进阶使用
|
||||
Meco Man @ RT-Thread Community
|
||||
|
||||
此 BSP 默认只开启了 GPIO 和 串口3 的功能,如果需使用 Ethernet 等更多高级功能,需要利用 ENV 工具对BSP 进行配置,步骤如下:
|
||||
|
||||
1. 在 bsp 下打开 env 工具。
|
||||
|
||||
2. 输入`menuconfig`命令配置工程,配置好之后保存退出。
|
||||
|
||||
3. 输入`pkgs --update`命令更新软件包。
|
||||
|
||||
4. 输入`scons --target=mdk4/mdk5/iar` 命令重新生成工程。
|
||||
|
||||
本章节更多详细的介绍请参考 [STM32 系列 BSP 外设驱动使用教程](../docs/STM32系列BSP外设驱动使用教程.md)。
|
||||
|
||||
## 注意事项
|
||||
|
||||
暂无
|
||||
|
||||
## 联系人信息
|
||||
|
||||
维护人:
|
||||
|
||||
- [e31207077](https://github.com/e31207077), 邮箱:<e31207077@yahoo.com.tw>
|
||||
> jiantingman@foxmail.com
|
||||
>
|
||||
> https://github.com/mysterywolf
|
||||
@@ -0,0 +1,110 @@
|
||||
# STM32F767 NUCLEO-F767ZI开发板 BSP 说明
|
||||
## 简介
|
||||
|
||||
本文档为 NUCLEO-F767ZI 开发板的 BSP (板级支持包) 说明。
|
||||
|
||||
主要内容如下:
|
||||
|
||||
- 开发板资源介绍
|
||||
- BSP 快速上手
|
||||
- 进阶使用方法
|
||||
|
||||
通过阅读快速上手章节开发者可以快速地上手该 BSP,将 RT-Thread 运行在开发板上。在进阶使用指南章节,将会介绍更多高级功能,帮助开发者利用 RT-Thread 驱动更多板载资源。
|
||||
|
||||
## 开发板介绍
|
||||
|
||||
NUCLEO-F767ZI 是st推出的一款基于 ARM Cortex-M7 内核的开发板,最高主频为 216Mhz,该开发板具有丰富的板载资源,可以充分发挥 STM32F767 的芯片性能。
|
||||
|
||||
开发板外观如下图所示:
|
||||
|
||||

|
||||
|
||||
该开发板常用 **板载资源** 如下:
|
||||
|
||||
- MCU:STM32f767,主频 216MHz,2MB FLASH ,512KB RAM ,16K CACHE
|
||||
|
||||
- 常用外设
|
||||
- LED :3个,LED1 (绿色,PB0),LED2(蓝色,PB7),LED3(红色,PB14)
|
||||
- 按键:2个,B1(用户按键,PC13),B2(复位引脚)
|
||||
- 常用接口:USB 转串口3、以太网接口
|
||||
- 调试接口:ST-LINK
|
||||
|
||||
开发板更多详细信息请参考ST [NUCLEO-F767ZI开发板介绍](https://www.st.com/en/evaluation-tools/nucleo-f767zi.html)。
|
||||
|
||||
## 外设支持
|
||||
|
||||
本 BSP 目前对外设的支持情况如下:
|
||||
|
||||
| **板载外设** | **支持情况** | **备注** |
|
||||
| :-----------------| :----------: | :-------------------------------------|
|
||||
| USB 转串口3 | 支持 | |
|
||||
| 以太网 | 支持 | PHY 选项 LAN8720A(兼容 LAN8742A) |
|
||||
| **片上外设** | **支持情况** | **备注** |
|
||||
| GPIO | 支持 | PA0, PA1... PK15 ---> PIN: 0, 1...144 |
|
||||
| UART | 支持 | UART3 |
|
||||
| **扩展模块** | **支持情况** | **备注** |
|
||||
| 暂无 | 暂不支持 | 暂不支持 |
|
||||
|
||||
## 使用说明
|
||||
|
||||
使用说明分为如下两个章节:
|
||||
|
||||
- 快速上手
|
||||
|
||||
本章节是为刚接触 RT-Thread 的新手准备的使用说明,遵循简单的步骤即可将 RT-Thread 操作系统运行在该开发板上,看到实验效果 。
|
||||
|
||||
- 进阶使用
|
||||
|
||||
本章节是为需要在 RT-Thread 操作系统上使用更多开发板资源的开发者准备的。通过使用 ENV 工具对 BSP 进行配置,可以开启更多板载资源,实现更多高级功能。
|
||||
|
||||
|
||||
### 快速上手
|
||||
|
||||
本 BSP 为开发者提供 MDK5 和 IAR 工程,并且支持 GCC 开发环境。下面以 MDK5 开发环境为例,介绍如何将系统运行起来。
|
||||
|
||||
#### 硬件连接
|
||||
|
||||
使用数据线连接开发板到 PC,打开电源开关。
|
||||
|
||||
#### 编译下载
|
||||
|
||||
双击 project.uvprojx 文件,打开 MDK5 工程,编译并下载程序到开发板。
|
||||
|
||||
> 工程默认配置使用 ST-LINK 仿真器下载程序,在通过 ST-LINK 连接开发板的基础上,点击下载按钮即可下载程序到开发板
|
||||
|
||||
#### 运行结果
|
||||
|
||||
下载程序成功之后,系统会自动运行,LED 闪烁。
|
||||
|
||||
连接开发板对应串口到 PC , 在终端工具里打开相应的串口(115200-8-1-N),复位设备后,可以看到 RT-Thread 的输出信息:
|
||||
|
||||
```bash
|
||||
\ | /
|
||||
- RT - Thread Operating System
|
||||
/ | \ 4.0.0 build Jan 9 2019
|
||||
2006 - 2018 Copyright by rt-thread team
|
||||
msh >
|
||||
```
|
||||
### 进阶使用
|
||||
|
||||
此 BSP 默认只开启了 GPIO 和 串口3 的功能,如果需使用 Ethernet 等更多高级功能,需要利用 ENV 工具对BSP 进行配置,步骤如下:
|
||||
|
||||
1. 在 bsp 下打开 env 工具。
|
||||
|
||||
2. 输入`menuconfig`命令配置工程,配置好之后保存退出。
|
||||
|
||||
3. 输入`pkgs --update`命令更新软件包。
|
||||
|
||||
4. 输入`scons --target=mdk4/mdk5/iar` 命令重新生成工程。
|
||||
|
||||
本章节更多详细的介绍请参考 [STM32 系列 BSP 外设驱动使用教程](../docs/STM32系列BSP外设驱动使用教程.md)。
|
||||
|
||||
## 注意事项
|
||||
|
||||
暂无
|
||||
|
||||
## 联系人信息
|
||||
|
||||
维护人:
|
||||
|
||||
- [e31207077](https://github.com/e31207077), 邮箱:<e31207077@yahoo.com.tw>
|
||||
@@ -61,12 +61,6 @@ void rtthread_startup(void)
|
||||
/* show version */
|
||||
rt_show_version();
|
||||
|
||||
/* init tick */
|
||||
rt_system_tick_init();
|
||||
|
||||
/* init kernel object */
|
||||
rt_system_object_init();
|
||||
|
||||
/* init timer system */
|
||||
rt_system_timer_init();
|
||||
|
||||
|
||||
@@ -40,9 +40,6 @@ void rtthread_startup(void)
|
||||
rt_hw_board_init();
|
||||
rt_show_version();
|
||||
|
||||
/* init tick */
|
||||
rt_system_tick_init();
|
||||
|
||||
/* init timer system */
|
||||
rt_system_timer_init();
|
||||
|
||||
|
||||
@@ -50,12 +50,6 @@ void rtthread_startup(void)
|
||||
/* show version */
|
||||
rt_show_version();
|
||||
|
||||
/* init tick */
|
||||
rt_system_tick_init();
|
||||
|
||||
/* init kernel object */
|
||||
rt_system_object_init();
|
||||
|
||||
/* init timer system */
|
||||
rt_system_timer_init();
|
||||
|
||||
|
||||
@@ -49,13 +49,7 @@ void rtthread_startup(void)
|
||||
|
||||
/* show version */
|
||||
rt_show_version();
|
||||
|
||||
/* init tick */
|
||||
rt_system_tick_init();
|
||||
|
||||
/* init kernel object */
|
||||
rt_system_object_init();
|
||||
|
||||
|
||||
/* init timer system */
|
||||
rt_system_timer_init();
|
||||
|
||||
|
||||
@@ -58,12 +58,6 @@ void rtthread_startup(void)
|
||||
|
||||
rt_show_version();
|
||||
|
||||
/* init tick */
|
||||
rt_system_tick_init();
|
||||
|
||||
/* init kernel object */
|
||||
rt_system_object_init();
|
||||
|
||||
/* init timer system */
|
||||
rt_system_timer_init();
|
||||
|
||||
|
||||
@@ -69,12 +69,6 @@ void rtthread_startup(void)
|
||||
|
||||
rt_show_version();
|
||||
|
||||
/* init tick */
|
||||
rt_system_tick_init();
|
||||
|
||||
/* init kernel object */
|
||||
rt_system_object_init();
|
||||
|
||||
/* init timer system */
|
||||
rt_system_timer_init();
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
* 2012-06-02 Bernard the first version
|
||||
* 2018-08-02 Tanek split run and sleep modes, support custom mode
|
||||
* 2019-04-28 Zero-Free improve PM mode and device ops interface
|
||||
* 2020-11-23 zhangsz update pm mode select
|
||||
*/
|
||||
|
||||
#include <rthw.h>
|
||||
@@ -214,8 +215,6 @@ static void _pm_change_sleep_mode(struct rt_pm *pm, rt_uint8_t mode)
|
||||
*/
|
||||
void rt_system_power_manager(void)
|
||||
{
|
||||
rt_uint8_t mode;
|
||||
|
||||
if (_pm_init_flag == 0)
|
||||
return;
|
||||
|
||||
@@ -223,8 +222,7 @@ void rt_system_power_manager(void)
|
||||
_pm_frequency_scaling(&_pm);
|
||||
|
||||
/* Low Power Mode Processing */
|
||||
mode = _pm_select_sleep_mode(&_pm);
|
||||
_pm_change_sleep_mode(&_pm, mode);
|
||||
_pm_change_sleep_mode(&_pm, _pm.sleep_mode);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -248,6 +246,7 @@ void rt_pm_request(rt_uint8_t mode)
|
||||
pm = &_pm;
|
||||
if (pm->modes[mode] < 255)
|
||||
pm->modes[mode] ++;
|
||||
_pm_select_sleep_mode(pm);
|
||||
rt_hw_interrupt_enable(level);
|
||||
}
|
||||
|
||||
@@ -273,6 +272,7 @@ void rt_pm_release(rt_uint8_t mode)
|
||||
pm = &_pm;
|
||||
if (pm->modes[mode] > 0)
|
||||
pm->modes[mode] --;
|
||||
_pm_select_sleep_mode(pm);
|
||||
rt_hw_interrupt_enable(level);
|
||||
}
|
||||
|
||||
@@ -516,6 +516,10 @@ void rt_system_pm_init(const struct rt_pm_ops *ops,
|
||||
pm->device_pm = RT_NULL;
|
||||
pm->device_pm_number = 0;
|
||||
|
||||
#if IDLE_THREAD_STACK_SIZE <= 256
|
||||
#error "[pm.c ERR] IDLE Stack Size Too Small!"
|
||||
#endif
|
||||
|
||||
_pm_init_flag = 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ static sem_t *posix_sem_find(const char* name)
|
||||
|
||||
for (iter = posix_sem_list; iter != RT_NULL; iter = iter->next)
|
||||
{
|
||||
object = (rt_object_t)&(iter->sem);
|
||||
object = (rt_object_t)iter->sem;
|
||||
|
||||
if (strncmp(object->name, name, RT_NAME_MAX) == 0)
|
||||
{
|
||||
|
||||
@@ -21,12 +21,6 @@
|
||||
* - show version
|
||||
* rt_show_version();
|
||||
*
|
||||
* - initialize system tick
|
||||
* rt_system_tick_init();
|
||||
*
|
||||
* - initialize kernel object [deprecated]
|
||||
* rt_system_object_init();
|
||||
*
|
||||
* - initialize timer system
|
||||
* rt_system_timer_init();
|
||||
*
|
||||
|
||||
@@ -38,7 +38,6 @@ extern "C" {
|
||||
/*
|
||||
* kernel object interface
|
||||
*/
|
||||
void rt_system_object_init(void);
|
||||
struct rt_object_information *
|
||||
rt_object_get_information(enum rt_object_class_type type);
|
||||
int rt_object_get_length(enum rt_object_class_type type);
|
||||
@@ -74,7 +73,6 @@ void rt_object_put_sethook(void (*hook)(struct rt_object *object));
|
||||
/*
|
||||
* clock & timer interface
|
||||
*/
|
||||
void rt_system_tick_init(void);
|
||||
rt_tick_t rt_tick_get(void);
|
||||
void rt_tick_set(rt_tick_t tick);
|
||||
void rt_tick_increase(void);
|
||||
|
||||
@@ -106,6 +106,14 @@ config ARCH_RISCV
|
||||
config ARCH_RISCV_FPU
|
||||
bool
|
||||
|
||||
config ARCH_RISCV_FPU_S
|
||||
select ARCH_RISCV_FPU
|
||||
bool
|
||||
|
||||
config ARCH_RISCV_FPU_D
|
||||
select ARCH_RISCV_FPU
|
||||
bool
|
||||
|
||||
config ARCH_RISCV32
|
||||
select ARCH_RISCV
|
||||
bool
|
||||
|
||||
@@ -76,7 +76,7 @@ void rt_hw_spin_unlock(rt_hw_spinlock_t *lock)
|
||||
/*@{*/
|
||||
|
||||
/** shutdown CPU */
|
||||
void rt_hw_cpu_shutdown()
|
||||
RT_WEAK void rt_hw_cpu_shutdown()
|
||||
{
|
||||
rt_uint32_t level;
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
||||
@@ -32,7 +32,7 @@ struct init_stack_frame {
|
||||
/**
|
||||
* shutdown CPU
|
||||
*/
|
||||
void rt_hw_cpu_shutdown(void)
|
||||
RT_WEAK void rt_hw_cpu_shutdown(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
* this function will reset CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_reset()
|
||||
RT_WEAK void rt_hw_cpu_reset()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ void rt_hw_cpu_reset()
|
||||
* this function will shutdown CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_shutdown()
|
||||
RT_WEAK void rt_hw_cpu_shutdown()
|
||||
{
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
* this function will reset CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_reset()
|
||||
RT_WEAK void rt_hw_cpu_reset()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ void rt_hw_cpu_reset()
|
||||
* this function will shutdown CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_shutdown()
|
||||
RT_WEAK void rt_hw_cpu_shutdown()
|
||||
{
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
||||
|
||||
@@ -149,7 +149,7 @@ rt_base_t rt_hw_cpu_dcache_status()
|
||||
* shutdown CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_shutdown()
|
||||
RT_WEAK void rt_hw_cpu_shutdown()
|
||||
{
|
||||
rt_uint32_t level;
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
||||
@@ -146,7 +146,7 @@ rt_base_t rt_hw_cpu_dcache_status()
|
||||
* reset cpu by dog's time-out
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_reset()
|
||||
RT_WEAK void rt_hw_cpu_reset()
|
||||
{
|
||||
|
||||
rt_kprintf("Restarting system...\n");
|
||||
@@ -161,7 +161,7 @@ void rt_hw_cpu_reset()
|
||||
* shutdown CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_shutdown()
|
||||
RT_WEAK void rt_hw_cpu_shutdown()
|
||||
{
|
||||
rt_uint32_t level;
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
||||
@@ -147,7 +147,7 @@ rt_base_t rt_hw_cpu_dcache_status()
|
||||
* reset cpu by dog's time-out
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_reset()
|
||||
RT_WEAK void rt_hw_cpu_reset()
|
||||
{
|
||||
|
||||
rt_kprintf("Restarting system...\n");
|
||||
@@ -162,7 +162,7 @@ void rt_hw_cpu_reset()
|
||||
* shutdown CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_shutdown()
|
||||
RT_WEAK void rt_hw_cpu_shutdown()
|
||||
{
|
||||
rt_uint32_t level;
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
||||
@@ -74,7 +74,7 @@ void rt_hw_spin_unlock(rt_hw_spinlock_t *lock)
|
||||
/*@{*/
|
||||
|
||||
/** shutdown CPU */
|
||||
void rt_hw_cpu_shutdown()
|
||||
RT_WEAK void rt_hw_cpu_shutdown()
|
||||
{
|
||||
rt_uint32_t level;
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
||||
@@ -344,7 +344,7 @@ void rt_hw_hard_fault_exception(struct exception_info * exception_info)
|
||||
/**
|
||||
* shutdown CPU
|
||||
*/
|
||||
void rt_hw_cpu_shutdown(void)
|
||||
RT_WEAK void rt_hw_cpu_shutdown(void)
|
||||
{
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
||||
|
||||
@@ -431,7 +431,7 @@ void rt_hw_hard_fault_exception(struct exception_info *exception_info)
|
||||
/**
|
||||
* shutdown CPU
|
||||
*/
|
||||
void rt_hw_cpu_shutdown(void)
|
||||
RT_WEAK void rt_hw_cpu_shutdown(void)
|
||||
{
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
||||
|
||||
@@ -428,7 +428,7 @@ void rt_hw_hard_fault_exception(struct exception_info *exception_info)
|
||||
/**
|
||||
* shutdown CPU
|
||||
*/
|
||||
void rt_hw_cpu_shutdown(void)
|
||||
RT_WEAK void rt_hw_cpu_shutdown(void)
|
||||
{
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
||||
|
||||
@@ -428,7 +428,7 @@ void rt_hw_hard_fault_exception(struct exception_info *exception_info)
|
||||
/**
|
||||
* shutdown CPU
|
||||
*/
|
||||
void rt_hw_cpu_shutdown(void)
|
||||
RT_WEAK void rt_hw_cpu_shutdown(void)
|
||||
{
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
* this function will reset CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_reset()
|
||||
RT_WEAK void rt_hw_cpu_reset()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ void rt_hw_cpu_reset()
|
||||
* this function will shutdown CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_shutdown()
|
||||
RT_WEAK void rt_hw_cpu_shutdown()
|
||||
{
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@ rt_base_t rt_hw_cpu_dcache_status()
|
||||
* reset cpu by dog's time-out
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_reset()
|
||||
RT_WEAK void rt_hw_cpu_reset()
|
||||
{
|
||||
|
||||
rt_kprintf("Restarting system...\n");
|
||||
@@ -160,7 +160,7 @@ void rt_hw_cpu_reset()
|
||||
* shutdown CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_shutdown()
|
||||
RT_WEAK void rt_hw_cpu_shutdown()
|
||||
{
|
||||
rt_uint32_t level;
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
||||
@@ -163,7 +163,7 @@ rt_isr_handler_t rt_hw_interrupt_install(int vector, rt_isr_handler_t handler,
|
||||
* this function will reset CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_reset(void)
|
||||
RT_WEAK void rt_hw_cpu_reset(void)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -171,7 +171,7 @@ void rt_hw_cpu_reset(void)
|
||||
* this function will shutdown CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_shutdown()
|
||||
RT_WEAK void rt_hw_cpu_shutdown()
|
||||
{
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
* this function will reset CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_reset()
|
||||
RT_WEAK void rt_hw_cpu_reset()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ void rt_hw_cpu_reset()
|
||||
* this function will shutdown CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_shutdown()
|
||||
RT_WEAK void rt_hw_cpu_shutdown()
|
||||
{
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
/*@{*/
|
||||
|
||||
/** shutdown CPU */
|
||||
void rt_hw_cpu_shutdown()
|
||||
RT_WEAK void rt_hw_cpu_shutdown()
|
||||
{
|
||||
rt_uint32_t level;
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
||||
@@ -148,7 +148,7 @@ rt_base_t rt_hw_cpu_dcache_status()
|
||||
* reset cpu by dog's time-out
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_reset()
|
||||
RT_WEAK void rt_hw_cpu_reset()
|
||||
{
|
||||
/* Disable all interrupt except the WDT */
|
||||
INTMSK = (~((rt_uint32_t)1 << INTWDT));
|
||||
@@ -171,7 +171,7 @@ void rt_hw_cpu_reset()
|
||||
* shutdown CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_shutdown()
|
||||
RT_WEAK void rt_hw_cpu_shutdown()
|
||||
{
|
||||
rt_uint32_t level;
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
||||
@@ -100,7 +100,7 @@ rt_base_t rt_hw_cpu_dcache_status()
|
||||
* this function will reset CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_reset()
|
||||
RT_WEAK void rt_hw_cpu_reset()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ void rt_hw_cpu_reset()
|
||||
* this function will shutdown CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_shutdown()
|
||||
RT_WEAK void rt_hw_cpu_shutdown()
|
||||
{
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ rt_base_t rt_hw_cpu_dcache_status()
|
||||
* reset cpu by dog's time-out
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_reset()
|
||||
RT_WEAK void rt_hw_cpu_reset()
|
||||
{
|
||||
|
||||
/* enable watchdog */
|
||||
@@ -173,7 +173,7 @@ void rt_hw_cpu_reset()
|
||||
* shutdown CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_shutdown()
|
||||
RT_WEAK void rt_hw_cpu_shutdown()
|
||||
{
|
||||
rt_uint32_t UNUSED level;
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
* reset cpu by dog's time-out
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_reset()
|
||||
RT_WEAK void rt_hw_cpu_reset()
|
||||
{
|
||||
while (1); /* loop forever and wait for reset to happen */
|
||||
|
||||
@@ -27,7 +27,7 @@ void rt_hw_cpu_reset()
|
||||
* shutdown CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_shutdown()
|
||||
RT_WEAK void rt_hw_cpu_shutdown()
|
||||
{
|
||||
rt_uint32_t level;
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
* reset cpu by dog's time-out
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_reset()
|
||||
RT_WEAK void rt_hw_cpu_reset()
|
||||
{
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
* this function will reset CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_reset(void)
|
||||
RT_WEAK void rt_hw_cpu_reset(void)
|
||||
{
|
||||
/* open the watch-dog */
|
||||
WDT_EN = 0x01; /* watch dog enable */
|
||||
@@ -38,7 +38,7 @@ void rt_hw_cpu_reset(void)
|
||||
* this function will shutdown CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_shutdown(void)
|
||||
RT_WEAK void rt_hw_cpu_shutdown(void)
|
||||
{
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
* Date Author Notes
|
||||
* 2018/10/28 Bernard The unify RISC-V porting implementation
|
||||
* 2018/12/27 Jesven Add SMP support
|
||||
* 2020/11/20 BalanceTWK Add FPU support
|
||||
*/
|
||||
|
||||
#include "cpuport.h"
|
||||
@@ -72,6 +73,43 @@ rt_hw_context_switch:
|
||||
* mstatus.mie -> sp(2)
|
||||
* x(i) -> sp(i-4)
|
||||
*/
|
||||
#ifdef ARCH_RISCV_FPU
|
||||
addi sp, sp, -32 * FREGBYTES
|
||||
|
||||
FSTORE f0, 0 * FREGBYTES(sp)
|
||||
FSTORE f1, 1 * FREGBYTES(sp)
|
||||
FSTORE f2, 2 * FREGBYTES(sp)
|
||||
FSTORE f3, 3 * FREGBYTES(sp)
|
||||
FSTORE f4, 4 * FREGBYTES(sp)
|
||||
FSTORE f5, 5 * FREGBYTES(sp)
|
||||
FSTORE f6, 6 * FREGBYTES(sp)
|
||||
FSTORE f7, 7 * FREGBYTES(sp)
|
||||
FSTORE f8, 8 * FREGBYTES(sp)
|
||||
FSTORE f9, 9 * FREGBYTES(sp)
|
||||
FSTORE f10, 10 * FREGBYTES(sp)
|
||||
FSTORE f11, 11 * FREGBYTES(sp)
|
||||
FSTORE f12, 12 * FREGBYTES(sp)
|
||||
FSTORE f13, 13 * FREGBYTES(sp)
|
||||
FSTORE f14, 14 * FREGBYTES(sp)
|
||||
FSTORE f15, 15 * FREGBYTES(sp)
|
||||
FSTORE f16, 16 * FREGBYTES(sp)
|
||||
FSTORE f17, 17 * FREGBYTES(sp)
|
||||
FSTORE f18, 18 * FREGBYTES(sp)
|
||||
FSTORE f19, 19 * FREGBYTES(sp)
|
||||
FSTORE f20, 20 * FREGBYTES(sp)
|
||||
FSTORE f21, 21 * FREGBYTES(sp)
|
||||
FSTORE f22, 22 * FREGBYTES(sp)
|
||||
FSTORE f23, 23 * FREGBYTES(sp)
|
||||
FSTORE f24, 24 * FREGBYTES(sp)
|
||||
FSTORE f25, 25 * FREGBYTES(sp)
|
||||
FSTORE f26, 26 * FREGBYTES(sp)
|
||||
FSTORE f27, 27 * FREGBYTES(sp)
|
||||
FSTORE f28, 28 * FREGBYTES(sp)
|
||||
FSTORE f29, 29 * FREGBYTES(sp)
|
||||
FSTORE f30, 30 * FREGBYTES(sp)
|
||||
FSTORE f31, 31 * FREGBYTES(sp)
|
||||
|
||||
#endif
|
||||
addi sp, sp, -32 * REGBYTES
|
||||
STORE sp, (a0)
|
||||
|
||||
@@ -174,7 +212,7 @@ rt_hw_context_switch_exit:
|
||||
|
||||
LOAD x1, 1 * REGBYTES(sp)
|
||||
|
||||
li t0, 0x00001800
|
||||
li t0, 0x00007800
|
||||
csrw mstatus, t0
|
||||
LOAD a0, 2 * REGBYTES(sp)
|
||||
csrs mstatus, a0
|
||||
@@ -209,4 +247,42 @@ rt_hw_context_switch_exit:
|
||||
LOAD x31, 31 * REGBYTES(sp)
|
||||
|
||||
addi sp, sp, 32 * REGBYTES
|
||||
|
||||
#ifdef ARCH_RISCV_FPU
|
||||
FLOAD f0, 0 * FREGBYTES(sp)
|
||||
FLOAD f1, 1 * FREGBYTES(sp)
|
||||
FLOAD f2, 2 * FREGBYTES(sp)
|
||||
FLOAD f3, 3 * FREGBYTES(sp)
|
||||
FLOAD f4, 4 * FREGBYTES(sp)
|
||||
FLOAD f5, 5 * FREGBYTES(sp)
|
||||
FLOAD f6, 6 * FREGBYTES(sp)
|
||||
FLOAD f7, 7 * FREGBYTES(sp)
|
||||
FLOAD f8, 8 * FREGBYTES(sp)
|
||||
FLOAD f9, 9 * FREGBYTES(sp)
|
||||
FLOAD f10, 10 * FREGBYTES(sp)
|
||||
FLOAD f11, 11 * FREGBYTES(sp)
|
||||
FLOAD f12, 12 * FREGBYTES(sp)
|
||||
FLOAD f13, 13 * FREGBYTES(sp)
|
||||
FLOAD f14, 14 * FREGBYTES(sp)
|
||||
FLOAD f15, 15 * FREGBYTES(sp)
|
||||
FLOAD f16, 16 * FREGBYTES(sp)
|
||||
FLOAD f17, 17 * FREGBYTES(sp)
|
||||
FLOAD f18, 18 * FREGBYTES(sp)
|
||||
FLOAD f19, 19 * FREGBYTES(sp)
|
||||
FLOAD f20, 20 * FREGBYTES(sp)
|
||||
FLOAD f21, 21 * FREGBYTES(sp)
|
||||
FLOAD f22, 22 * FREGBYTES(sp)
|
||||
FLOAD f23, 23 * FREGBYTES(sp)
|
||||
FLOAD f24, 24 * FREGBYTES(sp)
|
||||
FLOAD f25, 25 * FREGBYTES(sp)
|
||||
FLOAD f26, 26 * FREGBYTES(sp)
|
||||
FLOAD f27, 27 * FREGBYTES(sp)
|
||||
FLOAD f28, 28 * FREGBYTES(sp)
|
||||
FLOAD f29, 29 * FREGBYTES(sp)
|
||||
FLOAD f30, 30 * FREGBYTES(sp)
|
||||
FLOAD f31, 31 * FREGBYTES(sp)
|
||||
|
||||
addi sp, sp, 32 * FREGBYTES
|
||||
#endif
|
||||
|
||||
mret
|
||||
@@ -6,6 +6,7 @@
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2018/10/28 Bernard The unify RISC-V porting code.
|
||||
* 2020/11/20 BalanceTWK Add FPU support
|
||||
*/
|
||||
|
||||
#include <rthw.h>
|
||||
@@ -53,6 +54,40 @@ struct rt_hw_stack_frame
|
||||
rt_ubase_t t4; /* x29 - t4 - temporary register 4 */
|
||||
rt_ubase_t t5; /* x30 - t5 - temporary register 5 */
|
||||
rt_ubase_t t6; /* x31 - t6 - temporary register 6 */
|
||||
#ifdef ARCH_RISCV_FPU
|
||||
rv_floatreg_t f0; /* f0 */
|
||||
rv_floatreg_t f1; /* f1 */
|
||||
rv_floatreg_t f2; /* f2 */
|
||||
rv_floatreg_t f3; /* f3 */
|
||||
rv_floatreg_t f4; /* f4 */
|
||||
rv_floatreg_t f5; /* f5 */
|
||||
rv_floatreg_t f6; /* f6 */
|
||||
rv_floatreg_t f7; /* f7 */
|
||||
rv_floatreg_t f8; /* f8 */
|
||||
rv_floatreg_t f9; /* f9 */
|
||||
rv_floatreg_t f10; /* f10 */
|
||||
rv_floatreg_t f11; /* f11 */
|
||||
rv_floatreg_t f12; /* f12 */
|
||||
rv_floatreg_t f13; /* f13 */
|
||||
rv_floatreg_t f14; /* f14 */
|
||||
rv_floatreg_t f15; /* f15 */
|
||||
rv_floatreg_t f16; /* f16 */
|
||||
rv_floatreg_t f17; /* f17 */
|
||||
rv_floatreg_t f18; /* f18 */
|
||||
rv_floatreg_t f19; /* f19 */
|
||||
rv_floatreg_t f20; /* f20 */
|
||||
rv_floatreg_t f21; /* f21 */
|
||||
rv_floatreg_t f22; /* f22 */
|
||||
rv_floatreg_t f23; /* f23 */
|
||||
rv_floatreg_t f24; /* f24 */
|
||||
rv_floatreg_t f25; /* f25 */
|
||||
rv_floatreg_t f26; /* f26 */
|
||||
rv_floatreg_t f27; /* f27 */
|
||||
rv_floatreg_t f28; /* f28 */
|
||||
rv_floatreg_t f29; /* f29 */
|
||||
rv_floatreg_t f30; /* f30 */
|
||||
rv_floatreg_t f31; /* f31 */
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -116,7 +151,7 @@ void rt_hw_context_switch_interrupt(rt_ubase_t from, rt_ubase_t to)
|
||||
#endif /* end of RT_USING_SMP */
|
||||
|
||||
/** shutdown CPU */
|
||||
void rt_hw_cpu_shutdown()
|
||||
RT_WEAK void rt_hw_cpu_shutdown()
|
||||
{
|
||||
rt_uint32_t level;
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2018-10-03 Bernard The first version
|
||||
* 2020/11/20 BalanceTWK Add FPU support
|
||||
*/
|
||||
|
||||
#ifndef CPUPORT_H__
|
||||
@@ -24,4 +25,19 @@
|
||||
#define REGBYTES 4
|
||||
#endif
|
||||
|
||||
#ifdef ARCH_RISCV_FPU
|
||||
#ifdef ARCH_RISCV_FPU_D
|
||||
#define FSTORE fsd
|
||||
#define FLOAD fld
|
||||
#define FREGBYTES 8
|
||||
#define rv_floatreg_t rt_int64_t
|
||||
#endif
|
||||
#ifdef ARCH_RISCV_FPU_S
|
||||
#define FSTORE fsw
|
||||
#define FLOAD flw
|
||||
#define FREGBYTES 4
|
||||
#define rv_floatreg_t rt_int32_t
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -15,6 +15,43 @@
|
||||
.align 2
|
||||
.global trap_entry
|
||||
trap_entry:
|
||||
#ifdef ARCH_RISCV_FPU
|
||||
addi sp, sp, -32 * FREGBYTES
|
||||
|
||||
FSTORE f0, 0 * FREGBYTES(sp)
|
||||
FSTORE f1, 1 * FREGBYTES(sp)
|
||||
FSTORE f2, 2 * FREGBYTES(sp)
|
||||
FSTORE f3, 3 * FREGBYTES(sp)
|
||||
FSTORE f4, 4 * FREGBYTES(sp)
|
||||
FSTORE f5, 5 * FREGBYTES(sp)
|
||||
FSTORE f6, 6 * FREGBYTES(sp)
|
||||
FSTORE f7, 7 * FREGBYTES(sp)
|
||||
FSTORE f8, 8 * FREGBYTES(sp)
|
||||
FSTORE f9, 9 * FREGBYTES(sp)
|
||||
FSTORE f10, 10 * FREGBYTES(sp)
|
||||
FSTORE f11, 11 * FREGBYTES(sp)
|
||||
FSTORE f12, 12 * FREGBYTES(sp)
|
||||
FSTORE f13, 13 * FREGBYTES(sp)
|
||||
FSTORE f14, 14 * FREGBYTES(sp)
|
||||
FSTORE f15, 15 * FREGBYTES(sp)
|
||||
FSTORE f16, 16 * FREGBYTES(sp)
|
||||
FSTORE f17, 17 * FREGBYTES(sp)
|
||||
FSTORE f18, 18 * FREGBYTES(sp)
|
||||
FSTORE f19, 19 * FREGBYTES(sp)
|
||||
FSTORE f20, 20 * FREGBYTES(sp)
|
||||
FSTORE f21, 21 * FREGBYTES(sp)
|
||||
FSTORE f22, 22 * FREGBYTES(sp)
|
||||
FSTORE f23, 23 * FREGBYTES(sp)
|
||||
FSTORE f24, 24 * FREGBYTES(sp)
|
||||
FSTORE f25, 25 * FREGBYTES(sp)
|
||||
FSTORE f26, 26 * FREGBYTES(sp)
|
||||
FSTORE f27, 27 * FREGBYTES(sp)
|
||||
FSTORE f28, 28 * FREGBYTES(sp)
|
||||
FSTORE f29, 29 * FREGBYTES(sp)
|
||||
FSTORE f30, 30 * FREGBYTES(sp)
|
||||
FSTORE f31, 31 * FREGBYTES(sp)
|
||||
|
||||
#endif
|
||||
|
||||
/* save thread context to thread stack */
|
||||
addi sp, sp, -32 * REGBYTES
|
||||
|
||||
@@ -67,38 +67,38 @@ _start:
|
||||
csrs mstatus, t0
|
||||
|
||||
fssr x0
|
||||
fmv.d.x f0, x0
|
||||
fmv.d.x f1, x0
|
||||
fmv.d.x f2, x0
|
||||
fmv.d.x f3, x0
|
||||
fmv.d.x f4, x0
|
||||
fmv.d.x f5, x0
|
||||
fmv.d.x f6, x0
|
||||
fmv.d.x f7, x0
|
||||
fmv.d.x f8, x0
|
||||
fmv.d.x f9, x0
|
||||
fmv.d.x f10,x0
|
||||
fmv.d.x f11,x0
|
||||
fmv.d.x f12,x0
|
||||
fmv.d.x f13,x0
|
||||
fmv.d.x f14,x0
|
||||
fmv.d.x f15,x0
|
||||
fmv.d.x f16,x0
|
||||
fmv.d.x f17,x0
|
||||
fmv.d.x f18,x0
|
||||
fmv.d.x f19,x0
|
||||
fmv.d.x f20,x0
|
||||
fmv.d.x f21,x0
|
||||
fmv.d.x f22,x0
|
||||
fmv.d.x f23,x0
|
||||
fmv.d.x f24,x0
|
||||
fmv.d.x f25,x0
|
||||
fmv.d.x f26,x0
|
||||
fmv.d.x f27,x0
|
||||
fmv.d.x f28,x0
|
||||
fmv.d.x f29,x0
|
||||
fmv.d.x f30,x0
|
||||
fmv.d.x f31,x0
|
||||
fmv.w.x f0, x0
|
||||
fmv.w.x f1, x0
|
||||
fmv.w.x f2, x0
|
||||
fmv.w.x f3, x0
|
||||
fmv.w.x f4, x0
|
||||
fmv.w.x f5, x0
|
||||
fmv.w.x f6, x0
|
||||
fmv.w.x f7, x0
|
||||
fmv.w.x f8, x0
|
||||
fmv.w.x f9, x0
|
||||
fmv.w.x f10,x0
|
||||
fmv.w.x f11,x0
|
||||
fmv.w.x f12,x0
|
||||
fmv.w.x f13,x0
|
||||
fmv.w.x f14,x0
|
||||
fmv.w.x f15,x0
|
||||
fmv.w.x f16,x0
|
||||
fmv.w.x f17,x0
|
||||
fmv.w.x f18,x0
|
||||
fmv.w.x f19,x0
|
||||
fmv.w.x f20,x0
|
||||
fmv.w.x f21,x0
|
||||
fmv.w.x f22,x0
|
||||
fmv.w.x f23,x0
|
||||
fmv.w.x f24,x0
|
||||
fmv.w.x f25,x0
|
||||
fmv.w.x f26,x0
|
||||
fmv.w.x f27,x0
|
||||
fmv.w.x f28,x0
|
||||
fmv.w.x f29,x0
|
||||
fmv.w.x f30,x0
|
||||
fmv.w.x f31,x0
|
||||
|
||||
.option push
|
||||
.option norelax
|
||||
|
||||
@@ -152,7 +152,7 @@ void rt_hw_context_switch(rt_ubase_t from, rt_ubase_t to)
|
||||
* @brief shutdown CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_shutdown()
|
||||
RT_WEAK void rt_hw_cpu_shutdown()
|
||||
{
|
||||
rt_uint32_t level;
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
||||
@@ -157,7 +157,7 @@ void rt_hw_interrupt_enable(rt_base_t level)
|
||||
}
|
||||
|
||||
/** shutdown CPU */
|
||||
void rt_hw_cpu_shutdown()
|
||||
RT_WEAK void rt_hw_cpu_shutdown()
|
||||
{
|
||||
rt_uint32_t level;
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
||||
+1
-1
@@ -182,7 +182,7 @@ void rt_hw_context_switch_interrupt(rt_uint32_t from, rt_uint32_t to)
|
||||
*
|
||||
* @author LXZ (2014/11/8)
|
||||
*/
|
||||
void rt_hw_cpu_shutdown(void)
|
||||
RT_WEAK void rt_hw_cpu_shutdown(void)
|
||||
{
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@ int __rt_ffs(int value)
|
||||
/**
|
||||
* shutdown CPU
|
||||
*/
|
||||
void rt_hw_cpu_shutdown(void)
|
||||
RT_WEAK void rt_hw_cpu_shutdown(void)
|
||||
{
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
||||
|
||||
@@ -259,7 +259,7 @@ static void sep6200_poweroff(void)
|
||||
* reset cpu by dog's time-out
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_reset()
|
||||
RT_WEAK void rt_hw_cpu_reset()
|
||||
{
|
||||
|
||||
rt_kprintf("Soft reset, Restarting system...\n");
|
||||
@@ -274,7 +274,7 @@ void rt_hw_cpu_reset()
|
||||
* shutdown CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_shutdown()
|
||||
RT_WEAK void rt_hw_cpu_shutdown()
|
||||
{
|
||||
rt_uint32_t level;
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
* this function will reset CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_reset()
|
||||
RT_WEAK void rt_hw_cpu_reset()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ void rt_hw_cpu_reset()
|
||||
* this function will shutdown CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_shutdown()
|
||||
RT_WEAK void rt_hw_cpu_shutdown()
|
||||
{
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
||||
|
||||
-11
@@ -24,17 +24,6 @@
|
||||
static rt_tick_t rt_tick = 0;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* This function will initialize system tick and set it to zero.
|
||||
* @ingroup SystemInit
|
||||
*
|
||||
* @deprecated since 1.1.0, this function does not need to be invoked
|
||||
* in the system initialization.
|
||||
*/
|
||||
void rt_system_tick_init(void)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @addtogroup Clock
|
||||
*/
|
||||
|
||||
Loaded 100 of 101 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user