Bootloader on dsPIC?

General discussion on mikroC for dsPIC30/33 and PIC24.
Post Reply
Author
Message
pwdixon
Posts: 1431
Joined: 13 Apr 2005 11:14
Location: UK

Bootloader on dsPIC?

#1 Post by pwdixon » 07 Sep 2009 11:11

Is there such a thing as a bootloader for the dsPIC family?

Skyline
Posts: 267
Joined: 10 Jan 2006 09:35

#2 Post by Skyline » 08 Sep 2009 04:04

Hi,

Yes, Microchip AN1094. http://ww1.microchip.com/downloads/en/A ... 01094a.pdf

1. Ingenia: http://www.ingenia-cat.com/developmenttools.php
Commercial product, excellent support. CAN bootloader too. They also have a GPL version.

2. Microsockets: http://www.microsockets.com/resources.htm
Creative common, dsPIC33, PIC24.

3. The famous Tiny: http://www.etc.ugal.ro/cchiculita/softw ... loader.htm
Free, dsPIC30.

4. MSU: http://www.reesemicro.com/Home/pic24-so ... bootloader
Free, PIC24.

Any one of these can recompile bootloaders for the other 16bit families and devices.

pwdixon
Posts: 1431
Joined: 13 Apr 2005 11:14
Location: UK

#3 Post by pwdixon » 08 Sep 2009 10:18

Thanks Skyline I did know of some of these for 8 bit PICs but I particularly like the look of the Microsockets offering so I'll be looking at that a little closer.

nervous
Posts: 80
Joined: 13 Feb 2007 08:35
Location: Italy

#4 Post by nervous » 11 Sep 2009 10:34

My little contribute

http://mrmackey.no-ip.org/elektronik/ds30loader/

I've used this one and I think are really fantastic.
Cheers
Nervous

irdra
Posts: 3
Joined: 07 Nov 2009 13:44
Contact:

#5 Post by irdra » 08 Nov 2009 20:17

As nervous wrote, my bootloader supports dsPIC. It also supports PIC18 and PIC24.

It's fully open source and comes with one single ready to use mplab projects per family, supporting all devices in each family. These are some of the features:

* Checksum control
* Write verification
* EEPROM write
* Config write
* Device reset byt dtr or rts
* Device activation byt dtr or rts
* Supports over 300 different devices out of the box

See the homepage for more info and download
http://picbootloader.com
Last edited by irdra on 29 Aug 2015 07:32, edited 1 time in total.
ds30 Loader - open source bootloader for PIC16, PIC18, PIC24, and dsPIC
http://mrmackey.no-ip.org/elektronik/ds30loader/

srlevitt
Posts: 9
Joined: 09 Nov 2008 18:56

Code protect

#6 Post by srlevitt » 30 Jan 2010 13:39

I got the ds30 loader working on a dsPic30F6012A- happy with it. But how can I prevent someone from reading the program out of the chip with a programmer? I tried setting "config __FGS, CODE_PROT_ON" in settings.inc. I then have to comment out the verify stage in the main bootloader loop (and just return an ACK). Now, although my user app seems to get downloaded OK, the bootloader never seems to jump to it. Or prehaps the bootloader is always resetting the micro. Or something else?

Any ideas or hints would be greatly appreciated.

irdra
Posts: 3
Joined: 07 Nov 2009 13:44
Contact:

#7 Post by irdra » 30 Jan 2010 15:12

Does it work without the code protection? If so I guess the code protection also protects against writes. Take a look in the datasheets.
ds30 Loader - open source bootloader for PIC16, PIC18, PIC24, and dsPIC
http://mrmackey.no-ip.org/elektronik/ds30loader/

srlevitt
Posts: 9
Joined: 09 Nov 2008 18:56

#8 Post by srlevitt » 30 Jan 2010 17:44

Without the code protect it works fine. Looking at the hex of the dsLoder WITH code protect set on, the fuse is set to 0xFFFD, which I think is "code protect, allow program writes".

irdra
Posts: 3
Joined: 07 Nov 2009 13:44
Contact:

#9 Post by irdra » 31 Jan 2010 18:06

Ok, I have never used the protection bits so I can't really help you.
ds30 Loader - open source bootloader for PIC16, PIC18, PIC24, and dsPIC
http://mrmackey.no-ip.org/elektronik/ds30loader/

srlevitt
Posts: 9
Joined: 09 Nov 2008 18:56

#10 Post by srlevitt » 31 Jan 2010 18:24

I've looked a bit deeper, and I think one would have to start messing with boot segments and general segments. Ds30Loader is also in the general segment at the moment along with the user application code. It would [possibly] need moving to a boot segment. The boot segment can only be at the start of memory, so the address calculations would have to change.

Whether or not this would give the ds30Loader the necessary "permission" to write to the general code segment when code protection is set, remains to be seen. I guess this is what Microchip are intending with their "Code Protection". Does anyone else have any experience or comments to share?

Post Reply

Return to “mikroC for dsPIC30/33 and PIC24 General”