Skip to content
Snippets Groups Projects
Verified Commit bb4ad001 authored by rahix's avatar rahix
Browse files

build: Add an option for debug-output


Signed-off-by: default avatarRahix <rahix@rahix.de>
parent 1077f2b5
No related branches found
No related tags found
No related merge requests found
Pipeline #1759 passed
......@@ -58,6 +58,19 @@ can build with *ninja*.
.. note::
If you intend to work on the firmware, you might want to enable debug output
in the firmware version you build. You can do this by calling ``meson``
with additional arguments. To do so, add you meson arguments to the
bootstrap call like this:
.. code-block:: shell-session
./bootstrap.sh -Ddebug_prints=true
(``debug_prints`` is an option provided by our firmware)
.. warning::
Our build-system contains a few workarounds around short-comings in meson.
These workarounds might break on some setups which we did not yet test. If
this is the case for you, please open an issue in our `issue tracker`_!
......
......@@ -5,7 +5,7 @@ cd "$(dirname "$0")"
test -d build/ && rm -r build/
git submodule update --init ./lib/micropython
meson --cross-file card10-cross.ini build/
meson --cross-file card10-cross.ini build/ "$@"
set +x
......
......@@ -21,6 +21,13 @@ add_global_arguments(
language: 'c',
)
if get_option('debug_prints')
add_global_arguments(
['-DLOG_ENABLE_DEBUG=1'],
language: 'c',
)
endif
add_global_link_arguments(
'-Wl,--gc-sections',
'-lm',
......
option(
'debug_prints',
type: 'boolean',
value: false,
description: 'Whether to print debug messages on the serial console'
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment