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 4
4
* SPDX-License-Identifier: Apache-2.0
5
5
*/
6
6
7
+ #include "zephyr/sys/printk.h"
7
8
#include <zephyr/logging/log.h>
8
9
LOG_MODULE_REGISTER (app );
9
10
@@ -68,7 +69,7 @@ static int loader(const struct shell *sh)
68
69
return - EINVAL ;
69
70
}
70
71
71
- #if CONFIG_SHELL
72
+ #if DT_NODE_HAS_PROP ( DT_PATH ( zephyr_user ), cdc_acm ) && CONFIG_SHELL
72
73
uint8_t debug = endptr [1 ];
73
74
if (debug != 0 && strcmp (k_thread_name_get (k_current_get ()), "main" ) == 0 ) {
74
75
// disables default shell on UART
@@ -173,6 +174,7 @@ static int loader(const struct shell *sh)
173
174
#if CONFIG_SHELL
174
175
SHELL_CMD_REGISTER (sketch , NULL , "Run sketch" , loader );
175
176
177
+ #if DT_NODE_HAS_PROP (DT_PATH (zephyr_user ), cdc_acm )
176
178
static int enable_shell_usb (void )
177
179
{
178
180
bool log_backend = CONFIG_SHELL_BACKEND_SERIAL_LOG_LEVEL > 0 ;
@@ -187,6 +189,7 @@ static int enable_shell_usb(void)
187
189
return 0 ;
188
190
}
189
191
#endif
192
+ #endif
190
193
191
194
int main (void )
192
195
{
You can’t perform that action at this time.
0 commit comments