Created Thu, 18 Feb 2016 15:28:31 +0000 by GastonLagaffe
Thu, 18 Feb 2016 15:28:31 +0000
Salut,
I would like to compile the bootloader for my helvepic32 board. One reason is that I am interested in understanding the bootloader build process and secondly I would like to have a proper helvepic32 bootloader. I got the sources from github PIC32-avrdude-bootloader and it seems to only work under Linux. I have Windows and am wondering if there is a way to compile under that OS. However, Linux is just a VM call away... Is there a guide on compiling the bootloader?
Ciao, Mathias
Thu, 18 Feb 2016 15:59:10 +0000
It should be fine in Windows. Just load the project into MPLAB-X.
However, to compile for the MX1xx/2xx chips you need the full version of XC32, not the free version.
Fri, 19 Feb 2016 08:10:26 +0000
Salut Matt,
I will try my luck with MPLAB-X. I read that I can get a 60 days evaluation license for the full XC32 compiler. Does the bootloader compilation requie the standard or pro version?
Ciao, Mathias
Fri, 19 Feb 2016 10:18:51 +0000
You need one that provides mips16 to get the compiled size small enough to fit in the bootloader flash.
Sent from my SM-T555 using Tapatalk
Fri, 19 Feb 2016 11:35:37 +0000
Salut Matt,
sounds like a long weekend ... ;)
Ciao, Mathias
Fri, 19 Feb 2016 15:54:05 +0000
Mathias,
You are correct - the trial version of the compiler is the 'full' version, with full optimizations, and it will compile the bootloader project properly.
Installing MPLAB X and XC32 is pretty straightforward, and you shouldn't have any problems. The bootloader projects should all ' just work' in MPLAB X, and it should be very obvious (thanks in part to the work Matt's done) how to modify and/or create your own bootloader configuration from the existing configurations.
*Brian
Sat, 20 Feb 2016 15:27:20 +0000
Salut,
I have MPLAB-X, XC32 v1.4 (Pro 60 days) and downloaded the bootloader sources. Although I am not new to these kind of projects, I am a bit overwhelmed ... but I have 60 days to get acquainted :? I have found the definitions in the config directory and I assume I will have to create one for the HelvePic32 using boxtec (#define vendBoxtec 0x000C) as company and include it in the BoardConfig.h. Although marked "THINGS BELOW HERE SHOULD NOT NEED TO BE MODIFIED" I will have to introduce the PIC32MX270F256D as 32MX270F256D.
For my config file I will steal the definitions from Fubarino and Majenko for the PIC32MX250f128B and f128D, as I use the same processors. For the PIC32MX270f256x processors I will amend the values to match the processor.
So far I have not yet found where to select my board, vendor and processor, so a hint is welcome.
Btw: The HelvePic32 has got a breadboard version: HelvePic32BB (http://playground.boxtec.ch/doku.php/helvepic32bb/start - English version underway). I also work on the final version of a HelvePic32 using the TQFP package
Ciao, Mathias
Sat, 20 Feb 2016 19:14:19 +0000
In mplab-x you will need to clone one of the existing configurations and modify the define that selects the board.
I can't remember just where that define is, you will have to search for it.
Sent from my SM-T555 using Tapatalk
Sat, 20 Feb 2016 20:11:24 +0000
Salut Matt,
found it as an option in the select drop-down for the configurations. We have a local custom here in the south to chase out the winter, so I took a break
Ciao, Mathias
Sun, 21 Feb 2016 08:32:07 +0000
hi
refer to this old thread http://chipkit.net/forum/viewtopic.php?f=25&t=3076
custom boot loaders are documented here: http://wiki.kewl.org/dokuwiki/projects:chipkit32
you can build on windows using cygwin: http://wiki.kewl.org/dokuwiki/tools:xc32
bye
Sun, 21 Feb 2016 13:09:58 +0000
Salut nroff-man,
thanks for the link. It I get it right, the mpide gcc based compiler will be able to produce a bootloader that does not need the XC32-pro and I can spend the money saved on chips to write bootloaders to ;)
Just as background: I try this to understand how to build a bootloader and to be able to produce my own bootloader for chips that are not used in chipKIT boards. So the focus is academic. Therefore I will try to build all with MPLAB-X and mpide. Finally I will document it because if I can document it, I have understood it. This documentation will go into the chipKIT Wiki if Matt agrees.
The second trigger was the fact that I read about new PIC32 chips: The PIC32MX250F256H/550F256H/270F512H and 570F512H. Due to the integrated USB, building a board with plenty of memory and pins becomes so easy.
Ciao, Mathias
Sun, 21 Feb 2016 13:22:38 +0000
The very latest pic32-tools is capable of it, but the older ones aren't - not for the mx1xx/2xx - since it lacks the mips16 support. You need to make sure you have the absolute latest test version of the compiler, which happens to be provided by UECIDE, in order to use mips16.
Sent from my SM-T555 using Tapatalk
Sun, 21 Feb 2016 15:46:14 +0000
hi
Salut nroff-man, thanks for the link. It I get it right, the mpide gcc based compiler will be able to produce a bootloader that does not need the XC32-pro and I can spend the money saved on chips to write bootloaders to ;) Just as background: I try this to understand how to build a bootloader and to be able to produce my own bootloader for chips that are not used in chipKIT boards. So the focus is academic. Therefore I will try to build all with MPLAB-X and mpide. Finally I will document it because if I can document it, I have understood it. This documentation will go into the chipKIT Wiki if Matt agrees. The second trigger was the fact that I read about new PIC32 chips: The PIC32MX250F256H/550F256H/270F512H and 570F512H. Due to the integrated USB, building a board with plenty of memory and pins becomes so easy. Ciao, Mathias
You can use the chipKIT compiler to build a boot loader and have been able to do since that post in October 2014.
The compiler has always supported mips16 (since i have used it) and the first version testing came with mpide-0023-linux64-20140821.tgz
As for those new chips, they are not supported in mpide-0150-linux64-20150820 which I am currently using so you will need to investigate the bucket:
https://chipkit.s3.amazonaws.com/index.html?sort=lastmod&sortdir=desc
Perhaps the latest compiler has them, you tell me?
The main trouble with the compiler is that it is not exactly the same as XC32 and is less optimised from what I can see so you may need to edit the linker scripts to get things working.
Bye
Sun, 21 Feb 2016 15:53:47 +0000
Reply to self:
The MX270 is not in mpide-0023-raspberrypi-20140821 so I created my own linker scripts which were based on the MX250.
http://wiki.kewl.org/dokuwiki/projects:chipkit32 has linker scripts for both the boot loader and demo application for the MX270. Look in the lib directory of firmware and lib directory of led to see.
bye