Newbe question: What development environment to use?

Go To Last Post
32 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm new to the AVR family ov processors and moving from the Basic Stamp and Javelin Stamp (Java PIC) Pic's.

I have bought a development board with an ATMega processor. The question is what development enviroment i should begin with?

I know Basic, Java and Pascal, and i don't thing starting with C should be a great problem.

The target is a robot platform and basic devices i need to be able to control is i2c, LCD, serial communication, ADC etc.

The most important thing is that i should be up and running as quickly as possible, otherwise i'll get bored and the ATMega will be left unused. .. :)

What software should i use (win XP environment) to get up and running quickly.?

Regards

Magnus L
Stockholm, Sweden

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Magnus!

Quote:
The most important thing is that i should be up and running as quickly as possible, otherwise i'll get bored and the ATMega will be left unused. ..
What software should i use (win XP environment) to get up and running quickly.?

Try CodeVision AVR (evaluation version first) : www.hpinfotech.com
Download page: http://www.hpinfotech.ro/html/do...
I'm sure you'll be quite satisfied :wink:

Real men don't use backups, they post their stuff on a public ftp server and let the rest of the world make copies.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Try Imagecraft ICCAVR. I'm sure you'll be quite satisfied.

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

bobgardner wrote:
Try Imagecraft ICCAVR. I'm sure you'll be quite satisfied.

:lol: :lol: :lol: Hehe! 1 - 0 [for Bob]

Real men don't use backups, they post their stuff on a public ftp server and let the rest of the world make copies.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Didn't get that. :)

But i could add that i don't have unlimited financial resources.

/Magnus

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Didn't get that.

Usually such questions (what development environment to use, which compiler is teh bestest, etc) provoke holy wars here. Everybody loves them too, especially on Fridays.

The Dark Boxes are coming.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

skogsvargen wrote:
Didn't get that. :)

Well, Magnus...
The joke was just to point out that all of the major compilers that are presently available compete more-or-less at a dead heat in terms of performance, code quality, and user satisfaction. The issue of which compiler is better (aka. "Compiler Wars") has been debated to death on this forum, and I'm convinced that there is no clear winner.

Quote:
But i could add that i don't have unlimited financial resources.

/Magnus


You should know, though, that the ImageCraft and CodeVisionAVR products are at the bottom end of the financial spectrum in terms of C compilers for the AVR. The other chief competitors are IAR (~ $3000) or the AVR target of the (open-source and free-as-in-libre) GCC compiler.

All of the commercial for-pay compilers offer trial editions that you can use on either a time-limited, or a code-size-limited basis for free (as in gratis). If you exceed these limitations you'd need to purchase the full versions.

I regret saying "commercial" compilers when refering to the ones that you need to pay money for... because there is strong evidence from talking to people on this forum that any of the compilers can be (and are) used in professional environments to produce commercial products. So any of them should be also be "good enough" for a hobbyist as well.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@Magnus:

Quote:
But i could add that i don't have unlimited financial resources.

I wouldn't dare to think otherwise! :-)

@Slava:

Quote:
Everybody loves them too, especially on Fridays.

... especially on Fridays... That was good! :-)

Real men don't use backups, they post their stuff on a public ftp server and let the rest of the world make copies.

Last Edited: Fri. Nov 18, 2005 - 01:21 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hehe...

Obviusly there are a lot of different compilers out there...

So let me rephrase the question:

Will BASCOM give me access to all features of the processors?

One ov the good thing with c and Java is the possibilities to use external libraries. Can i do that in BASCOM as well?

Using the GCC compiler is of cource the cheapest solution and i think i can figure out all steps in making and downloading files, but is it a big advantage to have an IDE in which you can do it all? The simulation possibilities seem to be good to have as a beginner.

Can anyone recomend a "low end" C-IDE which i can download in a test version with a codelimit rather than a time limit?

/Magnus

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The cheapest way to go IMO:
AVR Studio (free)
WinAVR (free, well integrated with AVR Studio)
Atmel AVR Butterfly (29 €)
Olimex JTAG ICE L or USB (44€, 48€)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Magnus!

