bertronicom
Joined: 17 Nov 2004 Posts: 26 Location: University of Cantabria -SPAIN
|
<loader.c> never ends when bootloading!!! |
Posted: Thu Mar 16, 2006 7:07 am |
|
|
I'm trying to do a bootloader by serial port.
I've coded this: Code: |
#IF USE_BOOTLOADER
#define _bootloader
#include <bootloader.h>
#include <loader.c>
int8 SelfProgram=1;
#ENDIF
void main() {
while (1) {
My_Application();
if (SelfProgram) {
SelfProgram=0;
fprintf( CH2 , "Booting...\r\n" );
setup_wdt(WDT_OFF);
real_load_program();
}
}
}
|
1 STEP: I run this program which is listen serial port all the time.
2 STEP: I open SIO software and I open a new .hex file
3 STEP: Download .hex file I'm seeing so many lines of the file in screen
4 STEP: Last line seen in the screen is \0A;PIC18F6622\0D
5 STEP: My program is hanged
What Can I do to solve this???
Thanks in advance. |
|