Commit graph

42756 commits

Author SHA1 Message Date
Andrew Boie
d4b6226aa9 thread_stack: add Z_THREAD_STACK_SIZE_ADJUST()
Define a macro which takes as input a requested stack buffer
size, and returns the size of the stack object needed to
contain it.

An optional architecture interface is provided, though many
arches will be fine with the default implementation.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-07-30 21:11:14 -04:00
Andrew Boie
27c8aadf94 thread_stack: move up K_THREAD_STACK_RESERVED defn
Some forthcoming macros will need this. This may now
be individually defined by arch code instead of hanging
off of ARCH_THREAD_STACK_DEFINE.

Some additional details added to the documentation string.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-07-30 21:11:14 -04:00
Andrew Boie
0cb1f07c6f thread_stack: z_stack_ptr_align() as function
This can be in inline function, which gains us some
type safety.

Temporarily define Z_STACK_PTR_ALIGN() in terms of it,
slated for removal once some other changes land.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-07-30 21:11:14 -04:00
Andrew Boie
db0d6aedfb kernel: add stack object alignment macro interface
A new macro Z_THREAD_STACK_OBJ_ALIGN() defines the alignment
of the lowest memory address of a stack object.

Related is a new arch interface ARCH_THREAD_STACK_OBJ_ALIGN()
which lets arches specifiy this. ARCH_STACK_PTR_ALIGN or a
power-of-two ceiling is used if not defined.

The default stack macros now use this instead of hard-coding
ARCH_STACK_PTR_ALIGN.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-07-30 21:11:14 -04:00
Andrew Boie
24825c8667 arches: fix arch_new_thread param names
MISRA-C wants the parameter names in a function implementaion
to match the names used by the header prototype.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-07-30 21:11:14 -04:00
Andrew Boie
aa464052ff arch_interface: remove CamelCase
Naming cleanup of this interface declaration.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-07-30 21:11:14 -04:00
Andrew Boie
0c69561469 arch: remove duplicate docs for arch_new_thread
This interface is documented already in
kernel/include/kernel_arch_interface.h

Other architectural notes were left in place except where
they were incorrect (like the thread struct
being in the low stack addresses)

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-07-30 21:11:14 -04:00
Andrew Boie
62eb7d99dc arch_interface: remove unnecessary params
arch_new_thread() passes along the thread priority and option
flags, but these are already initialized in thread->base and
can be accessed there if needed.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-07-30 21:11:14 -04:00
Andrew Boie
79728eccca toolchain: add Z_POW2_CEIL()
Helper macro for rounding up to next power of two.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-07-30 21:11:14 -04:00
Johan Hedberg
ec5823c1ea boards: x86: Remove gpmrb board
This board doesn't have any known users and is not really maintained
anymore, so just remove it.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2020-07-30 12:15:01 -04:00
Kumar Gala
33056e48c5 ci: make test_file.txt a build artifact for debug
Rather that echo'ng the test_file.txt to the console, lets just upload
it as a buildkite artifact.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-07-30 11:25:25 -04:00
Daniel Leung
cf9b86b671 benchmarks: timing_info: re-word thread abort actions
() The thread created to be used for timing measurement does not
   need to run, so use K_FOREVER instead of K_MSEC().
() Thread cancel is actually using k_thread_abort() so re-word it
   correctly to indicate it is aborting a non-running thread.
() The other k_thread_abort() is used on _current so re-word
   the item.

Relates to #25458

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-07-30 10:44:41 -04:00
Maciej Perkowski
732ab5311d doc: Fix path to requirements
Fix path to requirements

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2020-07-30 16:40:29 +02:00
Robert Lubos
bc0654f361 manifest: hal_nordic: Update nrf_802514 clock control
Align with changes in Zephyr to use onoff API instead of clock_control
for clock management.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-07-30 16:39:58 +02:00
Dominik Ermel
c123efb0fc west.yml: Snapshot update of mcumgr from upstream
This commit updates mcumgr with latest snapshot from the upstream.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2020-07-30 16:33:18 +02:00
Dominik Ermel
d86497ebc2 doc: relnotes: Add API change note for fs_open
Update release notes API change section with information on change to
fs_open parameter list.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2020-07-30 16:33:18 +02:00
Dominik Ermel
b9054bfcf7 tests/posix/fs: Add tests for open flags
Add new tests that will utilize open mode flags with the open
function.

A few test functions which assumed O_CREAT behavior are updated
to specify it explicitly.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2020-07-30 16:33:18 +02:00
Dominik Ermel
49ab2099f3 lib/posix: Add support for open flags to open(...)
The fs_open flags has been changed to accept open flags, which requires
changes to open(...) to support the new flags.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2020-07-30 16:33:18 +02:00
Dominik Ermel
deb1694c3c posix: Extend open() function signature with ellipsis
The commit changes signature of open function from:
  int open(const char *name, int flags)
to
  int open(const char *name, int flags, ...)

