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)
7171 powerdown_scb (address );
7272 mbed_mpu_manager_deinit ();
7373
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-
8574 sp = * ((void * * )address + 0 );
8675 pc = * ((void * * )address + 1 );
8776 start_new_application (sp , pc );
Original file line number Diff line number Diff line change @@ -77,6 +77,16 @@ void mbed_copy_nvic(void)
7777
7878void mbed_init (void )
7979{
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
8090 mbed_copy_nvic ();
8191 mbed_sdk_init ();
8292#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;
7373
7474void mbed_init (void )
7575{
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
7686 mbed_mpu_manager_init ();
7787 mbed_cpy_nvic ();
7888 mbed_sdk_init ();
You can’t perform that action at this time.
0 commit comments