Skip to content

Commit 737c5a9

Browse files
committed
Trap on errors when building with debug profile
Define MBED_TRAP_ERRORS_ENABLED to 1 for the debug profile so errors are obvious when building as debug.
1 parent ee2be3f commit 737c5a9

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

tools/profiles/debug.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"-fmessage-length=0", "-fno-exceptions", "-fno-builtin",
66
"-ffunction-sections", "-fdata-sections", "-funsigned-char",
77
"-MMD", "-fno-delete-null-pointer-checks",
8-
"-fomit-frame-pointer", "-O0", "-g3", "-DMBED_DEBUG"],
8+
"-fomit-frame-pointer", "-O0", "-g3", "-DMBED_DEBUG",
9+
"-DMBED_TRAP_ERRORS_ENABLED=1"],
910
"asm": ["-x", "assembler-with-cpp"],
1011
"c": ["-std=gnu99"],
1112
"cxx": ["-std=gnu++98", "-fno-rtti", "-Wvla"],
@@ -17,7 +18,8 @@
1718
"ARM": {
1819
"common": ["-c", "--gnu", "-Otime", "--split_sections",
1920
"--apcs=interwork", "--brief_diagnostics", "--restrict",
20-
"--multibyte_chars", "-O0", "-g", "-DMBED_DEBUG"],
21+
"--multibyte_chars", "-O0", "-g", "-DMBED_DEBUG",
22+
"-DMBED_TRAP_ERRORS_ENABLED=1"],
2123
"asm": [],
2224
"c": ["--md", "--no_depend_system_headers", "--c99", "-D__ASSERT_MSG"],
2325
"cxx": ["--cpp", "--no_rtti", "--no_vla"],
@@ -27,7 +29,8 @@
2729
"common": ["-c", "--gnu", "-Otime", "--split_sections",
2830
"--apcs=interwork", "--brief_diagnostics", "--restrict",
2931
"--multibyte_chars", "-O0", "-D__MICROLIB", "-g",
30-
"--library_type=microlib", "-DMBED_RTOS_SINGLE_THREAD", "-DMBED_DEBUG"],
32+
"--library_type=microlib", "-DMBED_RTOS_SINGLE_THREAD", "-DMBED_DEBUG",
33+
"-DMBED_TRAP_ERRORS_ENABLED=1"],
3134
"asm": [],
3235
"c": ["--md", "--no_depend_system_headers", "--c99", "-D__ASSERT_MSG"],
3336
"cxx": ["--cpp", "--no_rtti", "--no_vla"],
@@ -36,7 +39,8 @@
3639
"IAR": {
3740
"common": [
3841
"--no_wrap_diagnostics", "-e",
39-
"--diag_suppress=Pa050,Pa084,Pa093,Pa082", "-On", "-r", "-DMBED_DEBUG"],
42+
"--diag_suppress=Pa050,Pa084,Pa093,Pa082", "-On", "-r", "-DMBED_DEBUG",
43+
"-DMBED_TRAP_ERRORS_ENABLED=1"],
4044
"asm": [],
4145
"c": ["--vla"],
4246
"cxx": ["--guard_calls", "--no_static_destruction"],

0 commit comments

Comments
 (0)