Skip to content

Commit

Permalink
Merge branch 'feature/c5_support' into 'master'
Browse files Browse the repository at this point in the history
Add support for building ESP32-C5 docs

See merge request espressif/esp-docs!107
  • Loading branch information
ESP-Marius committed Jan 31, 2024
2 parents 88f872d + f231839 commit f036a33
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 16 deletions.
6 changes: 0 additions & 6 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,6 @@ build_example_basic:
- .build_template
variables:
DOCS_DIR: $CI_PROJECT_DIR/examples/basic
artifacts:
when: always
paths:
- $DOCS_DIR/_build/*/*/html/*
- $DOCS_DIR/_build/*/*/*.txt
expire_in: 4 days
script:
- cd "$DOCS_DIR"
- ./build_example.sh
Expand Down
3 changes: 2 additions & 1 deletion examples/basic/_static/docs_version.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var DOCUMENTATION_VERSIONS = {
supported_targets: [ "esp32" ]
},
VERSIONS: [
{ name: "latest", has_targets: true, supported_targets: [ "esp32", "esp32s2", "esp32s3", "esp32c3", "esp32h2", "esp8266", "esp32c2", "esp32c6", "esp32p4" ] },
{ name: "latest", has_targets: true, supported_targets: [ "esp32", "esp32s2", "esp32s3", "esp32c3", "esp32h2", "esp8266", "esp32c2", "esp32c5", "esp32c6", "esp32p4" ] },
],
IDF_TARGETS: [
{ text: "ESP32", value: "esp32"},
Expand All @@ -13,6 +13,7 @@ var DOCUMENTATION_VERSIONS = {
{ text: "ESP32-H2", value: "esp32h2"},
{ text: "ESP8266", value: "esp8266"},
{ text: "ESP32C2", value: "esp32c2"},
{ text: "ESP32C5", value: "esp32c5"},
{ text: "ESP32C6", value: "esp32c6"},
{ text: "ESP32P4", value: "esp32p4"},
]
Expand Down
2 changes: 1 addition & 1 deletion examples/basic/build_example.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
build-docs -t esp32 esp8266 esp32c2 esp32c3 esp32c6 esp32h2 esp32p4
build-docs -t esp32 esp8266 esp32c2 esp32c3 esp32c6 esp32h2 esp32p4 esp32c5
2 changes: 1 addition & 1 deletion examples/basic/conf_common.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from esp_docs.conf_docs import * # noqa: F403,F401

languages = ['en', 'zh_CN']
idf_targets = ['esp8266', 'esp32', 'esp32s2', 'esp32s3', 'esp32c3', 'esp32h2', 'esp32c2', 'esp32c6', 'esp32p4']
idf_targets = ['esp8266', 'esp32', 'esp32s2', 'esp32s3', 'esp32c3', 'esp32h2', 'esp32c2', 'esp32c5', 'esp32c6', 'esp32p4']

extensions += ['sphinx_copybutton',
'sphinxcontrib.wavedrom',
Expand Down
2 changes: 1 addition & 1 deletion examples/doxygen/build_example.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
build-docs -t esp32 esp32s2 esp32c3 esp32s3 esp32h2 esp8266 esp32c2 esp32c6 esp32p4 --project-path src/
build-docs -t esp32 esp32s2 esp32c3 esp32s3 esp32h2 esp8266 esp32c2 esp32c5 esp32c6 esp32p4 --project-path src/
2 changes: 1 addition & 1 deletion examples/doxygen/conf_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
project_slug = 'esp-idf'
versions_url = 'https://dl.espressif.com/dl/esp-idf/idf_versions.js'

idf_targets = ['esp32', 'esp32s2', 'esp32s3', 'esp32c2', 'esp32c3', 'esp32c6', 'esp32h2', 'esp32p4']
idf_targets = ['esp32', 'esp32s2', 'esp32s3', 'esp32c2', 'esp32c3', 'esp32c5', 'esp32c6', 'esp32h2', 'esp32p4']
languages = ['en', 'zh_CN']
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = esp-docs
version = 1.7.2
version = 1.8.0
author = Espressif
author_email = marius.vikhammer@espressif.com
description = Documentation building package used at Espressif
Expand Down
2 changes: 1 addition & 1 deletion src/esp_docs/build_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@


LANGUAGES = ['en', 'zh_CN']
TARGETS = ['esp8266', 'esp32', 'esp32s2', 'esp32s3', 'esp32c3', 'esp32h2', 'esp32c2', 'esp32c6', 'esp32p4']
TARGETS = ['esp8266', 'esp32', 'esp32s2', 'esp32s3', 'esp32c3', 'esp32h2', 'esp32c2', 'esp32c6', 'esp32c5', 'esp32p4']

SPHINX_WARN_LOG = 'sphinx-warning-log.txt'
SPHINX_SANITIZED_LOG = 'sphinx-warning-log-sanitized.txt'
Expand Down
1 change: 1 addition & 0 deletions src/esp_docs/conf_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ def setup_config_values(app, config):
'esp32c3': 'ESP32-C3',
'esp32h2': 'ESP32-H2',
'esp32c2': 'ESP32-C2',
'esp32c5': 'ESP32-C5',
'esp32c6': 'ESP32-C6',
'esp32p4': 'ESP32-P4',
}
Expand Down
11 changes: 9 additions & 2 deletions src/esp_docs/esp_extensions/format_esp_target.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ class StringSubstituter:
"""
TARGET_NAMES = {'esp8266': 'ESP8266', 'esp32': 'ESP32', 'esp32s2': 'ESP32-S2',
'esp32s3': 'ESP32-S3', 'esp32c3': 'ESP32-C3', 'esp32c2': 'ESP32-C2',
'esp32h2': 'ESP32-H2', 'esp32c6': 'ESP32-C6', 'esp32p4': 'ESP32-P4'}
'esp32h2': 'ESP32-H2', 'esp32c5': 'ESP32-C5', 'esp32c6': 'ESP32-C6',
'esp32p4': 'ESP32-P4'}

TOOLCHAIN_PREFIX = {'esp8266': 'xtensa-lx106-elf',
'esp32': 'xtensa-esp32-elf',
Expand All @@ -70,13 +71,15 @@ class StringSubstituter:
'esp32c3': 'riscv32-esp-elf',
'esp32h2': 'riscv32-esp-elf',
'esp32c2': 'riscv32-esp-elf',
'esp32c5': 'riscv32-esp-elf',
'esp32c6': 'riscv32-esp-elf',
'esp32p4': 'riscv32-esp-elf'
}

CONFIG_PREFIX = {'esp8266': 'esp8266', 'esp32': 'ESP32', 'esp32s2': 'ESP32S2',
'esp32s3': 'ESP32S3', 'esp32c3': 'ESP32C3', 'esp32h2': 'ESP32H2',
'esp32c2': 'ESP32C2', 'esp32c6': 'ESP32C6', 'esp32p4': 'ESP32P4'}
'esp32c2': 'ESP32C2', 'esp32c5': 'ESP32C5', 'esp32c6': 'ESP32C6',
'esp32p4': 'ESP32P4'}

TRM_EN_URL = {'esp8266': 'https://www.espressif.com/sites/default/files/documentation/esp8266-technical_reference_en.pdf',
'esp32': 'https://www.espressif.com/sites/default/files/documentation/esp32_technical_reference_manual_en.pdf',
Expand All @@ -85,6 +88,7 @@ class StringSubstituter:
'esp32s3': 'https://www.espressif.com/sites/default/files/documentation/esp32-s3_technical_reference_manual_en.pdf',
'esp32h2': 'https://www.espressif.com/sites/default/files/documentation/esp32-h2_technical_reference_manual_en.pdf',
'esp32c2': 'https://www.espressif.com/sites/default/files/documentation/esp8684_technical_reference_manual_en.pdf',
'esp32c5': 'https://www.espressif.com/sites/default/files/documentation/esp32-c5_technical_reference_manual_en.pdf',
'esp32c6': 'https://www.espressif.com/sites/default/files/documentation/esp32-c6_technical_reference_manual_en.pdf',
'esp32p4': 'https://www.espressif.com/sites/default/files/documentation/esp32-p4_technical_reference_manual_en.pdf'}

Expand All @@ -95,6 +99,7 @@ class StringSubstituter:
'esp32s3': 'https://www.espressif.com/sites/default/files/documentation/esp32-s3_technical_reference_manual_cn.pdf',
'esp32h2': 'https://www.espressif.com/sites/default/files/documentation/esp32-h2_technical_reference_manual_cn.pdf',
'esp32c2': 'https://www.espressif.com/sites/default/files/documentation/esp8684_technical_reference_manual_cn.pdf',
'esp32c5': 'https://www.espressif.com/sites/default/files/documentation/esp32-c5_technical_reference_manual_cn.pdf',
'esp32c6': 'https://www.espressif.com/sites/default/files/documentation/esp32-c6_technical_reference_manual_cn.pdf',
'esp32p4': 'https://www.espressif.com/sites/default/files/documentation/esp32-p4_technical_reference_manual_cn.pdf'}

Expand All @@ -105,6 +110,7 @@ class StringSubstituter:
'esp32s3': 'https://www.espressif.com/sites/default/files/documentation/esp32-s3_datasheet_en.pdf',
'esp32h2': 'https://www.espressif.com/sites/default/files/documentation/esp32-h2_datasheet_en.pdf',
'esp32c2': 'https://www.espressif.com/sites/default/files/documentation/esp8684_datasheet_en.pdf',
'esp32c5': 'https://www.espressif.com/sites/default/files/documentation/esp32-c5_datasheet_en.pdf',
'esp32c6': 'https://www.espressif.com/sites/default/files/documentation/esp32-c6_datasheet_en.pdf',
'esp32p4': 'https://www.espressif.com/sites/default/files/documentation/esp32-p4_datasheet_en.pdf'}

Expand All @@ -115,6 +121,7 @@ class StringSubstituter:
'esp32s3': 'https://www.espressif.com/sites/default/files/documentation/esp32-s3_datasheet_cn.pdf',
'esp32h2': 'https://www.espressif.com/sites/default/files/documentation/esp32-h2_datasheet_cn.pdf',
'esp32c2': 'https://www.espressif.com/sites/default/files/documentation/esp8684_datasheet_cn.pdf',
'esp32c5': 'https://www.espressif.com/sites/default/files/documentation/esp32-c5_datasheet_cn.pdf',
'esp32c6': 'https://www.espressif.com/sites/default/files/documentation/esp32-c6_datasheet_cn.pdf',
'esp32p4': 'https://www.espressif.com/sites/default/files/documentation/esp32-p4_datasheet_cn.pdf'}

Expand Down
2 changes: 1 addition & 1 deletion src/esp_docs/idf_extensions/build_system/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
project_path = os.path.abspath(os.path.dirname(__file__))

# Targets which needs --preview to build
PREVIEW_TARGETS = ['esp32p4']
PREVIEW_TARGETS = ['esp32p4', 'esp32c5']


class IdfBuilder():
Expand Down

0 comments on commit f036a33

Please sign in to comment.