Commit graph

112 commits

Author SHA1 Message Date
Ioannis Glaropoulos 2aa138b333 arch: arm: remove _preempt_float in unshared FP registers mode
Under Unshared FP register mode we are not sharing the
FP context among different threads, so we do not need to
include the FP high registers bank in the thread.arch
container.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-05-03 14:25:22 -04:00
Anas Nashif 3ae52624ff license: cleanup: add SPDX Apache-2.0 license identifier
Update the files which contain no license information with the
'Apache-2.0' SPDX license identifier.  Many source files in the tree are
missing licensing information, which makes it harder for compliance
tools to determine the correct license.

By default all files without license information are under the default
license of Zephyr, which is Apache version 2.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-07 08:45:22 -04:00
Anas Nashif ed139948a5 license: add missing licences to source code
Add missing license to source code files.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-05 23:45:51 -04:00
Kumar Gala bb292d799e debug: tracing: Fix build with renaming of reserved functions.
We renamed _sys_trace_thread_switched_in to
z_sys_trace_thread_switched_in, however we already had a function
named z_sys_trace_thread_switched_in.  So rename z_sys_trace... to
z__sys_trace...

Fixes: #15184

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-04-05 01:00:31 +08:00
Patrik Flykt 4aa48833d8 subsystems: Rename reserved function names
Rename reserved function names in the subsys/ subdirectory except
for static _mod_pub_set and _mod_unbind functions in bluetooth mesh
cfg_srv.c which clash with the similarly named global functions.

Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
2019-04-03 17:31:00 -04:00
Flavio Ceolin b80c3d9c77 arch: x86: Remove not used fp struct
The legacy struct s_coopFloatReg was never being used, though it was
an empty struct (not wasting space), some symbols were being generate
for it.

Nevertheless, neither C99 nor C11 allow empty structs, so this
was also a violation to the C standards.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-03 12:06:31 -04:00
David B. Kinder 6000a6205a doc: prepare for improving doc API linking
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>
2019-03-15 05:47:19 +01:00
Ulf Magnusson 53376394b7 kconfig: Remove blank lines at the beginning/end of files
Maybe this is some "just in case" thing that got copied around. There's
no need to have a blank line at the beginning or end of Kconfig files.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-13 07:29:42 -05:00
Carles Cufi 05479601b7 segger: sysview: Fix constness of char pointer
To match the signature of k_thread_name_get(), add a const modifier to
the local variable definition.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-03-04 18:59:55 -08:00
Dave Marples 80fd80a8c9 systemview: Use proper task names when these are available.
Trivial patch to recover the task name from the task structure when it
is present and include it in the information returned to SystemView.
When these data are not present patch will revert to old behaviour.

Signed-off-by: Dave Marples <dave@marples.net>
2019-03-03 23:58:08 -05:00
David B. Kinder e731bdc81a doc: fix docs, include, and Kconfig misspellings
Fix misspellings missed during regular reviews

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-02-28 09:32:12 +01:00
Daniel Glöckner c9e7a5b6b0 debug: openocd: change how we manage differences between versions
Every time the array of offsets was changed, it was changed in a
backward compatible way by appending elements to the end. The version
number was incremented to inform OpenOCD about the existence of the new
elements. But the patch for OpenOCD to support Zephyr has never been
updated to support anything else than version 0, causing OpenOCD to
reject recent Zephyr versions. So the idea of using a version number to
track compatible changes didn't work out.

Therefore add another symbol that can be read by OpenOCD to get the
number of elements in the array. This value is automatically calculated
during compilation. The version number element should from now on be
incremented only for incompatible changes.

Fixes: #13448

