summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--c-user/config/task-stack-alloc.rst36
-rw-r--r--common/conf.py17
-rw-r--r--common/latex.py7
-rw-r--r--common/rtemsdomain.py64
-rw-r--r--common/version.py5
-rw-r--r--common/waf.py26
6 files changed, 116 insertions, 39 deletions
diff --git a/c-user/config/task-stack-alloc.rst b/c-user/config/task-stack-alloc.rst
index 297c624..a779c9f 100644
--- a/c-user/config/task-stack-alloc.rst
+++ b/c-user/config/task-stack-alloc.rst
@@ -1,7 +1,7 @@
.. SPDX-License-Identifier: CC-BY-SA-4.0
.. Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
-.. Copyright (C) 1988, 2008 On-Line Applications Research Corporation (OAR)
+.. Copyright (C) 1988, 2008, 2021 On-Line Applications Research Corporation (OAR)
Task Stack Allocator Configuration
==================================
@@ -171,3 +171,37 @@ DESCRIPTION:
NOTES:
This configuration option may be used if a custom task stack allocator is
configured, see :ref:`CONFIGURE_TASK_STACK_ALLOCATOR`.
+
+.. index:: _CONFIGURE_TASK_STACK_ALLOCATOR_FOR_IDLE
+.. index:: IDLE task stack allocator
+
+.. _CONFIGURE_TASK_STACK_ALLOCATOR_FOR_IDLE:
+
+CONFIGURE_TASK_STACK_ALLOCATOR_FOR_IDLE
+---------------------------------------
+
+CONSTANT:
+ ``CONFIGURE_TASK_STACK_ALLOCATOR_FOR_IDLE``
+
+OPTION TYPE:
+ This configuration option is an initializer define.
+
+DEFAULT VALUE:
+ The default value is ``_Stack_Allocator_allocate_for_idle``, which
+ indicates that IDLE task stacks will be allocated from an area statically
+ reserved by `<rtems/confdefs.h>``.
+
+VALUE CONSTRAINTS:
+ The value of this configuration option shall be defined to a valid
+ function pointer of the type ``void *( *allocate )( uint32_t, size_t )``.
+
+DESCRIPTION:
+ The value of this configuration option is the address for the the
+ IDLE stack allocator allocate handler.
+
+NOTES:
+ This configuration option is independent of the other thread stack allocator
+ configuration options. It is assumed that any memory allocated for IDLE
+ task stacks will not be from the RTEMS Workspace or the memory statically
+ reserved by default.
+
diff --git a/common/conf.py b/common/conf.py
index 257bc4e..565e06d 100644
--- a/common/conf.py
+++ b/common/conf.py
@@ -1,4 +1,4 @@
-import version as rtems_version
+import datetime
extensions = [
"sphinx.ext.autodoc",
@@ -12,6 +12,8 @@ extensions = [
"rtemsdomain",
]
+bibtex_bibfiles = ['../common/refs.bib']
+
extlinks = {'release_path': ('https://ftp.rtems.org/pub/rtems/releases', None) }
# Add any paths that contain templates here, relative to this directory.
@@ -28,21 +30,17 @@ master_doc = 'index'
# General information about the project.
project = u'RTEMS Documentation Project'
-copyright = u'1988, 2020 RTEMS Project and contributors'
+copyright = u'1988, ' + str(datetime.datetime.now().year) + ' RTEMS Project and contributors'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
-version = rtems_version.version()
+#version = rtems_version.version()
# The full version, including alpha/beta/rc tags.
-release = rtems_version.string()
-
-major = rtems_version.major()
-minor = rtems_version.minor()
-revision = rtems_version.revision()
+#release = rtems_version.string()
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@@ -75,6 +73,9 @@ exclude_patterns = []
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
+# http://www.sphinx-doc.org/en/master/usage/configuration.html#confval-numfig
+numfig = True
+
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
diff --git a/common/latex.py b/common/latex.py
index a042510..17d3015 100644
--- a/common/latex.py
+++ b/common/latex.py
@@ -3,7 +3,6 @@
#
import os
-import platform
import re
package_test_preamble = ['\\newif\\ifsphinxKeepOldNames \\sphinxKeepOldNamestrue',
@@ -82,7 +81,11 @@ def tex_test(test):
def host_name():
uname = os.uname()
if uname[0] == 'Linux':
- distro = platform.dist()
+ try:
+ from distro import linux_distribution
+ except:
+ from platform import linux_distribution
+ distro = linux_distribution()
name = '%s/%s' % (uname[0], distro[0])
version = distro[1]
else:
diff --git a/common/rtemsdomain.py b/common/rtemsdomain.py
index 9b092a3..630f1e3 100644
--- a/common/rtemsdomain.py
+++ b/common/rtemsdomain.py
@@ -8,6 +8,8 @@ from sphinx.domains import Domain, ObjType, Index
from sphinx.util.nodes import make_refnode
from sphinx.util.docfields import Field, TypedField
+import version as rtems_version
+
"""
:r:bsp:`sparc/sis`
@@ -30,28 +32,28 @@ role_name = {
}
role_url = {
- "trac": ("Trac", "https://devel.rtems.org"),
- "devel": ("Developer Site", "https://devel.rtems.org"),
- "www": ("RTEMS Home", "https://www.rtems.org/"),
- "buildbot": ("Buildbot Instance", "https://buildbot.rtems.org/"),
- "builder": ("Builder Site", "https://builder.rtems.org/"),
- "docs": ("Documentation Site", "https://docs.rtems.org/"),
- "lists": ("Mailing Lists", "https://lists.rtems.org/"),
- "git": ("Git Repositories", "https://git.rtems.org/"),
- "ftp": ("FTP File Server", "https://ftp.rtems.org/"),
- "review": ("Gerrit Code Review", "https://review.rtems.org/"),
- "bugs": ("Bugs Database", "https://devel.rtems.org/wiki/Bugs/"),
- "gsoc": ("Google Summer of Code", "https://devel.rtems.org/wiki/GSoC/"),
- "socis": ("ESA SOCIS", "https://devel.rtems.org/wiki/SOCIS/")
+ "trac": ("Trac", "https://devel.rtems.org"),
+ "devel": ("Developer Site", "https://devel.rtems.org"),
+ "www": ("RTEMS Home", "https://www.rtems.org/"),
+ "buildbot": ("Buildbot Instance", "https://buildbot.rtems.org/"),
+ "builder": ("Builder Site", "https://builder.rtems.org/"),
+ "docs": ("Documentation Site", "https://docs.rtems.org/"),
+ "lists": ("Mailing Lists", "https://lists.rtems.org/"),
+ "git": ("Git Repositories", "https://git.rtems.org/"),
+ "ftp": ("FTP File Server", "https://ftp.rtems.org/"),
+ "review": ("Gerrit Code Review", "https://review.rtems.org/"),
+ "bugs": ("Bugs Database", "https://devel.rtems.org/wiki/Bugs/"),
+ "gsoc": ("Google Summer of Code", "https://devel.rtems.org/wiki/GSoC/"),
+ "socis": ("ESA SOCIS", "https://devel.rtems.org/wiki/SOCIS/")
}
role_list = {
- "announce": ("Announce Mailing List", "https://lists.rtems.org/mailman/listinfo/announce/"),
- "bugs": ("Bugs Mailing List", "https://lists.rtems.org/mailman/listinfo/bugs/"),
- "devel": ("Developers Mailing List", "https://lists.rtems.org/mailman/listinfo/devel/"),
- "build": ("Build Logs", "https://lists.rtems.org/mailman/listinfo/build"),
- "users": ("Users Mailing List", "https://lists.rtems.org/mailman/listinfo/users/"),
+ "announce": ("Announce Mailing List", "https://lists.rtems.org/mailman/listinfo/announce/"),
+ "bugs": ("Bugs Mailing List", "https://lists.rtems.org/mailman/listinfo/bugs/"),
+ "devel": ("Developers Mailing List", "https://lists.rtems.org/mailman/listinfo/devel/"),
+ "build": ("Build Logs", "https://lists.rtems.org/mailman/listinfo/build"),
+ "users": ("Users Mailing List", "https://lists.rtems.org/mailman/listinfo/users/"),
"vc": ("Version Control Mailing List", "https://lists.rtems.org/mailman/listinfo/vc/"),
}
@@ -119,7 +121,33 @@ class RTEMSDomain(Domain):
pass # XXX is this needed?
+def rtems_replace(app, docname, source):
+ dump = False
+ line = source[0]
+ for key in app.config.replacements:
+ line = line.replace(key, app.config.replacements[key])
+ source[0] = line
+
+replacements = {
+}
def setup(app):
+ app.add_config_value('rtems_major', str(app.config.overrides['rtems_major']), True)
+ app.add_config_value('rtems_minor', str(app.config.overrides['rtems_minor']), True)
+ app.add_config_value('rtems_revision', str(app.config.overrides['rtems_revision']), True)
+ major = str(app.config.overrides['rtems_major'])
+ minor = str(app.config.overrides['rtems_minor'])
+ revision = str(app.config.overrides['rtems_revision'])
+ if revision.isdigit():
+ majminrev = major + '.' + minor + '.' + revision
+ else:
+ majminrev = major + '.' + revision
+ replacements["@rtems-version@"] = str(app.config.overrides['version'])
+ replacements["@rtems-ver-major@"] = major
+ replacements["@rtems-ver-minor@"] = minor
+ replacements["@rtems-ver-revision@"] = revision
+ replacements["@rtems-ver-majminrev@"] = majminrev
+ app.add_config_value('replacements', replacements, True)
+ app.connect('source-read', rtems_replace)
app.add_domain(RTEMSDomain)
return {'version': "1.0", 'parallel_read_safe': True}
diff --git a/common/version.py b/common/version.py
index 281c880..bfe0e1b 100644
--- a/common/version.py
+++ b/common/version.py
@@ -111,6 +111,9 @@ def _pretty_day(ctx, date):
def get(ctx, rtems_major_version):
global _version
+ global _major
+ global _minor
+ global _revision
global _date
global _released
version = _version
@@ -184,7 +187,7 @@ def minor():
return _minor
def revision():
- return revision
+ return _revision
def date():
return _date
diff --git a/common/waf.py b/common/waf.py
index 7027eb6..0bd166a 100644
--- a/common/waf.py
+++ b/common/waf.py
@@ -181,13 +181,18 @@ def check_sphinx_extension(ctx, extension):
def run_sphinx(bld):
rst_node = bld.srcnode.make_node('testbuild/contents.rst')
rst_node.parent.mkdir()
- rst_node.write('.. COMMENT test sphinx\n')
+ rst_node.write('.. COMMENT test sphinx' + os.linesep)
+ bib_node = bld.srcnode.make_node('testbuild/refs.bib')
+ bib_node.write(os.linesep)
+ conf_node = bld.srcnode.make_node('testbuild/conf.py')
+ conf_node.write(os.linesep.join(["master_doc='contents'",
+ "bibtex_bibfiles = ['refs.bib']"]))
bld(rule = bld.kw['rule'], source = rst_node)
ctx.start_msg("Checking for '%s'" % (extension))
try:
ctx.run_build(fragment = 'xx',
- rule = "${BIN_SPHINX_BUILD} -b html -D extensions=%s -C . out" % (extension),
+ rule = "${BIN_SPHINX_BUILD} -b html -D extensions=%s -c . . out" % (extension),
build_fun = run_sphinx,
env = ctx.env)
except ctx.errors.ConfigurationError:
@@ -266,27 +271,27 @@ def cmd_configure(ctx):
ctx.fatal('Unsupported latex engine: %s' % (conf.latex_engine))
ctx.env.BUILD_PDF = 'yes'
- ctx.envBUILD_SINGLEHTML = 'no'
+ ctx.env.BUILD_SINGLEHTML = 'no'
if ctx.options.singlehtml:
check_inliner = not ctx.env.BIN_INLINER
if check_inliner:
- ctx.env.BUILD_SINGLEHTML = 'yes'
ctx.find_program("inliner", var = "BIN_INLINER", mandatory = False)
if not ctx.env.BIN_INLINER:
ctx.fatal("Node.js inliner is required install with 'npm install -g inliner' " +
"(https://github.com/remy/inliner)")
+ ctx.env.BUILD_SINGLEHTML = 'yes'
- ctx.envBUILD_PLANTUML = 'no'
+ ctx.env.BUILD_PLANTUML = 'no'
if ctx.options.plantuml:
check_plantuml = not ctx.env.BIN_PUML
if check_plantuml:
- ctx.env.BUILD_PLANTUML = 'yes'
ctx.find_program("puml", var = "BIN_PUML", mandatory = False)
if not ctx.env.BIN_PUML:
ctx.fatal("Node.js puml is required install with 'npm install -g node-plantuml' " +
"(https://www.npmjs.com/package/node-plantuml)")
+ ctx.env.BUILD_PLANTUML = 'yes'
- ctx.envBUILD_DITAA = 'no'
+ ctx.env.BUILD_DITAA = 'no'
if ctx.options.ditaa:
#
# We use DITAA via PlantUML
@@ -299,10 +304,10 @@ def cmd_configure(ctx):
"(https://www.npmjs.com/package/node-plantuml)")
check_ditaa = not ctx.env.BIN_DITAA
if check_ditaa:
- ctx.env.BUILD_DITAA = 'yes'
ctx.find_program("ditaa", var = "BIN_DITAA", mandatory = False)
if not ctx.env.BIN_DITAA:
ctx.fatal("DITAA not found, plase install")
+ ctx.env.BUILD_DITAA = 'yes'
def sources_exclude(ctx, sources):
exclude = sources.get('exclude', [])
@@ -335,12 +340,15 @@ def doc_pdf(ctx, source_dir, conf_dir, sources):
target = ctx.path.find_or_declare("%s/%s.tex" % (buildtype,
ctx.path.name))
)
+ env_latex = ctx.env.derive()
+ env_latex.TEXINPUTS = output_dir + ':'
ctx(
features = 'tex',
cwd = output_dir,
type = ctx.env.LATEX_CMD,
source = "%s/%s.tex" % (buildtype, ctx.path.name),
- prompt = 0
+ prompt = 0,
+ env = env_latex
)
ctx.install_files('${PREFIX}',
'%s/%s.pdf' % (buildtype, ctx.path.name),