diff --git a/bsp/imxrt1052-evk/drivers/drv_hp_rtc.c b/bsp/imxrt1052-evk/drivers/drv_hp_rtc.c index 29093e0eb8e2248547da2dd2ff117059bdc18371..42448ae737be4ce817078a78a01e9d5a7c2b54d1 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; } diff --git a/bsp/v2m-mps2/rtconfig.py b/bsp/v2m-mps2/rtconfig.py index b63ea11a9103d91b2348cff0e075238f3d3b549c..fd76abcf42b44b21abd41a86396618f2ea658c50 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) diff --git a/components/drivers/Kconfig b/components/drivers/Kconfig index 90ad1c940f87c3faf97bd2f347ffcd79909f6380..fc02b0eaedaab73769ae41ec55618f1d49773944 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 a33e1dfccf99f9fa510443ce83b64d736ab59529..f64a528ef0cc458f858c18802179a1161f8bef88 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 */ diff --git a/components/libc/compilers/armlibc/sys/unistd.h b/components/libc/compilers/armlibc/sys/unistd.h index 38ba8b5072d1232273f0ddd4e293d8005083bb81..56979955ba0a1ac9f61d23ec862e2c6e06a1a6db 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 */ diff --git a/components/libc/compilers/dlib/fcntl.h b/components/libc/compilers/dlib/fcntl.h new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/components/libc/compilers/dlib/sys/stat.h b/components/libc/compilers/dlib/sys/stat.h new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/components/libc/compilers/dlib/sys/unistd.h b/components/libc/compilers/dlib/sys/unistd.h index 06a46746c0549a85f00e2bc813fc6801bf1657c0..dbe4f3010df9fa1439d0592cc0d06c3208a96fbe 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 */ diff --git a/include/libc/libc_stat.h b/include/libc/libc_stat.h index 69871dd101a74c166a3fea8af467fc10597b2eab..26752393db68c24343f3eea76df2fd900c38a6cc 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