Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® 3 > ERROR: ADDRESS SPACE OVERFLOW

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



ERROR: ADDRESS SPACE OVERFLOW
Moderator:
RKRM

Post Reply
Follow this topic



ERROR: ADDRESS SPACE OVERFLOW

sivananda posted on 27 Dec 2012 2:56 AM PST
Top Contributor
58 Forum Posts

 hi...

i am using PSoC3 Cy8Ckit-030 kit....when i am trying to compile my code, i am getting an error as "ADDRESS SPACE OVERFLOW".....can any one please tell me how to rectify it.......

here i am attaching the screen shot of my project workspace showing it..




Re: ERROR: ADDRESS SPACE OVERFLOW

H L posted on 27 Dec 2012 03:26 AM PST
Top Contributor
679 Forum Posts

 looks like RAM issues. Better upload your project for others to check.



Re: ERROR: ADDRESS SPACE OVERFLOW

sivananda posted on 27 Dec 2012 03:56 AM PST
Top Contributor
58 Forum Posts

yes ....I uploaded my project here.....

If I  make  Line.905 in "EEPROM_Access.c" file as comment then it is working correctly..................If i uncomment it, it is giving error....



Re: ERROR: ADDRESS SPACE OVERFLOW

Bob Marlowe posted on 27 Dec 2012 05:13 AM PST
Top Contributor
1768 Forum Posts

When I changed the settings for optimization for your Project I was able to compile it.

 

BUT

 

The usage-output of the linker was

Flash used: 41439 of 65536 bytes (63,2%).

SRAM used: 8183 of 8192 bytes (99,9%).

which shows that you are VERY near the end of your memory resource.

I did not (yet) go through your code to evolve where some bytes might be saved, but I assure you to do that instantly.

 

Bob



Re: ERROR: ADDRESS SPACE OVERFLOW

Bob Marlowe posted on 27 Dec 2012 05:44 AM PST
Top Contributor
1768 Forum Posts

Check your font.c, all is put into xdata instead of code segment.

 

 

Bob

 



Re: ERROR: ADDRESS SPACE OVERFLOW

danaaknight posted on 27 Dec 2012 06:02 AM PST
Top Contributor
1773 Forum Posts

Just a suggestion, you have a lot of "M0121:unterminated conditional"

warnings, you might consider cleaning these up first.

 

Regards, Dana.

 

 

 



Re: ERROR: ADDRESS SPACE OVERFLOW

Bob Marlowe posted on 27 Dec 2012 07:04 AM PST
Top Contributor
1768 Forum Posts

Found it out.

You are using "const" to define your data in flash, but this works for PSoC1. Use "CYCODE" instead (to be compatible with PSoC5) and your tables will go into flash.

 

Happy coding

Bob



Re: ERROR: ADDRESS SPACE OVERFLOW

Bob Marlowe posted on 27 Dec 2012 07:26 AM PST
Top Contributor
1768 Forum Posts

I could reduce SRam usage to

SRAM used: 1528 of 8192 bytes (18,7%).

 

Bob

 

 



Re: ERROR: ADDRESS SPACE OVERFLOW

danaaknight posted on 27 Dec 2012 01:43 PM PST
Top Contributor
1773 Forum Posts

Keil manual shows - 

const 


In ANSI C, the const type qualifier is used to define and access objects that are constant and that may not be changed. A variable that is declared with const may not be assigned to in the program. 


The Cx51 Compiler conforms to the ANSI definition of const objects. 

  • Variables declared with the const type qualifier alone are stored in the memory area (data, idata, xdata, and so on) associated with their definition.
  • Variables you want to locate in ROM must be declared with the code memory type. For example:

    code char test[] = "This is a text string";


  • Variables declared with const far are stored in the HCONST memory area. This area is typically allocated to ROM memory.
  • Finally, the STRING compiler directive specifies where string constants are stored. This directive allows you to place strings in CODE memory, HCONST memory, or in XCONST memory (constant space in XDATA).

 

