Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wwsmg1
rt-thread
提交
2589d245
R
rt-thread
项目概览
wwsmg1
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
2589d245
编写于
7月 30, 2021
作者:
mysterywolf
提交者:
GitHub
7月 30, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' into tz
上级
19c5088b
56d3abe3
变更
38
隐藏空白更改
内联
并排
Showing
38 changed file
with
540 addition
and
164 deletion
+540
-164
bsp/imxrt/docs/AN13232 - RT-Thread Board Port and Application Development.pdf
...32 - RT-Thread Board Port and Application Development.pdf
+0
-0
bsp/stm32/stm32f407-atk-explorer/.config
bsp/stm32/stm32f407-atk-explorer/.config
+220
-20
bsp/stm32/stm32f407-atk-explorer/board/Kconfig
bsp/stm32/stm32f407-atk-explorer/board/Kconfig
+17
-9
bsp/stm32/stm32f407-atk-explorer/board/SConscript
bsp/stm32/stm32f407-atk-explorer/board/SConscript
+2
-2
bsp/stm32/stm32f407-atk-explorer/board/ports/drv_filesystem.c
...stm32/stm32f407-atk-explorer/board/ports/drv_filesystem.c
+105
-0
bsp/stm32/stm32f407-atk-explorer/rtconfig.h
bsp/stm32/stm32f407-atk-explorer/rtconfig.h
+19
-10
components/dfs/include/dfs_select.h
components/dfs/include/dfs_select.h
+1
-1
components/drivers/include/ipc/workqueue.h
components/drivers/include/ipc/workqueue.h
+2
-3
components/drivers/src/workqueue.c
components/drivers/src/workqueue.c
+3
-3
components/libc/aio/posix_aio.c
components/libc/aio/posix_aio.c
+0
-6
components/libc/aio/posix_aio.h
components/libc/aio/posix_aio.h
+4
-0
components/libc/compilers/common/none-gcc/sys/errno.h
components/libc/compilers/common/none-gcc/sys/errno.h
+2
-2
components/libc/compilers/common/none-gcc/sys/stat.h
components/libc/compilers/common/none-gcc/sys/stat.h
+5
-0
components/libc/compilers/common/none-gcc/sys/types.h
components/libc/compilers/common/none-gcc/sys/types.h
+2
-2
components/libc/compilers/common/none-gcc/sys/unistd.h
components/libc/compilers/common/none-gcc/sys/unistd.h
+2
-2
components/libc/compilers/common/sys/select.h
components/libc/compilers/common/sys/select.h
+49
-0
components/libc/compilers/common/sys/signal.h
components/libc/compilers/common/sys/signal.h
+70
-60
components/libc/pthreads/mqueue.c
components/libc/pthreads/mqueue.c
+1
-0
components/libc/signal/posix_signal.c
components/libc/signal/posix_signal.c
+2
-3
components/libc/signal/posix_signal.h
components/libc/signal/posix_signal.h
+0
-1
components/net/at/at_socket/at_socket.c
components/net/at/at_socket/at_socket.c
+12
-5
components/net/at/src/at_client.c
components/net/at/src/at_client.c
+5
-15
components/net/sal_socket/include/socket/netdb.h
components/net/sal_socket/include/socket/netdb.h
+1
-1
examples/kernel/event_simple.c
examples/kernel/event_simple.c
+1
-1
examples/kernel/mbox_send_wait.c
examples/kernel/mbox_send_wait.c
+1
-1
examples/kernel/mbox_simple.c
examples/kernel/mbox_simple.c
+1
-1
examples/kernel/messageq_simple.c
examples/kernel/messageq_simple.c
+1
-1
examples/kernel/mutex_priority.c
examples/kernel/mutex_priority.c
+1
-1
examples/kernel/mutex_simple.c
examples/kernel/mutex_simple.c
+1
-1
examples/kernel/semaphore_buffer_worker.c
examples/kernel/semaphore_buffer_worker.c
+1
-1
examples/kernel/semaphore_dynamic.c
examples/kernel/semaphore_dynamic.c
+1
-1
examples/kernel/semaphore_producer_consumer.c
examples/kernel/semaphore_producer_consumer.c
+3
-3
examples/kernel/semaphore_static.c
examples/kernel/semaphore_static.c
+1
-1
examples/kernel/tc_comm.c
examples/kernel/tc_comm.c
+1
-1
examples/kernel/timer_timeout.c
examples/kernel/timer_timeout.c
+1
-1
examples/pm/wakeup_app.c
examples/pm/wakeup_app.c
+1
-1
include/rtdef.h
include/rtdef.h
+1
-1
include/rtlibc.h
include/rtlibc.h
+0
-3
未找到文件。
bsp/imxrt/docs/AN13232 - RT-Thread Board Port and Application Development.pdf
0 → 100644
浏览文件 @
2589d245
文件已添加
bsp/stm32/stm32f407-atk-explorer/.config
浏览文件 @
2589d245
...
...
@@ -21,6 +21,12 @@ CONFIG_RT_USING_IDLE_HOOK=y
CONFIG_RT_IDLE_HOOK_LIST_SIZE
=
4
CONFIG_IDLE_THREAD_STACK_SIZE
=
1024
# CONFIG_RT_USING_TIMER_SOFT is not set
#
# kservice optimization
#
# CONFIG_RT_KSERVICE_USING_STDLIB is not set
# CONFIG_RT_KSERVICE_USING_TINY_SIZE is not set
CONFIG_RT_DEBUG
=
y
CONFIG_RT_DEBUG_COLOR
=
y
# CONFIG_RT_DEBUG_INIT_CONFIG is not set
...
...
@@ -52,6 +58,7 @@ CONFIG_RT_USING_MEMPOOL=y
# CONFIG_RT_USING_NOHEAP is not set
CONFIG_RT_USING_SMALL_MEM
=
y
# CONFIG_RT_USING_SLAB is not set
# CONFIG_RT_USING_USERHEAP is not set
# CONFIG_RT_USING_MEMTRACE is not set
CONFIG_RT_USING_HEAP
=
y
...
...
@@ -64,7 +71,8 @@ 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
=
0
x40002
# CONFIG_RT_PRINTF_LONGLONG is not set
CONFIG_RT_VER_NUM
=
0
x40004
CONFIG_ARCH_ARM
=
y
CONFIG_RT_USING_CPU_FFS
=
y
CONFIG_ARCH_ARM_CORTEX_M
=
y
...
...
@@ -115,18 +123,21 @@ 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_USING_SERIAL_V1
=
y
# CONFIG_RT_USING_SERIAL_V2 is not set
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_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
# 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
...
...
@@ -134,15 +145,10 @@ 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
#
# Using Hardware Crypto drivers
#
# CONFIG_RT_USING_TOUCH is not set
# CONFIG_RT_USING_HWCRYPTO is not set
#
# Using WiFi
#
# CONFIG_RT_USING_PULSE_ENCODER is not set
# CONFIG_RT_USING_INPUT_CAPTURE is not set
# CONFIG_RT_USING_WIFI is not set
#
...
...
@@ -156,6 +162,8 @@ CONFIG_RT_USING_PIN=y
#
# CONFIG_RT_USING_LIBC is not set
# CONFIG_RT_USING_PTHREADS is not set
CONFIG_RT_LIBC_USING_TIME
=
y
CONFIG_RT_LIBC_DEFAULT_TIMEZONE
=
8
#
# Network
...
...
@@ -176,11 +184,6 @@ CONFIG_RT_USING_PIN=y
#
# CONFIG_RT_USING_LWIP is not set
#
# Modbus master and slave stack
#
# CONFIG_RT_USING_MODBUS is not set
#
# AT commands
#
...
...
@@ -197,8 +200,14 @@ CONFIG_RT_USING_PIN=y
# CONFIG_RT_USING_RYM is not set
# CONFIG_RT_USING_ULOG is not set
# CONFIG_RT_USING_UTEST is not set
# CONFIG_RT_USING_RT_LINK is not set
# CONFIG_RT_USING_LWP is not set
#
# RT-Thread Utestcases
#
# CONFIG_RT_USING_UTESTCASES is not set
#
# RT-Thread online packages
#
...
...
@@ -206,14 +215,20 @@ CONFIG_RT_USING_PIN=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
# CONFIG_PKG_USING_MYMQTT is not set
# CONFIG_PKG_USING_KAWAII_MQTT is not set
# CONFIG_PKG_USING_BC28_MQTT is not set
# CONFIG_PKG_USING_WEBTERMINAL is not set
# CONFIG_PKG_USING_CJSON is not set
# CONFIG_PKG_USING_JSMN is not set
# CONFIG_PKG_USING_LIBMODBUS is not set
# CONFIG_PKG_USING_FREEMODBUS is not set
# CONFIG_PKG_USING_LJSON is not set
# CONFIG_PKG_USING_EZXML is not set
# CONFIG_PKG_USING_NANOPB is not set
...
...
@@ -235,6 +250,8 @@ CONFIG_RT_USING_PIN=y
# CONFIG_PKG_USING_COAP is not set
# CONFIG_PKG_USING_NOPOLL is not set
# CONFIG_PKG_USING_NETUTILS is not set
# CONFIG_PKG_USING_CMUX is not set
# CONFIG_PKG_USING_PPP_DEVICE is not set
# CONFIG_PKG_USING_AT_DEVICE is not set
# CONFIG_PKG_USING_ATSRV_SOCKET is not set
# CONFIG_PKG_USING_WIZNET is not set
...
...
@@ -246,12 +263,38 @@ 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_IOT_EXPLORER is not set
# CONFIG_PKG_USING_JIOT-C-SDK is not set
# CONFIG_PKG_USING_UCLOUD_IOT_SDK is not set
# CONFIG_PKG_USING_JOYLINK is not set
# CONFIG_PKG_USING_NIMBLE is not set
# CONFIG_PKG_USING_OTA_DOWNLOADER is not set
# CONFIG_PKG_USING_IPMSG is not set
# CONFIG_PKG_USING_LSSDP is not set
# CONFIG_PKG_USING_AIRKISS_OPEN is not set
# CONFIG_PKG_USING_LIBRWS is not set
# CONFIG_PKG_USING_TCPSERVER is not set
# CONFIG_PKG_USING_PROTOBUF_C is not set
# CONFIG_PKG_USING_DLT645 is not set
# CONFIG_PKG_USING_QXWZ is not set
# CONFIG_PKG_USING_SMTP_CLIENT is not set
# CONFIG_PKG_USING_ABUP_FOTA is not set
# CONFIG_PKG_USING_LIBCURL2RTT is not set
# CONFIG_PKG_USING_CAPNP is not set
# CONFIG_PKG_USING_RT_CJSON_TOOLS is not set
# CONFIG_PKG_USING_AGILE_TELNET is not set
# CONFIG_PKG_USING_NMEALIB is not set
# CONFIG_PKG_USING_AGILE_JSMN is not set
# CONFIG_PKG_USING_PDULIB is not set
# CONFIG_PKG_USING_BTSTACK is not set
# CONFIG_PKG_USING_LORAWAN_ED_STACK is not set
# CONFIG_PKG_USING_WAYZ_IOTKIT is not set
# CONFIG_PKG_USING_MAVLINK is not set
# CONFIG_PKG_USING_RAPIDJSON is not set
# CONFIG_PKG_USING_BSAL is not set
# CONFIG_PKG_USING_AGILE_MODBUS is not set
# CONFIG_PKG_USING_AGILE_FTP is not set
# CONFIG_PKG_USING_EMBEDDEDPROTO is not set
#
# security packages
...
...
@@ -259,6 +302,8 @@ CONFIG_RT_USING_PIN=y
# CONFIG_PKG_USING_MBEDTLS is not set
# CONFIG_PKG_USING_libsodium is not set
# CONFIG_PKG_USING_TINYCRYPT is not set
# CONFIG_PKG_USING_TFM is not set
# CONFIG_PKG_USING_YD_CRYPTO is not set
#
# language packages
...
...
@@ -273,6 +318,13 @@ CONFIG_RT_USING_PIN=y
# CONFIG_PKG_USING_OPENMV is not set
# CONFIG_PKG_USING_MUPDF is not set
# CONFIG_PKG_USING_STEMWIN is not set
# CONFIG_PKG_USING_WAVPLAYER is not set
# CONFIG_PKG_USING_TJPGD is not set
# CONFIG_PKG_USING_PDFGEN is not set
# CONFIG_PKG_USING_HELIX is not set
# CONFIG_PKG_USING_AZUREGUIX is not set
# CONFIG_PKG_USING_TOUCHGFX2RTT is not set
# CONFIG_PKG_USING_NUEMWIN is not set
#
# tools packages
...
...
@@ -284,7 +336,36 @@ CONFIG_RT_USING_PIN=y
# CONFIG_PKG_USING_RDB is not set
# CONFIG_PKG_USING_QRCODE is not set
# CONFIG_PKG_USING_ULOG_EASYFLASH is not set
# CONFIG_PKG_USING_ULOG_FILE is not set
# CONFIG_PKG_USING_LOGMGR is not set
# CONFIG_PKG_USING_ADBD is not set
# CONFIG_PKG_USING_COREMARK is not set
# CONFIG_PKG_USING_DHRYSTONE is not set
# CONFIG_PKG_USING_MEMORYPERF is not set
# CONFIG_PKG_USING_NR_MICRO_SHELL is not set
# CONFIG_PKG_USING_CHINESE_FONT_LIBRARY is not set
# CONFIG_PKG_USING_LUNAR_CALENDAR is not set
# CONFIG_PKG_USING_BS8116A is not set
# CONFIG_PKG_USING_GPS_RMC is not set
# CONFIG_PKG_USING_URLENCODE is not set
# CONFIG_PKG_USING_UMCN is not set
# CONFIG_PKG_USING_LWRB2RTT is not set
# CONFIG_PKG_USING_CPU_USAGE is not set
# CONFIG_PKG_USING_GBK2UTF8 is not set
# CONFIG_PKG_USING_VCONSOLE is not set
# CONFIG_PKG_USING_KDB is not set
# CONFIG_PKG_USING_WAMR is not set
# CONFIG_PKG_USING_MICRO_XRCE_DDS_CLIENT is not set
# CONFIG_PKG_USING_LWLOG is not set
# CONFIG_PKG_USING_ANV_TRACE is not set
# CONFIG_PKG_USING_ANV_MEMLEAK is not set
# CONFIG_PKG_USING_ANV_TESTSUIT is not set
# CONFIG_PKG_USING_ANV_BENCH is not set
# CONFIG_PKG_USING_DEVMEM is not set
# CONFIG_PKG_USING_REGEX is not set
# CONFIG_PKG_USING_MEM_SANDBOX is not set
# CONFIG_PKG_USING_SOLAR_TERMS is not set
# CONFIG_PKG_USING_GAN_ZHI is not set
#
# system packages
...
...
@@ -293,16 +374,47 @@ CONFIG_RT_USING_PIN=y
# CONFIG_PKG_USING_PERSIMMON is not set
# CONFIG_PKG_USING_CAIRO is not set
# CONFIG_PKG_USING_PIXMAN is not set
# CONFIG_PKG_USING_LWEXT4 is not set
# CONFIG_PKG_USING_PARTITION is not set
# CONFIG_PKG_USING_FAL is not set
# CONFIG_PKG_USING_FLASHDB is not set
# CONFIG_PKG_USING_SQLITE is not set
# CONFIG_PKG_USING_RTI is not set
# CONFIG_PKG_USING_LITTLEVGL2RTT is not set
# CONFIG_PKG_USING_CMSIS is not set
# CONFIG_PKG_USING_DFS_YAFFS is not set
# CONFIG_PKG_USING_LITTLEFS is not set
# CONFIG_PKG_USING_DFS_JFFS2 is not set
# CONFIG_PKG_USING_DFS_UFFS is not set
# CONFIG_PKG_USING_LWEXT4 is not set
# CONFIG_PKG_USING_THREAD_POOL is not set
# CONFIG_PKG_USING_ROBOTS is not set
# CONFIG_PKG_USING_EV is not set
# 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
#
# Micrium: Micrium software products porting for RT-Thread
#
# CONFIG_PKG_USING_UCOSIII_WRAPPER is not set
# CONFIG_PKG_USING_UCOSII_WRAPPER is not set
# CONFIG_PKG_USING_UC_CRC is not set
# CONFIG_PKG_USING_UC_CLK is not set
# CONFIG_PKG_USING_UC_COMMON is not set
# CONFIG_PKG_USING_UC_MODBUS is not set
# CONFIG_PKG_USING_PPOOL is not set
# CONFIG_PKG_USING_OPENAMP is not set
# CONFIG_PKG_USING_RT_KPRINTF_THREADSAFE is not set
# CONFIG_PKG_USING_RT_MEMCPY_CM is not set
# CONFIG_PKG_USING_QFPLIB_M0_FULL is not set
# CONFIG_PKG_USING_QFPLIB_M0_TINY is not set
# CONFIG_PKG_USING_QFPLIB_M3 is not set
# CONFIG_PKG_USING_LPM is not set
# CONFIG_PKG_USING_TLSF is not set
# CONFIG_PKG_USING_EVENT_RECORDER is not set
#
# peripheral libraries and drivers
...
...
@@ -310,7 +422,8 @@ 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_AP3216C is not set
# CONFIG_PKG_USING_SHT3X is not set
# CONFIG_PKG_USING_AS7341 is not set
# CONFIG_PKG_USING_STM32_SDIO is not set
# CONFIG_PKG_USING_ICM20608 is not set
# CONFIG_PKG_USING_U8G2 is not set
...
...
@@ -319,15 +432,70 @@ CONFIG_RT_USING_PIN=y
# CONFIG_PKG_USING_SX12XX is not set
# CONFIG_PKG_USING_SIGNAL_LED is not set
# CONFIG_PKG_USING_LEDBLINK is not set
# CONFIG_PKG_USING_LITTLED is not set
# CONFIG_PKG_USING_LKDGUI is not set
# CONFIG_PKG_USING_NRF5X_SDK is not set
# CONFIG_PKG_USING_NRFX is not set
# CONFIG_PKG_USING_WM_LIBRARIES is not set
# CONFIG_PKG_USING_KENDRYTE_SDK is not set
# CONFIG_PKG_USING_INFRARED is not set
# CONFIG_PKG_USING_ROSSERIAL is not set
# CONFIG_PKG_USING_AGILE_BUTTON is not set
# CONFIG_PKG_USING_AGILE_LED is not set
# CONFIG_PKG_USING_AT24CXX is not set
# CONFIG_PKG_USING_MOTIONDRIVER2RTT is not set
# CONFIG_PKG_USING_AD7746 is not set
# CONFIG_PKG_USING_PCA9685 is not set
# CONFIG_PKG_USING_I2C_TOOLS is not set
# CONFIG_PKG_USING_NRF24L01 is not set
# CONFIG_PKG_USING_TOUCH_DRIVERS is not set
# CONFIG_PKG_USING_MAX17048 is not set
# CONFIG_PKG_USING_RPLIDAR is not set
# CONFIG_PKG_USING_AS608 is not set
# CONFIG_PKG_USING_RC522 is not set
# CONFIG_PKG_USING_WS2812B is not set
# CONFIG_PKG_USING_EMBARC_BSP is not set
# CONFIG_PKG_USING_EXTERN_RTC_DRIVERS is not set
# CONFIG_PKG_USING_MULTI_RTIMER is not set
# CONFIG_PKG_USING_MAX7219 is not set
# CONFIG_PKG_USING_BEEP is not set
# CONFIG_PKG_USING_EASYBLINK is not set
# CONFIG_PKG_USING_PMS_SERIES is not set
# CONFIG_PKG_USING_CAN_YMODEM is not set
# CONFIG_PKG_USING_LORA_RADIO_DRIVER is not set
# CONFIG_PKG_USING_QLED is not set
# CONFIG_PKG_USING_PAJ7620 is not set
# CONFIG_PKG_USING_AGILE_CONSOLE is not set
# CONFIG_PKG_USING_LD3320 is not set
# CONFIG_PKG_USING_WK2124 is not set
# CONFIG_PKG_USING_LY68L6400 is not set
# CONFIG_PKG_USING_DM9051 is not set
# CONFIG_PKG_USING_SSD1306 is not set
# CONFIG_PKG_USING_QKEY is not set
# CONFIG_PKG_USING_RS485 is not set
# CONFIG_PKG_USING_NES is not set
# CONFIG_PKG_USING_VIRTUAL_SENSOR is not set
# CONFIG_PKG_USING_VDEVICE is not set
# CONFIG_PKG_USING_SGM706 is not set
# CONFIG_PKG_USING_STM32WB55_SDK is not set
# CONFIG_PKG_USING_RDA58XX is not set
# CONFIG_PKG_USING_LIBNFC is not set
# CONFIG_PKG_USING_MFOC is not set
# CONFIG_PKG_USING_TMC51XX is not set
# CONFIG_PKG_USING_TCA9534 is not set
#
# AI packages
#
# CONFIG_PKG_USING_LIBANN is not set
# CONFIG_PKG_USING_NNOM is not set
# CONFIG_PKG_USING_ONNX_BACKEND is not set
# CONFIG_PKG_USING_ONNX_PARSER is not set
# CONFIG_PKG_USING_TENSORFLOWLITEMICRO is not set
# CONFIG_PKG_USING_ELAPACK is not set
# CONFIG_PKG_USING_ULAPACK is not set
# CONFIG_PKG_USING_QUEST is not set
# CONFIG_PKG_USING_NAXOS is not set
#
# miscellaneous packages
...
...
@@ -337,13 +505,18 @@ CONFIG_RT_USING_PIN=y
# CONFIG_PKG_USING_FASTLZ is not set
# CONFIG_PKG_USING_MINILZO is not set
# CONFIG_PKG_USING_QUICKLZ is not set
# CONFIG_PKG_USING_LZMA is not set
# CONFIG_PKG_USING_MULTIBUTTON is not set
# CONFIG_PKG_USING_FLEXIBLE_BUTTON is not set
# CONFIG_PKG_USING_CANFESTIVAL is not set
# CONFIG_PKG_USING_ZLIB is not set
# CONFIG_PKG_USING_MINIZIP is not set
# CONFIG_PKG_USING_DSTR is not set
# CONFIG_PKG_USING_TINYFRAME is not set
# CONFIG_PKG_USING_KENDRYTE_DEMO is not set
# CONFIG_PKG_USING_DIGITALCTRL is not set
# CONFIG_PKG_USING_UPACKER is not set
# CONFIG_PKG_USING_UPARAM is not set
#
# samples: kernel and components samples
...
...
@@ -354,7 +527,25 @@ CONFIG_RT_USING_PIN=y
# 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_KI is not set
# CONFIG_PKG_USING_ARMv7M_DWT is not set
# CONFIG_PKG_USING_VT100 is not set
# CONFIG_PKG_USING_UKAL is not set
# CONFIG_PKG_USING_CRCLIB is not set
#
# entertainment: terminal games and other interesting software packages
#
# CONFIG_PKG_USING_THREES is not set
# CONFIG_PKG_USING_2048 is not set
# CONFIG_PKG_USING_SNAKE is not set
# CONFIG_PKG_USING_TETRIS is not set
# CONFIG_PKG_USING_DONUT is not set
# CONFIG_PKG_USING_ACLOCK is not set
# CONFIG_PKG_USING_LWGPS is not set
# CONFIG_PKG_USING_STATE_MACHINE is not set
# CONFIG_PKG_USING_MCURSES is not set
# CONFIG_PKG_USING_COWSAY is not set
CONFIG_SOC_FAMILY_STM32
=
y
CONFIG_SOC_SERIES_STM32F4
=
y
...
...
@@ -369,11 +560,12 @@ CONFIG_SOC_STM32F407ZG=y
CONFIG_BSP_USING_USB_TO_USART
=
y
# CONFIG_BSP_USING_COM2 is not set
# CONFIG_BSP_USING_COM3 is not set
# CONFIG_BSP_USING_SRAM is not set
# CONFIG_BSP_USING_SPI_FLASH is not set
# CONFIG_BSP_USING_EEPROM is not set
# CONFIG_BSP_USING_ETH is not set
# CONFIG_BSP_USING_MPU6050 is not set
# CONFIG_BSP_USING_
SDCARD
is not set
# CONFIG_BSP_USING_
FS
is not set
#
# On-chip Peripheral Drivers
...
...
@@ -394,9 +586,17 @@ CONFIG_BSP_USING_UART1=y
# CONFIG_BSP_USING_SPI is not set
# CONFIG_BSP_USING_ADC is not set
# CONFIG_BSP_USING_I2C1 is not set
# CONFIG_BSP_USING_DAC is not set
# CONFIG_BSP_USING_ONCHIP_RTC is not set
# CONFIG_BSP_USING_WDT is not set
# CONFIG_BSP_USING_SDIO is not set
# CONFIG_BSP_USING_USBD is not set
# CONFIG_BSP_USING_USBH is not set
# CONFIG_BSP_USING_PULSE_ENCODER is not set
# CONFIG_BSP_USING_EXT_FMC_IO is not set
# CONFIG_BSP_USING_FMC is not set
# CONFIG_BSP_USING_RNG is not set
# CONFIG_BSP_USING_UDID is not set
#
# Board extended module Drivers
...
...
bsp/stm32/stm32f407-atk-explorer/board/Kconfig
浏览文件 @
2589d245
...
...
@@ -71,18 +71,26 @@ menu "Onboard Peripheral Drivers"
select BSP_USING_I2C1
select PKG_USING_MPU6XXX
config BSP_USING_SDCARD
bool "Enable SDCARD (sdio)"
select BSP_USING_SDIO
menuconfig BSP_USING_FS
bool "Enable filesystem"
select RT_USING_DFS
select RT_USING_DFS_
ELMFAT
select RT_USING_DFS_
ROMFS
default n
config SDIO_MAX_FREQ
int "sdio max freq"
range 0 24000000
depends on BSP_USING_SDCARD
default 1000000
if BSP_USING_FS
config BSP_USING_SDCARD
bool "Enable SDCARD (FATFS)"
select BSP_USING_SDIO
select RT_USING_DFS
select RT_USING_DFS_ELMFAT
default n
config SDIO_MAX_FREQ
int "sdio max freq"
range 0 24000000
depends on BSP_USING_SDCARD
default 1000000
endif
endmenu
...
...
bsp/stm32/stm32f407-atk-explorer/board/SConscript
浏览文件 @
2589d245
...
...
@@ -18,8 +18,8 @@ if GetDepend(['BSP_USING_ETH']):
if
GetDepend
([
'BSP_USING_SPI_FLASH'
]):
src
+=
Glob
(
'ports/spi_flash_init.c'
)
if
GetDepend
([
'BSP_USING_
SDCARD
'
]):
src
+=
Glob
(
'ports/drv_
sdcard
.c'
)
if
GetDepend
([
'BSP_USING_
FS
'
]):
src
+=
Glob
(
'ports/drv_
filesystem
.c'
)
if
GetDepend
([
'BSP_USING_SRAM'
]):
src
+=
Glob
(
'ports/drv_sram.c'
)
...
...
bsp/stm32/stm32f407-atk-explorer/board/ports/drv_
sdcard
.c
→
bsp/stm32/stm32f407-atk-explorer/board/ports/drv_
filesystem
.c
浏览文件 @
2589d245
...
...
@@ -7,20 +7,28 @@
* Date Author Notes
* 2018-12-13 balanceTWK add sdcard port file
* 2021-05-10 Meco Man fix a bug that cannot use fatfs in the main thread at starting up
* 2021-07-28 Meco Man implement romfs as the root filesystem
*/
#include <rtthread.h>
#ifdef BSP_USING_SDCARD
#include <dfs_elm.h>
#ifdef BSP_USING_FS
#include <dfs_romfs.h>
#include <dfs_fs.h>
#include <dfs_posix.h>
#define DBG_TAG "app.card"
#if DFS_FILESYSTEMS_MAX < 4
#error "Please define DFS_FILESYSTEMS_MAX more than 4"
#endif
#if DFS_FILESYSTEM_TYPES_MAX < 4
#error "Please define DFS_FILESYSTEM_TYPES_MAX more than 4"
#endif
#define DBG_TAG "app.filesystem"
#define DBG_LVL DBG_INFO
#include <rtdbg.h>
#ifdef BSP_USING_SDCARD
static
void
sd_mount
(
void
*
parameter
)
{
while
(
1
)
...
...
@@ -28,14 +36,14 @@ static void sd_mount(void *parameter)
rt_thread_mdelay
(
500
);
if
(
rt_device_find
(
"sd0"
)
!=
RT_NULL
)
{
if
(
dfs_mount
(
"sd0"
,
"/"
,
"elm"
,
0
,
0
)
==
RT_EOK
)
if
(
dfs_mount
(
"sd0"
,
"/
sdcard
"
,
"elm"
,
0
,
0
)
==
RT_EOK
)
{
LOG_I
(
"sd card mount to '/'"
);
LOG_I
(
"sd card mount to '/
sdcard
'"
);
break
;
}
else
{
LOG_W
(
"sd card mount to '/' failed!"
);
LOG_W
(
"sd card mount to '/
sdcard
' failed!"
);
}
}
}
...
...
@@ -45,9 +53,9 @@ static int onboard_sdcard_mount(void)
{
rt_thread_t
tid
;
if
(
dfs_mount
(
"sd0"
,
"/"
,
"elm"
,
0
,
0
)
==
RT_EOK
)
if
(
dfs_mount
(
"sd0"
,
"/
sdcard
"
,
"elm"
,
0
,
0
)
==
RT_EOK
)
{
LOG_I
(
"sd card mount to '/'"
);
LOG_I
(
"sd card mount to '/
sdcard
'"
);
}
else
{
...
...
@@ -65,6 +73,33 @@ static int onboard_sdcard_mount(void)
return
RT_EOK
;
}
INIT_APP_EXPORT
(
onboard_sdcard_mount
);
#endif
static
const
struct
romfs_dirent
_romfs_root
[]
=
{
#ifdef BSP_USING_SDCARD
{
ROMFS_DIRENT_DIR
,
"sdcard"
,
RT_NULL
,
0
},
#endif
// {ROMFS_DIRENT_DIR, "flash", RT_NULL, 0},
};
const
struct
romfs_dirent
romfs_root
=
{
ROMFS_DIRENT_DIR
,
"/"
,
(
rt_uint8_t
*
)
_romfs_root
,
sizeof
(
_romfs_root
)
/
sizeof
(
_romfs_root
[
0
])
};
static
int
filesystem_mount
(
void
)
{
if
(
dfs_mount
(
RT_NULL
,
"/"
,
"rom"
,
0
,
&
(
romfs_root
))
!=
0
)
{
LOG_E
(
"rom mount to '/' failed!"
);
}
#ifdef BSP_USING_SDCARD
onboard_sdcard_mount
();
#endif
return
RT_EOK
;
}
INIT_APP_EXPORT
(
filesystem_mount
);
#endif
/* BSP_USING_
SDCARD
*/
#endif
/* BSP_USING_
FS
*/
bsp/stm32/stm32f407-atk-explorer/rtconfig.h
浏览文件 @
2589d245
...
...
@@ -16,6 +16,9 @@
#define RT_USING_IDLE_HOOK
#define RT_IDLE_HOOK_LIST_SIZE 4
#define IDLE_THREAD_STACK_SIZE 1024
/* kservice optimization */
#define RT_DEBUG
#define RT_DEBUG_COLOR
...
...
@@ -39,7 +42,7 @@
#define RT_USING_CONSOLE
#define RT_CONSOLEBUF_SIZE 128
#define RT_CONSOLE_DEVICE_NAME "uart1"
#define RT_VER_NUM 0x4000
2
#define RT_VER_NUM 0x4000
4
#define ARCH_ARM
#define RT_USING_CPU_FFS
#define ARCH_ARM_CORTEX_M
...
...
@@ -79,21 +82,18 @@
#define RT_USING_DEVICE_IPC
#define RT_PIPE_BUFSZ 512
#define RT_USING_SERIAL
#define RT_USING_SERIAL_V1
#define RT_SERIAL_USING_DMA
#define RT_SERIAL_RB_BUFSZ 64
#define RT_USING_PIN
/* Using Hardware Crypto drivers */
/* Using WiFi */
/* Using USB */
/* POSIX layer and C standard library */
#define RT_LIBC_USING_TIME
#define RT_LIBC_DEFAULT_TIMEZONE 8
/* Network */
...
...
@@ -106,9 +106,6 @@
/* light weight TCP/IP stack */
/* Modbus master and slave stack */
/* AT commands */
...
...
@@ -118,6 +115,9 @@
/* Utilities */
/* RT-Thread Utestcases */
/* RT-Thread online packages */
/* IoT - internet of things */
...
...
@@ -149,14 +149,23 @@
/* system packages */
/* Micrium: Micrium software products porting for RT-Thread */
/* peripheral libraries and drivers */
/* AI packages */
/* miscellaneous packages */
/* samples: kernel and components samples */
/* entertainment: terminal games and other interesting software packages */
#define SOC_FAMILY_STM32
#define SOC_SERIES_STM32F4
...
...
components/dfs/include/dfs_select.h
浏览文件 @
2589d245
...
...
@@ -10,7 +10,7 @@
#ifndef DFS_SELECT_H__
#define DFS_SELECT_H__
#include <
libc/libc_fdse
t.h>
#include <
sys/selec
t.h>
#ifdef __cplusplus
extern
"C"
{
...
...
components/drivers/include/ipc/workqueue.h
浏览文件 @
2589d245
...
...
@@ -69,7 +69,7 @@ rt_err_t rt_workqueue_critical_work(struct rt_workqueue *queue, struct rt_work *
#ifdef RT_USING_SYSTEM_WORKQUEUE
rt_err_t
rt_work_submit
(
struct
rt_work
*
work
,
rt_tick_t
time
);
rt_err_t
rt_work_cancel
(
struct
rt_work
*
work
);
#endif
#endif
/* RT_USING_SYSTEM_WORKQUEUE */
rt_inline
void
rt_work_init
(
struct
rt_work
*
work
,
void
(
*
work_func
)(
struct
rt_work
*
work
,
void
*
work_data
),
void
*
work_data
)
...
...
@@ -85,7 +85,6 @@ rt_inline void rt_work_init(struct rt_work *work, void (*work_func)(struct rt_wo
void
rt_delayed_work_init
(
struct
rt_delayed_work
*
work
,
void
(
*
work_func
)(
struct
rt_work
*
work
,
void
*
work_data
),
void
*
work_data
);
int
rt_work_sys_workqueue_init
(
void
);
#endif
#endif
/* RT_USING_HEAP */
#endif
components/drivers/src/workqueue.c
浏览文件 @
2589d245
...
...
@@ -358,7 +358,7 @@ rt_err_t rt_work_cancel(struct rt_work *work)
return
rt_workqueue_cancel_work
(
sys_workq
,
work
);
}
int
rt_work_sys_workqueue_init
(
void
)
static
int
rt_work_sys_workqueue_init
(
void
)
{
if
(
sys_workq
!=
RT_NULL
)
return
RT_EOK
;
...
...
@@ -370,5 +370,5 @@ int rt_work_sys_workqueue_init(void)
return
RT_EOK
;
}
INIT_PREV_EXPORT
(
rt_work_sys_workqueue_init
);
#endif
#endif
#endif
/* RT_USING_SYSTEM_WORKQUEUE */
#endif
/* RT_USING_HEAP */
components/libc/aio/posix_aio.c
浏览文件 @
2589d245
...
...
@@ -9,14 +9,8 @@
*/
#include <stdint.h>
#include <stdio.h>
#include <rthw.h>
#include <rtdevice.h>
#include <rtthread.h>
#include <dfs_posix.h>
#include "posix_aio.h"
struct
rt_workqueue
*
aio_queue
=
NULL
;
...
...
components/libc/aio/posix_aio.h
浏览文件 @
2589d245
...
...
@@ -11,6 +11,10 @@
#ifndef POSIX_AIO_H__
#define POSIX_AIO_H__
#include <stdio.h>
#include <sys/signal.h>
#include <rtdevice.h>
struct
aiocb
{
int
aio_fildes
;
/* File descriptor. */
...
...
components/libc/compilers/common/none-gcc/sys/errno.h
浏览文件 @
2589d245
...
...
@@ -7,8 +7,8 @@
* Date Author Notes
* 2021-05-22 Meco Man The first version.
*/
#ifndef _
SYS_ERRNO_H
#define _
SYS_ERRNO_H
#ifndef _
_SYS_ERRNO_H__
#define _
_SYS_ERRNO_H__
#if defined(__ARMCC_VERSION)
/*
...
...
components/libc/compilers/common/none-gcc/sys/stat.h
浏览文件 @
2589d245
...
...
@@ -6,3 +6,8 @@
* Change Logs:
* Date Author Notes
*/
#ifndef __SYS_STAT_H__
#define __SYS_STAT_H__
#endif
components/libc/compilers/common/none-gcc/sys/types.h
浏览文件 @
2589d245
...
...
@@ -8,8 +8,8 @@
* 2020-09-05 Meco Man fix bugs
* 2020-12-16 Meco Man add useconds_t
*/
#ifndef __TYPES_H__
#define __TYPES_H__
#ifndef __
SYS_
TYPES_H__
#define __
SYS_
TYPES_H__
#include <stdint.h>
...
...
components/libc/compilers/common/none-gcc/sys/unistd.h
浏览文件 @
2589d245
...
...
@@ -7,8 +7,8 @@
* Date Author Notes
* 2020-12-16 Meco Man add usleep
*/
#ifndef _
SYS_UNISTD_H
#define _
SYS_UNISTD_H
#ifndef _
_SYS_UNISTD_H__
#define _
_SYS_UNISTD_H__
#include <rtconfig.h>
#include "types.h"
...
...
include/libc/libc_fdse
t.h
→
components/libc/compilers/common/sys/selec
t.h
浏览文件 @
2589d245
...
...
@@ -5,56 +5,45 @@
*
* Change Logs:
* Date Author Notes
* 20
17-10-30 Bernard
The first version
* 20
21-07-21 Meco Man
The first version
*/
#ifndef
LIBC_FDSE
T_H__
#define
LIBC_FDSE
T_H__
#ifndef
__SYS_SELEC
T_H__
#define
__SYS_SELEC
T_H__
#include <rtconfig.h>
#if defined(RT_USING_NEWLIB) || defined(_WIN32) || (defined( __GNUC__ ) && !defined(__ARMCC_VERSION))
#include <sys/types.h>
#if defined(HAVE_SYS_SELECT_H)
#include <sys/select.h>
#endif
#else
#ifndef FD_SETSIZE
#define FD_SETSIZE 32
#endif
#ifdef SAL_USING_POSIX
#ifdef FD_SETSIZE
#undef FD_SETSIZE
#endif
#define FD_SETSIZE DFS_FD_MAX
#endif
# ifndef FD_SETSIZE
# define FD_SETSIZE 32
# endif
#endif
/* SAL_USING_POSIX */
#
define NBBY 8
/* number of bits in a byte */
#define NBBY 8
/* number of bits in a byte */
typedef
long
fd_mask
;
# define NFDBITS (sizeof (fd_mask) * NBBY)
/* bits per mask */
# ifndef howmany
# define howmany(x,y) (((x)+((y)-1))/(y))
# endif
/* We use a macro for fd_set so that including Sockets.h afterwards
can work. */
#define NFDBITS (sizeof (fd_mask) * NBBY)
/* bits per mask */
#ifndef howmany
#define howmany(x,y) (((x)+((y)-1))/(y))
#endif
#ifndef _SYS_TYPES_FD_SET
/* MIPS */
typedef
struct
_types_fd_set
{
fd_mask
fds_bits
[
howmany
(
FD_SETSIZE
,
NFDBITS
)];
}
_types_fd_set
;
#define fd_set _types_fd_set
# define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1L << ((n) % NFDBITS)))
# define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1L << ((n) % NFDBITS)))
# define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1L << ((n) % NFDBITS)))
# define FD_ZERO(p) memset((void*)(p), 0, sizeof(*(p)))
#define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1L << ((n) % NFDBITS)))
#define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1L << ((n) % NFDBITS)))
#define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1L << ((n) % NFDBITS)))
#define FD_ZERO(p) memset((void*)(p), 0, sizeof(*(p)))
#endif
/* _SYS_TYPES_FD_SET */
#endif
#endif
#endif
/* __SYS_SELECT_H__ */
include/libc/libc_
signal.h
→
components/libc/compilers/common/sys/
signal.h
浏览文件 @
2589d245
...
...
@@ -6,33 +6,27 @@
* Change Logs:
* Date Author Notes
* 2017-09-12 Bernard The first version
* 2021-07-21 Meco Man move to libc/common
*/
#ifndef
LIBC
_SIGNAL_H__
#define
LIBC
_SIGNAL_H__
#ifndef
__SYS
_SIGNAL_H__
#define
__SYS
_SIGNAL_H__
#ifdef __cplusplus
extern
"C"
{
#endif
#include <stdint.h>
#ifdef HAVE_CCONFIG_H
#include <cconfig.h>
#endif
#ifndef HAVE_SIGVAL
/* Signal Generation and Delivery, P1003.1b-1993, p. 63
NOTE: P1003.1c/D10, p. 34 adds sigev_notify_function and
sigev_notify_attributes to the sigevent structure. */
union
sigval
{
int
sival_int
;
/* Integer signal value */
void
*
sival_ptr
;
/* Pointer signal value */
};
#endif
#ifndef HAVE_SIGEVENT
struct
sigevent
{
int
sigev_notify
;
/* Notification type */
...
...
@@ -42,9 +36,7 @@ struct sigevent
/* Notification function */
void
*
sigev_notify_attributes
;
/* Notification Attributes, really pthread_attr_t */
};
#endif
#ifndef HAVE_SIGINFO
struct
siginfo
{
uint16_t
si_signo
;
...
...
@@ -53,26 +45,37 @@ struct siginfo
union
sigval
si_value
;
};
typedef
struct
siginfo
siginfo_t
;
#endif
#define SI_USER 0x01
/* Signal sent by kill(). */
#define SI_QUEUE 0x02
/* Signal sent by sigqueue(). */
#define SI_TIMER 0x03
/* Signal generated by expiration of a
timer set by timer_settime(). */
#define SI_ASYNCIO 0x04
/* Signal generated by completion of an
asynchronous I/O request. */
#define SI_MESGQ 0x05
/* Signal generated by arrival of a
message on an empty message queue. */
#if !defined(RT_USING_NEWLIB)
#define SI_TIMER 0x03
/* Signal generated by expiration of a timer set by timer_settime(). */
#define SI_ASYNCIO 0x04
/* Signal generated by completion of an asynchronous I/O request. */
#define SI_MESGQ 0x05
/* Signal generated by arrival of a message on an empty message queue. */
typedef
void
(
*
_sig_func_ptr
)(
int
);
typedef
unsigned
long
sigset_t
;
#endif
#include <signal.h>
struct
sigaction
{
_sig_func_ptr
sa_handler
;
sigset_t
sa_mask
;
int
sa_flags
;
};
#ifdef __ARMCC_VERSION
#define SIG_SETMASK 0
/* set mask with sigprocmask() */
#define SIG_BLOCK 1
/* set of signals to block */
#define SIG_UNBLOCK 2
/* set of signals to, well, unblock */
#define sigaddset(what,sig) (*(what) |= (1<<(sig)), 0)
#define sigdelset(what,sig) (*(what) &= ~(1<<(sig)), 0)
#define sigemptyset(what) (*(what) = 0, 0)
#define sigfillset(what) (*(what) = ~(0), 0)
#define sigismember(what,sig) (((*(what)) & (1<<(sig))) != 0)
int
sigprocmask
(
int
how
,
const
sigset_t
*
set
,
sigset_t
*
oset
);
int
sigaction
(
int
signum
,
const
struct
sigaction
*
act
,
struct
sigaction
*
oldact
);
#ifdef __ARMCC_VERSION
#define SIGHUP 1
/* #define SIGINT 2 */
#define SIGQUIT 3
...
...
@@ -103,28 +106,9 @@ typedef unsigned long sigset_t;
#define SIGRTMAX 31
#define NSIG 32
#define SIG_SETMASK 0
/* set mask with sigprocmask() */
#define SIG_BLOCK 1
/* set of signals to block */
#define SIG_UNBLOCK 2
/* set of signals to, well, unblock */
struct
sigaction
{
_sig_func_ptr
sa_handler
;
sigset_t
sa_mask
;
int
sa_flags
;
};
#define sigaddset(what,sig) (*(what) |= (1<<(sig)), 0)
#define sigdelset(what,sig) (*(what) &= ~(1<<(sig)), 0)
#define sigemptyset(what) (*(what) = 0, 0)
#define sigfillset(what) (*(what) = ~(0), 0)
#define sigismember(what,sig) (((*(what)) & (1<<(sig))) != 0)
int
sigprocmask
(
int
how
,
const
sigset_t
*
set
,
sigset_t
*
oset
);
int
sigaction
(
int
signum
,
const
struct
sigaction
*
act
,
struct
sigaction
*
oldact
);
#include <signal.h>
#elif defined(__IAR_SYSTEMS_ICC__)
#define SIGHUP 1
#define SIGINT 2
#define SIGQUIT 3
...
...
@@ -155,25 +139,51 @@ int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact)
#define SIGRTMAX 31
#define NSIG 32
#define SIG_SETMASK 0
/* set mask with sigprocmask() */
#define SIG_BLOCK 1
/* set of signals to block */
#define SIG_UNBLOCK 2
/* set of signals to, well, unblock */
struct
sigaction
{
_sig_func_ptr
sa_handler
;
sigset_t
sa_mask
;
int
sa_flags
;
};
#include <signal.h>
#define sigaddset(what,sig) (*(what) |= (1<<(sig)), 0)
#define sigdelset(what,sig) (*(what) &= ~(1<<(sig)), 0)
#define sigemptyset(what) (*(what) = 0, 0)
#define sigfillset(what) (*(what) = ~(0), 0)
#define sigismember(what,sig) (((*(what)) & (1<<(sig))) != 0)
#elif defined(__GNUC__)
#define SIGHUP 1
/* hangup */
#define SIGINT 2
/* interrupt */
#define SIGQUIT 3
/* quit */
#define SIGILL 4
/* illegal instruction (not reset when caught) */
#define SIGTRAP 5
/* trace trap (not reset when caught) */
#define SIGIOT 6
/* IOT instruction */
#define SIGABRT 6
/* used by abort, replace SIGIOT in the future */
#define SIGEMT 7
/* EMT instruction */
#define SIGFPE 8
/* floating point exception */
#define SIGKILL 9
/* kill (cannot be caught or ignored) */
#define SIGBUS 10
/* bus error */
#define SIGSEGV 11
/* segmentation violation */
#define SIGSYS 12
/* bad argument to system call */
#define SIGPIPE 13
/* write on a pipe with no one to read it */
#define SIGALRM 14
/* alarm clock */
#define SIGTERM 15
/* software termination signal from kill */
#define SIGURG 16
/* urgent condition on IO channel */
#define SIGSTOP 17
/* sendable stop signal not from tty */
#define SIGTSTP 18
/* stop signal from tty */
#define SIGCONT 19
/* continue a stopped process */
#define SIGCHLD 20
/* to parent on child stop or exit */
#define SIGCLD 20
/* System V name for SIGCHLD */
#define SIGTTIN 21
/* to readers pgrp upon background tty read */
#define SIGTTOU 22
/* like TTIN for output if (tp->t_local<OSTOP) */
#define SIGIO 23
/* input/output possible signal */
#define SIGPOLL SIGIO
/* System V name for SIGIO */
#define SIGXCPU 24
/* exceeded CPU time limit */
#define SIGXFSZ 25
/* exceeded file size limit */
#define SIGVTALRM 26
/* virtual time alarm */
#define SIGPROF 27
/* profiling time alarm */
#define SIGWINCH 28
/* window changed */
#define SIGLOST 29
/* resource lost (eg, record-lock lost) */
#define SIGUSR1 30
/* user defined signal 1 */
#define SIGUSR2 31
/* user defined signal 2 */
#define NSIG 32
/* signal 0 implied */
#ifndef _SIGNAL_H_
/* Some applications take advantage of the fact that <sys/signal.h>
* and <signal.h> are equivalent in glibc. Allow for that here. */
#include <signal.h>
#endif
int
sigprocmask
(
int
how
,
const
sigset_t
*
set
,
sigset_t
*
oset
);
int
sigaction
(
int
signum
,
const
struct
sigaction
*
act
,
struct
sigaction
*
oldact
);
#endif
#ifdef __cplusplus
...
...
components/libc/pthreads/mqueue.c
浏览文件 @
2589d245
...
...
@@ -8,6 +8,7 @@
*/
#include <string.h>
#include <sys/signal.h>
#include "mqueue.h"
#include "pthread_internal.h"
...
...
components/libc/signal/posix_signal.c
浏览文件 @
2589d245
...
...
@@ -7,6 +7,7 @@
* Date Author Notes
* 2017/10/1 Bernard The first version
*/
#include <rthw.h>
#include <rtthread.h>
...
...
@@ -14,6 +15,7 @@
#include <sys/errno.h>
#include "posix_signal.h"
#define sig_valid(sig_no) (sig_no >= 0 && sig_no < RT_SIG_MAX)
void
(
*
signal
(
int
sig
,
void
(
*
func
)(
int
)))
(
int
)
...
...
@@ -79,13 +81,10 @@ int sigtimedwait(const sigset_t *set, siginfo_t *info,
int
ret
=
0
;
int
tick
=
RT_WAITING_FOREVER
;
#ifdef RT_USING_PTHREADS
if
(
timeout
)
{
extern
int
clock_time_to_tick
(
const
struct
timespec
*
time
);
tick
=
rt_timespec_to_tick
(
timeout
);
}
#endif
ret
=
rt_signal_wait
(
set
,
info
,
tick
);
if
(
ret
==
0
)
return
0
;
...
...
components/libc/signal/posix_signal.h
浏览文件 @
2589d245
...
...
@@ -15,7 +15,6 @@
extern
"C"
{
#endif
#include <rtthread.h>
#include <sys/signal.h>
enum
rt_signal_value
{
...
...
components/net/at/at_socket/at_socket.c
浏览文件 @
2589d245
...
...
@@ -13,6 +13,7 @@
#include <string.h>
#include <ctype.h>
#include <sys/time.h>
#include <sys/errno.h>
#include <at_socket.h>
#include <at_device.h>
...
...
@@ -78,7 +79,7 @@ struct at_socket *at_get_socket(int socket)
}
/* get a block to the AT socket receive list*/
static
size
_t
at_recvpkt_put
(
rt_slist_t
*
rlist
,
const
char
*
ptr
,
size_t
length
)
static
rt_err
_t
at_recvpkt_put
(
rt_slist_t
*
rlist
,
const
char
*
ptr
,
size_t
length
)
{
at_recv_pkt_t
pkt
=
RT_NULL
;
...
...
@@ -86,7 +87,7 @@ static size_t at_recvpkt_put(rt_slist_t *rlist, const char *ptr, size_t length)
if
(
pkt
==
RT_NULL
)
{
LOG_E
(
"No memory for receive packet table!"
);
return
0
;
return
-
RT_ENOMEM
;
}
pkt
->
bfsz_totle
=
length
;
...
...
@@ -95,7 +96,7 @@ static size_t at_recvpkt_put(rt_slist_t *rlist, const char *ptr, size_t length)
rt_slist_append
(
rlist
,
&
pkt
->
list
);
return
length
;
return
RT_EOK
;
}
/* delete and free all receive buffer list */
...
...
@@ -651,14 +652,20 @@ static void at_recv_notice_cb(struct at_socket *sock, at_socket_evt_t event, con
RT_ASSERT
(
event
==
AT_SOCKET_EVT_RECV
);
/* check the socket object status */
if
(
sock
->
magic
!=
AT_SOCKET_MAGIC
)
if
(
sock
->
magic
!=
AT_SOCKET_MAGIC
||
sock
->
state
==
AT_SOCKET_CLOSED
)
{
rt_free
((
void
*
)
buff
);
return
;
}
/* put receive buffer to receiver packet list */
rt_mutex_take
(
sock
->
recv_lock
,
RT_WAITING_FOREVER
);
at_recvpkt_put
(
&
(
sock
->
recvpkt_list
),
buff
,
bfsz
);
if
(
at_recvpkt_put
(
&
(
sock
->
recvpkt_list
),
buff
,
bfsz
)
!=
RT_EOK
)
{
rt_free
((
void
*
)
buff
);
rt_mutex_release
(
sock
->
recv_lock
);
return
;
}
rt_mutex_release
(
sock
->
recv_lock
);
rt_sem_release
(
sock
->
recv_notice
);
...
...
components/net/at/src/at_client.c
浏览文件 @
2589d245
...
...
@@ -9,6 +9,7 @@
* 2018-04-12 chenyong add client implement
* 2018-08-17 chenyong multiple client support
* 2021-03-17 Meco Man fix a buf of leaking memory
* 2021-07-14 Sszl fix a buf of leaking memory
*/
#include <at.h>
...
...
@@ -571,30 +572,19 @@ int at_obj_set_urc_table(at_client_t client, const struct at_urc *urc_table, rt_
}
else
{
struct
at_urc_table
*
old_urc_table
=
RT_NULL
;
size_t
old_table_size
=
client
->
urc_table_size
*
sizeof
(
struct
at_urc_table
);
old_urc_table
=
(
struct
at_urc_table
*
)
rt_malloc
(
old_table_size
);
if
(
old_urc_table
==
RT_NULL
)
{
return
-
RT_ENOMEM
;
}
rt_memcpy
(
old_urc_table
,
client
->
urc_table
,
old_table_size
);
struct
at_urc_table
*
new_urc_table
=
RT_NULL
;
/* realloc urc table space */
client
->
urc_table
=
(
struct
at_urc_table
*
)
rt_realloc
(
client
->
urc_table
,
old_table_size
+
sizeof
(
struct
at_urc_table
));
if
(
client
->
urc_table
==
RT_NULL
)
new_urc_table
=
(
struct
at_urc_table
*
)
rt_realloc
(
client
->
urc_table
,
client
->
urc_table_size
*
sizeof
(
struct
at_urc_table
)
+
sizeof
(
struct
at_urc_table
));
if
(
new_urc_table
==
RT_NULL
)
{
rt_free
(
old_urc_table
);
return
-
RT_ENOMEM
;
}
rt_memcpy
(
client
->
urc_table
,
old_urc_table
,
old_table_size
)
;
client
->
urc_table
=
new_urc_table
;
client
->
urc_table
[
client
->
urc_table_size
].
urc
=
urc_table
;
client
->
urc_table
[
client
->
urc_table_size
].
urc_size
=
table_sz
;
client
->
urc_table_size
++
;
rt_free
(
old_urc_table
);
}
return
RT_EOK
;
...
...
components/net/sal_socket/include/socket/netdb.h
浏览文件 @
2589d245
...
...
@@ -6,7 +6,7 @@
* Change Logs:
* Date Author Notes
* 2015-02-17 Bernard First version
* 2
10
8-05-24 ChenYong Add socket abstraction layer
* 2
01
8-05-24 ChenYong Add socket abstraction layer
*/
#ifndef NETDB_H__
...
...
examples/kernel/event_simple.c
浏览文件 @
2589d245
...
...
@@ -83,7 +83,7 @@ static void thread3_entry(void *param)
int
event_simple_init
()
{
/* 初始化事件对象 */
rt_event_init
(
&
event
,
"event"
,
RT_IPC_FLAG_
FIF
O
);
rt_event_init
(
&
event
,
"event"
,
RT_IPC_FLAG_
PRI
O
);
/* 创建线程1 */
tid1
=
rt_thread_create
(
"t1"
,
...
...
examples/kernel/mbox_send_wait.c
浏览文件 @
2589d245
...
...
@@ -82,7 +82,7 @@ int mbox_send_wait_init()
"mbt"
,
/* 名称是mbt */
&
mb_pool
[
0
],
/* 邮箱用到的内存池是mb_pool */
sizeof
(
mb_pool
)
/
4
,
/* 大小是mb_pool大小除以4,因为一封邮件的大小是4字节 */
RT_IPC_FLAG_
FIFO
);
/* 采用FIF
O方式进行线程等待 */
RT_IPC_FLAG_
PRIO
);
/* 采用PRI
O方式进行线程等待 */
/* 创建线程1 */
tid1
=
rt_thread_create
(
"t1"
,
...
...
examples/kernel/mbox_simple.c
浏览文件 @
2589d245
...
...
@@ -80,7 +80,7 @@ int mbox_simple_init()
"mbt"
,
/* 名称是mbt */
&
mb_pool
[
0
],
/* 邮箱用到的内存池是mb_pool */
sizeof
(
mb_pool
)
/
4
,
/* 大小是mb_pool大小除以4,因为一封邮件的大小是4字节 */
RT_IPC_FLAG_
FIFO
);
/* 采用FIF
O方式进行线程等待 */
RT_IPC_FLAG_
PRIO
);
/* 采用PRI
O方式进行线程等待 */
/* 创建线程1 */
tid1
=
rt_thread_create
(
"t1"
,
...
...
examples/kernel/messageq_simple.c
浏览文件 @
2589d245
...
...
@@ -98,7 +98,7 @@ int messageq_simple_init()
&
msg_pool
[
0
],
/* 内存池指向msg_pool */
128
-
sizeof
(
void
*
),
/* 每个消息的大小是 128 - void* */
sizeof
(
msg_pool
),
/* 内存池的大小是msg_pool的大小 */
RT_IPC_FLAG_
FIFO
);
/* 如果有多个线程等待,按照先来先得到
的方法分配消息 */
RT_IPC_FLAG_
PRIO
);
/* 如果有多个线程等待,按照优先级由高到低
的方法分配消息 */
/* 创建线程1 */
tid1
=
rt_thread_create
(
"t1"
,
...
...
examples/kernel/mutex_priority.c
浏览文件 @
2589d245
...
...
@@ -281,7 +281,7 @@ static void thread29_entry(void* parameter)
static
int
mutex_simple_init
()
{
/* 创建互斥锁 */
mutex
=
rt_mutex_create
(
"mutex"
,
RT_IPC_FLAG_
FIF
O
);
mutex
=
rt_mutex_create
(
"mutex"
,
RT_IPC_FLAG_
PRI
O
);
if
(
mutex
==
RT_NULL
)
{
tc_stat
(
TC_STAT_END
|
TC_STAT_FAILED
);
...
...
examples/kernel/mutex_simple.c
浏览文件 @
2589d245
...
...
@@ -87,7 +87,7 @@ static void thread3_entry(void* parameter)
int
mutex_simple_init
()
{
/* 创建互斥锁 */
mutex
=
rt_mutex_create
(
"mutex"
,
RT_IPC_FLAG_
FIF
O
);
mutex
=
rt_mutex_create
(
"mutex"
,
RT_IPC_FLAG_
PRI
O
);
if
(
mutex
==
RT_NULL
)
{
tc_stat
(
TC_STAT_END
|
TC_STAT_FAILED
);
...
...
examples/kernel/semaphore_buffer_worker.c
浏览文件 @
2589d245
...
...
@@ -209,7 +209,7 @@ int semaphore_buffer_worker_init()
rb_init
(
&
working_rb
,
working_buffer
,
BUFFER_SIZE
);
/* 创建信号量 */
sem
=
rt_sem_create
(
"sem"
,
1
,
RT_IPC_FLAG_
FIF
O
);
sem
=
rt_sem_create
(
"sem"
,
1
,
RT_IPC_FLAG_
PRI
O
);
if
(
sem
==
RT_NULL
)
{
tc_stat
(
TC_STAT_END
|
TC_STAT_FAILED
);
...
...
examples/kernel/semaphore_dynamic.c
浏览文件 @
2589d245
...
...
@@ -78,7 +78,7 @@ static void thread_entry(void* parameter)
int
semaphore_dynamic_init
()
{
/* 创建一个信号量,初始值是0 */
sem
=
rt_sem_create
(
"sem"
,
0
,
RT_IPC_FLAG_
FIF
O
);
sem
=
rt_sem_create
(
"sem"
,
0
,
RT_IPC_FLAG_
PRI
O
);
if
(
sem
==
RT_NULL
)
{
tc_stat
(
TC_STAT_END
|
TC_STAT_FAILED
);
...
...
examples/kernel/semaphore_producer_consumer.c
浏览文件 @
2589d245
...
...
@@ -98,9 +98,9 @@ void consumer_thread_entry(void* parameter)
int
semaphore_producer_consumer_init
()
{
/* 初始化3个信号量 */
rt_sem_init
(
&
sem_lock
,
"lock"
,
1
,
RT_IPC_FLAG_
FIF
O
);
rt_sem_init
(
&
sem_empty
,
"empty"
,
MAXSEM
,
RT_IPC_FLAG_
FIF
O
);
rt_sem_init
(
&
sem_full
,
"full"
,
0
,
RT_IPC_FLAG_
FIF
O
);
rt_sem_init
(
&
sem_lock
,
"lock"
,
1
,
RT_IPC_FLAG_
PRI
O
);
rt_sem_init
(
&
sem_empty
,
"empty"
,
MAXSEM
,
RT_IPC_FLAG_
PRI
O
);
rt_sem_init
(
&
sem_full
,
"full"
,
0
,
RT_IPC_FLAG_
PRI
O
);
/* 创建线程1 */
producer_tid
=
rt_thread_create
(
"producer"
,
...
...
examples/kernel/semaphore_static.c
浏览文件 @
2589d245
...
...
@@ -81,7 +81,7 @@ int semaphore_static_init(void)
rt_err_t
result
;
/* 初始化信号量,初始值是0 */
result
=
rt_sem_init
(
&
sem
,
"sem"
,
0
,
RT_IPC_FLAG_
FIF
O
);
result
=
rt_sem_init
(
&
sem
,
"sem"
,
0
,
RT_IPC_FLAG_
PRI
O
);
if
(
result
!=
RT_EOK
)
{
tc_stat
(
TC_STAT_END
|
TC_STAT_FAILED
);
...
...
examples/kernel/tc_comm.c
浏览文件 @
2589d245
...
...
@@ -35,7 +35,7 @@ void tc_thread_entry(void* parameter)
struct
finsh_syscall
*
index
;
/* create tc semaphore */
rt_sem_init
(
&
_tc_sem
,
"tc"
,
0
,
RT_IPC_FLAG_
FIF
O
);
rt_sem_init
(
&
_tc_sem
,
"tc"
,
0
,
RT_IPC_FLAG_
PRI
O
);
do
{
for
(
index
=
_syscall_table_begin
;
index
<
_syscall_table_end
;
FINSH_NEXT_SYSCALL
(
index
))
...
...
examples/kernel/timer_timeout.c
浏览文件 @
2589d245
...
...
@@ -73,7 +73,7 @@ int timer_timeout_init()
&
msg_pool
[
0
],
/* 内存池指向msg_pool */
128
-
sizeof
(
void
*
),
/* 每个消息的大小是 128 - void* */
sizeof
(
msg_pool
),
/* 内存池的大小是msg_pool的大小 */
RT_IPC_FLAG_
FIFO
);
/* 如果有多个线程等待,按照先来先得到
的方法分配消息 */
RT_IPC_FLAG_
PRIO
);
/* 如果有多个线程等待,按照优先级由高到低
的方法分配消息 */
/* 创建线程 */
tid
=
rt_thread_create
(
"t"
,
...
...
examples/pm/wakeup_app.c
浏览文件 @
2589d245
...
...
@@ -61,7 +61,7 @@ static int wakeup_app(void)
{
rt_thread_t
tid
;
wakeup_event
=
rt_event_create
(
"wakup"
,
RT_IPC_FLAG_
FIF
O
);
wakeup_event
=
rt_event_create
(
"wakup"
,
RT_IPC_FLAG_
PRI
O
);
RT_ASSERT
(
wakeup_event
!=
RT_NULL
);
tid
=
rt_thread_create
(
"wakeup_app"
,
wakeup_app_entry
,
RT_NULL
,
...
...
include/rtdef.h
浏览文件 @
2589d245
...
...
@@ -510,7 +510,7 @@ typedef struct rt_timer *rt_timer_t;
* @addtogroup Signal
*/
#ifdef RT_USING_SIGNALS
#include <
libc/libc_
signal.h>
#include <
sys/
signal.h>
typedef
unsigned
long
rt_sigset_t
;
typedef
void
(
*
rt_sighandler_t
)(
int
signo
);
typedef
siginfo_t
rt_siginfo_t
;
...
...
include/rtlibc.h
浏览文件 @
2589d245
...
...
@@ -13,11 +13,8 @@
/* definitions for libc if toolchain has no these definitions */
#include "libc/libc_stat.h"
#include "libc/libc_fcntl.h"
#include "libc/libc_dirent.h"
#include "libc/libc_signal.h"
#include "libc/libc_fdset.h"
#ifndef RT_USING_LIBC
#if defined(__ARMCC_VERSION) || defined(__IAR_SYSTEMS_ICC__)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录