Commit Graph

762 Commits

Author SHA1 Message Date
Xiang Xiao
80277d1630
Refine the preprocessor conditional guard style (#190) 2020-01-31 19:07:39 +01:00
Xiang Xiao
68951e8d72 Remove exra whitespace from files (#189)
* Remove multiple newlines at the end of files
* Remove the whitespace from the end of lines
2020-01-31 09:24:49 -06:00
YAMAMOTO Takashi
2983fcdeb7 Fix an inverted logic in the following commit.
commit 39bd9ff670
	Author: YAMAMOTO Takashi <yamamoto@midokura.com>
	Date:   Wed Jan 29 00:17:05 2020 +0900

		sim: Prefix symbols with _ for non-ELF

		Namely for Mach-O.  Leave __CYGWIN__ case as it is.
2020-01-29 10:02:39 -08:00
YAMAMOTO Takashi
4174c818df sim: Don't bother to remove nuttx.rel after consuming
We usually don't remove input files like $OBJS.
2020-01-29 09:03:48 +01:00
YAMAMOTO Takashi
b5573c5b51 sim: Fix nuttx.rel for macOS
* ld doesn't have --start-groupi/--end-group things.  As far as I know,
  it works that way by default.

* objcopy with Mach-O support is not widely available.
  (GNU binutils seem to claim the support but it didn't actually work
  for me.  llvm-objcopy --redefine-syms explicitly rejects Mach-O.)
  Instead, use -unexported_symbols_list linker flag to hide symbols
  to avoid conflicts with host symbols.
2020-01-29 09:03:48 +01:00
YAMAMOTO Takashi
298c2e5e4f sim: Fix stack alignment
The recent x86-64 convention requires 16-byte alignment before
(not after) calling a function.

This fixes snprintf crash I observed on macOS while saving XMM registers.
2020-01-29 09:03:48 +01:00
YAMAMOTO Takashi
39bd9ff670 sim: Prefix symbols with _ for non-ELF
Namely for Mach-O.  Leave __CYGWIN__ case as it is.
2020-01-29 09:03:48 +01:00
YAMAMOTO Takashi
69a8b9721c sim: Check __ELF__ for .type/.size directives
Mach-O assembler doesn't have them either.
2020-01-29 09:03:48 +01:00
chao.an
4d74aa6ec9 sim/netdev: dependens on LPWORK by default
Change-Id: Ic2d42d29fc84bef1cc279ef443897d5191888e72
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-01-21 14:17:24 +08:00
chao.an
1ff410957f sim/net: do not do any critical operations in idle
Change-Id: Ia9011b62ea61d15bd66aa063e4165d9d3baacb51
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-01-16 11:01:47 -06:00
chao.an
5c5b4cc3c9 fix warning: passing argument 4 of up_x11initialize from incompatible pointer type
Change-Id: I8fbb506d104dd6a0c41c86ca977e28097694910b
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-01-14 18:30:48 -06:00
patacongo
f00569816f Fix a few errors concerning use of section block comments in .c files: (#95)
1. No .c file should include a "Public Types" section.  Only a header file can define a public type.  A .c file can only define a private type.  Several files contained private type definitions.  The section that they were defined in, however, was incorrectly named "Public Types."  Those were easilty changed to "Private Types" which is what they are.

2. No .c file should include a "Public Function Prototypes" section.  All global function prototypes should be provided via a header file and never declared with a .c file.

For No. 2, I corrected as many cases as was reasonable for the time that I had available.  But there are still a dozen or so .c files that declare "Public Function Prototypes" within a .c file.  This is bad programming style.  These declarations should all be moved to the proper header files.
2020-01-14 00:37:54 +01:00
Xiang Xiao
6a3c2aded6 Fix wait loop and void cast (#24)
* Simplify EINTR/ECANCEL error handling

1. Add semaphore uninterruptible wait function
2 .Replace semaphore wait loop with a single uninterruptible wait
3. Replace all sem_xxx to nxsem_xxx

* Unify the void cast usage

1. Remove void cast for function because many place ignore the returned value witout cast
2. Replace void cast for variable with UNUSED macro
2020-01-02 10:54:43 -06:00
Xiang Xiao
87cf5c58ae Correct some problems with network timed events when there are multiple network devices in the configuration.
Squashed commit of the following:

Author: Gregory Nutt <gnutt@nuttx.org>

    Ran nxstyle against many of the affected files.  But this job was too big for today.  Many of the network drivers under arch are highly non-compiant and generate many, many faults from nxstyle.  Those will have to be visited again another day.

Author: Xiang Xiao <xiaoxiang@xiaomi.com>

    This effects all network drivers as well as timing related portions of net/: devif_poll_tcp_timer shouldn't be skipped in the multiple card case.  devif_timer will be called multiple time in one period if the multiple card exist, the elapsed time calculated for the first callback is right, but the flowing callback in the same period is wrong(very short) because the global variable g_polltimer is used in the calculation.  So let's pass the delay time to devif_timer and remove g_polltimer.
2019-12-24 10:37:30 -06:00
Xiang Xiao
68b0ba88af arch/sim/src/sim/up_framebuffer.c: Replace all _info/_err with ginfo/gerr. 2019-12-16 09:03:05 -06:00
Xiang Xiao
3a5e2b7ce7 arch/sim/src/: Simulator restore the console even error handler call host exit directly. 2019-12-16 09:01:25 -06:00
Xiang Xiao
6c362c8521 arch/sim/src/sim/: Remove unnecessary initialization log from simulator initialization. 2019-12-16 08:59:28 -06:00
Gregory Nutt
a4a23ef584 arch/sim/src/sim/up_hostfs.c, fs/hostfs/hostfs_rpmsg.c, include/nuttx/fs/hostfs.h: Sync nuttx_stat_s consistent with standard struct. Standard struct stat layout changed with commit ea577f1ddd31b3f67405cbb2a57806c47dd4dd63. 2019-12-13 08:35:00 -06:00
chao.an
b7e8670af1 arch/sim/ and boards/sim/sim/sim: Support OpenAMP between two simulator instances. Please read rpserver/rpproxy section in boards/sim/sim/sim/README.txt for more information. 2019-11-12 08:03:38 -06:00
Xiang Xiao
48de68c474 arch/sim/src/sim/up_hostfs.c: Fix warning: 'mapflags' may be used uninitialized in this function. 2019-11-11 09:01:51 -06:00
Xiang Xiao
5a3d9c7570 arch/sim/src/Makefile: Move all SMP stuff into one place for arch/sim. 2019-11-10 20:42:00 -06:00
Xiang Xiao
a4ce23518e arch/sim/src/sim: Replace all CONFIG_DEV_CONSOLE with USE_DEVCONSOLE for arch/sim and compile up_devconsole.c conditionally. 2019-11-10 20:40:38 -06:00
Xiang Xiao
db8a7ab39c arch/sim/src/sim/up_simuart.c: Remove CONFIG_SIM_UART_DATAPOST for arch/sim. It's very dangerous to call NuttX API from simuart_thread. 2019-11-10 20:38:25 -06:00
chao.an
f2428edd7d arch/sim/src/nuttx-names.dat: Add host ftruncate() support. 2019-11-09 10:07:07 -06:00
Matias Nitsche
e118d99bf5 drivers/power/pm: Historically, the NuttX PM subsystem has consisted of two functional components: (1) an "Upper" part that detects state changes based on a random walk driven by activity levels, and (2) and "lower" part that implementst the state changes.
This change decouples that upper activity-based logic from the lower random walk logic and allows use of other upper state detection logic (such as a custom, application-specific state machine).
2019-11-09 09:09:33 -06:00
Gregory Nutt
3e8366775f Run tools/nxstyle against some files. 2019-11-05 19:39:36 -06:00
Xiang Xiao
800e12fc42 arch/: Add rpmsg_serialini() call to every implementation of up_initialize() for rpmsg uart initialization. 2019-11-04 08:11:50 -06:00
Matias Nitsche
bca21c107f arch/sim/src/sim/up_idle.c: Report activity on simulated UART. 2019-10-24 08:15:29 -06:00
Matias N
ddbb38ac91 arch/sim/src/Makefile: Fixes missing recursion into sim board directory for dependency generation. 2019-10-24 08:10:55 -06:00
Matias N
7135abbd2c arch/sim/src/sim: Fixes compilation for sim target when enabling power management. 2019-10-22 07:30:33 -06:00
Matias N
5d5b861568 arch/sim/src/sim/up_tickless.c: Correct the calculation of the timer period. Fix some missing initialization of globals and missing return values. 2019-10-20 17:11:28 -06:00
Xiang Xiao
9f0502f8ba arch/sim/src/sim/up_hostfs.c: hostfs skip '.' and '..' in readdir' 2019-10-07 21:43:59 -06:00
Xiang Xiao
3bc62f1ccc Change space to tab and help to ---help--- in Kconfig files. 2019-10-05 21:39:12 -06:00
ligd
9924e88d1e arch/sim: Add stack color feature for ps command. 2019-09-28 10:46:12 -06:00
Juha Niskanen
c3d24571fb Fix some typos. Mostly inital->initial. 2019-09-27 06:32:32 -06:00
Gregory Nutt
9bd850295e arch/sim/src/Makefile: Fix dependency problem due to reorganization of some directories. 2019-08-26 17:31:29 -06:00
Nathan Hartman
be5a40c656 Fix typos in comments. 2019-08-21 09:32:59 -06:00
Gregory Nutt
240926c995 Beginning to update comments to reflect new organization of the boards/ sub-directory. 2019-08-08 08:46:54 -06:00
Gregory Nutt
eaaa73198b boards/Board.mk: Correct a simulator included path problem introduced by reorganization of arch/sim/src. 2019-08-08 07:17:43 -06:00
Gregory Nutt
c840ac2496 arch/sim: Even though the simulation has no chips, it needs to have CONFIG_ARCH_CHIP and chip sub-directories. Otherwise, we would have to treat it as a special case in the build system. 2019-08-07 16:05:00 -06:00
Alin Jerpelea
a1c991d921 Merged in alinjerpelea/nuttx (pull request #963)
Move boards to boards folder

* boards: rename configs folder to boards

    This is the proposed layout after the change:

    boards: - folder containing board folders
            <board>: - name of each board
                    drivers: - extra drivers specific for platform
                    include: - header files for the boars
                    scripts: - extra scripts specific for platform
                        src: - board specific code
                      tools: - extra tools specific for platform
                    <config>: - board specific configuration(s)

    Note:
    <xxx> names are dependent on platform

    This is a logical change to aim to the arch layout but this is a
    huge change it should be done in several steps to lower the risk.

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* Kconfig: replace configs with boards

    The change is needed after the path change

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* Makefile: replace configs with boards

    The change is needed after the path change

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* Makefile.*: replace configs with boards

    The change is needed after the path change

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* Make.defs: replace configs with boards

    The change is needed after the path change

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* .sh: replace configs with boards

    The change is needed after the path change

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* .mk: replace configs with boards

    The change is needed after the path change

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* .c & .h: replace configs with boards

    The change is needed after the path change

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* .bat: replace configs with boards

    The change is needed after the path change

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-05 12:04:14 +00:00
Nathan Hartman
68d43d3679 Fix typos. 2019-08-04 14:50:28 -06:00
Nathan Hartman
32e9ba7604 Documenation/, configs/: ix typos and one HTML syntax error. Fix HTML syntax error in Documentation/NfsHowto.html: <coce> -> <code> html tag. 2019-07-30 16:10:15 -06:00
Gregory Nutt
eef2f4599e Commit 933e9e407b broke the simulator on a 64-bit platform. 2019-07-29 14:34:29 -06:00
Gregory Nutt
b49be4bb20 Squashed commit of the following:
arch/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    sched/ audio/ crypto/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    Documentation/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    fs/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    graphics/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    net/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    drivers/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    include/, syscall/, wireless/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    configs/:  Remove all references to CONFIG_DISABLE_POLL.  Standard POSIX poll can no longer be disabled.
2019-05-21 18:57:54 -06:00
Gregory Nutt
2c2729521b Abandon attempt to get common data structures for NX and the raw framebuffer cursor interface. This backs out several changes. 2019-04-07 18:00:40 -06:00
Gregory Nutt
04b723e447 Squashed commit of the following:
include/nuttx/nx/nxcursor.h:  Add a header file descrbing the implementation of an NX cursor interface.  There is no implementation in place yet.

    include/nuttx/video/cursor.h:  Separate out cursor definitions from fb.h.  Other graphic interfaces other than a framebuffer may support a cursor, possible a software cursor.
2019-04-06 12:18:05 -06:00
Gregory Nutt
9acb652e29 Rename sched_timer_expiration to nxsched_timer_expiration. That is the appropriate name for an internal sched/ function (still many named incorrectly). 2019-03-20 19:31:43 -06:00
Gregory Nutt
b290160b3b Rename sched_process_timer to nxsched_process_timer. That is the appropriate name for an internal sched/ function (still many named incorrectly). 2019-03-20 19:27:40 -06:00
Gregory Nutt
a64869aa67 CONFIG_NFILE_DESCRIPTORS=0 can no longer be used to disable the file system. NuttX with no file system does not make sense.
Squashed commit of the following:

    configs/:  The few configurations that formerly set CONFIG_NFILE_DESCRIPTORS=0 should not default, rather they should set the number of descriptors to 3.
    fs/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    tools/:  Tools updates for changes to usage of CONFIG_NFILE_DESCRIPTORS.
    syscall/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    libs/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    include/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    drivers/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    Documentation/:  Remove all references to CONFIG_NFILE_DESCRIPTORS == 0
    binfmt/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    arch/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    net/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    sched/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    sched/Kconfig:  CONFIG_NFILE_DESCRIPTORS may no longer to set to a value less than 3
    configs/:  Remove all settings for CONFIG_NFILE_DESCRIPTORS < 3
2019-02-11 12:09:26 -06:00
Gregory Nutt
a2e62f557d Squashed commit of the following:
sched/init/nx_bringup.c:  Fix a naming collision.
    sched/init:  Rename os_start() to nx_start()
    sched/init:  Rename os_smp* to nx_smp*
    sched/init:  Rename os_bringup to nx_bringup
    sched/init:  rename all internal static functions to begin with nx_ vs os_
2019-02-04 16:20:35 -06:00
Gregory Nutt
bb623d1e04 This commit renames all internal OS functions defined under sched/task so that they begin with the prefix. For example, nxtask_exit() vs. task_exit().
Squashed commit of the following:

    Trivial, cosmetic
    sched/, arch/, and include:  Rename task_vforkstart() as nxtask_vforkstart()
    sched/, arch/, and include:  Rename task_vforkabort() as nxtask_vforkabort()
    sched/, arch/, and include:  Rename task_vforksetup() as nxtask_vfork_setup()
    sched/:  Rename notify_cancellation() as nxnotify_cancellation()
    sched/:  Rename task_recover() to nxtask_recover()
    sched/task, sched/pthread/, Documentation/:  Rename task_argsetup() and task_terminate() to nxtask_argsetup() and nxtask_terminate(), respectively.
    sched/task:  Rename task_schedsetup() to nxtask_schedsetup()
    sched/ (plus some binfmt/, include/, and arch/):  Rename task_start() and task_starthook() to nxtask_start() and nxtask_starthook().
    arch/ and sched/:  Rename task_exit() and task_exithook() to nxtask_exit() and nxtask_exithook(), respectively.
    sched/task:  Rename all internal, static, functions to begin with the nx prefix.
2019-02-04 13:42:51 -06:00
Gregory Nutt
865cc85dfd sched/sched/sched_critmonitor.c: A correct a logic error. arch/sim/src/up_critmon.c: Use higher resolution timer. 2018-11-25 09:49:21 -06:00
Gregory Nutt
0af39e1493 arch/: Update all _exit() implementations for all architectures so that they correctly called the scheduler instumentation layer for the new task that runs when the old one exits. This missing instrumentation was confusing the Critical Section Monitor logic with uses this instrumentation to track the state of critical sections. 2018-11-24 18:20:57 -06:00
Gregory Nutt
095b597d34 sched/sched and fs/procfs: Fix some bus in critical section monitor found in testing 2018-11-24 17:58:35 -06:00
Gregory Nutt
807d5bb4ae Critical Section Monitor: Add low level timer support for simulation. Fix serial bugs and logic errors in initial implementation. Still does not work; takes assertions. 2018-11-24 15:07:12 -06:00
Xiang Xiao
f71cd2678a arch/sim/src/up_netdriver.c: Fix error 'invalid operands to binary &' 2018-11-10 14:00:13 -06:00
Xiang Xiao
28abd336da arch/sim/src/up_hostfs.c: Support S_IFSOCK, DT_LNK, O_DIRECT and O_SYNC 2018-11-09 09:13:55 -06:00
Gregory Nutt
9bc951a335 Rename devif_loopback_out to devi_loopback 2018-08-25 08:33:21 -06:00
Xiang Xiao
c0bacb7d89 arch/sim/src/up_netdriver.c: (1) Remove up_comparemac() check for matching MAC address. Let's trust that the tap device just return the packet which belong to us like other real network device hardware. (2) Add network device statistics support. 2018-08-24 14:23:50 -06:00
Xiang Xiao
0074afa0ac net/netdev: add devif_loopback_out() to check the loopback case where a packet is being sent to itself. Modify the net driver to call this function in this case. This function will simply re-inject the packet back into the network and the network driver will not put anything on the wire. 2018-08-24 09:21:33 -06:00
Xiang Xiao
e1202d2ed3 Replace all ASSERT with DEBUGASSERT to save the code space 2018-08-24 06:58:30 -06:00
Xiang Xiao
467d2a58ea Replace non critical PANIC with DEBUGPANIC to save the code space 2018-08-24 06:21:15 -06:00
xuanlin
2c93467436 pthreads: Add support static pthread stack. Add standard pthread_attr_setstack() and pthread_attr_getstack(). In all cases where the stack is released, add check to see which allocator must be used to free the stack: The user or the kernel allocator. 2018-08-23 09:49:20 -06:00
Xiang Xiao
c43b3e5a34 fs/hostfs: Add ftruncate support. 2018-08-22 06:08:34 -06:00
Alan Carvalho de Assis
283b73edc5 Fix lots of typos in C comments and Kconfig help text 2018-07-08 18:24:45 -06:00
Gregory Nutt
22cd0d47fa This commit attempts remove some long standard confusion in naming and some actual problems that result from the naming confusion. The basic problem is the standard MTU does not include the size of the Ethernet header. For clarity, I changed the naming of most things called MTU to PKTSIZE. For example, CONFIG_NET_ETH_MTU is now CONFIG_NET_ETH_PKTSIZE.
This makes the user interface a little hostile.  People thing of an MTU of 1500 bytes, but the corresponding packet is really 1514 bytes (including the 14 byte Ethernet header).  A more friendly solution would configure the MTU (as before), but then derive the packet buffer size by adding the MAC header length.  Instead, we define the packet buffer size then derive the MTU.

The MTU is not common currency in networking.  On the wire, the only real issue is the MSS which is derived from MTU by subtracting the IP header and TCP header sizes (for the case of TCP).  Now it is derived for the PKTSIZE by subtracting the IP header, the TCP header, and the MAC header sizes.  So we should be all good and without the recurring 14 byte error in MTU's and MSS's.

Squashed commit of the following:

    Trivial update to fix some spacing issues.
    net/: Rename several macros containing _MTU to _PKTSIZE.
    net/: Rename CONFIG_NET_SLIP_MTU to CONFIG_NET_SLIP_PKTSIZE and similarly for CONFIG_NET_TUN_MTU.  These are not the MTU which does not include the size of the link layer header.  These are the full size of the packet buffer memory (minus any GUARD bytes).
    net/: Rename CONFIG_NET_6LOWPAN_MTU to CONFIG_NET_6LOWPAN_PKTSIZE and similarly for CONFIG_NET_TUN_MTU.  These are not the MTU which does not include the size of the link layer header.  These are the full size of the packet buffer memory (minus any GUARD bytes).
    net/: Rename CONFIG_NET_ETH_MTU to CONFIG_NET_ETH_PKTSIZE.  This is not the MTU which does not include the size of the link layer header.  This is the full size of the packet buffer memory (minus any GUARD bytes).
    net/: Rename the file d_mtu in the network driver structure to d_pktsize.  That value saved there is not the MTU.  The packetsize is the memory large enough to hold the maximum packet PLUS the size of the link layer header.  The MTU does not include the link layer header.
2018-07-04 14:10:40 -06:00
Gregory Nutt
c65e1aa3df Squashed commit of the following:
syscalls/:  Add syscall support for if_nametoindex() and if_indextoname()
    net/: Update some comments.
2018-06-25 12:41:28 -06:00
Gregory Nutt
8fdbb1e0a4 Elimate use of the non-standard type systime_t and replace it the equivalent, standard type clock_t
Squashed commit of the following:

    sched:  Rename all use of system_t to clock_t.
    syscall:  Rename all use of system_t to clock_t.
    net:  Rename all use of system_t to clock_t.
    libs:  Rename all use of system_t to clock_t.
    fs:  Rename all use of system_t to clock_t.
    drivers:  Rename all use of system_t to clock_t.
    arch:  Rename all use of system_t to clock_t.
    include:  Remove definition of systime_t; rename all use of system_t to clock_t.
2018-06-16 12:16:13 -06:00
Gregory Nutt
de119e8589 Various fixes necessary to build the simulator under MSYS. 2018-05-31 13:25:04 -06:00
Gregory Nutt
f2a89813f2 Build system: Remove fixed lib/ subdirectory and its content. Replace with new directory called staging/ that is created dynamically when building and removed when 'make clean' is done. This both improves the name and eliminates a garbage directory from the repository. 2018-05-29 11:36:21 -06:00
Dmitriy Linikov
a8c58607e9 Merged in hardlulz/modem-3.0-nuttx/fix-sem-EINTR (pull request #603)
Added ECANCELED condition to DEBUGASSERT-s checking sem_wait result

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-02-20 18:24:53 +00:00
Gregory Nutt
1e59d9dd14 armv7-a, armv7-r, armv7-m: Add atomic read-add-write and read-subtract-write functions. 2018-02-04 12:22:03 -06:00
Gregory Nutt
2683f713ab Make sure that labeling is used consistently in all function headers (part 3). 2018-02-01 12:17:03 -06:00
Gregory Nutt
7cf88d7dbd Make sure that labeling is used consistently in all function headers. 2018-02-01 10:00:02 -06:00
Gregory Nutt
9568600ab1 Squashed commit of the following:
This commit backs out most of commit b4747286b1.  That change was added because sem_wait() would sometimes cause cancellation points inappropriated.  But with these recent changes, nxsem_wait() is used instead and it is not a cancellation point.

    In the OS, all calls to sem_wait() changed to nxsem_wait().  nxsem_wait() does not return errors via errno so each place where nxsem_wait() is now called must not examine the errno variable.

    In all OS functions (not libraries), change sem_wait() to nxsem_wait().  This will prevent the OS from creating bogus cancellation points and from modifying the per-task errno variable.

    sched/semaphore:  Add the function nxsem_wait().  This is a new internal OS interface.  It is functionally equivalent to sem_wait() except that (1) it is not a cancellation point, and (2) it does not set the per-thread errno value on return.
2017-10-04 15:22:27 -06:00
Gregory Nutt
42a0796615 Squashed commit of the following:
sched/semaphore:  Add nxsem_post() which is identical to sem_post() except that it never modifies the errno variable.  Changed all references to sem_post in the OS to nxsem_post().

    sched/semaphore:  Add nxsem_destroy() which is identical to sem_destroy() except that it never modifies the errno variable.  Changed all references to sem_destroy() in the OS to nxsem_destroy().

    libc/semaphore and sched/semaphore:  Add nxsem_getprotocol() and nxsem_setprotocola which are identical to sem_getprotocol() and set_setprotocol() except that they never modifies the errno variable.  Changed all references to sem_setprotocol in the OS to nxsem_setprotocol().  sem_getprotocol() was not used in the OS
2017-10-03 15:35:24 -06:00
Gregory Nutt
83cdb0c552 Squashed commit of the following:
libc/semaphore:  Add nxsem_getvalue() which is identical to sem_getvalue() except that it never modifies the errno variable.  Changed all references to sem_getvalue in the OS to nxsem_getvalue().

    sched/semaphore:  Rename all internal private functions from sem_xyz to nxsem_xyz.  The sem_ prefix is (will be) reserved only for the application semaphore interfaces.

    libc/semaphore:  Add nxsem_init() which is identical to sem_init() except that it never modifies the errno variable.  Changed all references to sem_init in the OS to nxsem_init().

    sched/semaphore:  Rename sem_tickwait() to nxsem_tickwait() so that it is clear this is an internal OS function.

    sched/semaphoate:  Rename sem_reset() to nxsem_reset() so that it is clear this is an internal OS function.
2017-10-03 12:52:31 -06:00
Gregory Nutt
c11345ad4b Squashed commit of the following:
STM32, STM32 F7:  LTDC and DMA2D drivers are not permitted to set the errno.

    SIM LPC31xx:  Serial and console drivers are not permitted to set the errno.

    SAMv7, STM32, STM32 L4:  DAC and ADC drivers are not permitted to set the errno.
2017-09-30 11:51:37 -06:00
Gregory Nutt
107866c00e sim/configs/fb: Add a configuration for non-graphical testing of the frambuffer character driver using apps/example/fb
drivers/video/fb.c and include/nuttx/video.fb.h:  Some improvements and fixes from early testing sith the sim/fb cnofiguration.
2017-09-12 09:48:47 -06:00
Jussi Kivilinna
7fe3625382 Simulation: Fix building 32-bit simulation on 32-bit X86 2017-09-04 07:56:51 -06:00
Gregory Nutt
f43f372823 Update some comments. 2017-08-26 11:50:41 -06:00
Nickolay Semyonov (RPI)
1fcc7ec38e Ommitted a file in previous commit 2017-08-26 11:45:08 -06:00
Gregory Nutt
48c27f8ffc Simulator: Adds necessary functionality to build Simulator under ARM Linux. Tested only on Raspberry3. Currently setjmp/longjmp do not save/restore floating point registers. Patch provided by Bitbucket user nbkolchin. 2017-08-26 11:38:44 -06:00
Gregory Nutt
4cc13f8d94 Simulator: x86 stack needs to be aligned to 16-byte boundaries. 2017-08-04 07:03:39 -06:00
Gregory Nutt
59b9983d97 Simulator: Protect a few more NuttX symbols from collisions with host symbols. 2017-07-31 15:41:31 -06:00
Simon Piriou
2e7961cc55 sim arch: fix mkdir issue in GNU target 2017-07-22 09:01:24 -06:00
Simon Piriou
53a8cb734b sim arch: poll for TX frames to speed up driver 2017-07-22 09:01:24 -06:00
Simon Piriou
63c9f1a86e sim arch: Add non blocking read to devconsole driver 2017-07-22 09:01:24 -06:00
Gregory Nutt
975473fed8 ICMPv6: Add 6LoWPAN and IP forwarding support. 2017-07-09 11:35:26 -06:00
Gregory Nutt
1c5ec07414 arch/: Remove dangling space at the end of lines. 2017-06-28 13:16:48 -06:00
Gregory Nutt
0de294a586 Fix lots of occurrences of 'the the', 'the there', 'the these', 'the then', 'the they. 2017-05-11 13:35:56 -06:00
Gregory Nutt
2043e1a114 IOBs: Move from driver/iob to a better location in mm/iob 2017-05-09 07:35:30 -06:00
Gregory Nutt
e9a5477506 Add an instance argument to the SPIDEV definitions. 2017-04-29 12:26:52 -06:00
Sebastien Lorquet
c70d797229 misc archs 2017-04-28 18:24:06 +02:00
Gregory Nutt
79256573e1 net: network drver now retains Ethernet MAC address in a union so that other link layer addresses may be used in a MULTILINK environment. 2017-04-22 11:10:30 -06:00
Gregory Nutt
bfb93338f6 Move net/iob to drivers/iob so that the I/O buffering feature can be available to other drivers when networking is disabled. 2017-04-20 16:08:49 -06:00
Gregory Nutt
547f6c7cc3 SIM: Fix some bad naming changes associated with the simulated touchscreen. 2017-04-20 07:51:27 -06:00
Gregory Nutt
fe722e44b9 6loWPAN: Fix a faulty assumption about relationship between some sizes and offsets. 2017-04-08 08:14:42 -06:00
Gregory Nutt
1b6630ee75 6loWPAN: Fix compile errors and warnings when building the complete 6loWPAN configuration. 2017-04-02 17:46:22 -06:00
Gregory Nutt
ded155c638 Fixes for coding standard: '*' needs to 'snuggle' with following variable name 2017-02-28 18:22:58 -06:00
Gregory Nutt
b4695c5ee9 hostfs: Add support for fstat(). 2017-02-14 09:54:08 -06:00
Gregory Nutt
40f8e8b41f Fix some backward DEBUGASSERT tests in ROMFS and FAT. 2017-02-13 14:06:39 -06:00
Gregory Nutt
e6558df4ad SIM: Add readlink and setvbuf to nuttx-names.dat 2017-02-09 08:31:00 -06:00
Gregory Nutt
62a1f6f110 up_timer_initialize() is named incorrectly. The prefix should be the architecture name, not up_ since it is private to the architecture. up_timerisr() is similarly misnamed and should also be private since it is used only with the xyz_timerisr.c files. Also updat TODO list. 2017-02-07 10:35:04 -06:00
Gregory Nutt
b39d962021 Soft links: Update Documentation, rename file, add system calls 2017-02-02 17:11:08 -06:00
Gregory Nutt
b656e371d3 ELF: Move sim and x86 ARM versions of ELF relocation logic to libc/machine 2017-01-21 15:40:51 -06:00
Gregory Nutt
34be3e7c3c Add configuration support for builds with Ubuntu under Windows 10 2017-01-01 15:34:23 -06:00
Gregory Nutt
49fae0ac6b Revert "All CMP platforms: Apply same fix verified on other platforms found on Xtensa."
This reverts commit fb146abee0.
2016-12-25 07:08:44 -06:00
Gregory Nutt
efb86382c3 SMP: Back out deferred IRQ locking. This was accidentally merged into master and it looks like it is going to be more work than I thought to get it working again. Changes will go to the irqlock branch. 2016-12-24 19:53:37 -06:00
Gregory Nutt
9f7ba21f8a Implement deferred IRQ locking. Adds support for simulator. 2016-12-23 11:28:43 -06:00
Gregory Nutt
fb146abee0 All CMP platforms: Apply same fix verified on other platforms found on Xtensa. 2016-12-21 14:04:09 -06:00
Gregory Nutt
018db84567 Flesh out more cancellation point logic. 2016-12-09 10:31:40 -06:00
Gregory Nutt
934aded293 arch/: Adapt all Ethernet drivers to work as though CONFIG_NET_MULTIBUFFER were set. Remove all references to CONFIG_NET_MULTIBUFFER 2016-11-29 16:06:48 -06:00
Gregory Nutt
e3fe320e08 SMP: Add support for linking spinlocks into a special, non-cached memory region. 2016-11-26 08:47:03 -06:00
Gregory Nutt
f90525a5d1 SMP: Update some comments; trivial improvement by inlining static function. 2016-11-22 16:48:57 -06:00
Gregory Nutt
bac7153609 SMP: Add logic to avoid a deadlock condition when CPU1 is hung waiting for g_cpu_irqlock and CPU0 is waitin for g_cpu_paused 2016-11-22 11:34:16 -06:00
Gregory Nutt
796969f6b6 Update TODO. Provide do-nothing stubs for mutex attribute interfaces if features not enabled. pthread_cond includes a signaling semaphore and should call sem_setprotocol. 2016-11-05 11:06:52 -06:00
Gregory Nutt
0a5b4f684a arch: Disable priority inheritance on all semaphores used for signaling in the rest of the MCU drivers 2016-11-03 17:38:26 -06:00
Paul A. Patience
912fe06a86 Add architecture-specific inttypes.h 2016-10-27 16:01:38 -04:00
Gregory Nutt
48fb97e7b5 More of the same cloned typo 2016-10-19 10:11:45 -06:00
Gregory Nutt
841e1aa77f Fix a cloned typo 2016-10-19 09:14:21 -06:00
Gregory Nutt
300361539a sched/sched_cpuload_oneshot: Use the oneshot timer with optional entropy to measuer cPU load if so configured. 2016-08-20 12:47:07 -06:00
Gregory Nutt
b2be0be3a6 Simulated oneshot max_delay() method should not return a failure. 2016-08-15 11:43:55 -06:00
Gregory Nutt
ab16ad7530 Fix some bugs in the oneshot driver logic 2016-08-12 14:19:11 -06:00
Gregory Nutt
046acf6b54 Add a simulated oneshot lowerhalf driver 2016-08-12 13:14:03 -06:00
Gregory Nutt
56f2454c86 Fix names of pre-processor variables used in header file idempotence 2016-08-06 18:48:45 -06:00
Gregory Nutt
d41008e220 Update some header commments 2016-08-06 18:16:31 -06:00
Gregory Nutt
f5ae207516 Changes from Review of last PR adding Tiva PWM driver 2016-08-05 07:17:42 -06:00
Gregory Nutt
3d5df2e5af Extend I/O Expander interrupt controls; Add test of level sensitve interrupt to Simulated I/O expander 2016-08-04 16:19:52 -06:00
Gregory Nutt
1f9799b68d I/O Expanders: Interrupt detection logic should not ignore the no-change case. Still need to handle level interrupts even with no change. 2016-08-03 13:10:20 -06:00
Gregory Nutt
803b540e8a Fix various issues with I/O expander and GPIO lower half drivers from testing with simulated I/O expander 2016-08-03 12:46:54 -06:00
Gregory Nutt
c11473657c SIM I/O Expander: Add logic to simulate inverted pins and to generate toggle values on interrupt input pins 2016-08-03 11:19:16 -06:00
Gregory Nutt
778a8131bf SIM: Add a simulated I/O Expander driver 2016-08-03 09:44:48 -06:00
Gregory Nutt
b7c1544f0f Sim build: Add sigaddset to nuttx-names.dat 2016-08-01 17:32:55 -06:00
Gregory Nutt
ee9c66186c ramdisk.h moved from include/fs/nuttx/ to include/nuttx/drivers. 2016-07-20 14:02:18 -06:00
Gregory Nutt
4b4dbc79a2 Move driver related prototypes out of include/nuttx/fs/fs.h and into new include/drivers/drivers.h 2016-07-20 13:15:37 -06:00
Ken Pettit
b926334a19 Add file was not included in the original commit 2016-07-19 10:39:43 -06:00
Gregory Nutt
8eeecff79d Replace some C99 comnents with C89 comments 2016-07-19 08:19:53 -06:00
Ken Pettit
148cf1ac22 Adds the simulated QSPI (N25Q) flash to the simulation and modify sim up_spiflash.c to enable it to run with different MTD drivers based on config options (currently m25p, sst26 and w25). 2016-07-19 07:33:44 -06:00
Gregory Nutt
d5388eca05 devrandom_register() must be called before devurandom_register() 2016-07-18 11:24:04 -06:00
Gregory Nutt
1660329d06 Rename up_rnginitialize to devrandom_register 2016-07-18 10:55:37 -06:00
Gregory Nutt
fe315f867a Costmetic 2016-07-17 17:01:35 -06:00
Gregory Nutt
006f4a5818 HOSTFS: Fix some errors in first cut at repartitioning 2016-07-17 16:31:14 -06:00
Gregory Nutt
2b28a1f3e5 SIM HOSTFS: First cut at changes to get it working on Cygwin. 2016-07-17 15:59:45 -06:00
Gregory Nutt
76dc238baf Add more name mappings to nuttx-names.dat 2016-07-17 09:44:27 -06:00
David Alessio
6cefbc0c3f This change provides an option to add /dev/urandom to all architectures. The pseudo-random algorithm I choose strikes an arguably-good balance between being "random" and small/fast enough for 8/16 bit MCUs. It’s the well-documented xorshift128 algorithm. It has an internal state of 128 bits that can be [re-]seeded with a write. 2016-07-17 06:42:26 -06:00
Alan Carvalho de Assis
91ba0be667 Enable TERMIOS support in stm32discovery/pseudoterm configuration 2016-07-16 17:49:37 -06:00
Gregory Nutt
ba62b49190 SIM: Add more names to nuttx-namex.dat 2016-07-16 16:14:18 -06:00
Gregory Nutt
7b298a828d up_pminitialize() needs to be called from instances of up_initialize() 2016-07-15 13:11:28 -06:00
Gregory Nutt
d3b3c71d97 All architectures: Add logic to automatically register /dev/ptmx a boot time 2016-07-15 11:54:41 -06:00
Gregory Nutt
39e7d5431f update gitignore 2016-06-24 16:29:15 -06:00
Gregory Nutt
5118264e6c Rename CONFIG_SYSLOG_CONSOLE to CONFIG_CONSOLE_SYSLOG 2016-06-21 09:35:51 -06:00
Gregory Nutt
485aa6b231 SIM: Comment out skip scheduler debug output that can hang the simulation. 2016-06-21 08:59:01 -06:00
Gregory Nutt
62d8f839c7 SYSLOG: Now a two phase initialization. Some SYSLOG channels cannot be initialized until later in the bringup 2016-06-21 07:52:24 -06:00
Gregory Nutt
43eb04bb8f Without lowsyslog() *llinfo() is not useful. Eliminate and replace with *info(). 2016-06-20 11:59:15 -06:00
Gregory Nutt
2b445ddccc Remove lowsyslog(). The new syslog() includes all of the functionality of lowsyslog(). No longer any need for two interfaces. 2016-06-20 08:57:08 -06:00
Gregory Nutt
5b2aa7bf99 Remove all traces of CONFIG_SYSLOG 2016-06-19 13:59:43 -06:00
Gregory Nutt
0f18f3bd15 Move RAMLOG initialize from up_initialilize.c files to syslog_initialize(). up_initialize.c files now call syslog_initialize() unconditionally 2016-06-19 09:39:21 -06:00
Gregory Nutt
0c8c7fecf0 Add _ to the beginning of all debug macros to avoid name collisions 2016-06-16 12:33:32 -06:00
Gregory Nutt
24c51ec1ff Centralize definitions associated with CONFIG_DEBUG_LCD 2016-06-15 11:40:33 -06:00
Gregory Nutt
ba03134bed Centralize definitions associated with CONFIG_DEBUG_SPI 2016-06-15 10:41:13 -06:00
Gregory Nutt
dfc703f250 arch/sim/: Change some *err() message to *info() messages if what was a *dbg() message does not indicate and error condition. 2016-06-14 11:49:55 -06:00
Gregory Nutt
0f249016a0 Eliminate some warnings 2016-06-13 14:01:32 -06:00
Gregory Nutt
a1469a3e95 Add CONFIG_DEBUG_ERROR. Change names of *dbg() * *err() 2016-06-11 15:50:49 -06:00
Gregory Nutt
e99301d7c2 Rename *lldbg to *llerr 2016-06-11 14:55:27 -06:00
Gregory Nutt
1cdc746726 Rename CONFIG_DEBUG to CONFIG_DEBUG_FEATURES 2016-06-11 14:14:08 -06:00
Gregory Nutt
fc3540cffe Replace all occurrences of vdbg with vinfo 2016-06-11 11:59:51 -06:00
Gregory Nutt
3a74a438d9 Rename CONFIG_DEBUG_VERBOSE to CONFIG_DEBUG_INFO 2016-06-11 11:50:18 -06:00
Steve
a75c48c183 Fix for a minor typo that I introduced somewhere along the way during my testing. This makes the bridge code actually compile… 2016-05-21 17:09:50 -06:00
Steve
bd3ef36eda 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-20 17:36:14 -06:00
Gregory Nutt
fb484a581f All GCC final arch/*/src/Makefiles: Allow --start-group and --end-group to be redefined for the case where GCC is used to link (instead of LD). Suggested by Paul Alexander Patience. 2016-05-17 10:43:15 -06:00
Gregory Nutt
a3f3cc12c0 Update some comments; Fix grammatic error in ChangeLog. 2016-05-13 17:36:08 -06:00
Gregory Nutt
faca2fb1e7 ARMv7-A/i.MX6: Add logic to handle allocation of CPU IDLE thread stacks more efficiently 2016-05-13 11:39:42 -06:00
Gregory Nutt
70782b0f14 ARMv7-A i.MX6: More SMP logic. Still untested. 2016-05-12 15:04:46 -06:00
Gregory Nutt
aa64214877 FB: Add a display number to the framebuffer planeinfo structure 2016-04-17 10:08:27 -06:00
Gregory Nutt
46846c0c24 Framebuffer driver: Add a display number to each interface in order to support multiple displays 2016-04-14 12:23:15 -06:00
Gregory Nutt
267e20c729 PM: Add domain to all PM interfaces. Internal PM data structures now handle multiple PM domains. 2016-03-27 13:01:32 -06:00
Gregory Nutt
32acc35c88 PM: Add activity domain to all PM callbacks 2016-03-27 11:18:54 -06:00
Gregory Nutt
35707e4d48 SIM: Update scheduler implementation to match prototype changes 2016-03-22 18:18:37 -06:00
Gregory Nutt
e767df5994 SIM: Add another name to the NuttX names list 2016-03-22 13:00:09 -06:00
Gregory Nutt
be5b79875f Fix an error in the simulator version of up_unblock_task() 2016-03-21 15:20:14 -06:00
Gregory Nutt
bd846c2e72 All architectures: Register the schedule note driver if enabled 2016-03-17 17:00:59 -06:00
Gregory Nutt
82c58eb609 SIM: Register the schedule note driver if enabled 2016-03-17 14:43:29 -06:00
Gregory Nutt
8fbe5b6243 sim: Omit built-in scheduler imstrumentation if buffered instrumentation is selected. 2016-03-17 09:50:33 -06:00
Gregory Nutt
411cf0ba1f SMP: Add per-CPU initialization logic 2016-03-13 07:16:26 -06:00
Gregory Nutt
2b2f157569 Forgot to add a file before last commit 2016-03-12 15:28:58 -06:00
Gregory Nutt
6288e381ee Conform to revised SMP interfaces. Improve i.MX6 SMP startup handshake. 2016-03-12 15:22:45 -06:00
Gregory Nutt
a74c19bbae SIM: Add TLS support to to the simulator 2016-03-11 14:03:27 -06:00
Gregory Nutt
c6a0f284e4 Remove comments before empty sections in C files 2016-02-21 14:19:01 -06:00
Gregory Nutt
bd0d46138c SIM: Trivial, uninteresting change to file inclusion in IDLE loop 2016-02-20 14:56:25 -06:00
Gregory Nutt
de885064d2 SIM: Clean up some comments 2016-02-18 14:56:17 -06:00
Gregory Nutt
526c90986a sim SMP: CPU0 should not be the main thread. That introduces an asymmetry since the main thread has no pthread_t ID. Instead, start an additional pthread for CPU0. The main thread will just wait and do nothing in this case 2016-02-18 14:54:48 -06:00
Gregory Nutt
08e2fc0be8 Can't call sdbg() from a signal handler; And another name to nuttx-names.dat 2016-02-18 12:29:37 -06:00
Gregory Nutt
3508e22f3f SMP: Rename sim_cpupause to sim_cpu_pause for consistency with other naming 2016-02-18 11:46:08 -06:00
Gregory Nutt
3deac3d43d SMP: Initial implementation of up_cpu_pause and up_cpu_resume. Does not yet work. 2016-02-18 11:12:43 -06:00
Gregory Nutt
e3ea40e4f9 SMP: Cosmetic renaming to clarify functionality of SMP interfaces. Update comments. 2016-02-17 13:35:23 -06:00
Gregory Nutt
063caf3a90 Add warnings and some comments 2016-02-16 16:08:59 -06:00
Gregory Nutt
8ac45d4f4d Add some additional schedule instrumentation 2016-02-16 15:19:44 -06:00
Gregory Nutt
b4dae46fd7 SIM: Add scheduler instrumentation 2016-02-16 13:40:15 -06:00
Gregory Nutt
9234eec334 SIM: Needs to include stdint.h 2016-02-16 10:12:06 -06:00
Gregory Nutt
17cf9a57a0 Update some comments 2016-02-16 07:50:09 -06:00
Gregory Nutt
1e218415d6 Most cosmetic; fix spelling of teriminate 2016-02-16 07:24:28 -06:00
Gregory Nutt
d2f13e4b12 SIM: If SMP is enabled, show CPU on assertion 2016-02-15 13:47:05 -06:00
Gregory Nutt
e238b29ddf SIM: Add pthread_yield to the list of name collisions 2016-02-15 11:44:53 -06:00
Gregory Nutt
83bc1c97c3 Rename irqsave() and irqrestore() to up_irq_save() and up_irq_restore() 2016-02-14 16:11:25 -06:00
Gregory Nutt
70e502adb0 Replace irqsave() with enter_critical_section(); replace irqrestore() with leave_critical_section() 2016-02-13 19:11:09 -06:00
Gregory Nutt
a884818e32 SIM: Add empty stubs for SMP function up_cpustop and up_cpustart 2016-02-12 17:12:01 -06:00
Gregory Nutt
d22aa4b588 SIM: In SMP simulation, use pthread_yield(), not up_hostusleep() to reliquish the CPU. 2016-02-12 08:13:44 -06:00
Gregory Nutt
62e6275fe5 SIM:Add missing mutex unlock; need to used up_hostusleep(), not usleep(), in up_idle 2016-02-11 17:18:28 -06:00
Gregory Nutt
e41de0a00e SIM: Move IDLE thread initialization from sim to OS since it should be common 2016-02-11 14:10:19 -06:00
Gregory Nutt
ac6c9cf617 SIM: Add SMP idle thread setup logic -- forgot to add files before last commit. 2016-02-11 12:17:41 -06:00
Gregory Nutt
b087cb7f9a SIM: Add SMP idle thread setup logic 2016-02-11 12:16:19 -06:00
Gregory Nutt
0dbbf19fea SIM: Kconfig now indicates that it supports multiple CPUs. 2016-02-10 17:29:04 -06:00
Gregory Nutt
52f88b0625 SIM: Add simulation of a multi-CPU processor 2016-02-10 14:58:21 -06:00
Gregory Nutt
5e91bf9a03 SIM: Add a fake spinlock.h header file that may be useful someday for testing of SMP features 2016-02-10 10:33:37 -06:00
Gregory Nutt
a1126361da sim: Replace explict references to g_readytorun with indirect references via the this_task() macro 2016-02-06 17:05:55 -06:00
Gregory Nutt
1166e311b0 Networking: Remove the HSEC argument from devif_timer. 2016-02-03 11:17:15 -06:00
Gregory Nutt
a9dec09444 Minor fix to comment 2016-01-27 08:16:46 -06:00
Gregory Nutt
b7cbbab761 Remove CONFIG_SPI_OWNBUS: Now it is not just a good idea, it is the law 2016-01-23 18:10:21 -06:00
Gregory Nutt
4bd6adb725 Add dummy hwfeatures method to all SPI interfaces 2016-01-23 15:09:38 -06:00
Gregory Nutt
2030784891 sim: Add more symbols to nuttx-names.dat 2016-01-14 15:14:25 -06:00
Gregory Nutt
927b1dcc1f Initialize the telnet factory as part of the common architecture intialization 2015-12-07 11:40:29 -06:00
Gregory Nutt
3afc0799ad Eliminate a warning 2015-12-05 10:35:11 -06:00
Gregory Nutt
e421258808 Move sim/src/up_appinit.c to configs/sim/src where it really belongs 2015-11-29 13:54:03 -06:00
Gregory Nutt
2afd4595e4 Re-think how __KERNEL__ option is set in architecture Makefiles. Should be passed in EXTRADEFINES 2015-11-26 06:59:35 -06:00
Gregory Nutt
4aa3dcb51a __KERNEL__ should be defined when compiler architecture specific logic 2015-11-25 18:05:36 -06:00
Gregory Nutt
f4e8f84887 __KERNEL__ should be defined when compiler architecture specific logic 2015-11-25 17:52:14 -06:00
Gregory Nutt
14d7ede265 All instances of up_initialize() should call loop_register() is CONFIG_DEV_LOOP=y 2015-11-25 17:10:41 -06:00
Ken Pettit
641ca79321 arch/sim/src: Add a special file system for use with simulator that supports access to the host file system from the simulation. From Ken Petit 2015-11-25 08:36:44 -06:00
Gregory Nutt
d7c5ff98f4 Fix a typo 2015-11-23 18:55:38 +00:00
Gregory Nutt
edb1439d8f Last change introduced warnings when CONFIG_SIM_M32=y; This fixes those warnings too 2015-11-23 12:44:59 -06:00
Gregory Nutt
9f98dfecb7 sim: Eliminate a warning 2015-11-23 11:59:33 -06:00
Ken Pettit
992d7d1e85 arch/sim/src/up_spiflash.c: Add support for W25 FLASH simulation. From Ken Petit 2015-11-18 07:08:38 -06:00
Gregory Nutt
c340185cb3 arch/sim: Fix spacing/alignment issues 2015-10-14 07:14:28 -06:00
Gregory Nutt
7a63e976ad Remove TABs 2015-10-04 16:00:42 -06:00
Gregory Nutt
aaa697ec83 Remove dangling whitespace 2015-10-04 15:27:17 -06:00
Gregory Nutt
6fc6d17760 Fix some spacing problems 2015-10-04 14:59:08 -06:00
Gregory Nutt
cae0c9a2e3 Standardize the width of all comment boxes in header files 2015-10-02 17:47:23 -06:00
Gregory Nutt
36726b1bc4 Standardize the width of all comment boxes in header files 2015-10-02 17:42:29 -06:00
Gregory Nutt
82cc93c71b Add some comments to a Kconfig file 2015-09-24 14:53:04 -06:00
Gregory Nutt
50b64f6991 Sim target on Cygwin64: Modern Cygwin X86_64 machines follow the Microsoft ABI for parameter passing. The older,inux System 5 ABI will not work on X86_64-based Cygwin machines. With this change, the simulator agains works with the newer Cygwin64 platform 2015-09-24 14:41:57 -06:00
Gregory Nutt
569a29a327 Simulation: Newer versions of Cygwin tools do not seem to pre-pend symbol names with underscore character 2015-09-24 09:08:52 -06:00
Gregory Nutt
26eada3446 In all up_initialize() functions, automatically initialize TUN driver is so configureded 2015-09-06 09:35:29 -06:00
Paul A. Patience
a0dc724a5d Correct #if to #ifdef when the macro can be undefined. Fix bug in AT32UC3 clock initialization: AVR32_CLOCK_PLL_OSC1 should be AVR32_CLOCK_PLL0_OSC1 and AVR32_CLOCK_PLL1_OSC1. 2015-09-01 13:47:06 -04:00
Gregory Nutt
01cfe8c315 Networking: Move where the local loopback device is initialized from board_app_intiialize() to up_intiialize() so that it will happen automatically 2015-08-24 14:25:49 -06:00
Gregory Nutt
c9603b27c0 sim: Add logic to initialize the local loopback device is so configured 2015-08-24 13:46:05 -06:00
Gregory Nutt
0843af5367 Fixes that call sched_resume_scheduler and sched_suspend_scheduler must include nuttx/sched.h 2015-07-29 16:51:26 -06:00
Gregory Nutt
eddf8161a5 Add scheduler resume/suspend calls to all implementations of up_release_pending() 2015-07-26 10:13:29 -06:00
Gregory Nutt
37969b8279 Add scheduler resume/suspend calls to all implementations of up_reprioritize_rtr() 2015-07-26 09:46:28 -06:00