mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #12336 from SeppoTakalo/disable_writebuf
Disable write buffering on debug builds.pull/12354/head
commit
d063902ee8
|
@ -71,17 +71,6 @@ void mbed_start_application(uintptr_t address)
|
|||
powerdown_scb(address);
|
||||
mbed_mpu_manager_deinit();
|
||||
|
||||
#ifdef MBED_DEBUG
|
||||
// Configs to make debugging easier
|
||||
#ifdef SCnSCB_ACTLR_DISDEFWBUF_Msk
|
||||
// Disable write buffer to make BusFaults (eg write to ROM via NULL pointer) precise.
|
||||
// Possible on Cortex-M3 and M4, not on M0, M7 or M33.
|
||||
// Would be less necessary if ROM was write-protected in MPU to give a
|
||||
// precise MemManage exception.
|
||||
SCnSCB->ACTLR |= SCnSCB_ACTLR_DISDEFWBUF_Msk;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
sp = *((void **)address + 0);
|
||||
pc = *((void **)address + 1);
|
||||
start_new_application(sp, pc);
|
||||
|
|
|
@ -77,6 +77,16 @@ void mbed_copy_nvic(void)
|
|||
|
||||
void mbed_init(void)
|
||||
{
|
||||
#ifdef MBED_DEBUG
|
||||
// Configs to make debugging easier
|
||||
#ifdef SCnSCB_ACTLR_DISDEFWBUF_Msk
|
||||
// Disable write buffer to make BusFaults (eg write to ROM via NULL pointer) precise.
|
||||
// Possible on Cortex-M3 and M4, not on M0, M7 or M33.
|
||||
// Would be less necessary if ROM was write-protected in MPU to give a
|
||||
// precise MemManage exception.
|
||||
SCnSCB->ACTLR |= SCnSCB_ACTLR_DISDEFWBUF_Msk;
|
||||
#endif
|
||||
#endif
|
||||
mbed_copy_nvic();
|
||||
mbed_sdk_init();
|
||||
#if DEVICE_USTICKER && MBED_CONF_TARGET_INIT_US_TICKER_AT_BOOT
|
||||
|
|
|
@ -73,6 +73,16 @@ uint32_t mbed_stack_isr_size = 0;
|
|||
|
||||
void mbed_init(void)
|
||||
{
|
||||
#ifdef MBED_DEBUG
|
||||
// Configs to make debugging easier
|
||||
#ifdef SCnSCB_ACTLR_DISDEFWBUF_Msk
|
||||
// Disable write buffer to make BusFaults (eg write to ROM via NULL pointer) precise.
|
||||
// Possible on Cortex-M3 and M4, not on M0, M7 or M33.
|
||||
// Would be less necessary if ROM was write-protected in MPU to give a
|
||||
// precise MemManage exception.
|
||||
SCnSCB->ACTLR |= SCnSCB_ACTLR_DISDEFWBUF_Msk;
|
||||
#endif
|
||||
#endif
|
||||
mbed_mpu_manager_init();
|
||||
mbed_cpy_nvic();
|
||||
mbed_sdk_init();
|
||||
|
|
Loading…
Reference in New Issue