Build Error  no elf in rom

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

cross mob
ThBa_1159851
Level 3
Level 3
First like received First like given

Half a year after I built successfully a device with a Cy8CKIT-049-41xx I wanted to edit the code but the build failed saying:

   

Build error: address 0xc5fc of .\ARM_GCC_493\Debug\PSoC_STM_Modell Prototype.elf section `.text' is not within region `rom'
Build error: .\ARM_GCC_493\Debug\PSoC_STM_Modell Prototype.elf section `.eh_frame' will not fit in region `rom'
Build error: section .cyloadablemeta loaded at [00007fc0,00007fff] overlaps section .text loaded at [00006b80,0000c5fb]
Build error: region `rom' overflowed by 0 bytes
Build error: The command 'arm-none-eabi-gcc.exe' failed with exit code '1'.

   

All errors referred to the file C:\\...\PSoC_STM_Modell Prototype.cydsn\Generated_Source\PSoC4\cm0gcc.ld

   

(PSoC_STM_Modell Prototype is the name of the project)

   

The bootloadable component has the dependencies to the .hex and .elf files in the "ARM GCC 484" folder. While building the project, a folder with the name "ARM GCC 493" has been created. This new folder doesn't contain the .hex or .elf files. The dependencies in the bootloadable component didn't change.

   

Any idea where the elves are hiding?

   

Thanks a lot
Thomas

0 Likes
1 Solution
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

You need a valid BootLoader project but you selected the .elf and .hex file of your (BootLoadable) project. This will not do what you want and will not fit into flash.

   

Best is to copy the bootloader example project folder to your project folder and add it to your workspace. Make sure, both projects are for the same device or you'll get an(other) error. Then use the .elf-file from the newly compiled BootLoader project files for the dependencies.

   

You are using an abs() function which is made for ints, I frequently use

   

#define abs(x)  (x>=0?x:-x)

   

I would put into the initialization part a CyGlobalIntEnable to have internal needed interrupts enabled, too.

   

 

   

Bob

View solution in original post

0 Likes
6 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Welcome in the forum, Thomas!

   

As a pure guess, the bootloader project's output files are not in the original place any more. Can you post your complete project, so that we all can have a look at all of your settings? To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file. Which Creator version are you using?

   

 

   

Bob

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

This sounds as if your program might be too large. When it builds without your changes, what size is reported?

0 Likes
lock attach
Attachments are accessible only for community members.
ThBa_1159851
Level 3
Level 3
First like received First like given

Dear Bob,

   

I use Creator 3.3. I've attached the minimal Bundle. While archiving the workspace it said that the "C:\...\ARM_GCC_493\Debug\PSoC_STM_Modell Prototype.hex" is missing. But that I knew allready.

   

 

   

Dear hli,

   

Can't build the old code anymore.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

You need a valid BootLoader project but you selected the .elf and .hex file of your (BootLoadable) project. This will not do what you want and will not fit into flash.

   

Best is to copy the bootloader example project folder to your project folder and add it to your workspace. Make sure, both projects are for the same device or you'll get an(other) error. Then use the .elf-file from the newly compiled BootLoader project files for the dependencies.

   

You are using an abs() function which is made for ints, I frequently use

   

#define abs(x)  (x>=0?x:-x)

   

I would put into the initialization part a CyGlobalIntEnable to have internal needed interrupts enabled, too.

   

 

   

Bob

0 Likes
ThBa_1159851
Level 3
Level 3
First like received First like given

So I....

   

- copied the folder SCB_Bootloader (freshly downloaded from the cypress-website) into my project
- opened my project
- added the UART_Bootloader Project (CY8C4125AXI483) to my workspace
- built the project "UART_Bootloader"
- connected the bootloadable of my project via the dependencies-tab to UART_Bootloader.cydsn\CortexM0\ARM_GCC_493\Debug\UART_Bootloader.hex
- (the UART_Bootloader.elf dependency has afterwards been found by the creator software)
- built my project and downloaded it via the Bootloader host...

   

and it worked.
Great, thanks!

   

#define abs(x)  (x>=0?x:-x) : does it override the abs()-function of the library? Isn't this a kind of reserved name?

   

Cheers
Thomas

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

"#define abs(x)  (x>=0?x:-x) : does it override the abs()-function of the library? "

   

Yes

   

 

   

Bob

0 Likes