-
Notifications
You must be signed in to change notification settings - Fork 131
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
bootloader: Cleanup code, reduce duplication #69
base: master
Are you sure you want to change the base?
Conversation
|
* Take latest pirate-loader since it should work for BPv3 and BPv4. (to test) * Old BPv3 stuff saved for now in old directory
4da0a94
to
0f9301c
Compare
Waiting on my testing to ensure the pirate-loader works on BPv3 and BPv4 |
Ok.. the BPv4 is in a pretty dire shape with pirate-loader... The latest BPv4 bootloader doesn't seem to be working (unless i'm programming it wrong with pk2cmd? http://dangerousprototypes.com/docs/Bus_Pirate_v4_and_Pickit2_(bootloader_and_firmware_updates) seems to say i'm doing it right) BPv4
|
I remember I used MPLAB-X IPE to flash the bootloader on my board - I'm not sure if it's available on Linux. I can take a look at that tomorrow my time to see if there's any underlying issue. |
I programmed it with the MPLab IDE and saw the same result. FW works, bootloader goes MIA |
Ok, I gave it a quick test. Here's what I did:
and it works. bootloader_flash.txt I'll try to attempt upgrades and see what happens... |
Ok, I tried the same steps as you did and noticed the following things:
|
That said, we can do the following things:
Now, this is a major bummer since one of the biggest reasons for this community firmware to exist is indeed how DP dropped the ball on v4... |
Speaking of which, maybe we can show how to set up an Arduino to act as a ICSP programmer and use that to flash the new bootloader. There are more chances that folks have one of those laying around somewhere rather than having a PicKit at their disposal. |
Expanding more on the Arduino as a makeshift PicKit, according to http://ww1.microchip.com/downloads/en/DeviceDoc/30009907c.pdf there are three interesting things worth noting:
I had a quick look and I haven't found any Arduino sketch that can program a PIC24F, and I hope to be proven wrong here, or I'll have to write my own. This way the hardware components needed to program the whole lot (besides for cabling) are essentially a NPN transistor with appropriate resistors on the base and collector pins to provide appropriate power to the VDD pin on the ICSP connector, a '125 (quad level shifter) for bringing VDD, PGC, and PGD down to 3v, and then a handful of resistors for fine-tuning the voltages on VDD. Extra bypass capacitors could be used as well but I don't think they're essential as of now. The table at page 48 of the document linked above contains all the electric characteristics of the various pins at various stages of programming. There's some quite tight requirements over there though. I wish Arduinos had a DAC on board so all the level shifting/fine tuning work wouldn't be necessary anymore... |
Or, more simply, require a Raspberry PI and use https://github.com/WallaceIT/picberry/ instead to reflash the bootloader. |
I opened this a while ago.. I don't think it's relevant anymore? I'm cool with closing if @agatti is. |
I think the pirate-loader part is still not done. |
for BPv3 and BPv4. (to test)