Signed-off-by: Daniel Glöckner <dg@emlix.com>
2019-02-27 13:25:28 -06:00
Ulf Magnusson 9aab5cef96 kconfig: Remove redundant 'default n' properties
Some more were added since the cleanup pass in June 2018. See e.g.
commit 2d50da70a1 ("drivers: ipm: Kconfig: Remove redundant 'default n'
properties") for a motivation. It also avoids people wondering whether
or not they need to put in 'default n'.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-02-27 09:25:22 +01:00
François Delawarde 74f9901b8d debug: Place Kconfig tracing options in debug submenu
Fix Kconfig options placed incorrectly in top level menu.

Signed-off-by: François Delawarde <fnde@oticon.com>
2019-02-14 10:29:06 -05:00
François Delawarde 4fac841869 debug: CTF Tracing with POSIX backend
This commit implements a CTF-backend for Zephyr's tracing API.
The CTF-backend itself is split in a middle-layer and a bottom-layer.
- Middle-layer decides the payload in event transactions,
- Bottom-layer implements the IO transport.

A simple POSIX bottom-layer is provided so far.

Signed-off-by: François Delawarde <fnde@oticon.com>
2019-02-01 08:56:02 -05:00
Marek Pieta a304528f51 debug: SystemView fix
Change fixes problem with mutexes and initialization for SystemView,
adds config options to:
- choose if SystemView should start logging events on system start
- select SystemView RTT buffer size

Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
2019-01-25 17:37:51 -05:00
Anas Nashif 5f371e038f debug: move segger configs to subsys/debug
We have dependency on this module in code which is part of Zephyr. When
this module is split out of the tree we need to be able to build. Move
this Kconfig part to be part of zephyr and keep the external code in
ext/ with plan to split it out on the future.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-22 07:45:22 -05:00
David B. Kinder 06d78354ae doc: regular misspelling scan
Fix misspellings in documentation (.rst, Kconfig help text, and .h
doxygen API comments), missed during regular reviews.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-12-26 13:27:14 -05:00
Pawel Dunaj e344e5752c ext: debug: segger: Fix SEGGER header inclusion
Fix issue caused by 3fc497ac9a

This change removes `rtt` and `systemview` from header includes
as these are already placed in the path.

Also `SEGGER_SYSVIEW_ConfDefaults.h` header included from
`SEGGER_SYSVIEW_Int.h` is placed higher to make sure `INLINE`
definition is properly visible.

Signed-off-by: Pawel Dunaj <pawel.dunaj@nordicsemi.no>
2018-12-05 14:35:42 +01:00
Marek Pieta 788210816d debug: tracing: Add CPU stats module
Change adds CPU stats module for tracing hooks. Module provides
information about percent of CPU usage based on tracing hooks
for threads switching in and out, interrupts enters and exits.
cpu_stats only distinguishes between idle thread, non idle
thread and scheduler.

Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
2018-11-30 11:01:32 -08:00
Andy Ross 923e1b60e7 misc/printk: Make the default char_out routine weak
Architecture init code and/or HAL layers often have a working
"putchar" routine available long before the Zephyr driver layer is
initialized.

Make the default printk() output a weak symbol, so it can be
overridden on these platforms.

Also remove the kconfig depedency on CONSOLE_HAS_DRIVER, as this is a
non-driver mechanism.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2018-11-14 19:08:27 -05:00
Andrzej Głąbek 20202902f2 dts_fixups: Use DT_ prefix in all defined labels not related to Kconfig
These changes were obtained by running a script  created by
Ulf Magnusson <Ulf.Magnusson@nordicsemi.no> for the following
specification:

1. Read the contents of all dts_fixup.h files in Zephyr
2. Check the left-hand side of the #define macros (i.e. the X in
   #define X Y)
3. Check if that name is also the name of a Kconfig option
   3.a If it is, then do nothing
   3.b If it is not, then replace CONFIG_ with DT_ or add DT_ if it
       has neither of these two prefixes
4. Replace the use of the changed #define in the code itself
   (.c, .h, .ld)

Additionally, some tweaks had to be added to this script to catch some
of the macros used in the code in a parameterized form, e.g.:
- CONFIG_GPIO_STM32_GPIO##__SUFFIX##_BASE_ADDRESS
- CONFIG_UART_##idx##_TX_PIN
- I2C_SBCON_##_num##_BASE_ADDR
and to prevent adding DT_ prefix to the following symbols:
- FLASH_START
- FLASH_SIZE
- SRAM_START
- SRAM_SIZE
- _ROM_ADDR
- _ROM_SIZE
- _RAM_ADDR
- _RAM_SIZE
which are surprisingly also defined in some dts_fixup.h files.

Finally, some manual corrections had to be done as well:
- name##_IRQ -> DT_##name##_IRQ in uart_stm32.c

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2018-11-13 10:44:42 -06:00
Anas Nashif 86ad37a533 kconfig: distribute misc/Kconfig option where they belong
Move misc/Kconfig options to where they belong. misc/Kconfig was used as
a catch-all, but we are now able to put things in a better place.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-11-12 08:01:15 -05:00
Marek Pieta c99fd5c807 subsys: debug: tracing: Fix interrupt hooks
Change fixes interrupt hooks.

Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
2018-11-06 16:15:29 -05:00
Flavio Ceolin a406b88fca kernel: Remove duplicated identifier
There was an struct and a variable called _kernel. This is error prone
and a MISRA-C violation. It is changing the struct to have a unique
identifier.

MISRA-C rule 5.8

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2018-11-04 11:37:24 -05:00
Maureen Helm a5b6215a06 debug: openocd: Add floating point context to openocd offsets
Adds preemptive and cooperative floating point contexts to the openocd
offsets array for arm and x86 architectures.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-10-31 12:05:11 -04:00
Maureen Helm 1b2ca67f78 debug: openocd: Add thread name to openocd offsets
Adds the thread name to the openocd offsets array so openocd and pyocd
can show thread names in the debugger.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-10-31 12:05:11 -04:00
Marek Pieta e87193896a subsys: debug: tracing: Fix thread tracing
Change fixes issue with thread execution tracing.

Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
2018-10-29 22:09:12 -04:00
Marti Bolivar 7f3e07ee11 tracing: don't include kernel_structs.h from tracing_sysview.h
This header is private data and we shouldn't (and aren't) using it in
the tracing_sysview.h. SystemView tracing works fine without it, as
tested with the philosophers sample.

