Ok Amarnath, I checked the code u gave, and found one small but fatal mistake: There is a " ' "symbol just after your "while(1) " in line 82. (After correcting the typo, you can compile this program if u hav PikLab and CCS C installed properly.
[I couldnt check the generated output hex file by uploading it to the PIC 18F4550, since my programmer was with a friend of mine]. [I use Piklab over Ubuntu Jaunty (9.04). But the procedures should be almost the same]. [I know, the post seems so looong, and is worth formatting and being put up on a blog - I'll do it asap. Till then, enjaaaaay!] "Toolchains": ------------- With reference to your doubts about 'toolchains', see it just as another name for "programming language family". A toolchain is actually the collection of utilities (such as compiler,linker, assembler, etc.) for a particular coding 'language', to be integrated into an IDE. Some Toolchains come integrated into the IDE, as part of it. Some commercial ones have to be installed additionally to give the IDE the support. So, CCS C, MPASM (the default assembly language in MPLAB IDE), GPUtils (the free equivalent of MPASM in linux - comes as part of Piklab), Hitech PIC C, all are examples of different toolchains used for programming PICs. ------------- CCS C is not a free compiler and so u do not get it with your basic installation of PikLab. You will have to install it additionally. After installing CCS C, you can configure PikLab to use CCS C as your C compiler. ----------------- For PIC18 and lower PICs, CCS C has both a linux version (PCML), and a Windows version (PCWH). You can use either (windows version can be run using WINE). The linux version would be more easier to install, but it has some limitations. I am attaching details for the Windows version (PCWHD - maximum support). [If you dont have it, u can download it from here: http://rs479.rapidshare.com/files/176228329/CCS_4.084.RAR ] ----------------- Installation: ------------- To install CCS C, use the following procedure: First, make sure u have Wine and Unrar installed. Else, install them using the following commands: sudo apt-get install unrar sudo apt-get install wine Download the CCS_4.084.RAR file rom the above specified link, and save it into a folder named ccs-setup on your Desktop. Next from command line, enter the folder where u hav put the rar file, and issue the following command: sudo unrar e CCS_4.084.RAR This will extract the following files into the folder: pcb.crg pcd.crg pch.crg pcm.crg ideutilsupd.exe pcwhdupd.exe setup_mplab_plugin.exe Intall_NFO.txt Now create a folder named PICC in the "Program Files" folder in the wine C drive folder. (usually, that's /home/<username>/.wine/drive_c/Program\ Files/ Replace <username> with your username. cd /home/<username>/.wine/drive_c/Program\ Files/ mkdir PICC Now copy the ".crg" files in the 'ccs-setup' folder on your Desktop to this PICC folder. Then enter the ccs-setup folder, and issue the following commands (do not use sudo) to install CCS C: wine ./pcwhdupd.exe and wine ./ideutilsupd.exe --------------------------------- PikLab Configuration -------------------- Start Piklab from your Menu (DO NOT start as root). (In my Ubuntu installation, it is available in the meanu as Applications > Programming > Piklab) In Piklab, goto Settings menu > Configure Toolchains. >From the list of C compilers in the tree to the left, select "CCS Compiler". Now, in the right, set the options as follows: Executable directory: Click the button next to the textbox, to browse for the folder. In the dialog box that appears, RIGHT clik on the tree listing, and select "Show Hidden Folders". Now, browse the tree and SELECT the folder PICC from /home > <username> > .wine > drive_c > Program Files > PICC Click OK to close the dialog box. Executable Type: Select 'Windows'. Now click OK to close the 'Configure Toolchains' dialog box. Configuration of CCS C toolchain is over. ---------------------- Starting a Project (TESTING) ------------------ >From Piklab menubar, select Project > New Project . Enter the project name, browse for the directory, set the device (PIC18F4550, in your case) select toolchain as "CCS Compiler" clik 'Next'. Now add your existing code source file (try the one you sent me, after making the typo correction mentioned at the beginning of this post). clik 'Finish'. --------- Building -------- After the project has been opened, From the Project Manager box in the left, make sure the 'Device' selected is 18F4550 (else correct it). >From the status bar, select your Programmer. See whether the Compiler metioned in the Status Bar is 'CCS Compiler'. Now, from the menubar, select Build > Build Project. (It mite take a while, since wine has to be started). (You mite see a dialog box come and disappear during the compilation). Now in the compile log, if the number of errors is 0, you have successfully set up the windows version of CCS C compiler in PikLab. ------------ Please let me know if the procedure works. At your service, Anto Jose Happy Computing!!! ----------- . .. ... Hentammo....over at last! :-) --~--~---------~--~----~------------~-------~--~----~ "Freedom is the only law". "Freedom Unplugged" http://www.ilug-tvm.org You received this message because you are subscribed to the Google Groups "ilug-tvm" group. To post to this group, send email to ilug-tvm@googlegroups.com To unsubscribe from this group, send email to ilug-tvm-unsubscr...@googlegroups.com For details visit the website: www.ilug-tvm.org or the google group page: http://groups.google.com/group/ilug-tvm?hl=en -~----------~----~----~----~------~----~------~--~---