Compilation error occurred due to Infineon-SFLASH Memory support.

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
joonbeom
Level 1
Level 1
First reply posted First question asked Welcome!

Hi.

 

The below code was added to support MXIC-Memory(MX25L12835FM2I-10G) and Infineon-Memory(S25FL128LAGMFI010).

===========================================================
/43xxx_Wi-Fi/platforms/BCM943907WCD2_LGE.mk

GLOBAL_DEFINES += SFLASH_SUPPORT_MACRONIX_PARTS
GLOBAL_DEFINES += SFLASH_SUPPORT_CYPRESS_PARTS     // Add

===========================================================

 

However, an error occurs when I try to compile it.

===========================================================

/home2/joonbeom.lee/ws/gen1_atom5/CLIPonRTOS/devices/dolphin/43xxx_Wi-Fi/tools/ARM_GNU/Linux64/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld: build/waf.tiny_bootloader-NoOS-NoNS-BCM943907WCD2_LGE-REV_A-SoC.43909/binary/waf.tiny_bootloader-NoOS-NoNS-BCM943907WCD2_LGE-REV_A-SoC.43909.elf section `.text' will not fit in region `AONRAM'

/home2/joonbeom.lee/ws/gen1_atom5/CLIPonRTOS/devices/dolphin/43xxx_Wi-Fi/tools/ARM_GNU/Linux64/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld:region `AONRAM' overflowed by 92 bytes

collect2: error: ld returned 1 exit status

make[3]: *** [build/waf.tiny_bootloader-NoOS-NoNS-BCM943907WCD2_LGE-REV_A-SoC.43909/binary/waf.tiny_bootloader-NoOS-NoNS-BCM943907WCD2_LGE-REV_A-SoC.43909.elf] Error 1

make[3]: Leaving directory `/home2/joonbeom.lee/ws/gen1_atom5/CLIPonRTOS/devices/dolphin/43xxx_Wi-Fi'

make[2]: *** [main_app] Error 2

make[2]: Leaving directory `/home2/joonbeom.lee/ws/gen1_atom5/CLIPonRTOS/devices/dolphin/43xxx_Wi-Fi'

make[1]: *** [build/clip.ota2_extract-BCM943907WCD2_LGE-ThreadX-NetX_Duo/tiny_bootloader_bin2c.o] Error 2

make[1]: Leaving directory `/home2/joonbeom.lee/ws/gen1_atom5/CLIPonRTOS/devices/dolphin/43xxx_Wi-Fi'

make: *** [main_app] Error 2 

===========================================================

 

To resolve the error, I tried to increase the AONRAM LENGTH in "GCC_ota2_tiny_bootloader_memory.ld" to 6K, but it is unclear if there will be any side effect.

===========================================================

43xxx_Wi-Fi/WICED/platform/MCU/BCM4390x/BCM43907/GCC_ota2_tiny_bootloader_memory.ld

 

MEMORY

{

    AONRAM           (rwx)  : ORIGIN = 0x006A0000, LENGTH = 5K // to 6k  /* Use half of 8K AON memory as hard limit for tiny bootloader */

    RAM              (rwx)  : ORIGIN = 0x00688000, LENGTH = 77K /* Uses the top 77K of SRAM */

}

===========================================================

 

Do you think it is not a problem to increase the AONRAM LENGTH in "GCC_ota2_tiny_bootloader_memory.ld" to 6K?

0 Likes
1 Solution
Rakesh_BG
Moderator
Moderator
Moderator
50 solutions authored 100 replies posted 100 sign-ins

Hi @joonbeom ,

I verified the above changes, you are commenting out the not required flash configurations which saves the memory and also speed up the config traversing.

The change doesn't impact on working for now, but if you want to use the flash modules in future with configurations which are commented now, has to be reverted back.

 

Thanks,

Rakesh B G

View solution in original post

0 Likes
2 Replies
joonbeom
Level 1
Level 1
First reply posted First question asked Welcome!

Hi

I solved it by modifying spi_flash.c file without increasing AONRAM SIZE.

Please check if there is no side effect.

 

====================================================

466 //#ifdef SFLASH_SUPPORT_MACRONIX_PARTS
467 /* Structure (sflash_action_t/sflash_speed_advance_t) for MACRONIX sflash */
468 //static const sflash_action_t macronix_action_over_128Mbit = {
469 //#ifndef SFLASH_WRITE_DATA_DISABLE
470 // .is_quad_mode = common_sflash_is_quad_mode,
471 // .set_block_protect = common_sflash_set_block_protect,
472 // .query_block_protect = common_sflash_query_block_protect,
473 // .is_write_enable = common_sflash_is_write_enable,
474 // .reset = common_sflash_reset,
475 // .write_data = macronix_sflash_4bytes_address_write_data,
476 // .erase_data = common_sflash_4bytes_address_erase_data,
477 //#endif /* SFLASH_WRITE_DATA_DISABLE */
478 // .set_quad_mode = common_sflash_set_quad_mode,
479 // .is_busy = common_sflash_is_busy,
480 // .set_write_enable = common_sflash_set_write_enable,
481 // .status_register = sflash_status_register,
482 // .read_data = common_sflash_4bytes_address_read_data
483 //};
484 //#endif

 

671 #ifdef SFLASH_SUPPORT_MACRONIX_PARTS
672 //{ SFLASH_ID_MX25L8006E, { 1*MBYTE, 1, .action = &common_action, .speed_advance = &common_lowspeed_config } },
673 //{ SFLASH_ID_MX25L1606E, { 2*MBYTE, 1, .action = &common_action, .speed_advance = &common_speed_config } },
674 //{ SFLASH_ID_MX25L6433F, { 8*MBYTE, 256, .action = &common_action, .speed_advance = &common_speed_config } },
675 { SFLASH_ID_MX25L12835F, { 16*MBYTE, 256, .action = &common_action, .speed_advance = &common_speed_config } },
676 //{ SFLASH_ID_MX25L25635F, { 32*MBYTE, 256, .action = &macronix_action_over_128Mbit, .speed_advance = &common_speed_config } },
677 #endif /* SFLASH_SUPPORT_MACRONIX_PARTS */

 

694 #ifdef SFLASH_SUPPORT_CYPRESS_PARTS
695 //{ SFLASH_ID_S25FL064L, { 8*MBYTE, 256, .action = &cypress_action, .speed_advance = &cypress_speed_config } },
696 { SFLASH_ID_S25FL128L, { 16*MBYTE, 256, .action = &cypress_action, .speed_advance = &cypress_speed_config } },
697 { SFLASH_ID_S25FL256L, { 32*MBYTE, 256, .action = &cypress_action_over_128Mbit, .speed_advance = &cypress_speed_config } },
698 #endif /* SFLASH_SUPPORT_CYPRESS_PARTS */

 

 

 

 

 

 

0 Likes
Rakesh_BG
Moderator
Moderator
Moderator
50 solutions authored 100 replies posted 100 sign-ins

Hi @joonbeom ,

I verified the above changes, you are commenting out the not required flash configurations which saves the memory and also speed up the config traversing.

The change doesn't impact on working for now, but if you want to use the flash modules in future with configurations which are commented now, has to be reverted back.

 

Thanks,

Rakesh B G

0 Likes