This commit fixes the build when bluetooth SMP and SystemView tracing
are used, because the kernel_structs.h inclusion ends up pulling in
kernel_internal.h, which declares smp_init(), whose declaration
conflicts with another internal routine by the same name in
subsys/bluetooth/host/smp.c.

Signed-off-by: Marti Bolivar <marti@foundries.io>
2018-10-05 10:37:01 -04:00
Anas Nashif 483910ab4b systemview: add support natively using tracing hooks
Add needed hooks as a subsystem that can be enabled in any application.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-08-21 05:45:47 -07:00
Ulf Magnusson 1073882998 subsys: kconfig: Remove 'default n' properties and clean up a bit
Bool symbols implicitly default to 'n'.

A 'default n' can make sense e.g. in a Kconfig.defconfig file, if you
want to override a 'default y' on the base definition of the symbol. It
isn't used like that on any of these symbols though.

Remove some 'default ""' properties on string symbols too.

Also make definitions more consistent by converting some

  config FOO
  	<type>
  	prompt "foo"

definitions to a shorter form:

  config FOO
  	<type> "foo"

This shorthand works for int/hex/string symbols too, not just for bool
symbols.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-07-12 23:13:22 -04:00
Leandro Pereira 91220ba640 boards: native_posix: Add option to build with Address Sanitizer
Address Sanitizer helps finding issues related to memory: buffer
overflows, usage of uninitialized memory, etc.  This is available in
both Clang and GCC for a while, and, since the POSIX port is only
meant for testing, this will help find issues.

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2018-07-03 17:06:25 -04:00
Andrew Boie bc40f9340d debug: enable assertions for all tests
This keeps biting us; sanitycheck turns on assertions by
default for tests, but standalone builds, or builds done
for other test infrastructure do not. Put all builds in
the same state.

Specific tests (such as benchmarks) can override this with
CONFIG_FORCE_NO_ASSERT.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2018-05-24 15:12:56 -07:00
Andy Gross abf77ef753 subsys: debug: Fix stack sentinel dependencies
This patch restricts the stack sentinel to only be allowed if the
USERSPACE configuration option is not set.  The stack sentinel feature
is redundant if used in conjunction with the USERSPACE, due to the
protection mechanisms in place for stacks.

Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-05-10 14:16:46 -07:00
Leandro Pereira 2f5659d4d2 arch: x86: Unwind the stack on fatal errors
Prints up to 8 stack frames, with the following format:
  RETURN_ADDR(ARGUMENTS)

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2018-03-16 14:12:15 -07:00
Andy Ross 6eef2f1485 misc: Add a FORCE_NO_ASSERT kconfig directive
The mbedtls test is hitting a compiler bug where two subtests will
soft fail on qemu_xtensa when assertions are enabled.  This is despite
the fact that:

+ The failure is entirely internal to the mbedtls suite.
+ The mbedtls code does not use zephyr asserts
+ The mbedtls code does not call into zephyr code that might assert.
+ The behavior persists even when an irq_lock() is held across the
  entire test, ruling out any asserts in interrupt/exception context.
+ And EVEN WHEN the mbedtls library blobs are bytewise identical
  between assert and non-assert cases.

The bug seems to be a layout thing where the mbedtls code behavior
differently based on code address and/or link-time optimizations
(xtensa has a few).

Unfortunately sanitycheck enables assertions by setting CFLAGS
directly and not via kconfig, so we can't fix this by turning the
feature off in an app right now.  This patch adds a simple "override"
flag that can be set by apps like this that hit bugs.

