Skip to content

Commit

Permalink
Add support for building C6 docs.
Browse files Browse the repository at this point in the history
Release 1.3.0
  • Loading branch information
ESP-Marius committed Sep 6, 2022
1 parent 9ea4593 commit d0e4942
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 14 deletions.
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" ] },
{ name: "latest", has_targets: true, supported_targets: [ "esp32", "esp32s2", "esp32s3", "esp32c3", "esp32h2", "esp8266", "esp32c2", "esp32c6" ] },
],
IDF_TARGETS: [
{ text: "ESP32", value: "esp32"},
Expand All @@ -13,5 +13,6 @@ var DOCUMENTATION_VERSIONS = {
{ text: "ESP32-H2", value: "esp32h2"},
{ text: "ESP8266", value: "esp8266"},
{ text: "ESP32C2", value: "esp32c2"},
{ text: "ESP32C6", value: "esp32c6"},
]
};
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 esp32s2 esp32c3 esp32s3 esp32h2 esp8266 esp32c2
build-docs -t esp32 esp32s2 esp32c3 esp32s3 esp32h2 esp8266 esp32c2 esp32c6
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']
idf_targets = ['esp8266', 'esp32', 'esp32s2', 'esp32s3', 'esp32c3', 'esp32h2', 'esp32c2', 'esp32c6']

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 --project-path src/
build-docs -t esp32 esp32s2 esp32c3 esp32s3 esp32h2 esp8266 esp32c2 esp32c6 --project-path src/
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.2.1
version = 1.3.0
author = Espressif
author_email = [email protected]
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 @@ -39,7 +39,7 @@


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

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 @@ -350,6 +350,7 @@ def setup_config_values(app, config):
'esp32c3': 'ESP32-C3',
'esp32h2': 'ESP32-H2',
'esp32c2': 'ESP32-C2',
'esp32c6': 'ESP32-C6',
}

app.add_config_value('idf_target_title_dict', idf_target_title_dict, 'env')
Expand Down
19 changes: 12 additions & 7 deletions src/esp_docs/esp_extensions/format_esp_target.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,52 +55,57 @@ class StringSubstituter:
"""
TARGET_NAMES = {'esp8266': 'ESP8266', 'esp32': 'ESP32', 'esp32s2': 'ESP32-S2',
'esp32s3': 'ESP32-S3', 'esp32c3': 'ESP32-C3', 'esp32c2': 'ESP32-C2',
'esp32h2': 'ESP32-H2'}
'esp32h2': 'ESP32-H2', 'esp32c6': 'ESP32-C6'}

TOOLCHAIN_PREFIX = {'esp8266': 'xtensa-lx106-elf',
'esp32': 'xtensa-esp32-elf',
'esp32s2': 'xtensa-esp32s2-elf',
'esp32s3': 'xtensa-esp32s3-elf',
'esp32c3': 'riscv32-esp-elf',
'esp32h2': 'riscv32-esp-elf',
'esp32c2': 'riscv32-esp-elf'
'esp32c2': 'riscv32-esp-elf',
'esp32c6': 'riscv32-esp-elf'
}

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

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',
'esp32s2': 'https://www.espressif.com/sites/default/files/documentation/esp32-s2_technical_reference_manual_en.pdf',
'esp32c3': 'https://www.espressif.com/sites/default/files/documentation/esp32-c3_technical_reference_manual_en.pdf',
'esp32s3': 'https://www.espressif.com/sites/default/files/documentation/esp32-s3_technical_reference_manual_en.pdf',
'esp32h2': '#',
'esp32c2': 'https://www.espressif.com/sites/default/files/documentation/esp8684_technical_reference_manual_en.pdf'}
'esp32c2': 'https://www.espressif.com/sites/default/files/documentation/esp8684_technical_reference_manual_en.pdf',
'esp32c6': 'https://www.espressif.com/sites/default/files/documentation/esp32-c6_technical_reference_manual_en.pdf'}

TRM_CN_URL = {'esp8266': 'https://www.espressif.com/sites/default/files/documentation/esp8266-technical_reference_cn.pdf',
'esp32': 'https://www.espressif.com/sites/default/files/documentation/esp32_technical_reference_manual_cn.pdf',
'esp32s2': 'https://www.espressif.com/sites/default/files/documentation/esp32-s2_technical_reference_manual_cn.pdf',
'esp32c3': 'https://www.espressif.com/sites/default/files/documentation/esp32-c3_technical_reference_manual_cn.pdf',
'esp32s3': 'https://www.espressif.com/sites/default/files/documentation/esp32-s3_technical_reference_manual_cn.pdf',
'esp32h2': '#',
'esp32c2': 'https://www.espressif.com/sites/default/files/documentation/esp8684_technical_reference_manual_cn.pdf'}
'esp32c2': 'https://www.espressif.com/sites/default/files/documentation/esp8684_technical_reference_manual_cn.pdf',
'esp32c6': 'https://www.espressif.com/sites/default/files/documentation/esp32-c6_technical_reference_manual_cn.pdf'}

DATASHEET_EN_URL = {'esp8266': 'https://www.espressif.com/sites/default/files/documentation/0a-esp8266ex_datasheet_en.pdf',
'esp32': 'https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf',
'esp32s2': 'https://www.espressif.com/sites/default/files/documentation/esp32-s2_datasheet_en.pdf',
'esp32c3': 'https://www.espressif.com/sites/default/files/documentation/esp32-c3_datasheet_en.pdf',
'esp32s3': 'https://www.espressif.com/sites/default/files/documentation/esp32-s3_datasheet_en.pdf',
'esp32h2': '#',
'esp32c2': 'https://www.espressif.com/sites/default/files/documentation/esp8684_datasheet_en.pdf'}
'esp32c2': 'https://www.espressif.com/sites/default/files/documentation/esp8684_datasheet_en.pdf',
'esp32c6': 'https://www.espressif.com/sites/default/files/documentation/esp32-c6_datasheet_en.pdf'}

DATASHEET_CN_URL = {'esp8266': 'https://www.espressif.com/sites/default/files/documentation/0a-esp8266ex_datasheet_cn.pdf',
'esp32': 'https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_cn.pdf',
'esp32s2': 'https://www.espressif.com/sites/default/files/documentation/esp32-s2_datasheet_cn.pdf',
'esp32c3': 'https://www.espressif.com/sites/default/files/documentation/esp32-c3_datasheet_cn.pdf',
'esp32s3': 'https://www.espressif.com/sites/default/files/documentation/esp32-s3_datasheet_cn.pdf',
'esp32h2': '#',
'esp32c2': 'https://www.espressif.com/sites/default/files/documentation/esp8684_datasheet_cn.pdf'}
'esp32c2': 'https://www.espressif.com/sites/default/files/documentation/esp8684_datasheet_cn.pdf',
'esp32c6': 'https://www.espressif.com/sites/default/files/documentation/esp32-c6_datasheet_cn.pdf'}

RE_PATTERN = re.compile(r'^\s*{IDF_TARGET_(\w+?):(.+?)}', re.MULTILINE)

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 @@ -16,7 +16,7 @@
project_path = os.path.abspath(os.path.dirname(__file__))

# Targets which needs --preview to build
PREVIEW_TARGETS = ['esp32h2', 'esp32c2']
PREVIEW_TARGETS = ['esp32h2', 'esp32c2', 'esp32c6']


def setup(app):
Expand Down

0 comments on commit d0e4942

Please sign in to comment.