Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
'call bootloader' cmd for MX220
30-03-2012, 08:56 PM,
#1
'call bootloader' cmd for MX220
I got one of those free PIC32 Pinguino MX220 from Olimex on the "Embedded" fair. So I am just getting to know Pinguino.
As far as I learned there is no asm inline coding with the IDE.

I am looking for a "Call Bootloader()" function. I want to be able to exit the loop() and to return to the Bootloader mode by software.
(Pushing the tiny buttons on the pcb is a bit clumsy Angry)
Is there a way to implement this into one of the libraries ?
What is the entry address of the bootloader ?
Reply
31-03-2012, 12:32 PM,
#2
RE: 'call bootloader' cmd for MX220
I expect you can use asm. (Just as the support code does. Maybe see how it does it.)

The entry address is in the device data sheet Smile

You may have to change some programmed values but just play and see!

John
Reply
31-03-2012, 10:46 PM,
#3
RE: 'call bootloader' cmd for MX220
(30-03-2012, 08:56 PM)nanking Wrote: ...
What is the entry address of the bootloader ?

I'd bet on 0x0000.

Also, writing something like
Code:
int x = 1/0;
... might do the job just fine... Smile
(If the exception triggered by the divide-by-zero is not caught in an appropriate interrupt-vector, that is.)

But John is right, better look it up in the manual: http://www.dltk-bible.com/genesis/chapter1-kjv.htm Idea
Reply
01-04-2012, 04:55 PM,
#4
RE: 'call bootloader' cmd for MX220
Don't think it's 0. And expect 1/0 not to work.

Too much effort to actually help?

John
Reply
02-04-2012, 01:20 AM,
#5
RE: 'call bootloader' cmd for MX220
I got the reset address / entry point: 0xBFC00000
(which is the virtual address accessible from the user application)

asm("la $ra,0xBFC00000");
asm("jr $ra");
asm("nop");

however there, the PIC expects button1 to be pushed and released, otherwise it will not start the bootloader mode. Sad

I will need to disassemble the bootloader code or get the source to determine the exact address.

where can i get the bootloader binary or source ?
Reply
02-04-2012, 10:00 AM,
#6
RE: 'call bootloader' cmd for MX220
hex in the wiki

Appears to be closed source, but based on Microchip USB HID bootloader,

John
Reply
02-04-2012, 04:30 PM,
#7
RE: 'call bootloader' cmd for MX220
@pingotg,nanking
Sorry folks, I was just kidding there.

This doc might be helpful: PIC32 Family Reference Manual, Sect. 07 Resets http://ww1.microchip.com/downloads/en/De...61118F.pdf

Quote:7.2: ...
The RSWRST control register has only one bit, SWRST. This bit is used to force a software Reset
condition.
...
Reply
11-06-2012, 11:42 AM,
#8
RE: 'call bootloader' cmd for MX220
@nanking:

Did you succeed in switching the device into bootloader mode with a software-only approach?

If so, would you mind sharing your findings?

Thanks in advance.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)