Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Why so many compilers ?

Status
Not open for further replies.

bhadmanathan

Junior Member level 1
Junior Member level 1
Joined
May 7, 2016
Messages
18
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
187
I was working in pic16f877a controller (RTC BASED PROJECT) and compiler i am using is HITECH-C for PIC 10/12/16.
Unfortunately my code size limit is exceeded and i got the following error..
can't find 0x44 words (0x44 with total) for psect "text1354" in segment "CODE" (largest unused contiguous range 0x25).

I decided to choose another controller which has more than 8KB (PIC18F4550).

i compiled the same program with the compiler
HITECH-C PRO for PIC 18 and it is compiled successfully. I saw the program memory by
view -> memory usage cauge.
Now actual memory consumed is around 4KB, but same program in that compiler consumed the memory more than 8KB.

SO what is the reason. I need to know the actual difference among various compilers...?



Thanks in advance
 

It means that you do not have a contiguous section large enough for text1234. You need 0x44 but you only have 0x25. It's not the compilers fault, it's the device you chose. If you change to a different device in the 10/12/16 family, it might fit. You also state your are using the "PRO" version for the PIC18 comparison. Are you using the "PRO" version for 877A comparison? There are optimizations done in the PRO that shrink the code.
 

Hi ,
In MPLAB IDE available compilers are
HITECH universal toolsuite
CCS C compiler
Microchip C18 toolsuite
Microchip MPASM toolsuite....etc

In HITECH C itself everything can be done ...?

Why so many compilers?
What is the purpose and difference?
 

They are commercial products made by different competing companies, each slightly different according to their authors plans.

The reason they produce different code is they use routines written by different people. There is no right and wrong way when there are alternatives to reach the same goal but some ways may be better in some circumstances than others. They all use different libraries and may use different levels of optimizaton.

HITECH compilers are now integrated into Microchips XC range of products. There are also many other compilers you didn't mention, some of them extremely good.

Brian.
 

Hi,

Why so many compilers?
One reason is, that there are people earning their mony writing compilers.
So if there still is a compiler, one programmer may optimize it on it´s own taste.
It could be:
* less code
* faster code
* optimized for real time tasks
* optimized for this and that..

You could ask: Why so many cars? A car can bring me from point A to point B.
There are similar reasons: Earning money. Optimized for fuel consumption. Optimized to carry many people. Optimized to carry a lot of things. Optimzed to be fast. Optimized to have the most luxury...Or just desgin...

Klaus
 

Klaus;
and following your car comparison, there is another factor: price.

I would love to drive a Ferrari, but I can only afford a Mazda.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top