mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-08-03 07:54:35 +00:00
In some cases especially for on-going development & debugging of real application it might be useful to load and run not from flash but from RAM in that case there's one catch: we cannot reset the board after loading memory with our app. That's because: a) RAM we use might be either cleared on reset or might enter unpredictable state with portion of previously loaded data being corrupted. b) Reset vector most probably still point to ROM/flash and so our current application won't be executed on reset. So instead of "run reset" command of OpenOCD we'll use "resume 0x12345678". Where 0x12345678 is our application's entry-point (which BTW may very well not match beginning of the .text section or link base). Now to extract the entry-point we need our application's zephyr.elf and since we already have a requirement for Elf we may use it for loading because OpenOCD does it perfectly fine moreover automatically detecting loaded image type (binary, hex, Elf etc). And to use that nice feature just add "--use-elf" to west's command-line for boards that use "openocd" runner. Like that: ----------->8-------------- west flash --use-elf ----------->8-------------- Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
66 lines
1.6 KiB
YAML
66 lines
1.6 KiB
YAML
# Copyright (c) 2020 Linaro Limited.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
name: Documentation GitHub Workflow
|
|
|
|
on: [pull_request]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Update PATH for west
|
|
run: |
|
|
echo "::add-path::$HOME/.local/bin"
|
|
|
|
- name: checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: install-pkgs
|
|
run: |
|
|
sudo apt-get install -y ninja-build doxygen
|
|
|
|
- name: cache-pip
|
|
uses: actions/cache@v1
|
|
with:
|
|
path: ~/.cache/pip
|
|
key: ${{ runner.os }}-doc-pip
|
|
|
|
- name: install-pip
|
|
run: |
|
|
pip3 install setuptools
|
|
pip3 install 'breathe>=4.9.1' 'docutils>=0.14' \
|
|
'sphinx>=1.7.5' sphinx_rtd_theme sphinx-tabs \
|
|
sphinxcontrib-svg2pdfconverter 'west>=0.6.2'
|
|
pip3 install pyelftools
|
|
|
|
- name: west setup
|
|
run: |
|
|
west init -l . || true
|
|
|
|
- name: build-docs
|
|
run: |
|
|
source zephyr-env.sh
|
|
make htmldocs
|
|
tar cvf htmldocs.tar --directory=./doc/_build html
|
|
|
|
- name: upload-build
|
|
uses: actions/upload-artifact@master
|
|
continue-on-error: True
|
|
with:
|
|
name: htmldocs.tar
|
|
path: htmldocs.tar
|
|
|
|
- name: check-warns
|
|
run: |
|
|
if [ -s doc/_build/doc.warnings ]; then
|
|
docwarn=$(cat doc/_build/doc.warnings)
|
|
docwarn="${docwarn//'%'/'%25'}"
|
|
docwarn="${docwarn//$'\n'/'%0A'}"
|
|
docwarn="${docwarn//$'\r'/'%0D'}"
|
|
# We treat doc warnings as errors
|
|
echo "::error file=doc.warnings::$docwarn"
|
|
exit 1
|
|
fi
|