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

Some bloader help!

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



Joined: 12 May 2004
Posts: 54
Location: edinburgh, Scotland

View user's profile Send private message

Some bloader help!
PostPosted: Sat Oct 30, 2004 8:04 am     Reply with quote

Until recently i've been surviving wihtout bootloaders, but there's only so long i can avoid the issue.

I've compiled the EX_LOAD.C example and loaded it onto my PIC. i can then see the "Software Version A!" messages, etc. When i go to load a program, i send the .hex file as text, adn get a shed load of characters looking like spades coming up. After about 7 lines of these, it stops dead. Even after a hardware reset, the program is just as before.
And yes, i am using XON/XOFF flow control.

What am I not doing / doing wrong? Any feedback / suggestions / slaps across the face with a wet trout would be appreciated.
-JBM
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Sat Oct 30, 2004 8:48 am     Reply with quote

From the top of loader.c:
Quote:
After each good line, the loader sends an ACKLOD character.

combined with
Code:

#define ACKLOD 0x06

Then look up the character code 0x06 in the IBM PC Extended Character Set (ECS) and you will notice this is a spade symbol (see this link for a description of ECS characters).

Basically this means your bootloader is downloading a large part of your program correctly before failure. Without more information I can't tell you whether the error is in the bootloader or in your downloaded program. To figure this out out I suggest you add a special message to the end of the bootloader, just before it resets the CPU. For example, modify the end of loader.c to look like:
Code:
   putchar (ACKLOD);
   puts('Finished');    // Add this line
   putchar(XON);
   reset_cpu();
}


After this modification download your program again. If the new added text shows up in your terminal emulator, then you know the error is most likely not in the bootloader but in your own program.
dan king



Joined: 22 Sep 2003
Posts: 119

View user's profile Send private message

PostPosted: Sat Oct 30, 2004 9:21 am     Reply with quote

one suggestion would be to try and add character or line delays from the terminal emulation program. That helped me on several occasions. If hardware flow control is not used, as in the bootloader you are using, the flow isn't effectively stopped all the time. If you are using hyperterm, in the advanced ascii setup there are several delay settings you can try, they slow the transfer down so you can see if the file transfer gets further along in the process.

Just a suggestion but worked for me.

Dan
JBM



Joined: 12 May 2004
Posts: 54
Location: edinburgh, Scotland

View user's profile Send private message

PostPosted: Tue Nov 02, 2004 3:01 pm     Reply with quote

Many stressful hours later, I've come back for more help. It acknowleges the \r character coming in, but it never reaches the end of the real_load_program() function.

For the moment, the fact that it seems to be doing bugger all to alter my program is a secondary concern!

If anyone has a working implementation of LOADER.C and is willing to share code ( and a bit about #ORGing out memory ) I would be über-grateful.

-JBM
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