diff --git a/flash-tool/command_line.c b/flash-tool/command_line.c index c48a038..044ff9b 100644 --- a/flash-tool/command_line.c +++ b/flash-tool/command_line.c @@ -27,10 +27,11 @@ #include "cmd.h" #include "config.h" +#define COMMAND_NUM 31 #define MAX_ARGC 10 -#define MAX_ARGV_LENGTH 100 +#define MAX_COMMAND_LENGTH 100 static int com_argc; -static char com_argv[MAX_ARGC][MAX_ARGV_LENGTH]; +static char com_argv[MAX_ARGC][MAX_COMMAND_LENGTH]; static const char COMMAND[][30]= { @@ -143,7 +144,7 @@ int command_interpret(char * com_buf) } else { com_argv[i][j] = *buf; j++; - if (j > MAX_ARGV_LENGTH) { + if (j > MAX_COMMAND_LENGTH) { printf("\n Para is too long! About!"); return 0; } diff --git a/flash-tool/usb_boot_defines.h b/flash-tool/usb_boot_defines.h index 7905c2a..4933d6d 100644 --- a/flash-tool/usb_boot_defines.h +++ b/flash-tool/usb_boot_defines.h @@ -27,8 +27,6 @@ #define CODE_SIZE ( 4 * 1024 * 1024 ) /* #define START_ADDR ( 0x80000000 + SDRAM_SIZE - CODE_SIZE ) */ -#define MAX_COMMAND_LENGTH 100 -#define COMMAND_NUM 31 #define NAND_MAX_BLK_NUM 10000000 /* ((Hand.nand_pn / Hand.nand_ppb) + 1) */ #define NAND_MAX_PAGE_NUM 1073740824 /*Hand.nand_pn */ #define NAND_SECTION_NUM 23