mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:58:59 +08:00
arch/sim/src/sim: Replace all CONFIG_DEV_CONSOLE with USE_DEVCONSOLE for arch/sim and compile up_devconsole.c conditionally.
This commit is contained in:
@@ -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_createstack.c up_usestack.c up_releasestack.c up_stackframe.c
|
||||||
CSRCS += up_unblocktask.c up_blocktask.c up_releasepending.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_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
|
VPATH = sim
|
||||||
DEPPATH = $(patsubst %,--dep-path %,$(subst :, ,$(VPATH)))
|
DEPPATH = $(patsubst %,--dep-path %,$(subst :, ,$(VPATH)))
|
||||||
@@ -92,7 +92,7 @@ endif
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_DEV_CONSOLE),y)
|
ifeq ($(CONFIG_DEV_CONSOLE),y)
|
||||||
CSRCS += up_uartwait.c
|
CSRCS += up_devconsole.c up_uartwait.c
|
||||||
HOSTSRCS += up_simuart.c
|
HOSTSRCS += up_simuart.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@@ -95,9 +95,12 @@ int main(int argc, char **argv, char **envp)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef USE_DEVCONSOLE
|
||||||
/* Restore the original terminal mode and return the exit code */
|
/* Restore the original terminal mode and return the exit code */
|
||||||
|
|
||||||
simuart_terminate();
|
simuart_terminate();
|
||||||
|
#endif
|
||||||
|
|
||||||
return g_exitcode;
|
return g_exitcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ void up_idle(void)
|
|||||||
nxsched_process_timer();
|
nxsched_process_timer();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_DEV_CONSOLE
|
#ifdef USE_DEVCONSOLE
|
||||||
/* Handle UART data availability */
|
/* Handle UART data availability */
|
||||||
|
|
||||||
if (g_uart_data_available)
|
if (g_uart_data_available)
|
||||||
|
|||||||
@@ -204,7 +204,7 @@ extern volatile int g_eventloop;
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_DEV_CONSOLE
|
#ifdef USE_DEVCONSOLE
|
||||||
extern volatile int g_uart_data_available;
|
extern volatile int g_uart_data_available;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user