Home
Prox / RFID
Verichips
Ladder Logic
[interfacing] †
Tube Joints
Key Code From Photo
SolveSpace (3d CAD)
SketchFlat (2d CAD)
Photographs
Miscellany
Resume / Consulting
Contact Me

LDmicro Forum - Tiny bootloader strange behaviour

(you are viewing a thread; or go back to list of threads)

Tiny bootloader strange behaviour (by Antonio Sergio Sena)
Hello,

thanks for this great compiller!


i am having the following problem when using TINY Bootloader ::


Connected to \\.\COM1 at 19200
HEX: 0 min old, INHX32,16Fcode+cfg, total=238 bytes.
Searching for PIC ...
Found:16F 886/887
WARNING: PCLATH not fully initialised before GOTO! ... could not repair !!!,
Maybe you sould use some directive in your compiler to enable the use of bootloaders
WRITE OK at 10:58, time:0.282 sec


Using PIC16F886 with 4MHz crystal, 19200bps.

Is there a fix for this?
Fri Jul 17 2009, 06:14:57
(no subject) (by Jonathan Westhues)
Interesting. Looks like the bootloader wants me to initialize PCLATH before the goto that jumps to the main program. But PCLATH is guaranteed to be all zeroes after reset, and that's what I want, so this initialization should be unnecessary.

Does the program still work? If it does, then you can just ignore the warning.

If not, then please attach a .hex file for a program that does work with that bootloader, and I'll see if LDmicro can copy that format.
Fri Jul 17 2009, 12:58:07
Files used with Tiny (by Antonio Sergio Sena)
No the program doesnt work, neither the Tiny. I need to hard-program the PIC with Tiny again.


I attach the ASM and HEX files that i am using for the Tiny. 16F886, internal 4MHz, 19200bps

The ASM and HEX example is what i wrote to give a small test program. It works and allows programming every time.

Hope it helps.
Thanks for the great effort.
Sat Jul 18 2009, 08:17:59, download attachment ASM_&_HEX___examples_for_Tiny.zip
(no subject) (by Jonathan Westhues)
This is really a bug in the bootloader. LDmicro leaves the first four instructions of the program free to rewrite, as long as the bootloader finishes by jumping to main.

But the attached build will probably work with your bootloader. I added some instructions to clear the high bits of PCLATH before jumping. This doesn't change how the code works, but I'm guessing that's what your bootloader expects.

Please let me know how it works. And please also confirm that the target still works when you program it manually (without a bootloader).
Sat Jul 18 2009, 17:30:09, download attachment ldmicro.zip
(no subject) (by Antonio Sergio Sena)
Hello Jonathan,

indeed it works, both with bootloader and manually.

I am using Internal Osc, and even if LDmicro gives a HEX with XT/HS Osc, the bootloader just ignores that. Which is good for me, because the bootloader doesnt write Fuses.

Thanks very much for your efforts!
Kind regards.
Sun Jul 19 2009, 14:51:03
si trabaja muy bien (by Daniel)
hola buenas tardes Jonathan
esta versión si me trabaja muy bien con el micro 16f876A el bootloader a 56000 bautios con el PICbootPlus gracias
Tue Feb 7 2017, 18:44:09
(no subject) (by Ihor Nehrutsa)
Wed Feb 8 2017, 16:38:53
Post a reply to this comment:
Your Name:
Your Email:
Subject:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):