It is also possible to use 'west' to build the 'hello_world' sample
application for the UP2 (up_squared) board. This patch makes it
explicit in the documentation.
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Zephyr modules' Kconfig entries appear in a seemingly random spot
in menuconfig. This patch moves those entries at the top of the menu,
to improve their visibility and make their location predictable.
Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
To save binary size, currently just returns textual name of error
code, e.g. EAI_FAIL -> "EAI_FAIL". Based on real usecases, can be
replaced with user-friendly message later. (Current usecase is to
allow/help to elaborate sockets API by proof-of-concept porting
existing socket apps).
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
USB is already being configured in pinmux.c, but for it to be
availiable it also needs to be enabled in the device tree.
Signed-off-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Per #13610, recent changes to this driver seem to have introduced
unexpected latency regressions. This patch effectively reverts these
patches which changed the meat of the driver:
ac36886e62 drivers: nrf: timer: add inline qualifier where
inlining is intended
084363a0dc drivers: timer: nrf: refactor for speed and correctness
71882ff8c4 drivers: timer: nrf: drop unnecessary counter mask
4b24e88fa4 drivers: timer: nrf: use irq_lock instead of spinlock
While backporting these seemingly unrelated hygiene patches:
7cbdb6c5c0 drivers/timer: Restore non-tickless tick count behavior
d30c9aeafd drivers: nrf_power_clock: Migrate to DTS.
75f77db432 include: misc: util.h: Rename min/max to MIN/MAX
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
We previously created an improved version of searchtools.js (used by the
Sphinx search) to remove the reST tags shown in the search results.
This has now been fixed in the upstream version of searchtools.js along
with other speed and visual improvements, so we should remove our local
copy.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
The latest release of the Windows toolchain has a critical bug,
Windows users should install the next-to-latest release instead.
To prevent Windows users from being affected we add a note about this
in the documentation.
Bug: https://github.com/zephyrproject-rtos/zephyr/issues/12257
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Normally, this bug wasn't apparent as the value is type-casted
to a float32/64 type. However, once we start persisting these
values they need the correct length.
Signed-off-by: Michael Scott <mike@foundries.io>
Let's avoid future compile issues with this macro when passing
in a type-casted value that isn't surrounded by parenthesis.
Signed-off-by: Michael Scott <mike@foundries.io>
Occasionally we see a stack crash in LwM2M. This may have been
due to the swap from net_app APIs to socket-based APIs.
Let's raise the default stack by 1k.
Signed-off-by: Michael Scott <mike@foundries.io>
When a context is closed to a server, we should clean up any
existing observes along with it. Otherwise these will try to fire
afterward.
Signed-off-by: Michael Scott <mike@foundries.io>
We are already in sm_do_registration(), there's no need to check
!sm_is_registered(). Either we are performing a full registration
or a registration update. In both cases, sm_send_registration()
is called.
Signed-off-by: Michael Scott <mike@foundries.io>
If an error is received during registration update, we need to reset
the status so that a full registration is performed. This was
incorrectly being set to ENGINE_REGISTRATION_SENT.
The correct status should be: ENGINE_DO_REGISTRATION
Signed-off-by: Michael Scott <mike@foundries.io>
send() returns -1 upon error and sets errno appropriately. Let's
not bother saving the return code and instead share errno back
to the user.
Signed-off-by: Michael Scott <mike@foundries.io>
This didn't compile if CONFIG_SHALL_ECHO_STATUS wasn't
enabled.
Based on a fix by Rodrigo Peixoto.
Fixes: #14546
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Remove magic numbers from Ethernet drivers and tests by defining
NET_ETH_MAX_DATAGRAM_SIZE and NET_ETH_MAX_FRAME_SIZE.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
On STM32L4, flash writes operations are performed 8 bytes at a time.
Though, it is possible that *data in flash_write functions is not
aligned. To avoid issues, use UNALIGNED_GET macro to access *data.
Issue has been detected using settings subsystem on STM32WB, which has
same 8bytes write block size. The patch is extended to STM32L4 series
for same reason.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
On STM32F3 devices, a trick was required for normal use of registers.
This was actually an issue in flash registers defintions which should
be defined as volatile.
Fix this and additionaly, fix definition for STM32F1 which was also
lacking the volatile instruction.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This is a vestiage of how board ports use to work, we have since removed
the need for board.h to exist on all board ports. Remove the file since
its not needed and doesn't do anything useful.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
To ensure the proper flags are specified to the toolchain, we need to
keep system headers and non-system headers seperate and set the SYSTEM
flag to target_include_directories for system headers.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
when building with clang we get the following warning:
log_core.c:358:40: error: use of logical '&&' with constant operand
[-Werror,-Wconstant-logical-operand]
This is because we are mix a constant IS_ENABLED(CONFIG_LOG_IMMEDIATE)
with non-constants.
Split out the check into its own statement to workaround the warning.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
(OPTIONAL) was a vestiage from the initial import of the Zephyr code
base and we dont utilize it with the GNU linker. Additionally, the way
(OPTIONAL) gets defined to nothing creates a linker script that lld
(from llvm) doesn't like.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The iMX RT1060 and RT1064 have additional dedicated 512KB on-chip ram.
This OCRAM2 is mapped at 0x20200000, formerly OCRAM1 (flexram) mapping
which is moved to 0x20280000 in order to guarentee global OCRAM memory
continuity regardless OCRAM1 size configuration (256KB by default).
In default configuration, this gives 768KB (512+256) on-chip ram:
0x20200000 to 0x202BFFFF.
OCRAM2: 0x20200000 - 0x2027FFFF
OCRAM1(FlexRam): 0x2028FFFF - 0x202BFFFF
Add this memory region as a single node in the rt1060 device tree.
Note: MPU expects power of two memory region, in case of 768KB, let
the MPU configure 1MB instead.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
On stm32f4 series, uart4 is not an usart, so generated with
'st,stm32-usart' compatible and hence generated defined should be
prefixed with DT_ST_STM32_UART_ rather than DT_ST_STM32_USART.
Fixes#14542
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
uart4 is not available on whole stm32f4 series (not on stm32f401
for instance), remove from stm32f4.dtsi
It is actually correctly defined in f405, f413 but missing in f446,
so add it in there.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Fix implementation to correctly return the configured
default Tx Power Level.
Also, fix the missing use of RADIO_TXP_DEFAULT in the new
ULL/LLL implementation of Advertiser and Observer states.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add implementation in controller to use range delay
alongwith the active clock accuracy jitter.
Range has been hard coded to 1000 meters, suffices
modules out in the market.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Due to regression the option to enable PHY Update Procedure
on proprietary 2M PHY for nRF51 series was disable.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Workaround from asserting when Rx PDU buffers from pool
needing resize is acquired by another connection. By
skipping the connection events to give some headroom for
the host to process the Rx packets and eventually make the
pool available for resize.
Fixes#11841.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
* separate the ARC MPU driver into 2 parts
* arc_mpu_v2_internal.h for ARC MPUv2
* arc_mpu_v3_internal.h for ARC MPUv3
* For ARC MPUv2, keep the main design, but update and optimize the code
* For ARC MPUv3, implement mpu region split to supprt MPU region overlap
* misc updates and bug fixes
Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
The clang ARM assembler is a bit stricter than GNU as. Change mov to
movs for ARMv6 case of Z_ARCH_EXCEPT.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Don't depend on CONFIG_NET_SOCKETS_POSIX_NAMES being defined (e.g.,
it's going to conflict with POSIX API).
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
When we build with clang we can a warning related to mixing of enum
types. Just use nrfx_usbd_ep_status_t since that is the type returned
by nrfx_usbd_ep_status_get.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Qemu just can't handle 1000 Hz ticks. On our CI machines, CONFIG_HZ
on the host (which is the limit of timing precision for things like
idle wakeups and signal delivery, both of which qemu seems to use for
timing) is 250. When the mismatch gets this large, we start seeing
artifacts like interrupts being delivered "in the past" (i.e. code
sees a z_clock_elapsed() value of "2" ticks before getting a
z_clock_announce() call for "1").
As it happens, this test doesn't actually require timing with that
precision, it just wants "lots of context switching" to exercise the
threadsafety of the mem_pool APIs. So decrease the tick rate to the
100Hz default, but put a loop counter in the worker threads to force
them to do 10x more work, keeping the number of preemptions constant.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
The workaround for nonatomic swap had yet another edge case: it would
save off the _current pointer when pending a thread so that the next
time slice interrupt could test it to see if the swap had actually
happened before assuming that _current could be rescheduled (if it
just pended itself, that's impossible). Then it would clear the
pending_current pointer so future interrupts wouldn't be confused.
BUT: it turns out that qemu, when faced with really rapid timer rates
that exceed its (host-based) timing accuracy, is perfectly willing to
"stack up" timer interrupts such the one goes pending before the
previous one is finished executing. In that case, we can enter the
SECOND timer interrupt, to try timeslicing a SECOND time, STILL before
the PendSV exception has run to actually effect the context switch.
Except this time pending_current has been cleared and we try to
reschedule the pended _current thread incorrectly. In theory real
hardware could do this too, though it would involve absolutely crazy
interrupt latency problems.
Work around this by moving the clear to the thread itself, immediately
after it wakes up from the pend call it retakes a lock and clears
pending_current if it still matches _current. That is not a perfect
fix: there remains a 2-3 instruction race at that moment where we
return from pend and before we can lock interrupts again where a timer
interrupt will see an incorrect pointer. But I hammered at this and
couldn't make qemu do that (i.e. return from a timer interrupt but
flag a new one in just a cycle or two).
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Linking to API material requires knowing the pecularities of how
doxygen, sphinx, and breathe work. In an attempt to hide some of this
we're preparing the current docs to allow use of configuration defaults
that will let us more simply use a default role that will hunt for a
reference target in the various domains that are available by using a
default "role" of "all". This will let us use the simple notation
`functionname` or `typename` without fully specifying the reference as
:c:func:`functionname`.
This patch cleans up exising docs that were (incorrectly) using single
backtics where double backtics should have been used, and also found
some typos (such as a space between the role name and the reference,
such as :file: `filename`, and a missing colon such as
c:func:`functionname`)
This is a start to address issue #14313
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
The gperf hashtables and support functions are created
after the initial zephyr_prebuilt.elf is created, using
data found within it.
A fixed-sized amount of memory is reserved for the
program text of these support functions, as their true
size isn't possible to predict in advance and we don't
want memory addresses after them to shift. To minimize
the amount of space reserved, it seemed reasonable to
hard-code -Os.
However, on ARC, building with -Os can cause various
millicode functions from libgcc to be included in the
binary which would not be present in zephyr_prebuilt.elf
unless zephyr_prebuilt.elf was also built with -Os,
causing anything after them to be shifted, wreaking all
kinds of havoc.
Just build without hardcoding any optimization parameters.
We have checks in the linker scripts to let us know if
we have overflowed the region for the gperf support
functions anyway, so there is no danger of this failing
silently.
Fixes: #14139
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
The build_grub.sh script cherry-picks 3 commits from the master branch
of grub because more recent build tools fail to build the latest stable
release (which is 2.02). This solves the problem on Fedora 29 for
example, but is not sufficient for Clear Linux.
This patch modifies the build_grub.sh script to use
grub-2.02-285-g5bc41db75 (latest from master as of 13 of March 2019).
That version compiles 'out-of-the-box' in the latest Ubuntu, Fedora and
Clear Linux.
There are additional tools required on the host system and the
documentation has been updated accordingly.
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Updates the documentation to show PC13 instead
of PB12 as deafult LED Pin. Also adds note
about the default LED based on version of board.
Includes the change that needs to be made to
the dts file for changing default LED pin
Signed-off-by: Suryansh Sharma <suryansh@evilscientist.cc>