Bootloader questions

General discussion on mikroBasic PRO for PIC32.
Post Reply
Author
Message
serge87
Posts: 45
Joined: 12 Sep 2012 17:55

Bootloader questions

#1 Post by serge87 » 15 Dec 2015 11:06

Hello.
I'm in the process of constructing my own bootloader and I have some questions:
hardware:
CPU: PIC32MX795F512H
clock: 20MHz crystal x 4PLL = 80MHz clock
custom made PCB
The questions:
1. I've managed to write the bootloader in the boot region of the CPU but i don't know how to tell it to jump at the beginning of the main program, wich is at address 0x9D000004.
The first word of the address (0x9D000000 ) I want to use it for storing the version of the main program.
2.How can I read the above flash address? I have no "Flash_read" function in the compiler library.
3. If i exit the bootloader (by jumping to the main program), how can I reset the registers used by bootloader (interrupt vectors, ram locations, stack, etc), or the program initialisation done by compiler will take care of that?
4. Can I rewrite the bootloader program from my main program, in case I need to update some things in the future?

Thank You!

P.S. The bootloader will function over UART and with a flash memory chip.
Just tell me....

serge87
Posts: 45
Joined: 12 Sep 2012 17:55

Re: Bootloader questions

#2 Post by serge87 » 20 Dec 2015 11:36

Problem solved.
After a few days of brainstorming. :?
Just tell me....

Post Reply

Return to “mikroBasic PRO for PIC32 General”