sn32 boards: support bootloader jump
This commit is contained in:
parent
ead342d090
commit
c704bbd34d
|
@ -44,6 +44,7 @@ const PALConfig pal_default_config = {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int flag __attribute__((section(".flag"))) __attribute__((__used__)) = 0xAAAA5555;
|
static int flag __attribute__((section(".flag"))) __attribute__((__used__)) = 0xAAAA5555;
|
||||||
|
extern void enter_bootloader_mode_if_requested(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Early initialization code.
|
* @brief Early initialization code.
|
||||||
|
@ -51,6 +52,7 @@ static int flag __attribute__((section(".flag"))) __attribute__((__used__)) = 0x
|
||||||
* and before any other initialization.
|
* and before any other initialization.
|
||||||
*/
|
*/
|
||||||
void __early_init(void) {
|
void __early_init(void) {
|
||||||
|
enter_bootloader_mode_if_requested();
|
||||||
sn32_clock_init();
|
sn32_clock_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,7 @@ const PALConfig pal_default_config = {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int flag __attribute__((section(".flag"))) __attribute__((__used__)) = 0xAAAA5555;
|
static int flag __attribute__((section(".flag"))) __attribute__((__used__)) = 0xAAAA5555;
|
||||||
|
extern void enter_bootloader_mode_if_requested(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Early initialization code.
|
* @brief Early initialization code.
|
||||||
|
@ -51,6 +52,7 @@ static int flag __attribute__((section(".flag"))) __attribute__((__used__)) = 0x
|
||||||
* and before any other initialization.
|
* and before any other initialization.
|
||||||
*/
|
*/
|
||||||
void __early_init(void) {
|
void __early_init(void) {
|
||||||
|
enter_bootloader_mode_if_requested();
|
||||||
sn32_clock_init();
|
sn32_clock_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,7 @@ const PALConfig pal_default_config = {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int flag __attribute__((section(".flag"))) __attribute__((__used__)) = 0xAAAA5555;
|
static int flag __attribute__((section(".flag"))) __attribute__((__used__)) = 0xAAAA5555;
|
||||||
|
extern void enter_bootloader_mode_if_requested(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Early initialization code.
|
* @brief Early initialization code.
|
||||||
|
@ -51,6 +52,7 @@ static int flag __attribute__((section(".flag"))) __attribute__((__used__)) = 0x
|
||||||
* and before any other initialization.
|
* and before any other initialization.
|
||||||
*/
|
*/
|
||||||
void __early_init(void) {
|
void __early_init(void) {
|
||||||
|
enter_bootloader_mode_if_requested();
|
||||||
sn32_clock_init();
|
sn32_clock_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,7 @@ const PALConfig pal_default_config = {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int flag __attribute__((section(".flag"))) __attribute__((__used__)) = 0xAAAA5555;
|
static int flag __attribute__((section(".flag"))) __attribute__((__used__)) = 0xAAAA5555;
|
||||||
|
extern void enter_bootloader_mode_if_requested(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Early initialization code.
|
* @brief Early initialization code.
|
||||||
|
@ -51,6 +52,7 @@ static int flag __attribute__((section(".flag"))) __attribute__((__used__)) = 0x
|
||||||
* and before any other initialization.
|
* and before any other initialization.
|
||||||
*/
|
*/
|
||||||
void __early_init(void) {
|
void __early_init(void) {
|
||||||
|
enter_bootloader_mode_if_requested();
|
||||||
sn32_clock_init();
|
sn32_clock_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue