Startup code: Move user_start_phase2 to irom section
This saves 1020 bytes from the text (IRAM) section by preventing inlining of user_start_phase2() (and dump_flash_config_sectors() as well) into the IRAM function sdk_user_start().
This commit is contained in:
parent
5809a0119b
commit
fee987d5cf
1 changed files with 2 additions and 2 deletions
|
@ -411,7 +411,7 @@ extern void (*__init_array_start)(void);
|
||||||
extern void (*__init_array_end)(void);
|
extern void (*__init_array_end)(void);
|
||||||
|
|
||||||
// .Lfunc009 -- .irom0.text+0x5b4
|
// .Lfunc009 -- .irom0.text+0x5b4
|
||||||
static void user_start_phase2(void) {
|
static __attribute__((noinline)) void user_start_phase2(void) {
|
||||||
uint8_t *buf;
|
uint8_t *buf;
|
||||||
uint8_t *phy_info;
|
uint8_t *phy_info;
|
||||||
|
|
||||||
|
@ -483,7 +483,7 @@ static void dump_flash_sector(uint32_t start_sector, uint32_t length) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// .Lfunc011 -- .irom0.text+0x790
|
// .Lfunc011 -- .irom0.text+0x790
|
||||||
static void dump_flash_config_sectors(uint32_t start_sector) {
|
static __attribute__((noinline)) void dump_flash_config_sectors(uint32_t start_sector) {
|
||||||
printf("system param error\n");
|
printf("system param error\n");
|
||||||
// Note: original SDK code didn't dump PHY info
|
// Note: original SDK code didn't dump PHY info
|
||||||
printf("phy_info:\n");
|
printf("phy_info:\n");
|
||||||
|
|
Loading…
Reference in a new issue