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;