cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC™ 4

xizh_4717011
New Contributor

ERROR: address 0x82e2 of .\CortexM0\ARM_GCC_484\Debug\Reload Pro.elf section `.text' is not within region `rom'

ERROR: .\CortexM0\ARM_GCC_484\Debug\Reload Pro.elf section `.eh_frame' will not fit in region `rom'

ERROR: address 0x82e2 of .\CortexM0\ARM_GCC_484\Debug\Reload Pro.elf section `.text' is not within region `rom'

ERROR: address 0x82e2 of .\CortexM0\ARM_GCC_484\Debug\Reload Pro.elf section `.text' is not within region `rom'

ERROR: section .cyloadablemeta loaded at [00007fc0,00007fff] overlaps section .text loaded at [00001b80,000082e1]

ERROR: region `rom' overflowed by 0 bytes

collect2.exe: error: ld returned 1 exit status

The command 'arm-none-eabi-gcc.exe' failed with exit code '1'.

pastedImage_0.png

I have tried to refer to other cases in the community but still could not solve it. Attached please find a file for help. Best regards.

thank you

0 Likes
1 Solution
MotooTanaka
Esteemed Contributor

Hi,

So from your project, I could see that your target device was CY8C4245PVI-382,

which is a 23-SSOP 32KB device.

To support your project 48KB may not be sufficient, so I would suggest to go with at least 64KB flash device.

Now to show you how to find a suitable device, please do the following steps.

(1) Go the PSoC X page, in this case PSoC 4.

     From there select menu "Product Selector Guide"

000-PSoC4_Product_selector_menu.JPG

(2) Then to select/organize the device selection criteria, select "Show/Hide Parameters"

002-Show_Hide_parameters.JPG

(3) Then "Show/Hide Parameters" dialog will appear.

     Since "Package" is in the "Hide" group as default.

     Find "Package" in the "Hide" list.

003-select-package-option.JPG

(4) Drag "Package" to the "Show" and drop it (higher part will be good.)

004-package-option-drugged.JPG

(5) Although Flash size is in the Show list, it is placed rather in the lower position,

    so I dragged it to higher position to make it easy to see both Package and Flash.

005-flash-drugged.JPG

(6) Then I chose SSOP for the package. The the range for Flash was from 16KB to 32KB,

      which is not enough for your current project.

006-SSOP-32KB.JPG

(7) Then I unchecked the package, and changed the minimum requirement of Flash to 64KB.

     Now you can choose a device from 171 candidates, but unfortunately there is no SSOP package available.

    So please decide the most preferable package for your application and proceed.

007-64KB_ge.JPG

moto

View solution in original post

10 Replies
MotooTanaka
Esteemed Contributor

Hi,

I just tried your project and got similar result.

Then I changed the device to PSoC 4200L (CY8C4248LTI-L485) and I could compile your project.

The result reported was

000-compile-result.JPG

It required about 48K of Flash space, and the original project was targeted to CY84245PVI-482 which has 32KB Flash.

So probably the root cause was 48KB > 32KB.

I would suggest you to consider a device with larger Flash ROM.

moto

xizh_4717011
New Contributor

This is the prompt for no overflow(ERROR: region `rom' overflowed by 0 bytes), is there any other solution or automatically optimize the code Settings? Thank you.

0 Likes
MotooTanaka
Esteemed Contributor

Hi,

When I first tried to build your project with 4200L, I got a warning saying that the application start address must be 0x2400 or larger,

which you set 0x1B00 or something like that.

001-bootloadable.JPG

So I changed it to 0x00002400, then I tried your project again.

And I got the following errors.

I think that "'text' is not within region 'rom'" means that the code did not fit in the Flash Rom area.

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

ERROR: address 0x94a2 of C:\Users\700650\Documents\Project\2020-CDC\PSoC4_EEPROM_MDK_200611\20200611\Reload Pro.cydsn\CortexM0\ARM_GCC_541\Debug\Reload Pro.elf section `.text' is not within region `rom'

ERROR: C:\Users\700650\Documents\Project\2020-CDC\PSoC4_EEPROM_MDK_200611\20200611\Reload Pro.cydsn\CortexM0\ARM_GCC_541\Debug\Reload Pro.elf section `.eh_frame' will not fit in region `rom'

ERROR: address 0x94a2 of C:\Users\700650\Documents\Project\2020-CDC\PSoC4_EEPROM_MDK_200611\20200611\Reload Pro.cydsn\CortexM0\ARM_GCC_541\Debug\Reload Pro.elf section `.text' is not within region `rom'

ERROR: address 0x94a2 of C:\Users\700650\Documents\Project\2020-CDC\PSoC4_EEPROM_MDK_200611\20200611\Reload Pro.cydsn\CortexM0\ARM_GCC_541\Debug\Reload Pro.elf section `.text' is not within region `rom'

ERROR: section .cyloadablemeta loaded at [00007fc0,00007fff] overlaps section .text loaded at [00002400,000094a1]

ERROR: region `rom' overflowed by 0 bytes

collect2.exe: error: ld returned 1 exit status

The command 'arm-none-eabi-gcc.exe' failed with exit code '1'.

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

But with same configuration I could build your project with PSoC 4200L.

I tried the following

(1) Change optimization from speed to area

(2) Enabled Link Time Optimization

With (1), it could not optimize the project much further.

with (2), the project failed to compile.

IMHO, fitting a project which is 9216 bytes (Bootloader) + 38350 bytes (Application) = 47822 bytes,  into a 32KB Flash Device is not easy.

moto

LinglingG_46
Moderator
Moderator

1: Disable your Bootloadable component, then building your project, it will display that the overflowed .

pastedImage_0.png

2:  The Manual application image placement : Place address 0x00001B80 may have some issues.

3:  You might consider using a chip of larger flash.

4: I think Moto has given a detailed clarification.

xizh_4717011
New Contributor

hi

The original set is   0x00000C00  ,But he would report another mistake

The Manual application image placement : Place address 0x00000C00 may have some issues.

0 Likes
MotooTanaka
Esteemed Contributor

Hi,

I took a looked the case below,

Build Error  no elf in rom

Originally the application was too big, too.

But Meister Bob-san  suggested to avoid using math library, which is rather large,

so that the size of the application was reduced from 23832 bytes to 22132 bytes.

With the math library and without bootloadable, the application was 23832 bytes

002-old_project.JPG

And without math library the size of the application was reduced to 22132 bytes,

which even with the bootloader, which is 9856 bytes, makes the total 32116 bytes, and can be fit in the 32KB flash.

003-old_project_2.JPG

Please note that even when causing the overflow the application size was around 24KB in this case,

but your application is 38KB without bootloader, so it won't be easily shaped into 22KB range.

moto

0 Likes
xizh_4717011
New Contributor

Hello, thank you for your help.

I realize that I need to change a larger Flash. You can help me find the chip model corresponding to the PIN of CY84245PVI-482. I have tried to find the most suitable model.

Please help me find a suitable source code I sent above the corresponding chip model, looking forward to your good news, thank you

0 Likes
MotooTanaka
Esteemed Contributor

Hi,

So from your project, I could see that your target device was CY8C4245PVI-382,

which is a 23-SSOP 32KB device.

To support your project 48KB may not be sufficient, so I would suggest to go with at least 64KB flash device.

Now to show you how to find a suitable device, please do the following steps.

(1) Go the PSoC X page, in this case PSoC 4.

     From there select menu "Product Selector Guide"

000-PSoC4_Product_selector_menu.JPG

(2) Then to select/organize the device selection criteria, select "Show/Hide Parameters"

002-Show_Hide_parameters.JPG

(3) Then "Show/Hide Parameters" dialog will appear.

     Since "Package" is in the "Hide" group as default.

     Find "Package" in the "Hide" list.

003-select-package-option.JPG

(4) Drag "Package" to the "Show" and drop it (higher part will be good.)

004-package-option-drugged.JPG

(5) Although Flash size is in the Show list, it is placed rather in the lower position,

    so I dragged it to higher position to make it easy to see both Package and Flash.

005-flash-drugged.JPG

(6) Then I chose SSOP for the package. The the range for Flash was from 16KB to 32KB,

      which is not enough for your current project.

006-SSOP-32KB.JPG

(7) Then I unchecked the package, and changed the minimum requirement of Flash to 64KB.

     Now you can choose a device from 171 candidates, but unfortunately there is no SSOP package available.

    So please decide the most preferable package for your application and proceed.

007-64KB_ge.JPG

moto

View solution in original post