Skip to content

Commit 1a8844e

Browse files
authored
Merge pull request #8887 from deepikabhavnani/uVision_fix
Adding debugger awarness with Keil MDK
2 parents 53bb986 + 347acd1 commit 1a8844e

File tree

6 files changed

+17
-9
lines changed

6 files changed

+17
-9
lines changed

rtos/TARGET_CORTEX/mbed_rtos_rtx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ osThreadAttr_t _main_thread_attr;
5151
#define MBED_CONF_APP_MAIN_STACK_SIZE MBED_CONF_RTOS_MAIN_THREAD_STACK_SIZE
5252
#endif
5353
MBED_ALIGN(8) char _main_stack[MBED_CONF_APP_MAIN_STACK_SIZE];
54-
mbed_rtos_storage_thread_t _main_obj;
54+
mbed_rtos_storage_thread_t _main_obj __attribute__((section(".bss.os.thread.cb")));
5555

5656
osMutexId_t singleton_mutex_id;
5757
mbed_rtos_storage_mutex_t singleton_mutex_obj;

rtos/TARGET_CORTEX/rtx5/RTX/Source/rtx_lib.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,12 @@ static osRtxThread_t os_idle_thread_cb \
122122
__attribute__((section(".bss.os.thread.cb")));
123123

124124
// Idle Thread Stack
125+
#if defined (__CC_ARM)
126+
static uint64_t os_idle_thread_stack[OS_IDLE_THREAD_STACK_SIZE/8];
127+
#else
125128
static uint64_t os_idle_thread_stack[OS_IDLE_THREAD_STACK_SIZE/8] \
126129
__attribute__((section(".bss.os.thread.stack")));
127-
130+
#endif
128131
// Idle Thread Attributes
129132
static const osThreadAttr_t os_idle_thread_attr = {
130133
#if defined(OS_IDLE_THREAD_NAME)
@@ -178,9 +181,13 @@ __attribute__((section(".data.os.timer.mpi"))) =
178181
static osRtxThread_t os_timer_thread_cb \
179182
__attribute__((section(".bss.os.thread.cb")));
180183

184+
#if defined (__CC_ARM)
185+
static uint64_t os_timer_thread_stack[OS_TIMER_THREAD_STACK_SIZE/8];
186+
#else
181187
// Timer Thread Stack
182188
static uint64_t os_timer_thread_stack[OS_TIMER_THREAD_STACK_SIZE/8] \
183189
__attribute__((section(".bss.os.thread.stack")));
190+
#endif
184191

185192
// Timer Thread Attributes
186193
static const osThreadAttr_t os_timer_thread_attr = {

tools/importer/cmsis_importer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,8 @@
152152
"1752803626865147dca92f30a39cef8d04581736",
153153
"6a6e3ac0ebab1a6b6aa08d0928702c79562acee9",
154154
"fb354752eb69403ad503c8e53da67da6483776d6",
155-
"d3f7abdb7c109517e6a71daed8bae63ad6436afc"
155+
"d3f7abdb7c109517e6a71daed8bae63ad6436afc",
156+
"ba92372b8d754cf65917a560cd27e4088548de0e"
156157
]
157158
}
158159

tools/profiles/debug.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"asm": [],
2525
"c": ["-D__ASSERT_MSG", "-std=gnu99"],
2626
"cxx": ["-fno-rtti", "-std=gnu++98"],
27-
"ld": ["--verbose", "--remove", "--show_full_path", "--legacyalign"]
27+
"ld": ["--verbose", "--remove", "--show_full_path", "--legacyalign", "--keep=os_cb_sections"]
2828
},
2929
"ARM": {
3030
"common": ["-c", "--gnu", "-Otime", "--split_sections",
@@ -34,7 +34,7 @@
3434
"asm": [],
3535
"c": ["--md", "--no_depend_system_headers", "--c99", "-D__ASSERT_MSG"],
3636
"cxx": ["--cpp", "--no_rtti", "--no_vla"],
37-
"ld": ["--show_full_path"]
37+
"ld": ["--show_full_path", "--keep=os_cb_sections"]
3838
},
3939
"uARM": {
4040
"common": ["-c", "--gnu", "-Otime", "--split_sections",

tools/profiles/develop.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"asm": [],
2424
"c": ["-D__ASSERT_MSG", "-std=gnu99"],
2525
"cxx": ["-fno-rtti", "-std=gnu++98"],
26-
"ld": ["--show_full_path", "--legacyalign"]
26+
"ld": ["--show_full_path", "--legacyalign", "--keep=os_cb_sections"]
2727
},
2828
"ARM": {
2929
"common": ["-c", "--gnu", "-Otime", "--split_sections",
@@ -32,7 +32,7 @@
3232
"asm": [],
3333
"c": ["--md", "--no_depend_system_headers", "--c99", "-D__ASSERT_MSG"],
3434
"cxx": ["--cpp", "--no_rtti", "--no_vla"],
35-
"ld": ["--show_full_path"]
35+
"ld": ["--show_full_path", "--keep=os_cb_sections"]
3636
},
3737
"uARM": {
3838
"common": ["-c", "--gnu", "-Otime", "--split_sections",

tools/profiles/release.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"asm": [],
2424
"c": ["-D__ASSERT_MSG", "-std=gnu99"],
2525
"cxx": ["-fno-rtti", "-std=gnu++98"],
26-
"ld": ["--show_full_path", "--legacyalign"]
26+
"ld": ["--show_full_path", "--legacyalign", "--keep=os_cb_sections"]
2727
},
2828
"ARM": {
2929
"common": ["-c", "--gnu", "-Ospace", "--split_sections",
@@ -32,7 +32,7 @@
3232
"asm": [],
3333
"c": ["--md", "--no_depend_system_headers", "--c99", "-D__ASSERT_MSG"],
3434
"cxx": ["--cpp", "--no_rtti", "--no_vla"],
35-
"ld": ["--show_full_path"]
35+
"ld": ["--show_full_path", "--keep=os_cb_sections"]
3636
},
3737
"uARM": {
3838
"common": ["-c", "--gnu", "-Ospace", "--split_sections",

0 commit comments

Comments
 (0)