View previous topic :: View next topic |
Author |
Message |
legion
Joined: 10 Oct 2007 Posts: 23
|
MPLAB & .LST files |
Posted: Tue Apr 29, 2008 8:21 am |
|
|
I would like to see the .LST files created by the CCS compiler show up in MPLAB and although I can open them in there, the Microchip IDE keeps telling me that the file has changed after every compilation and asks if I want to reload it - which is a right pain.
Having read everything I can find about it I'm still not sure how .LST files are supposed to integrate with everything else. They hardly get a mention in the MPLAB documentation. |
|
|
Matro Guest
|
|
Posted: Tue Apr 29, 2008 8:28 am |
|
|
.lst file is a listing file that just show the intermediate assembly code that is generated by CCS.
But that is not used to program a device or something like that.
For programming the device you should use the .hex file that is generated by CCS, and for debugging it can be a .cof or a .cod file.
Although it is assembly code, .lst file is done for "human" purpose to check the generated code if needed.
Matro. |
|
|
legion
Joined: 10 Oct 2007 Posts: 23
|
|
Posted: Tue Apr 29, 2008 10:04 am |
|
|
Hi Matro. That's a shame because I find the .LST file really quite useful when writing code. It often helps me spot inefficiencies in the way I'm writing C - it also gives invaluable statistics about memory and stack usage.
I'm used to working with CCS in an ICEPIC emulation environment which not only supports the .LST file but also lets you step through the code assembly instruction by assembly instruction in that file. Unfortunately since Microchip don't make emulation chips that can be sold in European countries due to the Lead-free directive, it's becoming necessary for me to use ICD more and more |
|
|
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Tue Apr 29, 2008 11:00 am |
|
|
Like Matro said, the list file is just a text file generated by the compiler for your info. MPLAB treats it as such and warns you the external file has changed, what other behaviour do you want? MPLAB is from Microchip, so direct your complaints to them.
In MPLAB have a look at the Disassembly Listing (Under the View menu). I guess this is what you really are looking for, it looks a lot like the list file and here you can single step and set breakpoints.
Quote: | Unfortunately since Microchip don't make emulation chips that can be sold in European countries due to the Lead-free directive, it's becoming necessary for me to use ICD more and more | This is true for production series, but for test purposes you can still buy the lead containing components. |
|
|
RLScott
Joined: 10 Jul 2007 Posts: 465
|
Re: MPLAB & .LST files |
Posted: Tue Apr 29, 2008 1:48 pm |
|
|
legion wrote: | I would like to see the .LST files created by the CCS compiler show up in MPLAB and although I can open them in there, the Microchip IDE keeps telling me that the file has changed after every compilation and asks if I want to reload it - which is a right pain.
|
I also look at the .LST file frequently after a CCS compile. But all you have to do is hit Enter when you see the prompt. Is that such a pain?
Robert Scott
Real-Time Specialties |
|
|
Matro Guest
|
|
Posted: Wed Apr 30, 2008 1:36 am |
|
|
legion wrote: | Hi Matro. That's a shame because I find the .LST file really quite useful when writing code. It often helps me spot inefficiencies in the way I'm writing C - it also gives invaluable statistics about memory and stack usage.
I'm used to working with CCS in an ICEPIC emulation environment which not only supports the .LST file but also lets you step through the code assembly instruction by assembly instruction in that file. Unfortunately since Microchip don't make emulation chips that can be sold in European countries due to the Lead-free directive, it's becoming necessary for me to use ICD more and more |
Normally, debuggers and emulators should use the .cof or .cod file, and not the .lst one.
For statistics, CCS generates a complete .sta file.
But you're right to use it to find inefficiency since it's done for that (and to find eventual compiler bugs).
As already said, Lead-free and ROHS apply only for mass production devices, but not for development products.
Matro |
|
|
legion
Joined: 10 Oct 2007 Posts: 23
|
|
Posted: Wed Apr 30, 2008 2:30 am |
|
|
OK, thanks all. I guess I'll have to live with the reload? dialogue popping up after every compile.
ckielstra wrote: | Like Matro said, the list file is just a text file generated by the compiler for your info. MPLAB treats it as such and warns you the external file has changed, what other behaviour do you want? MPLAB is from Microchip, so direct your complaints to them.
In MPLAB have a look at the Disassembly Listing (Under the View menu). I guess this is what you really are looking for, it looks a lot like the list file and here you can single step and set breakpoints. |
I have looked at this dissasembly listing but it only seems to show one assembly instruction for each line of source code... obviously a line of C source is likely to correspond to many instructions! Have I missed a way to see the full listing?
ckielstra wrote: | Quote: | Unfortunately since Microchip don't make emulation chips that can be sold in European countries due to the Lead-free directive, it's becoming necessary for me to use ICD more and more | This is true for production series, but for test purposes you can still buy the lead containing components. |
I don't understand this. The manufacturer of the ICEPIC emulator (RF Solutions in the UK) is selling its products into Europe. So are you saying that test equipment products can contain lead? This is the reason they have given for discontinuing the products anyway. |
|
|
RLScott
Joined: 10 Jul 2007 Posts: 465
|
|
Posted: Wed Apr 30, 2008 4:25 am |
|
|
legion wrote: |
I have looked at this dissasembly listing but it only seems to show one assembly instruction for each line of source code... obviously a line of C source is likely to correspond to many instructions! Have I missed a way to see the full listing? |
It is often the case that a single C source line will result in only a single PIC assembly instruction. That is the sign of an optimized compiler and good design by Microchip. But some C lines must produce several lines of assembly code. Try looking at something like
if(x < y) x = y;
Robert Scott
Real-Time Specialties |
|
|
Blob
Joined: 02 Jan 2006 Posts: 75 Location: Neeroeteren, Limburg, Belgium
|
|
Posted: Wed Apr 30, 2008 6:14 am |
|
|
Quote: | I don't understand this. The manufacturer of the ICEPIC emulator (RF Solutions in the UK) is selling its products into Europe. So are you saying that test equipment products can contain lead? This is the reason they have given for discontinuing the products anyway. |
In europe, the PCB assembler machines are changed into lead free soldering.
(read "should be changed")
On these machines you can not solder components containing lead, as they will pollute the thin bath.
If you are soldering it yourself at home, you can use lead free and components that contain lead all together.
I assume you don't have a thin bath at your home...
therefore here in europe all components are changing to lead free, and the lead containing ones are disappearing.
Best Regards |
|
|
|