-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bootloaders and the pirate-loader don't agree on bootloader address #26
Comments
No need to split issues, no worries. I'll look into that, but I need more information regarding the flashing failure. That also occurs on v4, and it is not an error on that revision. I seem to recall that v3 should it be unaffected as well. So, would it be possible to post the #defines set in configuration.h that apply to your particular firmware (if you are building your own), or where the firmware comes from if it is a prebuilt binary, and the output of pirate-loader with the --verbose flag on, otherwise it'd be mostly speculation on my part rather than just debugging :) For the flashing vector address, I'll look at that tomorrow morning and hopefully I'll get back with an answer. Thank you for the report! |
Incidentally, you may want to check out commit d357eee - I am able to build a 4.5 bootloader for BPv3 using MPLAB X that way. |
Anyway, since I'm still awake... The pirate-loader binary is right in performing the fixup: in devices.inc, if you look the FLASHSIZE macro for the PIC24FJ64GA002 you'll see it's set to 0xAC00, then in ds30loader.s, STARTADDR is set to (FLASHSIZE - (2 * PAGESIZE)). A PIC24 code page is 512 words, therefore you get 0xAC00 - (2 * 512) = 0xA800. Hope that helps. |
agatti --- thanks, the bootloader 4.5 works great. I put the r2151 flash on it. I'm back after 2+ years and want to finish my pirate app. Starting on the BP3, but got a BP4 laying around here somewhere. I think it is important to change the app on the fly without having to hardwire PGC/PGD. The bootloader 4.5 should allow you to exit after a flash and do a reset by sending the '#' command. Something other versions don't support. |
Final address is fine. Couldn't get firmware to jump to 0xa800, but bootloader now builds. just a quick follow up. For some reason the BP 7.0 flashes attempt to write into the bootloader area. I modified my flasher to log the error but roll on. I think it has to do with the reference to 'abf8'. The linker thinks that since we are referring to that address, we must have put something there. The linker has an option to fill flash, but not to ignore flash..... go figure. ..... Writing page 41 row 335, a780...OK |
I know I am babo as hell. |
The error comes from pirate-loader, and will still come from pirate-loader after upgrade. The only advantage comes by being able to exit boot-loader by sending a command. The pirate-loader for the BP4 logs this better. The real deal is that the hex file has commands which would overwrite the bootloader and so it complains with a 'P' error result (presumably 'P' means protected). |
Ok, thanks! |
Okay, so I'm having issues with flashing my BP3. Of course, the PGC/PGD trick works, but I'm trying to do this automated from with an app. The pirate-loader does the following in "fixJumps" sets the jump address to 0xa800, which is the beginning address of the DS30 bootloader. However, the DS30 bootloader sets a vector at 0xabf8 (the last 8 bytes of program memory).
Which should be used?
As an aside, I can't compile the DS30 loader to save my life. The linker does not want to put 6 bytes at 0xabf8.... I'm currently using ASM30 (v3_31), can not tell the linker version.... :<
Finally, the pirate-loader fails on all the 7.00 fw, it appears to be about the last page erase.
Want all these as separate issues????
The text was updated successfully, but these errors were encountered: