|
|
View previous topic :: View next topic |
Author |
Message |
Tagge
Joined: 23 Aug 2005 Posts: 93
|
Bootloader? |
Posted: Fri Feb 24, 2006 6:28 am |
|
|
Is there somewhere out there a bootloader for:
pic18f2525
xt 4Mhz
software rs232 uart
thankful for any suggestions |
|
|
asmallri
Joined: 12 Aug 2004 Posts: 1634 Location: Perth, Australia
|
|
Posted: Fri Feb 24, 2006 10:14 am |
|
|
I can probably help. I will PM you. _________________ Regards, Andrew
http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!! |
|
|
Tagge
Joined: 23 Aug 2005 Posts: 93
|
|
Posted: Tue Feb 28, 2006 3:51 am |
|
|
Hi,
a rather good link for some hints that I found on the net.
For CCS bootloader.
http://www.commlinx.com.au/PIC_bootloader.htm
It seems that the CCS loader is possible to use as i wanted....
I will be back if i manage to get it work, maybe someone else also needs this kind of a bootloader, and for free..
Hints are welcome,
tagge |
|
|
Tagge
Joined: 23 Aug 2005 Posts: 93
|
|
Posted: Wed Mar 01, 2006 7:03 am |
|
|
Hi out there,
I managed to get the CCS loader to work but with some problems.
The brownout detection and maybe even some other fuses dont seems to work?
its set in the fuses in both bootloader and application but after I programmed the chip thru bootloader it doesnt work. I have to wait for at least a minute(due to some caps, to <0,5V) after powerdown until i get a proper reset? if I start it before that its stuck in the last mode, no proper reset done.
Do I have to relocate reset vector and interrupt vectors, have they something to do with it? and where? are some fuses overwritten, is it possible?
I get the feeling that the reset vector is in some wrong place?
Is this the right settings for a 18F2525? I had to set the isr loader_end to +9, else I got a invalid org range?
Code: |
#define LOADER_END 0x4FF
#define LOADER_SIZE 0x3FF
#ifndef _bootloader
#build(reset=LOADER_END+2, interrupt=LOADER_END+9)
#org 0, LOADER_END {}
#endif
|
In my .lst file of the application
Code: |
0500: GOTO 3FAA //reset moved from 0x0 to 0x4FF+2 !=0x0500, not OK? shouldnt it be 0x0501? but the goto adress is right.
*
0508: GOTO 05B8 //this is isr?
050C: NOP
050E: NOP
//further
05B6: RETFIE 0
05B8: MOVWF 19 //isr to here? wrong?
05BA: MOVFF FD8,1A
//further
.................... void main(void)
.................... {
*
3FAA: CLRF FF8 //this is OK
|
Fuses settings, the same in bootloader.c and my application.c
something wrong with them?
Code: |
#include <18F2525.h>
#device HIGH_INTS=true
//#device ICD=TRUE
#device adc=8
#FUSES WDT //Watch Dog Timer
#FUSES WDT128 //Watch Dog Timer uses 1:128 Postscale
#FUSES XT //Crystal osc <= 4mhz
#FUSES NOPROTECT //Code not protected from reading
#FUSES NOIESO //Internal External Switch Over mode disabled
#FUSES BROWNOUT //Reset when brownout detected
#FUSES BORV27 //Brownout reset at 2.7V
#FUSES PUT //Power Up Timer
#FUSES NOCPD //No EE protection
#FUSES STVREN //Stack full/underflow will cause reset
#FUSES DEBUG //Debug mode for use with ICD
#FUSES NOLVP //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O
#FUSES NOWRT //Program memory not write protected
#FUSES NOWRTD //Data EEPROM not write protected
#FUSES NOEBTR //Memory not protected from table reads
#FUSES NOCPB //No Boot Block code protection
#FUSES NOEBTRB //Boot block not protected from table reads
#FUSES NOWRTC //configuration not registers write protected
#FUSES NOWRTB //Boot block not write protected
#FUSES FCMEN //Fail-safe clock monitor enabled
#FUSES NOXINST //Extended set extension and Indexed Addressing mode disabled
#FUSES NOPBADEN //PORTB pins are configured as digital I/O on RESET
#FUSES LPT1OSC //Timer1 configured for low-power operation
#FUSES MCLR //Master Clear pin enabled
#use delay(clock=4000000)
|
Beside that above the whole application seems to work ok, and
I got the software UART to work as well, so, if someone needs help with that Im at yor use..
Have a bugless day/ |
|
|
|
|
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
|