File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 44 * SPDX-License-Identifier: Apache-2.0
55 */
66
7+ #include "zephyr/sys/printk.h"
78#include <zephyr/logging/log.h>
89LOG_MODULE_REGISTER (app );
910
@@ -68,7 +69,7 @@ static int loader(const struct shell *sh)
6869 return - EINVAL ;
6970 }
7071
71- #if CONFIG_SHELL
72+ #if DT_NODE_HAS_PROP ( DT_PATH ( zephyr_user ), cdc_acm ) && CONFIG_SHELL
7273 uint8_t debug = endptr [1 ];
7374 if (debug != 0 && strcmp (k_thread_name_get (k_current_get ()), "main" ) == 0 ) {
7475 // disables default shell on UART
@@ -173,6 +174,7 @@ static int loader(const struct shell *sh)
173174#if CONFIG_SHELL
174175SHELL_CMD_REGISTER (sketch , NULL , "Run sketch" , loader );
175176
177+ #if DT_NODE_HAS_PROP (DT_PATH (zephyr_user ), cdc_acm )
176178static int enable_shell_usb (void )
177179{
178180 bool log_backend = CONFIG_SHELL_BACKEND_SERIAL_LOG_LEVEL > 0 ;
@@ -187,6 +189,7 @@ static int enable_shell_usb(void)
187189 return 0 ;
188190}
189191#endif
192+ #endif
190193
191194int main (void )
192195{
You can’t perform that action at this time.
0 commit comments