-
Notifications
You must be signed in to change notification settings - Fork 3k
New build profile and docs #3005
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Build Profiles | ||
Mbed 5.0 supports three primary build profiles, *default*, *debug* and *small*. When using | ||
the online compiler the *default* profile is used. When building from the command line | ||
the desired profile can be can be selected by adding the ```--profile <profile>``` | ||
command line flag. Custom user defined profiles can also be specific by giving the path | ||
the the profile. | ||
|
||
## Default profile | ||
* Small and fast code | ||
* Full error information - e.x. asserts have filename and line number | ||
* Hard to follow code flow when using a debugger | ||
|
||
## Debug profile | ||
* Easy to step through code with a debugger | ||
* Full error information - e.x. asserts have filename and line number | ||
* Largest and slowest profile | ||
|
||
## Small profile | ||
* Smallest profile and still fast | ||
* Minimal error information | ||
* Hard to follow code flow when using a debugger |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"GCC_ARM": { | ||
"common": ["-c", "-Wall", "-Wextra", | ||
"-Wno-unused-parameter", "-Wno-missing-field-initializers", | ||
"-fmessage-length=0", "-fno-exceptions", "-fno-builtin", | ||
"-ffunction-sections", "-fdata-sections", "-funsigned-char", | ||
"-MMD", "-fno-delete-null-pointer-checks", | ||
"-fomit-frame-pointer", "-Os", "-DNDEBUG"], | ||
"asm": ["-x", "assembler-with-cpp"], | ||
"c": ["-std=gnu99"], | ||
"cxx": ["-std=gnu++98", "-fno-rtti", "-Wvla"], | ||
"ld": ["-Wl,--gc-sections", "-Wl,--wrap,main", "-Wl,--wrap,_malloc_r", | ||
"-Wl,--wrap,_free_r", "-Wl,--wrap,_realloc_r", | ||
"-Wl,--wrap,_calloc_r", "-Wl,--wrap,exit", "-Wl,--wrap,atexit"] | ||
}, | ||
"ARM": { | ||
"common": ["-c", "--gnu", "-Ospace", "--split_sections", | ||
"--apcs=interwork", "--brief_diagnostics", "--restrict", | ||
"--multibyte_chars", "-O3", "-DNDEBUG"], | ||
"asm": [], | ||
"c": ["--md", "--no_depend_system_headers", "--c99", "-D__ASSERT_MSG"], | ||
"cxx": ["--cpp", "--no_rtti", "--no_vla"], | ||
"ld": [] | ||
}, | ||
"uARM": { | ||
"common": ["-c", "--gnu", "-Ospace", "--split_sections", | ||
"--apcs=interwork", "--brief_diagnostics", "--restrict", | ||
"--multibyte_chars", "-O3", "-D__MICROLIB", | ||
"--library_type=microlib", "-DMBED_RTOS_SINGLE_THREAD", "-DNDEBUG"], | ||
"asm": [], | ||
"c": ["--md", "--no_depend_system_headers", "--c99", "-D__ASSERT_MSG"], | ||
"cxx": ["--cpp", "--no_rtti", "--no_vla"], | ||
"ld": ["--library_type=microlib"] | ||
}, | ||
"IAR": { | ||
"common": [ | ||
"--no_wrap_diagnostics", "-e", | ||
"--diag_suppress=Pa050,Pa084,Pa093,Pa082", "-Ohz", "-DNDEBUG"], | ||
"asm": [], | ||
"c": ["--vla"], | ||
"cxx": ["--guard_calls", "--no_static_destruction"], | ||
"ld": ["--skip_dynamic_initialization", "--threaded_lib"] | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at this, I am missing which build is what usually SDK has "release build", are
small
anddefault
to be considered release ("Hard to follow code flow when using a debugger") . Or to state that optimizations are enabled, that would be a good hint for users?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what you are asking here. Everything by default will be using the
default
profile. TheDefault
andSmall
profiles are for ideal for release builds, but even a debug build could be released if the slower speed and larger code size isn't a problem.