Use the existing debugserver target also for Qemu debugging. Qemu
should be maintained as one of many emulation/simulations platforms and
emulation should be abstracted in the Makefiles and not tied to Qemu.
qemugdb will still work, it is however being deprecated.
Change-Id: I0cd10fb66debb939b8f7f1304bf2ef4605da6a1d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Re-add board documentation and integrate into the project online
documentation.
Setup sphinx to pick any new board documentation added to boards/*.
Change-Id: Id208d5ef923f8806135879dd33a55ed527dc5f27
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
These samples/tests fail to build on some of the nRF5x platforms. We
don't need Bluetooth enabled for these tests so we can reduce footprint
by turning it off.
Change-Id: I87e62a1d70f80d2bc22414d6a9e591e36ad9fa06
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The 16k RAM nRF51 variants pose a challenge to get applications to fit
within the available memory. Make the default ISR stack size smaller
than the previous 2k default, but big enough to run fully functional
Bluetooth controller and host stacks.
Change-Id: Ie7c5bb21a3ba620d283e6228a2482d280f85119d
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
RAM size has increased on arduino_101_ble which causes it to no longer
be able to build test_controller_dbg.
Change-Id: Iab8ed2857db23d048cfa6b04e2d1fea31efbb13c
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
On the nRF5x platforms we need always need the NRF_RTC_TIMER and it
depends on the CLOCK_CONTROL_NRF5. So enable all of these always.
Fixes issues if one tries to build nRF5x platforms w/o CONFIG_BLUETOOTH.
Change-Id: I0f9af785e785f37ec289a935ddf70ee6dec08cd4
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
These two fields in the thread structure control the preemptibility of a
thread.
sched_locked is decremented when the scheduler gets locked, which means
that the scheduler is locked for values 0xff to 0x01, since it can be
locked recursively. A thread is coop if its priority is negative, thus
if the prio field value is 0x80 to 0xff when looked at as an unsigned
value.
By putting them end-to-end, this means that a thread is non-preemptible
if the bundled value is greater than or equal to 0x0080. This is the
only thing the interrupt exit code has to check to decide to try a
reschedule or not.
Change-Id: I902d36c14859d0d7a951a6aa1bea164613821aca
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Some thread fields were 32-bit wide, when they are not even close to
using that full range of values. They are instead changed to 8-bit fields.
- prio can fit in one byte, limiting the priorities range to -128 to 127
- recursive scheduler locking can be limited to 255; a rollover results
most probably from a logic error
- flags are split into execution flags and thread states; 8 bits is
enough for each of them currently, with at worst two states and four
flags to spare (on x86, on other archs, there are six flags to spare)
Doing this saves 8 bytes per stack. It also sets up an incoming
enhancement when checking if the current thread is preemptible on
interrupt exit.
Change-Id: Ieb5321a5b99f99173b0605dd4a193c3bc7ddabf4
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Add global option for legacy configurations and enable by default for
backward compatibility. Disable option on tests and keep it on legacy
samples and tests.
Jira: ZEP-964
Change-Id: I0831e2aa74d438b1ac74eb762186cb220a504beb
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Disk IO functions are used by both FS and USB Mass Storage.
This patch refactors those from FS directory to a separate one.
In addition existing, config options were modified to make
stuff meaningful.
Jira: ZEP-1276
Change-Id: Ia2a2e18f3dbbbdb964c3dc0427d8138ad86134cd
Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
Remove legacy option and use SYS_CLOCK_EXISTS where appropriate.
Change-Id: I3d524ea2776e638683f0196c0cc342359d5d810f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Various sensor samples are hardwired to expect returned sensor values
are represented as doubles. In each case this assumption is incorrect.
Introduce a generic sensor_value to double helper function and adjust
the samples to use it.
Change-Id: I89c788686576562b84e07a36064640231340c33b
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
Remove aio disabling code before calling callback. If aio is
disabled before callback is invoked, calling pending
interrupt check API in the callback will get negative result.
If user wants to disable the aio, it can do this in callback
instead of this being done blindly before callback.
Jira: ZEP-1437
Change-Id: I42ebe4584af6396ac2360152f9b0e2c389c44145
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
drivers/gpio/gpio_pcal9535a.c defines a nano_timer,
but never uses it. So delete it.
gpio_sch.c uses a k_timer, but gpio_sch.h defines a
nano_timer. So change the variable poll_timer to
type k_timer.
Jira: ZEP-1525
Change-Id: I884e4703c1ace61da5be7d9c63e58e7c3bce7f68
Signed-off-by: Qiu Peiyang <peiyangx.qiu@intel.com>
The way the PATH modification bit was set was failing unnecesarily
when the shell is being ran with -e (fail on error), which is leading
to unnecessary (and dangerous) workarounds in integration scripts.
So wrap it in an if sentence, so the shell doesn't bail out when the
grep fails to find the scripts_path in PATH.
Change-Id: Ia88a5f430e08ef4c186d11834f4cd840ccd29f7f
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
This will allow inclusion of documentation files that exist outside of
doc/ and will make it possible to add rst files across the tree,
especially for boards, samples and tests.
Change-Id: I7afcf92d99f504b2bc0b2b7e3452acb2f8e08294
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
In commit bf4fb51f44, "net: if: Add NET_IF_UP flag"
a reference to ctxt->iface was added in the ipsp_disconnected function.
Let's add the ctxt variable definition to fix the build break.
Change-Id: Ib06047e333504f3db4fe175fb3ef1dce347e1916
Signed-off-by: Michael Scott <michael.scott@linaro.org>
Cut wait times by 4, in chunks in 25ms instead of 100ms. This allows to
see what is going on, but with much faster transitions, which makes the
demo slightly less boring.
Change-Id: I32fdd6e41a9af1fe9aa8a8f186de7945986b3a71
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Similar to _pend_queue, it's more efficient to do the logic inline.
Change-Id: I68ac4fbc26c97b6ec9322caef98504ff6ccc8727
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
It's calling a function on every iteration, it's more efficient to just
do the logic inline.
Change-Id: I166e377d4ffb3056749fd625cb789173030904ac
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Use least significant bits for common flags and high bits for
arch-specific ones.
Change-Id: I982719de4a24d3588c19a0d30bbe7a27d9a99f13
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
This will allow for an enhancement when checking if the thread is
preemptible when exiting an interrupt.
Change-Id: If93ccd1916eacb5e02a4d15b259fb74f9800d6f4
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Not needed, since only the thread itself can modifiy its own
sched_locked count.
Change-Id: I3d3d8be548d2b24ca14f51637cc58bda66f8b9ee
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
If the length of all fragments is used instead, the TCP header is also
considered; sequence numbers do not consider the header.
Change-Id: I19e77ac0fe62ca619b0903dd0265f8ea4878cdf7
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
The net_buf_frags_len() function returns a size_t, which is an unsigned
integer. Store on an appropriate size_t variable instead.
Change-Id: I98aa4c0ddd7c464737436aa9ce13bdc86c11da2b
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
TCP packets need the computed packet length early so they can fill in
a correct sequence number in their generated ACKs. Waiting for
packet_received() is too late. Precompute it before needed, and skip
the evaluation later.
Change-Id: I25547009f88277e0042c74f2005a141819797886
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
On accepting a new connection, the stack does an odd "swap" trick
where it updates the struct net_tcp record on the *listening* context
with the values from the new connection, and then swaps it with the
empty one that got allocated for the *new* context.
Unfortunately this swap forgot to swap the net_tcp "context" field
backpointers, so the net_context retrieved at runtime was for the
wrong connection. Surprisingly, this actually almost worked for a
long time, except that the destination address would be wrong in the
newer setup.
Change-Id: I0c1812ddb9f9ff3e7deb60d1fd67cafd9ba96997
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
The source address for a TCP SYNACK must (obviously) be the same as
the destination address of the SYN that produced it. But the existing
IP packet creation routines would simply fill in a default address
from the net_context struct, which is correct for *established*
connections, but for the listening socket is generally INADDR_ANY
(i.e. all zeroes) and will result in an arbitrary choice for source
address (e.g. a link-local address on the same interface) which can
easily be wrong.
So we need to pass the correct address all the way down from the SYN
packet handler code through the net_ipv*_create() packet creation
functions. This requires lots of API plumbing, but relatively little
logic change.
Change-Id: Ic368f8cef6689f8a27cbafd5933a4964d5cc457e
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>