From fed25c720e2779818d6d1b0e76a170b400725326 Mon Sep 17 00:00:00 2001 From: armink Date: Tue, 20 Mar 2018 17:36:08 +0800 Subject: [PATCH 1/7] [Libc][dlib] Add fcntl.h and sys/stat.h to dlib. --- components/libc/compilers/dlib/fcntl.h | 0 components/libc/compilers/dlib/sys/stat.h | 0 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 components/libc/compilers/dlib/fcntl.h create mode 100644 components/libc/compilers/dlib/sys/stat.h diff --git a/components/libc/compilers/dlib/fcntl.h b/components/libc/compilers/dlib/fcntl.h new file mode 100644 index 0000000000..e69de29bb2 diff --git a/components/libc/compilers/dlib/sys/stat.h b/components/libc/compilers/dlib/sys/stat.h new file mode 100644 index 0000000000..e69de29bb2 From 991baa7a04644c355a7ccaf2d08b837a7657396c Mon Sep 17 00:00:00 2001 From: armink Date: Tue, 20 Mar 2018 17:50:12 +0800 Subject: [PATCH 2/7] [Libc][dlib] Add STDIN_FILENO, STDOUT_FILENO and STDERR_FILENO to dlib sys/unistd.h . --- components/libc/compilers/dlib/sys/unistd.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/libc/compilers/dlib/sys/unistd.h b/components/libc/compilers/dlib/sys/unistd.h index 06a46746c0..dbe4f3010d 100644 --- a/components/libc/compilers/dlib/sys/unistd.h +++ b/components/libc/compilers/dlib/sys/unistd.h @@ -2,6 +2,11 @@ #define _SYS_UNISTD_H #ifdef RT_USING_DFS + +#define STDIN_FILENO 0 /* standard input file descriptor */ +#define STDOUT_FILENO 1 /* standard output file descriptor */ +#define STDERR_FILENO 2 /* standard error file descriptor */ + #include #else #define _FREAD 0x0001 /* read enabled */ From c6e928a780cf28a03e963d62a1a731d7675cf134 Mon Sep 17 00:00:00 2001 From: armink Date: Tue, 20 Mar 2018 17:51:12 +0800 Subject: [PATCH 3/7] [Libc] Update struct stat on libc_stat.h . --- include/libc/libc_stat.h | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/include/libc/libc_stat.h b/include/libc/libc_stat.h index 69871dd101..26752393db 100644 --- a/include/libc/libc_stat.h +++ b/include/libc/libc_stat.h @@ -77,11 +77,23 @@ struct stat { - struct rt_device* st_dev; - uint16_t st_mode; - uint32_t st_size; - time_t st_mtime; - uint32_t st_blksize; + struct rt_device *st_dev; + uint16_t st_ino; + uint16_t st_mode; + uint16_t st_nlink; + uint16_t st_uid; + uint16_t st_gid; + struct rt_device *st_rdev; + uint32_t st_size; + time_t st_atime; + long st_spare1; + time_t st_mtime; + long st_spare2; + time_t st_ctime; + long st_spare3; + uint32_t st_blksize; + uint32_t st_blocks; + long st_spare4[2]; }; #endif From c74bc870e859e38f6e5bc57bac8b88de39984454 Mon Sep 17 00:00:00 2001 From: armink Date: Wed, 21 Mar 2018 09:13:49 +0800 Subject: [PATCH 4/7] [DeviceDriver][RTC] Fix rtc Kconfig and missing return. --- components/drivers/Kconfig | 1 + components/drivers/rtc/rtc.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/components/drivers/Kconfig b/components/drivers/Kconfig index 90ad1c940f..fc02b0eaed 100755 --- a/components/drivers/Kconfig +++ b/components/drivers/Kconfig @@ -90,6 +90,7 @@ config RT_USING_RTC default n config RTC_SYNC_USING_NTP bool "Using NTP auto sync RTC time" + select PKG_USING_NETUTILS select PKG_NETUTILS_NTP default n diff --git a/components/drivers/rtc/rtc.c b/components/drivers/rtc/rtc.c index a33e1dfccf..f64a528ef0 100644 --- a/components/drivers/rtc/rtc.c +++ b/components/drivers/rtc/rtc.c @@ -225,6 +225,8 @@ int rt_rtc_ntp_sync_init(void) } init_ok = RT_TRUE; + + return RT_EOK; } INIT_COMPONENT_EXPORT(rt_rtc_ntp_sync_init); #endif /* RTC_SYNC_USING_NTP */ From 9b3b6989fa96e159893f3acbcd0edb0daac041fa Mon Sep 17 00:00:00 2001 From: liang yongxiang Date: Wed, 21 Mar 2018 10:08:03 +0800 Subject: [PATCH 5/7] [bsp][v2m-mps2] fix "scons --target=mdk5" error --- bsp/v2m-mps2/rtconfig.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/bsp/v2m-mps2/rtconfig.py b/bsp/v2m-mps2/rtconfig.py index b63ea11a91..fd76abcf42 100644 --- a/bsp/v2m-mps2/rtconfig.py +++ b/bsp/v2m-mps2/rtconfig.py @@ -5,9 +5,6 @@ ARCH='arm' CPU='cortex-m7' CROSS_TOOL='keil' -if os.getenv('RTT_CC'): - CROSS_TOOL = os.getenv('RTT_CC') - if CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = 'C:/Keil_v5' @@ -48,7 +45,6 @@ if PLATFORM == 'armcc': CFLAGS += ' --c99' POST_ACTION = 'fromelf -z $TARGET' - # POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET' else: print("only support armcc in this bsp") exit(-1) From b27b1d80322bf6cfc3e5854a64aa014ffc31cec2 Mon Sep 17 00:00:00 2001 From: armink Date: Thu, 22 Mar 2018 12:09:39 +0800 Subject: [PATCH 6/7] [Libc][armlibc] Add STDIN_FILENO, STDOUT_FILENO and STDERR_FILENO to armlibc/sys/unistd.h. --- components/libc/compilers/armlibc/sys/unistd.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/libc/compilers/armlibc/sys/unistd.h b/components/libc/compilers/armlibc/sys/unistd.h index 38ba8b5072..56979955ba 100644 --- a/components/libc/compilers/armlibc/sys/unistd.h +++ b/components/libc/compilers/armlibc/sys/unistd.h @@ -4,6 +4,11 @@ #include #ifdef RT_USING_DFS + +#define STDIN_FILENO 0 /* standard input file descriptor */ +#define STDOUT_FILENO 1 /* standard output file descriptor */ +#define STDERR_FILENO 2 /* standard error file descriptor */ + #include #else #define _FREAD 0x0001 /* read enabled */ From 144e63eae2476867baaf151ade263a6785a37607 Mon Sep 17 00:00:00 2001 From: liuguang <1004383796@qq.com> Date: Fri, 23 Mar 2018 09:54:12 +0800 Subject: [PATCH 7/7] =?UTF-8?q?[BSP]=20delete=20rtc=20driver=20error=20mes?= =?UTF-8?q?sage.=20|=20=E5=88=A0=E9=99=A4RTC=E9=A9=B1=E5=8A=A8=E7=9A=84?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E4=BF=A1=E6=81=AF.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bsp/imxrt1052-evk/drivers/drv_hp_rtc.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/bsp/imxrt1052-evk/drivers/drv_hp_rtc.c b/bsp/imxrt1052-evk/drivers/drv_hp_rtc.c index 29093e0eb8..42448ae737 100644 --- a/bsp/imxrt1052-evk/drivers/drv_hp_rtc.c +++ b/bsp/imxrt1052-evk/drivers/drv_hp_rtc.c @@ -61,7 +61,6 @@ static int set_timestamp(time_t timestamp) return RT_EOK; } -/* 驱动接口 */ static rt_err_t rt1052_hp_rtc_init(rt_device_t dev) { snvs_hp_rtc_config_t snvsRtcConfig; @@ -112,7 +111,6 @@ static rt_err_t rt1052_hp_rtc_control(rt_device_t dev, int cmd, void *args) } break; - /* 无效参数 */ default: return RT_EINVAL; }