From 66b79ce2ead170e47f421c44f3804da6bebec18b Mon Sep 17 00:00:00 2001 From: zhangzheng <1358745329@qq.com> Date: Sun, 9 Mar 2025 20:52:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9ns=E4=B8=AD=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E7=9A=84=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mkrtos_knl/arch/cortex-m/.gitignore | 1 + mkrtos_knl/arch/cortex-m/link.lds | 90 ------------------------- mkrtos_user/server/init/src/nsfs/nsfs.c | 2 +- 3 files changed, 2 insertions(+), 91 deletions(-) create mode 100644 mkrtos_knl/arch/cortex-m/.gitignore delete mode 100644 mkrtos_knl/arch/cortex-m/link.lds diff --git a/mkrtos_knl/arch/cortex-m/.gitignore b/mkrtos_knl/arch/cortex-m/.gitignore new file mode 100644 index 000000000..cc753c1b4 --- /dev/null +++ b/mkrtos_knl/arch/cortex-m/.gitignore @@ -0,0 +1 @@ +/link.lds \ No newline at end of file diff --git a/mkrtos_knl/arch/cortex-m/link.lds b/mkrtos_knl/arch/cortex-m/link.lds deleted file mode 100644 index ee27d1a43..000000000 --- a/mkrtos_knl/arch/cortex-m/link.lds +++ /dev/null @@ -1,90 +0,0 @@ -ENTRY(Reset_Handler) -MEMORY -{ - RAM (arw) : ORIGIN = 0x20000000, LENGTH = 0x60000 - FLASH (arx) : ORIGIN = 0x8000000 + 0x3000 + 0x1000, LENGTH = 0x10000 -} -SECTIONS -{ - . = ORIGIN(FLASH); - .text : - { - KEEP(*(.isr_vector)) - *(.text) - *(.text*) - *(.rodata*) - } > FLASH - .text : - { - . = ALIGN(4); - *(.text) - *(.text*) - *(.glue_7) - *(.glue_7t) - *(.eh_frame) - KEEP (*(.init)) - KEEP (*(.fini)) - . = ALIGN(4); - _etext = .; - } >FLASH - .rodata : - { - . = ALIGN(4); - *(.rodata) - *(.rodata*) - . = ALIGN(4); - } >FLASH - .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH - .ARM : { - __exidx_start = .; - *(.ARM.exidx*) - __exidx_end = .; - } >FLASH - .preinit_array : - { - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP (*(.preinit_array*)) - PROVIDE_HIDDEN (__preinit_array_end = .); - } >FLASH - .init_array : - { - PROVIDE_HIDDEN (__init_array_start = .); - KEEP (*(SORT(.init_array.*))) - KEEP (*(.init_array*)) - PROVIDE_HIDDEN (__init_array_end = .); - } >FLASH - .fini_array : - { - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP (*(SORT(.fini_array.*))) - KEEP (*(.fini_array*)) - PROVIDE_HIDDEN (__fini_array_end = .); - } >FLASH - _sidata = LOADADDR(.data); - .data : - { - . = ALIGN(4); - _sdata = .; - *(.data) - *(.data*) - . = ALIGN(0x4); - _pre_cpu_data_start = .; - KEEP (*(.data.per_cpu)) - _pre_cpu_data_end = .; - . = ALIGN(4); - _edata = .; - } >RAM AT> FLASH - . = ALIGN(4); - .bss : - { - _sbss = .; - __bss_start__ = _sbss; - *(.bss) - *(.bss*) - *(COMMON) - . = ALIGN(4); - _ebss = .; - __bss_end__ = _ebss; - } >RAM - .ARM.attributes 0 : { *(.ARM.attributes) } -} diff --git a/mkrtos_user/server/init/src/nsfs/nsfs.c b/mkrtos_user/server/init/src/nsfs/nsfs.c index 7d85552ad..36b1c4406 100644 --- a/mkrtos_user/server/init/src/nsfs/nsfs.c +++ b/mkrtos_user/server/init/src/nsfs/nsfs.c @@ -387,7 +387,7 @@ int fs_ns_readdir(int fd, struct dirent *_dir) node_info = dir_info_cache_list[file->tmp_fd].info; _dir->d_reclen = sizeof(*_dir); - _dir->d_type = node_info->type == NODE_TYPE_DUMMY ? DT_DIR : DT_REG; // DT_REG‌; + _dir->d_type = node_info->type == NODE_TYPE_DUMMY ? DT_DIR : DT_CHR; // DT_REG‌; strncpy(_dir->d_name, node_info->name, sizeof(_dir->d_name)); _dir->d_name[sizeof(_dir->d_name) - 1] = 0;