Quote:
Can anyone recomend a "low end" C-IDE which i can download in a test version with a codelimit rather than a time limit?

I'm sure CodeVision has a free version that is code size limited, not time limited!
Here's the link for the evaluation version (FREE, code size limited):
http://www.hpinfotech.ro/cvavre.zip
Enjoy! :wink:
[BTW: Full version is only 150 euro...]

Real men don't use backups, they post their stuff on a public ftp server and let the rest of the world make copies.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

As for using GCC with an IDE: Atmel's AVR Studio 4.12 (which has always been the typical starting-point for writing projects in assembly) has recently added the ability to integrate directly with the GCC compiler for a complete IDE. It gives you a fully point-and-click technique for starting a new project, and manages compiler configuration automatically. In short, it is just as easy to work with as any other C IDE I've ever seen for any target.

Because avr-gcc and AVR Studio are two separate projects, you'd have to download them separately. WinAVR is the most common binary distribution of avr-gcc for Windows, and it also includes a bunch of other goodies, such as an editor, a makefile management tool, and open-source ICE, simulation, and programming software. In fact, you could use WinAVR by itself to do all of your AVR development tasks without ever downloading AVR Studio at all.

Using avr-gcc, either stand-alone with the tools in WinAVR, or using the tight intergation with AVR Studio, is totally free and will never have any "trial" limitations.

I know that CodeVisionAVR offers a codesize-limited trial edition. CodeVision and its contemporaries (most notably ImageCraft) have the benefit that, in addition to the traditional IDE features, they offer code-generating wizards that will automatically initialize several peripheral features of the AVR to operate themselves in some common configurations. For the beginner, that can be a real timesaver, and if used right they can be useful educational tools too.

However, they might teach you poor programming technique because they typically initialize your I/O registers using the cryptic "TCCR = 0x4A" format. When reading the soure code over for educational purposes, that kind of magic-number expression doesn't do anything to tell you exactly what is being done to the register.

I find these wizards too limiting for many of my current projects, though, since the cases covered are over-generalized and thus not particularly well-suited for the specific activities I need to use. For anything but the most trivial cases, I wouldn't bother with any code-generating wizards.

BASCOM is perfectly acceptable for doing quick-and-dirty programming. But, just as you'll find that there are things you just can't do on a PC using QBasic, similarly there are things that you'll find to be just too inconveinent to do with BASCOM.

OTOH, BASCOM also tries to hide as much of the low-level operation of the AVR from an end-user as possible, giving you some high-level English-like commands to execute instead of operating directly on the I/O registers yourself. If you're going to program in C, you should be prepared to pretty quickly learn the ins and outs of interpreting an AVR's datasheet and becoming familiar with the AVR architecture in general.

Last Edited: Fri. Nov 18, 2005 - 01:51 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
If you're going to program in C, you should be prepared to pretty quickly learn the ins and outs of interpreting an AVR's datasheet and becoming familiar with the AVR architecture in general.

Yes, this is off cource the choice i have to make. Since i'm using the Basic Stamp and the Javelin today i'm a bit afraid that having to dive to deep inte the architecture could be prohibiting.

Maybe starting with BASCOM to get the hang of the principles and then moving on to a c-compiler is the right way to go. The things i'm doing isn't that complicated anyway.

/Magnus

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

skogsvargen wrote:
What software should i use (win XP environment) to get up and running quickly.?

As noted above - everyone will recommend the one they use so I'll just take my chance to add another vote for:

WinAVR (inc. avr-gcc compiler)
Atmel AVR Studio 4.12 build 460

both are free to download and use and the 4.12 studio now acts as a complete IDE for avr-gcc. It works well and IT'S FREE!

Cliff

