when a current thread is added to a memory domain the pages/sections
must be configured immediately.
A problem occurs when we add a thread to current and then drop
down to usermode. In such a case memory domain will become active
the next time a swap occurs.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
Add an architecure specfic code for the memory domain
configuration. This is needed to support a memory domain API
k_mem_domain_add_thread.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
-Wl,--print-memory-usage is a relatively new LD feature (2015) and is
not supported by the espressif toolchain. Unfortunately the toolchain
compatibility test was broken as it was not using the flag when
linking.
The root cause lies in how we test LD compatibility and this same fix
must be applied again in e.g. target_ld_options().
This patch fixes
https://github.com/zephyrproject-rtos/zephyr/issues/5458
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Currently all posix APIs are put into single files (pthread.c).
This patch creates separate files for different API areas.
Signed-off-by: Youvedeep Singh <youvedeep.singh@intel.com>
Fixes many instances of errors similar to below:
zephyr/subsys/bluetooth/controller/ll_sw/ctrl.c:5927:22:
error: declaration of ‘s_link’ shadows a previous
local [-Werror=shadow]
static memq_link_t s_link;
^~~~~~
zephyr/subsys/bluetooth/controller/ll_sw/ctrl.c:5905:21:
note: shadowed declaration is here
static memq_link_t s_link;
^~~~~~
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
The properties definitions were not doing much because they were
defined after they were used. They were actually overriding the true
properties with "".
Moving them earlier ensures that the properties behave as expected, as
documented global mutable variables.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Use the existing J-Link functionality to support debugging nRF5x targets
with GDB over a Segger J-Link USB connection.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Pass the --print-memory-usage to the linker on the first link if the
toolchain supports it.
Don't use this option with the second link because seeing it twice
could confuse users and using it on the second link would suppress it
when the first link has a ram/flash-usage issue.
Note that the memory regions are symbolic concepts defined by the
linker scripts and do not necessarily map directly to the real
physical address space. Take also note that some platforms do two
passes of the linker so the results do not match exactly to the final
elf file. See also rom_report, ram_report and
https://sourceware.org/binutils/docs/ld/MEMORY.html
This is particularly useful when the linker fails due to excessive
flash/ram usage. When a section does not fit into a memory region the
linker will exit with an error code and will state how big the
overflow was. But it doesn't state what the memory region size is, or
what memory regions exist, which is good to know when debugging
overflow issues.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Enabled compiler definition flag TEST_CASE_SLEEP_SUCCESS
which was missing on migrating to cmake.
Signed-off-by: Nirmala Devi <nirmala.devix.m@intel.com>
It is only necessary to link with subsys__bluetooth if the path
"subsys/bluetooth" is needed as an include directory. None of the
samples have this need.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
ST official reference for this board is B-L475E-IOT01A.
While not used in zephyr, add reference in documentaion title.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This adds stubs for Core Unregister Service command implementation.
It will be used to clean up the stack and tester after test case
execution.
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
When a debugger is already connected to the JLink debug adapter
nrfjprog.py would incorrectly detect that the snr is '0' and try to
flash a device with that snr.
Also, when there were no boards connected, nrfjprog.py would
incorrectly state that there were multiple boards connected.
This patch improves the error feedback so that a user can more easily
debug why he can't flash his device.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
For readability, swallow exceptions unless --verbose is given on the
command line. Add a printline to direct the user how to ensure that's
set in case more information out of the flash script is desired.
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
The system ID core is a simple read-only device that
provides Qsys systems with a unique identifer.
Nios-II processor systems use the system ID core to
verify that an executable program was compiled targeting
the actual hardware image configured in the target FPGA.
Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
Consolidate and standardize error handling throughout
lwm2m_obj_firmware_pull.c. As well as handle previously
unhandled errors returned from transfer_request().
NOTE: in general, unhandled errors will now result in
RESULT_UPDATE_FAILED. Previously, unhandled errors in
transfer_request() would result in RESULT_CONNECTION_LOST
which might or might not be over-written with another
result later.
Signed-off-by: Michael Scott <michael@opensourcefoundries.com>
The CoAP samples use an MBEDTLS config "config-coap.h" which could be
re-used by the LwM2M sample, except that most servers use a larger
maximum content length setting of 1500 bytes.
Let's add a CONFIG to set this for users of the CoAP lib and set the
CONFIG value for the samples to the 256 size currently used.
Signed-off-by: Michael Scott <michael@opensourcefoundries.com>
The build documentation for this board is misleading. It says to "set
JAILHOUSE_QEMU_IMG_FILE", *then* run cmake commands. But setting the
variable must be part of the cmake commands themselves. Fix it.
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
Currently, LwM2M firmware download only supports coap2http proxy.
Let's add support for coap2coap proxy as well.
This was tested running Californium demo app cf-proxy on the host
machine with the following setting changed in Californum.properties:
MAX_RESOURCE_BODY_SIZE=524288
Add the following to the samples/net/lwm2m_client/prj.conf:
CONFIG_LWM2M_FIRMWARE_UPDATE_PULL_COAP_PROXY_SUPPORT=y
CONFIG_LWM2M_FIRMWARE_UPDATE_PULL_COAP_PROXY_ADDR="coap://[2001:db8::2]:5682"
Build the sample for qemu_x86 as you would normally, but now
you can use a real world coap address to pull firmware using the 5/0/1
resource. The host machine running cf-proxy will pull the remote
resource and then deliver it to the running qemu sample.
Signed-off-by: Michael Scott <michael@opensourcefoundries.com>
- Mention the prj_dtls.conf setting
- Explain setting up security in the Leshan Demo Server web UI.
Signed-off-by: Michael Scott <michael@opensourcefoundries.com>
- Add needed settings for DTLS support to the lwm2m_ctx structure.
- Add initialization of MBEDTLS to the LwM2M lib based on the
user application settings in lwm2m_ctx.
Signed-off-by: Michael Scott <michael@opensourcefoundries.com>
The default net_context remote address is scrambled when using a
connection via DTLS. Instead let's use the dtls context remote.
Signed-off-by: Michael Scott <michael@opensourcefoundries.com>
While looping through possible lwm2m_ctx matches, we're referencing
remote before checking that the context itself is valid.
Also, reduce indentation issues.
Signed-off-by: Michael Scott <michael@opensourcefoundries.com>
Instead of building under the "app" context, let's build the
LwM2M library as a separate static library. This will be helpful
later when adding support for DTLS as w/o this configuration,
the build breaks on MBEDTLS config includes.
Signed-off-by: Michael Scott <michael@opensourcefoundries.com>
Add a debug-only global that prevents commands from running, and just
prints what would have been run.
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
Allow the user to specify additional options for pyocd-flashtool. This
grants finer-grained control to individual applications, e.g. to
perform a chip erase instead of a sector erase when flashing.
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
This gives callers finer-grained control over the flash. For example,
giving --dfuse-modifiers=force:mass-erase allows a chip-erase rather
than just erasing the sectors which need to be overwritten with the image.
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
Enable DT support in the dfu-util flasher when the target is a
DfuSe (DFU + ST extensions) device.
Untangling DfuSe-specific options (currently, the default is 'leave',
to immediately start running after the flashing is done) from the
actual address makes this cleaner, and sets up a subsequent patch to
let callers set DfuSe options.
It also lets us fix an unnecessary printline when flashing DfuSe
devices. There's no need to reset those, since the 'leave' modifier
starts execution immediately.
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
Add the necessary infrastructure to the runner core to support
computing flash addresses based on the devicetree. Specifically, add:
- a new RunnerCaps capability, flash_addr, which lets runners declare
when they support flashing to an arbitrary address
- a common --dt-flash option to all runner command line parsers which
support this capability, which lets users request flash addresses to
be computed from device tree
- a ZephyrBinaryRunner helper method, get_flash_address(), which is
the common code needed to compute a flash address from device
tree (or return a default value if non-DT based flashing is
requested). This relies on the BuildConfiguration parser introduced
in an earlier patch.
Subsequent patches will use this functionality in individual runners.
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>