The boards folder uses ~142.8 MB, being the largest in the repository.
This is due mostly to board images, which are in most cases not
optimized for web content. This patch tries to address this problem by
converting all pictures to JPEG (quality 75) and by adjusting its size
up to 750 px (the width of the documentation content). Images that
specified a fixed width in rst files are converted down to that value
instead.
With this patch, folder goes down to ~53.5 MB from 142.8 MB (-~63%).
Note that this patch introduces a new set of binary files to git
history, though (bad).
The process has been automated using this quickly crafted Python script:
```python
from pathlib import Path
import re
import subprocess
def process(doc, image, image_jpeg, size):
subprocess.run(
(
f"convert {image}"
"-background white -alpha remove -alpha off -quality 75"
f"-resize {size}\> {image_jpeg}"
),
shell=True,
check=True,
cwd=doc.parent,
)
if image != image_jpeg:
(doc.parent / image).unlink()
for doc in Path(".").glob("boards/**/*.rst"):
with open(doc) as f:
content = ""
image = None
for line in f:
m = re.match(r"^(\s*)\.\. (image|figure):: (.*)$", line)
if m:
if image:
process(doc, image, image_jpeg, size)
image = Path(m.group(3))
if image.suffix not in (".jpg", ".jpeg", ".png"):
content += line
image = None
continue
image_jpeg = image.parent / (image.stem + ".jpg")
size = 750
content += (
f"{m.group(1)}.. {m.group(2)}:: {image_jpeg}\n"
)
elif image:
m = re.match(r"\s*:height:\s*[0-9]+.*$", line)
if m:
continue
m = re.match(r"\s*:width:\s*([0-9]+).*$", line)
if m:
size = min(int(m.group(1)), size)
continue
content += line
if line == "\n":
process(doc, image, image_jpeg, size)
image = None
else:
content += line
with open(doc, "w") as f:
f.write(content)
```
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
All IEEE 802.15.4 tests/samples use DT-based filter now, so the
ieee802154 tag can be deleted.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Enable the IEEE 802.15.4 radio node on all boards that listed
'ieee802154' in the supported field.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Update docs for boards ubx_evkninab3_nrf52840 and ubx_evkninab4_nrf52833
to use DEVICE_DT_GET as we phase out "label" usage and thus the
device_get_binding() reference wouldn't work.
Signed-off-by: Kumar Gala <galak@kernel.org>
Add alias to boards with watchdog enabled to facilitate the
move of samples/drivers/watchdog to use DT_ALIAS.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
... and "nordic,nrf-pwm" binding:
- use channel indexes instead of pin numbers in `pwms` properties that
define PWM LEDs
- add the period and flags cells to `pwms` properties in all PWM LED
definitions; use the commonly used period of 20 ms (giving 50 Hz)
as a default setting
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Prevent "unique_unit_address_if_enabled" warnings from being reported
for nRF52 Series SoCs, where certain nodes need to be enabled with
the same base addresses. These can be (depending on a given SoC):
- power@40000000 & clock@40000000
- power@40000000 & clock@40000000 & bprot@40000000
- acl@4001e000 & flash-controller@4001e000
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
The jlink executable expects a fully qualified IC name, and not just the
family. Apply to all Nordic boards.
Fixes#37294
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
According to Kconfig guidelines, boolean prompts must not start with
"Enable...". The following command has been used to automate the changes
in this patch:
sed -i "s/bool \"[Ee]nables\? \(\w\)/bool \"\U\1/g" **/Kconfig*
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This sentence ("Other hardware features are not supported by the
Zephyr kernel."), which could be found in a high number of boards
documentation, is misleading on two levels:
- peripheral support is not a kernel business
- in most of cases, features are actually supported but not enabled.
Fix this.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
USB devicetree nodes in Zephyr have different names,
mostly derived from the designations in data sheets.
Add zephyr_udc0 (USB device controller) nodelabel to
specific USB node to allow generic USB sample to be build.
Follow up on commit b4242a8 ("boards: add USB node aliases")
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
It is enough to set the USB_DEVICE_STACK option to enable
USB device support. Also the option USB_NRFX is not necessary
here because it is selected in drivers/usb/device/Kconfig anyway.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Add support for u-blox EVK-NINA-B4, which uses the nRF52833
This board is similar to the nrf52833dk_nrf52833, though it
uses a u-blox NINA-B40x openCPU module with DC-DC support
included.
Simplified pwm LED aliases
Corrected LED assignments for red, green, and blue
Addressed review comments (spi & gpio 0 0)
Tested with blinky, button, and Bluetooth peripheral_hr
Signed-off-by: Bob Recny <bob.recny@u-blox.com>