Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
April 25, 2024, 05:35:55 05:35


Login with username, password and session length


Pages: [1]
Print
Author Topic: mikroC compiler + winavr  (Read 7872 times)
0 Members and 1 Guest are viewing this topic.
powermosfet
Newbie
*
Offline Offline

Posts: 11

Thank You
-Given: 6
-Receive: 9


« on: May 01, 2010, 11:26:14 11:26 »

hello,

I will like to know if its possible to use winavr libraries with mikroC compiler if yes than how do I include stuff.

for example #include <avr/io.h> or #include <util/delay.h>

thankyou.


Logged
sam_des
Senior Member
****
Offline Offline

Posts: 253

Thank You
-Given: 124
-Receive: 146


« Reply #1 on: May 01, 2010, 06:32:48 18:32 »

Hi,
Quote
I will like to know if its possible to use winavr libraries with mikroC compiler if yes than how do I include stuff.

for example #include <avr/io.h> or #include <util/delay.h>

Most certainly NOT Embarrassed
mikroC & WinAVR have different formats for their binary(compiled but not linked) data. While WinAVR uses elf mikroC uses it's own proprietary format. Also as far as I know mikroC does NOT have seperate linker/librarian. It has only two executables - preprocessor & (compiler+linker+librarian).

So you can't use winavr's libs directly. You can have source code for winavr's libs & port them to mikroC, but remember these libs make full use of preprocessor & other ANSI & gcc specific exetensions, mikroC doesn't even claim to be ANSI compliant. And winavr's libs are mostly GPLed.

regards,
sam_des
Logged

Never be afraid to do something new. Remember Amateurs built the Ark, Professionals built the Titanic !
powermosfet
Newbie
*
Offline Offline

Posts: 11

Thank You
-Given: 6
-Receive: 9


« Reply #2 on: May 03, 2010, 09:29:08 21:29 »

it's kinda sucks using avr studio with its boring interface.

thank you for the input.
Logged
metal
Global Moderator
Hero Member
*****
Offline Offline

Posts: 2420

Thank You
-Given: 862
-Receive: 678


Top Topic Starter


« Reply #3 on: May 03, 2010, 11:10:50 23:10 »

I think you can use codeblocks, use ultraedit or even UEStudio. They all work excellent indeed. I use them to write code, program interface too. It's easy to use them, especially codeblocks.
Logged
Thiru09
Cracking Team
Senior Member
****
Offline Offline

Posts: 321

Thank You
-Given: 385
-Receive: 1164



« Reply #4 on: May 04, 2010, 11:45:05 11:45 »

Quote
it's kinda sucks using avr studio with its boring interface.

thank you for the input.

If that is the only problem, try to use Eclipse with WinAVR.
I am sure that Eclipse interface is marvelous.

For more details, please visit the following websites.

Step by step configuration:

http://winavr.scienceprog.com/other-valuable-tools/using-eclipse-as-ide-for-winavr-compiler.html

The AVR Eclipse Plugin:

http://avr-eclipse.sourceforge.net/wiki/index.php/The_AVR_Eclipse_Plugin

And finally, Eclipse+CDT:

http://www.eclipse.org/cdt/

Regards,
Thiru

Logged
sam_des
Senior Member
****
Offline Offline

Posts: 253

Thank You
-Given: 124
-Receive: 146


« Reply #5 on: May 04, 2010, 03:20:44 15:20 »

Ya, Eclipse is good. But I find that too heavy for my work. Besides running damn slow, it eats my hard-disk and I am not into Java app development and certainly not easy to setup.

I feel much at home using Code::Blocks. Nearly does everything I wish for, cross-dev, pc dev. Has all the features I care for in an IDE & that too with small footprint & good speed.

And When I feel really wacky, I use good old Vim  Grin

sam_des
Logged

Never be afraid to do something new. Remember Amateurs built the Ark, Professionals built the Titanic !
metal
Global Moderator
Hero Member
*****
Offline Offline

Posts: 2420

Thank You
-Given: 862
-Receive: 678


Top Topic Starter


« Reply #6 on: May 04, 2010, 07:46:08 19:46 »

This eclipse winavr project has not been updated for a longtime..
Logged
powermosfet
Newbie
*
Offline Offline

Posts: 11

Thank You
-Given: 6
-Receive: 9


« Reply #7 on: May 04, 2010, 08:26:18 20:26 »

hi,

eclipse is a great application which I have been and using for a quite long time now. I have done many of my school projects using eclipse without any problems. I do recommend eclipse.


about ultraedit & UEStudio looks nice but how do i compile the code? I guess it should be outside of ultraedit and or UEStudio.


codeblocks + winavr  guide

Make sure to install WinAVR first.

Download and install Code::Blocks next

Create a new AVR GCC project

Go to Tools->Compiler and Debugger Settings
Change "Selected Compiler" to "GNU AVR GCC Compiler"
Alter the "Compiler's installation directory" to the WinAVR directory (should be on the C: drive root)

Go to Project -> Build Options
Under Compiler Flags->Categories->AVR CPU architecture specific Select your uC as a flag

Could save all of this as a user project template
« Last Edit: May 04, 2010, 09:40:50 21:40 by powermosfet » Logged
pickit2
Moderator
Hero Member
*****
Offline Offline

Posts: 4646

Thank You
-Given: 826
-Receive: 4207


There is no evidence that I muted SoNsIvRi


« Reply #8 on: May 04, 2010, 09:02:05 21:02 »

about ultraedit & UEStudio looks nice but how do i compile the code? I guess it should be outside of ultraedit and or UEStudio.
Most if not all Compilers allow you to use any Text editor. UltraEdit as most profile Templates too.
Logged

Note: I stoped Muteing bad members OK I now put thier account in sleep mode
metal
Global Moderator
Hero Member
*****
Offline Offline

Posts: 2420

Thank You
-Given: 862
-Receive: 678


Top Topic Starter


« Reply #9 on: May 04, 2010, 10:19:01 22:19 »

Here you go, this is from UEStudio..
« Last Edit: May 04, 2010, 10:21:29 22:21 by metal » Logged
powermosfet
Newbie
*
Offline Offline

Posts: 11

Thank You
-Given: 6
-Receive: 9


« Reply #10 on: May 05, 2010, 07:03:28 07:03 »

alright Im convinced. It absolutely deserves a try
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC