Re: sdcc/PIC howto, first draft is up
Byron A Jeff <[email protected]>
| Newsgroups | gmane.comp.hardware.microcontrollers.gnupic |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Jul 20, 2005 at 01:27:17AM +1200, David McNab wrote: Thanks to the list member that pointed out mutt's mailing list features. This is my first post using the L command for list reply only. > Peter Onion wrote: > >>However, building those exact same sources using my modified crt0 and > >>linker script, and according to the instructions posted gave me reliable > >>running programs. > > > What exactly went wrong ? > > The printf call caused a device reset. > > The lcd test prog either froze or reset at unpredictable stages. > > Again - these problems don't happen with custom crt0/.lnk/Makefile Peter, I think you may have missed a key point that David pointed out in his HOWTO. He us using an 18F bootloader that expects a jump to the main code in the first 4 words of the program. Most likely this is because those 4 words are transported to a different located by the bootloader. They are executed from that location and then jumps to the main. Where is the original code for crt0. A brief examination can check for this. David, I think that Peter is correct. Show how to do it with the stock crt0 then show the bootloader version. If you get a minute you may want to check the code out yourself. Simply compile your programs with the normal crt0 then burn the hex file directly to a chip without using the bootloader. If they work, then the bootloader is causing the problem. BAJ