Again, note that zephyr assertions are not used nor needed by this one
test.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2018-02-16 10:44:29 -05:00
Anas Nashif ff42bdd0a0 debug: remove option GDB_INFO
This feature is X86 only and is not used or being tested. It is legacy
feature and no one can prove it actually works. Remove it until we have
proper documentation and samples and multi architecture support.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-02-12 13:58:28 -08:00
Paul Sokolovsky 84e3d3e7e8 libc: Kconfig: Move STDOUT_CONSOLE from subsys/debug
This option is clearly not related to debugging, but affects libc
features.

Fixes: #5566

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2018-01-11 12:47:10 -05:00
Anas Nashif 429c2a4d9d kconfig: fix help syntax and add spaces
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-13 17:43:28 -06:00
Anas Nashif f46c0c2472 kconfig: remove deprecated DEBUG_TRACING_KERNEL_OBJECTS
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-09 08:48:51 -06:00
Anas Nashif a254359c1a kconfig: stack_usage: remove extra space
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-09 08:48:51 -06:00
Anas Nashif 1092a25978 kconfig: move GDB_INFO kconfig to subsys/debug
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-11-27 22:15:30 -05:00
Sebastian Bøe 0829ddfe9a kbuild: Removed KBuild
Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
2017-11-08 20:00:22 -05:00
Sebastian Bøe 12f8f76165 Introduce cmake-based rewrite of KBuild
Introducing CMake is an important step in a larger effort to make
Zephyr easy to use for application developers working on different
platforms with different development environment needs.

Simplified, this change retains Kconfig as-is, and replaces all
Makefiles with CMakeLists.txt. The DSL-like Make language that KBuild
offers is replaced by a set of CMake extentions. These extentions have
either provided simple one-to-one translations of KBuild features or
introduced new concepts that replace KBuild concepts.

This is a breaking change for existing test infrastructure and build
scripts that are maintained out-of-tree. But for FW itself, no porting
should be necessary.

For users that just want to continue their work with minimal
disruption the following should suffice:

Install CMake 3.8.2+

Port any out-of-tree Makefiles to CMake.

Learn the absolute minimum about the new command line interface:

$ cd samples/hello_world
$ mkdir build && cd build
$ cmake -DBOARD=nrf52_pca10040 ..

$ cd build
$ make

PR: zephyrproject-rtos#4692
docs: http://docs.zephyrproject.org/getting_started/getting_started.html

Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
2017-11-08 20:00:22 -05:00
Andrew Boie 756f907274 misc: userspace support for printk()
To avoid making a system call for every character emitted, there is now
a small line buffer if userspace is enabled. The interface to the kernel
is a new system call which takes a sized buffer of console data.

If userspace is not enabled this works like before.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-10-11 09:23:57 -07:00
Anas Nashif a5661c3690 debug: openocd: build openocd symbols using obj-
openocd object was put in a library causing it to be stripped. We want
those symbols in the final ELF to allow debugging with openocd, building
those as objects like the rest of the kernel keeps the symbols in the
kernel.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-08-10 09:13:06 -05:00
Andrew Boie 0f669132a0 kernel: remove gdb_server
This is unmaintained and currently has no known users. It was
added to support a Wind River project. If in the future we need it
again, we should re-introduce it with an exception-based mechanism
for catching out-of-bounds memory queries from the debugger.

The mem_safe subsystem is also removed, it is only used by the
GDB server. If its functionality is needed in the future, it
shoudl be replaced with an exception-based mechanism.

The _image_{ram, rom, text}_{start, end} linker variables have
been left in place, they will be re-purposed and expanded to
support memory protection.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-06-19 14:29:40 -04:00
Anas Nashif 397d29db42 linker: move all linker headers to include/linker
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-18 09:24:04 -05:00
Andrew Boie 5dcb279df8 debug: add stack sentinel feature
This places a sentinel value at the lowest 4 bytes of a stack
memory region and checks it at various intervals, including when
servicing interrupts or context switching.

This is implemented on all arches except ARC, which supports stack
bounds checking directly in hardware.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-05-13 15:14:41 -04:00
Leandro Pereira 86b0260e97 kconfig: Move debugging-related options from misc/ to subsys/debug/
This should fix the grouping for debugging options appearing in the
main "menuconfig" menu.

Change-Id: I7ddf3a6f3d025bf82ba63099b30e47a40d7c3187
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-04-28 23:41:16 +00:00
Kumar Gala 6da829690f subsys: convert to using newly introduced integer sized types
Convert code to use u{8,16,32,64}_t and s{8,16,32,64}_t instead of C99
integer types.

Jira: ZEP-2051