PS BASCOM tends to isolate you from the actual bits/bytes of the control registers in the AVR - this is both a good thing and a bad thing at the same time :?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Given a bunch of recommended good tools, one should NEVER choose a tool that is NOT recommended... :-(
Otherwise, why bother asking...

Real men don't use backups, they post their stuff on a public ftp server and let the rest of the world make copies.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You might consider getting started with an AVR Butterfly ($19.99) with an LCD, joystick, light, temp and voltage sensors, piezo speaker, RS232, 4 Mbit dataflash, header pads for ports, ISP, and JTAG, tons of source code, and a pin to hang it on your shirt (seriously). You can get a look at it and WinAVR and AVRStudio in the free Quick Start Guide at the link below.

Smiley

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Try Imagecraft ICCAVR. I'm sure you'll be quite satisfied.

I'm with Bob, try ImageCraft ICCAVR...

Quote:
Can anyone recomend a "low end" C-IDE which i can download in a test version with a codelimit rather than a time limit?

I'm with Bob, try ImageCraft ICCAVR...

Quote:
But i could add that i don't have unlimited financial resources.

Have you noticed that gas prices go up on Friday? Get your gas on Thursday and use the extra money saved on gas to buy a licensed copy of ImageCraft ICCAVR...

Quote:
Everybody loves them too, especially on Fridays.

If everyone would buy ImageCraft ICCAVR, ther'd be no reason for a C compiler war.

Quote:
If you're going to program in C, you should be prepared to pretty quickly learn the ins and outs of interpreting an AVR's datasheet and becoming familiar with the AVR architecture in general.

Make a hard copy of the datasheet for the controller/s you will be using, as well as a hard copy of the AVR instruction set, and other pertinent application notes. Keep them handy for reference. I sometimes flip through them, just to learn the ins and outs of the controllers and instruction set.

The datasheets usually have short snippits of assembly and C code to show appropriate ways to get thing done involving specific hardware modules within the various flavors of the AVR family.

You can avoid reality, for a while.  But you can't avoid the consequences of reality! - C.W. Livingston

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

All right,
The AVR-Butterfly seems lika a wonderful toy, but i just got a message that my ATMEGA8535 MICRO BOARD is arriving tomorrow. Since i allready have a mobile robot with motor controller, ultra sonic ranger, ir proximity detectors, gyro, servos and other gizmos i think i will have plenty to play with. The AtMega might be overkill but i got it at a good price... Unfortunately i didn't order a programming cable. I thought a serial cable was enough. Maybe i can find the components to build one anyway. I have downloaded both BASCOM and AVR Studio to start with. The weekend is saved!

/Magnus

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ImageCraft offers a code size limited version of their compiler. 4K I believe. You will have to Google to find their site and the download. It is a very nice, and easy to.

If your goal is a quick way to get started with C on an AVR easily, you can't beat either the ImageCraft or CodeVision compilers. Learn how to get things going with one of these demo versions which don't have quite the learning curve of the "free" compiler.

When you know you can sucessfully program in C and get your program running on an AVR, then switch to the GCC tools if you run out of code space.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AFAIK, IAR has also a 4kbytes KickStart version (somebody correct me if I'm wrong...)
And... I will cite IAR now:

Quote:
The results show that GNU avr-gcc 3.4.1 generates on average 68% more code than EWAVR 4.10B. [see: www.iar.com]

So, given the fact that flash & RAM are scarce resources, it would probably be better to take into account this aspect too when you choose a compiler (it will fit your program in a mega16 instead of mega32 - just an example/thought, don't take it as a final verdict).

Real men don't use backups, they post their stuff on a public ftp server and let the rest of the world make copies.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

microcarl speaks the truth. Listen to him.

Also, does anyone have the licenseing details on the 4K kick start IAR version? I could not find it on the web site.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Also, does anyone have the licenseing details on the 4K kick start IAR version? I could not find it on the web site.

I think it'll be prompted to you when you run the installer...
I don't dare to install it, as none of my current applications will fit into 4k... so it's useless.

Real men don't use backups, they post their stuff on a public ftp server and let the rest of the world make copies.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JTSB:
ImageCraft offers a code size limited version of their compiler. 4K I believe
==============================================
But its unlimited use for 45 days... just long enough to get a nice useful 31k program written. Who can write a c program that does anything nontrivial in 4k?

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Who can write a c program that does anything nontrivial in 4k?

I'm currently using mega8 and the program is already 5114 bytes... max. would be 6144, because it also has a bootloader. So, I'm really worried 'cause this is not the final version and I'm afraid that the final will NOT fit into max. 6k. [HW can NOT be changed - Yuck!!!]

Real men don't use backups, they post their stuff on a public ftp server and let the rest of the world make copies.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

microcarl wrote:

Quote:
Everybody loves them too, especially on Fridays.

If everyone would buy ImageCraft ICCAVR, ther'd be no reason for a C compiler war.

BWAHAHA Carl, that was awesome, even though it's not Friday anymore :P

The Dark Boxes are coming.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hehe! Slava, I think for you it's already Sunday!!! :-) Right?
BTW: insomnia somehow? :-)

Real men don't use backups, they post their stuff on a public ftp server and let the rest of the world make copies.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Who can write a c program that does anything nontrivial in 4k?

Ummm--does that make all my production '4433 & Mega48 and '2313 apps "trivial"?

Maybe with >>your<< C compiler; my CodeVision can do a lot of non-trivial work in 4k.

Lee

(Bob has been playing in Mega128-land for too long, it seems. Real men don't have or need that kind of program space.)

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

We have sent quite a few mega128 boards out the door.. but so far none of em have had more than half the mem used! We used all the IO pins though! kept saying I'd upgrade to the 128K version of the compiler when I ran up against the 64k limit... lately we have been using a lot of mega16s and mega32s. I got tight on a 16 and we shipped with a 32, but a lot of the 32 variations are down around 50%, so if we got a production order, we could save a few bucks. I'd like a 'ram size' dash number option on the mega32 64 and 128..... once you get the program written, you know the code size pretty well, but then you could select a mega with 1,2,4 or 8k or ram as needed. Now I think this is just an excellent idea if I do say so myself. (Too bad I'm not smart enough to invent something that will make a bunch of money)

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@groenhen: yes, it's 5am into Sunday and yes, I hate mornings. Do you have russian friends? It's uncommon for a westerner to know diminuitives of russian names.

The Dark Boxes are coming.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Bob wrote:
Now I think this is just an excellent idea if I do say so myself. (Too bad I'm not smart enough to invent something that will make a bunch of money)

Hey Bob!
A waiter here invented some kinda cork or something, patented it and now he's a millionaire!!! Gee, 1MegaBucks starting from a stupid CORK?!?! Can you believe that?!? Hmmm... ATmega$... sounds good, doesn't it?

Slava wrote:
Do you have russian friends? It's uncommon for a westerner to know diminuitives of russian names.

Oh, yes... Sergey (Sasha), Pavel (Pasha), Slavik and Oksana. They are all good (Russian) friends, especially Sergey!

Real men don't use backups, they post their stuff on a public ftp server and let the rest of the world make copies.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

We have sent quite a few mega128 boards out the door.. but so far none of em have had more than half the mem used! We used all the IO pins though! kept saying I'd upgrade to the 128K version of the compiler when I ran up against the 64k limit... lately we have been using a lot of mega16s and mega32s. I got tight on a 16 and we shipped with a 32, but a lot of the 32 variations are down around 50%, so if we got a production order, we could save a few bucks. I'd like a 'ram size' dash number option on the mega32 64 and 128..... once you get the program ...

Ummm--you seem to have ignored my objection to your trivial<->4k statement.

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, lets back 4k from instructions to c statements to function points and figure out what the mccabe complexity index would be. 4k bytes would be about 1.5K instructions (some are one word, some are two). Whats a good number of instructions for an expression or statement? 10? So we could have a c program with 150 c expressions or statements. Thats about 2 pages. I'd say that was a trivial program. Logic replacement. Seems like something worthy of a computer would have some algorithm to it. Some decision making. A half man year of work. Several 10s of kbytes of code. Over.

Imagecraft compiler user