Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

in EWAVR Error[Pe095]: array is too large

Status
Not open for further replies.

002

Member level 1
Joined
Nov 12, 2001
Messages
32
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
Italia
Activity points
162
iar array is too large

I try to compile an array of 80K.
The micro one has 130k.
The compiler is EWAVR 2.28A
The option as set on V3 ( 1FFFF of code space)

__farflash unsigned char Parl[] = {

The compiler signals me the following error:

..\Parl.h (2049) : Error[Pe095]: array is too large

Does someone know the why, and as I can obviate?

thanks
002
 

cancel

Full Member level 5
Joined
May 27, 2001
Messages
251
Helped
15
Reputation
30
Reaction score
4
Trophy points
1,298
Activity points
1,878
error[pe095]: array is too large

are you sure that your code does not fill the rest of the flash ??

regards

cancel
 

002

Member level 1
Joined
Nov 12, 2001
Messages
32
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
Italia
Activity points
162
iar array too large

sure.
this is the result with the array reduced to a quarter.

6 908 bytes of CODE memory (88 range fill)
857 bytes of DATA memory
41 bytes of XDATA memory
26 492 bytes of FARCODE memory

I don't understand the use of size_t, if it serves.
 

002

Member level 1
Joined
Nov 12, 2001
Messages
32
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
Italia
Activity points
162
error[pe095]: array is too large

:? Attacched files full and files quarter. :?

:D To who serves I have made a program that the fileses convert. wav in files. h with vocal array. :D
 

arturt134

Full Member level 2
Joined
Dec 31, 1999
Messages
125
Helped
8
Reputation
16
Reaction score
7
Trophy points
1,298
Location
Poland
Activity points
1,006
array is too large

ATmega (with 128kB flash memory) has 2 blocks of flash: 64kB, named "flash" and 64kB named "farflash" memory. You can't make any array in the both spaces. You can use only one of this spaces, for one variable, so you are limited to 64kB.
 

admiral

Junior Member level 3
Joined
Dec 13, 2001
Messages
30
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
222
iar compiler array is too large

I don't think that arturt134 is right on this. Farflash is for the entire flash area of the chip.

One should be sure of all the settings of the .xcl file, the compiler etc.

Posting an 80K table and expecting someone to be helpfull is quite optimistic. :)

One must check a lot of parameters to be able to help you on this.

good luck
 

002

Member level 1
Joined
Nov 12, 2001
Messages
32
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
Italia
Activity points
162
iar pe095

Ok.
Thanks for the help.
I attach the complete project.
 

arturt134

Full Member level 2
Joined
Dec 31, 1999
Messages
125
Helped
8
Reputation
16
Reaction score
7
Trophy points
1,298
Location
Poland
Activity points
1,006
iar error array is too large

admiral, you may be right....
002 please, tell me which AVR are you using in your project. I'll try to look closer on this problem.
 

002

Member level 1
Joined
Nov 12, 2001
Messages
32
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
Italia
Activity points
162
iar compiler array too large

:!: ATmega128 :!:


8) Tanks
 

arturt134

Full Member level 2
Joined
Dec 31, 1999
Messages
125
Helped
8
Reputation
16
Reaction score
7
Trophy points
1,298
Location
Poland
Activity points
1,006
size of array is too large

Try this declaration:
__hugeflash const char array[80000];
I've compilled it on IAR v2.28A/WIN with default linker file, and have no errors.
 

arturt134

Full Member level 2
Joined
Dec 31, 1999
Messages
125
Helped
8
Reputation
16
Reaction score
7
Trophy points
1,298
Location
Poland
Activity points
1,006
array is too large iar

This is my test project, with your array.
 

002

Member level 1
Joined
Nov 12, 2001
Messages
32
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
Italia
Activity points
162
iar avr too big array

From the manual

Keyword _____ Max. object size __ Pointer size ____ Address range
__tinyflash ___ 127 bytes ________ 1 byte ________ 0x0–0xFF
__flash ______ 32 Kbytes ________ 2 bytes _______ 0x0–0xFFFF
__farflash ____ 32 Kbytes ________ 3 bytes _______ 0x0–0x7FFFFF
__hugeflash __ 8 Mbytes _________ 3 bytes ________ 0x0–0x7FFFFF

Many thanks
002
 

admiral

Junior Member level 3
Joined
Dec 13, 2001
Messages
30
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
222
[pe095]array is too large

I didn't have the chance to re-enter the board yesterday but I am happy that a solution was found.

Good job arturt134.
 

cancel

Full Member level 5
Joined
May 27, 2001
Messages
251
Helped
15
Reputation
30
Reaction score
4
Trophy points
1,298
Activity points
1,878
iar arran is too large

hi .. i tried this, compilation works fine .. i did not test the code


__farflash unsigned char *Parl;


main .....

Parl=(unsigned char*)malloc((size_t)80000);
if(Parl==NULL)
return; //error

regards

cancel
 

arturt134

Full Member level 2
Joined
Dec 31, 1999
Messages
125
Helped
8
Reputation
16
Reaction score
7
Trophy points
1,298
Location
Poland
Activity points
1,006
iar malloc char array

Please try this code in simulator. I don't think so you can dynamically allocate flash memory.
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top