Sonsivri

Electronics => Pic C Languages => Topic started by: tutkun on July 16, 2008, 08:44:12 08:44



Title: ccs debug in proteus
Post by: tutkun on July 16, 2008, 08:44:12 08:44
hi,
I am new at this pic programming issue, I am using ccs c to programme the 16f877 pic and I am simmulating it via proteus.But i couldn't manage to debug my code in proteus i mean i couldn't add the source file into the proteus, in the web it says insert the coff (with 2 fs) into the programme but my ccs programme generates cof (with one f)..
perhaps i am doing someting wrong, could anyone please write the steps to be followed to add the source file into proteus..
thank you.. 


Title: proteus debug using ccs c
Post by: tutkun on July 16, 2008, 10:18:56 10:18
hi,
I am new at this pic programming issue, I am using ccs c to programme the 16f877 pic and I am simmulating it via proteus.But i couldn't manage to debug my code in proteus i mean i couldn't add the source file into the proteus, in the web it says insert the coff (with 2 fs) into the programme but my ccs programme generates cof (with one f)..
perhaps i am doing someting wrong, could anyone please write the steps to be followed to add the source file into proteus..
thank you.. 


Title: Re: ccs debug in proteus
Post by: etm503 on July 19, 2008, 11:53:21 11:53
you can use the .hex file to run your code as well as the .cof file.

The .cof file gives you more debug options in proteus.

If this does not help maybe you can be more explicit as to where exactly you are failing.


Title: Re: ccs debug in proteus
Post by: trunghaudt2 on July 23, 2008, 06:32:35 06:32
ok...........



Title: Re: ccs debug in proteus
Post by: mandoanaiz on November 17, 2008, 05:18:33 17:18
Proteus /vsm help /debug
If u use c compiler, in compilation properties choose: hex and cof files; attach cof file to simul in proteus.


Title: Re: ccs debug in proteus
Post by: fvp on December 20, 2008, 10:59:49 22:59
Just load the .cof (with one f) generated by CCS C in your MCU in proteus,

click twice on the microcontroller on proteus and on the "Program File:" field load the .cof or .hex file.


Title: Re: ccs debug in proteus
Post by: duende_azul on December 24, 2008, 04:03:18 16:03
You need to activate the "Pic source code" in the "debug" tab after loading the file .cof.


Title: Re: ccs debug in proteus
Post by: icecubetray on January 06, 2009, 12:58:07 00:58
you can also right click on the pic in the schematic and select Edit Properties

then select the hex file where is says "Program File:"


Title: Re: ccs debug in proteus
Post by: icecubetray on January 09, 2009, 12:46:44 12:46
i just realized that you can setup MPLAB to have proteus as your debugger instead of ICD

I was compiling and then flipping to Proteus schematic capture to run a simulation.....and debugging using printf to the terminal

This means I can step through my CCS code....

Sweet!

Under MPLAB
Debugger -> Select Tool -> Proteus VSM

then when the VSM pops up select your Proteus schematic
click on Open button -> and select project

Learn something new everyday......

now if I could only pipe the virtual terminal to a physical comport so that I could make my life easier developing my PC side code.......