Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers

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



Linker settings for cy3684 examples
Moderator:
RSKV

Post Reply
Follow this topic



Linker settings for cy3684 examples

kellli01 posted on 12 Oct 2009 6:06 PM PST

1 Forum Post


We are evaluting your FX2 for a company project.

I am trying the examples on our brand new cy3684 kit and I notice that although they work, I can make trivial one line changes to the code and have unrelated functionality break. It is like the linker is moving code around based on these changes and losing alignment or putting things where there is no memory.

What linker settings are recommended for these examples? All that comes with it out of the box is that code should be above 0x0080 and xdata is above 0x1000. Also, I see RAMSIZE at 256. Is that it? Do you set up a stack or anything?

I can change a loop counter in a function that is never executed from WORD to DWORD and toggle the Endpoint 4 bulk transfers to work and not work. The loop counter is in code that never executes and is absolutely unrelated to this endpoint 4 stuff.

I start with an example that has the bulk transfers working like bulkloop.c and a couple vendor commands, get chip revision and a few others.

I add a single function to Vend_Ax.c that I don't even call. If I do call it, it makes no difference to the experiment. It is as follows:

BOOL Init();

BOOL Init() {
WORD i;

for (i = 0; i < 20; i++); // delay at least 2us


for (i = 0; i < 1000; i++); // delay at least 5us
//
// Check the status lines
//

return 0;
}

If you change the "WORD i;" line to "DWORD i;", then run the bulk transfer out Endpoint 4 using CyConsole, the bulk transfer will succeed, but the USB will stall with the next vendor command. You do not even have to call this function, just having it declared produces the problem. I am guessing I need better linker settings.





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.

Spec No: None; Sunset Owner: KXP; Secondary Owner: VWA; Sunset Date: 01/01/20