Currently existing two argument invocations should not require any
rework.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2020-07-30 16:33:18 +02:00
Dominik Ermel
f2f4ba7452 tests/subsys/fs: Add fs_open flags tests to LittleFS
The addition of support for open flags, within fs_open, requires
addition of new test cases.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2020-07-30 16:33:18 +02:00
Dominik Ermel
50aca03eef tests/subsys/fs: Add fs_open flags tests to fat_fs_api
The addition of support for open flags, within fs_open, requires
addition of new test cases to FAT FS back-end tests.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2020-07-30 16:33:18 +02:00
Dominik Ermel
b0facba483 tests/subsys/fs: Add common fs_open_flags test procedure
Common procedure, to use with fs back-ends, have been added for testing
various fs_open flags combinations.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2020-07-30 16:33:18 +02:00
Dominik Ermel
babc322e09 native_posix: Add flags argument to fs_open invocations
Now fs_open supports open flags and the fuse requires update.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2020-07-30 16:33:18 +02:00
Dominik Ermel
47ab70e34c gui: Add open flags argument to fs_open invocation
Now fs_open supports open flags and the lvgl_fs code requires update.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2020-07-30 16:33:18 +02:00
Dominik Ermel
cac07629bf subsys/fs: Add open flags parameter to fs_open
The fs_open has been extended with support for open flags.
Currently supported flags are:
  FS_O_READ -- open for read
  FS_O_WRITE -- open for write
  FS_O_CREATE -- create file if it does not exist
  FS_O_APPEND -- move to the end of file before each write

The FAT FS and LittleFS front-ends within the Zephyr has also been
modified to utilize the flags.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2020-07-30 16:33:18 +02:00
Anas Nashif
555fc6dbd5 sanitycheck: fix only_tags usage
We have been doing an AND comparison instead of an OR. AND does exclude
way to many testcases where multiple tags are being used.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-07-30 10:30:23 -04:00
Gerson Fernando Budke
897a177232 lib: updatehub: Fix getaddrinfo resource leak
Add missing freeaddrinfo to fix memory leak.

Fixes #26994.

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
2020-07-30 10:29:21 -04:00
Loic Poulain
40e2d94bc8 drivers: wifi: eswifi: Fix parsing buffer-overflows
There are possible buffer overflows when parsing the ip address and
SSID. Ensure that we never overwrite the ip and SSID buffers.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2020-07-30 16:35:58 +03:00
Loic Poulain
e7c4d29c86 drivers: wifi: eswifi: Add debug shell
Add a esWiFi shell for device specific controls.
For now used to send at commands.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2020-07-30 16:35:58 +03:00
Loic Poulain
f851462f27 drivers: wifi: eswifi: Use log_strdup for strings
Use log_strdup() helper for logger string parameters.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2020-07-30 16:35:58 +03:00
Loic Poulain
0a1de7e96a drivers: wifi: eswifi: Stop client before starting
Stop any TCP/UDP client session before starting a new one.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2020-07-30 16:35:58 +03:00
Tomasz Bursztyka
3bc6c555a5 drivers: serial: Fix UART callback call in lpc11u6x driver
struct device * as well as void * are necessary now.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-07-30 07:52:28 -05:00
Anas Nashif
4c67339571 doc: add documentation about --integration option
Document the --integration option.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-07-30 08:00:03 -04:00
Anas Nashif
1351defbda boards: qemu_x86_coverage: limit to core tests
Limit to kernel tests, this should not try and run every sample or test
we have as it only verifies the coverage feature, but not collecting
coverage.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-07-30 08:00:03 -04:00
Anas Nashif
eee3ffc7b9 tests/samples: enable for integration testing
Limit execution in CI when using --integration option of sanitycheck.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-07-30 08:00:03 -04:00
Anas Nashif
3335767cd8 samples: pi: add integration support
Limit execution in CI when using --integration option of sanitycheck.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-07-30 08:00:03 -04:00
Anas Nashif
b4bb363b7d tests: shell: remove filter
This filter is bogus, we already add it into the prj.conf

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-07-30 08:00:03 -04:00
Anas Nashif
d6bf5279a2 tests: device: remove whitelisting
Remove whitelisting and use --integration instead.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-07-30 08:00:03 -04:00
Anas Nashif
988433f086 power: remove unused inclusion of soc.h
Inclusion of soc.h not needed in this file

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-07-30 08:00:03 -04:00
Anas Nashif
b72a2fd8b6 drivers: arcv2_irq_unit: remove include
This include is not needed, code fails to build when configuration is
changed..

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-07-30 08:00:03 -04:00
Anas Nashif
7e30c4bcdc samples: bluetooth: cleanup prj*.conf
Remove commented out options

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-07-30 08:00:03 -04:00
Anas Nashif
6c47f65f0f tests: tinycrypt: do not whitelist
use integration filtering...

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-07-30 08:00:03 -04:00
Anas Nashif
7257ce1ee0 tests: benchmarks: filter for integration
Enable for --integration option with sanitycheck.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-07-30 08:00:03 -04:00
Anas Nashif
c050c8777c tests: dac: remove whitelist
We already depend on dac.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-07-30 08:00:03 -04:00
Anas Nashif
314b8af797 ci: enable sanitycheck for integration
Enable sample for integration.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-07-30 08:00:03 -04:00
Anas Nashif
4fef7bf362 samples: cpp_synchronization: filter for integration
Enable sample for integration.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-07-30 08:00:03 -04:00
Anas Nashif
0c5810a1a2 samples: hello_world: filter for integration
Enable sample for integration.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-07-30 08:00:03 -04:00
Anas Nashif
a13acc13e6 tests: cmsis_dsp: use integration keyword
Enable sample for integration.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-07-30 08:00:03 -04:00
Anas Nashif
f0d436c3c2 samples: philosophers: enable for integration testing
Enable sample for integration.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-07-30 08:00:03 -04:00
Anas Nashif
1636c316d9 sanitycheck: introduce integration testing
Use --integration testing for CI to limit execution and builds on
platforms that actually provide most of the coverage instead of blindly
building/running on all available platforms.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-07-30 08:00:03 -04:00