Skip to content

fix board generator and related documentation when using core-release regarding missing file #5017

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions doc/faq/readme.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ How can I get some extra KBs in flash ?
* Using ``*printf()`` with floats is enabled by default. Some KBs of flash can
be saved by using the option ``--nofloat`` with the boards generator:

``./tools/boards.txt.py --nofloat --allgen``
``./tools/boards.txt.py --nofloat --boardsgen``

* Use the debug level option ``NoAssert-NDEBUG`` (in the Tools menu)

Expand All @@ -58,7 +58,7 @@ Why can't I use WPS ?
WPS is disabled by default, this offers an extra 4KB in ram/heap. To enable
WPS (and lose 4KB of useable ram), use this boards generator option:

``./tools/boards.txt.py --allowWPS --allgen``
``./tools/boards.txt.py --allowWPS --boardsgen``

`Read more <a05-board-generator.rst>`__.

Expand Down
6 changes: 6 additions & 0 deletions tools/boards.txt.py
Original file line number Diff line number Diff line change
Expand Up @@ -1294,6 +1294,9 @@ def package ():
checkdir()

if packagegen:
if not os.path.isfile(pkgfname):
print('will not regenerate non-existing file: ' + pkgfname)
return
pkgfname_read = pkgfname + '.orig'
if os.path.isfile(pkgfname_read):
os.remove(pkgfname_read)
Expand Down Expand Up @@ -1327,6 +1330,9 @@ def doc ():

# check if backup already exists
if not os.path.isfile("doc/boards.rst.orig"):
if not os.path.isfile("doc/boards.rst"):
print('will not regenerate non-existing file: doc/boards.rst')
return
os.rename("doc/boards.rst", "doc/boards.rst.orig")

realstdout = sys.stdout
Expand Down