The Arduino 101 comes with a bootloader that supports DFU
and flashing of all cores using the dfu-util package.
This changes the memory layout of the image built for the
Arduino 101 and remove previous work-arounds to allow booting,
including the version-header section in the linker script.
The bootloader expects the text section at +0x30 from the physical
load address and thus requires special treatment in the linker
script.
Other changes by Andrew Boie:
The flash size parameters were both wrong. X86 side has 192K
of flash from 0x4003000 - 0x40060000, the entire span of
sys_flash1.
ARC side is now the span from 0x40010000 - 0x40030000, 128K.
Change-Id: Iecfa5d2b84a3f522d9eca06268d6b8b71a094aaa
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Added needed kconfig options. KERNEL_V2 selects MICROKERNEL to allow
middleware and application that differentiate between NANOKERNEL and
MICROKERNEL to run unmodified.
Build the unified/ kernel directory: do not touch the
nanokernel/microkernel directories.
Invoke sysgen for both microkernel and unified kernel. Only have sysgen
reference include/microkernel if building an original microkernel.
Change-Id: If74779146143434f7ee274bbef32d6c894b9f1a1
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
This is to support a printf test case where we need to know
the existing value so we can chain it.
Change-Id: I671429aa7dab1391840f49f54cc6c23baccf265c
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
We now allow modifier codes h, l, and z, although at the
moment they are simply dropped. This is to allow us to warn on
incorrect printk() usage by the compiler. These arguments get
promoted to int when they are passed as arguments so this
may never need to be addressed, although there may be implications
for (future) support for systems with 16-bit integers.
We still don't print 64-bit integers properly. but this is
nothing new.
Change-Id: I112d1257c4ec70c3fa7ae65dc56a6076ff29a8c0
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Completing the terminology change started with change 4008
by updating the Kconfig files processed to produce the
online documentation, plus header files processed by
doxygen. References to 'platform' are change to 'board'
Change-Id: Id0ed3dc1439a0ea0a4bd19d4904889cf79bec33e
Jira: ZEP-534
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Previously, exception stubs had to be declared in assembly
language files. Now we have two new APIs to regsiter exception
handlers at C toplevel:
_EXCEPTION_CONNECT_CODE(handler, vector)
_EXCEPTION_CONNECT_NOCODE(handler, vector)
For x86 exceptions that do and do not push error codes onto
the stack respectively.
In addition, it's now no longer necessary to #define around
exception registration. We now use .gnu.linkonce magic such that
the first _EXCEPTION_CONNECT_*() that the linker finds is used
for the specified vector. Applications are free to install their
own exception handlers which will take precedence over default
handlers such as installed by arch/x86/core/fatal.c
Some Makefiles have been adjusted so that the default exception
handlers in arch/x86/core/fatal.c are linked last. The code has
been tested that the right order of precedence is taken for
exceptions overridden in the floating point, gdb debug, or
application code. The asm SYS_NANO_CPU_EXC_CONNECT API has been
removed; it was ill- conceived as it only worked for exceptions
that didn't push error codes. All the asm NANO_CPU_EXC_CONNECT_*
APIs are gone as well in favor of the new _EXCEPTION_CONNNECT_*()
APIs.
CONFIG_EXCEPTION_DEBUG no longer needs to be disabled for test
cases that define their own exception handlers.
Issue: ZEP-203
Change-Id: I782e0143fba832d18cdf4daaa7e47820595fe041
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
uart_register_input()'s signature changed with the addition of a
callback. gdb_server.c was never updated so now the compilation fails
when enabling the GDB server.
Fix by setting a NULL completion (as seems the code would not use it
anyway).
Change-Id: I4c0df65a31bd906db704f7f4a564e7d6f065aae7
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
supported_features_cmd is a string which part of is added based on a
However, the semicolon to do so was being only included if the #define
was there; if not it was generating a syntax error. Place it out of
the #ifdef block.
Change-Id: Idd7e80519719b5ad432971e758a05546df8a89e2
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
Convert leading whitespace into tabs in Kconfig files. Also replaced
double spaces between config and <prompt>.
Change-Id: I341c718ecf4143529b477c239bbde88e18f37062
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
By default, instead of spamming the build output with one warning per
file where __assert.h is included when CONFIG_ASSERT=y, only display a
warning at the end of the build.
Also limit the range of CONFIG_ASSERT_LEVEL between 0 and 2.
Change-Id: I95ffd1bcec9535de1afabc047814e5c6f5b9c2c1
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
tinycrypt was built using the lib- scripts without any real benefit. We
also had a wrong placement of the Kconfig files under misc/ and a Kconfig
file for Crypto that was never used before.
Change-Id: I82d5902d92e7c06e10a95f418d9ead3cbcabcce4
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
To boot zephyr on the Arduino 101 running the original bootloader
which supports DFU, set the following in your application configuration
file:
CONFIG_SS_RESET_VECTOR=0x40034000
CONFIG_PHYS_LOAD_ADDR=0x40010000
CONFIG_VERSION_HEADER=y
Jira: ZEP-219
Change-Id: Ia015a7b6fce888b49ed22c558de992132d4713ea
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
GDB server needs ownership of some exceptions to display information when
taking a fatal exception (DIVIDE_ERROR, PAGE_FAULT).
Introduce a Kconfig option that can work for any debugger.
Change-Id: I39aef22a820543a7fe9ac333b487592946abc0f3
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
The GDB server implements a set of GDB commands, such as read/write
memory, read/write registers, connect/detach, breakpoints, single-step,
continue. It is not OS-aware, and thus provides a 'system-level'
debugging environment, where the system stops when debugging (such as
handling a breakpoint or single-stepping).
It currently only works over a serial line, taking over the
uart_console. If target code prints over the console, the GDB server
intecepts them and does not send the characters directly over the serial
line, but rather wraps them in a packet handled by the GDB client.
Change-Id: Ic4b82e81b5a575831c01af7b476767234fbf74f7
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Introduce an x86 interrupt stack frame that contains more information
than the non-debug one, namely the caller-saved GPRs, as well as an API
to retrieve it. Able to handle nested interrupts stack frames.
Change-Id: If182aaa2f34e4714b16ca65ff79da63b72d962f7
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
The header sys_log.h concentrates logging macro definitions so it can be
reused by all code, change aims create an API to replace replace
currently duplicated logging macro definitions. Later enhancements to
log can now be performed in a single file. Features:
* Optional printing of colored messages
* Incremental log levels per-module
* Optional printing of logging level label (info, error, warning, debug)
* Caller function name printing
* One point log disable
* Global override log level
* Print function detection (printf or printk)
JIRA item ZEP-111 refers to this change.
Origin: Original
Change-Id: I34492b0148b4e9d0094f69c511b96f4fd640ef44
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
Use linker symbol and board configs to determine the start
and extent of remaining RAM present in a board and use
it as newlib's heap.
Change-Id: I7128cf2857664331d83f212f27e8af7ad3bb8936
Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
While we don't have a proper heap that can make use of all the
available RAM, make it possible for applications using Newlib to
configure the size of the heap exposed via the sbrk() hook.
Change-Id: I4e3193c1f2df0ace1dbc5b1f6ceb2cdc61479762
Signed-off-by: Iván Briano <ivan.briano@intel.com>
Mostly SoC initialization and some kernel subsystems, but also some
device drivers like the interrupt controllers.
Change-Id: I8dc1844c33acd877c075b6b03558fdca6f87500b
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
This is the last step before obsoleting DEVICE_DEFINE() and
DEVICE_INIT_CONFIG_DEFINE().
Change-Id: Ica4257662969048083ab9839872b4b437b8b351b
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Rename it to DEVICE_DEFINE() so that it fits in the 'device' namespace.
Change-Id: I3af3a39cf9154359b31d22729d0db9f710cd202b
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Rename it to DEVICE_INIT_CONFIG_DEFINE(), because (a) it was not fitting
in any namespace and (b) it is not used to declare, but rather define a
object.
Change-Id: I1da5822f06b85a9fb024b5b184afd0ccc01012ec
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
The sys_mem_safe_write_to_text_section() now always fails in XIP
systems, since their .text section is in ROM.
Change-Id: Ie47a5dbf5f75a4bfe8e9fc9852d0037a3546aae8
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Adds C++ support to the build system.
Change-Id: Ice1e57a13598e7a48b0bf3298fc318f4ce012ee6
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
The option is used in the code but was never declared.
Change-Id: I17552c225936652e9208f53a884311eb81cb79a6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This will only generate the .su files when CONFIG_STACK_USAGE
is specified, otherwise the tree will be full of .su files.
Change-Id: I3ffc7a7f5ab09aaae49ff65e8ad5de0832370777
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Some options appear in the top level menuconfig, group them
and put put them in a menu.
Change-Id: Ib0285176e7f0ed7ec9ff54dd80c0f02ec4817f2b
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Put initialization priorities as device driver Kconfig
parameter.
Initialization priority value for each platform is defined
in the platform Kconfig file.
Drivers and platform code use SYS_DEFINE_DEVICE to add
and initialization function.
Change-Id: I2f4f3c7370dac02408a1b50a0a1bade8b427a282
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Do not depend on environment variables and use a kconfig variable
for defining the architecture.
In addition, remove the X86_32 variable, it just duplicates X86 for
not good reason, at least until start supporting MCUs with 64bit.
Change-Id: Ia001db81ed007e6a43f34506fed9be1345b88a4b
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Add the REBOOT kconfig option, along with the sys_reboot() API.
This infrastructure is not enough to actually perform a reboot.
Architecture/platform code must be provided as well, in the form of a
sys_arch_reboot() function.
Change-Id: I5b2b15855ff06453f2764f3e3b3b7d6a4a078723
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Introduces the following routines to provide safe access to memory:
_mem_probe()
_mem_safe_read()
_mem_safe_write()
_mem_safe_write_to_text_section()
Those routines will return an error if the memory is not accessible rather
than potentially crash.
This implementation is based on the image's boundaries; thus it allows
read/write access to the data/bss/init sections and read access only to
the text/rodata sections. All other memory is considered invalid, even
if addressable. This includes the leftover from the RAM at the end of
the image, since there is no support for using it (e.g. there is no
dynamic allocator).
Change-Id: I6093688ecfd9b00d61be0fd453ada7bb8915c897
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Tweaks printk() internals to avoid unnecessary special case handling
of %% formatting.
Change-Id: I816b04b458f416a45fd06b5a7b3bebf27453c722
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
printk() now supports format strings containing %c.
Change-Id: I3de290db59cb1ae5a65a928842e7a74bbf8ecce8
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Add the Kconfig option for enabling the debug object tracing.
Change-Id: I56bf48568905604f6f50a06db2c5eaf4d91ded1d
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
Change all the Intel and Wind River code license from BSD-3 to Apache 2.
Change-Id: Id8be2c1c161a06ea8a0b9f38e17660e11dbb384b
Signed-off-by: Javier B Perez Hernandez <javier.b.perez.hernandez@linux.intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
do not use microkernel or nanokernel as the output binaries,
instead, use zephyr globally.
Also change the documentation to reflect this.
Change-Id: I8405761d1a0392c90cdfeec5c67d72eb4e5a76ff
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This change will allow the use of a custom linker script by
setting the config variable CUSTOM_LINKER_SCRIPT to a path outside
of Zephyr tree.
This is useful when an application needs to add sections into the
linker script and avoid having to change the script provided by
Zephyr.
Change-Id: Ibe31abcc8c0227e734f59bc26d3c8d5619951b29
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Change BOOTLOADER_UNKNOWN to be a top level option the depends on
X86_32.
Change-Id: I1a92324038b53234730cc7324f43413f8ac18827
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Remove the hard dependencies on EXPERIMENTAL symbol. Mark all the
symbols the relied on EXPERIMENTAL as EXPERIMENTAL in their prompt
Change-Id: I2779b0ed0776b3d510a8e2e44b35b83d7ad2377c
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Zephyr requires that the processor be in 32 bit protected mode on
entry.
Change-Id: I71792eeb154281881e8516a7a8a2291a52f83fc6
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Cleanup help text to remove references to non-existant features
Change-Id: I360cdf3de4d6132f1ffdde627004b730b3392299
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
BOOT_A20_ENABLE relies on the kernel being on a system that has a full
PC BIOS and requires that the A20 line be enabled to boot
correctly. None of the supported platforms satisfy either requirment.
Change-Id: I05805a050f5531de0348b60a4f0cb974e464b279
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
We are introducing other kinds of drivers which support a console
that isn't over a UART.
Change-Id: I0dddbdce958437b5709c5ab26252ed47d030413d
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This option adds optional libc functions that are not directly
used by the kernel but can be used for testing purposes.
This option is experimental.
Change-Id: Ia4dba718359c4f381047a5b52ebddb26d87ea75a
Signed-off-by: Anas Nashif <anas.nashif@intel.com>