Change-Id: Icbf9e542b23208890a3a32358447d44cdc274ef1
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-21 09:36:22 -05:00
Kumar Gala 789081673f Introduce new sized integer typedefs
This is a start to move away from the C99 {u}int{8,16,32,64}_t types to
Zephyr defined u{8,16,32,64}_t and s{8,16,32,64}_t.  This allows Zephyr
to define the sized types in a consistent manor across all the
architectures we support and not conflict with what various compilers
and libc might do with regards to the C99 types.

We introduce <zephyr/types.h> as part of this and have it include
<stdint.h> for now until we transition all the code away from the C99
types.

We go with u{8,16,32,64}_t and s{8,16,32,64}_t as there are some
existing variables defined u8 & u16 as well as to be consistent with
Zephyr naming conventions.

Jira: ZEP-2051

Change-Id: I451fed0623b029d65866622e478225dfab2c0ca8
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-20 16:07:08 +00:00
Anas Nashif 50553dd700 debug: rename variable CONFIG_GDB_RAM_SIZE
CONFIG_* usually come from Kconfig, rename variables that are locally
defined to avoid confusion about where they are set.

Change-Id: I402713e6f852907e75be4bc2b916a7d15dd5649c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-04-11 03:14:24 +00:00
Anas Nashif 919b3f0878 kconfig: fixed Kconfig name in comments
Change-Id: Ia22e9df4b9d836635aef1d4b59efec8ce58815d6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-04-10 16:07:09 +00:00
Youvedeep Singh 724fcffbef debug: Remove dependency of unsetting X86_IAMCU for CONFIG_DEBUG_INFO.
CONFIG_DEBUG_INFO was disabled for IAMCU targets. As per Jira update forked
arch/code is gone. So it should not block enabling DEBUG_INFO for IAMCU.

Currently CONFIG_DEBUG_INFO depends on (x86 = y && !X86_IAMCU)
CONFIG_DEBUG_INFO can not be set for IAMCU. this patch removes dependency.

Jira: ZEP-601

Change-Id: Ib5635096f83f7b931c277b667a55c6d54f8e946a
Signed-off-by: Youvedeep Singh <youvedeep.singh@intel.com>
2017-04-09 14:52:28 +00:00
Jithu Joseph fce0d9a865 subsys: gdb_server: Fix type mismatch
This was flagged by ISSM icx compiler.

JIRA: ZEP-1806

Change-Id: Iebd04febbdce9b92a4d0cae986ca7f84f4da58a0
Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
2017-03-01 14:26:16 +00:00
Leandro Pereira 570634a259 kernel: Add OpenOCD support
In order for OpenOCD to have a high-level view of an RTOS, it uses the
GDB protocol to obtain symbols from the system.

The GDB protocol, however, does not allow obtaining fields from
structures directly, and hardcoding offsets is not only brittle (due to
possibly different architectures or changes in the code), it's also
infeasible considering Zephyr is highly-configurable and parts of key
structs can be compiled in or out.

Export an array with offsets for these key structs. Also add a version
element in that array to allow changes in those structs.

Change-Id: I83bcfa0a7bd57d85582e5ec6efe70e1cceb1fc51
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-02-11 03:57:19 +00:00
David B. Kinder ac74d8b652 license: Replace Apache boilerplate with SPDX tag
Replace the existing Apache 2.0 boilerplate header with an SPDX tag
throughout the zephyr code tree. This patch was generated via a
script run over the master branch.

Also updated doc/porting/application.rst that had a dependency on
line numbers in a literal include.

Manually updated subsys/logging/sys_log.c that had a malformed
header in the original file.  Also cleanup several cases that already
had a SPDX tag and we either got a duplicate or missed updating.

Jira: ZEP-1457

Change-Id: I6131a1d4ee0e58f5b938300c2d2fc77d2e69572c
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-01-19 03:50:58 +00:00
Anas Nashif c1347b4730 kernel: replace all remaining nanokernel occurances
replace include <nanokernel.h> with <kernel.h> everywhere and also fix
any remaining mentions of nanokernel.

Keep the legacy samples/tests as is.

Change-Id: Iac48447bd191e83f21a719c69dc26233216d08dc
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-12-25 14:34:43 -05:00
Anas Nashif 87133d5def debug: gdb: move to new kernel APIs
Change-Id: Ifed1fe7c60fa150ee3ef4fefabafeb95312bf8bc
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-12-19 14:59:35 -05:00
Anas Nashif e6b7ba40d1 debug: fixed style and align code
Change-Id: I75875680feb7b814ed1fdafeb42de6f2d7049a90
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-12-19 19:58:41 +00:00
Anas Nashif 569f0b4105 debug: move debug features from misc to subsys/debug
Change-Id: I446be0202325cf3cead7ce3024ca2047e3f7660d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-12-19 19:58:40 +00:00