2012-04-07 16:50:57 +02:00
|
|
|
#
|
|
|
|
# For a description of the syntax of this configuration file,
|
2015-06-28 16:08:57 +02:00
|
|
|
# see the file kconfig-language.txt in the NuttX tools repository.
|
2012-04-07 16:50:57 +02:00
|
|
|
#
|
2012-04-05 19:44:04 +02:00
|
|
|
|
2012-04-11 04:04:59 +02:00
|
|
|
if ARCH_SIM
|
2012-09-09 17:43:18 +02:00
|
|
|
comment "Simulation Configuration Options"
|
|
|
|
|
2014-08-23 02:21:32 +02:00
|
|
|
choice
|
|
|
|
prompt "Host CPU Type"
|
|
|
|
default HOST_X86_64
|
|
|
|
|
|
|
|
config HOST_X86_64
|
|
|
|
bool "x86_64"
|
2019-09-28 18:46:12 +02:00
|
|
|
select ARCH_HAVE_STACKCHECK
|
2020-05-31 20:41:11 +02:00
|
|
|
select LIBC_ARCH_ELF_64BIT if LIBC_ARCH_ELF && !SIM_M32
|
2014-08-23 02:21:32 +02:00
|
|
|
|
|
|
|
config HOST_X86
|
|
|
|
bool "x86"
|
2019-09-28 18:46:12 +02:00
|
|
|
select ARCH_HAVE_STACKCHECK
|
2014-08-23 02:21:32 +02:00
|
|
|
|
2017-08-26 19:38:44 +02:00
|
|
|
config HOST_ARM
|
2019-09-28 18:46:12 +02:00
|
|
|
bool "arm"
|
|
|
|
select ARCH_HAVE_STACKCHECK
|
2017-08-26 19:38:44 +02:00
|
|
|
|
2014-08-23 02:21:32 +02:00
|
|
|
endchoice # Host CPU Type
|
|
|
|
|
2019-08-08 00:05:00 +02:00
|
|
|
config ARCH_CHIP
|
|
|
|
string
|
2020-02-10 05:57:25 +01:00
|
|
|
default "sim"
|
2019-08-08 00:05:00 +02:00
|
|
|
|
2014-10-03 16:23:57 +02:00
|
|
|
config SIM_M32
|
|
|
|
bool "Build 32-bit simulation on 64-bit machine"
|
|
|
|
default n
|
|
|
|
depends on HOST_X86_64
|
|
|
|
---help---
|
|
|
|
Simulation context switching is based on logic like setjmp and longjmp. This
|
|
|
|
context switching is only available for 32-bit targets. On 64-bit machines,
|
|
|
|
this context switching will fail.
|
|
|
|
|
|
|
|
The workaround on 64-bit machines for now is to build for a 32-bit target on the
|
|
|
|
64-bit machine. The workaround for this issue has been included in NuttX 6.15 and
|
2020-02-23 09:50:23 +01:00
|
|
|
beyond. For those versions, you must add SIM_M32=y to the .config file in
|
2014-10-03 16:23:57 +02:00
|
|
|
order to enable building a 32-bit image on a 64-bit platform.
|
|
|
|
|
2015-09-24 17:08:52 +02:00
|
|
|
config SIM_CYGWIN_DECORATED
|
|
|
|
bool "Decorated Cygwin names"
|
|
|
|
default n
|
|
|
|
depends on WINDOWS_CYGWIN
|
|
|
|
---help---
|
2017-01-01 22:34:23 +01:00
|
|
|
Older versions of Cygwin tools decorated C symbol names by adding an
|
2015-09-24 17:08:52 +02:00
|
|
|
underscore to the beginning of the symbol name. Newer versions of
|
|
|
|
Cygwin do not seem to do this.
|
|
|
|
|
2015-09-24 22:53:04 +02:00
|
|
|
How do you know if you need this option? You could look at the generated
|
|
|
|
symbol tables to see if there are underscore characters at the beginning
|
|
|
|
of the symbol names. Or, if you need this option, the simulation will not
|
|
|
|
run: It will crash early, probably in some function due to the failure to
|
|
|
|
allocate memory.
|
|
|
|
|
2015-09-24 22:41:57 +02:00
|
|
|
choice
|
|
|
|
prompt "X64_64 ABI"
|
|
|
|
default SIM_X8664_SYSTEMV if HOST_LINUX
|
|
|
|
default SIM_X8664_MICROSOFT if HOST_WINDOWS
|
|
|
|
depends on HOST_X86_64 && !SIM_32
|
|
|
|
|
|
|
|
config SIM_X8664_SYSTEMV
|
|
|
|
bool "System V AMD64 ABI"
|
|
|
|
---help---
|
|
|
|
The calling convention of the System V AMD64 ABI is followed on Solaris,
|
2020-04-26 04:44:18 +02:00
|
|
|
Linux, FreeBSD, macOS, and other UNIX-like or POSIX-compliant operating
|
2015-09-24 22:41:57 +02:00
|
|
|
systems. The first six integer or pointer arguments are passed in registers
|
|
|
|
RDI, RSI, RDX, RCX, R8, and R9, while XMM0, XMM1, XMM2, XMM3, XMM4, XMM5,
|
|
|
|
XMM6 and XMM7 are used for floating point arguments. For system calls, R10
|
|
|
|
is used instead of RCX. As in the Microsoft x64 calling convention,
|
|
|
|
additional arguments are passed on the stack and the return value is stored
|
|
|
|
in RAX.
|
|
|
|
|
|
|
|
Registers RBP, RBX, and R12-R15 are callee-save registers; all others must
|
|
|
|
be saved by the caller if they wish to preserve their values.
|
|
|
|
|
|
|
|
Unlike the Microsoft calling convention, a shadow space is not provided; on
|
|
|
|
function entry, the return address is adjacent to the seventh integer argument
|
|
|
|
on the stack.
|
|
|
|
|
|
|
|
config SIM_X8664_MICROSOFT
|
|
|
|
bool "Microsoft x64 calling convention"
|
|
|
|
---help---
|
|
|
|
The Microsoft x64 calling convention is followed on Microsoft Windows and
|
|
|
|
pre-boot UEFI (for long mode on x86-64). It uses registers RCX, RDX, R8,
|
|
|
|
R9 for the first four integer or pointer arguments (in that order), and
|
|
|
|
XMM0, XMM1, XMM2, XMM3 are used for floating point arguments. Additional
|
|
|
|
arguments are pushed onto the stack (right to left). Integer return
|
|
|
|
values (similar to x86) are returned in RAX if 64 bits or less. Floating
|
|
|
|
point return values are returned in XMM0. Parameters less than 64 bits
|
|
|
|
long are not zero extended; the high bits are not zeroed.
|
|
|
|
|
|
|
|
endchoice
|
|
|
|
|
2012-04-17 23:53:05 +02:00
|
|
|
config SIM_WALLTIME
|
2020-09-21 15:50:52 +02:00
|
|
|
bool "Run the simulation at a fixed cadence in near real-time"
|
2012-04-17 23:53:05 +02:00
|
|
|
default n
|
2020-09-21 15:50:52 +02:00
|
|
|
|
|
|
|
if SIM_WALLTIME
|
|
|
|
choice
|
|
|
|
prompt "Simulation at a fixed cadence in near real-time"
|
|
|
|
default SIM_WALLTIME_SLEEP
|
|
|
|
|
|
|
|
config SIM_WALLTIME_SLEEP
|
|
|
|
bool "Execution the simulation in near real-time using host sleep"
|
2012-04-17 23:53:05 +02:00
|
|
|
---help---
|
|
|
|
NOTE: In order to facility fast testing, the sim target's IDLE loop, by default,
|
|
|
|
calls the system timer "interrupt handler" as fast as possible. As a result, there
|
|
|
|
really are no noticeable delays when a task sleeps. However, the task really does
|
|
|
|
sleep -- but the time scale is wrong. If you want behavior that is closer to
|
2013-04-25 23:52:00 +02:00
|
|
|
normal timing, then you can define SIM_WALLTIME=y in your configuration
|
2012-04-17 23:53:05 +02:00
|
|
|
file. This configuration setting will cause the sim target's IDLE loop to delay
|
|
|
|
on each call so that the system "timer interrupt" is called at a rate approximately
|
|
|
|
correct for the system timer tick rate. With this definition in the configuration,
|
|
|
|
sleep() behavior is more or less normal.
|
|
|
|
|
2020-09-21 15:50:52 +02:00
|
|
|
config SIM_WALLTIME_SIGNAL
|
|
|
|
bool "Execute the simulation using a host timer"
|
|
|
|
---help---
|
|
|
|
Run the NuttX simulation using a host timer that delivers periodic SIGALRM
|
|
|
|
events at a tick rate specified by CONFIG_USEC_PER_TICK. Enabling this option
|
|
|
|
will generate the timer 'tick' events from the host timer at a fixed rate.
|
|
|
|
The simulated 'tick' events from Idle task are no longer sent.
|
|
|
|
|
|
|
|
endchoice
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
2017-04-03 01:46:22 +02:00
|
|
|
config SIM_NETDEV
|
|
|
|
bool "Simulated Network Device"
|
|
|
|
default y
|
2020-02-10 08:27:36 +01:00
|
|
|
depends on NET_ETHERNET
|
2018-08-24 22:23:50 +02:00
|
|
|
select ARCH_HAVE_NETDEV_STATISTICS
|
2020-01-21 06:34:10 +01:00
|
|
|
select SCHED_LPWORK
|
2020-02-10 04:21:27 +01:00
|
|
|
select SIM_WALLTIME
|
2020-03-18 13:12:26 +01:00
|
|
|
---help---
|
|
|
|
Build in support for a simulated network device.
|
|
|
|
|
|
|
|
if SIM_NETDEV
|
|
|
|
|
|
|
|
choice
|
|
|
|
prompt "Simulated Network Device Type"
|
|
|
|
default SIM_NETDEV_TAP
|
|
|
|
|
|
|
|
config SIM_NETDEV_TAP
|
|
|
|
bool "Simulated Network Device with TAP/WPCAP"
|
2020-03-21 04:53:07 +01:00
|
|
|
depends on (HOST_LINUX || HOST_WINDOWS)
|
2017-04-03 01:46:22 +02:00
|
|
|
---help---
|
|
|
|
Build in support for a simulated network device using a TAP device on Linux or
|
|
|
|
WPCAP on Windows.
|
|
|
|
|
2020-03-18 13:12:26 +01:00
|
|
|
config SIM_NETDEV_VPNKIT
|
|
|
|
bool "Simulated Network Device with VPNKit"
|
|
|
|
---help---
|
|
|
|
Build in support for a simulated network device using VPNKit.
|
|
|
|
|
|
|
|
endchoice
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
2020-03-21 03:55:58 +01:00
|
|
|
config SIM_NETDEV_VPNKIT_PATH
|
|
|
|
string "Unix domain socket to communicate with VPNKit"
|
|
|
|
default "/tmp/vpnkit-nuttx"
|
|
|
|
depends on SIM_NETDEV_VPNKIT
|
|
|
|
|
SUMMARY
-------
This patch enhances networking support for the simulation under Linux.
Includes updated support for Linux TUN/TAP, and the addition of support for
Linux bridge devices.
CHANGES
-------
o Check to see if the d_txavail callback is present before calling it in
the arp send code. This prevents a segfault when simulating the telnetd
daemon with arp send enabled.
o Adjust the simulation's netdriver_loop() so it will detect and respond to
ARP requests.
o Do not attempt to take the tap device's hardware address for use by the
simulation. That hardware address belongs to the host end of the link,
not the simulation end. Generate a randomized MAC address instead.
o Do not assign an IP address to the interface on the host side of the TAP
link.
+ Provide two modes: "host route" and "bridge".
+ In host route mode, maintain a host route that points any traffic for the
simulation's IP address to the tap device. In this mode, so long as the
simulation's IP is a free address in the same subnet as the host, no
additional configuration will be required to talk to it from the host.
Note that address changes are handled automatically if they follow the
rule of if-down/set-address/if-up, which everything seems to.
+ In bridge mode, add the tap device to the specified bridge instance. See
configs/sim/NETWORK-LINUX.txt for information and usage examples. This
enables much more flexible configurations (with fewer headaches), such as
running multiple simulations on a single host, all of which can access
the network the host is connected to.
o Refresh configurations in configs/sim where CONFIG_NET=y. They default
to "host route" mode.
o Add configs/sim/NETWORK-LINUX.txt
CAVEATS
-------
- The MAC address generation code is extremely simplistic, and does not
check for potential conflicts on the network. Probably not an issue, but
something to be aware of.
- I was careful to leave it in a state where Cygwin/pcap should still work,
but I don't have a Windows environment to test in. This should be
checked.
- I don't know if this was ever intended to work with OS X. I didn't even
try to test it there.
NOTES
-----
- Was able to get telnetd working and simulate nsh over telnet, but only so
long as listen backlogs were disabled.
There appears to be a bug in the backlog code where sockets are being
returned in SYN_RCVD state instead of waiting until they're ESTABLISHED;
if you perform an immediate send after accepting the connection, it will
confuse the stack and the send will hang; additionally, the connection
will never reach ESTABLISHED state.
Can be worked around by adding a sleep(1) after the accept in telnetd. I
don't have the necessary knowledge of the IP stack to know what the
correct fix is.
2016-05-21 01:36:14 +02:00
|
|
|
if HOST_LINUX
|
|
|
|
choice
|
|
|
|
prompt "Simulation Network Type"
|
|
|
|
default SIM_NET_HOST_ROUTE
|
2020-03-18 13:12:26 +01:00
|
|
|
depends on SIM_NETDEV_TAP
|
SUMMARY
-------
This patch enhances networking support for the simulation under Linux.
Includes updated support for Linux TUN/TAP, and the addition of support for
Linux bridge devices.
CHANGES
-------
o Check to see if the d_txavail callback is present before calling it in
the arp send code. This prevents a segfault when simulating the telnetd
daemon with arp send enabled.
o Adjust the simulation's netdriver_loop() so it will detect and respond to
ARP requests.
o Do not attempt to take the tap device's hardware address for use by the
simulation. That hardware address belongs to the host end of the link,
not the simulation end. Generate a randomized MAC address instead.
o Do not assign an IP address to the interface on the host side of the TAP
link.
+ Provide two modes: "host route" and "bridge".
+ In host route mode, maintain a host route that points any traffic for the
simulation's IP address to the tap device. In this mode, so long as the
simulation's IP is a free address in the same subnet as the host, no
additional configuration will be required to talk to it from the host.
Note that address changes are handled automatically if they follow the
rule of if-down/set-address/if-up, which everything seems to.
+ In bridge mode, add the tap device to the specified bridge instance. See
configs/sim/NETWORK-LINUX.txt for information and usage examples. This
enables much more flexible configurations (with fewer headaches), such as
running multiple simulations on a single host, all of which can access
the network the host is connected to.
o Refresh configurations in configs/sim where CONFIG_NET=y. They default
to "host route" mode.
o Add configs/sim/NETWORK-LINUX.txt
CAVEATS
-------
- The MAC address generation code is extremely simplistic, and does not
check for potential conflicts on the network. Probably not an issue, but
something to be aware of.
- I was careful to leave it in a state where Cygwin/pcap should still work,
but I don't have a Windows environment to test in. This should be
checked.
- I don't know if this was ever intended to work with OS X. I didn't even
try to test it there.
NOTES
-----
- Was able to get telnetd working and simulate nsh over telnet, but only so
long as listen backlogs were disabled.
There appears to be a bug in the backlog code where sockets are being
returned in SYN_RCVD state instead of waiting until they're ESTABLISHED;
if you perform an immediate send after accepting the connection, it will
confuse the stack and the send will hang; additionally, the connection
will never reach ESTABLISHED state.
Can be worked around by adding a sleep(1) after the accept in telnetd. I
don't have the necessary knowledge of the IP stack to know what the
correct fix is.
2016-05-21 01:36:14 +02:00
|
|
|
|
|
|
|
config SIM_NET_HOST_ROUTE
|
|
|
|
bool "Use local host route"
|
|
|
|
---help---
|
|
|
|
Add a host route for the simulation that points to the created tap device. The
|
|
|
|
simulation will not be able to access the public network unless iptables is
|
2019-08-08 16:46:54 +02:00
|
|
|
configured to masquerade for it. See boards/sim/sim sim/NETWORK-LINUX.txt
|
|
|
|
for more information.
|
SUMMARY
-------
This patch enhances networking support for the simulation under Linux.
Includes updated support for Linux TUN/TAP, and the addition of support for
Linux bridge devices.
CHANGES
-------
o Check to see if the d_txavail callback is present before calling it in
the arp send code. This prevents a segfault when simulating the telnetd
daemon with arp send enabled.
o Adjust the simulation's netdriver_loop() so it will detect and respond to
ARP requests.
o Do not attempt to take the tap device's hardware address for use by the
simulation. That hardware address belongs to the host end of the link,
not the simulation end. Generate a randomized MAC address instead.
o Do not assign an IP address to the interface on the host side of the TAP
link.
+ Provide two modes: "host route" and "bridge".
+ In host route mode, maintain a host route that points any traffic for the
simulation's IP address to the tap device. In this mode, so long as the
simulation's IP is a free address in the same subnet as the host, no
additional configuration will be required to talk to it from the host.
Note that address changes are handled automatically if they follow the
rule of if-down/set-address/if-up, which everything seems to.
+ In bridge mode, add the tap device to the specified bridge instance. See
configs/sim/NETWORK-LINUX.txt for information and usage examples. This
enables much more flexible configurations (with fewer headaches), such as
running multiple simulations on a single host, all of which can access
the network the host is connected to.
o Refresh configurations in configs/sim where CONFIG_NET=y. They default
to "host route" mode.
o Add configs/sim/NETWORK-LINUX.txt
CAVEATS
-------
- The MAC address generation code is extremely simplistic, and does not
check for potential conflicts on the network. Probably not an issue, but
something to be aware of.
- I was careful to leave it in a state where Cygwin/pcap should still work,
but I don't have a Windows environment to test in. This should be
checked.
- I don't know if this was ever intended to work with OS X. I didn't even
try to test it there.
NOTES
-----
- Was able to get telnetd working and simulate nsh over telnet, but only so
long as listen backlogs were disabled.
There appears to be a bug in the backlog code where sockets are being
returned in SYN_RCVD state instead of waiting until they're ESTABLISHED;
if you perform an immediate send after accepting the connection, it will
confuse the stack and the send will hang; additionally, the connection
will never reach ESTABLISHED state.
Can be worked around by adding a sleep(1) after the accept in telnetd. I
don't have the necessary knowledge of the IP stack to know what the
correct fix is.
2016-05-21 01:36:14 +02:00
|
|
|
|
|
|
|
config SIM_NET_BRIDGE
|
|
|
|
bool "Attach to Linux bridge"
|
2019-10-06 05:39:12 +02:00
|
|
|
---help---
|
SUMMARY
-------
This patch enhances networking support for the simulation under Linux.
Includes updated support for Linux TUN/TAP, and the addition of support for
Linux bridge devices.
CHANGES
-------
o Check to see if the d_txavail callback is present before calling it in
the arp send code. This prevents a segfault when simulating the telnetd
daemon with arp send enabled.
o Adjust the simulation's netdriver_loop() so it will detect and respond to
ARP requests.
o Do not attempt to take the tap device's hardware address for use by the
simulation. That hardware address belongs to the host end of the link,
not the simulation end. Generate a randomized MAC address instead.
o Do not assign an IP address to the interface on the host side of the TAP
link.
+ Provide two modes: "host route" and "bridge".
+ In host route mode, maintain a host route that points any traffic for the
simulation's IP address to the tap device. In this mode, so long as the
simulation's IP is a free address in the same subnet as the host, no
additional configuration will be required to talk to it from the host.
Note that address changes are handled automatically if they follow the
rule of if-down/set-address/if-up, which everything seems to.
+ In bridge mode, add the tap device to the specified bridge instance. See
configs/sim/NETWORK-LINUX.txt for information and usage examples. This
enables much more flexible configurations (with fewer headaches), such as
running multiple simulations on a single host, all of which can access
the network the host is connected to.
o Refresh configurations in configs/sim where CONFIG_NET=y. They default
to "host route" mode.
o Add configs/sim/NETWORK-LINUX.txt
CAVEATS
-------
- The MAC address generation code is extremely simplistic, and does not
check for potential conflicts on the network. Probably not an issue, but
something to be aware of.
- I was careful to leave it in a state where Cygwin/pcap should still work,
but I don't have a Windows environment to test in. This should be
checked.
- I don't know if this was ever intended to work with OS X. I didn't even
try to test it there.
NOTES
-----
- Was able to get telnetd working and simulate nsh over telnet, but only so
long as listen backlogs were disabled.
There appears to be a bug in the backlog code where sockets are being
returned in SYN_RCVD state instead of waiting until they're ESTABLISHED;
if you perform an immediate send after accepting the connection, it will
confuse the stack and the send will hang; additionally, the connection
will never reach ESTABLISHED state.
Can be worked around by adding a sleep(1) after the accept in telnetd. I
don't have the necessary knowledge of the IP stack to know what the
correct fix is.
2016-05-21 01:36:14 +02:00
|
|
|
Add the created tap device to the specified bridge. You will need to manually
|
|
|
|
configure the bridge IP address (if any) and routes that point to the bridge.
|
2019-08-08 16:46:54 +02:00
|
|
|
See boards/sim/sim/sim/NETWORK-LINUX.txt for more information.
|
SUMMARY
-------
This patch enhances networking support for the simulation under Linux.
Includes updated support for Linux TUN/TAP, and the addition of support for
Linux bridge devices.
CHANGES
-------
o Check to see if the d_txavail callback is present before calling it in
the arp send code. This prevents a segfault when simulating the telnetd
daemon with arp send enabled.
o Adjust the simulation's netdriver_loop() so it will detect and respond to
ARP requests.
o Do not attempt to take the tap device's hardware address for use by the
simulation. That hardware address belongs to the host end of the link,
not the simulation end. Generate a randomized MAC address instead.
o Do not assign an IP address to the interface on the host side of the TAP
link.
+ Provide two modes: "host route" and "bridge".
+ In host route mode, maintain a host route that points any traffic for the
simulation's IP address to the tap device. In this mode, so long as the
simulation's IP is a free address in the same subnet as the host, no
additional configuration will be required to talk to it from the host.
Note that address changes are handled automatically if they follow the
rule of if-down/set-address/if-up, which everything seems to.
+ In bridge mode, add the tap device to the specified bridge instance. See
configs/sim/NETWORK-LINUX.txt for information and usage examples. This
enables much more flexible configurations (with fewer headaches), such as
running multiple simulations on a single host, all of which can access
the network the host is connected to.
o Refresh configurations in configs/sim where CONFIG_NET=y. They default
to "host route" mode.
o Add configs/sim/NETWORK-LINUX.txt
CAVEATS
-------
- The MAC address generation code is extremely simplistic, and does not
check for potential conflicts on the network. Probably not an issue, but
something to be aware of.
- I was careful to leave it in a state where Cygwin/pcap should still work,
but I don't have a Windows environment to test in. This should be
checked.
- I don't know if this was ever intended to work with OS X. I didn't even
try to test it there.
NOTES
-----
- Was able to get telnetd working and simulate nsh over telnet, but only so
long as listen backlogs were disabled.
There appears to be a bug in the backlog code where sockets are being
returned in SYN_RCVD state instead of waiting until they're ESTABLISHED;
if you perform an immediate send after accepting the connection, it will
confuse the stack and the send will hang; additionally, the connection
will never reach ESTABLISHED state.
Can be worked around by adding a sleep(1) after the accept in telnetd. I
don't have the necessary knowledge of the IP stack to know what the
correct fix is.
2016-05-21 01:36:14 +02:00
|
|
|
|
|
|
|
endchoice
|
|
|
|
endif
|
|
|
|
|
|
|
|
if SIM_NET_BRIDGE
|
|
|
|
config SIM_NET_BRIDGE_DEVICE
|
|
|
|
string "Bridge device to attach"
|
|
|
|
default "nuttx0"
|
|
|
|
---help---
|
|
|
|
The name of the bridge device (as passed to "brctl create") to which the simulation's
|
|
|
|
TAP interface should be added.
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
2019-11-12 15:03:38 +01:00
|
|
|
config SIM_RPTUN_MASTER
|
2020-02-22 19:31:14 +01:00
|
|
|
bool "Remote Processor Tunneling Role"
|
2019-11-12 15:03:38 +01:00
|
|
|
depends on RPTUN
|
|
|
|
|
2012-04-17 23:53:05 +02:00
|
|
|
config SIM_LCDDRIVER
|
|
|
|
bool "Build a simulated LCD driver"
|
|
|
|
default y
|
|
|
|
depends on NX && NX_LCDDRIVER
|
|
|
|
---help---
|
|
|
|
Build a simulated LCD driver"
|
|
|
|
|
|
|
|
config SIM_FRAMEBUFFER
|
|
|
|
bool "Build a simulated frame buffer driver"
|
2015-02-01 19:15:46 +01:00
|
|
|
default n
|
2014-12-08 15:29:48 +01:00
|
|
|
depends on !NX_LCDDRIVER
|
2012-04-17 23:53:05 +02:00
|
|
|
---help---
|
|
|
|
Build a simulated frame buffer driver"
|
|
|
|
|
2014-12-08 15:29:48 +01:00
|
|
|
if SIM_FRAMEBUFFER
|
|
|
|
|
2012-04-17 23:53:05 +02:00
|
|
|
config SIM_X11FB
|
|
|
|
bool "Use X11 window"
|
|
|
|
default n
|
2020-02-09 18:38:45 +01:00
|
|
|
select SCHED_LPWORK
|
|
|
|
select SIM_WALLTIME
|
2012-04-17 23:53:05 +02:00
|
|
|
---help---
|
|
|
|
Use an X11 graphics window to simulate the graphics device"
|
|
|
|
|
|
|
|
config SIM_X11NOSHM
|
|
|
|
bool "Don't use shared memory with X11"
|
|
|
|
default n
|
|
|
|
depends on SIM_X11FB
|
|
|
|
---help---
|
|
|
|
Don't use shared memory with the X11 graphics device emulation."
|
|
|
|
|
|
|
|
config SIM_FBHEIGHT
|
|
|
|
int "Display height"
|
|
|
|
default 240
|
|
|
|
---help---
|
|
|
|
Simulated display height. Default: 240
|
|
|
|
|
|
|
|
config SIM_FBWIDTH
|
|
|
|
int "Display width"
|
|
|
|
default 320 if SIM_LCDDRIVER
|
|
|
|
default 480 if SIM_FRAMEBUFFER
|
|
|
|
---help---
|
|
|
|
Simulated width of the display. Default: 320 or 480
|
|
|
|
|
|
|
|
config SIM_FBBPP
|
|
|
|
int "Pixel depth in bits"
|
|
|
|
default 8
|
|
|
|
---help---
|
|
|
|
Pixel depth in bits. Valid choices are 4, 8, 16, 24, or 32.
|
|
|
|
If you use the X11 display emulation, the selected BPP must match the BPP
|
|
|
|
of your graphics hardware (probably 32 bits). Default: 8
|
|
|
|
|
2014-12-08 15:29:48 +01:00
|
|
|
endif # SIM_FRAMEBUFFER
|
|
|
|
|
2014-12-14 17:19:07 +01:00
|
|
|
if SIM_X11FB && INPUT
|
|
|
|
choice
|
|
|
|
prompt "X11 Simulated Input Device"
|
|
|
|
default SIM_NOINPUT
|
|
|
|
|
2012-04-17 23:53:05 +02:00
|
|
|
config SIM_TOUCHSCREEN
|
2014-12-14 17:19:07 +01:00
|
|
|
bool "X11 mouse-based touchscreen emulation"
|
2012-04-17 23:53:05 +02:00
|
|
|
---help---
|
|
|
|
Support an X11 mouse-based touchscreen emulation. Also needs INPUT=y
|
|
|
|
|
2014-12-14 17:19:07 +01:00
|
|
|
config SIM_AJOYSTICK
|
|
|
|
bool "X11 mouse-based analog joystick emulation"
|
|
|
|
---help---
|
2018-07-09 02:24:45 +02:00
|
|
|
Support an X11 mouse-based analog joystick emulation. Also needs INPUT=y
|
2014-12-14 17:19:07 +01:00
|
|
|
|
|
|
|
config SIM_NOINPUT
|
|
|
|
bool "No input device"
|
|
|
|
|
|
|
|
endchoice # X11 Simulated Input Device
|
|
|
|
endif # SIM_X11FB && INPUT
|
|
|
|
|
2012-04-17 23:53:05 +02:00
|
|
|
config SIM_TCNWAITERS
|
|
|
|
bool "Maximum number poll() waiters"
|
|
|
|
default 4
|
2019-05-22 02:57:54 +02:00
|
|
|
depends on SIM_TOUCHSCREEN
|
2012-04-17 23:53:05 +02:00
|
|
|
---help---
|
2016-08-03 17:44:48 +02:00
|
|
|
The maximum number of threads that can be waiting on poll() for a
|
|
|
|
touchscreen event. Default: 4
|
|
|
|
|
|
|
|
config SIM_IOEXPANDER
|
|
|
|
bool "Simulated I/O Expander"
|
|
|
|
default n
|
|
|
|
depends on IOEXPANDER
|
|
|
|
select IOEXPANDER_INT_ENABLE
|
|
|
|
---help---
|
|
|
|
Build a simple, simulated I/O Expander chip simulation (for testing
|
|
|
|
purposes only).
|
|
|
|
|
|
|
|
if SIM_IOEXPANDER
|
|
|
|
|
|
|
|
config SIM_INT_NCALLBACKS
|
|
|
|
int "Max number of interrupt callbacks"
|
|
|
|
default 4
|
|
|
|
---help---
|
|
|
|
This is the maximum number of interrupt callbacks supported
|
|
|
|
|
|
|
|
config SIM_INT_POLLDELAY
|
|
|
|
int "Interrupt poll delay (used)"
|
|
|
|
default 500000
|
|
|
|
---help---
|
|
|
|
This microsecond delay defines the polling rate for missed interrupts.
|
|
|
|
|
|
|
|
endif # SIM_IOEXPANDER
|
2012-04-17 23:53:05 +02:00
|
|
|
|
2014-09-19 18:27:18 +02:00
|
|
|
config SIM_SPIFLASH
|
|
|
|
bool "Simulated SPI FLASH with SMARTFS"
|
|
|
|
default n
|
|
|
|
select FS_SMARTFS
|
|
|
|
select MTD_SMART
|
|
|
|
---help---
|
|
|
|
Adds a simulated SPI FLASH that responds to standard M25 style
|
|
|
|
commands on the SPI bus.
|
|
|
|
|
|
|
|
choice
|
|
|
|
prompt "Simulated SPI FLASH Size"
|
|
|
|
default SIM_SPIFLASH_1M
|
|
|
|
depends on SIM_SPIFLASH
|
|
|
|
|
|
|
|
config SIM_SPIFLASH_1M
|
|
|
|
bool "1 MBit (128K Byte)"
|
|
|
|
|
|
|
|
config SIM_SPIFLASH_8M
|
|
|
|
bool "8 MBit (1M Byte)"
|
|
|
|
|
|
|
|
config SIM_SPIFLASH_32M
|
|
|
|
bool "32 MBit (4M Byte)"
|
|
|
|
|
|
|
|
config SIM_SPIFLASH_64M
|
|
|
|
bool "64 MBit (8M Byte)"
|
|
|
|
|
|
|
|
config SIM_SPIFLASH_128M
|
|
|
|
bool "128 MBit (16M Byte)"
|
|
|
|
|
|
|
|
endchoice
|
|
|
|
|
2016-07-19 15:33:44 +02:00
|
|
|
config SIM_SPIFLASH_SECTORSIZE
|
|
|
|
int "FLASH Sector Erase Size"
|
|
|
|
default 65536
|
|
|
|
depends on SIM_SPIFLASH
|
|
|
|
---help---
|
|
|
|
Sets the large sector erase size that the part simulates.
|
|
|
|
This driver simulates SPI devices that have both a large
|
|
|
|
sector erase as well as a "sub-sector" (per the datasheet)
|
|
|
|
erase size (typically 4K bytes).
|
|
|
|
|
|
|
|
config SIM_SPIFLASH_SUBSECTORSIZE
|
|
|
|
int "FLASH Sub-Sector Erase Size"
|
|
|
|
default 4096
|
|
|
|
depends on SIM_SPIFLASH
|
|
|
|
---help---
|
|
|
|
Sets the smaller sub-sector erase size supported by the
|
|
|
|
FLASH emulation
|
|
|
|
|
|
|
|
config SIM_SPIFLASH_M25P
|
|
|
|
bool "Enable M25Pxx FLASH"
|
|
|
|
depends on MTD_M25P
|
|
|
|
---help---
|
|
|
|
Enables simulation of an M25P type FLASH
|
|
|
|
|
|
|
|
config SIM_SPIFLASH_SST26
|
|
|
|
bool "Enable SST26 FLASH"
|
|
|
|
depends on MTD_SST26
|
|
|
|
---help---
|
|
|
|
Enables simulation of an SST26 type FLASH
|
|
|
|
|
|
|
|
config SIM_SPIFLASH_W25
|
|
|
|
bool "Enable W25 FLASH"
|
|
|
|
depends on MTD_W25
|
|
|
|
---help---
|
|
|
|
Enables simulation of a W25 type FLASH
|
|
|
|
|
|
|
|
config SIM_SPIFLASH_CUSTOM
|
|
|
|
bool "Enable Emulation of a Custom Manufacturer / ID FLASH"
|
|
|
|
depends on SIM_SPIFLASH
|
|
|
|
---help---
|
|
|
|
Enables simulation of FLASH with a custom Manufacturer, ID and Capacity
|
|
|
|
|
2014-09-19 18:27:18 +02:00
|
|
|
config SIM_SPIFLASH_MANUFACTURER
|
|
|
|
hex "Hex ID of the FLASH manufacturer code"
|
|
|
|
default 0x20
|
2016-07-19 15:33:44 +02:00
|
|
|
depends on SIM_SPIFLASH_CUSTOM
|
2014-09-19 18:27:18 +02:00
|
|
|
---help---
|
|
|
|
Allows the simulated FLASH Manufacturer ID to be set.
|
|
|
|
|
|
|
|
config SIM_SPIFLASH_MEMORY_TYPE
|
|
|
|
hex "Hex ID of the FLASH Memory Type code"
|
|
|
|
default 0x20
|
2016-07-19 15:33:44 +02:00
|
|
|
depends on SIM_SPIFLASH_CUSTOM
|
|
|
|
---help---
|
|
|
|
Allows the simulated FLASH Memory Type code to be set.
|
|
|
|
|
|
|
|
config SIM_SPIFLASH_CAPACITY
|
|
|
|
hex "Hex ID of the FLASH capacity code"
|
|
|
|
default 0x14
|
|
|
|
depends on SIM_SPIFLASH_CUSTOM
|
|
|
|
---help---
|
|
|
|
Allows the simulated FLASH Memory Capacity code to be set.
|
|
|
|
|
|
|
|
config SIM_SPIFLASH_PAGESIZE
|
|
|
|
int "FLASH Write / Program Page Size"
|
|
|
|
default 256
|
2014-09-19 18:27:18 +02:00
|
|
|
depends on SIM_SPIFLASH
|
2016-07-19 15:33:44 +02:00
|
|
|
---help---
|
|
|
|
Sets the size of a page program operation. The page size
|
|
|
|
represents the maximum number of bytes that can be sent
|
|
|
|
for a program operation. If more bytes than this are
|
|
|
|
sent on a single Page Program, then the address will
|
|
|
|
"wrap" causing the initial data sent to be overwritten.
|
|
|
|
This is consistent with standard SPI FLASH operation.
|
|
|
|
|
|
|
|
config SIM_QSPIFLASH
|
|
|
|
bool "Simulated QSPI FLASH with SMARTFS"
|
|
|
|
default n
|
|
|
|
select FS_SMARTFS
|
|
|
|
select MTD_SMART
|
|
|
|
---help---
|
|
|
|
Adds a simulated QSPI FLASH that responds to N25QXXX style
|
|
|
|
commands on the QSPI bus.
|
|
|
|
|
|
|
|
choice
|
|
|
|
prompt "Simulated QSPI FLASH Size"
|
|
|
|
default SIM_QSPIFLASH_1M
|
|
|
|
depends on SIM_QSPIFLASH
|
|
|
|
|
|
|
|
config SIM_QSPIFLASH_1M
|
|
|
|
bool "1 MBit (128K Byte)"
|
|
|
|
|
|
|
|
config SIM_QSPIFLASH_8M
|
|
|
|
bool "8 MBit (1M Byte)"
|
|
|
|
|
|
|
|
config SIM_QSPIFLASH_32M
|
|
|
|
bool "32 MBit (4M Byte)"
|
|
|
|
|
|
|
|
config SIM_QSPIFLASH_64M
|
|
|
|
bool "64 MBit (8M Byte)"
|
|
|
|
|
|
|
|
config SIM_QSPIFLASH_128M
|
|
|
|
bool "128 MBit (16M Byte)"
|
|
|
|
|
|
|
|
endchoice
|
|
|
|
|
|
|
|
config SIM_QSPIFLASH_MANUFACTURER
|
|
|
|
hex "Hex ID of the FLASH manufacturer code"
|
|
|
|
default 0x20
|
|
|
|
depends on SIM_QSPIFLASH
|
|
|
|
---help---
|
|
|
|
Allows the simulated FLASH Manufacturer ID to be set.
|
|
|
|
|
|
|
|
config SIM_QSPIFLASH_MEMORY_TYPE
|
|
|
|
hex "Hex ID of the FLASH Memory Type code"
|
|
|
|
default 0xba
|
|
|
|
depends on SIM_QSPIFLASH
|
2014-09-19 18:27:18 +02:00
|
|
|
---help---
|
|
|
|
Allows the simulated FLASH Memory Type code to be set.
|
|
|
|
|
2016-07-19 15:33:44 +02:00
|
|
|
config SIM_QSPIFLASH_SECTORSIZE
|
2014-09-19 18:27:18 +02:00
|
|
|
int "FLASH Sector Erase Size"
|
|
|
|
default 65536
|
2016-07-19 15:33:44 +02:00
|
|
|
depends on SIM_QSPIFLASH
|
2014-09-19 18:27:18 +02:00
|
|
|
---help---
|
|
|
|
Sets the large sector erase size that the part simulates.
|
2016-07-19 15:33:44 +02:00
|
|
|
This driver simulates QSPI devices that have both a large
|
2014-09-19 18:27:18 +02:00
|
|
|
sector erase as well as a "sub-sector" (per the datasheet)
|
|
|
|
erase size (typically 4K bytes).
|
|
|
|
|
2016-07-19 15:33:44 +02:00
|
|
|
config SIM_QSPIFLASH_SUBSECTORSIZE
|
2014-09-19 18:27:18 +02:00
|
|
|
int "FLASH Sub-Sector Erase Size"
|
|
|
|
default 4096
|
2016-07-19 15:33:44 +02:00
|
|
|
depends on SIM_QSPIFLASH
|
2014-09-19 18:27:18 +02:00
|
|
|
---help---
|
|
|
|
Sets the smaller sub-sector erase size supported by the
|
|
|
|
FLASH emulation
|
|
|
|
|
2016-07-19 15:33:44 +02:00
|
|
|
config SIM_QSPIFLASH_PAGESIZE
|
2014-09-19 21:00:42 +02:00
|
|
|
int "FLASH Write / Program Page Size"
|
2014-09-19 18:27:18 +02:00
|
|
|
default 256
|
2016-07-19 15:33:44 +02:00
|
|
|
depends on SIM_QSPIFLASH
|
2014-09-19 18:27:18 +02:00
|
|
|
---help---
|
|
|
|
Sets the size of a page program operation. The page size
|
|
|
|
represents the maximum number of bytes that can be sent
|
|
|
|
for a program operation. If more bytes than this are
|
|
|
|
sent on a single Page Program, then the address will
|
|
|
|
"wrap" causing the initial data sent to be overwritten.
|
|
|
|
This is consistent with standard SPI FLASH operation.
|
|
|
|
|
2020-08-27 02:38:44 +02:00
|
|
|
config SIM_HCISOCKET
|
|
|
|
bool "Attach Host Bluetooth"
|
|
|
|
default false
|
|
|
|
depends on (WIRELESS_BLUETOOTH && HOST_LINUX)
|
|
|
|
---help---
|
|
|
|
Attached the local bluetooth device to the simulation
|
|
|
|
target via HCI_CHANNEL_USER. This gives NuttX full
|
|
|
|
control of the device, but is abstracted from the
|
|
|
|
physical interface which is still handled by Linux.
|
|
|
|
|
2020-08-31 14:12:32 +02:00
|
|
|
config SIM_UART_NUMBER
|
|
|
|
int "The number of tty ports on sim platform, range is 0~4"
|
|
|
|
default 0
|
|
|
|
|
|
|
|
config SIM_UART0_NAME
|
|
|
|
string "the name of uart0 on sim"
|
|
|
|
default "/dev/ttySIM0"
|
|
|
|
depends on SIM_UART_NUMBER >= 1
|
|
|
|
|
|
|
|
config SIM_UART1_NAME
|
|
|
|
string "the name of uart1 on sim"
|
|
|
|
default "/dev/ttySIM1"
|
|
|
|
depends on SIM_UART_NUMBER >= 2
|
|
|
|
|
|
|
|
config SIM_UART2_NAME
|
|
|
|
string "the name of uart2 on sim"
|
|
|
|
default "/dev/ttySIM2"
|
|
|
|
depends on SIM_UART_NUMBER >= 3
|
|
|
|
|
|
|
|
config SIM_UART3_NAME
|
|
|
|
string "the name of uart3 on sim"
|
|
|
|
default "/dev/ttySIM3"
|
|
|
|
depends on SIM_UART_NUMBER >= 4
|
|
|
|
|
2016-08-03 17:44:48 +02:00
|
|
|
endif # ARCH_SIM
|