diff --git a/arch/sim/src/Makefile b/arch/sim/src/Makefile index 103cc15f8b..bd9a608fd4 100644 --- a/arch/sim/src/Makefile +++ b/arch/sim/src/Makefile @@ -61,7 +61,7 @@ CSRCS = up_initialize.c up_idle.c up_interruptcontext.c up_initialstate.c CSRCS += up_createstack.c up_usestack.c up_releasestack.c up_stackframe.c CSRCS += up_unblocktask.c up_blocktask.c up_releasepending.c CSRCS += up_reprioritizertr.c up_exit.c up_schedulesigaction.c up_spiflash.c -CSRCS += up_allocateheap.c up_devconsole.c up_qspiflash.c +CSRCS += up_allocateheap.c up_qspiflash.c VPATH = sim DEPPATH = $(patsubst %,--dep-path %,$(subst :, ,$(VPATH))) @@ -92,7 +92,7 @@ endif endif ifeq ($(CONFIG_DEV_CONSOLE),y) - CSRCS += up_uartwait.c + CSRCS += up_devconsole.c up_uartwait.c HOSTSRCS += up_simuart.c endif diff --git a/arch/sim/src/sim/up_head.c b/arch/sim/src/sim/up_head.c index 49b0b89339..02afe4596b 100644 --- a/arch/sim/src/sim/up_head.c +++ b/arch/sim/src/sim/up_head.c @@ -95,9 +95,12 @@ int main(int argc, char **argv, char **envp) #endif } +#ifdef USE_DEVCONSOLE /* Restore the original terminal mode and return the exit code */ simuart_terminate(); +#endif + return g_exitcode; } diff --git a/arch/sim/src/sim/up_idle.c b/arch/sim/src/sim/up_idle.c index 91f082f029..f31357416d 100644 --- a/arch/sim/src/sim/up_idle.c +++ b/arch/sim/src/sim/up_idle.c @@ -132,7 +132,7 @@ void up_idle(void) nxsched_process_timer(); #endif -#ifdef CONFIG_DEV_CONSOLE +#ifdef USE_DEVCONSOLE /* Handle UART data availability */ if (g_uart_data_available) diff --git a/arch/sim/src/sim/up_internal.h b/arch/sim/src/sim/up_internal.h index c76a30bae8..acc3f8cd82 100644 --- a/arch/sim/src/sim/up_internal.h +++ b/arch/sim/src/sim/up_internal.h @@ -204,7 +204,7 @@ extern volatile int g_eventloop; #endif #endif -#ifdef CONFIG_DEV_CONSOLE +#ifdef USE_DEVCONSOLE extern volatile int g_uart_data_available; #endif