CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

ICD2, 18F452, MPLAB6.02, and PCH compiler operation?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Marty Burns
Guest







ICD2, 18F452, MPLAB6.02, and PCH compiler operation?
PostPosted: Wed Nov 06, 2002 7:16 am     Reply with quote

I am trying to use the ICD2,18F452, and PCH compiler. I am looking for a way to load my compiled code into MPLAB. Has anyone found a method for doing this?

I can get MPLAB 5.7 to work with this environment, but I would like to take advantage of the USB faster interface.

Any help would be appreciated.
___________________________
This message was ported from CCS's old forum
Original Post ID: 8598
R.J.Hamlett
Guest







Re: ICD2, 18F452, MPLAB6.02, and PCH compiler operation?
PostPosted: Wed Nov 06, 2002 7:55 am     Reply with quote

:=I am trying to use the ICD2,18F452, and PCH compiler. I am looking for a way to load my compiled code into MPLAB. Has anyone found a method for doing this?
:=
:=I can get MPLAB 5.7 to work with this environment, but I would like to take advantage of the USB faster interface.
:=
:=Any help would be appreciated.
You can import the .cod file. It gives you access at the 'assembler' level, to run the code, but no access to the original source.

Best Wishes
___________________________
This message was ported from CCS's old forum
Original Post ID: 8599
Marty Burns
Guest







Re: ICD2, 18F452, MPLAB6.02, and PCH compiler operation?
PostPosted: Wed Nov 06, 2002 10:35 am     Reply with quote

:=:=I am trying to use the ICD2,18F452, and PCH compiler. I am looking for a way to load my compiled code into MPLAB. Has anyone found a method for doing this?
:=:=
:=:=I can get MPLAB 5.7 to work with this environment, but I would like to take advantage of the USB faster interface.
:=:=
:=:=Any help would be appreciated.
:=You can import the .cod file. It gives you access at the 'assembler' level, to run the code, but no access to the original source.
:=
:=Best Wishes

When I try to import the .cod file MPLAB gives me an error "... could not be loaded because the format as indicated by its extension is not recognized" What do you think???
___________________________
This message was ported from CCS's old forum
Original Post ID: 8604
R.J.Hamlett
Guest







Re: ICD2, 18F452, MPLAB6.02, and PCH compiler operation?
PostPosted: Wed Nov 06, 2002 10:43 am     Reply with quote

:=:=:=I am trying to use the ICD2,18F452, and PCH compiler. I am looking for a way to load my compiled code into MPLAB. Has anyone found a method for doing this?
:=:=:=
:=:=:=I can get MPLAB 5.7 to work with this environment, but I would like to take advantage of the USB faster interface.
:=:=:=
:=:=:=Any help would be appreciated.
:=:=You can import the .cod file. It gives you access at the 'assembler' level, to run the code, but no access to the original source.
:=:=
:=:=Best Wishes
:=
:=When I try to import the .cod file MPLAB gives me an error "... could not be loaded because the format as indicated by its extension is not recognized" What do you think???

Sorry, I meant the .hex file... (embarassed grin).
If it could access the .cod file, it'd have the debugging information, but the .hex file allows the 'assembler' level access (but with no symbolic data).

Best Wishes
___________________________
This message was ported from CCS's old forum
Original Post ID: 8606
rocco
Guest







Re: ICD2, 18F452, MPLAB6.02, and PCH compiler operation?
PostPosted: Wed Nov 06, 2002 12:51 pm     Reply with quote