Constant objects are typically initialized when they are defined (in your source files). The following variable definitions show different ways to create constant objects:

Regards, Dana.



Re: ERROR: ADDRESS SPACE OVERFLOW

sivananda posted on 28 Dec 2012 12:29 AM PST
Top Contributor
58 Forum Posts

 @Bob, @Danaa...

Thank you....SRAM usage is reducing with "CYCODE" data type...

@Danaa.

   I am unable to adress the warnings given by my compiler.....In fact, i am not able to understand what does the warning "Unterminated conditionals" means.......can you please elaborate it.



Re: ERROR: ADDRESS SPACE OVERFLOW

Bob Marlowe posted on 28 Dec 2012 01:13 AM PST
Top Contributor
1768 Forum Posts

"Unterminated Conditionals" refer to #if - #endif preprocessor statemens where the #endif is missing, but the included file (normally this is the case) ends.

 

Bob



Re: ERROR: ADDRESS SPACE OVERFLOW

danaaknight posted on 28 Dec 2012 05:49 AM PST
Top Contributor
1773 Forum Posts

I did not see where the typing in the .h file was in error, unless Bob

can find error consider posting a tech case at -

www.cypress.com

“Support”

“Technical Support”

“Create a Case”

 

Regards, Dana.



Re: ERROR: ADDRESS SPACE OVERFLOW

Bob Marlowe posted on 28 Dec 2012 06:39 AM PST
Top Contributor
1768 Forum Posts

I found 3-4 .h files that started as usual with an #ifndef - instruction but where the final #endif was missing.

Easy to see when looking at the very last line of that file where the usual comment is indicated to be part of a block.

 

Bob



Re: ERROR: ADDRESS SPACE OVERFLOW

Bob Marlowe posted on 28 Dec 2012 06:40 AM PST
Top Contributor
1768 Forum Posts

Oh, yes, and inserting a few "return (0);" lines at the appropiate places killed the last 3 warnings.

 

Happy coding

Bob



Re: ERROR: ADDRESS SPACE OVERFLOW

danaaknight posted on 28 Dec 2012 08:02 AM PST
Top Contributor
1773 Forum Posts

If these are Cypress generated poster should file a case to

make sure Cypress fixes.

 

Regards, Dana.



Re: ERROR: ADDRESS SPACE OVERFLOW

Bob Marlowe posted on 28 Dec 2012 10:12 AM PST
Top Contributor
1768 Forum Posts

No, not Cypress's fault, it are Sivananda's .h-files

 

Bob



Re: ERROR: ADDRESS SPACE OVERFLOW

sivananda posted on 04 Jan 2013 11:35 PM PST
Top Contributor
58 Forum Posts

 @Bob..

yes, it is absolutely my fault...as you mentioned, i forgot to write "#endif" in 3-4 .h files......Now, it is okay...i Killed all the warnings including return path issues....

@Bob, Danaa....

Thank you..



Re: ERROR: ADDRESS SPACE OVERFLOW

Bob Marlowe posted on 04 Jan 2013 11:55 PM PST
Top Contributor
1768 Forum Posts

You are always welcome!

 

Bob



Re: ERROR: ADDRESS SPACE OVERFLOW

sivananda posted on 17 Jan 2013 02:22 AM PST
Top Contributor
58 Forum Posts

hi...

     As i mentioned earlier, i am using PSOC3 -CY8C38XX chip which consists of 64 KB flash.....

Now the available 64 KB flash in my chip  is almost full, but still my application code is not completed (still it may need approximately 10 KB)...so, can any one suggest what to do....

Is it possible to interface an external memory to store my application program? If it is, which is the best way to do... so that my code should not break....

 

 

here is the current status of my flash

Flash used: 65442 of 65536 bytes (99.9 %).

SRAM used: 1650 of 8192 bytes (20.1 %).






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