diff --git a/arch/sim/Kconfig b/arch/sim/Kconfig index 7922d51f460..7587cab19e2 100644 --- a/arch/sim/Kconfig +++ b/arch/sim/Kconfig @@ -32,6 +32,15 @@ config SIM_M32 beyond. For thoses versions, you must add SIM_M32=y to the .config file in order to enable building a 32-bit image on a 64-bit platform. +config SIM_CYGWIN_DECORATED + bool "Decorated Cygwin names" + default n + depends on WINDOWS_CYGWIN + ---help--- + Older versions of Cygwin toolsdecorated C symbol names by adding an + underscore to the beginning of the symbol name. Newer versions of + Cygwin do not seem to do this. + config SIM_WALLTIME bool "Execution simulation in near real-time" default n diff --git a/arch/sim/src/Makefile b/arch/sim/src/Makefile index 66f82c741ff..db6575b5af9 100644 --- a/arch/sim/src/Makefile +++ b/arch/sim/src/Makefile @@ -206,7 +206,11 @@ GNU/Linux-names.dat: GNU nuttx-names.dat $(Q) cp nuttx-names.dat $@ Cygwin-names.dat: nuttx-names.dat +ifeq ($())CONFIG_SIM_CYGWIN_DECORATED),y) $(Q) cat $^ | sed -e "s/^/_/g" >$@ +else + $(Q) cp nuttx-names.dat $@ +endif nuttx.rel : libarch$(LIBEXT) board/libboard$(LIBEXT) $(HOSTOS)-names.dat $(LINKOBJS) $(Q) echo "LD: nuttx.rel"