Bootloader works only once [solved] - Printable Version +- ds30 Loader free edition forums (https://picbootloader.com/forum) +-- Forum: Support (https://picbootloader.com/forum/forumdisplay.php?fid=3) +--- Forum: 8-bit firmwares (https://picbootloader.com/forum/forumdisplay.php?fid=7) +--- Thread: Bootloader works only once [solved] (/showthread.php?tid=17) |
Bootloader works only once [solved] - vincewyh - 2010-11-02 I have successfully programmed the bootloader for my PIC18F67J10 running at 20Mhz. When compiling the bootloader source, an error came out when I set CONFIG FOSC = HS. So i removed it and it re-compiles. I manually set the FOSC fuse from MPLAB before programming the device using ICD2. The bootloader is then detectable by the ds30 Loader GUI and I have successfully loaded my own app hex file and it rebooted and everything works fine. However, when i manually reset the device, the ds30 Loader GUI app dont seem to be able to detect the bootloader anymore. So, i wasn't able to load another hex file to it via the bootloader. Please advice. RE: Bootloader works only once - Lotusx - 2010-11-02 Hello, As you change OSC by FOSC this make conflict with the definition of FOSC in settings.inc just after "radix DEC". You could change FOSC to FSC in settings.inc and also in ds30loader.asm line 158 & 162. About your bootloader not respondig after reset, if you set config bits in your program, they are programmed by the bootloader (place config bits only in one place). Lotusx. RE: Bootloader works only once - Mikael Gustavsson - 2010-11-02 It's not a problem have configs defined in both places. Just don't check "write configs" in the gui (only available if advanced mode is activated). Here's the latest version of the PIC18FJ firmware where the FOSC is renamed for better compatibility. [broken link] Did you check "write configs"? RE: Bootloader works only once - Lotusx - 2010-11-02 Agree with you mackey, you can have config in both places. Personnaly, I prefer defining config in only one place, because it can lead to some difficulties (If you're dizzy like me ). RE: Bootloader works only once - vincewyh - 2010-11-03 (2010-11-02, 14:55:18)Lotusx Wrote: Hello, Hi Lotusx, It worked now after using latest version of the PIC18FJ firmware. However there are some modifications:- 1) The GUI doesn't recognize ver1.0.3 yet and doesn't let me proceed, so i renamed it back to ver1.0.2. #define VERREV 2 2) The Configuration bits at settings.inc is not compatible with PIC18F67J10 so I have made some modifications and commented out the unused ones:- ;for pic18f67j10 CONFIG WDTEN = OFF ;wathcdog timer CONFIG STVREN = OFF ;stack over-/underflow reset CONFIG XINST = OFF ;extended instruction set CONFIG CP0 = OFF ;code protect CONFIG FOSC = HS ;oscillator ;CONFIG T1DIG = OFF ;T1OSCEN enforcement ;CONFIG LPT1OSC = OFF ;low-power timer1 oscillator CONFIG FCMEN = OFF ;fail-safe clock monitor CONFIG IESO = OFF ;nternal External Oscillator Switch Over Mode CONFIG WDTPS = 1 ;watchdog postscaler ;CONFIG DSWDTOSC= INTOSCREF ;dswdt clock select ;CONFIG RTCOSC = INTOSCREF ;rtcc clock select ;CONFIG DSBOREN = OFF ;deep sleep bor ;CONFIG DSWDTEN = OFF ;deep sleep watchdog timer ;CONFIG DSWDTPS = 2 ;deep sleep watchdog postscaler ;CONFIG IOL1WAY = OFF ;iolock one-way set enable bit ;CONFIG MSSP7B_EN=MSK5 ;mssp address masking ;CONFIG WPFP = PAGE_0 ;write/Erase Protect Page Start/End Location: ;CONFIG WPEND = PAGE_0 ;write/Erase Protect Region Select bit (valid when WPDIS = 0): ;CONFIG WPCFG = OFF ;write/Erase Protect Configuration Region ;CONFIG WPDIS = OFF ;write Protect Disable bit Very Nice Bootloader! No modification needed for my application hex file! |