Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > Please help with code size and memory location for a single chip application with no external ram.

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



Please help with code size and memory location for a single chip application with no external ram.
Moderator:
RSKV

Post Reply
Follow this topic



Please help with code size and memory location for a single chip application with no external ram.

gabriel posted on 02 Dec 2010 9:28 AM PST
Member
8 Forum Posts

Hello,

I've just finished testing my firmware as desired. I have been working with the FX2 dev board. It runs fine, I even managed to load the firmware from the large eeprom with a 24LC64.

Now, I tried running the same firmware without the externa ram. The dev board has to jumpers that control access to external ram, MM0 and MM1. So, if you place jumpers in those headers it is soposed to work without external ram. Well it doesn't work! Not from eeprom nor loades with the cypress control panel.

My .hex file is 10k (9679 bytes). My .iic file is 4k (3159 bytes). In the uvision2 the compiles tells me this: Program size: data=43.6 xdata=4635 code=3130. So one thing I don't get is the dada=43.6! What is it in? 43.6 what?  I've never seen a .6 byte! So, I presume that my code is 3130bytes and xdata space is 4635bytes, this gives me 7765 bytes, that could fit in the 8k FX2. But I' not very familiar with the memory in this chip so I guess there are some blocks not usable or something.

Well I decided to use the FX2LP chip instead, so my code could easily fit in 16K. I made a board with the FX2LP chip and the eprom only just to see if it enumerates properly, but no!

I write the eeprom with the same firmware in the FX2 Dev Board and then put the eeprom to my little test board with the FX2LP chip. And I get device not recognized. If I run the little FX2LP board with no eeprom I get the default Cypress No-EEPROM device.

Now I went back to uVision2 and chaged the BL51 settings in the target options. It was set to code at 0x4000 and xdata to 0x5000 as default, so I guessed that was the thing, so I changed it to code at 0x0000 and xdata to 0x0400 which is above 0x03CA (3130 bytes of code). This didn't work either yet it compiled with no errors and It works in the FX2 Dev Board but only with external ram settings in MM0 and MM1 jumpers off. So this means it is still using external ram.

I need help either to set options un uVision2 of to understand how to run my firmware without external ram.

Anything will be appreciated!

Thanks for your time.

Gabriel Camiro




Re: Please help with code size and memory location for a single chip application with no external ram.

StuartSmith posted on 02 Dec 2010 04:34 PM PST

1 Forum Post

 46.3 means that you've 46 bytes and 3 bits of the 256 bytes of memory on the 8051 built into the FX2. From the 8051's point of view, this is "internal RAM". The 16K for code/data RAM inside the FX2LP appears external to the 8051.

Some of the 256 bytes of internal memory is bit-addressable (by using the BOOL type in C, if you're using the Keil compiler).

 

hope this helps a little, Stuart



Re: Please help with code size and memory location for a single chip application with no external ram.

aasi posted on 25 Feb 2011 03:13 AM PST
Cypress Employee
1090 Forum Posts

The xdata value being shown in the compilation statement is external memory being used. The 16k is internal memory and the register memory is internal to FX2LP but is addressed like external memory. If only this is used you won't need external RAM but if you declare variable and other code which resides in external memory you'll need a external RAM. We'll have to look at the code to understand the modifications required to make it run fully in internal memory.

Regards,

Anand






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