cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4 MCU

New Contributor II

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
Reply
1 Solution
Esteemed Contributor II

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
Reply
6 Replies
Esteemed Contributor II

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
Reply
Honored Contributor II

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

0 Likes
Reply
New Contributor II

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
Reply
Esteemed Contributor II

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
Reply
New Contributor II

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
Reply
Esteemed Contributor II

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

   

Yes

   

 

   

Bob

0 Likes
Reply