mirror of https://github.com/wolfSSL/wolfBoot.git
Move interrupt disable to do_boot.
parent
f7fed89f27
commit
d747afb780
|
@ -433,14 +433,7 @@ void hal_init(void)
|
||||||
|
|
||||||
void hal_prepare_boot(void)
|
void hal_prepare_boot(void)
|
||||||
{
|
{
|
||||||
/* make sure interrupts are disabled */
|
|
||||||
#if defined(__CCRX__)
|
|
||||||
clrpsw_i();
|
|
||||||
#elif defined(__GNUC__)
|
|
||||||
__builtin_rx_clrpsw('I');
|
|
||||||
#elif defined(__ICCRX__)
|
|
||||||
__disable_interrupt();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int hal_flash_init(void)
|
int hal_flash_init(void)
|
||||||
|
|
|
@ -58,6 +58,16 @@ void do_boot(const uint32_t *app_offset)
|
||||||
void (*app_entry)(void);
|
void (*app_entry)(void);
|
||||||
uint32_t app_sp;
|
uint32_t app_sp;
|
||||||
|
|
||||||
|
/* Make sure interrupts are disabled */
|
||||||
|
/* Application may assume interrupts are disabled */
|
||||||
|
#if defined(__CCRX__)
|
||||||
|
clrpsw_i();
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
__builtin_rx_clrpsw('I');
|
||||||
|
#elif defined(__ICCRX__)
|
||||||
|
__disable_interrupt();
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef BOOT_ENTRY_OFFSET
|
#ifdef BOOT_ENTRY_OFFSET
|
||||||
/* add byte offset to uint32_t */
|
/* add byte offset to uint32_t */
|
||||||
app_offset += BOOT_ENTRY_OFFSET/sizeof(uint32_t);
|
app_offset += BOOT_ENTRY_OFFSET/sizeof(uint32_t);
|
||||||
|
|
Loading…
Reference in New Issue