Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > const char xdata var[6]={0,0,0,0,0,0},the number of a const array member can't be more than six

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



const char xdata var[6]={0,0,0,0,0,0},the number of a const array member can't be more than six
Moderator:
RSKV

Post Reply
Follow this topic



const char xdata var[6]={0,0,0,0,0,0},the number of a const array member can't be more than six

西门吹牛奶 posted on 17 Feb 2012 6:01 AM PST
Top Contributor
34 Forum Posts

Hi,everybody.

I'm troubled by a wierd problem. Tthe number of a const array member can't be more than six.

for example. "const char xdata rar[6]={0,0,0,0,0,0};" in the code it runs normally. but when I write"const char xdata rar[7]={0,0,0,0,0,0,0}" in the code. the firmware stalls. it doesn't react to the cyconsole.exe.

what's wrong? so weird it is.

 




Re: const char xdata var[6]={0,0,0,0,0,0},the number of a const array member can't be more than six

Gayathri posted on 17 Feb 2012 10:10 AM PST
Cypress Employee
428 Forum Posts

 Hi,

 

What is the error that is seen? Is that a compiler error or is something unexpected happening while execution? What do you mean by firmware stalls? Can you please detail the behaviour seen. 

 

Regards,

Gayathri



Re: const char xdata var[6]={0,0,0,0,0,0},the number of a const array member can't be more than six

西门吹牛奶 posted on 18 Feb 2012 02:38 AM PST
Top Contributor
34 Forum Posts

hi,Gayathri.

it passed the compiling without any error.but after i download the hex file with the cyconsole.exe. the firmware doesn't react to cyconsole.exe any more.

I think it may be that my board hasd no external memmory. but i used the "xdata".

however, when i try to define the const in"const char waveform[128]", the Keil errored "segment is too large, target not build". defining the data  in "unsigned char  waveform[128]" has the same error.

i don't know how to resolve it



Re: const char xdata var[6]={0,0,0,0,0,0},the number of a const array member can't be more than six

Gayathri posted on 18 Feb 2012 04:12 AM PST
Cypress Employee
428 Forum Posts

 Hi,

 

Does it atleast enumerate after downloading the program ? How doeas it show up in Device manager ?

In order to resolve the Keil error, please ensure that values that you have mentioned in the "Options for Target" in Keil, for Code and Xdata are proper. For details refer: http://www.keil.com/appnotes/files/apnt_162.pdf

 

Regards,

Gayathri






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: GRAA; Secondary Owner: RAIK; Sunset Date: 01/01/20