From 189980406c97dce6386dea958df58b564f0f7d95 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 24 Oct 2025 01:25:27 +0000 Subject: [PATCH 1/6] Initial plan From 60c9bc235058770dd336e17e1f3d44593744ca49 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 24 Oct 2025 01:31:21 +0000 Subject: [PATCH 2/6] Remove all FINSH_FUNCTION_EXPORT_ALIAS calls and macro definitions Co-authored-by: BernardXiong <1241087+BernardXiong@users.noreply.github.com> --- .../sunxi-hal/hal/source/disp2/disp/disp_debug.c | 2 -- .../hal/test/disp2/disp_layer_alpha_test.c | 2 -- .../sunxi-hal/hal/test/disp2/disp_layer_cfg.c | 4 ---- .../hal/test/disp2/disp_layer_format_test.c | 2 -- .../sunxi-hal/hal/test/disp2/disp_layer_rgb_test.c | 2 -- .../sunxi-hal/hal/test/disp2/disp_layer_scal_test.c | 2 -- .../sunxi-hal/hal/test/disp2/disp_lbc_test.c | 6 ------ .../libraries/sunxi-hal/hal/test/disp2/disp_mem.c | 2 -- bsp/at91/at91sam9260/platform/reset.c | 3 --- bsp/fujitsu/mb9x/mb9bf506r/drivers/nand.c | 5 ----- bsp/simulator/drivers/board.c | 2 -- bsp/simulator/drivers/module_win32.c | 5 +---- components/dfs/dfs_v1/src/dfs_posix.c | 4 +--- components/dfs/dfs_v2/src/dfs_posix.c | 4 +--- components/drivers/mtd/mtd_nand.c | 9 +-------- components/drivers/pm/pm.c | 1 - components/finsh/finsh.h | 11 ----------- components/vbus/vbus.c | 13 +------------ include/rtdef.h | 1 - libcpu/arm/realview-a8-vmm/gic.c | 5 +---- 20 files changed, 6 insertions(+), 79 deletions(-) diff --git a/bsp/allwinner/libraries/sunxi-hal/hal/source/disp2/disp/disp_debug.c b/bsp/allwinner/libraries/sunxi-hal/hal/source/disp2/disp/disp_debug.c index 98defd1f783..a7a5b0918cb 100644 --- a/bsp/allwinner/libraries/sunxi-hal/hal/source/disp2/disp/disp_debug.c +++ b/bsp/allwinner/libraries/sunxi-hal/hal/source/disp2/disp/disp_debug.c @@ -183,5 +183,3 @@ static int cmd_disp_debug(int argc, const char **argv) } return 0; } - -FINSH_FUNCTION_EXPORT_ALIAS(cmd_disp_debug, __cmd_disp, disp cmd); diff --git a/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_layer_alpha_test.c b/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_layer_alpha_test.c index 8665d8dd237..5603c3cf831 100644 --- a/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_layer_alpha_test.c +++ b/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_layer_alpha_test.c @@ -130,5 +130,3 @@ int disp_layer_alpha_test(int argc, char **argv) disp_mem_clear(1); return 0; } - -FINSH_FUNCTION_EXPORT_ALIAS(disp_layer_alpha_test, __cmd_disp_layer_alpha_test, disp_layer_alpha_test); diff --git a/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_layer_cfg.c b/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_layer_cfg.c index a4c4b108c59..2f2eba9fd1d 100644 --- a/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_layer_cfg.c +++ b/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_layer_cfg.c @@ -556,7 +556,3 @@ int parse_cmdline_and_set_config(int argc, char **argv) } } - - -FINSH_FUNCTION_EXPORT_ALIAS(parse_cmdline_and_set_config, disp_layer_cfg, disp set layer); - diff --git a/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_layer_format_test.c b/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_layer_format_test.c index 2aae97a8680..18a7585daac 100644 --- a/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_layer_format_test.c +++ b/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_layer_format_test.c @@ -134,5 +134,3 @@ int disp_layer_format_test(int argc, char **argv) return 0; } - -FINSH_FUNCTION_EXPORT_ALIAS(disp_layer_format_test, __cmd_disp_layer_format_test, disp_layer_format_test); diff --git a/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_layer_rgb_test.c b/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_layer_rgb_test.c index 607dfc7c220..f7a990646da 100644 --- a/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_layer_rgb_test.c +++ b/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_layer_rgb_test.c @@ -78,5 +78,3 @@ int disp_layer_rgb_test(int argc, char **argv) return 0; } - -FINSH_FUNCTION_EXPORT_ALIAS(disp_layer_rgb_test, __cmd_disp_layer_rgb_test, disp_layer_rgb_test); diff --git a/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_layer_scal_test.c b/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_layer_scal_test.c index 0c868bc4855..0e061fce9c2 100644 --- a/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_layer_scal_test.c +++ b/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_layer_scal_test.c @@ -145,5 +145,3 @@ int disp_layer_scal_test(int argc, char **argv) return 0; } - -FINSH_FUNCTION_EXPORT_ALIAS(disp_layer_scal_test, __cmd_disp_layer_scal_test, disp_layer_scal_test); diff --git a/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_lbc_test.c b/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_lbc_test.c index 169eebc9629..b3b1cf5687b 100644 --- a/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_lbc_test.c +++ b/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_lbc_test.c @@ -157,9 +157,3 @@ int lbc_test(int argc, char **argv) return 0; } - - - - -FINSH_FUNCTION_EXPORT_ALIAS(lbc_test, __cmd_disp_lbc_test, disp lbc test); - diff --git a/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_mem.c b/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_mem.c index 0b483b289bd..c820143b811 100644 --- a/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_mem.c +++ b/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_mem.c @@ -264,5 +264,3 @@ int parse_cmdline_and_alloc(int argc, char **argv) } } -FINSH_FUNCTION_EXPORT_ALIAS(parse_cmdline_and_alloc, disp_mem, disp mem); - diff --git a/bsp/at91/at91sam9260/platform/reset.c b/bsp/at91/at91sam9260/platform/reset.c index 6679ab57fe4..e9b7688975e 100644 --- a/bsp/at91/at91sam9260/platform/reset.c +++ b/bsp/at91/at91sam9260/platform/reset.c @@ -29,9 +29,6 @@ void machine_shutdown(void) #ifdef RT_USING_FINSH -#include -FINSH_FUNCTION_EXPORT_ALIAS(rt_hw_cpu_reset, reset, restart the system); - #ifdef FINSH_USING_MSH int cmd_reset(int argc, char** argv) { diff --git a/bsp/fujitsu/mb9x/mb9bf506r/drivers/nand.c b/bsp/fujitsu/mb9x/mb9bf506r/drivers/nand.c index 1cf3fcf95e8..4a09ee5b603 100644 --- a/bsp/fujitsu/mb9x/mb9bf506r/drivers/nand.c +++ b/bsp/fujitsu/mb9x/mb9bf506r/drivers/nand.c @@ -620,7 +620,6 @@ void nand_read(int block, int page) rt_kprintf("oob data:\n"); dump_mem(nand_oob, 16); } -FINSH_FUNCTION_EXPORT_ALIAS(nand_read, read_page, read page[block/page]); void nand_write(int block, int page) { @@ -630,13 +629,11 @@ void nand_write(int block, int page) NF_WritePage(block, page, nand_buffer); } -FINSH_FUNCTION_EXPORT_ALIAS(nand_write, write_page, write page[block/page]); void nand_erase(int block) { NF_EraseBlock(block); } -FINSH_FUNCTION_EXPORT_ALIAS(nand_erase, erase_block, erase block[block]); void nand_readoob(int block, int page) { @@ -646,7 +643,6 @@ void nand_readoob(int block, int page) rt_kprintf("oob data:\n"); dump_mem(nand_oob, 16); } -FINSH_FUNCTION_EXPORT_ALIAS(nand_readoob, readoob, read oob[block/page]); void nand_erase_chip(void) { @@ -661,5 +657,4 @@ void nand_erase_chip(void) NF_EraseBlock(i); } } -FINSH_FUNCTION_EXPORT_ALIAS(nand_erase_chip, erase_chip, erase whole chip); #endif diff --git a/bsp/simulator/drivers/board.c b/bsp/simulator/drivers/board.c index 5d66ae231cc..288ad5f6a59 100755 --- a/bsp/simulator/drivers/board.c +++ b/bsp/simulator/drivers/board.c @@ -83,8 +83,6 @@ void rt_hw_exit(void) } #if defined(RT_USING_FINSH) -#include -FINSH_FUNCTION_EXPORT_ALIAS(rt_hw_exit, exit, exit rt - thread); MSH_CMD_EXPORT_ALIAS(rt_hw_exit, quit, exit rt-thread); #endif /* RT_USING_FINSH */ diff --git a/bsp/simulator/drivers/module_win32.c b/bsp/simulator/drivers/module_win32.c index 183497f5c68..b1501f4765e 100644 --- a/bsp/simulator/drivers/module_win32.c +++ b/bsp/simulator/drivers/module_win32.c @@ -347,10 +347,7 @@ rt_module_t rt_module_open(const char *path) /* FreeLibrary(hinstlib); */ } -#if defined(RT_USING_FINSH) -#include -FINSH_FUNCTION_EXPORT_ALIAS(rt_module_open, exec, exec module from a file); -#endif + #endif diff --git a/components/dfs/dfs_v1/src/dfs_posix.c b/components/dfs/dfs_v1/src/dfs_posix.c index f3d7b70c318..352cc0a3ab1 100644 --- a/components/dfs/dfs_v1/src/dfs_posix.c +++ b/components/dfs/dfs_v1/src/dfs_posix.c @@ -978,9 +978,7 @@ int chdir(const char *path) } RTM_EXPORT(chdir); -#ifdef RT_USING_FINSH -FINSH_FUNCTION_EXPORT_ALIAS(chdir, cd, change current working directory); -#endif + #endif /** diff --git a/components/dfs/dfs_v2/src/dfs_posix.c b/components/dfs/dfs_v2/src/dfs_posix.c index d0eff53a467..ec79a2547ce 100644 --- a/components/dfs/dfs_v2/src/dfs_posix.c +++ b/components/dfs/dfs_v2/src/dfs_posix.c @@ -1241,9 +1241,7 @@ int chdir(const char *path) } RTM_EXPORT(chdir); -#ifdef RT_USING_FINSH -FINSH_FUNCTION_EXPORT_ALIAS(chdir, cd, change current working directory); -#endif + #endif /** diff --git a/components/drivers/mtd/mtd_nand.c b/components/drivers/mtd/mtd_nand.c index 65402194c4f..95749520a8a 100644 --- a/components/drivers/mtd/mtd_nand.c +++ b/components/drivers/mtd/mtd_nand.c @@ -411,14 +411,7 @@ static void mtd_nand(int argc, char **argv) MSH_CMD_EXPORT(mtd_nand, MTD nand device test function); #endif /* RT_USING_FINSH */ -#ifndef RT_USING_FINSH_ONLY -FINSH_FUNCTION_EXPORT_ALIAS(mtd_nandid, nand_id, read ID - nandid(name)); -FINSH_FUNCTION_EXPORT_ALIAS(mtd_nand_read, nand_read, read page in nand - nand_read(name, block, page)); -FINSH_FUNCTION_EXPORT_ALIAS(mtd_nand_readoob, nand_readoob, read spare data in nand - nand_readoob(name, block, page)); -FINSH_FUNCTION_EXPORT_ALIAS(mtd_nand_write, nand_write, write dump data to nand - nand_write(name, block, page)); -FINSH_FUNCTION_EXPORT_ALIAS(mtd_nand_erase, nand_erase, nand_erase(name, block)); -FINSH_FUNCTION_EXPORT_ALIAS(mtd_nand_erase_all, nand_erase_all, erase all of nand device - nand_erase_all(name, block)); -#endif /* RT_USING_FINSH_ONLY */ + #endif /* defined(RT_MTD_NAND_DEBUG) && defined(RT_USING_FINSH) */ diff --git a/components/drivers/pm/pm.c b/components/drivers/pm/pm.c index b4ad3b2bbd9..e836c7462cc 100644 --- a/components/drivers/pm/pm.c +++ b/components/drivers/pm/pm.c @@ -1279,7 +1279,6 @@ static void rt_pm_dump_status(void) } rt_kprintf("+--------+------+------------+-----------+\n"); } -FINSH_FUNCTION_EXPORT_ALIAS(rt_pm_dump_status, pm_dump, dump power management status); MSH_CMD_EXPORT_ALIAS(rt_pm_dump_status, pm_dump, dump power management status); #endif diff --git a/components/finsh/finsh.h b/components/finsh/finsh.h index a40d1b3ed96..f6d959210d0 100644 --- a/components/finsh/finsh.h +++ b/components/finsh/finsh.h @@ -121,17 +121,6 @@ typedef long (*syscall_func)(void); */ #define FINSH_FUNCTION_EXPORT(name, desc) -/** - * @ingroup group_finsh - * - * @brief Exports a system function with an alias name to finsh shell. - * - * @param[in] name Name of function. - * @param[in] alias Alias name of function. - * @param[in] desc Description of function, which will show in help. - */ -#define FINSH_FUNCTION_EXPORT_ALIAS(name, alias, desc) - /** * @ingroup group_finsh * diff --git a/components/vbus/vbus.c b/components/vbus/vbus.c index 2adaac8dda6..e212f9078cd 100644 --- a/components/vbus/vbus.c +++ b/components/vbus/vbus.c @@ -1303,16 +1303,5 @@ void rt_vbus_chm_wm_dump(void) } #endif -#ifdef RT_USING_FINSH -#include -FINSH_FUNCTION_EXPORT_ALIAS(rt_vbus_rb_dump, vbrb, dump vbus ringbuffer status); -FINSH_FUNCTION_EXPORT_ALIAS(rt_vbus_chn_dump, vbchn, dump vbus channel status); -FINSH_FUNCTION_EXPORT_ALIAS(rt_vbus_sess_dump, vbses, dump vbus session status); -FINSH_FUNCTION_EXPORT_ALIAS(rt_vbus_que_dump, vbque, dump vbus out queue status); -FINSH_FUNCTION_EXPORT_ALIAS(rt_vbus_total_data_sz, vbtsz, total in data); -FINSH_FUNCTION_EXPORT_ALIAS(rt_vbus_data_pkt_dump, vbdq, dump the data queue); -#ifdef RT_VBUS_USING_FLOW_CONTROL -FINSH_FUNCTION_EXPORT_ALIAS(rt_vbus_chm_wm_dump, vbwm, dump vbus water mark status); -#endif -#endif + diff --git a/include/rtdef.h b/include/rtdef.h index a9a7bd06662..735d6722159 100644 --- a/include/rtdef.h +++ b/include/rtdef.h @@ -205,7 +205,6 @@ typedef int (*init_fn_t)(void); #if !defined(RT_USING_FINSH) /* define these to empty, even if not include finsh.h file */ #define FINSH_FUNCTION_EXPORT(name, desc) -#define FINSH_FUNCTION_EXPORT_ALIAS(name, alias, desc) #define MSH_CMD_EXPORT(command, desc) #define MSH_CMD_EXPORT_ALIAS(command, alias, desc) diff --git a/libcpu/arm/realview-a8-vmm/gic.c b/libcpu/arm/realview-a8-vmm/gic.c index 4bc80dd5efc..de6da116e73 100644 --- a/libcpu/arm/realview-a8-vmm/gic.c +++ b/libcpu/arm/realview-a8-vmm/gic.c @@ -182,10 +182,7 @@ void arm_gic_dump(rt_uint32_t index) } rt_kprintf("\n"); } -#ifdef RT_USING_FINSH -#include -FINSH_FUNCTION_EXPORT_ALIAS(arm_gic_dump, gic, show gic status); -#endif + int arm_gic_dist_init(rt_uint32_t index, rt_uint32_t dist_base, int irq_start) { From 42aef81d15347b138daf1f790c4bcf541cae3a02 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 24 Oct 2025 02:26:45 +0000 Subject: [PATCH 3/6] Remove extra blank lines left after FINSH_FUNCTION_EXPORT_ALIAS cleanup Co-authored-by: BernardXiong <1241087+BernardXiong@users.noreply.github.com> --- bsp/simulator/drivers/module_win32.c | 2 -- components/dfs/dfs_v1/src/dfs_posix.c | 1 - components/dfs/dfs_v2/src/dfs_posix.c | 1 - components/drivers/mtd/mtd_nand.c | 2 -- components/vbus/vbus.c | 2 -- libcpu/arm/realview-a8-vmm/gic.c | 1 - 6 files changed, 9 deletions(-) diff --git a/bsp/simulator/drivers/module_win32.c b/bsp/simulator/drivers/module_win32.c index b1501f4765e..0d4abd22ec5 100644 --- a/bsp/simulator/drivers/module_win32.c +++ b/bsp/simulator/drivers/module_win32.c @@ -347,8 +347,6 @@ rt_module_t rt_module_open(const char *path) /* FreeLibrary(hinstlib); */ } - - #endif #define RT_MODULE_ARG_MAX 8 diff --git a/components/dfs/dfs_v1/src/dfs_posix.c b/components/dfs/dfs_v1/src/dfs_posix.c index 352cc0a3ab1..1d705cbafe8 100644 --- a/components/dfs/dfs_v1/src/dfs_posix.c +++ b/components/dfs/dfs_v1/src/dfs_posix.c @@ -978,7 +978,6 @@ int chdir(const char *path) } RTM_EXPORT(chdir); - #endif /** diff --git a/components/dfs/dfs_v2/src/dfs_posix.c b/components/dfs/dfs_v2/src/dfs_posix.c index ec79a2547ce..da446e35ed5 100644 --- a/components/dfs/dfs_v2/src/dfs_posix.c +++ b/components/dfs/dfs_v2/src/dfs_posix.c @@ -1241,7 +1241,6 @@ int chdir(const char *path) } RTM_EXPORT(chdir); - #endif /** diff --git a/components/drivers/mtd/mtd_nand.c b/components/drivers/mtd/mtd_nand.c index 95749520a8a..0f17075751c 100644 --- a/components/drivers/mtd/mtd_nand.c +++ b/components/drivers/mtd/mtd_nand.c @@ -411,8 +411,6 @@ static void mtd_nand(int argc, char **argv) MSH_CMD_EXPORT(mtd_nand, MTD nand device test function); #endif /* RT_USING_FINSH */ - - #endif /* defined(RT_MTD_NAND_DEBUG) && defined(RT_USING_FINSH) */ #endif /* RT_USING_MTD_NAND */ diff --git a/components/vbus/vbus.c b/components/vbus/vbus.c index e212f9078cd..5e62488764c 100644 --- a/components/vbus/vbus.c +++ b/components/vbus/vbus.c @@ -1303,5 +1303,3 @@ void rt_vbus_chm_wm_dump(void) } #endif - - diff --git a/libcpu/arm/realview-a8-vmm/gic.c b/libcpu/arm/realview-a8-vmm/gic.c index de6da116e73..aad0ac3abaa 100644 --- a/libcpu/arm/realview-a8-vmm/gic.c +++ b/libcpu/arm/realview-a8-vmm/gic.c @@ -183,7 +183,6 @@ void arm_gic_dump(rt_uint32_t index) rt_kprintf("\n"); } - int arm_gic_dist_init(rt_uint32_t index, rt_uint32_t dist_base, int irq_start) { unsigned int gic_type, i; From f2d0b8a6265c17816454b658d96ff46691ebcdac Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 26 Oct 2025 07:04:31 +0000 Subject: [PATCH 4/6] Remove deprecated FINSH_FUNCTION_EXPORT macro and all usages Co-authored-by: Rbb666 <64397326+Rbb666@users.noreply.github.com> --- bsp/apollo2/board/led.c | 1 - bsp/asm9260t/platform/interrupt.c | 1 - bsp/at91/at91sam9260/applications/application.c | 1 - bsp/at91/at91sam9260/drivers/at91_mci.c | 2 -- bsp/at91/at91sam9260/drivers/at91_nand.c | 1 - bsp/at91/at91sam9g45/applications/application.c | 1 - bsp/at91/at91sam9g45/drivers/at91_mci.c | 2 -- bsp/dm365/applications/application.c | 1 - bsp/dm365/drivers/davinci_emac.c | 1 - bsp/dm365/platform/interrupt.c | 1 - bsp/efm32/dev_accel.c | 3 --- bsp/efm32/dev_led.c | 2 -- bsp/efm32/dev_misc.c | 2 -- bsp/efm32/dev_sflash.c | 1 - bsp/efm32/drv_emu.c | 1 - bsp/efm32/drv_ethernet.c | 3 --- bsp/efm32/drv_sdcard.c | 1 - bsp/frdm-k64f/board/drv_emac.c | 2 -- bsp/fujitsu/mb9x/mb9bf568r/drivers/led.c | 1 - bsp/fujitsu/mb9x/mb9bf618s/drivers/led.c | 1 - bsp/mini2440/drivers/dm9000.c | 1 - bsp/mini4020/drivers/dm9161.c | 1 - bsp/nxp/imx/imxrt/libraries/drivers/drv_eth.c | 7 ------- bsp/nxp/imx/imxrt/libraries/drivers/drv_sdio.c | 1 - bsp/nxp/lpc/lpc178x/applications/application.c | 1 - bsp/nxp/lpc/lpc178x/drivers/emac.c | 1 - bsp/nxp/lpc/lpc178x/drivers/lpc17xx_lcd.c | 1 - bsp/nxp/lpc/lpc408x/drivers/drv_emac.c | 1 - bsp/nxp/lpc/lpc408x/drivers/drv_led.c | 1 - bsp/nxp/lpc/lpc43xx/drivers/drv_emac.c | 1 - bsp/nxp/lpc/lpc43xx/drivers/drv_led.c | 1 - bsp/nxp/lpc/lpc5410x/drivers/drv_led.c | 1 - bsp/nxp/lpc/lpc54608-LPCXpresso/drivers/drv_emac.c | 4 ---- bsp/nxp/lpc/lpc54608-LPCXpresso/drivers/drv_lcd.c | 2 -- bsp/simulator/drivers/nanddrv_file.c | 1 - bsp/simulator/drivers/sd_sim.c | 1 - bsp/simulator/drivers/sst25vfxx_mtd_sim.c | 1 - bsp/simulator/pcap/pcap_netif.c | 1 - bsp/tm4c129x/drivers/drv_eth.c | 3 --- bsp/xplorer4330/drivers/drv_led.c | 1 - components/dfs/dfs_v1/src/dfs_file.c | 4 ---- components/dfs/dfs_v1/src/dfs_fs.c | 2 -- components/dfs/dfs_v2/src/dfs_file.c | 1 - components/dfs/dfs_v2/src/dfs_posix.c | 1 - components/drivers/spi/dev_spi_wifi_rw009.c | 3 --- components/drivers/spi/enc28j60.c | 1 - components/finsh/finsh.h | 11 ----------- components/net/lwip/lwip-1.4.1/src/apps/ping/ping.c | 1 - components/net/lwip/lwip-2.0.3/src/apps/ping/ping.c | 1 - .../net/lwip/lwip-2.0.3/src/apps/tftp/tftp_port.c | 1 - components/net/lwip/lwip-2.1.2/src/apps/ping/ping.c | 1 - .../net/lwip/lwip-2.1.2/src/apps/tftp/tftp_port.c | 1 - components/net/lwip/port/ethernetif.c | 5 ----- examples/file/listdir.c | 1 - examples/file/readspeed.c | 1 - examples/file/readwrite.c | 1 - examples/file/seekdir.c | 1 - examples/file/writespeed.c | 1 - examples/libc/dirent.c | 1 - examples/libc/env.c | 1 - examples/libc/ex1.c | 1 - examples/libc/ex2.c | 1 - examples/libc/ex3.c | 1 - examples/libc/ex4.c | 1 - examples/libc/ex5.c | 1 - examples/libc/ex6.c | 1 - examples/libc/ex7.c | 1 - examples/libc/file.c | 3 --- examples/libc/memory.c | 1 - examples/libc/mq.c | 1 - examples/libc/printf.c | 3 --- examples/libc/rand.c | 1 - examples/libc/sem.c | 1 - examples/libc/time.c | 1 - examples/network/chargen.c | 1 - examples/network/tcpsendpacket.c | 1 - examples/test/device_test.c | 1 - examples/test/dhry_1.c | 1 - examples/test/fs_test.c | 1 - examples/test/mem_test.c | 1 - examples/test/net_test.c | 1 - examples/test/rtc_test.c | 1 - examples/ymodem/echo.c | 1 - examples/ymodem/null.c | 1 - examples/ymodem/tofile.c | 1 - include/rtdef.h | 2 -- libcpu/arm/s3c24x0/rtc.c | 1 - 87 files changed, 133 deletions(-) diff --git a/bsp/apollo2/board/led.c b/bsp/apollo2/board/led.c index 53646676790..b48d1b6fe5f 100644 --- a/bsp/apollo2/board/led.c +++ b/bsp/apollo2/board/led.c @@ -140,7 +140,6 @@ void led(rt_uint32_t led, rt_uint32_t state) break; } } -FINSH_FUNCTION_EXPORT(led, turn led (0 - 3) on (1) or off (0).) #endif /*@}*/ diff --git a/bsp/asm9260t/platform/interrupt.c b/bsp/asm9260t/platform/interrupt.c index fd741de94bc..677e1353fa7 100644 --- a/bsp/asm9260t/platform/interrupt.c +++ b/bsp/asm9260t/platform/interrupt.c @@ -202,6 +202,5 @@ void list_irq(void) } #include -FINSH_FUNCTION_EXPORT(list_irq, list system irq); #endif diff --git a/bsp/at91/at91sam9260/applications/application.c b/bsp/at91/at91sam9260/applications/application.c index c1c5add6336..82eb2c8fe0c 100644 --- a/bsp/at91/at91sam9260/applications/application.c +++ b/bsp/at91/at91sam9260/applications/application.c @@ -152,7 +152,6 @@ void nfs_start(void) } #include "finsh.h" -FINSH_FUNCTION_EXPORT(nfs_start, start net filesystem); #endif /*@}*/ diff --git a/bsp/at91/at91sam9260/drivers/at91_mci.c b/bsp/at91/at91sam9260/drivers/at91_mci.c index 93ed7a2bdbe..6641c33cb73 100644 --- a/bsp/at91/at91sam9260/drivers/at91_mci.c +++ b/bsp/at91/at91sam9260/drivers/at91_mci.c @@ -892,7 +892,6 @@ int at91_mci_init(void) INIT_DEVICE_EXPORT(at91_mci_init); #include "finsh.h" -FINSH_FUNCTION_EXPORT(at91_mci_init, at91sam9260 sd init); void mci_dump(void) { @@ -907,4 +906,3 @@ void mci_dump(void) } } -FINSH_FUNCTION_EXPORT(mci_dump, dump register for mci); diff --git a/bsp/at91/at91sam9260/drivers/at91_nand.c b/bsp/at91/at91sam9260/drivers/at91_nand.c index 2fc5b2edc42..9844acba267 100644 --- a/bsp/at91/at91sam9260/drivers/at91_nand.c +++ b/bsp/at91/at91sam9260/drivers/at91_nand.c @@ -628,7 +628,6 @@ void nand_eraseall() at9260_nand_erase_block(RT_NULL, index); } } -FINSH_FUNCTION_EXPORT(nand_eraseall, erase all of block in the nand flash); #endif //RT_USING_FINSH diff --git a/bsp/at91/at91sam9g45/applications/application.c b/bsp/at91/at91sam9g45/applications/application.c index 9775bc81d26..f0a6be19e21 100644 --- a/bsp/at91/at91sam9g45/applications/application.c +++ b/bsp/at91/at91sam9g45/applications/application.c @@ -153,7 +153,6 @@ void nfs_start(void) } #include "finsh.h" -FINSH_FUNCTION_EXPORT(nfs_start, start net filesystem); #endif /*@}*/ diff --git a/bsp/at91/at91sam9g45/drivers/at91_mci.c b/bsp/at91/at91sam9g45/drivers/at91_mci.c index 0942e8aafed..78e48476a0b 100644 --- a/bsp/at91/at91sam9g45/drivers/at91_mci.c +++ b/bsp/at91/at91sam9g45/drivers/at91_mci.c @@ -892,7 +892,6 @@ int at91_mci_init(void) INIT_DEVICE_EXPORT(at91_mci_init); #include "finsh.h" -FINSH_FUNCTION_EXPORT(at91_mci_init, at91sam9260 sd init); void mci_dump(void) { @@ -907,4 +906,3 @@ void mci_dump(void) } } -FINSH_FUNCTION_EXPORT(mci_dump, dump register for mci); diff --git a/bsp/dm365/applications/application.c b/bsp/dm365/applications/application.c index e810f09ee69..47a25582c23 100644 --- a/bsp/dm365/applications/application.c +++ b/bsp/dm365/applications/application.c @@ -98,7 +98,6 @@ void nfs_start(void) } #include "finsh.h" -FINSH_FUNCTION_EXPORT(nfs_start, start net filesystem); #endif /*@}*/ diff --git a/bsp/dm365/drivers/davinci_emac.c b/bsp/dm365/drivers/davinci_emac.c index f294727c56e..c6a3e32272d 100644 --- a/bsp/dm365/drivers/davinci_emac.c +++ b/bsp/dm365/drivers/davinci_emac.c @@ -1741,7 +1741,6 @@ void dump_emac_stats(void) rt_kprintf("\n"); } -FINSH_FUNCTION_EXPORT(dump_emac_stats, dump emac statistics); #ifdef FINSH_USING_MSH int cmd_dump_emac_stats(int argc, char** argv) diff --git a/bsp/dm365/platform/interrupt.c b/bsp/dm365/platform/interrupt.c index ed601ccf061..dbf635cec82 100644 --- a/bsp/dm365/platform/interrupt.c +++ b/bsp/dm365/platform/interrupt.c @@ -278,7 +278,6 @@ void list_irq(void) } #include -FINSH_FUNCTION_EXPORT(list_irq, list system irq); #ifdef FINSH_USING_MSH int cmd_list_irq(int argc, char** argv) diff --git a/bsp/efm32/dev_accel.c b/bsp/efm32/dev_accel.c index fc90cad8739..6b4d60c7150 100644 --- a/bsp/efm32/dev_accel.c +++ b/bsp/efm32/dev_accel.c @@ -836,7 +836,6 @@ void accel_cal(rt_uint8_t mode, rt_uint32_t second) rt_kprintf("Calibration done.\n"); } -FINSH_FUNCTION_EXPORT(accel_cal, auto-zero calibration.) void list_accel(void) { @@ -845,7 +844,6 @@ void list_accel(void) efm_accel_get_data(&data, false); rt_kprintf("X: %d, Y: %d, Z: %d\n", data.x, data.y, data.z); } -FINSH_FUNCTION_EXPORT(list_accel, list accelerometer info.) void test_accel(rt_uint8_t mode) { @@ -880,7 +878,6 @@ void test_accel(rt_uint8_t mode) } } } -FINSH_FUNCTION_EXPORT(test_accel, list accelerometer info.) #endif #endif diff --git a/bsp/efm32/dev_led.c b/bsp/efm32/dev_led.c index 2163c699b11..7c8805eda46 100644 --- a/bsp/efm32/dev_led.c +++ b/bsp/efm32/dev_led.c @@ -189,7 +189,6 @@ void list_leds(void) #endif } } -FINSH_FUNCTION_EXPORT(list_leds, list all the LEDs.) void set_led(rt_uint32_t led, rt_uint32_t state) { @@ -206,7 +205,6 @@ void set_led(rt_uint32_t led, rt_uint32_t state) break; } } -FINSH_FUNCTION_EXPORT(set_led, turn led (0 - 3) on (1) or off (0).) #endif /***************************************************************************//** diff --git a/bsp/efm32/dev_misc.c b/bsp/efm32/dev_misc.c index 07c9ce8ac03..1beb90ce1e1 100644 --- a/bsp/efm32/dev_misc.c +++ b/bsp/efm32/dev_misc.c @@ -180,7 +180,6 @@ void list_temp(void) rt_kprintf("Temperature is %2d.%02d C\n", temp / 100, temp % 100); } -FINSH_FUNCTION_EXPORT(list_temp, list current temperature value.) void list_vdd(void) { @@ -188,7 +187,6 @@ void list_vdd(void) rt_kprintf("VDD is %1d.%02d V\n", vdd / 100, vdd % 100); } -FINSH_FUNCTION_EXPORT(list_vdd, list current VDD value.) #endif /* RT_USING_FINSH */ diff --git a/bsp/efm32/dev_sflash.c b/bsp/efm32/dev_sflash.c index fa94152886c..bb1f71eae78 100644 --- a/bsp/efm32/dev_sflash.c +++ b/bsp/efm32/dev_sflash.c @@ -395,7 +395,6 @@ void list_sflash(void) rt_kprintf(" Memory type:\t\t%x\n", buf[1]); rt_kprintf(" Memory capacity:\t%x\n", buf[2]); } -FINSH_FUNCTION_EXPORT(list_sflash, list the SPI Flash.) #endif #endif /* defined(EFM32_USING_SFLASH) */ diff --git a/bsp/efm32/drv_emu.c b/bsp/efm32/drv_emu.c index 79bd4c22ed5..222fdb6c430 100644 --- a/bsp/efm32/drv_emu.c +++ b/bsp/efm32/drv_emu.c @@ -244,7 +244,6 @@ void list_emu(void) rt_kprintf(" em4 token used %d\n", EMU_TASK_EM4_TOKEN_NUMBER - emu_task.em4.value); } -FINSH_FUNCTION_EXPORT(list_emu, list the EMU status) #endif /***************************************************************************//** diff --git a/bsp/efm32/drv_ethernet.c b/bsp/efm32/drv_ethernet.c index 7792f20158a..046f8b1386e 100644 --- a/bsp/efm32/drv_ethernet.c +++ b/bsp/efm32/drv_ethernet.c @@ -1075,7 +1075,6 @@ void list_eth(void) rt_kprintf(" TX is idle\n"); } } -FINSH_FUNCTION_EXPORT(list_eth, list the Ethernet device status.) #include "lwip\api.h" @@ -1184,7 +1183,6 @@ void list_myip(void) rt_kprintf("Current IP: [%s]\n", ip); } -FINSH_FUNCTION_EXPORT(list_myip, list the current IP address.) #if !defined(hostName) || !defined(userPwdB64) #error "The 'hostName' and 'userPwdB64' must be defined to use update_ip() function" @@ -1309,7 +1307,6 @@ void update_myip(char *ip) rt_kprintf("succeeded.\n", ip); } -FINSH_FUNCTION_EXPORT(update_myip, update DDNS with specified IP address.) #endif /* RT_USING_FINSH */ #endif /* defined(EFM32_USING_ETH_UTILS) */ diff --git a/bsp/efm32/drv_sdcard.c b/bsp/efm32/drv_sdcard.c index 7cb55367e9b..4eab0d2339a 100644 --- a/bsp/efm32/drv_sdcard.c +++ b/bsp/efm32/drv_sdcard.c @@ -1317,7 +1317,6 @@ void list_sd(void) capacity >>= 4; rt_kprintf(" Card capacity:\t\t%dMB\n", capacity); } -FINSH_FUNCTION_EXPORT(list_sd, list the SD card.) #endif #endif /* defined(EFM32_USING_SPISD) */ diff --git a/bsp/frdm-k64f/board/drv_emac.c b/bsp/frdm-k64f/board/drv_emac.c index 94ce23e4180..0236fa72edd 100644 --- a/bsp/frdm-k64f/board/drv_emac.c +++ b/bsp/frdm-k64f/board/drv_emac.c @@ -419,7 +419,6 @@ long k64_dump_tx_bd(void) return 0; } -FINSH_FUNCTION_EXPORT(k64_dump_tx_bd, dump all receive buffer descriptor); MSH_CMD_EXPORT(k64_dump_tx_bd, dump all receive buffer descriptor); long k64_dump_rx_bd(void) @@ -441,7 +440,6 @@ long k64_dump_rx_bd(void) return 0; } -FINSH_FUNCTION_EXPORT(k64_dump_rx_bd, dump all receive buffer descriptor); MSH_CMD_EXPORT(k64_dump_rx_bd, dump all receive buffer descriptor); #endif diff --git a/bsp/fujitsu/mb9x/mb9bf568r/drivers/led.c b/bsp/fujitsu/mb9x/mb9bf568r/drivers/led.c index 9e138d6f0bf..ff0006f267d 100644 --- a/bsp/fujitsu/mb9x/mb9bf568r/drivers/led.c +++ b/bsp/fujitsu/mb9x/mb9bf568r/drivers/led.c @@ -159,5 +159,4 @@ void led(rt_uint32_t led, rt_uint32_t value) rt_uint8_t led_value = value; rt_led_write(&fm4_led.parent, led, &led_value, 1); } -FINSH_FUNCTION_EXPORT(led, e.g:led(0,0)/led(0,1).) #endif diff --git a/bsp/fujitsu/mb9x/mb9bf618s/drivers/led.c b/bsp/fujitsu/mb9x/mb9bf618s/drivers/led.c index d26ab4f3333..03d1188fc48 100644 --- a/bsp/fujitsu/mb9x/mb9bf618s/drivers/led.c +++ b/bsp/fujitsu/mb9x/mb9bf618s/drivers/led.c @@ -162,5 +162,4 @@ void led(rt_uint32_t led, rt_uint32_t value) rt_uint8_t led_value = value; rt_led_write(&fm3_led.parent, led, &led_value, 1); } -FINSH_FUNCTION_EXPORT(led, e.g:led(0,100).) #endif diff --git a/bsp/mini2440/drivers/dm9000.c b/bsp/mini2440/drivers/dm9000.c index c3acda2c679..4e05eef23cc 100644 --- a/bsp/mini2440/drivers/dm9000.c +++ b/bsp/mini2440/drivers/dm9000.c @@ -669,5 +669,4 @@ void dm9000a(void) #ifdef RT_USING_FINSH #include -FINSH_FUNCTION_EXPORT(dm9000a, dm9000a register dump); #endif diff --git a/bsp/mini4020/drivers/dm9161.c b/bsp/mini4020/drivers/dm9161.c index 2e15c70ba55..66dc35f27f5 100644 --- a/bsp/mini4020/drivers/dm9161.c +++ b/bsp/mini4020/drivers/dm9161.c @@ -700,5 +700,4 @@ void dm9161a(void) #ifdef RT_USING_FINSH #include -FINSH_FUNCTION_EXPORT(dm9161a, dm9161a register dump); #endif diff --git a/bsp/nxp/imx/imxrt/libraries/drivers/drv_eth.c b/bsp/nxp/imx/imxrt/libraries/drivers/drv_eth.c index 5ab9fcf6f61..2b518798969 100644 --- a/bsp/nxp/imx/imxrt/libraries/drivers/drv_eth.c +++ b/bsp/nxp/imx/imxrt/libraries/drivers/drv_eth.c @@ -1313,12 +1313,5 @@ void enet_buf_info(void) } } -FINSH_FUNCTION_EXPORT(phy_read, read phy register); -FINSH_FUNCTION_EXPORT(phy_write, write phy register); -FINSH_FUNCTION_EXPORT(phy_dump, dump phy registers); -FINSH_FUNCTION_EXPORT(enet_reg_dump, dump enet registers); -FINSH_FUNCTION_EXPORT(enet_nvic_tog, toggle enet nvic pendding bit); -FINSH_FUNCTION_EXPORT(enet_rx_stat, dump enet rx statistic); -FINSH_FUNCTION_EXPORT(enet_buf_info, dump enet tx and tx buffer descripter); #endif diff --git a/bsp/nxp/imx/imxrt/libraries/drivers/drv_sdio.c b/bsp/nxp/imx/imxrt/libraries/drivers/drv_sdio.c index 229b3c3aef3..5af50fd80a1 100644 --- a/bsp/nxp/imx/imxrt/libraries/drivers/drv_sdio.c +++ b/bsp/nxp/imx/imxrt/libraries/drivers/drv_sdio.c @@ -395,7 +395,6 @@ static void log_toggle(int en) { enable_log = en; } -FINSH_FUNCTION_EXPORT(log_toggle, toglle log dumple); #endif static const struct rt_mmcsd_host_ops ops = diff --git a/bsp/nxp/lpc/lpc178x/applications/application.c b/bsp/nxp/lpc/lpc178x/applications/application.c index 1ffbd3be39a..58406e29ea4 100644 --- a/bsp/nxp/lpc/lpc178x/applications/application.c +++ b/bsp/nxp/lpc/lpc178x/applications/application.c @@ -201,5 +201,4 @@ void key(rt_uint32_t key) ekbd.type = RTGUI_KEYUP; rtgui_server_post_event((struct rtgui_event*)&ekbd, sizeof(ekbd)); } -FINSH_FUNCTION_EXPORT(key, send a key to gui server); #endif diff --git a/bsp/nxp/lpc/lpc178x/drivers/emac.c b/bsp/nxp/lpc/lpc178x/drivers/emac.c index 7314964f043..52a4a706184 100644 --- a/bsp/nxp/lpc/lpc178x/drivers/emac.c +++ b/bsp/nxp/lpc/lpc178x/drivers/emac.c @@ -546,6 +546,5 @@ void emac_dump() rt_kprintf("IntEnable: %08x\n", LPC_EMAC->IntEnable); rt_kprintf("IntStatus: %08x\n", LPC_EMAC->IntStatus); } -FINSH_FUNCTION_EXPORT(emac_dump, dump emac register); #endif diff --git a/bsp/nxp/lpc/lpc178x/drivers/lpc17xx_lcd.c b/bsp/nxp/lpc/lpc178x/drivers/lpc17xx_lcd.c index 2a84b026337..46830d0d5a8 100644 --- a/bsp/nxp/lpc/lpc178x/drivers/lpc17xx_lcd.c +++ b/bsp/nxp/lpc/lpc178x/drivers/lpc17xx_lcd.c @@ -96,5 +96,4 @@ void lcd_fill(uint8_t * start, uint8_t * end, uint8_t pixel) } #ifdef RT_USING_FINSH #include -FINSH_FUNCTION_EXPORT(lcd_fill, lcd_fill ); #endif diff --git a/bsp/nxp/lpc/lpc408x/drivers/drv_emac.c b/bsp/nxp/lpc/lpc408x/drivers/drv_emac.c index a92aba88459..3d250a698be 100644 --- a/bsp/nxp/lpc/lpc408x/drivers/drv_emac.c +++ b/bsp/nxp/lpc/lpc408x/drivers/drv_emac.c @@ -503,6 +503,5 @@ void emac_dump() rt_kprintf("IntEnable: %08x\n", LPC_EMAC->IntEnable); rt_kprintf("IntStatus: %08x\n", LPC_EMAC->IntStatus); } -FINSH_FUNCTION_EXPORT(emac_dump, dump emac register); #endif diff --git a/bsp/nxp/lpc/lpc408x/drivers/drv_led.c b/bsp/nxp/lpc/lpc408x/drivers/drv_led.c index 5c18ef67d1c..2fc6e3e923f 100644 --- a/bsp/nxp/lpc/lpc408x/drivers/drv_led.c +++ b/bsp/nxp/lpc/lpc408x/drivers/drv_led.c @@ -150,5 +150,4 @@ void led_test(rt_uint32_t led_num, rt_uint32_t value) rt_uint8_t led_value = value; rt_led_write(&led.parent, led_num, &led_value, 1); } -FINSH_FUNCTION_EXPORT(led_test, e.g: led_test(0, 100).) #endif diff --git a/bsp/nxp/lpc/lpc43xx/drivers/drv_emac.c b/bsp/nxp/lpc/lpc43xx/drivers/drv_emac.c index f88505fa88e..7f2ffb182b0 100644 --- a/bsp/nxp/lpc/lpc43xx/drivers/drv_emac.c +++ b/bsp/nxp/lpc/lpc43xx/drivers/drv_emac.c @@ -527,6 +527,5 @@ void emac_dump() rt_kprintf("IntEnable: %08x\n", LPC_EMAC->IntEnable); rt_kprintf("IntStatus: %08x\n", LPC_EMAC->IntStatus); } -FINSH_FUNCTION_EXPORT(emac_dump, dump emac register); #endif diff --git a/bsp/nxp/lpc/lpc43xx/drivers/drv_led.c b/bsp/nxp/lpc/lpc43xx/drivers/drv_led.c index 02ce94d548e..7568b19a09f 100644 --- a/bsp/nxp/lpc/lpc43xx/drivers/drv_led.c +++ b/bsp/nxp/lpc/lpc43xx/drivers/drv_led.c @@ -165,5 +165,4 @@ void led_test(rt_uint32_t led_num, rt_uint32_t value) rt_uint8_t led_value = value; rt_led_write(&led.parent, led_num, &led_value, 1); } -FINSH_FUNCTION_EXPORT(led_test, e.g: led_test(0, 100).) #endif diff --git a/bsp/nxp/lpc/lpc5410x/drivers/drv_led.c b/bsp/nxp/lpc/lpc5410x/drivers/drv_led.c index fc6ca6abedc..6115430e6fd 100644 --- a/bsp/nxp/lpc/lpc5410x/drivers/drv_led.c +++ b/bsp/nxp/lpc/lpc5410x/drivers/drv_led.c @@ -201,5 +201,4 @@ void led_test(rt_uint32_t led_num, rt_uint32_t value) rt_uint8_t led_value = value; rt_led_write(&led.parent, led_num, &led_value, 1); } -FINSH_FUNCTION_EXPORT(led_test, e.g: led_test(0, 100).) #endif diff --git a/bsp/nxp/lpc/lpc54608-LPCXpresso/drivers/drv_emac.c b/bsp/nxp/lpc/lpc54608-LPCXpresso/drivers/drv_emac.c index f24f6683f77..bc6624410cc 100644 --- a/bsp/nxp/lpc/lpc54608-LPCXpresso/drivers/drv_emac.c +++ b/bsp/nxp/lpc/lpc54608-LPCXpresso/drivers/drv_emac.c @@ -726,8 +726,4 @@ void emac_bd_dump(void) #ifdef RT_USING_FINSH #include -FINSH_FUNCTION_EXPORT(emac_stat, dump emac stat data); -FINSH_FUNCTION_EXPORT(phy_dump, dump phy registers); -FINSH_FUNCTION_EXPORT(emac_dump, dump emac registers); -FINSH_FUNCTION_EXPORT(emac_bd_dump, dump emac tx and rx descriptor); #endif diff --git a/bsp/nxp/lpc/lpc54608-LPCXpresso/drivers/drv_lcd.c b/bsp/nxp/lpc/lpc54608-LPCXpresso/drivers/drv_lcd.c index 260fb09f0e5..bfe354cd241 100644 --- a/bsp/nxp/lpc/lpc54608-LPCXpresso/drivers/drv_lcd.c +++ b/bsp/nxp/lpc/lpc54608-LPCXpresso/drivers/drv_lcd.c @@ -457,8 +457,6 @@ void lcd_test(void) } #ifdef RT_USING_FINSH #include -FINSH_FUNCTION_EXPORT(lcd_clear, lcd_clear); -FINSH_FUNCTION_EXPORT(lcd_test, lcd_test); #ifdef FINSH_USING_MSH MSH_CMD_EXPORT(lcd_clear, lcd_clear); MSH_CMD_EXPORT(lcd_test, lcd_test); diff --git a/bsp/simulator/drivers/nanddrv_file.c b/bsp/simulator/drivers/nanddrv_file.c index c47ffdbbe4e..e712bd90b5a 100644 --- a/bsp/simulator/drivers/nanddrv_file.c +++ b/bsp/simulator/drivers/nanddrv_file.c @@ -402,6 +402,5 @@ void nand_eraseall() nanddrv_file_erase_block(&_nanddrv_file_device, index); } } -FINSH_FUNCTION_EXPORT(nand_eraseall, erase all of block in the nand flash); #endif //RT_USING_FINSH diff --git a/bsp/simulator/drivers/sd_sim.c b/bsp/simulator/drivers/sd_sim.c index d28e93f7610..8b72fa9848d 100755 --- a/bsp/simulator/drivers/sd_sim.c +++ b/bsp/simulator/drivers/sd_sim.c @@ -219,5 +219,4 @@ int sd_erase(void) rt_free(buffer); return 0; } -FINSH_FUNCTION_EXPORT(sd_erase, erase all block in SPI flash); #endif diff --git a/bsp/simulator/drivers/sst25vfxx_mtd_sim.c b/bsp/simulator/drivers/sst25vfxx_mtd_sim.c index 3b34217ac2e..85693fc3228 100644 --- a/bsp/simulator/drivers/sst25vfxx_mtd_sim.c +++ b/bsp/simulator/drivers/sst25vfxx_mtd_sim.c @@ -247,7 +247,6 @@ void nor_erase(void) sst25vfxx_erase_block(mtd, index * mtd->block_size, BLOCK_SIZE); } } -FINSH_FUNCTION_EXPORT(nor_erase, erase all block in SPI flash); #endif #endif diff --git a/bsp/simulator/pcap/pcap_netif.c b/bsp/simulator/pcap/pcap_netif.c index dff7cec583b..df72a59bf6c 100644 --- a/bsp/simulator/pcap/pcap_netif.c +++ b/bsp/simulator/pcap/pcap_netif.c @@ -310,4 +310,3 @@ void list_pcap(void) return ; } -FINSH_FUNCTION_EXPORT(list_pcap, show host netif adapter); diff --git a/bsp/tm4c129x/drivers/drv_eth.c b/bsp/tm4c129x/drivers/drv_eth.c index 84523a7271d..8ee23930b71 100644 --- a/bsp/tm4c129x/drivers/drv_eth.c +++ b/bsp/tm4c129x/drivers/drv_eth.c @@ -1494,14 +1494,12 @@ void PHY_Read(uint8_t addr) uint16_t data = EMACPHYRead(EMAC0_BASE, PHY_PHYS_ADDR, addr); rt_kprintf("R PHY_REG[0x%02X] = 0x%04X\n", addr, data); } -FINSH_FUNCTION_EXPORT(PHY_Read, (add)); void PHY_Write(uint8_t addr , uint16_t data) { EMACPHYWrite(EMAC0_BASE, PHY_PHYS_ADDR, addr, data); rt_kprintf("W PHY_REG[0x%02X] = 0x%04X\n", addr, data); } -FINSH_FUNCTION_EXPORT(PHY_Write, (add, data)); void PHY_SetAdd(uint8_t addr0, uint8_t addr1, uint8_t addr2, uint8_t addr3, uint8_t addr4, uint8_t addr5) @@ -1514,6 +1512,5 @@ void PHY_SetAdd(uint8_t addr0, uint8_t addr1, uint8_t addr2, MAP_FlashUserSave(); rt_kprintf("Save to EEPROM. please reboot."); } -FINSH_FUNCTION_EXPORT(PHY_SetAdd, (add0-add5)); #endif //RT_USING_FINSH #endif diff --git a/bsp/xplorer4330/drivers/drv_led.c b/bsp/xplorer4330/drivers/drv_led.c index b97d32c6b3f..39755726a1e 100644 --- a/bsp/xplorer4330/drivers/drv_led.c +++ b/bsp/xplorer4330/drivers/drv_led.c @@ -158,5 +158,4 @@ void led_test(rt_uint32_t led_num, rt_uint32_t value) rt_uint8_t led_value = value; rt_led_write(&led.parent, led_num, &led_value, 1); } -FINSH_FUNCTION_EXPORT(led_test, e.g: led_test(0, 100).) #endif diff --git a/components/dfs/dfs_v1/src/dfs_file.c b/components/dfs/dfs_v1/src/dfs_file.c index dce75a9f103..252fa5163df 100644 --- a/components/dfs/dfs_v1/src/dfs_file.c +++ b/components/dfs/dfs_v1/src/dfs_file.c @@ -853,7 +853,6 @@ void ls(const char *pathname) if (pathname == NULL) rt_free(path); } -FINSH_FUNCTION_EXPORT(ls, list directory contents); void rm(const char *filename) { @@ -862,7 +861,6 @@ void rm(const char *filename) rt_kprintf("Delete %s failed\n", filename); } } -FINSH_FUNCTION_EXPORT(rm, remove files or directories); void cat(const char *filename) { @@ -893,7 +891,6 @@ void cat(const char *filename) dfs_file_close(&fd); } -FINSH_FUNCTION_EXPORT(cat, print file); #ifdef DFS_USING_POSIX #define BUF_SZ 4096 @@ -1119,7 +1116,6 @@ void copy(const char *src, const char *dst) } } } -FINSH_FUNCTION_EXPORT(copy, copy file or dir) #endif /* DFS_USING_POSIX */ #endif /* RT_USING_FINSH */ diff --git a/components/dfs/dfs_v1/src/dfs_fs.c b/components/dfs/dfs_v1/src/dfs_fs.c index 810690bee9b..297aacb6bad 100644 --- a/components/dfs/dfs_v1/src/dfs_fs.c +++ b/components/dfs/dfs_v1/src/dfs_fs.c @@ -618,7 +618,6 @@ void mkfs(const char *fs_name, const char *device_name) { dfs_mkfs(fs_name, device_name); } -FINSH_FUNCTION_EXPORT(mkfs, make a file system); int df(const char *path) { @@ -653,7 +652,6 @@ int df(const char *path) (unsigned long)cap, minor, unit_str[unit_index], buffer.f_bfree, buffer.f_bsize); return 0; } -FINSH_FUNCTION_EXPORT(df, get disk free); #endif /**@}*/ diff --git a/components/dfs/dfs_v2/src/dfs_file.c b/components/dfs/dfs_v2/src/dfs_file.c index 54f6ca6bc1f..979cf8a08d5 100644 --- a/components/dfs/dfs_v2/src/dfs_file.c +++ b/components/dfs/dfs_v2/src/dfs_file.c @@ -3027,6 +3027,5 @@ void copy(const char *src, const char *dst) } } } -FINSH_FUNCTION_EXPORT(copy, copy file or dir) #endif \ No newline at end of file diff --git a/components/dfs/dfs_v2/src/dfs_posix.c b/components/dfs/dfs_v2/src/dfs_posix.c index da446e35ed5..b84cd81ba4d 100644 --- a/components/dfs/dfs_v2/src/dfs_posix.c +++ b/components/dfs/dfs_v2/src/dfs_posix.c @@ -849,7 +849,6 @@ RTM_EXPORT(mkdir); #ifdef RT_USING_FINSH #include -FINSH_FUNCTION_EXPORT(mkdir, create a directory); #endif /** diff --git a/components/drivers/spi/dev_spi_wifi_rw009.c b/components/drivers/spi/dev_spi_wifi_rw009.c index b3bd807ebd7..e6971c796b5 100644 --- a/components/drivers/spi/dev_spi_wifi_rw009.c +++ b/components/drivers/spi/dev_spi_wifi_rw009.c @@ -845,8 +845,5 @@ static rt_err_t rw009_scan(void) return result; } -FINSH_FUNCTION_EXPORT(rw009_scan, SACN and list AP.); -FINSH_FUNCTION_EXPORT(rw009_join, RW009 join to AP.); -FINSH_FUNCTION_EXPORT(rw009_rssi, get RW009 current AP rssi.); #endif // RT_USING_FINSH diff --git a/components/drivers/spi/enc28j60.c b/components/drivers/spi/enc28j60.c index fe0bf46fd69..e890bc4ca74 100644 --- a/components/drivers/spi/enc28j60.c +++ b/components/drivers/spi/enc28j60.c @@ -895,5 +895,4 @@ static void enc28j60(void) enc28j60_unlock(&enc28j60_dev); } -FINSH_FUNCTION_EXPORT(enc28j60, dump enc28j60 registers); #endif diff --git a/components/finsh/finsh.h b/components/finsh/finsh.h index f6d959210d0..93dcb13401d 100644 --- a/components/finsh/finsh.h +++ b/components/finsh/finsh.h @@ -110,17 +110,6 @@ typedef long (*syscall_func)(void); #define _MSH_FUNCTION_EXPORT_CMD3_OPT(a0, a1, a2, a3) \ MSH_FUNCTION_EXPORT_CMD(a0, a1, a2, a0##_msh_options) - -/** - * @ingroup group_finsh - * - * @brief This macro exports a system function to finsh shell. - * - * @param[in] name Name of function. - * @param[in] desc Description of function, which will show in help. - */ -#define FINSH_FUNCTION_EXPORT(name, desc) - /** * @ingroup group_finsh * diff --git a/components/net/lwip/lwip-1.4.1/src/apps/ping/ping.c b/components/net/lwip/lwip-1.4.1/src/apps/ping/ping.c index 6251504f59a..c5876db838d 100644 --- a/components/net/lwip/lwip-1.4.1/src/apps/ping/ping.c +++ b/components/net/lwip/lwip-1.4.1/src/apps/ping/ping.c @@ -221,7 +221,6 @@ rt_err_t ping(char* target_name, rt_uint32_t times, rt_size_t size) #ifdef RT_USING_FINSH #include -FINSH_FUNCTION_EXPORT(ping, ping network host); int cmd_ping(int argc, char **argv) { diff --git a/components/net/lwip/lwip-2.0.3/src/apps/ping/ping.c b/components/net/lwip/lwip-2.0.3/src/apps/ping/ping.c index 989fb0507a7..e8f88e98913 100644 --- a/components/net/lwip/lwip-2.0.3/src/apps/ping/ping.c +++ b/components/net/lwip/lwip-2.0.3/src/apps/ping/ping.c @@ -221,7 +221,6 @@ rt_err_t ping(char* target_name, rt_uint32_t times, rt_size_t size) #ifdef RT_USING_FINSH #include -FINSH_FUNCTION_EXPORT(ping, ping network host); int cmd_ping(int argc, char **argv) { diff --git a/components/net/lwip/lwip-2.0.3/src/apps/tftp/tftp_port.c b/components/net/lwip/lwip-2.0.3/src/apps/tftp/tftp_port.c index 38221ac580b..ae950c57484 100644 --- a/components/net/lwip/lwip-2.0.3/src/apps/tftp/tftp_port.c +++ b/components/net/lwip/lwip-2.0.3/src/apps/tftp/tftp_port.c @@ -66,7 +66,6 @@ static void tftp_server(uint8_t argc, char **argv) rt_kprintf("TFTP server start failed.\n"); } } -FINSH_FUNCTION_EXPORT(tftp_server, start tftp server.); MSH_CMD_EXPORT(tftp_server, start tftp server.); diff --git a/components/net/lwip/lwip-2.1.2/src/apps/ping/ping.c b/components/net/lwip/lwip-2.1.2/src/apps/ping/ping.c index 6251504f59a..c5876db838d 100644 --- a/components/net/lwip/lwip-2.1.2/src/apps/ping/ping.c +++ b/components/net/lwip/lwip-2.1.2/src/apps/ping/ping.c @@ -221,7 +221,6 @@ rt_err_t ping(char* target_name, rt_uint32_t times, rt_size_t size) #ifdef RT_USING_FINSH #include -FINSH_FUNCTION_EXPORT(ping, ping network host); int cmd_ping(int argc, char **argv) { diff --git a/components/net/lwip/lwip-2.1.2/src/apps/tftp/tftp_port.c b/components/net/lwip/lwip-2.1.2/src/apps/tftp/tftp_port.c index 38221ac580b..ae950c57484 100644 --- a/components/net/lwip/lwip-2.1.2/src/apps/tftp/tftp_port.c +++ b/components/net/lwip/lwip-2.1.2/src/apps/tftp/tftp_port.c @@ -66,7 +66,6 @@ static void tftp_server(uint8_t argc, char **argv) rt_kprintf("TFTP server start failed.\n"); } } -FINSH_FUNCTION_EXPORT(tftp_server, start tftp server.); MSH_CMD_EXPORT(tftp_server, start tftp server.); diff --git a/components/net/lwip/port/ethernetif.c b/components/net/lwip/port/ethernetif.c index 0f32ac85112..69aadadec46 100644 --- a/components/net/lwip/port/ethernetif.c +++ b/components/net/lwip/port/ethernetif.c @@ -1075,7 +1075,6 @@ void set_if(char* netif_name, char* ip_addr, char* gw_addr, char* nm_addr) #ifdef RT_USING_FINSH #include -FINSH_FUNCTION_EXPORT(set_if, set network interface address); #if LWIP_DNS #include @@ -1088,7 +1087,6 @@ void set_dns(uint8_t dns_num, char* dns_server) dns_setserver(dns_num, &addr); } } -FINSH_FUNCTION_EXPORT(set_dns, set DNS server address); #endif void list_if(void) @@ -1174,7 +1172,6 @@ void list_if(void) rt_exit_critical(); } -FINSH_FUNCTION_EXPORT(list_if, list network interface information); #if LWIP_TCP #include @@ -1240,7 +1237,6 @@ void list_tcps(void) } rt_exit_critical(); } -FINSH_FUNCTION_EXPORT(list_tcps, list all of tcp connections); #endif /* LWIP_TCP */ #if LWIP_UDP @@ -1270,7 +1266,6 @@ void list_udps(void) } rt_exit_critical(); } -FINSH_FUNCTION_EXPORT(list_udps, list all of udp connections); #endif /* LWIP_UDP */ #endif diff --git a/examples/file/listdir.c b/examples/file/listdir.c index d858a00bff3..961a67a48d4 100644 --- a/examples/file/listdir.c +++ b/examples/file/listdir.c @@ -69,7 +69,6 @@ void list_dir(const char* path) #ifdef RT_USING_FINSH #include -FINSH_FUNCTION_EXPORT(list_dir, list directory); static void cmd_list_dir(int argc, char *argv[]) { diff --git a/examples/file/readspeed.c b/examples/file/readspeed.c index dfa68ceb32b..f427365f612 100644 --- a/examples/file/readspeed.c +++ b/examples/file/readspeed.c @@ -60,7 +60,6 @@ void readspeed(const char* filename, int block_size) #ifdef RT_USING_FINSH #include -FINSH_FUNCTION_EXPORT(readspeed, perform file read test); static void cmd_readspeed(int argc, char *argv[]) { diff --git a/examples/file/readwrite.c b/examples/file/readwrite.c index 5d0defeaa9a..acb0b430837 100644 --- a/examples/file/readwrite.c +++ b/examples/file/readwrite.c @@ -149,7 +149,6 @@ void readwrite(const char* filename) #ifdef RT_USING_FINSH #include /* export to finsh */ -FINSH_FUNCTION_EXPORT(readwrite, perform file read and write test); static void cmd_readwrite(int argc, char *argv[]) { diff --git a/examples/file/seekdir.c b/examples/file/seekdir.c index 5198a8056b1..957a9f89503 100644 --- a/examples/file/seekdir.c +++ b/examples/file/seekdir.c @@ -48,6 +48,5 @@ void seekdir_test(void) #ifdef RT_USING_FINSH #include -FINSH_FUNCTION_EXPORT(seekdir_test, perform directory seek test); MSH_CMD_EXPORT(seekdir_test, perform directory seek test); #endif /* RT_USING_FINSH */ diff --git a/examples/file/writespeed.c b/examples/file/writespeed.c index 87a4c329bd1..8e82339523e 100644 --- a/examples/file/writespeed.c +++ b/examples/file/writespeed.c @@ -68,7 +68,6 @@ void writespeed(const char* filename, int total_length, int block_size) #ifdef RT_USING_FINSH #include -FINSH_FUNCTION_EXPORT(writespeed, perform file write test); static void cmd_writespeed(int argc, char *argv[]) { diff --git a/examples/libc/dirent.c b/examples/libc/dirent.c index 03fa94151d4..0a940722f7b 100644 --- a/examples/libc/dirent.c +++ b/examples/libc/dirent.c @@ -56,4 +56,3 @@ int libc_dirent() closedir(dirp); return result; } -FINSH_FUNCTION_EXPORT(libc_dirent, dirent test for libc); diff --git a/examples/libc/env.c b/examples/libc/env.c index 05005c2d1f3..33ec05ff1c9 100644 --- a/examples/libc/env.c +++ b/examples/libc/env.c @@ -19,4 +19,3 @@ int libc_env() printf("foo=%s\n", getenv("foo")); return 0; } -FINSH_FUNCTION_EXPORT(libc_env, get/set_env test); diff --git a/examples/libc/ex1.c b/examples/libc/ex1.c index 8f0ccfff1c6..75054487429 100644 --- a/examples/libc/ex1.c +++ b/examples/libc/ex1.c @@ -42,4 +42,3 @@ int libc_ex1(void) return ret; } #include -FINSH_FUNCTION_EXPORT(libc_ex1, example 1 for libc); diff --git a/examples/libc/ex2.c b/examples/libc/ex2.c index df8f9a26a35..ff4b83c6b9e 100644 --- a/examples/libc/ex2.c +++ b/examples/libc/ex2.c @@ -119,4 +119,3 @@ int libc_ex2(void) return 0; } #include -FINSH_FUNCTION_EXPORT(libc_ex2, example 2 for libc); diff --git a/examples/libc/ex3.c b/examples/libc/ex3.c index 615ed8f35c6..e56c70b0c24 100644 --- a/examples/libc/ex3.c +++ b/examples/libc/ex3.c @@ -55,7 +55,6 @@ int libc_ex3() return 0; } #include -FINSH_FUNCTION_EXPORT(libc_ex3, example 5 for libc); /* This is the cleanup function that is called when the threads are cancelled */ diff --git a/examples/libc/ex4.c b/examples/libc/ex4.c index df8839c5bc8..695c6208e8f 100644 --- a/examples/libc/ex4.c +++ b/examples/libc/ex4.c @@ -113,4 +113,3 @@ int libc_ex4() pthread_join(th2, NULL); } #include -FINSH_FUNCTION_EXPORT(libc_ex4, example 4 for libc); diff --git a/examples/libc/ex5.c b/examples/libc/ex5.c index cce53068943..aade8e4e43f 100644 --- a/examples/libc/ex5.c +++ b/examples/libc/ex5.c @@ -109,5 +109,4 @@ int libc_ex5(void) return 0; } #include -FINSH_FUNCTION_EXPORT(libc_ex5, example 5 for libc); diff --git a/examples/libc/ex6.c b/examples/libc/ex6.c index 20ab0d8e5d7..1887e374139 100644 --- a/examples/libc/ex6.c +++ b/examples/libc/ex6.c @@ -42,4 +42,3 @@ int libc_ex6(void) { return 0; } #include -FINSH_FUNCTION_EXPORT(libc_ex6, example 6 for libc); diff --git a/examples/libc/ex7.c b/examples/libc/ex7.c index b1969c86633..a447182979c 100644 --- a/examples/libc/ex7.c +++ b/examples/libc/ex7.c @@ -106,4 +106,3 @@ int libc_ex7(void) { return 0; } #include -FINSH_FUNCTION_EXPORT(libc_ex7, example 7 for libc); diff --git a/examples/libc/file.c b/examples/libc/file.c index 918fca3b866..79eccc6c66e 100644 --- a/examples/libc/file.c +++ b/examples/libc/file.c @@ -35,7 +35,6 @@ void libc_fstat() printf("fstat result: %d\n", fstat(fd, &s)); close(fd); } -FINSH_FUNCTION_EXPORT(libc_fstat, fstat test for libc); void libc_lseek() { @@ -53,7 +52,6 @@ void libc_lseek() printf("end: %d\n", lseek(fd, 0, SEEK_END)); close(fd); } -FINSH_FUNCTION_EXPORT(libc_lseek, lseek test for libc); void sleep(int tick) { @@ -517,4 +515,3 @@ int libc_fseek(void) return result; } -FINSH_FUNCTION_EXPORT(libc_fseek, lseek test for libc); diff --git a/examples/libc/memory.c b/examples/libc/memory.c index 4a31b69017f..12c954762c8 100644 --- a/examples/libc/memory.c +++ b/examples/libc/memory.c @@ -57,4 +57,3 @@ int libc_mem(void) return errors != 0; } -FINSH_FUNCTION_EXPORT(libc_mem, memory test for libc); diff --git a/examples/libc/mq.c b/examples/libc/mq.c index a7f3f924dc4..a6ccbdc838f 100644 --- a/examples/libc/mq.c +++ b/examples/libc/mq.c @@ -126,4 +126,3 @@ int libc_mq() return 0; } #include -FINSH_FUNCTION_EXPORT(libc_mq, posix mqueue test); diff --git a/examples/libc/printf.c b/examples/libc/printf.c index c7968b9a0be..63a59e9e770 100644 --- a/examples/libc/printf.c +++ b/examples/libc/printf.c @@ -177,7 +177,6 @@ void libc_printf() printf_test(); } -FINSH_FUNCTION_EXPORT(libc_printf, printf test in libc); void libc_dprintf() @@ -191,7 +190,6 @@ void libc_dprintf() close(fd); } } -FINSH_FUNCTION_EXPORT(libc_dprintf, dprintf test); void libc_fdopen() @@ -207,4 +205,3 @@ void libc_fdopen() fclose(fp); } } -FINSH_FUNCTION_EXPORT(libc_fdopen, fdopen test); diff --git a/examples/libc/rand.c b/examples/libc/rand.c index 96f5628bb83..a6b848582f4 100644 --- a/examples/libc/rand.c +++ b/examples/libc/rand.c @@ -44,4 +44,3 @@ int libc_rand(void) return 1; } } -FINSH_FUNCTION_EXPORT(libc_rand, rand test for libc); diff --git a/examples/libc/sem.c b/examples/libc/sem.c index 55b85114b88..ad276cf45dc 100644 --- a/examples/libc/sem.c +++ b/examples/libc/sem.c @@ -71,4 +71,3 @@ void libc_sem() rt_thread_startup(tid); } } -FINSH_FUNCTION_EXPORT(libc_sem, posix semaphore test); diff --git a/examples/libc/time.c b/examples/libc/time.c index 5e91c1df800..9a9fa763349 100644 --- a/examples/libc/time.c +++ b/examples/libc/time.c @@ -24,4 +24,3 @@ int speed() printf("%d\n", time(0)); return 0; } -FINSH_FUNCTION_EXPORT(speed, speed test); diff --git a/examples/network/chargen.c b/examples/network/chargen.c index 69a6b13a5da..b312b46c2db 100644 --- a/examples/network/chargen.c +++ b/examples/network/chargen.c @@ -240,5 +240,4 @@ void chargen() { chargen_init(); } -FINSH_FUNCTION_EXPORT(chargen, start chargen server); #endif diff --git a/examples/network/tcpsendpacket.c b/examples/network/tcpsendpacket.c index f608f5173f2..5f5bc21475e 100644 --- a/examples/network/tcpsendpacket.c +++ b/examples/network/tcpsendpacket.c @@ -84,6 +84,5 @@ void tcp_senddata(const char *url, int port, int length) #ifdef RT_USING_FINSH #include /* 输出tcpclient函数到finsh shell中 */ -FINSH_FUNCTION_EXPORT(tcp_senddata, send a packet through tcp connection); #endif diff --git a/examples/test/device_test.c b/examples/test/device_test.c index 327caa94e97..da6ff09f8aa 100644 --- a/examples/test/device_test.c +++ b/examples/test/device_test.c @@ -511,6 +511,5 @@ int device_test(const char * device_name) #ifdef RT_USING_FINSH #include -FINSH_FUNCTION_EXPORT(device_test, e.g: device_test("sd0")); #endif diff --git a/examples/test/dhry_1.c b/examples/test/dhry_1.c index 44283649f69..87e959e6de5 100644 --- a/examples/test/dhry_1.c +++ b/examples/test/dhry_1.c @@ -346,4 +346,3 @@ register int l; #endif #include -FINSH_FUNCTION_EXPORT(dhry_test, dhry test); diff --git a/examples/test/fs_test.c b/examples/test/fs_test.c index 7fd70284cf8..269c1b8ff8d 100644 --- a/examples/test/fs_test.c +++ b/examples/test/fs_test.c @@ -293,5 +293,4 @@ void fs_test(rt_uint32_t arg) #ifdef RT_USING_FINSH #include -FINSH_FUNCTION_EXPORT(fs_test, file system R/W test. e.g: fs_test(3)); #endif diff --git a/examples/test/mem_test.c b/examples/test/mem_test.c index cd7d1b35522..e1257f86e4c 100644 --- a/examples/test/mem_test.c +++ b/examples/test/mem_test.c @@ -110,5 +110,4 @@ void mem_test(uint32_t address, uint32_t size ) #ifdef RT_USING_FINSH #include -FINSH_FUNCTION_EXPORT(mem_test, mem_test(0xA0000000, 0x00100000) ); #endif diff --git a/examples/test/net_test.c b/examples/test/net_test.c index 04203409a5d..569c72030bc 100644 --- a/examples/test/net_test.c +++ b/examples/test/net_test.c @@ -342,4 +342,3 @@ void net_test(void) rt_thread_startup(tcpecho_socket_tid); } } -FINSH_FUNCTION_EXPORT(net_test, network test); diff --git a/examples/test/rtc_test.c b/examples/test/rtc_test.c index e8754e72d5e..481474f8a23 100644 --- a/examples/test/rtc_test.c +++ b/examples/test/rtc_test.c @@ -56,6 +56,5 @@ int rtc_test(void) } #ifdef RT_USING_FINSH #include -FINSH_FUNCTION_EXPORT(rtc_test, rtc driver test. e.g: rtc_test()); MSH_CMD_EXPORT(rtc_test, rtc driver test. e.g: rtc_test()); #endif diff --git a/examples/ymodem/echo.c b/examples/ymodem/echo.c index fdd7e5228be..82bc7e08824 100644 --- a/examples/ymodem/echo.c +++ b/examples/ymodem/echo.c @@ -63,6 +63,5 @@ void rym_cat_vcom(void) rym_cat_to_dev(idev, odev); } -FINSH_FUNCTION_EXPORT(rym_cat_vcom, test the YModem); #endif diff --git a/examples/ymodem/null.c b/examples/ymodem/null.c index 640b8ba11b4..2476610b646 100644 --- a/examples/ymodem/null.c +++ b/examples/ymodem/null.c @@ -32,6 +32,5 @@ rt_err_t rym_null(char *devname) return rym_recv_on_device(&rctx, dev, RT_DEVICE_OFLAG_RDWR | RT_DEVICE_FLAG_INT_RX, RT_NULL, _rym_dummy_write, RT_NULL, 1000); } -FINSH_FUNCTION_EXPORT(rym_null, dump data to null); #endif diff --git a/examples/ymodem/tofile.c b/examples/ymodem/tofile.c index 8fb2d0c06bc..1995b3e8c28 100644 --- a/examples/ymodem/tofile.c +++ b/examples/ymodem/tofile.c @@ -122,5 +122,4 @@ rt_err_t ry(char *dname) return res; } -FINSH_FUNCTION_EXPORT(ry, receive files by ymodem protocol); #endif diff --git a/include/rtdef.h b/include/rtdef.h index 735d6722159..b9d2b749138 100644 --- a/include/rtdef.h +++ b/include/rtdef.h @@ -204,8 +204,6 @@ typedef int (*init_fn_t)(void); #if !defined(RT_USING_FINSH) /* define these to empty, even if not include finsh.h file */ -#define FINSH_FUNCTION_EXPORT(name, desc) - #define MSH_CMD_EXPORT(command, desc) #define MSH_CMD_EXPORT_ALIAS(command, alias, desc) #elif !defined(FINSH_USING_SYMTAB) diff --git a/libcpu/arm/s3c24x0/rtc.c b/libcpu/arm/s3c24x0/rtc.c index 2dda7b03342..c2ab83f2fd8 100644 --- a/libcpu/arm/s3c24x0/rtc.c +++ b/libcpu/arm/s3c24x0/rtc.c @@ -182,6 +182,5 @@ void list_date() rt_kprintf("%d, %s\n", time, ctime(&time)); } } -FINSH_FUNCTION_EXPORT(list_date, list date); #endif #endif From af25087e090e8e897f198b1d674d5a396e7ef528 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 26 Oct 2025 07:16:09 +0000 Subject: [PATCH 5/6] Remove orphaned finsh.h includes after FINSH_FUNCTION_EXPORT cleanup Co-authored-by: Rbb666 <64397326+Rbb666@users.noreply.github.com> --- bsp/apollo2/board/led.c | 1 - bsp/asm9260t/platform/interrupt.c | 1 - bsp/at91/at91sam9260/applications/application.c | 1 - bsp/at91/at91sam9260/drivers/at91_mci.c | 1 - bsp/at91/at91sam9260/drivers/at91_nand.c | 1 - bsp/at91/at91sam9g45/applications/application.c | 1 - bsp/at91/at91sam9g45/drivers/at91_mci.c | 1 - bsp/dm365/applications/application.c | 1 - bsp/efm32/dev_accel.c | 1 - bsp/efm32/dev_led.c | 1 - bsp/efm32/dev_misc.c | 1 - bsp/efm32/dev_sflash.c | 1 - bsp/efm32/drv_emu.c | 1 - bsp/efm32/drv_ethernet.c | 1 - bsp/efm32/drv_sdcard.c | 1 - bsp/fujitsu/mb9x/mb9bf568r/drivers/led.c | 1 - bsp/fujitsu/mb9x/mb9bf618s/drivers/led.c | 1 - bsp/mini2440/drivers/dm9000.c | 1 - bsp/mini4020/drivers/dm9161.c | 1 - bsp/nxp/imx/imxrt/libraries/drivers/drv_eth.c | 2 -- bsp/nxp/imx/imxrt/libraries/drivers/drv_sdio.c | 1 - bsp/nxp/lpc/lpc178x/drivers/emac.c | 1 - bsp/nxp/lpc/lpc178x/drivers/lpc17xx_lcd.c | 1 - bsp/nxp/lpc/lpc408x/drivers/drv_emac.c | 1 - bsp/nxp/lpc/lpc408x/drivers/drv_led.c | 1 - bsp/nxp/lpc/lpc43xx/drivers/drv_emac.c | 1 - bsp/nxp/lpc/lpc43xx/drivers/drv_led.c | 1 - bsp/nxp/lpc/lpc5410x/drivers/drv_led.c | 1 - bsp/nxp/lpc/lpc54608-LPCXpresso/drivers/drv_emac.c | 1 - bsp/simulator/drivers/nanddrv_file.c | 1 - bsp/simulator/drivers/sd_sim.c | 1 - bsp/simulator/drivers/sst25vfxx_mtd_sim.c | 1 - bsp/simulator/pcap/pcap_netif.c | 1 - bsp/tm4c129x/drivers/drv_eth.c | 1 - bsp/xplorer4330/drivers/drv_led.c | 1 - components/dfs/dfs_v1/src/dfs_file.c | 1 - components/dfs/dfs_v1/src/dfs_fs.c | 1 - components/dfs/dfs_v2/src/dfs_posix.c | 1 - components/drivers/spi/dev_spi_wifi_rw009.c | 1 - components/drivers/spi/enc28j60.c | 1 - examples/libc/dirent.c | 1 - examples/libc/env.c | 1 - examples/libc/ex1.c | 1 - examples/libc/ex2.c | 1 - examples/libc/ex3.c | 1 - examples/libc/ex4.c | 1 - examples/libc/ex5.c | 1 - examples/libc/ex6.c | 1 - examples/libc/ex7.c | 1 - examples/libc/file.c | 1 - examples/libc/memory.c | 1 - examples/libc/mq.c | 1 - examples/libc/printf.c | 1 - examples/libc/rand.c | 1 - examples/libc/sem.c | 1 - examples/libc/time.c | 1 - examples/network/chargen.c | 1 - examples/network/tcpsendpacket.c | 1 - examples/test/device_test.c | 1 - examples/test/dhry_1.c | 1 - examples/test/fs_test.c | 1 - examples/test/mem_test.c | 1 - examples/test/net_test.c | 1 - examples/ymodem/echo.c | 1 - examples/ymodem/null.c | 1 - examples/ymodem/tofile.c | 1 - libcpu/arm/s3c24x0/rtc.c | 1 - 67 files changed, 68 deletions(-) diff --git a/bsp/apollo2/board/led.c b/bsp/apollo2/board/led.c index b48d1b6fe5f..e6060453b37 100644 --- a/bsp/apollo2/board/led.c +++ b/bsp/apollo2/board/led.c @@ -123,7 +123,6 @@ INIT_DEVICE_EXPORT(rt_hw_led_init); #endif #ifdef RT_USING_FINSH -#include void led(rt_uint32_t led, rt_uint32_t state) { diff --git a/bsp/asm9260t/platform/interrupt.c b/bsp/asm9260t/platform/interrupt.c index 677e1353fa7..7445eb587aa 100644 --- a/bsp/asm9260t/platform/interrupt.c +++ b/bsp/asm9260t/platform/interrupt.c @@ -201,6 +201,5 @@ void list_irq(void) } } -#include #endif diff --git a/bsp/at91/at91sam9260/applications/application.c b/bsp/at91/at91sam9260/applications/application.c index 82eb2c8fe0c..aa59176af9e 100644 --- a/bsp/at91/at91sam9260/applications/application.c +++ b/bsp/at91/at91sam9260/applications/application.c @@ -151,7 +151,6 @@ void nfs_start(void) rt_kprintf("NFSv3 File System initialzation failed!\n"); } -#include "finsh.h" #endif /*@}*/ diff --git a/bsp/at91/at91sam9260/drivers/at91_mci.c b/bsp/at91/at91sam9260/drivers/at91_mci.c index 6641c33cb73..1be23cfc351 100644 --- a/bsp/at91/at91sam9260/drivers/at91_mci.c +++ b/bsp/at91/at91sam9260/drivers/at91_mci.c @@ -891,7 +891,6 @@ int at91_mci_init(void) INIT_DEVICE_EXPORT(at91_mci_init); -#include "finsh.h" void mci_dump(void) { diff --git a/bsp/at91/at91sam9260/drivers/at91_nand.c b/bsp/at91/at91sam9260/drivers/at91_nand.c index 9844acba267..d950cd9bcd0 100644 --- a/bsp/at91/at91sam9260/drivers/at91_nand.c +++ b/bsp/at91/at91sam9260/drivers/at91_nand.c @@ -611,7 +611,6 @@ int rt_hw_mtd_nand_init(void) INIT_DEVICE_EXPORT(rt_hw_mtd_nand_init); #if defined(RT_USING_FINSH) -#include void nand_eraseall() { int tmp=0; diff --git a/bsp/at91/at91sam9g45/applications/application.c b/bsp/at91/at91sam9g45/applications/application.c index f0a6be19e21..390830a49eb 100644 --- a/bsp/at91/at91sam9g45/applications/application.c +++ b/bsp/at91/at91sam9g45/applications/application.c @@ -152,7 +152,6 @@ void nfs_start(void) rt_kprintf("NFSv3 File System initialzation failed!\n"); } -#include "finsh.h" #endif /*@}*/ diff --git a/bsp/at91/at91sam9g45/drivers/at91_mci.c b/bsp/at91/at91sam9g45/drivers/at91_mci.c index 78e48476a0b..f985cd0bda9 100644 --- a/bsp/at91/at91sam9g45/drivers/at91_mci.c +++ b/bsp/at91/at91sam9g45/drivers/at91_mci.c @@ -891,7 +891,6 @@ int at91_mci_init(void) INIT_DEVICE_EXPORT(at91_mci_init); -#include "finsh.h" void mci_dump(void) { diff --git a/bsp/dm365/applications/application.c b/bsp/dm365/applications/application.c index 47a25582c23..9c8f4c6ba4e 100644 --- a/bsp/dm365/applications/application.c +++ b/bsp/dm365/applications/application.c @@ -97,7 +97,6 @@ void nfs_start(void) rt_kprintf("NFSv3 File System initialzation failed!\n"); } -#include "finsh.h" #endif /*@}*/ diff --git a/bsp/efm32/dev_accel.c b/bsp/efm32/dev_accel.c index 6b4d60c7150..04369f7025e 100644 --- a/bsp/efm32/dev_accel.c +++ b/bsp/efm32/dev_accel.c @@ -824,7 +824,6 @@ rt_err_t efm_accel_init(void) * Export to FINSH ******************************************************************************/ #ifdef RT_USING_FINSH -#include void accel_cal(rt_uint8_t mode, rt_uint32_t second) { diff --git a/bsp/efm32/dev_led.c b/bsp/efm32/dev_led.c index 7c8805eda46..3ed85cc9fac 100644 --- a/bsp/efm32/dev_led.c +++ b/bsp/efm32/dev_led.c @@ -166,7 +166,6 @@ rt_err_t rt_hw_led_init(void) * Export to FINSH ******************************************************************************/ #ifdef RT_USING_FINSH -#include void list_leds(void) { diff --git a/bsp/efm32/dev_misc.c b/bsp/efm32/dev_misc.c index 1beb90ce1e1..160662d82a9 100644 --- a/bsp/efm32/dev_misc.c +++ b/bsp/efm32/dev_misc.c @@ -172,7 +172,6 @@ rt_int32_t efm32_misc_getCelsius(rt_uint32_t adcResult) * Export to FINSH ******************************************************************************/ #ifdef RT_USING_FINSH -#include void list_temp(void) { diff --git a/bsp/efm32/dev_sflash.c b/bsp/efm32/dev_sflash.c index bb1f71eae78..20514416023 100644 --- a/bsp/efm32/dev_sflash.c +++ b/bsp/efm32/dev_sflash.c @@ -381,7 +381,6 @@ rt_uint32_t efm_spiFlash_cmd( * Export to FINSH *********************************************************************/ #ifdef RT_USING_FINSH -#include void list_sflash(void) { diff --git a/bsp/efm32/drv_emu.c b/bsp/efm32/drv_emu.c index 222fdb6c430..461e2a7a8cb 100644 --- a/bsp/efm32/drv_emu.c +++ b/bsp/efm32/drv_emu.c @@ -232,7 +232,6 @@ void efm32_emu_init(void) * Export to FINSH ******************************************************************************/ #ifdef RT_USING_FINSH -#include void list_emu(void) { diff --git a/bsp/efm32/drv_ethernet.c b/bsp/efm32/drv_ethernet.c index 046f8b1386e..791f9bac2d5 100644 --- a/bsp/efm32/drv_ethernet.c +++ b/bsp/efm32/drv_ethernet.c @@ -1016,7 +1016,6 @@ rt_err_t efm_hw_eth_init(void) ******************************************************************************/ #if defined(EFM32_USING_ETH_UTILS) #ifdef RT_USING_FINSH -#include void list_eth(void) { diff --git a/bsp/efm32/drv_sdcard.c b/bsp/efm32/drv_sdcard.c index 4eab0d2339a..fdb19d208da 100644 --- a/bsp/efm32/drv_sdcard.c +++ b/bsp/efm32/drv_sdcard.c @@ -1271,7 +1271,6 @@ void efm_spiSd_deinit(void) * Export to FINSH ******************************************************************************/ #ifdef RT_USING_FINSH -#include void list_sd(void) { diff --git a/bsp/fujitsu/mb9x/mb9bf568r/drivers/led.c b/bsp/fujitsu/mb9x/mb9bf568r/drivers/led.c index ff0006f267d..7095cc6dab9 100644 --- a/bsp/fujitsu/mb9x/mb9bf568r/drivers/led.c +++ b/bsp/fujitsu/mb9x/mb9bf568r/drivers/led.c @@ -153,7 +153,6 @@ void rt_led_hw_init(void) } #ifdef RT_USING_FINSH -#include void led(rt_uint32_t led, rt_uint32_t value) { rt_uint8_t led_value = value; diff --git a/bsp/fujitsu/mb9x/mb9bf618s/drivers/led.c b/bsp/fujitsu/mb9x/mb9bf618s/drivers/led.c index 03d1188fc48..7af982c0eb7 100644 --- a/bsp/fujitsu/mb9x/mb9bf618s/drivers/led.c +++ b/bsp/fujitsu/mb9x/mb9bf618s/drivers/led.c @@ -156,7 +156,6 @@ void rt_led_hw_init(void) } #ifdef RT_USING_FINSH -#include void led(rt_uint32_t led, rt_uint32_t value) { rt_uint8_t led_value = value; diff --git a/bsp/mini2440/drivers/dm9000.c b/bsp/mini2440/drivers/dm9000.c index 4e05eef23cc..3d7a33e5d7a 100644 --- a/bsp/mini2440/drivers/dm9000.c +++ b/bsp/mini2440/drivers/dm9000.c @@ -668,5 +668,4 @@ void dm9000a(void) } #ifdef RT_USING_FINSH -#include #endif diff --git a/bsp/mini4020/drivers/dm9161.c b/bsp/mini4020/drivers/dm9161.c index 66dc35f27f5..857facbe6df 100644 --- a/bsp/mini4020/drivers/dm9161.c +++ b/bsp/mini4020/drivers/dm9161.c @@ -699,5 +699,4 @@ void dm9161a(void) } #ifdef RT_USING_FINSH -#include #endif diff --git a/bsp/nxp/imx/imxrt/libraries/drivers/drv_eth.c b/bsp/nxp/imx/imxrt/libraries/drivers/drv_eth.c index 2b518798969..743feb43e52 100644 --- a/bsp/nxp/imx/imxrt/libraries/drivers/drv_eth.c +++ b/bsp/nxp/imx/imxrt/libraries/drivers/drv_eth.c @@ -16,7 +16,6 @@ #include #ifdef RT_USING_FINSH -#include #endif #include "fsl_enet.h" @@ -1094,7 +1093,6 @@ INIT_DEVICE_EXPORT(rt_hw_imxrt_eth_init); #endif #if defined(RT_USING_FINSH) && defined(RT_USING_PHY) -#include void phy_read(rt_uint32_t phy_reg) { diff --git a/bsp/nxp/imx/imxrt/libraries/drivers/drv_sdio.c b/bsp/nxp/imx/imxrt/libraries/drivers/drv_sdio.c index 5af50fd80a1..8391df1d161 100644 --- a/bsp/nxp/imx/imxrt/libraries/drivers/drv_sdio.c +++ b/bsp/nxp/imx/imxrt/libraries/drivers/drv_sdio.c @@ -17,7 +17,6 @@ #include #include -#include #define RT_USING_SDIO1 #define RT_USING_SDIO2 diff --git a/bsp/nxp/lpc/lpc178x/drivers/emac.c b/bsp/nxp/lpc/lpc178x/drivers/emac.c index 52a4a706184..5b01e163a4f 100644 --- a/bsp/nxp/lpc/lpc178x/drivers/emac.c +++ b/bsp/nxp/lpc/lpc178x/drivers/emac.c @@ -536,7 +536,6 @@ void lpc17xx_emac_hw_init(void) } #ifdef RT_USING_FINSH -#include void emac_dump() { rt_kprintf("Command : %08x\n", LPC_EMAC->Command); diff --git a/bsp/nxp/lpc/lpc178x/drivers/lpc17xx_lcd.c b/bsp/nxp/lpc/lpc178x/drivers/lpc17xx_lcd.c index 46830d0d5a8..3172242b79c 100644 --- a/bsp/nxp/lpc/lpc178x/drivers/lpc17xx_lcd.c +++ b/bsp/nxp/lpc/lpc178x/drivers/lpc17xx_lcd.c @@ -95,5 +95,4 @@ void lcd_fill(uint8_t * start, uint8_t * end, uint8_t pixel) } } #ifdef RT_USING_FINSH -#include #endif diff --git a/bsp/nxp/lpc/lpc408x/drivers/drv_emac.c b/bsp/nxp/lpc/lpc408x/drivers/drv_emac.c index 3d250a698be..99e3429e966 100644 --- a/bsp/nxp/lpc/lpc408x/drivers/drv_emac.c +++ b/bsp/nxp/lpc/lpc408x/drivers/drv_emac.c @@ -493,7 +493,6 @@ int rt_hw_emac_init(void) INIT_DEVICE_EXPORT(rt_hw_emac_init); #ifdef RT_USING_FINSH -#include void emac_dump() { rt_kprintf("Command : %08x\n", LPC_EMAC->Command); diff --git a/bsp/nxp/lpc/lpc408x/drivers/drv_led.c b/bsp/nxp/lpc/lpc408x/drivers/drv_led.c index 2fc6e3e923f..87ff927052b 100644 --- a/bsp/nxp/lpc/lpc408x/drivers/drv_led.c +++ b/bsp/nxp/lpc/lpc408x/drivers/drv_led.c @@ -144,7 +144,6 @@ int rt_hw_led_init(void) INIT_DEVICE_EXPORT(rt_hw_led_init); #ifdef RT_USING_FINSH -#include void led_test(rt_uint32_t led_num, rt_uint32_t value) { rt_uint8_t led_value = value; diff --git a/bsp/nxp/lpc/lpc43xx/drivers/drv_emac.c b/bsp/nxp/lpc/lpc43xx/drivers/drv_emac.c index 7f2ffb182b0..33e41583b58 100644 --- a/bsp/nxp/lpc/lpc43xx/drivers/drv_emac.c +++ b/bsp/nxp/lpc/lpc43xx/drivers/drv_emac.c @@ -517,7 +517,6 @@ int lpc_emac_hw_init(void) INIT_DEVICE_EXPORT(lpc_emac_hw_init); #ifdef RT_USING_FINSH -#include void emac_dump() { rt_kprintf("Command : %08x\n", LPC_EMAC->Command); diff --git a/bsp/nxp/lpc/lpc43xx/drivers/drv_led.c b/bsp/nxp/lpc/lpc43xx/drivers/drv_led.c index 7568b19a09f..ac84210b323 100644 --- a/bsp/nxp/lpc/lpc43xx/drivers/drv_led.c +++ b/bsp/nxp/lpc/lpc43xx/drivers/drv_led.c @@ -159,7 +159,6 @@ int rt_led_hw_init(void) INIT_DEVICE_EXPORT(rt_led_hw_init); #ifdef RT_USING_FINSH -#include void led_test(rt_uint32_t led_num, rt_uint32_t value) { rt_uint8_t led_value = value; diff --git a/bsp/nxp/lpc/lpc5410x/drivers/drv_led.c b/bsp/nxp/lpc/lpc5410x/drivers/drv_led.c index 6115430e6fd..0f8f0e3b7a9 100644 --- a/bsp/nxp/lpc/lpc5410x/drivers/drv_led.c +++ b/bsp/nxp/lpc/lpc5410x/drivers/drv_led.c @@ -195,7 +195,6 @@ void Led_Control(rt_uint32_t Set_led, rt_uint32_t value) INIT_DEVICE_EXPORT(rt_led_hw_init); #ifdef RT_USING_FINSH -#include void led_test(rt_uint32_t led_num, rt_uint32_t value) { rt_uint8_t led_value = value; diff --git a/bsp/nxp/lpc/lpc54608-LPCXpresso/drivers/drv_emac.c b/bsp/nxp/lpc/lpc54608-LPCXpresso/drivers/drv_emac.c index bc6624410cc..f57a287b1f2 100644 --- a/bsp/nxp/lpc/lpc54608-LPCXpresso/drivers/drv_emac.c +++ b/bsp/nxp/lpc/lpc54608-LPCXpresso/drivers/drv_emac.c @@ -725,5 +725,4 @@ void emac_bd_dump(void) } #ifdef RT_USING_FINSH -#include #endif diff --git a/bsp/simulator/drivers/nanddrv_file.c b/bsp/simulator/drivers/nanddrv_file.c index e712bd90b5a..7d465db9a6c 100644 --- a/bsp/simulator/drivers/nanddrv_file.c +++ b/bsp/simulator/drivers/nanddrv_file.c @@ -393,7 +393,6 @@ void rt_hw_mtd_nand_init(void) } #if defined(RT_USING_FINSH) -#include void nand_eraseall() { int index; diff --git a/bsp/simulator/drivers/sd_sim.c b/bsp/simulator/drivers/sd_sim.c index 8b72fa9848d..c58c442ae50 100755 --- a/bsp/simulator/drivers/sd_sim.c +++ b/bsp/simulator/drivers/sd_sim.c @@ -197,7 +197,6 @@ rt_err_t rt_hw_sdcard_init(const char *spi_device_name) } #ifdef RT_USING_FINSH -#include int sd_erase(void) { rt_uint32_t index; diff --git a/bsp/simulator/drivers/sst25vfxx_mtd_sim.c b/bsp/simulator/drivers/sst25vfxx_mtd_sim.c index 85693fc3228..c87ef8ae971 100644 --- a/bsp/simulator/drivers/sst25vfxx_mtd_sim.c +++ b/bsp/simulator/drivers/sst25vfxx_mtd_sim.c @@ -235,7 +235,6 @@ rt_err_t sst25vfxx_mtd_init(const char *nor_name, } #ifdef RT_USING_FINSH -#include void nor_erase(void) { rt_uint32_t index; diff --git a/bsp/simulator/pcap/pcap_netif.c b/bsp/simulator/pcap/pcap_netif.c index df72a59bf6c..e30c761e6f4 100644 --- a/bsp/simulator/pcap/pcap_netif.c +++ b/bsp/simulator/pcap/pcap_netif.c @@ -276,7 +276,6 @@ void pcap_netif_hw_init(void) eth_device_init(&(pcap_netif_device.parent), "e0"); } -#include void list_pcap(void) { int i=0; diff --git a/bsp/tm4c129x/drivers/drv_eth.c b/bsp/tm4c129x/drivers/drv_eth.c index 8ee23930b71..9bb8a7837a8 100644 --- a/bsp/tm4c129x/drivers/drv_eth.c +++ b/bsp/tm4c129x/drivers/drv_eth.c @@ -1488,7 +1488,6 @@ INIT_COMPONENT_EXPORT(rt_hw_tiva_eth_init); #if 0 #ifdef RT_USING_FINSH -#include "finsh.h" void PHY_Read(uint8_t addr) { uint16_t data = EMACPHYRead(EMAC0_BASE, PHY_PHYS_ADDR, addr); diff --git a/bsp/xplorer4330/drivers/drv_led.c b/bsp/xplorer4330/drivers/drv_led.c index 39755726a1e..7b2ce9d14f3 100644 --- a/bsp/xplorer4330/drivers/drv_led.c +++ b/bsp/xplorer4330/drivers/drv_led.c @@ -152,7 +152,6 @@ int rt_led_hw_init(void) INIT_DEVICE_EXPORT(rt_led_hw_init); #ifdef RT_USING_FINSH -#include void led_test(rt_uint32_t led_num, rt_uint32_t value) { rt_uint8_t led_value = value; diff --git a/components/dfs/dfs_v1/src/dfs_file.c b/components/dfs/dfs_v1/src/dfs_file.c index 252fa5163df..a2deba5055e 100644 --- a/components/dfs/dfs_v1/src/dfs_file.c +++ b/components/dfs/dfs_v1/src/dfs_file.c @@ -780,7 +780,6 @@ int dfs_file_mmap2(struct dfs_file *fd, struct dfs_mmap2_args *mmap2) #endif #ifdef RT_USING_FINSH -#include void ls(const char *pathname) { diff --git a/components/dfs/dfs_v1/src/dfs_fs.c b/components/dfs/dfs_v1/src/dfs_fs.c index 297aacb6bad..73bb3cb521c 100644 --- a/components/dfs/dfs_v1/src/dfs_fs.c +++ b/components/dfs/dfs_v1/src/dfs_fs.c @@ -613,7 +613,6 @@ int dfs_unmount_device(rt_device_t dev) #endif #ifdef RT_USING_FINSH -#include void mkfs(const char *fs_name, const char *device_name) { dfs_mkfs(fs_name, device_name); diff --git a/components/dfs/dfs_v2/src/dfs_posix.c b/components/dfs/dfs_v2/src/dfs_posix.c index b84cd81ba4d..77329231c9e 100644 --- a/components/dfs/dfs_v2/src/dfs_posix.c +++ b/components/dfs/dfs_v2/src/dfs_posix.c @@ -848,7 +848,6 @@ int mkdir(const char *path, mode_t mode) RTM_EXPORT(mkdir); #ifdef RT_USING_FINSH -#include #endif /** diff --git a/components/drivers/spi/dev_spi_wifi_rw009.c b/components/drivers/spi/dev_spi_wifi_rw009.c index e6971c796b5..c3ef564eedd 100644 --- a/components/drivers/spi/dev_spi_wifi_rw009.c +++ b/components/drivers/spi/dev_spi_wifi_rw009.c @@ -815,7 +815,6 @@ int32_t rw009_rssi(void) } #ifdef RT_USING_FINSH -#include static rt_err_t rw009_scan(void) { diff --git a/components/drivers/spi/enc28j60.c b/components/drivers/spi/enc28j60.c index e890bc4ca74..6e525fd8e00 100644 --- a/components/drivers/spi/enc28j60.c +++ b/components/drivers/spi/enc28j60.c @@ -842,7 +842,6 @@ rt_err_t enc28j60_attach(const char *spi_device_name) } #ifdef RT_USING_FINSH -#include /* * Debug routine to dump useful register contents */ diff --git a/examples/libc/dirent.c b/examples/libc/dirent.c index 0a940722f7b..8b3afd6d1db 100644 --- a/examples/libc/dirent.c +++ b/examples/libc/dirent.c @@ -9,7 +9,6 @@ */ #include #include -#include #include int libc_dirent() diff --git a/examples/libc/env.c b/examples/libc/env.c index 33ec05ff1c9..e7177e262a7 100644 --- a/examples/libc/env.c +++ b/examples/libc/env.c @@ -10,7 +10,6 @@ #include #include -#include int libc_env() { diff --git a/examples/libc/ex1.c b/examples/libc/ex1.c index 75054487429..4a1b19b0332 100644 --- a/examples/libc/ex1.c +++ b/examples/libc/ex1.c @@ -41,4 +41,3 @@ int libc_ex1(void) printf("join b %s %d\n", sucfail(pret), pret); return ret; } -#include diff --git a/examples/libc/ex2.c b/examples/libc/ex2.c index ff4b83c6b9e..0b37545a152 100644 --- a/examples/libc/ex2.c +++ b/examples/libc/ex2.c @@ -118,4 +118,3 @@ int libc_ex2(void) pthread_join(th_b, &retval); return 0; } -#include diff --git a/examples/libc/ex3.c b/examples/libc/ex3.c index e56c70b0c24..d7dfb2f5746 100644 --- a/examples/libc/ex3.c +++ b/examples/libc/ex3.c @@ -54,7 +54,6 @@ int libc_ex3() /* Exit the program */ return 0; } -#include /* This is the cleanup function that is called when the threads are cancelled */ diff --git a/examples/libc/ex4.c b/examples/libc/ex4.c index 695c6208e8f..2118db6781f 100644 --- a/examples/libc/ex4.c +++ b/examples/libc/ex4.c @@ -112,4 +112,3 @@ int libc_ex4() pthread_join(th1, NULL); pthread_join(th2, NULL); } -#include diff --git a/examples/libc/ex5.c b/examples/libc/ex5.c index aade8e4e43f..c672f36c9fb 100644 --- a/examples/libc/ex5.c +++ b/examples/libc/ex5.c @@ -108,5 +108,4 @@ int libc_ex5(void) pthread_join(th_b, &retval); return 0; } -#include diff --git a/examples/libc/ex6.c b/examples/libc/ex6.c index 1887e374139..378e8c1cce9 100644 --- a/examples/libc/ex6.c +++ b/examples/libc/ex6.c @@ -41,4 +41,3 @@ int libc_ex6(void) { } return 0; } -#include diff --git a/examples/libc/ex7.c b/examples/libc/ex7.c index a447182979c..ca35e216200 100644 --- a/examples/libc/ex7.c +++ b/examples/libc/ex7.c @@ -105,4 +105,3 @@ int libc_ex7(void) { return 0; } -#include diff --git a/examples/libc/file.c b/examples/libc/file.c index 79eccc6c66e..76ff7a1a60b 100644 --- a/examples/libc/file.c +++ b/examples/libc/file.c @@ -10,7 +10,6 @@ #include #include -#include #include #include #include diff --git a/examples/libc/memory.c b/examples/libc/memory.c index 12c954762c8..1b82f22c518 100644 --- a/examples/libc/memory.c +++ b/examples/libc/memory.c @@ -10,7 +10,6 @@ #include #include -#include #include static int errors = 0; diff --git a/examples/libc/mq.c b/examples/libc/mq.c index a6ccbdc838f..5cd528d5f56 100644 --- a/examples/libc/mq.c +++ b/examples/libc/mq.c @@ -125,4 +125,3 @@ int libc_mq() printf("PASSED\n"); return 0; } -#include diff --git a/examples/libc/printf.c b/examples/libc/printf.c index 63a59e9e770..878617fcf0d 100644 --- a/examples/libc/printf.c +++ b/examples/libc/printf.c @@ -12,7 +12,6 @@ #include #include -#include char * format[] = { "%", diff --git a/examples/libc/rand.c b/examples/libc/rand.c index a6b848582f4..8da55789013 100644 --- a/examples/libc/rand.c +++ b/examples/libc/rand.c @@ -10,7 +10,6 @@ #include #include -#include int libc_rand(void) { diff --git a/examples/libc/sem.c b/examples/libc/sem.c index ad276cf45dc..702942da0e4 100644 --- a/examples/libc/sem.c +++ b/examples/libc/sem.c @@ -59,7 +59,6 @@ static void test_thread(void* parameter) pthread_exit(0); } -#include void libc_sem() { rt_thread_t tid; diff --git a/examples/libc/time.c b/examples/libc/time.c index 9a9fa763349..3d35f209354 100644 --- a/examples/libc/time.c +++ b/examples/libc/time.c @@ -10,7 +10,6 @@ #include #include -#include int speed() { diff --git a/examples/network/chargen.c b/examples/network/chargen.c index b312b46c2db..eb85900ead9 100644 --- a/examples/network/chargen.c +++ b/examples/network/chargen.c @@ -235,7 +235,6 @@ void chargen_init(void) if (chargen != RT_NULL) rt_thread_startup(chargen); } #ifdef RT_USING_FINSH -#include void chargen() { chargen_init(); diff --git a/examples/network/tcpsendpacket.c b/examples/network/tcpsendpacket.c index 5f5bc21475e..196c1a552aa 100644 --- a/examples/network/tcpsendpacket.c +++ b/examples/network/tcpsendpacket.c @@ -82,7 +82,6 @@ void tcp_senddata(const char *url, int port, int length) } #ifdef RT_USING_FINSH -#include /* 输出tcpclient函数到finsh shell中 */ #endif diff --git a/examples/test/device_test.c b/examples/test/device_test.c index da6ff09f8aa..26a162421ef 100644 --- a/examples/test/device_test.c +++ b/examples/test/device_test.c @@ -510,6 +510,5 @@ int device_test(const char * device_name) } #ifdef RT_USING_FINSH -#include #endif diff --git a/examples/test/dhry_1.c b/examples/test/dhry_1.c index 87e959e6de5..bafbce0f22a 100644 --- a/examples/test/dhry_1.c +++ b/examples/test/dhry_1.c @@ -345,4 +345,3 @@ register int l; } #endif -#include diff --git a/examples/test/fs_test.c b/examples/test/fs_test.c index 269c1b8ff8d..42e3ef3f8b4 100644 --- a/examples/test/fs_test.c +++ b/examples/test/fs_test.c @@ -292,5 +292,4 @@ void fs_test(rt_uint32_t arg) } #ifdef RT_USING_FINSH -#include #endif diff --git a/examples/test/mem_test.c b/examples/test/mem_test.c index e1257f86e4c..010c8dd1a65 100644 --- a/examples/test/mem_test.c +++ b/examples/test/mem_test.c @@ -109,5 +109,4 @@ void mem_test(uint32_t address, uint32_t size ) } #ifdef RT_USING_FINSH -#include #endif diff --git a/examples/test/net_test.c b/examples/test/net_test.c index 569c72030bc..da1e8c26059 100644 --- a/examples/test/net_test.c +++ b/examples/test/net_test.c @@ -11,7 +11,6 @@ * Net Test Utilities for RT-Thread */ #include -#include #include #include #include diff --git a/examples/ymodem/echo.c b/examples/ymodem/echo.c index 82bc7e08824..377133e1b56 100644 --- a/examples/ymodem/echo.c +++ b/examples/ymodem/echo.c @@ -42,7 +42,6 @@ rt_err_t rym_cat_to_dev(rt_device_t idev, rt_device_t odev) } #ifdef RT_USING_FINSH -#include void rym_cat_vcom(void) { extern rt_err_t rym_cat_to_dev(rt_device_t idev, rt_device_t odev); diff --git a/examples/ymodem/null.c b/examples/ymodem/null.c index 2476610b646..302065c4b88 100644 --- a/examples/ymodem/null.c +++ b/examples/ymodem/null.c @@ -18,7 +18,6 @@ static enum rym_code _rym_dummy_write( } #ifdef RT_USING_FINSH -#include rt_err_t rym_null(char *devname) { struct rym_ctx rctx; diff --git a/examples/ymodem/tofile.c b/examples/ymodem/tofile.c index 1995b3e8c28..03a73439653 100644 --- a/examples/ymodem/tofile.c +++ b/examples/ymodem/tofile.c @@ -106,7 +106,6 @@ rt_err_t rym_write_to_file(rt_device_t idev) } #ifdef RT_USING_FINSH -#include rt_err_t ry(char *dname) { rt_err_t res; diff --git a/libcpu/arm/s3c24x0/rtc.c b/libcpu/arm/s3c24x0/rtc.c index c2ab83f2fd8..dce6e25afd9 100644 --- a/libcpu/arm/s3c24x0/rtc.c +++ b/libcpu/arm/s3c24x0/rtc.c @@ -168,7 +168,6 @@ void rt_hw_rtc_init(void) } #ifdef RT_USING_FINSH -#include void list_date() { time_t time; From 8ef0add34699bc250b4086527b55c11c7e4dd366 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 28 Oct 2025 23:21:39 +0000 Subject: [PATCH 6/6] Remove empty #ifdef RT_USING_FINSH blocks Removed empty conditional compilation blocks that were left after FINSH macro cleanup. Co-authored-by: BernardXiong <1241087+BernardXiong@users.noreply.github.com> --- bsp/mini2440/drivers/dm9000.c | 2 -- bsp/mini4020/drivers/dm9161.c | 2 -- bsp/nxp/imx/imxrt/libraries/drivers/drv_eth.c | 3 --- bsp/nxp/lpc/lpc178x/drivers/lpc17xx_lcd.c | 2 -- bsp/nxp/lpc/lpc54608-LPCXpresso/drivers/drv_emac.c | 2 -- components/dfs/dfs_v2/src/dfs_posix.c | 3 --- examples/test/device_test.c | 3 --- examples/test/fs_test.c | 2 -- examples/test/mem_test.c | 2 -- 9 files changed, 21 deletions(-) diff --git a/bsp/mini2440/drivers/dm9000.c b/bsp/mini2440/drivers/dm9000.c index 3d7a33e5d7a..b5e523611af 100644 --- a/bsp/mini2440/drivers/dm9000.c +++ b/bsp/mini2440/drivers/dm9000.c @@ -667,5 +667,3 @@ void dm9000a(void) rt_kprintf("\n"); } -#ifdef RT_USING_FINSH -#endif diff --git a/bsp/mini4020/drivers/dm9161.c b/bsp/mini4020/drivers/dm9161.c index 857facbe6df..fc161e15848 100644 --- a/bsp/mini4020/drivers/dm9161.c +++ b/bsp/mini4020/drivers/dm9161.c @@ -698,5 +698,3 @@ void dm9161a(void) { } -#ifdef RT_USING_FINSH -#endif diff --git a/bsp/nxp/imx/imxrt/libraries/drivers/drv_eth.c b/bsp/nxp/imx/imxrt/libraries/drivers/drv_eth.c index 743feb43e52..573bbe9ca6a 100644 --- a/bsp/nxp/imx/imxrt/libraries/drivers/drv_eth.c +++ b/bsp/nxp/imx/imxrt/libraries/drivers/drv_eth.c @@ -15,9 +15,6 @@ #include "board.h" #include -#ifdef RT_USING_FINSH -#endif - #include "fsl_enet.h" #include "fsl_gpio.h" #include "fsl_cache.h" diff --git a/bsp/nxp/lpc/lpc178x/drivers/lpc17xx_lcd.c b/bsp/nxp/lpc/lpc178x/drivers/lpc17xx_lcd.c index 3172242b79c..8dc4f4ec4a7 100644 --- a/bsp/nxp/lpc/lpc178x/drivers/lpc17xx_lcd.c +++ b/bsp/nxp/lpc/lpc178x/drivers/lpc17xx_lcd.c @@ -94,5 +94,3 @@ void lcd_fill(uint8_t * start, uint8_t * end, uint8_t pixel) *start++ = pixel; } } -#ifdef RT_USING_FINSH -#endif diff --git a/bsp/nxp/lpc/lpc54608-LPCXpresso/drivers/drv_emac.c b/bsp/nxp/lpc/lpc54608-LPCXpresso/drivers/drv_emac.c index f57a287b1f2..8cabe7657d7 100644 --- a/bsp/nxp/lpc/lpc54608-LPCXpresso/drivers/drv_emac.c +++ b/bsp/nxp/lpc/lpc54608-LPCXpresso/drivers/drv_emac.c @@ -724,5 +724,3 @@ void emac_bd_dump(void) } } -#ifdef RT_USING_FINSH -#endif diff --git a/components/dfs/dfs_v2/src/dfs_posix.c b/components/dfs/dfs_v2/src/dfs_posix.c index 77329231c9e..38385a1987e 100644 --- a/components/dfs/dfs_v2/src/dfs_posix.c +++ b/components/dfs/dfs_v2/src/dfs_posix.c @@ -847,9 +847,6 @@ int mkdir(const char *path, mode_t mode) } RTM_EXPORT(mkdir); -#ifdef RT_USING_FINSH -#endif - /** * this function is a POSIX compliant version, which will remove a directory. * diff --git a/examples/test/device_test.c b/examples/test/device_test.c index 26a162421ef..f8edddd1856 100644 --- a/examples/test/device_test.c +++ b/examples/test/device_test.c @@ -509,6 +509,3 @@ int device_test(const char * device_name) } } -#ifdef RT_USING_FINSH -#endif - diff --git a/examples/test/fs_test.c b/examples/test/fs_test.c index 42e3ef3f8b4..a678db91f2d 100644 --- a/examples/test/fs_test.c +++ b/examples/test/fs_test.c @@ -291,5 +291,3 @@ void fs_test(rt_uint32_t arg) } } -#ifdef RT_USING_FINSH -#endif diff --git a/examples/test/mem_test.c b/examples/test/mem_test.c index 010c8dd1a65..ef3d85aa91d 100644 --- a/examples/test/mem_test.c +++ b/examples/test/mem_test.c @@ -108,5 +108,3 @@ void mem_test(uint32_t address, uint32_t size ) } } -#ifdef RT_USING_FINSH -#endif