Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
LD scripts, APP_FLASH_BASE_ADDRESS, kseg0_program_mem, bootloader
01-07-2012, 10:22 AM,
#1
LD scripts, APP_FLASH_BASE_ADDRESS, kseg0_program_mem, bootloader
Hi all,
I've managed to brick my Duinomite while flashing is with a hex file, and I believe I've overwritten the bootloader.

Microchips code base for the HID bootloader appears to attempt to guard against overwriting the config and bootloader memory. Since Olimex and other don't share the code because of licensing, who know where the bootloader lives and where the application should be flashed to, it can be anywhere!

I think I will just need to build my own bootloader, but I need to know the following: At what addresses does the Pinguino build link the application to? I cannot seem to find any .LD scripts in the Pinguino IDE package.

Can somebody tell my where the link addresses or the equivalent of .LD files are in the Pinguino buils system?

If I can learn where Pinguino links everything, I can create a compatible bootloader, or, make a patch to the IDE/build system to support a vendor specific bootloader.

Thanks!
Barry
Reply
01-07-2012, 04:33 PM,
#2
RE: LD scripts, APP_FLASH_BASE_ADDRESS, kseg0_program_mem, bootloader
On my system, useful files such as *.ld are under linux/p32/mips-elf/lib/

Look at the IDE's .py and it's quite easy (especially on Linux) to see which Makefile etc is used and to figure things out from there.

John
Reply
01-07-2012, 07:27 PM,
#3
RE: LD scripts, APP_FLASH_BASE_ADDRESS, kseg0_program_mem, bootloader
Hi Barry

In Pinguino32 IDE you can find the LD files in:
/p32/lkr/your_board
each board needs its procdefs.ld file to locate the binary in the right place.
I didn't work with the duinomite board but Pinguino bootloader is based on the HID microchip bootloader ( same protocol with some minor changes for the MX220 board ).
To add a board in the Pinguino IDE, just check the boards.py file in folder /wxgui/ and add tour own board. You need to adapt some libraries with #ifdef directive ( most of the code for a particular board is in /p32/include/pinguino/core )
Just send me an email if you need more info.

Regards
Jean-Pierre

(01-07-2012, 10:22 AM)bsprajc Wrote: Hi all,
I've managed to brick my Duinomite while flashing is with a hex file, and I believe I've overwritten the bootloader.

Microchips code base for the HID bootloader appears to attempt to guard against overwriting the config and bootloader memory. Since Olimex and other don't share the code because of licensing, who know where the bootloader lives and where the application should be flashed to, it can be anywhere!

I think I will just need to build my own bootloader, but I need to know the following: At what addresses does the Pinguino build link the application to? I cannot seem to find any .LD scripts in the Pinguino IDE package.

Can somebody tell my where the link addresses or the equivalent of .LD files are in the Pinguino buils system?

If I can learn where Pinguino links everything, I can create a compatible bootloader, or, make a patch to the IDE/build system to support a vendor specific bootloader.

Thanks!
Barry
Reply
01-07-2012, 08:02 PM,
#4
RE: LD scripts, APP_FLASH_BASE_ADDRESS, kseg0_program_mem, bootloader
Wonderful!
Thank you both for your help.

Barry
Reply
01-07-2012, 09:12 PM, (This post was last modified: 01-07-2012, 09:27 PM by pingotg.)
#5
RE: LD scripts, APP_FLASH_BASE_ADDRESS, kseg0_program_mem, bootloader
You could probably get a DM working with the IDE here if you treat it as any of the other boards with a 795 chip. I think at least one is supported - ubw32? If it's not the ubw32 then there is plenty about that board on Brian's site http://www.schmalzhaus.com/UBW32/ (and he has .ld and other files, too).

You probably know the firmware hex and bootloader for the DM are online, but I don't think the sources of the actual bootloader are.

I would guess (!) any version will be "close" and you might figure the rest out (or not care).

I expected that the diffs at least would be available but seems not?

John

Also, maybe something here will help:
http://www.cytron.com.my/viewProduct.php?pcode=SKPIC32

such as the HID ... ZIP file

John
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)