You are here

ERROR: ADDRESS SPACE OVERFLOW | Cypress Semiconductor

ERROR: ADDRESS SPACE OVERFLOW

Summary: 24 Replies, Latest post by Bob Marlowe on 21 Dec 2015 02:26 AM PST
Verified Answers: 7
Last post
Log in to post new comments.
sivananda's picture
User
59 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..

Attachments: 
H L
user_460349's picture
User
1362 posts

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

sivananda's picture
User
59 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....

user_1377889's picture
User
10803 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

user_1377889's picture
User
10803 posts

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

 

 

Bob

 

user_14586677's picture
User
7648 posts

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

warnings, you might consider cleaning these up first.

 

Regards, Dana.

 

 

 

user_1377889's picture
User
10803 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

user_1377889's picture
User
10803 posts

I could reduce SRam usage to

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

 

Bob

 

 

user_14586677's picture
User
7648 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.

sivananda's picture
User
59 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.

user_1377889's picture
User
10803 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

Log in to post new comments.