This patch removes the gen_idt subdirectory from the clean target as
this directory is no longer in use due to recent changes to the way the
gen_idt is generated.
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Using __hash__() is unpredictable and produces different results for
different python processes. This has been causing unnecessary rebuilds
due to changing header files at the top of the dependency tree.
Just use _GEN_OFFSETS_H_.
Jira: ZEP-2457
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
In some cases, it's possible to share a DTC overlay across multiple
boards (one example is when the overlay just has to choose a
zephyr,code-partition and set it to a well-known value).
To support this, only go looking around in DTC_OVERLAY_DIR if
DTC_OVERLAY_FILE is not already given.
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
This addition would catch tests being added or modified and would run
those tests with --all and catch issues with non default board
configurations before they get merged into the tree.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
For CONFIG_UART_PIPE_ON_DEV_NAME the chosen property is
"zephyr,uart-pipe" not ""zephyr,bt-mon-uart".
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
We have the same pattern for how we map a chosen property to the device
label that generates a Kconfig define. Rather than duplicating the code
over and over again, lets just iterate over a list of defines and chosen
properties. This also provides us a list we can use in the future to
special case handle the defines associated with names.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This patch fixes following error of python script.
TypeError: cannot use a string pattern on a bytes-like object
Jira: ZEP-2290
Signed-off-by: Punit Vara <punit.vara@intel.com>
We now create a special IA hardware task for handling
double faults. This has a known good stack so that if
the kernel tries to push stack data onto an unmapped page,
we don't triple-fault and reset the system.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
We will need this for stack memory protection scenarios
where a writable GDT with Task State Segment descriptors
will be used. The addresses of the TSS segments cannot be
put in the GDT via preprocessor magic due to architecture
requirments that the address be split up into different
fields in the segment descriptor.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This has one use-case: configuring the double-fault #DF
exception handler to do an IA task switch to a special
IA task with a known good stack, such that we can dump
diagnostic information and then panic.
Will be used for stack overflow detection in kernel mode,
as otherwise the CPU will triple-fault and reset.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This is one less host tool we have to compile for every build,
and makes the build tools more portable across host OSes.
The code is also much simpler to maintain.
Issue: ZEP-2063
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
By having this as a Python script rather than a host executable, this
should simplify the build process on non-Unix platforms.
With this change, pyelftools is now required to build Zephyr. Please
consult the getting started documentation for your host platform for
installation instructions.
Jira: ZEP-2062
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
List all required modules in one file and just call pip with this
file to install all needed modules instead of listing them
individually.
Added gitlint and pyocd and other required packages to the list.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Current version of extract_dts_include.py assumes end subnode
of pinctrl is 'pin'. This fix allows having different names.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
def_label generation was assuming node names always have address
(eg: rcc@40023800). This was generating incorrect def_labels
when node names doen't have address (eg: pin-controller)
With this fix, this case is now taken into account
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
patch uses chosen property zephyr,bt-uart, zephyr,uart-pipe
and zephyr,bt-mon-uart to determine the uart instance to be
used for bluetooth,uart_pipe and bluetooth_monitor and generate
appropriate configs.
Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
Commands for objdump and nm where hardcoded in size_report
script, which failed on MacOS as it tried to use ones from
Xcode. Fixed the script to pick the right objdump and nm
from the toolchain being used to build the application.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Its possible that #size-cells is 0 (ie i2c bus). So we should handle
either #address-cells or #size-cells being 0 in extract_reg_prop. This
means that the reg property in reduced map will end up being an integer,
so we need to convert it to a list with one element. We also need to
not output any address-cell or size-cell related info if the respective
cell is 0.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
We can use the chosen property "zephyr,console" to determine what uart
should be used as the console and find its name to generate a define for
CONFIG_UART_CONSOLE_ON_DEV_NAME.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Verbose output now prints the value of the raw data provided by
soc.c file. The page directories are printed with the correct
address ranges for each required region.
Updated the page table number calculation and also updated other
calculations which use this information.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
It's useful to see what original memory regions were configured
in code via the MMU_BOOT_REGION() macros.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Upcoming memory protection features will be placing some additional
constraints on kernel objects:
- They need to reside in memory owned by the kernel and not the
application
- Certain kernel object validation schemes will require some run-time
initialization of all kernel objects before they can be used.
Per Ben these initializer macros were never intended to be public. It is
not forbidden to use them, but doing so requires care: the memory being
initialized must reside in kernel space, and extra runtime
initialization steps may need to be peformed before they are fully
usable as kernel objects. In particular, kernel subsystems or drivers
whose objects are already in kernel memory may still need to use these
macros if they define kernel objects as members of a larger data
structure.
It is intended that application developers instead use the
K_<object>_DEFINE macros, which will automatically put the object in the
right memory and add them to a section which can be iterated over at
boot to complete initiailization.
There was no K_WORK_DEFINE() macro for creating struct k_work objects,
this is now added.
k_poll_event and k_poll_signal are intended to be instatiated from
application memory and have not been changed.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
If the depends_on has more than one item we need to match all of those
dependencies in the supported list.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The script failed on certain corner cases. Whenever the memory region
was falling on the PDE boundary, the glitch was causing incorrect
PTE to be generated.
JIRA: ZEP-2328
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
This patch fixes issues with the IRQ definitions when using
the interrupt-names property in the DT entry.
Signed-off-by: Andy Gross <andy.gross@linaro.org>
This script was assuming that all XIP data copied sections
were contiguous. However with application memory partitioning
enabled, this is not the case; in between the kernel data sections
and the app data sections will be the kernel's BSS and noinit.
As a quick fix, reset the last section compared if we encounter
the kernel's BSS section.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Makefiles which start QEMU (make run) have been changed to operate
off of the QEMU_INSTANCE variable. QEMU_INSTANCE is simply appended
to the pid and sock file names. This makes us able to run multiple
QEMU Zephyr instances of the same sample.
Signed-off-by: John Andersen <john.s.andersen@intel.com>
Some testcases can only be built with certain toolchains. Instead of
using filters, add support for toolchain keyword which enables
whitelisting and exclusion.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Put the results of the config-sanitycheck into their own log so we can
see warnings from that stage of the build.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
If we have more than one board of a given type we need to be able to
specify the board_id to select which specific board that the pyocd
command should target. Introduce an environment variable PYOCD_BOARD_ID
to we can set that will get passed to the pyocd command that needs it.
Here's an example:
$ make -C samples/hello_world/ BOARD=frdm_k64f flash PYOCD_BOARD_ID=1234
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
We define a variable to pickup a default for the bossa binary, however
we weren't using it. Lets do so now.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The build_on_all tag in synchronisation sample was resetting the
supplied arguemnt for filtering platforms.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit changes the syntax of the testcase files and changes the
behaviour and configuration of the sanitycheck script.
To avoid having multiple files with different syntax for boards,
samples, tests; this change unifies the syntax and uses YAML instead of
INI.
We maintain the current keywords used in the old syntax and maintain the
flexibility of adding tests with different configuration by using YAML
list configuration. On top of that, the following features are added:
- We now scan for board configurations in the boards directory and look
for a YAML file describing a board and how it should be tested. This
eliminates the need for listing boards per architecture in a special ini
file under scripts/.
- We define hardware information charachterstics in the board YAML file
that helps identifying if a certain test should run on that board or
not. For example, we can specify the available RAM in the board and
filter tests that would require more RAM than the board can handle.
- Boards can be set as default for testing meaning that we always run a
test case (build and run of possible) when sanitycheck is called without
any arguments. Previously this was done only by selecting the first
board defined for a specific architecture.
- Tests can be configured to run on all possible boards, this is to make
sure we always build some basic tests for all boards to catch issues
with the core kernel features.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This flashes Zephyr at 0x1000: that's where the first stage bootloader,
part of the ESP32 ROM, expects to find an "image header".
The second-stage bootloader, part of ESP-IDF, isn't used by the Zephyr
port. However, the bootloader can be used if desired; please refer to
the ESP-IDF documentation on how to set up partitions tables and use
the bootloader.
The following environment variables will affect the ESP32 flashing
process:
Variable Default value
ESP_DEVICE /dev/ttyUSB0
ESP_BAUD_RATE 921600
ESP_FLASH_SIZE detect
ESP_FLASH_FREQ 40m
ESP_FLASH_MODE dio
ESP_TOOL espidf
It's impossible to determine which serial port the ESP32 board is
connected to, as it uses a generic RS232-USB converter. The default of
/dev/ttyUSB0 is provided as that's often the assigned name on a Linux
machine without any other such converters.
The baud rate of 921600bps is recommended. If experiencing issues when
flashing, try halving the value a few times (460800, 230400, 115200,
etc). It might be necessary to change the flash frequency or the flash
mode; please refer to the esptool documentation for guidance on these
settings.
If ${ESP_TOOL} is set to "espidf", the esptool.py script found within
ESP-IDF will be used. Otherwise, this variable is handled as a path to
the tool.
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
Three environment variables must be set to use this variant:
export ZEPHYR_GCC_VARIANT="espressif"
export ESP_IDF_PATH=/path/to/esp-idf
export ESPRESSIF_TOOLCHAIN_PATH=/path/to/xtensa-esp32-elf/
ESP-IDF is the SDK provided by Espressif. It contains, among other things,
the HAL and header files for registers and ROM functions used by the Zephyr
port. At this stage, with the exception of the HAL library, none of the
binary blobs provided by ESP-IDF are used. This can be obtained directly
from Espressif, at <https://github.com/espressif/esp-idf>.
Instructions on how to obtain the toolchain are detailed in the README for
ESP-IDF.
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
This patch fixes the LOAD_OFFSET calculation to use the actual offset
of the partition. This assumes the reg entry in the DTS for that
partition is in relative offset to the flash base address.
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Moving the net_buf_pool objects to a dedicated area lets us access
them by array offset into this area instead of directly by pointer.
This helps reduce the size of net_buf objects by 4 bytes.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>