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.

Picc C

Status
Not open for further replies.
flatfootskier said:
Executing: "C:\Program Files\HI-TECH Software\PICC-Lite\9.50\BIN\PICL.EXE" -C -E"FEEDF2.cce" "FEEDF2.C" -O"FEEDF2.obj" -Zg9 -O -ASMLIST -Q -MPLAB -16F84
Advisory[1207] : some of the command line options you are using are now obsolete
Advisory[1208] : use --help option or refer to the user manual for option details
Error[107] C:\Documents and Settings\Simon\My Documents\PIC projects\FEEDF2.C 4 : illegal # directive "fuses"
Error[107] C:\Documents and Settings\Simon\My Documents\PIC projects\FEEDF2.C 5 : illegal # directive "use"
Error[107] C:\Documents and Settings\Simon\My Documents\PIC projects\FEEDF2.C 19 : illegal # directive "rom"
BUILD FAILED: Fri Jan 12 11:39:51 2007[/SIZE][/SIZE]

Does it appear as though this has been compiled (within MPLAB) by PicC?

Yes, PicC is being used. It looks like you have some out of date directives.

Mike.
 
Thanks Pommie. Has PicC gone through some radical changes in the last few years that render quite a few bits of code useless? I should look up what a 'directive' actually IS. My understanding is that it's a lump of code which is already written and you include a reference to it via the #use command, saving time.

My impression was that the whole point of proprietary compilers like PicC was that they bundled stuff in that saved time, like below:-
#use delay (clock=2457600)
#use rs232 (baud=2400,xmit=PIN_B2,rcv=PIN_B3)
#rom 0x2100={A,B,C,D,E,F,G,H,I,J}

I assume that the fact that I have changed deviced wouldn't matter, so I'm confused as to why these directives are no longer valid.
 
It's been a long time since I've posted here, but this looks like a good place to jump back in.
The code you posted is not for PICC (HiTech's) compiler, but rather for the CCS
compiler. Yes, the HiTech C is around 950 dollars per family, but the CCS compilers are around 125 dollars per family. The 12Fxxx compiler was given away free with MPLab 7.40, or something like that.
That is why you are getting the errors for #fuses, etc. CCS is an inexpensive compiler, and not too bad, as long as you write your own functions, and stay away from thier built in functions. These compilers, however, will not do pointers to constants, although there is a workaround, and do not have a linker, yet. (I understand they are working on both of these issues, but are nowhere close.)
HiTech, on the other hand is pretty close to ANSI C, but also way more expensive.
I'm trying out SourceBoost C, at the moment, and quite like what I'm finding, so far. It seems pretty close to ANSI C, and seems to have good optimization. I managed to pick up a license on ebay, for under 50 dollars Canadian, and you should be able to do the same, if you are on ebay. I'll let everyone know how much I like it, after I've played with it for a while.
Regards,
Robert
 
Really if you want to run C, the best thing is a PICC18. The architecture is more compatible with C. You can find PIC18 parts basically equivalent to PIC16 parts at not too much greater cost.

Then you have the PICC18 compiler or the free MCC18 compiler available to compile your C code.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top