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/apollo2/board/led.c b/bsp/apollo2/board/led.c index 53646676790..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) { @@ -140,7 +139,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..7445eb587aa 100644 --- a/bsp/asm9260t/platform/interrupt.c +++ b/bsp/asm9260t/platform/interrupt.c @@ -201,7 +201,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..aa59176af9e 100644 --- a/bsp/at91/at91sam9260/applications/application.c +++ b/bsp/at91/at91sam9260/applications/application.c @@ -151,8 +151,6 @@ void nfs_start(void) rt_kprintf("NFSv3 File System initialzation failed!\n"); } -#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..1be23cfc351 100644 --- a/bsp/at91/at91sam9260/drivers/at91_mci.c +++ b/bsp/at91/at91sam9260/drivers/at91_mci.c @@ -891,8 +891,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 +905,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..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; @@ -628,7 +627,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/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/at91/at91sam9g45/applications/application.c b/bsp/at91/at91sam9g45/applications/application.c index 9775bc81d26..390830a49eb 100644 --- a/bsp/at91/at91sam9g45/applications/application.c +++ b/bsp/at91/at91sam9g45/applications/application.c @@ -152,8 +152,6 @@ void nfs_start(void) rt_kprintf("NFSv3 File System initialzation failed!\n"); } -#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..f985cd0bda9 100644 --- a/bsp/at91/at91sam9g45/drivers/at91_mci.c +++ b/bsp/at91/at91sam9g45/drivers/at91_mci.c @@ -891,8 +891,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 +905,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..9c8f4c6ba4e 100644 --- a/bsp/dm365/applications/application.c +++ b/bsp/dm365/applications/application.c @@ -97,8 +97,6 @@ void nfs_start(void) rt_kprintf("NFSv3 File System initialzation failed!\n"); } -#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..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) { @@ -836,7 +835,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 +843,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 +877,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..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) { @@ -189,7 +188,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 +204,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..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) { @@ -180,7 +179,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 +186,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..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) { @@ -395,7 +394,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..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) { @@ -244,7 +243,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..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) { @@ -1075,7 +1074,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 +1182,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 +1306,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..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) { @@ -1317,7 +1316,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/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/fujitsu/mb9x/mb9bf568r/drivers/led.c b/bsp/fujitsu/mb9x/mb9bf568r/drivers/led.c index 9e138d6f0bf..7095cc6dab9 100644 --- a/bsp/fujitsu/mb9x/mb9bf568r/drivers/led.c +++ b/bsp/fujitsu/mb9x/mb9bf568r/drivers/led.c @@ -153,11 +153,9 @@ 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; 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..7af982c0eb7 100644 --- a/bsp/fujitsu/mb9x/mb9bf618s/drivers/led.c +++ b/bsp/fujitsu/mb9x/mb9bf618s/drivers/led.c @@ -156,11 +156,9 @@ 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; 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..b5e523611af 100644 --- a/bsp/mini2440/drivers/dm9000.c +++ b/bsp/mini2440/drivers/dm9000.c @@ -667,7 +667,3 @@ void dm9000a(void) rt_kprintf("\n"); } -#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..fc161e15848 100644 --- a/bsp/mini4020/drivers/dm9161.c +++ b/bsp/mini4020/drivers/dm9161.c @@ -698,7 +698,3 @@ 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..573bbe9ca6a 100644 --- a/bsp/nxp/imx/imxrt/libraries/drivers/drv_eth.c +++ b/bsp/nxp/imx/imxrt/libraries/drivers/drv_eth.c @@ -15,10 +15,6 @@ #include "board.h" #include -#ifdef RT_USING_FINSH -#include -#endif - #include "fsl_enet.h" #include "fsl_gpio.h" #include "fsl_cache.h" @@ -1094,7 +1090,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) { @@ -1313,12 +1308,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..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 @@ -395,7 +394,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..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); @@ -546,6 +545,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..8dc4f4ec4a7 100644 --- a/bsp/nxp/lpc/lpc178x/drivers/lpc17xx_lcd.c +++ b/bsp/nxp/lpc/lpc178x/drivers/lpc17xx_lcd.c @@ -94,7 +94,3 @@ void lcd_fill(uint8_t * start, uint8_t * end, uint8_t pixel) *start++ = 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..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); @@ -503,6 +502,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..87ff927052b 100644 --- a/bsp/nxp/lpc/lpc408x/drivers/drv_led.c +++ b/bsp/nxp/lpc/lpc408x/drivers/drv_led.c @@ -144,11 +144,9 @@ 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; 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..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); @@ -527,6 +526,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..ac84210b323 100644 --- a/bsp/nxp/lpc/lpc43xx/drivers/drv_led.c +++ b/bsp/nxp/lpc/lpc43xx/drivers/drv_led.c @@ -159,11 +159,9 @@ 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; 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..0f8f0e3b7a9 100644 --- a/bsp/nxp/lpc/lpc5410x/drivers/drv_led.c +++ b/bsp/nxp/lpc/lpc5410x/drivers/drv_led.c @@ -195,11 +195,9 @@ 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; 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..8cabe7657d7 100644 --- a/bsp/nxp/lpc/lpc54608-LPCXpresso/drivers/drv_emac.c +++ b/bsp/nxp/lpc/lpc54608-LPCXpresso/drivers/drv_emac.c @@ -724,10 +724,3 @@ 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/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..0d4abd22ec5 100644 --- a/bsp/simulator/drivers/module_win32.c +++ b/bsp/simulator/drivers/module_win32.c @@ -347,11 +347,6 @@ 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 #define RT_MODULE_ARG_MAX 8 diff --git a/bsp/simulator/drivers/nanddrv_file.c b/bsp/simulator/drivers/nanddrv_file.c index c47ffdbbe4e..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; @@ -402,6 +401,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..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; @@ -219,5 +218,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..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; @@ -247,7 +246,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..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; @@ -310,4 +309,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..9bb8a7837a8 100644 --- a/bsp/tm4c129x/drivers/drv_eth.c +++ b/bsp/tm4c129x/drivers/drv_eth.c @@ -1488,20 +1488,17 @@ 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); 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 +1511,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..7b2ce9d14f3 100644 --- a/bsp/xplorer4330/drivers/drv_led.c +++ b/bsp/xplorer4330/drivers/drv_led.c @@ -152,11 +152,9 @@ 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; 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..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) { @@ -853,7 +852,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 +860,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 +890,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 +1115,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..73bb3cb521c 100644 --- a/components/dfs/dfs_v1/src/dfs_fs.c +++ b/components/dfs/dfs_v1/src/dfs_fs.c @@ -613,12 +613,10 @@ 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); } -FINSH_FUNCTION_EXPORT(mkfs, make a file system); int df(const char *path) { @@ -653,7 +651,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_v1/src/dfs_posix.c b/components/dfs/dfs_v1/src/dfs_posix.c index f3d7b70c318..1d705cbafe8 100644 --- a/components/dfs/dfs_v1/src/dfs_posix.c +++ b/components/dfs/dfs_v1/src/dfs_posix.c @@ -978,9 +978,6 @@ 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_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 d0eff53a467..38385a1987e 100644 --- a/components/dfs/dfs_v2/src/dfs_posix.c +++ b/components/dfs/dfs_v2/src/dfs_posix.c @@ -847,11 +847,6 @@ int mkdir(const char *path, mode_t mode) } RTM_EXPORT(mkdir); -#ifdef RT_USING_FINSH -#include -FINSH_FUNCTION_EXPORT(mkdir, create a directory); -#endif - /** * this function is a POSIX compliant version, which will remove a directory. * @@ -1241,9 +1236,6 @@ 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..0f17075751c 100644 --- a/components/drivers/mtd/mtd_nand.c +++ b/components/drivers/mtd/mtd_nand.c @@ -411,15 +411,6 @@ 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) */ #endif /* RT_USING_MTD_NAND */ 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/drivers/spi/dev_spi_wifi_rw009.c b/components/drivers/spi/dev_spi_wifi_rw009.c index b3bd807ebd7..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) { @@ -845,8 +844,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..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 */ @@ -895,5 +894,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 a40d1b3ed96..93dcb13401d 100644 --- a/components/finsh/finsh.h +++ b/components/finsh/finsh.h @@ -110,28 +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 - * - * @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/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/components/vbus/vbus.c b/components/vbus/vbus.c index 2adaac8dda6..5e62488764c 100644 --- a/components/vbus/vbus.c +++ b/components/vbus/vbus.c @@ -1303,16 +1303,3 @@ 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/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..8b3afd6d1db 100644 --- a/examples/libc/dirent.c +++ b/examples/libc/dirent.c @@ -9,7 +9,6 @@ */ #include #include -#include #include int libc_dirent() @@ -56,4 +55,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..e7177e262a7 100644 --- a/examples/libc/env.c +++ b/examples/libc/env.c @@ -10,7 +10,6 @@ #include #include -#include int libc_env() { @@ -19,4 +18,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..4a1b19b0332 100644 --- a/examples/libc/ex1.c +++ b/examples/libc/ex1.c @@ -41,5 +41,3 @@ int libc_ex1(void) printf("join b %s %d\n", sucfail(pret), pret); 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..0b37545a152 100644 --- a/examples/libc/ex2.c +++ b/examples/libc/ex2.c @@ -118,5 +118,3 @@ int libc_ex2(void) pthread_join(th_b, &retval); 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..d7dfb2f5746 100644 --- a/examples/libc/ex3.c +++ b/examples/libc/ex3.c @@ -54,8 +54,6 @@ int libc_ex3() /* Exit the program */ 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..2118db6781f 100644 --- a/examples/libc/ex4.c +++ b/examples/libc/ex4.c @@ -112,5 +112,3 @@ int libc_ex4() pthread_join(th1, NULL); 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..c672f36c9fb 100644 --- a/examples/libc/ex5.c +++ b/examples/libc/ex5.c @@ -108,6 +108,4 @@ int libc_ex5(void) pthread_join(th_b, &retval); 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..378e8c1cce9 100644 --- a/examples/libc/ex6.c +++ b/examples/libc/ex6.c @@ -41,5 +41,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..ca35e216200 100644 --- a/examples/libc/ex7.c +++ b/examples/libc/ex7.c @@ -105,5 +105,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..76ff7a1a60b 100644 --- a/examples/libc/file.c +++ b/examples/libc/file.c @@ -10,7 +10,6 @@ #include #include -#include #include #include #include @@ -35,7 +34,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 +51,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 +514,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..1b82f22c518 100644 --- a/examples/libc/memory.c +++ b/examples/libc/memory.c @@ -10,7 +10,6 @@ #include #include -#include #include static int errors = 0; @@ -57,4 +56,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..5cd528d5f56 100644 --- a/examples/libc/mq.c +++ b/examples/libc/mq.c @@ -125,5 +125,3 @@ int libc_mq() printf("PASSED\n"); 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..878617fcf0d 100644 --- a/examples/libc/printf.c +++ b/examples/libc/printf.c @@ -12,7 +12,6 @@ #include #include -#include char * format[] = { "%", @@ -177,7 +176,6 @@ void libc_printf() printf_test(); } -FINSH_FUNCTION_EXPORT(libc_printf, printf test in libc); void libc_dprintf() @@ -191,7 +189,6 @@ void libc_dprintf() close(fd); } } -FINSH_FUNCTION_EXPORT(libc_dprintf, dprintf test); void libc_fdopen() @@ -207,4 +204,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..8da55789013 100644 --- a/examples/libc/rand.c +++ b/examples/libc/rand.c @@ -10,7 +10,6 @@ #include #include -#include int libc_rand(void) { @@ -44,4 +43,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..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; @@ -71,4 +70,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..3d35f209354 100644 --- a/examples/libc/time.c +++ b/examples/libc/time.c @@ -10,7 +10,6 @@ #include #include -#include int speed() { @@ -24,4 +23,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..eb85900ead9 100644 --- a/examples/network/chargen.c +++ b/examples/network/chargen.c @@ -235,10 +235,8 @@ void chargen_init(void) if (chargen != RT_NULL) rt_thread_startup(chargen); } #ifdef RT_USING_FINSH -#include 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..196c1a552aa 100644 --- a/examples/network/tcpsendpacket.c +++ b/examples/network/tcpsendpacket.c @@ -82,8 +82,6 @@ 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..f8edddd1856 100644 --- a/examples/test/device_test.c +++ b/examples/test/device_test.c @@ -509,8 +509,3 @@ 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..bafbce0f22a 100644 --- a/examples/test/dhry_1.c +++ b/examples/test/dhry_1.c @@ -345,5 +345,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..a678db91f2d 100644 --- a/examples/test/fs_test.c +++ b/examples/test/fs_test.c @@ -291,7 +291,3 @@ 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..ef3d85aa91d 100644 --- a/examples/test/mem_test.c +++ b/examples/test/mem_test.c @@ -108,7 +108,3 @@ 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..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 @@ -342,4 +341,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..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); @@ -63,6 +62,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..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; @@ -32,6 +31,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..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; @@ -122,5 +121,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 a9a7bd06662..b9d2b749138 100644 --- a/include/rtdef.h +++ b/include/rtdef.h @@ -204,9 +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 FINSH_FUNCTION_EXPORT_ALIAS(name, alias, 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/realview-a8-vmm/gic.c b/libcpu/arm/realview-a8-vmm/gic.c index 4bc80dd5efc..aad0ac3abaa 100644 --- a/libcpu/arm/realview-a8-vmm/gic.c +++ b/libcpu/arm/realview-a8-vmm/gic.c @@ -182,10 +182,6 @@ 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) { diff --git a/libcpu/arm/s3c24x0/rtc.c b/libcpu/arm/s3c24x0/rtc.c index 2dda7b03342..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; @@ -182,6 +181,5 @@ void list_date() rt_kprintf("%d, %s\n", time, ctime(&time)); } } -FINSH_FUNCTION_EXPORT(list_date, list date); #endif #endif