I am running out of ideas other than digging deeper into the IDF make system. The examples/system/console example compiles just fine and works. I want to add a command system to a project I am building to allow for turning on/off modules at runtime. I have followed pattern of the example but I I get 'undefined reference' to the esp console API:
Code: Select all
LD build/TrackDAQ.elf
D:/dev/projects/motorcycle/TrackDAQ/TrackDAQ/build/main\libmain.a(ControlCmds.o):(.literal._ZN11ControlCmds12taskCommandsEPv+0x18): undefined reference to `esp_console_run(char const*, int*)'
D:/dev/projects/motorcycle/TrackDAQ/TrackDAQ/build/main\libmain.a(ControlCmds.o):(.literal._ZN11ControlCmds22register_enableLoggersEv+0x18): undefined reference to `esp_console_cmd_register(esp_console_cmd_t const*)'
D:/dev/projects/motorcycle/TrackDAQ/TrackDAQ/build/main\libmain.a(ControlCmds.o):(.literal._ZN11ControlCmds5setupEv+0xc): undefined reference to `esp_console_get_completion(char const*, linenoiseCompletions*)'
D:/dev/projects/motorcycle/TrackDAQ/TrackDAQ/build/main\libmain.a(ControlCmds.o):(.literal._ZN11ControlCmds5setupEv+0x10): undefined reference to `esp_console_get_hint(char const*, int*, int*)'
D:/dev/projects/motorcycle/TrackDAQ/TrackDAQ/build/main\libmain.a(ControlCmds.o):(.literal._ZN11ControlCmds5setupEv+0x18): undefined reference to `esp_console_init(esp_console_config_t const*)'
D:/dev/projects/motorcycle/TrackDAQ/TrackDAQ/build/main\libmain.a(ControlCmds.o):(.literal._ZN11ControlCmds5setupEv+0x2c): undefined reference to `esp_console_register_help_command()'
D:/dev/projects/motorcycle/TrackDAQ/TrackDAQ/build/main\libmain.a(ControlCmds.o): In function `ControlCmds::taskCommands(void*)':
D:/dev/projects/motorcycle/TrackDAQ/TrackDAQ/main/ControlCmds.cpp:107: undefined reference to `esp_console_run(char const*, int*)'
D:/dev/projects/motorcycle/TrackDAQ/TrackDAQ/build/main\libmain.a(ControlCmds.o): In function `ControlCmds::register_enableLoggers()':
D:/dev/projects/motorcycle/TrackDAQ/TrackDAQ/main/ControlCmds.cpp:107: undefined reference to `esp_console_cmd_register(esp_console_cmd_t const*)'
Code: Select all
$ make -d | grep libconsole
Considering target file '/c/dev/esp-idf/examples/system/console/build/console/libconsole.a'.
Considering target file 'libconsole.a'.
Finished prerequisites of target file 'libconsole.a'.
Prerequisite 'linenoise/linenoise.o' is older than target 'libconsole.a'.
Prerequisite 'argtable3/argtable3.o' is older than target 'libconsole.a'.
Prerequisite 'commands.o' is older than target 'libconsole.a'.
Prerequisite 'split_argv.o' is older than target 'libconsole.a'.
No need to remake target 'libconsole.a'.
Finished prerequisites of target file '/c/dev/esp-idf/examples/system/console/build/console/libconsole.a'.
Prerequisite 'component-console-build' of target '/c/dev/esp-idf/examples/system/console/build/console/libconsole.a' does not exist.
Must remake target '/c/dev/esp-idf/examples/system/console/build/console/libconsole.a'.
Putting child 0x2008a838 (/c/dev/esp-idf/examples/system/console/build/console/libconsole.a) PID 8164 on the chain.
Live child 0x2008a838 (/c/dev/esp-idf/examples/system/console/build/console/libconsole.a) PID 8164
Successfully remade target file '/c/dev/esp-idf/examples/system/console/build/console/libconsole.a'.
Prerequisite '/c/dev/esp-idf/examples/system/console/build/console/libconsole.a' is older than target '/c/dev/esp-idf/examples/system/console/build/console.elf'.
Code: Select all
$ make -d | grep libconsole
Considering target file '/d/dev/projects/motorcycle/TrackDAQ/TrackDAQ/build/console/libconsole.a'.
Considering target file 'libconsole.a'.
Finished prerequisites of target file 'libconsole.a'.
Prerequisite 'linenoise/linenoise.o' is older than target 'libconsole.a'.
Prerequisite 'argtable3/argtable3.o' is older than target 'libconsole.a'.
Prerequisite 'commands.o' is older than target 'libconsole.a'.
Prerequisite 'split_argv.o' is older than target 'libconsole.a'.
No need to remake target 'libconsole.a'.
Finished prerequisites of target file '/d/dev/projects/motorcycle/TrackDAQ/TrackDAQ/build/console/libconsole.a'.
Prerequisite 'component-console-build' of target '/d/dev/projects/motorcycle/TrackDAQ/TrackDAQ/build/console/libconsole.a' does not exist.
Must remake target '/d/dev/projects/motorcycle/TrackDAQ/TrackDAQ/build/console/libconsole.a'.
Putting child 0x2008e5c0 (/d/dev/projects/motorcycle/TrackDAQ/TrackDAQ/build/console/libconsole.a) PID 5368 on the chain.
Live child 0x2008e5c0 (/d/dev/projects/motorcycle/TrackDAQ/TrackDAQ/build/console/libconsole.a) PID 5368
Successfully remade target file '/d/dev/projects/motorcycle/TrackDAQ/TrackDAQ/build/console/libconsole.a'.
D:/dev/projects/motorcycle/TrackDAQ/TrackDAQ/build/main\libmain.a(ControlCmds.o):(.literal._ZN11ControlCmds12taskCommandsEPv+0x18): undefined reference to `esp_console_run(char const*, int*)'
D:/dev/projects/motorcycle/TrackDAQ/TrackDAQ/build/main\libmain.a(ControlCmds.o):(.literal._ZN11ControlCmds22register_enableLoggersEv+0x18): undefined reference to `esp_console_cmd_register(esp_console_cmd_t const*)'
D:/dev/projects/motorcycle/TrackDAQ/TrackDAQ/build/main\libmain.a(ControlCmds.o):(.literal._ZN11ControlCmds5setupEv+0xc): undefined reference to `esp_console_get_completion(char const*, linenoiseCompletions*)'
D:/dev/projects/motorcycle/TrackDAQ/TrackDAQ/build/main\libmain.a(ControlCmds.o):(.literal._ZN11ControlCmds5setupEv+0x10): undefined reference to `esp_console_get_hint(char const*, int*, int*)'
D:/dev/projects/motorcycle/TrackDAQ/TrackDAQ/build/main\libmain.a(ControlCmds.o):(.literal._ZN11ControlCmds5setupEv+0x18): undefined reference to `esp_console_init(esp_console_config_t const*)'
D:/dev/projects/motorcycle/TrackDAQ/TrackDAQ/build/main\libmain.a(ControlCmds.o):(.literal._ZN11ControlCmds5setupEv+0x2c): undefined reference to `esp_console_register_help_command()'
Anyone include the console APIs in their code and have issues? What am I missing?
Thanks, Jeff