Jump to content

Microcontroller programming


Recommended Posts

Has anyone tried programming AVR microcontrollers with Mandriva?

When I look in rpm.pbone.net, I see packages called avr-gcc for other distros (Fedora, RedHat):

Name : avr-gcc

Version : 4.1.2

Summary : Cross Compiling GNU GCC targeted at avr

Description : This is a Cross Compiling version of GNU GCC, which can be used to

compile for the avr platform, instead of for the

native i386 platform.

But this package doesn't seem to be available for Mandriva.

 

All I can find for Mandriva is one called sdcc which doesn't seem to do quite the same thing. Any idea why avr-gcc isn't packaged for Mandriva?

Might it be worth trying a Fedora/RedHat rpm with Mandriva or would I have to compile it from source?

Link to comment
Share on other sites

Hey, that's cool, thanks for the link! :thumbs:

Unfortunately I can't find that for Mandriva either (only Suse or Fedora) so the same problem applies - try an rpm built for another system or try to build from source, which is better?

It's also not at all obvious from the website whether the kontrollerlab includes avr-gcc or not - it says it uses it, but I can't find anything obvious in the package contents or in the source tar. :unsure:

Link to comment
Share on other sites

Thanks Steve, great link! :thumbs:

 

At first I thought these things sit on top of the gcc suite, so I could skip the binutils and gcc steps (I've already got them installed via rpm). Then I would just need to compile avr-libc and avrdude and I thought I'd be set. kontrollerlab is already compiled ok and runs.

 

Alas, I can't compile avr-lib because it needs an avr-compatible compiler (ie, avr-gcc). So it seems I do indeed need to compile both binutils and gcc in their avr forms. Sigh.

 

I had a quick look in Debian to see what's there and they're all in the repositories, gcc-avr, binutils-avr and avrdude. No kontrollerlab but perhaps for starters I'll try doing it from Debian just to see whether it works or not.

Link to comment
Share on other sites

Update:

I tried again with Mandriva, and I got kontrollerlab and binutils compiled ok, but the compile of gcc for avr borked and I couldn't figure out what the problem was, so that stumped me for the rest of the chain.

 

Then I tried it in Debian and it all seems to work fine - I installed avr-gcc, avr-binutils, avr-libc and avrdude. I got as far as compiling the C into a .hex file, which seemed to work ok - obviously I won't know for sure until I've uploaded some recompiled code into the chip. But certainly a boatload easier using precompiled packages!

 

Fun stuff! :thumbs:

Link to comment
Share on other sites

  • 2 weeks later...

Update: (in case anyone's interested)

Using Debian everything works perfectly, I can use avrdude to read from and write to the memory of the chip, using KHexEdit to edit the binary files. This is via a (homemade) parallel port cable to an attiny2313.

Plus I can use avr-gcc and the other bits to make a .hex file from the C source (actually just call 'make') and use avrdude to write that generated .hex file to the chip.

 

So I can do it with Debian, it's just a shame these packages aren't available in Mandriva!

Link to comment
Share on other sites

  • 8 months later...

Here is an avr gcc package bug someone migth want to make input to or vote for :)

https://qa.mandriva.com/show_bug.cgi?id=45232

 

I just bought my first aurdino so I made a small search and found this thread and that bug and some more...

I will probably try it next week or when i find time...

I am also downloading 2009.1 RC1 so i might try AVR things in coocker.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...