Since the bootloader is different (located at different adresses) the export step is a bit different then described in the wiki (at least what i was using)
I use the export, adresses 0 to 0xA7FF, uncheck the fuses
(is there a way to remember the mplab ide this setting? (since this was the inidirect cause of my brickage)
That's how I do it. As far as I know, it's the only way. You can use the file output by MPLAB directly, but it still contains config fuses.
Ok, but there is no way for the export function to remember its settings? Bleh!
I find it really annoying. Maybe if we take the config bits out of the linker file then they won't be placed in the regular compiled hex (no need for export?)?
i hope :) i remember there was such a setting in the project settings. (i'm at work atm no mplab near :() could look it up tonight.
I didn't knew the basic hex would work, except the fuses.
I found it!!! whoot whoot!
if you don't declare it in the code (the _CONFIG1(xx) and _CONFIG2(xx) macro's), you can turn it off in the menu: configure, configuration bits, deselect configuration bits in code
Doing a lot of compiling of the firmware yesterday, I got rather tired of doing it all by hand, so today, I created a AutoIt v3 script to automate the process for what I was doing (which is using MPLAB as a compiler and exporter NOT as an editor):
Opt("WinTitleMatchMode", 2)
$titleText = "busPirate - MPLAB IDE"
$usage = '4 required paramaters, 1 optional parameter. Parameters with spaces must be in double quotes.' & @CRLF
$usage = $usage & @CRLF & 'Usage Example: "C:Program FilesAutoIt3AutoIt3.exe" E:BPSVNscriptsMPLAB.au3'
$usage = $usage & '"C:Program FilesMicrochipMPLAB IDECoreMPLAB.exe" "C:Program FilesMicrochipMPLAB IDECore"'
$usage = $usage & 'E:BPSVNsourceBP.hex 32000 60' & @CRLF & @CRLF
$usage = $usage & '1. fullpath to exe: "C:Program FilesMicrochipMPLAB IDECoreMPLAB.exe"' & @CRLF
$usage = $usage & '2. statup dir: "C:Program FilesMicrochipMPLAB IDECore"' & @CRLF
$usage = $usage & '3. output hex fullpath: E:BPSVNsourceBP.hex' & @CRLF
$usage = $usage & '4. time to wait for build to complete in milliseconds: 32000' & @CRLF
$usage = $usage & '5. option dialog box times in seconds: 60'
If ($CmdLine[0] < 4) Then
MsgBox(4096, "Usage", $usage)
ConsoleWrite($usage)
EndIf
$msgTimeout = 0;
If ($CmdLine[0] == 5) Then $msgTimeout = $CmdLine[5]
$exe_array = StringRegExp($CmdLine[1], ".*\(.*exe)?", 1)
$wait = Number($CmdLine[4])
Run($CmdLine[1], $CmdLine[2])
WinWaitActive($titleText)
Sleep(1000)
Send("^{F10}",0)
Sleep($wait)
$text = WinGetText ( $titleText , "Output" )
If Not(StringInStr($text, "BUILD SUCCEEDED")) Then
MsgBox(4096, "busPirate build NOT successful.", "busPirate build NOT successful.", $msgTimeout)
Exit
EndIf
Send("!Ft", 0) ; File - > Export
Sleep(1000)
Send("{TAB}", 0)
Send("{TAB}", 0)
Send("0xa7ff") ; Program memory end
Send("{TAB}", 0)
Send("{TAB}", 0)
Send("{TAB}", 0)
Send("{SPACE}", 0) ; uncheck Configuration Bits checkbox
Send("{ENTER}", 0); click Ok button
Sleep(1000)
Send($CmdLine[3])
Sleep(1000)
Send("{ENTER}", 0)
Send("{TAB}", 0) ; Overwrite existing file
Send("{ENTER}", 0); Overwrite existing file
Sleep(5000)
Send("!Fx", 0) ; File - > Exit
ProcessWaitClose ( $exe_array[0])
MsgBox(64, "AutoIt BP build and export complete", "AutoIt BP build and export complete", $msgTimeout)
Good tip!
I also found removing the config bits as describes above works equally well (and produces smaller .hex's :))
Thanks, it was the info on this thread I used for the AutoIt script so it unchecks the configuration box (as well as using the new memory end).
Hello there,
I have a problem when I want to update my card Sparkfun V3.6.
I use DS30loader, and he said: The hex-file contains code That Will overwrite the bootloader.
Does anyone have a solution?
thank you in advance.
You have to export a certain address range without config bits, did you do that? http://dangerousprototypes.com/docs/Com ... e_firmware (http://dangerousprototypes.com/docs/Compile_the_Bus_Pirate_firmware)
Hello
I changed my PIC.
I loaded the bootloader (BPv3-Bootloader - v4.4.hex) with pickit 3.
I loaded the firmware (BPv3-Firmware - v5.9RC - r556 - MPLABX.hex) with DS30 LOADER by turning the mode with a jumper on PGC and PGD because from my console I cannot configure it to put it in the programming of the firmware mode.
And I still can't a dialogue.
Is that I was not mistaken in the softs?
If someone has a solution because the I loses me.
Thanks in advance
Do you see any LEDs flashing when you type in commands. What about the status of the MODE LED? Also can you post the output of the DS30 loader?
I usually use pirate loader. Can you try that too? http://dangerousprototypes.com/docs/Pir ... Windows%29 (http://dangerousprototypes.com/docs/Pirate-Loader_console_upgrade_application_%28Linux,_Mac,_Windows%29)
I have not yet tried it with pirate loader
When I send the command i on the map, the LED Tx will Flash.
The MODE LED is off view that the dollar command does not work.
So to put me in BOOT mode I strap PGC and PGD with a jumper.
On the DS30 when I do a Check for blank the result is:
Searching for bl.
Found PIC24FJ64GA002 fw ver. 1.0.2
When I download BPv3-Firmware - v5.9RC - r556 - MPLABX.hex here is the result
Initiating download...
Searching for bl.
Found PIC24FJ64GA002 fw ver. 1.0.2
Waiting for bootloader to be ready... ok
Writing flash... ok
Download finished
Tx 51.2 kB / Rx 301 bytes / 9.8s
Thanks
hi,
I just tested program loader with pirate and walked.
thank you TAYKEN