This adds the support jedec configuration to run
the jedec sample application. So target board can display
the content of the quad-NOR flash.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Twister now supports using YAML lists for all fields that were written
as space-separated lists. Used twister_to_list.py script. Some artifacts
on string length are due to how ruamel dumps content.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
As both C and C++ standards require applications running under an OS to
return 'int', adapt that for Zephyr to align with those standard. This also
eliminates errors when building with clang when not using -ffreestanding,
and reduces the need for compiler flags to silence warnings for both clang
and gcc.
Most of these changes were automated using coccinelle with the following
script:
@@
@@
- void
+ int
main(...) {
...
- return;
+ return 0;
...
}
Approximately 40 files had to be edited by hand as coccinelle was unable to
fix them.
Signed-off-by: Keith Packard <keithp@keithp.com>
Add the config for testing the jesd jedec sfdp of the octoNor flash
on the stm32h573 disco kit.
The external octoflash is the macronix MX25LM51245 or micron.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Fix all line-length errors detected by yamllint:
yamllint -f parsable -c .yamllint $( find -regex '.*\.y[a]*ml' ) | \
grep '(line-length)'
Using a limit is set to 100 columns, not touching the commandlines in
GitHub workflows (at least for now).
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Added configuration which allows to test the sample using SPI_NOR
driver instead of NRF_QSPI driver.
SPI_NOR driver is generic, so nice to add possibility to check
how it is working.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
This adds the support jedec configuration to run
the jedec sample application. So target boards can display
the content of the octo-NOR flash
of the stm32u585 and stm32l562 or stm32h735 disco boards.
The sfdp-bfp table is provided as example (overlay file),
to run this sample on the stm32l562e_dk platform.
It has to be defined in the deviceTree "in cases were runtime
retrieval of SFDP data is not desired."
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Moving the SDFP table property from the sample to the device tree
of the stm32l562e_dk disco kit.
The MX52lm51245 Nor octoflash mounted on this boarddoes not
provide its own internal SFDP parameters.
With this patch, the SFDP table is given by the board DTS.
So that the stm32 ospi driver can initialized the NOR octoflash
correctly with the parameter from that property instead of
relying on the nor octoflash.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
This adds the support jedec configuration to run
the jedec sample application. So target boards can display
the content of the octo-NOR flash
of the stm32u585 and stm32l562 or stm32h735 disco boards.
The sfdp-bfp table is provided as example (overlay file),
to run this sample on the stm32l562e_dk platform.
It has to be defined in the deviceTree "in cases were runtime
retrieval of SFDP data is not desired."
Signed-off-by: Francois Ramu <francois.ramu@st.com>
As of today <zephyr/zephyr.h> is 100% equivalent to <zephyr/kernel.h>.
This patch proposes to then include <zephyr/kernel.h> instead of
<zephyr/zephyr.h> since it is more clear that you are including the
Kernel APIs and (probably) nothing else. <zephyr/zephyr.h> sounds like a
catch-all header that may be confusing. Most applications need to
include a bunch of other things to compile, e.g. driver headers or
subsystem headers like BT, logging, etc.
The idea of a catch-all header in Zephyr is probably not feasible
anyway. Reason is that Zephyr is not a library, like it could be for
example `libpython`. Zephyr provides many utilities nowadays: a kernel,
drivers, subsystems, etc and things will likely grow. A catch-all header
would be massive, difficult to keep up-to-date. It is also likely that
an application will only build a small subset. Note that subsystem-level
headers may use a catch-all approach to make things easier, though.
NOTE: This patch is **NOT** removing the header, just removing its usage
in-tree. I'd advocate for its deprecation (add a #warning on it), but I
understand many people will have concerns.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Many device pointers are initialized at compile and never changed. This
means that the device pointer can be constified (immutable).
Automated using:
```
perl -i -pe 's/const struct device \*(?!const)(.*)= DEVICE/const struct
device *const $1= DEVICE/g' **/*.c
```
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
In order to bring consistency in-tree, migrate all samples to the use
the new prefix <zephyr/...>. Note that the conversion has been scripted:
```python
from pathlib import Path
import re
EXTENSIONS = ("c", "h", "cpp", "rst")
for p in Path(".").glob("samples/**/*"):
if not p.is_file() or p.suffix and p.suffix[1:] not in EXTENSIONS:
continue
content = ""
with open(p) as f:
for line in f:
m = re.match(r"^(.*)#include <(.*)>(.*)$", line)
if (m and
not m.group(2).startswith("zephyr/") and
(Path(".") / "include" / "zephyr" / m.group(2)).exists()):
content += (
m.group(1) +
"#include <zephyr/" + m.group(2) +">" +
m.group(3) + "\n"
)
else:
content += line
with open(p, "w") as f:
f.write(content)
```
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Kconfig options now belong to the Kconfig domain, therefore, the
:kconfig:option: role needs to be used.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The HiFive Unleashed and HiFive Unmatched boards do not enable the
SPI0 controller that the flash is connected to. This test will not
build on these platforms because SPI0 bus controller is missing.
Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net>
Move to CMake 3.20.0.
At the Toolchain WG it was decided to move to CMake 3.20.0.
The main reason for increasing CMake version is better toolchain
support.
Better toolchain support is added in the following CMake versions:
- armclang, CMake 3.15
- Intel oneAPI, CMake 3.20
- IAR, CMake 3.15 and 3.20
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
By default the hifive1 board doesn't enable the SPI controller that
the flash is on. As such this test will not build on that platform
due to lack of a missing SPI bus controller device.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
DW16 provides information on mechanisms to enter and exit 4-Byte
address modes, returning the device to reset state, and how to
manipulate the values in the first status register.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
DW15 provides information on entry and exit from QSPI modes. In
particular, it specifies whether and how the status register must be
updated for this feature.
Add a JESD216 devicetree property for the Quad Enable Requirements
value.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Now that device_api attribute is unmodified at runtime, as well as all
the other attributes, it is possible to switch all device driver
instance to be constant.
A coccinelle rule is used for this:
@r_const_dev_1
disable optional_qualifier
@
@@
-struct device *
+const struct device *
@r_const_dev_2
disable optional_qualifier
@
@@
-struct device * const
+const struct device *
Fixes#27399
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
An off-by-one error calculating the number of parameter headers caused
a third table to not be displayed.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
A zero value in the NPH header indicates one parameter header.
Increase the upper bound to process the last provided table.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
GPIO CSn active level transitioned from default active-low to
devicetree defined since the last time this sample was verified,
requiring the flags parameter in devicetree to be updated.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>