File tree Expand file tree Collapse file tree 3 files changed +20
-11
lines changed
rtos/source/TARGET_CORTEX Expand file tree Collapse file tree 3 files changed +20
-11
lines changed Original file line number Diff line number Diff line change @@ -71,17 +71,6 @@ void mbed_start_application(uintptr_t address)
71
71
powerdown_scb (address );
72
72
mbed_mpu_manager_deinit ();
73
73
74
- #ifdef MBED_DEBUG
75
- // Configs to make debugging easier
76
- #ifdef SCnSCB_ACTLR_DISDEFWBUF_Msk
77
- // Disable write buffer to make BusFaults (eg write to ROM via NULL pointer) precise.
78
- // Possible on Cortex-M3 and M4, not on M0, M7 or M33.
79
- // Would be less necessary if ROM was write-protected in MPU to give a
80
- // precise MemManage exception.
81
- SCnSCB -> ACTLR |= SCnSCB_ACTLR_DISDEFWBUF_Msk ;
82
- #endif
83
- #endif
84
-
85
74
sp = * ((void * * )address + 0 );
86
75
pc = * ((void * * )address + 1 );
87
76
start_new_application (sp , pc );
Original file line number Diff line number Diff line change @@ -77,6 +77,16 @@ void mbed_copy_nvic(void)
77
77
78
78
void mbed_init (void )
79
79
{
80
+ #ifdef MBED_DEBUG
81
+ // Configs to make debugging easier
82
+ #ifdef SCnSCB_ACTLR_DISDEFWBUF_Msk
83
+ // Disable write buffer to make BusFaults (eg write to ROM via NULL pointer) precise.
84
+ // Possible on Cortex-M3 and M4, not on M0, M7 or M33.
85
+ // Would be less necessary if ROM was write-protected in MPU to give a
86
+ // precise MemManage exception.
87
+ SCnSCB -> ACTLR |= SCnSCB_ACTLR_DISDEFWBUF_Msk ;
88
+ #endif
89
+ #endif
80
90
mbed_copy_nvic ();
81
91
mbed_sdk_init ();
82
92
#if DEVICE_USTICKER && MBED_CONF_TARGET_INIT_US_TICKER_AT_BOOT
Original file line number Diff line number Diff line change @@ -73,6 +73,16 @@ uint32_t mbed_stack_isr_size = 0;
73
73
74
74
void mbed_init (void )
75
75
{
76
+ #ifdef MBED_DEBUG
77
+ // Configs to make debugging easier
78
+ #ifdef SCnSCB_ACTLR_DISDEFWBUF_Msk
79
+ // Disable write buffer to make BusFaults (eg write to ROM via NULL pointer) precise.
80
+ // Possible on Cortex-M3 and M4, not on M0, M7 or M33.
81
+ // Would be less necessary if ROM was write-protected in MPU to give a
82
+ // precise MemManage exception.
83
+ SCnSCB -> ACTLR |= SCnSCB_ACTLR_DISDEFWBUF_Msk ;
84
+ #endif
85
+ #endif
76
86
mbed_mpu_manager_init ();
77
87
mbed_cpy_nvic ();
78
88
mbed_sdk_init ();
You can’t perform that action at this time.
0 commit comments