Commit graph

18 commits

Author SHA1 Message Date
Gerard Marull-Paretas e81e92dbb9 boards: convert images to JPEG and reduce image size
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>
2022-08-29 10:18:18 +02:00
TLIG Dhaou d97b51d248 boards: arm: Enable the die-temp capabilities of ADC
-Enable the die-temp capabilities of ADC in each dts file of stm32
 boards where it is available.
-Execute the testcase running the samples/sensor/stm32_temp_sensor on each
 available target board.

Signed-off-by: TLIG Dhaou <dhaou.tlig-ext@st.com>
2022-08-24 11:35:45 +02:00
Francois Ramu 0c4e22c7d6 boards: stm32 adding dac features on nucleo boards nucleo_h743zi
It enables he DAC peripheral on the nucleo_h743zi target
boards from STMicroelectronics

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-03-10 13:30:06 -05:00
Jeremy Wood 9d346cc2b2 boards: arm: add can1 to nucleo_h743/753.
* Enable and configure can1 for nucleo_h743/753.
* Update documentation.

Signed-off-by: Jeremy Wood <jeremy@bcdevices.com>
2022-01-19 16:07:54 -05:00
Alexandre Bourdiol 092ffa5d1e boards: arm: nucleo_h743zi: full Arduino SPI support
Full Arduino SPI support for nucleo_h743zi

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-06-29 11:32:15 -04:00
Jeremy Wood a3edc4213f boards: arm: Add usbotg_fs to nucleo_h743 and nucleo_h753.
* Add usbotg_fs to nucleo_h743 and nucleo_h753.
* Add usb_device support to docs and yaml.

Signed-off-by: Jeremy Wood <jeremy@bcdevices.com>
2021-03-29 13:42:46 -04:00
Harry Jiang e287fd7ab2 boards: nucleo_h743zi: Add the IWDG support
This patch enable the independent watchdog support for the
NUCLEO-H743ZI board.

Signed-off-by: Harry Jiang <explora26@gmail.com>
2021-02-17 16:19:21 -06:00
Gerard Marull-Paretas 3a786c6179 boards: arm: nucleo_h743zi: enable backup SRAM
Enable backup SRAM DT node and update documentation.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2021-02-15 08:04:24 -05:00
Harry Jiang c37a0897f6 boards: nucleo_h743zi: Add SPI support
Add SPI1 support on the Arduino R3 connector

Signed-off-by: Harry Jiang <explora26@gmail.com>
2020-11-19 12:35:12 +01:00
Jeremy LOCHE d943d146c9 boards: nucleo_h743zi: enable ethernet support
Since STM32H7 series now have a working ethernet driver,
nucleo_h743zi ethernet can be enabled.

Signed-off-by: Jeremy LOCHE <lochejeremy@gmail.com>
2020-11-05 08:30:06 -06:00
Gerard Marull-Paretas ddd0a97206 boards: arm: nucleo_h743zi: add support for stm32cubeprogrammer runner
Add support for the recently introduced STM32CubeProgrammer runner.
Updated documentation to mention its availability as latest official
OpenOCD releases do not support H7 series.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-11-04 14:47:35 -06:00
Martin Jäger cd908d9085 boards: arm: stm32: use DT for ADC pinmux
Use the new DT facilities to configure ADC pinmux on all boards with
STM32 MCUs currently supporting the ADC.

Signed-off-by: Martin Jäger <martin@libre.solar>
2020-10-14 07:15:12 -05:00
Alexandre Bourdiol 1d4cb620f4 boards: arm: nucleo_h743zi: add rng support
Add RNG support to nucleo_h743zi board.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2020-08-27 14:14:35 +02:00
Gerard Marull-Paretas 5c454e955c boards: arm: nucleo_h743zi: enable ADC support
Enable ADC on Nucleo H743ZI board (ADC12 channel 15).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-05-07 23:01:59 -05:00
Gerard Marull-Paretas cf2131d7f9 boards: nucleo_h743zi: add pwm support
Enables PWM support using the built-in red LED. Tested with:

- samples/basic/blink_led
- samples/basic/fade_led

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-04-04 15:00:11 +02:00
Gerard Marull-Paretas bcdce1bd3a boards: arm: nucleo_h743zi: enable I2C support
Enable I2C support, including for the Arduino R3 connector.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-03-18 15:48:48 -05:00
Gerard Marull-Paretas de0c84a7c7 boards: nucleo_743zi: enable rtc and update docs
Enable RTC on NUCLEO-743ZI board so that counter examples can be used
off-the-shelf.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-03-16 10:23:13 -05:00
Gerard Marull-Paretas 34d5e2bca2 boards: arm: initial suport for NUCLEO-H743ZI
Only basic support has been added as some drivers require some fixes.
I have successfully tested the following examples:

- samples/hello_world
- samples/basic/blinky
- samples/basic/button

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-03-11 17:10:58 +01:00