Error while creating a variable at absolute address

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

cross mob
lock attach
Attachments are accessible only for community members.
vivec_3546641
Level 1
Level 1

Hello Team,

i am trying to create a variable at absolute address. but getting the following error:

No ELF section .cychecksum found, creating one

Application checksum calculated and stored in ELF section .cychecksum

Checksum calculated and stored in ELF section .cymeta

cyelftool.exe -M "C:\Users\mehdi\Documents\PSoC Creator\Example_0\Application_2.cydsn\CortexM0\ARM_GCC_541\Debug\Application_2_1.elf" "C:\Users\mehdi\Documents\PSoC Creator\Example_0\Application_2.cydsn\CortexM0\ARM_GCC_541\Debug\Application_2_2.elf" "C:\Users\mehdi\Documents\PSoC Creator\Example_0\Application_2.cydsn\CortexM0\ARM_GCC_541\Debug\Application_2.hex" --flash_row_size 256 --flash_size 262144 --flash_offset 0x00000000 --flash_array_size 131072

C:\Users\mehdi\Documents\PSoC Creator\Example_0\Application_2.cydsn\CortexM0\ARM_GCC_541\Debug\Application_2_1.elf overlaps with C:\Users\mehdi\Documents\PSoC Creator\Example_0\Application_2.cydsn\CortexM0\ARM_GCC_541\Debug\Application_2_2.elf

The command 'cyelftool.exe' failed with exit code '1'.

--------------- Build Failed: 12/18/2018 15:43:56 ---------------

in build setting, i have set the linker command for both app: (Project->Build Settings->ARM GCC 5.4->Linker->Command Line->Custom Flags)

-Wl,--section-start=.APP_ONE=0x00027F00

-Wl,--section-start=.APP_TWO=0x0003FE00

please guide me , where i am wrong and how to resolve this.

0 Likes
1 Solution

Hello,

The error is with creation of hex file. You can see that the .cyacd files are generated correctly. You can go ahead and bootload the .cyacd images after programming the bootloader .hex file.

Since this is a dual app bootloader project and bootloadable images have custom memory location, the elftool was not able to merge the Application_1_1.cyacd and Application_1_2.cyacd files. Similarly in the case of Application_2 as well.

Thanks,

Hima

View solution in original post

0 Likes
4 Replies
himam_31
Employee
Employee
50 likes received 25 likes received 10 likes received

Hello,

We have just reviewed the project. We have found that in Application_1 is placed at address 0x00028000 . However in the Linker commands the custom region is configured for the address 0x00027F00. ie, the custom address region is before the application start address. Similarly in case of  Application_2 as well. Is this intentional? Can you have the variable placed in bootloader region instead of bootloadable?

Thanks,

Hima

0 Likes

Yes. i need to create an user space at the end of the both application. I have two applications starting from 0x00010000 and 0x00028000

having size 0x18000. i tried creating it at different address in same region but same error occurs.

what i have observed, Application 1 is starting from 0x00010000 with size 0x18000(including 0x100 size of metadata at Last Row of flash) and Application 2 starts from 0x00027F00 with same size(0x18000 including metadata at second last row of flash) .

As my application is very small(less than 0x18000 size) so i want to create an constant (of size 0x100) at absolute address(somewhere 0x00027E000 for App 1 and 0x0003FD00 for App 2). 

i want to store some user defined data here so that i can access it from bootloader as well as from corresponding Applications(when they are active).

0 Likes
lock attach
Attachments are accessible only for community members.

I am sharing the correct build.

0 Likes

Hello,

The error is with creation of hex file. You can see that the .cyacd files are generated correctly. You can go ahead and bootload the .cyacd images after programming the bootloader .hex file.

Since this is a dual app bootloader project and bootloadable images have custom memory location, the elftool was not able to merge the Application_1_1.cyacd and Application_1_2.cyacd files. Similarly in the case of Application_2 as well.

Thanks,

Hima

0 Likes