diff --git a/bsp/nrf52832/.config b/bsp/nrf52832/.config
new file mode 100644
index 0000000000000000000000000000000000000000..3ada49b6d33484b27e715ac789e1c850257086b2
--- /dev/null
+++ b/bsp/nrf52832/.config
@@ -0,0 +1,351 @@
+#
+# Automatically generated file; DO NOT EDIT.
+# RT-Thread Project Configuration
+#
+
+#
+# RT-Thread Kernel
+#
+CONFIG_RT_NAME_MAX=8
+# CONFIG_RT_USING_ARCH_DATA_TYPE is not set
+# CONFIG_RT_USING_SMP is not set
+CONFIG_RT_ALIGN_SIZE=4
+# CONFIG_RT_THREAD_PRIORITY_8 is not set
+CONFIG_RT_THREAD_PRIORITY_32=y
+# CONFIG_RT_THREAD_PRIORITY_256 is not set
+CONFIG_RT_THREAD_PRIORITY_MAX=32
+CONFIG_RT_TICK_PER_SECOND=100
+CONFIG_RT_USING_OVERFLOW_CHECK=y
+CONFIG_RT_USING_HOOK=y
+CONFIG_RT_USING_IDLE_HOOK=y
+CONFIG_RT_IDEL_HOOK_LIST_SIZE=4
+CONFIG_IDLE_THREAD_STACK_SIZE=256
+CONFIG_RT_USING_TIMER_SOFT=y
+CONFIG_RT_TIMER_THREAD_PRIO=4
+CONFIG_RT_TIMER_THREAD_STACK_SIZE=512
+CONFIG_RT_DEBUG=y
+# CONFIG_RT_DEBUG_COLOR is not set
+# CONFIG_RT_DEBUG_INIT_CONFIG is not set
+# CONFIG_RT_DEBUG_THREAD_CONFIG is not set
+# CONFIG_RT_DEBUG_SCHEDULER_CONFIG is not set
+# CONFIG_RT_DEBUG_IPC_CONFIG is not set
+# CONFIG_RT_DEBUG_TIMER_CONFIG is not set
+# CONFIG_RT_DEBUG_IRQ_CONFIG is not set
+# CONFIG_RT_DEBUG_MEM_CONFIG is not set
+# CONFIG_RT_DEBUG_SLAB_CONFIG is not set
+# CONFIG_RT_DEBUG_MEMHEAP_CONFIG is not set
+# CONFIG_RT_DEBUG_MODULE_CONFIG is not set
+
+#
+# Inter-Thread communication
+#
+CONFIG_RT_USING_SEMAPHORE=y
+CONFIG_RT_USING_MUTEX=y
+CONFIG_RT_USING_EVENT=y
+CONFIG_RT_USING_MAILBOX=y
+CONFIG_RT_USING_MESSAGEQUEUE=y
+# CONFIG_RT_USING_SIGNALS is not set
+
+#
+# Memory Management
+#
+CONFIG_RT_USING_MEMPOOL=y
+# CONFIG_RT_USING_MEMHEAP is not set
+# CONFIG_RT_USING_NOHEAP is not set
+CONFIG_RT_USING_SMALL_MEM=y
+# CONFIG_RT_USING_SLAB is not set
+# CONFIG_RT_USING_MEMTRACE is not set
+CONFIG_RT_USING_HEAP=y
+
+#
+# Kernel Device Object
+#
+CONFIG_RT_USING_DEVICE=y
+# CONFIG_RT_USING_DEVICE_OPS is not set
+# CONFIG_RT_USING_INTERRUPT_INFO is not set
+CONFIG_RT_USING_CONSOLE=y
+CONFIG_RT_CONSOLEBUF_SIZE=128
+CONFIG_RT_CONSOLE_DEVICE_NAME="uart0"
+CONFIG_RT_VER_NUM=0x40002
+# CONFIG_RT_USING_CPU_FFS is not set
+# CONFIG_ARCH_CPU_STACK_GROWS_UPWARD is not set
+
+#
+# RT-Thread Components
+#
+CONFIG_RT_USING_COMPONENTS_INIT=y
+# CONFIG_RT_USING_USER_MAIN is not set
+
+#
+# C++ features
+#
+# CONFIG_RT_USING_CPLUSPLUS is not set
+
+#
+# Command shell
+#
+CONFIG_RT_USING_FINSH=y
+CONFIG_FINSH_THREAD_NAME="tshell"
+CONFIG_FINSH_USING_HISTORY=y
+CONFIG_FINSH_HISTORY_LINES=5
+CONFIG_FINSH_USING_SYMTAB=y
+CONFIG_FINSH_USING_DESCRIPTION=y
+# CONFIG_FINSH_ECHO_DISABLE_DEFAULT is not set
+CONFIG_FINSH_THREAD_PRIORITY=20
+CONFIG_FINSH_THREAD_STACK_SIZE=4096
+CONFIG_FINSH_CMD_SIZE=80
+# CONFIG_FINSH_USING_AUTH is not set
+CONFIG_FINSH_USING_MSH=y
+CONFIG_FINSH_USING_MSH_DEFAULT=y
+CONFIG_FINSH_USING_MSH_ONLY=y
+CONFIG_FINSH_ARG_MAX=10
+
+#
+# Device virtual file system
+#
+# CONFIG_RT_USING_DFS is not set
+
+#
+# Device Drivers
+#
+CONFIG_RT_USING_DEVICE_IPC=y
+CONFIG_RT_PIPE_BUFSZ=512
+# CONFIG_RT_USING_SYSTEM_WORKQUEUE is not set
+CONFIG_RT_USING_SERIAL=y
+CONFIG_RT_SERIAL_USING_DMA=y
+CONFIG_RT_SERIAL_RB_BUFSZ=64
+# CONFIG_RT_USING_CAN is not set
+# CONFIG_RT_USING_HWTIMER is not set
+# CONFIG_RT_USING_CPUTIME is not set
+# CONFIG_RT_USING_I2C is not set
+CONFIG_RT_USING_PIN=y
+# CONFIG_RT_USING_ADC is not set
+# CONFIG_RT_USING_PWM is not set
+# CONFIG_RT_USING_MTD_NOR is not set
+# CONFIG_RT_USING_MTD_NAND is not set
+# CONFIG_RT_USING_PM is not set
+# CONFIG_RT_USING_RTC is not set
+# CONFIG_RT_USING_SDIO is not set
+# CONFIG_RT_USING_SPI is not set
+# CONFIG_RT_USING_WDT is not set
+# CONFIG_RT_USING_AUDIO is not set
+# CONFIG_RT_USING_SENSOR is not set
+# CONFIG_RT_USING_TOUCH is not set
+
+#
+# Using Hardware Crypto drivers
+#
+# CONFIG_RT_USING_HWCRYPTO is not set
+
+#
+# Using WiFi
+#
+# CONFIG_RT_USING_WIFI is not set
+
+#
+# Using USB
+#
+# CONFIG_RT_USING_USB_HOST is not set
+# CONFIG_RT_USING_USB_DEVICE is not set
+
+#
+# POSIX layer and C standard library
+#
+CONFIG_RT_USING_LIBC=y
+# CONFIG_RT_USING_PTHREADS is not set
+
+#
+# Network
+#
+
+#
+# Socket abstraction layer
+#
+# CONFIG_RT_USING_SAL is not set
+
+#
+# Network interface device
+#
+# CONFIG_RT_USING_NETDEV is not set
+
+#
+# light weight TCP/IP stack
+#
+# CONFIG_RT_USING_LWIP is not set
+
+#
+# AT commands
+#
+# CONFIG_RT_USING_AT is not set
+
+#
+# VBUS(Virtual Software BUS)
+#
+# CONFIG_RT_USING_VBUS is not set
+
+#
+# Utilities
+#
+# CONFIG_RT_USING_RYM is not set
+# CONFIG_RT_USING_ULOG is not set
+# CONFIG_RT_USING_UTEST is not set
+
+#
+# RT-Thread online packages
+#
+
+#
+# IoT - internet of things
+#
+# CONFIG_PKG_USING_PAHOMQTT is not set
+# CONFIG_PKG_USING_WEBCLIENT is not set
+# CONFIG_PKG_USING_WEBNET is not set
+# CONFIG_PKG_USING_MONGOOSE is not set
+# CONFIG_PKG_USING_WEBTERMINAL is not set
+# CONFIG_PKG_USING_CJSON is not set
+# CONFIG_PKG_USING_JSMN is not set
+# CONFIG_PKG_USING_LIBMODBUS is not set
+# CONFIG_PKG_USING_FREEMODBUS is not set
+# CONFIG_PKG_USING_LJSON is not set
+# CONFIG_PKG_USING_EZXML is not set
+# CONFIG_PKG_USING_NANOPB is not set
+
+#
+# Wi-Fi
+#
+
+#
+# Marvell WiFi
+#
+# CONFIG_PKG_USING_WLANMARVELL is not set
+
+#
+# Wiced WiFi
+#
+# CONFIG_PKG_USING_WLAN_WICED is not set
+# CONFIG_PKG_USING_RW007 is not set
+# CONFIG_PKG_USING_COAP is not set
+# CONFIG_PKG_USING_NOPOLL is not set
+# CONFIG_PKG_USING_NETUTILS is not set
+# CONFIG_PKG_USING_AT_DEVICE is not set
+# CONFIG_PKG_USING_ATSRV_SOCKET is not set
+# CONFIG_PKG_USING_WIZNET is not set
+
+#
+# IoT Cloud
+#
+# CONFIG_PKG_USING_ONENET is not set
+# CONFIG_PKG_USING_GAGENT_CLOUD is not set
+# CONFIG_PKG_USING_ALI_IOTKIT is not set
+# CONFIG_PKG_USING_AZURE is not set
+# CONFIG_PKG_USING_TENCENT_IOTHUB is not set
+# CONFIG_PKG_USING_NIMBLE is not set
+# CONFIG_PKG_USING_OTA_DOWNLOADER is not set
+# CONFIG_PKG_USING_IPMSG is not set
+# CONFIG_PKG_USING_LSSDP is not set
+# CONFIG_PKG_USING_AIRKISS_OPEN is not set
+# CONFIG_PKG_USING_LIBRWS is not set
+
+#
+# security packages
+#
+# CONFIG_PKG_USING_MBEDTLS is not set
+# CONFIG_PKG_USING_libsodium is not set
+# CONFIG_PKG_USING_TINYCRYPT is not set
+
+#
+# language packages
+#
+# CONFIG_PKG_USING_LUA is not set
+# CONFIG_PKG_USING_JERRYSCRIPT is not set
+# CONFIG_PKG_USING_MICROPYTHON is not set
+
+#
+# multimedia packages
+#
+# CONFIG_PKG_USING_OPENMV is not set
+# CONFIG_PKG_USING_MUPDF is not set
+# CONFIG_PKG_USING_STEMWIN is not set
+
+#
+# tools packages
+#
+# CONFIG_PKG_USING_CMBACKTRACE is not set
+# CONFIG_PKG_USING_EASYFLASH is not set
+# CONFIG_PKG_USING_EASYLOGGER is not set
+# CONFIG_PKG_USING_SYSTEMVIEW is not set
+# CONFIG_PKG_USING_RDB is not set
+# CONFIG_PKG_USING_QRCODE is not set
+# CONFIG_PKG_USING_ULOG_EASYFLASH is not set
+# CONFIG_PKG_USING_ADBD is not set
+
+#
+# system packages
+#
+# CONFIG_PKG_USING_GUIENGINE is not set
+# CONFIG_PKG_USING_CAIRO is not set
+# CONFIG_PKG_USING_PIXMAN is not set
+# CONFIG_PKG_USING_LWEXT4 is not set
+# CONFIG_PKG_USING_PARTITION is not set
+# CONFIG_PKG_USING_FAL is not set
+# CONFIG_PKG_USING_SQLITE is not set
+# CONFIG_PKG_USING_RTI is not set
+# CONFIG_PKG_USING_LITTLEVGL2RTT is not set
+# CONFIG_PKG_USING_CMSIS is not set
+# CONFIG_PKG_USING_DFS_YAFFS is not set
+# CONFIG_PKG_USING_LITTLEFS is not set
+# CONFIG_PKG_USING_THREAD_POOL is not set
+
+#
+# peripheral libraries and drivers
+#
+# CONFIG_PKG_USING_SENSORS_DRIVERS is not set
+# CONFIG_PKG_USING_REALTEK_AMEBA is not set
+# CONFIG_PKG_USING_SHT2X is not set
+# CONFIG_PKG_USING_STM32_SDIO is not set
+# CONFIG_PKG_USING_ICM20608 is not set
+# CONFIG_PKG_USING_U8G2 is not set
+# CONFIG_PKG_USING_BUTTON is not set
+# CONFIG_PKG_USING_PCF8574 is not set
+# CONFIG_PKG_USING_SX12XX is not set
+# CONFIG_PKG_USING_SIGNAL_LED is not set
+# CONFIG_PKG_USING_LEDBLINK is not set
+# CONFIG_PKG_USING_WM_LIBRARIES is not set
+# CONFIG_PKG_USING_KENDRYTE_SDK is not set
+# CONFIG_PKG_USING_INFRARED is not set
+# CONFIG_PKG_USING_ROSSERIAL is not set
+# CONFIG_PKG_USING_AT24CXX is not set
+# CONFIG_PKG_USING_MOTIONDRIVER2RTT is not set
+# CONFIG_PKG_USING_AD7746 is not set
+# CONFIG_PKG_USING_PCA9685 is not set
+# CONFIG_PKG_USING_I2C_TOOLS is not set
+# CONFIG_PKG_USING_NRF24L01 is not set
+# CONFIG_PKG_USING_TOUCH_DRIVERS is not set
+
+#
+# miscellaneous packages
+#
+# CONFIG_PKG_USING_LIBCSV is not set
+# CONFIG_PKG_USING_OPTPARSE is not set
+# CONFIG_PKG_USING_FASTLZ is not set
+# CONFIG_PKG_USING_MINILZO is not set
+# CONFIG_PKG_USING_QUICKLZ is not set
+# CONFIG_PKG_USING_MULTIBUTTON is not set
+# CONFIG_PKG_USING_CANFESTIVAL is not set
+# CONFIG_PKG_USING_ZLIB is not set
+# CONFIG_PKG_USING_DSTR is not set
+# CONFIG_PKG_USING_TINYFRAME is not set
+# CONFIG_PKG_USING_KENDRYTE_DEMO is not set
+# CONFIG_PKG_USING_DIGITALCTRL is not set
+
+#
+# samples: kernel and components samples
+#
+# CONFIG_PKG_USING_KERNEL_SAMPLES is not set
+# CONFIG_PKG_USING_FILESYSTEM_SAMPLES is not set
+# CONFIG_PKG_USING_NETWORK_SAMPLES is not set
+# CONFIG_PKG_USING_PERIPHERAL_SAMPLES is not set
+# CONFIG_PKG_USING_HELLO is not set
+# CONFIG_PKG_USING_VI is not set
+# CONFIG_PKG_USING_NNOM is not set
+# CONFIG_PKG_USING_LIBANN is not set
diff --git a/bsp/nrf52832/project.uvoptx b/bsp/nrf52832/project.uvoptx
index c5b3cf02463e088c21e52ee5830a3856e251a453..163e799d90b3695629d06e4e0df4505909dbaac8 100644
--- a/bsp/nrf52832/project.uvoptx
+++ b/bsp/nrf52832/project.uvoptx
@@ -73,7 +73,7 @@
0
- 1
+ 0
0
1
@@ -101,7 +101,9 @@
0
0
1
- 3
+ 0
+ 0
+ 4
@@ -165,6 +167,10 @@
+
+
+
+
@@ -358,7 +364,7 @@
Applications
- 1
+ 0
0
0
0
@@ -402,7 +408,7 @@
Board
- 1
+ 0
0
0
0
@@ -434,7 +440,7 @@
BLE_STACK
- 1
+ 0
0
0
0
@@ -538,7 +544,7 @@
Startup
- 1
+ 0
0
0
0
@@ -1032,4 +1038,72 @@
+
+ libc
+ 0
+ 0
+ 0
+ 0
+
+ 10
+ 67
+ 1
+ 0
+ 0
+ 0
+ ..\..\components\libc\compilers\armlibc\libc.c
+ libc.c
+ 0
+ 0
+
+
+ 10
+ 68
+ 1
+ 0
+ 0
+ 0
+ ..\..\components\libc\compilers\armlibc\mem_std.c
+ mem_std.c
+ 0
+ 0
+
+
+ 10
+ 69
+ 1
+ 0
+ 0
+ 0
+ ..\..\components\libc\compilers\armlibc\stubs.c
+ stubs.c
+ 0
+ 0
+
+
+ 10
+ 70
+ 1
+ 0
+ 0
+ 0
+ ..\..\components\libc\compilers\armlibc\time.c
+ time.c
+ 0
+ 0
+
+
+ 10
+ 71
+ 1
+ 0
+ 0
+ 0
+ ..\..\components\libc\compilers\common\gmtime_r.c
+ gmtime_r.c
+ 0
+ 0
+
+
+
diff --git a/bsp/nrf52832/project.uvprojx b/bsp/nrf52832/project.uvprojx
index 4f1745de946448fbbe00558ca665caf72ee6f230..c3fff8b5f48ac0c1ffc5b36f6c409b993593443f 100644
--- a/bsp/nrf52832/project.uvprojx
+++ b/bsp/nrf52832/project.uvprojx
@@ -10,12 +10,13 @@
rtthread
0x4
ARM-ADS
- 5060422::V5.06 update 4 (build 422)::ARMCC
+ 5060750::V5.06 update 6 (build 750)::ARMCC
+ 0
nRF52832_xxAA
Nordic Semiconductor
- NordicSemiconductor.nRF_DeviceFamilyPack.8.17.0
+ NordicSemiconductor.nRF_DeviceFamilyPack.8.24.1
http://developer.nordicsemi.com/nRF5_SDK/pieces/nRF_DeviceFamilyPack/
IRAM(0x20000000,0x10000) IROM(0x00000000,0x80000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ELITTLE
@@ -183,10 +184,11 @@
0
0
2
+ 0
0
0
8
- 1
+ 0
0
0
0
@@ -323,6 +325,7 @@
0
0
1
+ 0
0
1
1
@@ -333,9 +336,9 @@
0
--reduce_paths
- NRF52_PAN_55, NRF52_PAN_12, NRF52_PAN_15, NRF52_PAN_58, SWI_DISABLE0, SOFTDEVICE_PRESENT, NRF52_PAN_54, NRF52, BLE_STACK_SUPPORT_REQD, NRF52_PAN_51, NRF52_PAN_36, RTTHREAD, CONFIG_GPIO_AS_PINRESET, NRF52_PAN_64, NRF52_PAN_20, NRF52_PAN_74, NRF52832_XXAA, S132, NRF_SD_BLE_API_VERSION=4, NRF52_PAN_31
+ NRF52_PAN_55, NRF52_PAN_12, NRF52_PAN_15, NRF52_PAN_58, SWI_DISABLE0, SOFTDEVICE_PRESENT, NRF52_PAN_54, NRF52, BLE_STACK_SUPPORT_REQD, NRF52_PAN_51, NRF52_PAN_36, RTTHREAD, CONFIG_GPIO_AS_PINRESET, NRF52_PAN_64, NRF52_PAN_20, NRF52_PAN_74, NRF52832_XXAA, S132, NRF_SD_BLE_API_VERSION=4, NRF52_PAN_31, RT_USING_ARM_LIBC
- .;..\..\include;applications;.;board;nRF5_SDK_13.0.0_04a0bfd\components;nRF5_SDK_13.0.0_04a0bfd\components\softdevice\common\softdevice_handler;nRF5_SDK_13.0.0_04a0bfd\components\softdevice\s132\headers;nRF5_SDK_13.0.0_04a0bfd\components\softdevice\s132\headers\nrf52;nRF5_SDK_13.0.0_04a0bfd\components\ble\common;nRF5_SDK_13.0.0_04a0bfd\components\ble\nrf_ble_gatt;nRF5_SDK_13.0.0_04a0bfd\components\ble\ble_advertising;nRF5_SDK_13.0.0_04a0bfd\components\ble\ble_services\ble_nus;startups;nRF5_SDK_13.0.0_04a0bfd\components;nRF5_SDK_13.0.0_04a0bfd\components\device;nRF5_SDK_13.0.0_04a0bfd\components\drivers_nrf\delay;nRF5_SDK_13.0.0_04a0bfd\components\drivers_nrf\uart;nRF5_SDK_13.0.0_04a0bfd\components\drivers_nrf\clock;nRF5_SDK_13.0.0_04a0bfd\components\drivers_nrf\gpiote;nRF5_SDK_13.0.0_04a0bfd\components\drivers_nrf\common;nRF5_SDK_13.0.0_04a0bfd\components\drivers_nrf\hal;nRF5_SDK_13.0.0_04a0bfd\components\drivers_nrf\pwm;nRF5_SDK_13.0.0_04a0bfd\components\drivers_nrf\saadc;nRF5_SDK_13.0.0_04a0bfd\components\libraries\util;nRF5_SDK_13.0.0_04a0bfd\components\libraries\timer;nRF5_SDK_13.0.0_04a0bfd\components\libraries\fstorage;nRF5_SDK_13.0.0_04a0bfd\components\libraries\experimental_section_vars;nRF5_SDK_13.0.0_04a0bfd\components\libraries\log;nRF5_SDK_13.0.0_04a0bfd\components\libraries\log\src;nRF5_SDK_13.0.0_04a0bfd\components\libraries\strerror;nRF5_SDK_13.0.0_04a0bfd\components\toolchain\cmsis\include;..\..\libcpu\arm\common;..\..\libcpu\arm\cortex-m4;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\finsh
+ .;..\..\include;applications;.;board;nRF5_SDK_13.0.0_04a0bfd\components;nRF5_SDK_13.0.0_04a0bfd\components\softdevice\common\softdevice_handler;nRF5_SDK_13.0.0_04a0bfd\components\softdevice\s132\headers;nRF5_SDK_13.0.0_04a0bfd\components\softdevice\s132\headers\nrf52;nRF5_SDK_13.0.0_04a0bfd\components\ble\common;nRF5_SDK_13.0.0_04a0bfd\components\ble\nrf_ble_gatt;nRF5_SDK_13.0.0_04a0bfd\components\ble\ble_advertising;nRF5_SDK_13.0.0_04a0bfd\components\ble\ble_services\ble_nus;startups;nRF5_SDK_13.0.0_04a0bfd\components;nRF5_SDK_13.0.0_04a0bfd\components\device;nRF5_SDK_13.0.0_04a0bfd\components\drivers_nrf\delay;nRF5_SDK_13.0.0_04a0bfd\components\drivers_nrf\uart;nRF5_SDK_13.0.0_04a0bfd\components\drivers_nrf\clock;nRF5_SDK_13.0.0_04a0bfd\components\drivers_nrf\gpiote;nRF5_SDK_13.0.0_04a0bfd\components\drivers_nrf\common;nRF5_SDK_13.0.0_04a0bfd\components\drivers_nrf\hal;nRF5_SDK_13.0.0_04a0bfd\components\drivers_nrf\pwm;nRF5_SDK_13.0.0_04a0bfd\components\drivers_nrf\saadc;nRF5_SDK_13.0.0_04a0bfd\components\libraries\util;nRF5_SDK_13.0.0_04a0bfd\components\libraries\timer;nRF5_SDK_13.0.0_04a0bfd\components\libraries\fstorage;nRF5_SDK_13.0.0_04a0bfd\components\libraries\experimental_section_vars;nRF5_SDK_13.0.0_04a0bfd\components\libraries\log;nRF5_SDK_13.0.0_04a0bfd\components\libraries\log\src;nRF5_SDK_13.0.0_04a0bfd\components\libraries\strerror;nRF5_SDK_13.0.0_04a0bfd\components\toolchain\cmsis\include;..\..\libcpu\arm\common;..\..\libcpu\arm\cortex-m4;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\finsh;..\..\components\libc\compilers\armlibc;..\..\components\libc\compilers\common
@@ -751,6 +754,36 @@
+
+ libc
+
+
+ libc.c
+ 1
+ ..\..\components\libc\compilers\armlibc\libc.c
+
+
+ mem_std.c
+ 1
+ ..\..\components\libc\compilers\armlibc\mem_std.c
+
+
+ stubs.c
+ 1
+ ..\..\components\libc\compilers\armlibc\stubs.c
+
+
+ time.c
+ 1
+ ..\..\components\libc\compilers\armlibc\time.c
+
+
+ gmtime_r.c
+ 1
+ ..\..\components\libc\compilers\common\gmtime_r.c
+
+
+
diff --git a/bsp/nrf52832/rtconfig.h b/bsp/nrf52832/rtconfig.h
index 62f01c65a668546daec9115f0edc9e72ca98adee..072deee842c7e078ca5a48453cfd8bb772ef3383 100644
--- a/bsp/nrf52832/rtconfig.h
+++ b/bsp/nrf52832/rtconfig.h
@@ -41,7 +41,7 @@
#define RT_USING_CONSOLE
#define RT_CONSOLEBUF_SIZE 128
#define RT_CONSOLE_DEVICE_NAME "uart0"
-#define RT_VER_NUM 0x40001
+#define RT_VER_NUM 0x40002
/* RT-Thread Components */
@@ -78,6 +78,9 @@
#define RT_SERIAL_RB_BUFSZ 64
#define RT_USING_PIN
+/* Using Hardware Crypto drivers */
+
+
/* Using WiFi */
@@ -86,16 +89,17 @@
/* POSIX layer and C standard library */
+#define RT_USING_LIBC
/* Network */
/* Socket abstraction layer */
-/* light weight TCP/IP stack */
+/* Network interface device */
-/* Modbus master and slave stack */
+/* light weight TCP/IP stack */
/* AT commands */
diff --git a/bsp/nrf52832/template.uvoptx b/bsp/nrf52832/template.uvoptx
index cc6e2596970b5c4ccf13e12b3e5d38c3704f462f..7bd9338b2b8b19c723a277c105ee05a750c5b983 100644
--- a/bsp/nrf52832/template.uvoptx
+++ b/bsp/nrf52832/template.uvoptx
@@ -101,7 +101,9 @@
0
0
1
- 3
+ 0
+ 0
+ 4
@@ -165,6 +167,10 @@
+
+
+
+
diff --git a/bsp/nrf52832/template.uvprojx b/bsp/nrf52832/template.uvprojx
index 7f7e673e174ff5c9746433a421f970f080e6e2ce..0bf64c89f2adcaf70a3124d358771a47c5134d4c 100644
--- a/bsp/nrf52832/template.uvprojx
+++ b/bsp/nrf52832/template.uvprojx
@@ -11,11 +11,12 @@
0x4
ARM-ADS
5060422::V5.06 update 4 (build 422)::ARMCC
+ 0
nRF52832_xxAA
Nordic Semiconductor
- NordicSemiconductor.nRF_DeviceFamilyPack.8.17.0
+ NordicSemiconductor.nRF_DeviceFamilyPack.8.24.1
http://developer.nordicsemi.com/nRF5_SDK/pieces/nRF_DeviceFamilyPack/
IRAM(0x20000000,0x10000) IROM(0x00000000,0x80000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ELITTLE
@@ -183,10 +184,11 @@
0
0
2
+ 0
0
0
8
- 1
+ 0
0
0
0
@@ -323,6 +325,7 @@
0
0
1
+ 0
0
1
1
diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_wdt.c b/bsp/stm32/libraries/HAL_Drivers/drv_wdt.c
index 92e5fa6a4f27c16fbd4ae5ce2d2f3ada8886a3b5..c8956affc2771a2dad747801a90ef354be978d49 100644
--- a/bsp/stm32/libraries/HAL_Drivers/drv_wdt.c
+++ b/bsp/stm32/libraries/HAL_Drivers/drv_wdt.c
@@ -16,25 +16,17 @@
#define LOG_TAG "drv.wdt"
#include
-static IWDG_HandleTypeDef hiwdg;
+struct stm32_wdt_obj
+{
+ IWDG_HandleTypeDef hiwdg;
+ rt_uint16_t is_start;
+};
+static struct stm32_wdt_obj stm32_wdt;
static struct rt_watchdog_ops ops;
static rt_watchdog_t watchdog;
static rt_err_t wdt_init(rt_watchdog_t *wdt)
{
- hiwdg.Instance = IWDG;
- hiwdg.Init.Prescaler = IWDG_PRESCALER_256;
-
- hiwdg.Init.Reload = 0x00000FFF;
-#if defined(SOC_SERIES_STM32F0) || defined(SOC_SERIES_STM32L4) || defined(SOC_SERIES_STM32F7)
- hiwdg.Init.Window = 0x00000FFF;
-#endif
-
- if (HAL_IWDG_Init(&hiwdg) != HAL_OK)
- {
- LOG_E("wdt init failed.");
- return -RT_ERROR;
- }
return RT_EOK;
}
@@ -44,38 +36,44 @@ static rt_err_t wdt_control(rt_watchdog_t *wdt, int cmd, void *arg)
{
/* feed the watchdog */
case RT_DEVICE_CTRL_WDT_KEEPALIVE:
- HAL_IWDG_Refresh(&hiwdg);
+ if(HAL_IWDG_Refresh(&stm32_wdt.hiwdg) != HAL_OK)
+ {
+ LOG_E("watch dog keepalive fail.");
+ }
break;
/* set watchdog timeout */
case RT_DEVICE_CTRL_WDT_SET_TIMEOUT:
#if defined(LSI_VALUE)
if(LSI_VALUE)
{
- hiwdg.Init.Reload = (*((rt_uint32_t*)arg)) * LSI_VALUE / 256 ;
+ stm32_wdt.hiwdg.Init.Reload = (*((rt_uint32_t*)arg)) * LSI_VALUE / 256 ;
}
else
{
LOG_E("Please define the value of LSI_VALUE!");
}
-#else
- #error "Please define the value of LSI_VALUE!"
-#endif
- if(hiwdg.Init.Reload > 0xFFF)
+ if(stm32_wdt.hiwdg.Init.Reload > 0xFFF)
{
- LOG_E("wdg set timeout parameter too large.");
+ LOG_E("wdg set timeout parameter too large, please less than %ds",0xFFF * 256 / LSI_VALUE);
return -RT_EINVAL;
}
- if (HAL_IWDG_Init(&hiwdg) != HAL_OK)
+#else
+ #error "Please define the value of LSI_VALUE!"
+#endif
+ if(stm32_wdt.is_start)
{
- LOG_E("wdg set timeout failed.");
- return -RT_ERROR;
+ if (HAL_IWDG_Init(&stm32_wdt.hiwdg) != HAL_OK)
+ {
+ LOG_E("wdg set timeout failed.");
+ return -RT_ERROR;
+ }
}
break;
case RT_DEVICE_CTRL_WDT_GET_TIMEOUT:
#if defined(LSI_VALUE)
if(LSI_VALUE)
{
- (*((rt_uint32_t*)arg)) = hiwdg.Init.Reload * 256 / LSI_VALUE;
+ (*((rt_uint32_t*)arg)) = stm32_wdt.hiwdg.Init.Reload * 256 / LSI_VALUE;
}
else
{
@@ -85,6 +83,13 @@ static rt_err_t wdt_control(rt_watchdog_t *wdt, int cmd, void *arg)
#error "Please define the value of LSI_VALUE!"
#endif
break;
+ case RT_DEVICE_CTRL_WDT_START:
+ if (HAL_IWDG_Init(&stm32_wdt.hiwdg) != HAL_OK)
+ {
+ LOG_E("wdt start failed.");
+ return -RT_ERROR;
+ }
+ stm32_wdt.is_start = 1;
default:
return -RT_ERROR;
}
@@ -93,6 +98,15 @@ static rt_err_t wdt_control(rt_watchdog_t *wdt, int cmd, void *arg)
int rt_wdt_init(void)
{
+ stm32_wdt.hiwdg.Instance = IWDG;
+ stm32_wdt.hiwdg.Init.Prescaler = IWDG_PRESCALER_256;
+
+ stm32_wdt.hiwdg.Init.Reload = 0x00000FFF;
+#if defined(SOC_SERIES_STM32F0) || defined(SOC_SERIES_STM32L4) || defined(SOC_SERIES_STM32F7)
+ stm32_wdt.hiwdg.Init.Window = 0x00000FFF;
+#endif
+ stm32_wdt.is_start = 0;
+
ops.init = &wdt_init;
ops.control = &wdt_control;
watchdog.ops = &ops;
diff --git a/bsp/stm32/libraries/STM32F0xx_HAL/SConscript b/bsp/stm32/libraries/STM32F0xx_HAL/SConscript
index e8ac68c42c3c09439a30c0d9908929f8216277a2..62cb014ce86de843e91f18139f223f7c0b5b6a1e 100644
--- a/bsp/stm32/libraries/STM32F0xx_HAL/SConscript
+++ b/bsp/stm32/libraries/STM32F0xx_HAL/SConscript
@@ -11,6 +11,7 @@ CMSIS/Device/ST/STM32F0xx/Source/Templates/system_stm32f0xx.c
STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_dma.c
STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_cortex.c
STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_crc.c
+STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_crc_ex.c
STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_pwr.c
STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_rcc.c
STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_rcc_ex.c
diff --git a/bsp/stm32/stm32h743-atk-apollo/.config b/bsp/stm32/stm32h743-atk-apollo/.config
index 19e69dc17deb2a2c388cd184f2923911ee60c060..9505460a7d92aa20fe92dfc4525d9ae73d283030 100644
--- a/bsp/stm32/stm32h743-atk-apollo/.config
+++ b/bsp/stm32/stm32h743-atk-apollo/.config
@@ -48,11 +48,12 @@ CONFIG_RT_USING_MESSAGEQUEUE=y
# Memory Management
#
CONFIG_RT_USING_MEMPOOL=y
-CONFIG_RT_USING_MEMHEAP=y
+# CONFIG_RT_USING_MEMHEAP is not set
# CONFIG_RT_USING_NOHEAP is not set
-# CONFIG_RT_USING_SMALL_MEM is not set
+CONFIG_RT_USING_SMALL_MEM=y
# CONFIG_RT_USING_SLAB is not set
-CONFIG_RT_USING_MEMHEAP_AS_HEAP=y
+# CONFIG_RT_USING_MEMHEAP_AS_HEAP is not set
+# CONFIG_RT_USING_MEMTRACE is not set
CONFIG_RT_USING_HEAP=y
#
@@ -64,8 +65,9 @@ CONFIG_RT_USING_DEVICE=y
CONFIG_RT_USING_CONSOLE=y
CONFIG_RT_CONSOLEBUF_SIZE=128
CONFIG_RT_CONSOLE_DEVICE_NAME="uart1"
-CONFIG_RT_VER_NUM=0x40001
+CONFIG_RT_VER_NUM=0x40002
CONFIG_ARCH_ARM=y
+CONFIG_RT_USING_CPU_FFS=y
CONFIG_ARCH_ARM_CORTEX_M=y
CONFIG_ARCH_ARM_CORTEX_M7=y
# CONFIG_ARCH_CPU_STACK_GROWS_UPWARD is not set
@@ -125,7 +127,6 @@ CONFIG_RT_USING_PIN=y
# CONFIG_RT_USING_PWM is not set
# CONFIG_RT_USING_MTD_NOR is not set
# CONFIG_RT_USING_MTD_NAND is not set
-# CONFIG_RT_USING_MTD is not set
# CONFIG_RT_USING_PM is not set
# CONFIG_RT_USING_RTC is not set
# CONFIG_RT_USING_SDIO is not set
@@ -133,6 +134,12 @@ CONFIG_RT_USING_PIN=y
# CONFIG_RT_USING_WDT is not set
# CONFIG_RT_USING_AUDIO is not set
# CONFIG_RT_USING_SENSOR is not set
+# CONFIG_RT_USING_TOUCH is not set
+
+#
+# Using Hardware Crypto drivers
+#
+# CONFIG_RT_USING_HWCRYPTO is not set
#
# Using WiFi
@@ -161,14 +168,14 @@ CONFIG_RT_USING_PIN=y
# CONFIG_RT_USING_SAL is not set
#
-# light weight TCP/IP stack
+# Network interface device
#
-# CONFIG_RT_USING_LWIP is not set
+# CONFIG_RT_USING_NETDEV is not set
#
-# Modbus master and slave stack
+# light weight TCP/IP stack
#
-# CONFIG_RT_USING_MODBUS is not set
+# CONFIG_RT_USING_LWIP is not set
#
# AT commands
@@ -183,7 +190,6 @@ CONFIG_RT_USING_PIN=y
#
# Utilities
#
-# CONFIG_RT_USING_LOGTRACE is not set
# CONFIG_RT_USING_RYM is not set
# CONFIG_RT_USING_ULOG is not set
# CONFIG_RT_USING_UTEST is not set
@@ -204,6 +210,7 @@ CONFIG_RT_USING_PIN=y
# CONFIG_PKG_USING_CJSON is not set
# CONFIG_PKG_USING_JSMN is not set
# CONFIG_PKG_USING_LIBMODBUS is not set
+# CONFIG_PKG_USING_FREEMODBUS is not set
# CONFIG_PKG_USING_LJSON is not set
# CONFIG_PKG_USING_EZXML is not set
# CONFIG_PKG_USING_NANOPB is not set
@@ -226,6 +233,7 @@ CONFIG_RT_USING_PIN=y
# CONFIG_PKG_USING_NOPOLL is not set
# CONFIG_PKG_USING_NETUTILS is not set
# CONFIG_PKG_USING_AT_DEVICE is not set
+# CONFIG_PKG_USING_ATSRV_SOCKET is not set
# CONFIG_PKG_USING_WIZNET is not set
#
@@ -235,9 +243,13 @@ CONFIG_RT_USING_PIN=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_IOTKIT is not set
+# CONFIG_PKG_USING_TENCENT_IOTHUB is not set
# CONFIG_PKG_USING_NIMBLE is not set
# CONFIG_PKG_USING_OTA_DOWNLOADER is not set
+# CONFIG_PKG_USING_IPMSG is not set
+# CONFIG_PKG_USING_LSSDP is not set
+# CONFIG_PKG_USING_AIRKISS_OPEN is not set
+# CONFIG_PKG_USING_LIBRWS is not set
#
# security packages
@@ -296,20 +308,25 @@ CONFIG_RT_USING_PIN=y
# CONFIG_PKG_USING_SENSORS_DRIVERS is not set
# CONFIG_PKG_USING_REALTEK_AMEBA is not set
# CONFIG_PKG_USING_SHT2X is not set
-# CONFIG_PKG_USING_AHT10 is not set
-# CONFIG_PKG_USING_AP3216C is not set
# CONFIG_PKG_USING_STM32_SDIO is not set
# CONFIG_PKG_USING_ICM20608 is not set
# CONFIG_PKG_USING_U8G2 is not set
# CONFIG_PKG_USING_BUTTON is not set
-# CONFIG_PKG_USING_MPU6XXX is not set
# CONFIG_PKG_USING_PCF8574 is not set
# CONFIG_PKG_USING_SX12XX is not set
# CONFIG_PKG_USING_SIGNAL_LED is not set
+# CONFIG_PKG_USING_LEDBLINK is not set
# CONFIG_PKG_USING_WM_LIBRARIES is not set
# CONFIG_PKG_USING_KENDRYTE_SDK is not set
# CONFIG_PKG_USING_INFRARED is not set
# CONFIG_PKG_USING_ROSSERIAL is not set
+# CONFIG_PKG_USING_AT24CXX is not set
+# CONFIG_PKG_USING_MOTIONDRIVER2RTT is not set
+# CONFIG_PKG_USING_AD7746 is not set
+# CONFIG_PKG_USING_PCA9685 is not set
+# CONFIG_PKG_USING_I2C_TOOLS is not set
+# CONFIG_PKG_USING_NRF24L01 is not set
+# CONFIG_PKG_USING_TOUCH_DRIVERS is not set
#
# miscellaneous packages
@@ -325,6 +342,7 @@ CONFIG_RT_USING_PIN=y
# CONFIG_PKG_USING_DSTR is not set
# CONFIG_PKG_USING_TINYFRAME is not set
# CONFIG_PKG_USING_KENDRYTE_DEMO is not set
+# CONFIG_PKG_USING_DIGITALCTRL is not set
#
# samples: kernel and components samples
@@ -336,6 +354,7 @@ CONFIG_RT_USING_PIN=y
# CONFIG_PKG_USING_HELLO is not set
# CONFIG_PKG_USING_VI is not set
# CONFIG_PKG_USING_NNOM is not set
+# CONFIG_PKG_USING_LIBANN is not set
CONFIG_SOC_FAMILY_STM32=y
CONFIG_SOC_SERIES_STM32H7=y
@@ -358,6 +377,7 @@ CONFIG_BSP_USING_UART=y
CONFIG_BSP_USING_UART1=y
# CONFIG_BSP_USING_FMC is not set
# CONFIG_BSP_USING_LTDC is not set
+# CONFIG_BSP_USING_ONCHIP_RTC is not set
#
# Board extended module Drivers
diff --git a/bsp/stm32/stm32h743-atk-apollo/project.uvoptx b/bsp/stm32/stm32h743-atk-apollo/project.uvoptx
index ef5e8bb2286ac79a1d6e08d66f656fdd8cb71216..78d017b7dbdd376f0b7e2312df51a8766d9bf5ff 100644
--- a/bsp/stm32/stm32h743-atk-apollo/project.uvoptx
+++ b/bsp/stm32/stm32h743-atk-apollo/project.uvoptx
@@ -28,7 +28,7 @@
12000000
- 0
+ 1
1
0
1
@@ -77,7 +77,7 @@
0
1
- 0
+ 18
0
1
@@ -101,7 +101,7 @@
0
0
1
- 0
+ 5
@@ -112,7 +112,7 @@
- BIN\UL2CM3.DLL
+ STLink\ST-LINKIII-KEIL_SWO.dll
diff --git a/bsp/stm32/stm32h743-atk-apollo/project.uvprojx b/bsp/stm32/stm32h743-atk-apollo/project.uvprojx
index acb2683d604d2fec7fceeda32ef50d6e714acfaa..15b918d610ab9a0d1a5d452fbb0d8772109a32ba 100644
--- a/bsp/stm32/stm32h743-atk-apollo/project.uvprojx
+++ b/bsp/stm32/stm32h743-atk-apollo/project.uvprojx
@@ -333,7 +333,7 @@
USE_HAL_DRIVER, STM32H743xx
- .;..\..\..\include;board;board\CubeMX_Config\Inc;..\libraries\HAL_Drivers;..\libraries\HAL_Drivers\config;..\..\..\libcpu\arm\common;..\..\..\libcpu\arm\cortex-m7;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\finsh;..\libraries\STM32H7xx_HAL\STM32H7xx_HAL_Driver\Inc;..\libraries\STM32H7xx_HAL\CMSIS\Device\ST\STM32H7xx\Include;..\libraries\STM32H7xx_HAL\CMSIS\Include
+ .;..\..\..\include;board;board\CubeMX_Config\Inc;board\ports;..\libraries\HAL_Drivers;..\libraries\HAL_Drivers\config;..\..\..\libcpu\arm\common;..\..\..\libcpu\arm\cortex-m7;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\finsh;..\libraries\STM32H7xx_HAL\STM32H7xx_HAL_Driver\Inc;..\libraries\STM32H7xx_HAL\CMSIS\Device\ST\STM32H7xx\Include;..\libraries\STM32H7xx_HAL\CMSIS\Include
@@ -501,6 +501,13 @@
board\board.c
+
+
+ drv_mpu.c
+ 1
+ board\drv_mpu.c
+
+
stm32h7xx_hal_msp.c
@@ -560,6 +567,13 @@
..\..\..\libcpu\arm\common\showmem.c
+
+
+ cpu_cache.c
+ 1
+ ..\..\..\libcpu\arm\cortex-m7\cpu_cache.c
+
+
cpuport.c
@@ -765,6 +779,13 @@
..\libraries\STM32H7xx_HAL\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_dma_ex.c
+
+
+ stm32h7xx_hal_mdma.c
+ 1
+ ..\libraries\STM32H7xx_HAL\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_mdma.c
+
+
stm32h7xx_hal_pwr.c
diff --git a/bsp/stm32/stm32h743-atk-apollo/rtconfig.h b/bsp/stm32/stm32h743-atk-apollo/rtconfig.h
index 1f638f9c4f802638f75cdde1dd8fb6a27cf0f58f..6e018a0c93cbe3efc4199a459b157766d7257cf4 100644
--- a/bsp/stm32/stm32h743-atk-apollo/rtconfig.h
+++ b/bsp/stm32/stm32h743-atk-apollo/rtconfig.h
@@ -29,8 +29,7 @@
/* Memory Management */
#define RT_USING_MEMPOOL
-#define RT_USING_MEMHEAP
-#define RT_USING_MEMHEAP_AS_HEAP
+#define RT_USING_SMALL_MEM
#define RT_USING_HEAP
/* Kernel Device Object */
@@ -39,8 +38,9 @@
#define RT_USING_CONSOLE
#define RT_CONSOLEBUF_SIZE 128
#define RT_CONSOLE_DEVICE_NAME "uart1"
-#define RT_VER_NUM 0x40001
+#define RT_VER_NUM 0x40002
#define ARCH_ARM
+#define RT_USING_CPU_FFS
#define ARCH_ARM_CORTEX_M
#define ARCH_ARM_CORTEX_M7
@@ -82,6 +82,9 @@
#define RT_SERIAL_RB_BUFSZ 64
#define RT_USING_PIN
+/* Using Hardware Crypto drivers */
+
+
/* Using WiFi */
@@ -96,10 +99,10 @@
/* Socket abstraction layer */
-/* light weight TCP/IP stack */
+/* Network interface device */
-/* Modbus master and slave stack */
+/* light weight TCP/IP stack */
/* AT commands */
diff --git a/include/rtthread.h b/include/rtthread.h
index 955ea51c508b28b1793b8b79557e34c3c9d7edc9..04db77da46f476ea27a5681f9b5086d217ef13fc 100644
--- a/include/rtthread.h
+++ b/include/rtthread.h
@@ -378,8 +378,8 @@ rt_mq_t rt_mq_create(const char *name,
rt_uint8_t flag);
rt_err_t rt_mq_delete(rt_mq_t mq);
-rt_err_t rt_mq_send(rt_mq_t mq, void *buffer, rt_size_t size);
-rt_err_t rt_mq_urgent(rt_mq_t mq, void *buffer, rt_size_t size);
+rt_err_t rt_mq_send(rt_mq_t mq, const void *buffer, rt_size_t size);
+rt_err_t rt_mq_urgent(rt_mq_t mq, const void *buffer, rt_size_t size);
rt_err_t rt_mq_recv(rt_mq_t mq,
void *buffer,
rt_size_t size,
diff --git a/src/idle.c b/src/idle.c
index 77b04248927d73db39cfb5a620a15f7e7d3b8d02..1108bc33679cc335e5d60141a205331957c3aa87 100644
--- a/src/idle.c
+++ b/src/idle.c
@@ -55,7 +55,7 @@ static rt_uint8_t rt_thread_stack[_CPUS_NR][IDLE_THREAD_STACK_SIZE];
#define RT_IDEL_HOOK_LIST_SIZE 4
#endif
-static void (*idle_hook_list[RT_IDEL_HOOK_LIST_SIZE])();
+static void (*idle_hook_list[RT_IDEL_HOOK_LIST_SIZE])(void);
/**
* @ingroup Hook
diff --git a/src/ipc.c b/src/ipc.c
index e293eee8cded7e935a6743744680512159f85fbb..39cf217baae1f38a46752452aec2031287523b3c 100644
--- a/src/ipc.c
+++ b/src/ipc.c
@@ -1960,7 +1960,7 @@ RTM_EXPORT(rt_mq_delete);
*
* @return the error code
*/
-rt_err_t rt_mq_send(rt_mq_t mq, void *buffer, rt_size_t size)
+rt_err_t rt_mq_send(rt_mq_t mq, const void *buffer, rt_size_t size)
{
register rt_ubase_t temp;
struct rt_mq_message *msg;
@@ -2050,7 +2050,7 @@ RTM_EXPORT(rt_mq_send);
*
* @return the error code
*/
-rt_err_t rt_mq_urgent(rt_mq_t mq, void *buffer, rt_size_t size)
+rt_err_t rt_mq_urgent(rt_mq_t mq, const void *buffer, rt_size_t size)
{
register rt_ubase_t temp;
struct rt_mq_message *msg;
diff --git a/src/irq.c b/src/irq.c
index 78ad58606482ba66bf9390ac52b28f4273ed2a1b..311d297bfe7760e56e3b1051d0c19311c61a732b 100644
--- a/src/irq.c
+++ b/src/irq.c
@@ -105,7 +105,7 @@ RTM_EXPORT(rt_interrupt_leave);
*
* @return the number of nested interrupts.
*/
-rt_uint8_t rt_interrupt_get_nest(void)
+RT_WEAK rt_uint8_t rt_interrupt_get_nest(void)
{
rt_uint8_t ret;
rt_base_t level;