Skip to content

Commit 4198222

Browse files
authored
Merge pull request #3005 from c1728p9/build_profiles
New build profile and docs
2 parents a7a53b7 + 23af242 commit 4198222

File tree

5 files changed

+65
-41
lines changed

5 files changed

+65
-41
lines changed

docs/build_profiles.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Build Profiles
2+
Mbed 5.0 supports three primary build profiles, *default*, *debug* and *small*. When using
3+
the online compiler the *default* profile is used. When building from the command line
4+
the desired profile can be can be selected by adding the ```--profile <profile>```
5+
command line flag. Custom user defined profiles can also be specific by giving the path
6+
the the profile.
7+
8+
## Default profile
9+
* Small and fast code
10+
* Full error information - e.x. asserts have filename and line number
11+
* Hard to follow code flow when using a debugger
12+
13+
## Debug profile
14+
* Easy to step through code with a debugger
15+
* Full error information - e.x. asserts have filename and line number
16+
* Largest and slowest profile
17+
18+
## Small profile
19+
* Smallest profile and still fast
20+
* Minimal error information
21+
* Hard to follow code flow when using a debugger

tools/profiles/all-warnings.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

tools/profiles/nanolib.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

tools/profiles/save-asm.json

Lines changed: 0 additions & 23 deletions
This file was deleted.

tools/profiles/small.json

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"GCC_ARM": {
3+
"common": ["-c", "-Wall", "-Wextra",
4+
"-Wno-unused-parameter", "-Wno-missing-field-initializers",
5+
"-fmessage-length=0", "-fno-exceptions", "-fno-builtin",
6+
"-ffunction-sections", "-fdata-sections", "-funsigned-char",
7+
"-MMD", "-fno-delete-null-pointer-checks",
8+
"-fomit-frame-pointer", "-Os", "-DNDEBUG"],
9+
"asm": ["-x", "assembler-with-cpp"],
10+
"c": ["-std=gnu99"],
11+
"cxx": ["-std=gnu++98", "-fno-rtti", "-Wvla"],
12+
"ld": ["-Wl,--gc-sections", "-Wl,--wrap,main", "-Wl,--wrap,_malloc_r",
13+
"-Wl,--wrap,_free_r", "-Wl,--wrap,_realloc_r",
14+
"-Wl,--wrap,_calloc_r", "-Wl,--wrap,exit", "-Wl,--wrap,atexit"]
15+
},
16+
"ARM": {
17+
"common": ["-c", "--gnu", "-Ospace", "--split_sections",
18+
"--apcs=interwork", "--brief_diagnostics", "--restrict",
19+
"--multibyte_chars", "-O3", "-DNDEBUG"],
20+
"asm": [],
21+
"c": ["--md", "--no_depend_system_headers", "--c99", "-D__ASSERT_MSG"],
22+
"cxx": ["--cpp", "--no_rtti", "--no_vla"],
23+
"ld": []
24+
},
25+
"uARM": {
26+
"common": ["-c", "--gnu", "-Ospace", "--split_sections",
27+
"--apcs=interwork", "--brief_diagnostics", "--restrict",
28+
"--multibyte_chars", "-O3", "-D__MICROLIB",
29+
"--library_type=microlib", "-DMBED_RTOS_SINGLE_THREAD", "-DNDEBUG"],
30+
"asm": [],
31+
"c": ["--md", "--no_depend_system_headers", "--c99", "-D__ASSERT_MSG"],
32+
"cxx": ["--cpp", "--no_rtti", "--no_vla"],
33+
"ld": ["--library_type=microlib"]
34+
},
35+
"IAR": {
36+
"common": [
37+
"--no_wrap_diagnostics", "-e",
38+
"--diag_suppress=Pa050,Pa084,Pa093,Pa082", "-Ohz", "-DNDEBUG"],
39+
"asm": [],
40+
"c": ["--vla"],
41+
"cxx": ["--guard_calls", "--no_static_destruction"],
42+
"ld": ["--skip_dynamic_initialization", "--threaded_lib"]
43+
}
44+
}

0 commit comments

Comments
 (0)