summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nuttx/arch/sim/Kconfig16
-rw-r--r--nuttx/arch/sim/include/types.h2
2 files changed, 16 insertions, 2 deletions
diff --git a/nuttx/arch/sim/Kconfig b/nuttx/arch/sim/Kconfig
index e88267053..356044e85 100644
--- a/nuttx/arch/sim/Kconfig
+++ b/nuttx/arch/sim/Kconfig
@@ -7,7 +7,8 @@ if ARCH_SIM
comment "Simulation Configuration Options"
config SIM_M32
- bool "Build 32-bit simulation on 64-bit machine"
+# bool "Build 32-bit simulation on 64-bit machine"
+ bool
default n
---help---
Simulation context switching is based on logic like setjmp and longjmp. This
@@ -19,6 +20,19 @@ 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.
+choice
+ prompt "Host CPU Type"
+ default HOST_X86_64
+
+config HOST_X86_64
+ bool "x86_64"
+ select SIM_M32
+
+config HOST_X86
+ bool "x86"
+
+endchoice # Host CPU Type
+
config SIM_WALLTIME
bool "Execution simulation in near real-time"
default n
diff --git a/nuttx/arch/sim/include/types.h b/nuttx/arch/sim/include/types.h
index 741876c90..4ced4eac4 100644
--- a/nuttx/arch/sim/include/types.h
+++ b/nuttx/arch/sim/include/types.h
@@ -76,7 +76,7 @@ typedef signed long long _int64_t;
typedef unsigned long long _uint64_t;
#define __INT64_DEFINED
-#ifdef CONFIG_SIM_M32
+#ifdef CONFIG_HOST_X86_64
/* 32-bit build on 64-bit machine: A pointer is 8 bytes */
typedef signed long long _intptr_t;