Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Compiler common for almost all microcontrollers

Status
Not open for further replies.

D-ann Perez

New Member
Hi,

Is there any freeware compiler compatible for almost all type of microcontroller? or If none, is there any freeware compiler I can use for microchip and infineon microcontroller? Thanks
 
ANSI C is supposed to be a standard.. If you read the documentation they will explain what ISN'T ansi C so you can write portable code...

Microchip use a "Hardware config" header so you can just write / modify this file... But Alas!!! it's almost too easy to say they are ANSI compatible where we know they aren't..

I can write an LCD driver that can be used within ANSI C, all that's needed will be another driver for the new chip..

To Answer your question... SDCC do a multi platform compiler, but even that has its problems porting between the different chips it supports...
 
Hi,

Is there any freeware compiler compatible for almost all type of microcontroller? or If none, is there any freeware compiler I can use for microchip and infineon microcontroller? Thanks

The portability of C is GREATLY exaggerated, and if you cripple your programming to maintain compatibility you're going to end up with pretty useless and poor code.

As a minimum different processors have widely differing hardware and facilities, so different devices often require completely different code for much of the coding.

Like Ian says, limiting your code to ANSI will help to make 'some' of the code more portable, but nothing device specific.
 
Microchip's XC8 compiler has a freeware license available. The compiled code won't be optimized at all with the freeware license. Compile optimization increases depending on whether you purchase the standard or pro license for it.

For most hobbyists, this is not an issue and the freeware license works just fine.

For Infineon processors I do believe GNU's GCC compiler is compatible with them. This is a 100% free open source compiler. Atmel AVR processors are also compatible with this compiler.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top