Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Original file line number Diff line number Diff line change
Expand Up @@ -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);
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Copy link
Member

@Rbb666 Rbb666 Oct 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot FINSH_FUNCTION_EXPORT_ALIAS 调用,统一修改为 MSH_CMD_EXPORT 进行替换,请注意 MSH_CMD_EXPORT 的正确使用。

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot FINSH_FUNCTION_EXPORT_ALIAS 调用,统一修改为 MSH_CMD_EXPORT 进行替换,请注意 MSH_CMD_EXPORT 的正确使用。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

明白了,我会将 FINSH_FUNCTION_EXPORT_ALIAS 正确替换为 MSH_CMD_EXPORT_ALIAS,保持相同的参数顺序。

Understood, I will properly replace FINSH_FUNCTION_EXPORT_ALIAS with MSH_CMD_EXPORT_ALIAS, maintaining the same parameter order.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已完成,所有 FINSH_FUNCTION_EXPORT_ALIAS 已正确替换为 MSH_CMD_EXPORT_ALIAS,保持相同的参数顺序,commit: f2c36dbb

Completed, all FINSH_FUNCTION_EXPORT_ALIAS properly replaced with MSH_CMD_EXPORT_ALIAS with same parameter order, commit: f2c36dbb

Original file line number Diff line number Diff line change
Expand Up @@ -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);
Original file line number Diff line number Diff line change
Expand Up @@ -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);

2 changes: 0 additions & 2 deletions bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

1 change: 0 additions & 1 deletion bsp/apollo2/board/led.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

/*@}*/
1 change: 0 additions & 1 deletion bsp/asm9260t/platform/interrupt.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,5 @@ void list_irq(void)
}

#include <finsh.h>
FINSH_FUNCTION_EXPORT(list_irq, list system irq);

#endif
1 change: 0 additions & 1 deletion bsp/at91/at91sam9260/applications/application.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ void nfs_start(void)
}

#include "finsh.h"
FINSH_FUNCTION_EXPORT(nfs_start, start net filesystem);
#endif

/*@}*/
2 changes: 0 additions & 2 deletions bsp/at91/at91sam9260/drivers/at91_mci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -907,4 +906,3 @@ void mci_dump(void)
}
}

FINSH_FUNCTION_EXPORT(mci_dump, dump register for mci);
1 change: 0 additions & 1 deletion bsp/at91/at91sam9260/drivers/at91_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 0 additions & 3 deletions bsp/at91/at91sam9260/platform/reset.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ void machine_shutdown(void)

#ifdef RT_USING_FINSH

#include <finsh.h>
FINSH_FUNCTION_EXPORT_ALIAS(rt_hw_cpu_reset, reset, restart the system);

#ifdef FINSH_USING_MSH
int cmd_reset(int argc, char** argv)
{
Expand Down
1 change: 0 additions & 1 deletion bsp/at91/at91sam9g45/applications/application.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ void nfs_start(void)
}

#include "finsh.h"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot 相关联的头文件包含代码也需要删除,这部分是多余的

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已删除所有孤立的 finsh.h 头文件包含,commit: af25087

删除了 67 个文件中不再需要的 #include finsh.h#include <finsh.h> 行。

Removed all orphaned finsh.h header includes, commit: af25087

Removed unnecessary #include finsh.h or #include <finsh.h> lines from 67 files.

FINSH_FUNCTION_EXPORT(nfs_start, start net filesystem);
#endif

/*@}*/
2 changes: 0 additions & 2 deletions bsp/at91/at91sam9g45/drivers/at91_mci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -907,4 +906,3 @@ void mci_dump(void)
}
}

FINSH_FUNCTION_EXPORT(mci_dump, dump register for mci);
1 change: 0 additions & 1 deletion bsp/dm365/applications/application.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ void nfs_start(void)
}

#include "finsh.h"
FINSH_FUNCTION_EXPORT(nfs_start, start net filesystem);
#endif

/*@}*/
1 change: 0 additions & 1 deletion bsp/dm365/drivers/davinci_emac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion bsp/dm365/platform/interrupt.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,6 @@ void list_irq(void)
}

#include <finsh.h>
FINSH_FUNCTION_EXPORT(list_irq, list system irq);

#ifdef FINSH_USING_MSH
int cmd_list_irq(int argc, char** argv)
Expand Down
3 changes: 0 additions & 3 deletions bsp/efm32/dev_accel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.)
Copy link
Member

