Welcome to EDAboard.com

Welcome to our site! EDAboard.com 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.

AVR studio VS Win Avr

Status
Not open for further replies.

Afzal Hossain Khan

Junior Member level 1
Joined
Apr 2, 2012
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,394
Hi,
Recently I am working with avr studio 5 and I've completed my previous projects with win avr.I know these both use the same compiler which is GCC tool chain.But recently I've noticed a violent difference between them.

In case of saving data to ROM I use const unsigned char ****PGM[] PROGMEM="******************";
In that case avr studio keep this data in ROM as well as in ram.I mean after compiling I notice that both program and data memory size is changed . I think this data is treated as global variable to compiler.
But in case of win avr this data is only kept in ROM .
I'm totally confused.
 

not-a-moderator

Full Member level 3
Joined
Sep 5, 2011
Messages
163
Helped
46
Reputation
92
Reaction score
43
Trophy points
1,318
Location
South Africa
Activity points
2,263

Afzal Hossain Khan

Junior Member level 1
Joined
Apr 2, 2012
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,394
Hello not- a -moderator,
Thank your information.My problem is out of these documentation.According to AVR GCC if i use PROGMEM to save data in flash it will work .My problem is that if I use winAVR every thing is okay. In case of avrstudio 5 all data are saved in ram as well ROM at start up of mcu.And not only that the firmware size is violently different between them.In case of winAVR firmware size is 1.7K where it's size is 8K when used avrstudio 5.My question is am I making any mistake while using avrstudio5 or avrstudio 5 is defective.
 

not-a-moderator

Full Member level 3
Joined
Sep 5, 2011
Messages
163
Helped
46
Reputation
92
Reaction score
43
Trophy points
1,318
Location
South Africa
Activity points
2,263
My guess would be that AvrStudio directs GCC to store the data in flash (rom); but when the uC starts up everything is loaded into ram due to there being no pointers set up to access the data directly from flash (rom).
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top