support for CLI (over USB CDC) without DEBUG (#5940)
This commit is contained in:
committed by
Bertrand Songis
parent
487c0de90f
commit
a6afbebc94
@@ -701,6 +701,7 @@ int cliTest(const char ** argv)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(DEBUG)
|
||||||
int cliTrace(const char ** argv)
|
int cliTrace(const char ** argv)
|
||||||
{
|
{
|
||||||
if (!strcmp(argv[1], "on")) {
|
if (!strcmp(argv[1], "on")) {
|
||||||
@@ -714,6 +715,7 @@ int cliTrace(const char ** argv)
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int cliStackInfo(const char ** argv)
|
int cliStackInfo(const char ** argv)
|
||||||
{
|
{
|
||||||
@@ -1220,7 +1222,9 @@ const CliCommand cliCommands[] = {
|
|||||||
{ "stackinfo", cliStackInfo, "" },
|
{ "stackinfo", cliStackInfo, "" },
|
||||||
{ "meminfo", cliMemoryInfo, "" },
|
{ "meminfo", cliMemoryInfo, "" },
|
||||||
{ "test", cliTest, "new | std::exception | graphics | memspd" },
|
{ "test", cliTest, "new | std::exception | graphics | memspd" },
|
||||||
|
#if defined(DEBUG)
|
||||||
{ "trace", cliTrace, "on | off" },
|
{ "trace", cliTrace, "on | off" },
|
||||||
|
#endif
|
||||||
{ "help", cliHelp, "[<command>]" },
|
{ "help", cliHelp, "[<command>]" },
|
||||||
{ "debugvars", cliDebugVars, "" },
|
{ "debugvars", cliDebugVars, "" },
|
||||||
{ "repeat", cliRepeat, "<interval> <command>" },
|
{ "repeat", cliRepeat, "<interval> <command>" },
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ set(FIRMWARE_TARGET_SRC
|
|||||||
../common/arm/stm32/flash_driver.cpp
|
../common/arm/stm32/flash_driver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
if(DEBUG)
|
if(DEBUG OR CLI)
|
||||||
set(STM32USB_SRC
|
set(STM32USB_SRC
|
||||||
${STM32USB_SRC}
|
${STM32USB_SRC}
|
||||||
STM32_USB_Device_Library/Class/cdc/src/usbd_cdc_core.c
|
STM32_USB_Device_Library/Class/cdc/src/usbd_cdc_core.c
|
||||||
|
|||||||
Reference in New Issue
Block a user