Skip to content

Commit 30f18b6

Browse files
author
deepikabhavnani
committed
Add flag "-DMBED_TRAP_ERRORS_ENABLED=1" to develop profile as well
printf was called from ISR when sleep tracing was enabled. Issue was captured only in debug profile. Printf is not allowed from ISR context and issues like this should be trapped in case of debug profiles as well.
1 parent 8547f26 commit 30f18b6

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

tools/profiles/develop.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
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", "-Os", "-g1"],
8+
"-fomit-frame-pointer", "-Os", "-g1", "-DMBED_TRAP_ERRORS_ENABLED=1"],
99
"asm": ["-x", "assembler-with-cpp"],
1010
"c": ["-std=gnu99"],
1111
"cxx": ["-std=gnu++98", "-fno-rtti", "-Wvla"],
@@ -19,7 +19,7 @@
1919
"-Wno-armcc-pragma-push-pop", "-Wno-armcc-pragma-anon-unions",
2020
"-DMULADDC_CANNOT_USE_R7", "-fdata-sections",
2121
"-fno-exceptions", "-MMD", "-D_LIBCPP_EXTERN_TEMPLATE(...)=",
22-
"-fshort-enums", "-fshort-wchar"],
22+
"-fshort-enums", "-fshort-wchar", "-DMBED_TRAP_ERRORS_ENABLED=1"],
2323
"asm": [],
2424
"c": ["-D__ASSERT_MSG", "-std=gnu99"],
2525
"cxx": ["-fno-rtti", "-std=gnu++98"],
@@ -28,7 +28,7 @@
2828
"ARM": {
2929
"common": ["-c", "--gnu", "-Otime", "--split_sections",
3030
"--apcs=interwork", "--brief_diagnostics", "--restrict",
31-
"--multibyte_chars", "-O3"],
31+
"--multibyte_chars", "-O3", "-DMBED_TRAP_ERRORS_ENABLED=1"],
3232
"asm": [],
3333
"c": ["--md", "--no_depend_system_headers", "--c99", "-D__ASSERT_MSG"],
3434
"cxx": ["--cpp", "--no_rtti", "--no_vla"],
@@ -38,7 +38,8 @@
3838
"common": ["-c", "--gnu", "-Otime", "--split_sections",
3939
"--apcs=interwork", "--brief_diagnostics", "--restrict",
4040
"--multibyte_chars", "-O3", "-D__MICROLIB",
41-
"--library_type=microlib", "-DMBED_RTOS_SINGLE_THREAD"],
41+
"--library_type=microlib", "-DMBED_RTOS_SINGLE_THREAD",
42+
"-DMBED_TRAP_ERRORS_ENABLED=1"],
4243
"asm": [],
4344
"c": ["--md", "--no_depend_system_headers", "--c99", "-D__ASSERT_MSG"],
4445
"cxx": ["--cpp", "--no_rtti", "--no_vla"],
@@ -47,7 +48,8 @@
4748
"IAR": {
4849
"common": [
4950
"--no_wrap_diagnostics", "-e",
50-
"--diag_suppress=Pa050,Pa084,Pa093,Pa082", "-Oh", "--enable_restrict"],
51+
"--diag_suppress=Pa050,Pa084,Pa093,Pa082", "-Oh", "--enable_restrict",
52+
"-DMBED_TRAP_ERRORS_ENABLED=1"],
5153
"asm": [],
5254
"c": ["--vla", "--diag_suppress=Pe546"],
5355
"cxx": ["--guard_calls", "--no_static_destruction"],

0 commit comments

Comments
 (0)