Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
card10
firmware
Commits
bb4ad001
Verified
Commit
bb4ad001
authored
5 years ago
by
rahix
Browse files
Options
Downloads
Patches
Plain Diff
build: Add an option for debug-output
Signed-off-by:
Rahix
<
rahix@rahix.de
>
parent
1077f2b5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#1759
passed
5 years ago
Stage: build
Stage: deploy
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Documentation/how-to-build.rst
+13
-0
13 additions, 0 deletions
Documentation/how-to-build.rst
bootstrap.sh
+1
-1
1 addition, 1 deletion
bootstrap.sh
meson.build
+7
-0
7 additions, 0 deletions
meson.build
meson_options.txt
+7
-0
7 additions, 0 deletions
meson_options.txt
with
28 additions
and
1 deletion
Documentation/how-to-build.rst
+
13
−
0
View file @
bb4ad001
...
...
@@ -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`_!
...
...
This diff is collapsed.
Click to expand it.
bootstrap.sh
+
1
−
1
View file @
bb4ad001
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
meson.build
+
7
−
0
View file @
bb4ad001
...
...
@@ -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'
,
...
...
This diff is collapsed.
Click to expand it.
meson_options.txt
0 → 100644
+
7
−
0
View file @
bb4ad001
option
(
'debug_prints'
,
type
:
'boolean'
,
value
:
false
,
description
:
'Whether to print debug messages on the serial console'
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment