Forum Menu




 


Log in Problems?
New User? Sign Up!
AVR Freaks Forum Index

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
pgo480
PostPosted: Apr 30, 2012 - 06:46 PM
Rookie


Joined: Apr 09, 2012
Posts: 27


where can I find a detailed reference of how to write C for AVR GCC? I read that AVR GCC is ported GCC and I'm trying to learn how to port code from codevision. I have found the codevision manual, but can't seem to find an AVR GCC equivalent (except the normal GCC manual)...
 
 View user's profile Send private message  
Reply with quote Back to top
Koshchi
PostPosted: Apr 30, 2012 - 07:09 PM
10k+ Postman


Joined: Nov 17, 2004
Posts: 13840
Location: Vancouver, BC

Look for the avr-libc manual.

The main differences are ISR declarations, the "PORTC.x" construct, and the handling of flash/eeprom variables.

_________________
Regards,
Steve A.

The Board helps those that help themselves.
 
 View user's profile Send private message  
Reply with quote Back to top
david.prentice
PostPosted: Apr 30, 2012 - 07:32 PM
10k+ Postman


Joined: Feb 12, 2005
Posts: 16314
Location: Wormshill, England

I just run a sed script to convert between CodeVision and avr-gcc. However you always need to do some hand-editing.

You write C for avr-gcc in conjunction with the avr-gcc manual.
You write C for CodeVision in conjunction with the CodeVision manual.

When you installed avr-gcc you also installed the documentation. You can always Google an online version.

No, the avr-gcc docs are not as well organised as the CV docs. But hey-ho, it is free.

David.
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
clawson
PostPosted: Apr 30, 2012 - 07:35 PM
10k+ Postman


Joined: Jul 18, 2005
Posts: 62314
Location: (using avr-gcc in) Finchingfield, Essex, England

Quote:

No, the avr-gcc docs are not as well organised as the CV docs. But hey-ho, it is free.

And it's within the remit of anyone who cares to modify them into a "better" form. That's the nature of collaboratively developed software.

_________________
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2006 The PNphpBB Group
Credits