View previous topic :: View next topic |
Author |
Message |
SeeCwriter
Joined: 18 Nov 2013 Posts: 160
|
List file content |
Posted: Tue Jun 09, 2015 10:00 am |
|
|
I'm curious about some assembly code that shows up in the list file.
I'm using v5.046 PCWHD with an 18F87J60. Naturally, the first include file is the device, 18F87J60.h. At the end of the device header file is #list. But since I don't want to list all the contents of the standard include files, I have a #nolist immediately after the device header file.
#include <18F87J60.h>
#nolist
Then at the beginning of my code I have a #list. Pretty basic.
In the list file, right after the memory usage header there is a goto statement followed by 70 lines of setup code. Again, expected. Then it shows the first line of the device header (#device PIC18F87J60) followed by 1510 lines of assembly code. What is all that code. Does the PIC need that much initialization code?? And why is it showing up in the list file? |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9228 Location: Greensville,Ontario
|
|
Posted: Tue Jun 09, 2015 11:07 am |
|
|
Without seeing the code it's hard to say what it is, but there's a lot of code needed for USE RS232(...) as well as printf...... .
As to what it is, you can decode it all by looking at the PIC datasheet's 'registers' and 'instruction set'.
Jay |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19515
|
|
Posted: Tue Jun 09, 2015 11:43 am |
|
|
Try it without your nolist/list statements.
#nolist, turns off listing of the CCS code, but leaves _your_ code still being listed.
There is a #nolist already at the start of the processor include file.
Your #list is turning back on the listing of the CCS code used in your routines.
Now it is impossible to know what your block of assembler is actually for. However there will be large blocks for const arrays, the RS232 code, any routines for things like I2C. Do you have interrupts being used?. etc. etc.. |
|
|
|