New build profile and docs

Add a small build profile and general docs for build profiles.
pull/3005/head
Russ Butler 2016-10-12 18:38:11 -05:00
parent 9976738882
commit 0d51f18f02
2 changed files with 65 additions and 0 deletions

21
docs/build_profiles.md Normal file
View File

@ -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

44
tools/profiles/small.json Normal file
View File

@ -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"]
}
}