I recently have been running .cod files under MPLAB 6.00.20 (programming a 18F452). I have not moved over to USB, but even running serial @ 57K feels better than MPLAB 5.7. ALso the interface is much better at debugging/stepping through code. I would like to find a hack for better integration between the two until official support comes out next year :(

R

:=:=:=:=I am trying to use the ICD2,18F452, and PCH compiler. I am looking for a way to load my compiled code into MPLAB. Has anyone found a method for doing this?
:=:=:=:=
:=:=:=:=I can get MPLAB 5.7 to work with this environment, but I would like to take advantage of the USB faster interface.
:=:=:=:=
:=:=:=:=Any help would be appreciated.
:=:=:=You can import the .cod file. It gives you access at the 'assembler' level, to run the code, but no access to the original source.
:=:=:=
:=:=:=Best Wishes
:=:=
:=:=When I try to import the .cod file MPLAB gives me an error "... could not be loaded because the format as indicated by its extension is not recognized" What do you think???
:=
:=Sorry, I meant the .hex file... (embarassed grin).
:=If it could access the .cod file, it'd have the debugging information, but the .hex file allows the 'assembler' level access (but with no symbolic data).
:=
:=Best Wishes
___________________________
This message was ported from CCS's old forum
Original Post ID: 8613
Samir Berjaoui
Guest







Re: ICD2, 18F452, MPLAB6.02, and PCH compiler operation: Is
PostPosted: Sat Nov 09, 2002 9:22 pm     Reply with quote

Hi everybody,

I've got great news I would like share with you.

I was able, just this morning, to debug at source level my CCS compiled C code.

MPLAB 5.7 was a nightmare: Slow programming and crashes when you want to watch some simple variables.

This is how it works:

- I am compiling in PCWH, but I am sure you can achieve the same result w/ command line switches, having the extended COD option selected. I did not try other options!

- My advise is to get the USB link going. It's much faster and more reliable than 56K baud serial. I had to update the operating system in ICD2. It was a trouble at first, but after few trials switching between serial and USB methods, I managed to get it going.

- Make sure you pull the serial cable from the PC or the ICD2 when using USB; otherwise the USB link will fail.

- Create a project in MPLAB IDE 6.00.20 and set your config bits appropriately and select the correct UC (e.g. 18F452). I am using 18F452 and it's working OK.

- In the Select Language toolsSuite, select Hi-tech compiler and don't bother setting the link/path to CCS compiler because you won't be able to compile from within MPLAB IDE. This option will only allow you to add a C source file to the project in the IDE.

- Add your C file to the project source list; save project and environment. I have encountered a saving error but it still saved the proj.

- now import your .cod then the .hex.

set the upper address in programming options to be bigger than your object size. For instance, in my case, the .lst reported:
ROM used: 3364 (21\%), that's # of 16 bit words so that's 6,728 bytes = 1A48 in hex. so I set the upper address to 1FFF just to be safe. You can set it to the default (max) and suffer longer programming time.

- now click on program target chip icon.

- set a brake point and watch variables and enjoy C level debugging!

MPLAB IDE still crashes every now and then; however, despite the above quirks, it's still much more productive than 5.7. I hope CCS convinces Microchip to add their compiler option with the IDE soon.

Now I have a little problem; hopefully someone can help.
Some of my global variables (8 bit and 16) are not showing in the variables/symbols list and I am not able to enter their hex address as we used to in 5.7. My only option is to view them in the file register dump. Which makes it hard to view the value of a decimal value of a float (I know about the CCS little conversion util, but still!). By the way, Microchip float option in the watch window gives wrong values. They took away the byte order option from floats and they are looking at the bytes in the wrong order. Actually their float is stored in the opposite order than everything else. MSByte at lower address besides the sign bit not being the msb of the 32-bit word!

Regards,

Samir Berjaoui

>I am trying to use the ICD2,18F452, and PCH compiler. I am
>looking for a way to load my compiled code into MPLAB. Has >anyone found a method for doing this?>:I can get MPLAB 5.7 to
>work with this environment, but I would like to take advantage
>of the USB faster interface.
>
>Any help would be appreciated.
___________________________
This message was ported from CCS's old forum
Original Post ID: 8720
Marty Burns
Guest







Re: ICD2, 18F452, MPLAB6.02, and PCH compiler operation: Is
PostPosted: Tue Nov 12, 2002 5:28 pm     Reply with quote

Thanks for the responses. I have tried building this project with the PCH compiler. However, the .COD file is still not understood. My last attempt at a command line was:


CCSC +DC +LS +Z +FH +STDOUT +t target.c

I do not have the CCS IDE. Do you know what flags to use?

Thanks,
Marty

:=Hi everybody,
:=
:=I've got great news I would like share with you.
:=
:=I was able, just this morning, to debug at source level my CCS compiled C code.
:=
:=MPLAB 5.7 was a nightmare: Slow programming and crashes when you want to watch some simple variables.
:=
:=This is how it works:
:=
:=- I am compiling in PCWH, but I am sure you can achieve the same result w/ command line switches, having the extended COD option selected. I did not try other options!
:=
:=- My advise is to get the USB link going. It's much faster and more reliable than 56K baud serial. I had to update the operating system in ICD2. It was a trouble at first, but after few trials switching between serial and USB methods, I managed to get it going.
:=
:=- Make sure you pull the serial cable from the PC or the ICD2 when using USB; otherwise the USB link will fail.
:=
:=- Create a project in MPLAB IDE 6.00.20 and set your config bits appropriately and select the correct UC (e.g. 18F452). I am using 18F452 and it's working OK.
:=
:=- In the Select Language toolsSuite, select Hi-tech compiler and don't bother setting the link/path to CCS compiler because you won't be able to compile from within MPLAB IDE. This option will only allow you to add a C source file to the project in the IDE.
:=
:=- Add your C file to the project source list; save project and environment. I have encountered a saving error but it still saved the proj.
:=
:=- now import your .cod then the .hex.
:=
:=set the upper address in programming options to be bigger than your object size. For instance, in my case, the .lst reported:
:= ROM used: 3364 (21\%), that's # of 16 bit words so that's 6,728 bytes = 1A48 in hex. so I set the upper address to 1FFF just to be safe. You can set it to the default (max) and suffer longer programming time.
:=
:=- now click on program target chip icon.
:=
:=- set a brake point and watch variables and enjoy C level debugging!
:=
:=MPLAB IDE still crashes every now and then; however, despite the above quirks, it's still much more productive than 5.7. I hope CCS convinces Microchip to add their compiler option with the IDE soon.
:=
:=Now I have a little problem; hopefully someone can help.
:=Some of my global variables (8 bit and 16) are not showing in the variables/symbols list and I am not able to enter their hex address as we used to in 5.7. My only option is to view them in the file register dump. Which makes it hard to view the value of a decimal value of a float (I know about the CCS little conversion util, but still!). By the way, Microchip float option in the watch window gives wrong values. They took away the byte order option from floats and they are looking at the bytes in the wrong order. Actually their float is stored in the opposite order than everything else. MSByte at lower address besides the sign bit not being the msb of the 32-bit word!
:=
:=Regards,
:=
:=Samir Berjaoui
:=
:=>I am trying to use the ICD2,18F452, and PCH compiler. I am
:=>looking for a way to load my compiled code into MPLAB. Has >anyone found a method for doing this?>:I can get MPLAB 5.7 to
:=>work with this environment, but I would like to take advantage
:=>of the USB faster interface.
:=>
:=>Any help would be appreciated.
___________________________
This message was ported from CCS's old forum
Original Post ID: 8822
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group