Continue to Site

Welcome to

Welcome to our site! is an international Electronics 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.

in EWAVR Error[Pe095]: array is too large

Not open for further replies.


Member level 1
Nov 12, 2001
Reaction score
Trophy points
Activity points
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?


error[pe095]: array is too large

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



iar array too large

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.

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

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.

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

iar pe095

Thanks for the help.
I attach the complete project.

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.

iar compiler array too large

:!: ATmega128 :!:

8) Tanks

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.

array is too large iar

This is my test project, with your array.

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

[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.

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);
return; //error



iar malloc char array

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

Not open for further replies.

Part and Inventory Search

Welcome to