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

please explain this issue when compiling code...

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



Joined: 17 Dec 2005
Posts: 58

View user's profile Send private message

please explain this issue when compiling code...
PostPosted: Tue Jul 25, 2006 8:34 pm     Reply with quote

When compiling code in CCS/MPLAB, the first line always appears like this...
EF52 F004 FFFF FFFF 6AF7 0F1C 6EF6 0E08
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Jul 25, 2006 8:39 pm     Reply with quote

Look at the .LST file for an explanation. You can find it in your project
folder.
ktallevi



Joined: 17 Dec 2005
Posts: 58

View user's profile Send private message

list file
PostPosted: Tue Jul 25, 2006 9:03 pm     Reply with quote

well according to the list file of one of my projects...

00000: GOTO 058C
ktallevi



Joined: 17 Dec 2005
Posts: 58

View user's profile Send private message

posting
PostPosted: Tue Jul 25, 2006 9:06 pm     Reply with quote

seems only a portion of my posts are actually getting posted, ok so that jump still doesnt explain WHY its there
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Jul 25, 2006 9:12 pm     Reply with quote

The PIC starts executing code at address 0000 upon reset.
The compiler puts an instruction there to jump to the start of the program.
Scroll down in the .LST file until you get to address 0x058C.
What does the compiler show is there ? (In C source code)
ktallevi



Joined: 17 Dec 2005
Posts: 58

View user's profile Send private message

list file
PostPosted: Tue Jul 25, 2006 9:36 pm     Reply with quote

.................... void main(void)
.................... {
*
0058C: CLRF FF8
0058E: BCF FD0.7
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Jul 25, 2006 9:40 pm     Reply with quote

That answers your question. The code you see at the start of main()
is the compiler's start-up code. It does a small amount of initialization
of ports and registers, and then begins executing your code.
ktallevi



Joined: 17 Dec 2005
Posts: 58

View user's profile Send private message

bootloader
PostPosted: Tue Jul 25, 2006 9:42 pm     Reply with quote

thanks for your help, this all started when i was converting loader.c to work with pic18f8722 (which writes 64bytes at a time), i was reading the packet and realized there was data missing. Ill finish the bootloader and post it.
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