@Rbb666 Rbb666 Oct 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot FINSH_FUNCTION_EXPORT 统一使用 rtthread 中的 MSH_CMD_EXPORT API 进行替换

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot FINSH_FUNCTION_EXPORT 统一使用 rt-thread 中的 MSH_CMD_EXPORT API 进行替换

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

明白了,我需要将所有 FINSH_FUNCTION_EXPORT 替换为 MSH_CMD_EXPORT,而不是删除它们。我将重新处理所有文件,进行正确的替换。

Understood, I need to replace all FINSH_FUNCTION_EXPORT with MSH_CMD_EXPORT instead of removing them. I will reprocess all files to do the proper replacement.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已完成,所有 FINSH_FUNCTION_EXPORT 已替换为 MSH_CMD_EXPORT,commit: f2c36dbb

Completed, all FINSH_FUNCTION_EXPORT replaced with MSH_CMD_EXPORT, commit: f2c36dbb


void list_accel(void)
{
Expand All @@ -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)
{
Expand Down Expand Up @@ -880,7 +878,6 @@ void test_accel(rt_uint8_t mode)
}
}
}
FINSH_FUNCTION_EXPORT(test_accel, list accelerometer info.)
#endif

#endif
Expand Down
2 changes: 0 additions & 2 deletions bsp/efm32/dev_led.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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

/***************************************************************************//**
Expand Down
2 changes: 0 additions & 2 deletions bsp/efm32/dev_misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,15 +180,13 @@ 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)
{
rt_uint32_t vdd = rt_hw_get_vdd();

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 */

Expand Down
1 change: 0 additions & 1 deletion bsp/efm32/dev_sflash.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) */
Expand Down
1 change: 0 additions & 1 deletion bsp/efm32/drv_emu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

/***************************************************************************//**
Expand Down
3 changes: 0 additions & 3 deletions bsp/efm32/drv_ethernet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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) */
Expand Down
1 change: 0 additions & 1 deletion bsp/efm32/drv_sdcard.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) */
Expand Down
2 changes: 0 additions & 2 deletions bsp/frdm-k64f/board/drv_emac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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

Expand Down
5 changes: 0 additions & 5 deletions bsp/fujitsu/mb9x/mb9bf506r/drivers/nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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)
{
Expand All @@ -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)
{
Expand All @@ -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
1 change: 0 additions & 1 deletion bsp/fujitsu/mb9x/mb9bf568r/drivers/led.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion bsp/fujitsu/mb9x/mb9bf618s/drivers/led.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion bsp/mini2440/drivers/dm9000.c
Original file line number Diff line number Diff line change
Expand Up @@ -669,5 +669,4 @@ void dm9000a(void)

#ifdef RT_USING_FINSH
#include <finsh.h>
FINSH_FUNCTION_EXPORT(dm9000a, dm9000a register dump);
#endif
1 change: 0 additions & 1 deletion bsp/mini4020/drivers/dm9161.c
Original file line number Diff line number Diff line change
Expand Up @@ -700,5 +700,4 @@ void dm9161a(void)

#ifdef RT_USING_FINSH
#include <finsh.h>
FINSH_FUNCTION_EXPORT(dm9161a, dm9161a register dump);
#endif
7 changes: 0 additions & 7 deletions bsp/nxp/imx/imxrt/libraries/drivers/drv_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion bsp/nxp/imx/imxrt/libraries/drivers/drv_sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
1 change: 0 additions & 1 deletion bsp/nxp/lpc/lpc178x/applications/application.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion bsp/nxp/lpc/lpc178x/drivers/emac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

1 change: 0 additions & 1 deletion bsp/nxp/lpc/lpc178x/drivers/lpc17xx_lcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,4 @@ void lcd_fill(uint8_t * start, uint8_t * end, uint8_t pixel)
}
#ifdef RT_USING_FINSH
#include <finsh.h>
FINSH_FUNCTION_EXPORT(lcd_fill, lcd_fill );
#endif
1 change: 0 additions & 1 deletion bsp/nxp/lpc/lpc408x/drivers/drv_emac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

1 change: 0 additions & 1 deletion bsp/nxp/lpc/lpc408x/drivers/drv_led.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion bsp/nxp/lpc/lpc43xx/drivers/drv_emac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

1 change: 0 additions & 1 deletion bsp/nxp/lpc/lpc43xx/drivers/drv_led.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading