Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > Modify code size in fx3.ld file

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



Modify code size in fx3.ld file
Moderator:
RSKV

Post Reply
Follow this topic



Modify code size in fx3.ld file

YI posted on 22 Aug 2012 8:26 AM PST
Senior Member
13 Forum Posts

Hi,
I am working on FX3 firmware, my firmware size about 200KB is bigger than the default 180KB in fx3.ld, I changed the fx3.ld file as attached:

SYS_MEM : ORIGIN = 0x40003000 LENGTH = 0x3D000
DATA : ORIGIN = 0x40040000 LENGTH = 0x8000

Also I changed the RTOS heap area in cyfxtx.c

#define CY_U3P_MEM_HEAP_BASE ((uint8_t *)0x40040000/*0x40038000*/)
#define CY_U3P_MEM_HEAP_SIZE (0x8000)

Compiler PASS, but PC host can't build the connection with FX3. If I reduced the file size and used the defualt fx3.ld, everything works normally.

What is my problem and how to fix it? Thank you!

 




Re: Modify code size in fx3.ld file

Lumpi6 posted on 22 Aug 2012 09:45 AM PST
Top Contributor
183 Forum Posts

Hi Yi,

 

I think you should change the MEM_HEAP_BASE in the cyfxtx.c file not as you wrote

 

#define CY_U3P_MEM_HEAP_BASE ((uint8_t *)0x40040000/*0x40038000*/)
#define CY_U3P_MEM_HEAP_SIZE (0x8000)

 

because you are using 0x10000 more so you should use 0x40048000 instead of 0x40040000 like

 

#define CY_U3P_MEM_HEAP_BASE ((uint8_t *)0x40048000/*0x40038000*/)
#define CY_U3P_MEM_HEAP_SIZE (0x8000)

 

regards

Lumpi



Re: Modify code size in fx3.ld file

_Gary_ posted on 22 Aug 2012 07:57 PM PST
Senior Member
14 Forum Posts

 Hi all,

Can you please kindly advise how to check the firmware size or the memory allocation?

Is there a report file?

Thanks!!



Re: Modify code size in fx3.ld file

RSKV posted on 29 Aug 2012 06:04 AM PST
Cypress Employee
655 Forum Posts

Gary,

The physical size of the .img file itself give you the size of the image.

You can just look at the properties of the .img file.

Thanks,

sai krishna.



Re: Modify code size in fx3.ld file

_Gary_ posted on 29 Aug 2012 06:29 PM PST
Senior Member
14 Forum Posts

Hi sai krishna,

Thanks a lot! 






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.