Proper wildcard syntax for placing entire folders in section in WICED Studio

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

cross mob
LePi_4441246
Level 1
Level 1

I have a lot of files in a library that need to be placed in a designated section of the SRAM for the CYW43907 device, but my usual modification to the link file for placing an entire subfolder of *.o files is not working the way it does in other IDEs.  If I remove the folder and list the files individually, it will place the files in the designated section but I really don't want to add that many lines to the link file.   The various make files seem to do a lot of processing on the file paths, so I suspect the problem may lie in there somewhere. 

Any help would be appreciated.

   .library :
    {
        . = ALIGN(4);
        *hal/*.o (.text .text.*)
    } > LIB_SRAM  /* separate section for library code and data */

0 Likes
4 Replies
RaktimR_11
Moderator
Moderator
Moderator
500 replies posted 250 replies posted 100 replies posted

Re: Recommended way to modify linker script for a WICED application

I am hoping that you are doing the modification as mentioned in the quoted thread. If you don't mind, could you please share what are the exact modifications you have done and which files have you modified?

0 Likes

Thank you for responding to my question. I had seen the thread you

mentioned, but could not find one that fit my particular situation. I am

modifying the app_without_rom.ld and the GCC_app_without_rom_memory.ld

scripts at the moment. The sections of each file that I modified are shown

below. The intent is to separate out a number of library functions from

the application for separate firmware updating. We will be modifying the

OTA2 versions of those files later, but I am first testing the changes

without OTA2. The path to the folder I am testing is

/apps/snip/WT/wt_main/hal, but the linker is not finding the 'hal' folder

when it is included in the linker script and all of the object files are

placed in the SRAM section. If I individually name the object files inside

the 'hal' folder, the linker places them in the proper section called

LIB_SRAM. I have used this syntax before in other systems, so I am

confused why it does not work in WICED.

Thank you.

GCC_app_without_rom_memory.ld:

MEMORY

{

ROM (rx) : ORIGIN = 0x00400000, LENGTH = 640K

FLOPS (rwx) : ORIGIN = 0x00000000, LENGTH = 32

SRAM (rwx) : ORIGIN = 0x004A0000, LENGTH = 1008K /*

Application space */

LIB_SRAM (rwx) : ORIGIN = 0x0059C000, LENGTH = 1040K /* Library

space */

AONRAM (rwx) : ORIGIN = 0x006A0000, LENGTH = 8K

DDR (rwx) : ORIGIN = 0x40000000, LENGTH = 0

}

app_without_rom_memory.ld:

  • .library : { . = ALIGN(4); hal/.o (.text .text.*)

} > LIB_SRAM /* separate section for library code and data /

.text :

{

. = ALIGN(32);

link_code_location = .;

KEEP(*(.text.startup))

  • (EXCLUDE_FILE(hal/.o) .text .text.)* (.text .text.

.gnu.linkonce.t.*)

(.sleep_event_handlers.)

KEEP(*(.text.vPortSVCHandler .text.xPortPendSVHandler

.text.xPortSysTickHandler ))

KEEP(*(.text.__tx_SVCallHandler .text.__tx_PendSVHandler

.text.__tx_SysTickHandler ))

KEEP(*(.text.platform_tick_isr ))

KEEP(*(.text.irq ))

KEEP(*(.text.sdio_rtos_irq .text.sdio_irq ))

KEEP(*(.text.uart_rtos_irq .text.uart_irq ))

KEEP(*(.text.dma_rtos_irq .text.dma_irq ))

KEEP(*(.text.gpio_rtos_irq .text.gpio_irq ))

KEEP(*(.text.dbg_watchdog_rtos_irq .text.dbg_watchdog_irq ))

KEEP(*(.text.usart1_rtos_irq .text.usart1_irq ))

KEEP(*(.text.usart2_rtos_irq .text.usart2_irq ))

KEEP(*(.text.usart1_tx_dma_rtos_irq .text.usart1_tx_dma_irq ))

KEEP(*(.text.usart2_tx_dma_rtos_irq .text.usart2_tx_dma_irq ))

KEEP(*(.text.usart1_rx_dma_rtos_irq .text.usart1_rx_dma_irq ))

KEEP(*(.text.usart2_rx_dma_rtos_irq .text.usart2_rx_dma_irq ))

link_code_end = .;

} > SRAM

On Sun, Jan 12, 2020 at 11:13 PM RaktimR_11 <community-manager@cypress.com>

0 Likes

Thanks a lot for your detailed response. Could you please share a stripped down version of your hal folder along with the corresponding makefiles for us to easily reproduce the issue?

0 Likes

Thank you, but I am not permitted to transmit IP outside the company. If

you could add a subfolder to one of your apps.snip projects and show me how

to successfully place an entire folder of object files into one section

and exclude the folder from another section using the linker file, that

would be very helpful to me and possibly many others.

On Wed, Jan 15, 2020 at 12:10 AM RaktimR_11 <community-manager@cypress.com>

0 Likes