What compiler do you use for your microcontrollers?

  • Thread starter Topher925
  • Start date
  • Tags
    Compiler
In summary, Mike is considering learning to program PICs again, but is concerned about the difficulty of programming them and the lack of support for the chips. He is also considering learning to program AVRs.
  • #1
Topher925
1,566
7
I originally got into electronics by trying to learn to program PICs, but then I stopped and moved onto PICAxe and other "easy to use" development tools. Now I'm requiring a little more advanced tools and looking to at learning PICs (or maybe AVRs, haven't decided) again. One thing I remember is how much a pain using MPLAB used to be. I've used microBasik before and really liked it, so I think I might go that route. Are there are any other good compilers out there I could use? I would prefer something that is capable of utilizing some of the newer 32bit and DSP chips as well.
 
Computer science news on Phys.org
  • #2
AVRs were designed, from the outset, to be C machines. As such, there's ANSI C GCC port, and not the varying less-or-more standard C variants out there for PiCs (I will say that the CCS Compiler was pretty decent once you figured out the quirks, but I hadn't used the official Cxx compiler that Microchip puts out). The el-cheapo AVR-ISP mkII in-circuit programmer is good across the line.

I'm not sure that ATMEL has a DSP equivalent, or if Microchip has an official inexpensive programmer good across most of its lines, however (to give balance to the above, and partially answer some of the other questions)
 
  • #3
If you decide to go with pics then I would look at Swordfish Basic for the 18 series or BoostC for 16 and 18 series. Both have free versions and if you're familiar with modular basic then Swordfish is brilliant.

Mike.
 
  • #4
I've been looking through some sample C code and found that I now have really no difficulty reading it, although I can't write it off the top of my head. Since 95% of the development tools out there are C I guess its about time I learned it.

Swordfish does look pretty cool, but I don't like the idea of the limited RAM size for compiling. In the past I've also found so called "full basic compilers" to be not quite so full. In the future, my programs will probably get pretty big and I don't to be strong armed into buying or learning a new compiler. I've been looking closely at the AVR32 chips and I think I might go that route since they contain an entire DSP library. I'm still kind of on the fence as they use direct USB programming, but unfortunately lack a full debugger, unless you get the JTAGICE mkII or AVR ONE! which are both very expensive. However, AVR Studio32 and all other development tools are completely free and the chips are fairly priced. But most importantly of all, their chips look to be well supported.
 

1. What is a compiler and why is it important for microcontrollers?

A compiler is a software program that translates human-written source code into machine code that can be understood by a microcontroller. It is important because it allows developers to write programs in high-level programming languages, which are easier to understand and maintain, and then convert them into machine code that can be executed by the microcontroller.

2. Are there different types of compilers for microcontrollers?

Yes, there are different types of compilers for microcontrollers, such as C compilers, C++ compilers, and assembly language compilers. Each type of compiler is designed to work with a specific programming language and may have different features and optimizations.

3. Which compiler is the best for microcontroller development?

The best compiler for microcontroller development depends on several factors, including the specific microcontroller being used, the programming language preference of the developer, and the features and optimizations required for the project. It is best to research and compare different compilers to find the one that best suits your needs.

4. Can I use a free or open-source compiler for microcontroller development?

Yes, there are many free and open-source compilers available for microcontroller development. Some popular options include GCC, AVR-GCC, and SDCC. These compilers are constantly being updated and improved by a community of developers, making them a cost-effective and reliable choice for microcontroller projects.

5. Are there any specific features I should look for in a compiler for microcontroller development?

Some important features to consider when choosing a compiler for microcontroller development include compatibility with the microcontroller you are using, support for the programming language you are comfortable with, and any additional features such as optimization for code size or speed. It is important to research and compare different compilers to find the one that best meets your project requirements.

Similar threads

Replies
10
Views
2K
  • Electrical Engineering
Replies
2
Views
1K
  • Electrical Engineering
Replies
13
Views
1K
  • Computing and Technology
Replies
7
Views
3K
  • Electrical Engineering
Replies
6
Views
1K
Replies
10
Views
2K
  • Electrical Engineering
Replies
5
Views
2K
Replies
2
Views
874
  • Mechanical Engineering
Replies
2
Views
1K
Back
Top