John Dekker
Junior Member
- Total Posts : 85
- Reward points : 0
- Joined: 2006/05/27 23:55:54
- Location: 0
- Status: offline
I converted Bootload to 2.1 framework
I converted the Generic bootloader from the 1,3 framework to the new 2.1 USB framework but it has turned out to be twice size. The 1.3 bootloader had non essential code removed to make it smaller. Any ides as to what is safe to remove from the 2.1 stack. I do like the logic and implementation of 2.1 a lot more than the 1.3 version. Regards, John.
|
xiaofan
Super Member
- Total Posts : 6247
- Reward points : 0
- Joined: 2005/04/14 07:05:25
- Location: Singapore
- Status: offline
RE: I converted Bootload to 2.1 framework
2008/05/03 00:44:02
(permalink)
I have not looked into the bootloader projects closely enough (now there are two, one is using HID for the 18F87J50 PIM and the other is using the generic usb driver for the PICDEM FS USB demo board). But my idea is different. The bootloader firmware is not as good as the demo firmware in the previous versions just to fit in the 0x800 (2KB) range. I have problems to get it work under FreeBSD and the FreeBSD USB developer thinks the firmware is the culprit. If you cut down some of the necessary part, it risks of being not really USB compliant. I think we should actually increase the bootloader size to necessary (0x1000 or even 0x2000). Just slightly change the host software and the application firmware source codes. I will look into this later.
|
John Dekker
Junior Member
- Total Posts : 85
- Reward points : 0
- Joined: 2006/05/27 23:55:54
- Location: 0
- Status: offline
RE: I converted Bootload to 2.1 framework
2008/05/03 02:16:22
(permalink)
The 2.1 bootloader converted comes in just under 0x1000 even with a few enhancements which is still not to bad I guess. Yes I am reluctant to remove code without a good understanding of the consequences. Your comments make me think that leaving it as is may be the best approach. I say again that the 2.1 framework is much easier to understand the the previous so that is at least real progress. I have modified the excellent C# Bootloader application from http://eegeek.net to work with any Code Offset value so that I can continue to use the old framework as well until I have converted all my projects. Regards, John.
|
xiaofan
Super Member
- Total Posts : 6247
- Reward points : 0
- Joined: 2005/04/14 07:05:25
- Location: Singapore
- Status: offline
RE: I converted Bootload to 2.1 framework
2008/05/03 02:23:24
(permalink)
Yes I think your approach is good. I think the EEgeek C# based host program is the easier one to understand. There are other host programs but they seem to be more complicated. I just opened the bootloader which comes with V2.1 stack and it has not been updated presumably to still fit into 0x800 size limit so that they do not need to change the bootloader PC application. I will run a USBCV test to see if it can pass the Ch9 tests under Windows.
|
jeff_m_lee
Super Member
- Total Posts : 469
- Reward points : 0
- Joined: 2005/06/08 09:04:36
- Status: offline
RE: I converted Bootload to 2.1 framework
2008/05/03 04:33:15
(permalink)
I just opened the bootloader which comes with V2.1 stack and it has not been updated presumably to still fit into 0x800 size limit so that they do not need to change the bootloader PC application. I will run a USBCV test to see if it can pass the Ch9 tests under Windows. As a good portion of the Ch9 code is commented out! - I guess not ? Do any of the Microchip examples pass ? with any of the stacks ? I think we should actually increase the bootloader size to necessary (0x1000 or even 0x2000). I've been working on a MSD bootloader - for a while I was trying to squeeze in into 0-7FF space but now I'm coming to the conclusion that if it sits in 0-FFF why worry? - plenty of flash still on the device! (even 18F2455)
|
DarioG
Allmächtig.
- Total Posts : 54081
- Reward points : 0
- Joined: 2006/02/25 08:58:22
- Location: Oesterreich
- Status: offline
RE: I converted Bootload to 2.1 framework
2008/05/03 04:46:16
(permalink)
ORIGINAL: jeff_m_lee As a good portion of the Ch9 code is commented out! - I guess not ? Do any of the Microchip examples pass ? with any of the stacks ? Hmmm, yeah, I seem to remember that I did run "hidview/usbview" tests over devices running 1.2 and 1,3 Stack... and they were doing fine...
|
xiaofan
Super Member
- Total Posts : 6247
- Reward points : 0
- Joined: 2005/04/14 07:05:25
- Location: Singapore
- Status: offline
RE: I converted Bootload to 2.1 framework
2008/05/03 04:50:05
(permalink)
ORIGINAL: jeff_m_lee Do any of the Microchip examples pass ? with any of the stacks ? I tried the demo application and it passed. I also tried previous PICkit 2 firmware and it passed with a minor modification.
|
xiaofan
Super Member
- Total Posts : 6247
- Reward points : 0
- Joined: 2005/04/14 07:05:25
- Location: Singapore
- Status: offline
RE: I converted Bootload to 2.1 framework
2008/05/03 08:52:53
(permalink)
|
xiaofan
Super Member
- Total Posts : 6247
- Reward points : 0
- Joined: 2005/04/14 07:05:25
- Location: Singapore
- Status: offline
RE: I converted Bootload to 2.1 framework
2008/05/03 09:02:24
(permalink)
|
xiaofan
Super Member
- Total Posts : 6247
- Reward points : 0
- Joined: 2005/04/14 07:05:25
- Location: Singapore
- Status: offline
RE: I converted Bootload to 2.1 framework
2008/05/03 09:17:45
(permalink)
And it seems not a good idea to use a cut-down version of the USB framework. The bootloader device which uses a cut-down version of the USB firmware framework also failed to pass Ch9 tests. http://forum.microchip.com/tm.aspx?m=335595
|
xiaofan
Super Member
- Total Posts : 6247
- Reward points : 0
- Joined: 2005/04/14 07:05:25
- Location: Singapore
- Status: offline
RE: I converted Bootload to 2.1 framework
2008/05/03 18:36:10
(permalink)
But all these test results are for information only. Sometimes it is just an engineering judge call and often that means trade-offs. PICkit 2 and the PICDEM FS USB bootloader still run fine under Windows and under Linux and Mac OS X. So it covers majority (99% ?) of the user base. Users should not be overly alarmed.
post edited by xiaofan - 2008/05/03 18:37:58
|
xiaofan
Super Member
- Total Posts : 6247
- Reward points : 0
- Joined: 2005/04/14 07:05:25
- Location: Singapore
- Status: offline
RE: I converted Bootload to 2.1 framework
2008/05/09 22:23:19
(permalink)
ORIGINAL: John Dekker The 2.1 bootloader converted comes in just under 0x1000 even with a few enhancements which is still not to bad I guess. Yes I am reluctant to remove code without a good understanding of the consequences. Your comments make me think that leaving it as is may be the best approach. Could you share your modification of the bootloader firmware? Thanks.
|
John Dekker
Junior Member
- Total Posts : 85
- Reward points : 0
- Joined: 2006/05/27 23:55:54
- Location: 0
- Status: offline
RE: I converted Bootload to 2.1 framework
2008/05/10 19:03:06
(permalink)
Yes I could if someone will tell me how to post a zip file here. I should also really include my modified http://eegeek.net c# application but it may be of little use because it does not work the same as the orignial in that it is based around setting an eeprom byte to get in and out of bootloader. Perhaps just the 2.1 bootloader would be better as it is generally not a good idea to have a lot of simillar versions of someones intitial good work floating around. Regards, John.
|
xiaofan
Super Member
- Total Posts : 6247
- Reward points : 0
- Joined: 2005/04/14 07:05:25
- Location: Singapore
- Status: offline
RE: I converted Bootload to 2.1 framework
2008/05/10 19:28:03
(permalink)
Remove non-essential files (cof file, object file, etc), zip it and then use "Click here to upload" and then enclose the file. The limit is 200k which is good enough for this kind of firmware projects. If you can not fit the files into 200k, you can split them into several parts. As for the c-sahrp project, it is better to post it as well. Since you only distribute it here, I do not see a problem. Another way, you can send the whole files to me (xiaofanc AT gmail dot com) and I can package the files and upload it here. Thanks.
|
John Dekker
Junior Member
- Total Posts : 85
- Reward points : 0
- Joined: 2006/05/27 23:55:54
- Location: 0
- Status: offline
RE: I converted Bootload to 2.1 framework
2008/05/11 02:53:34
(permalink)
xiaofanc. I have sent you the pic bootloader and my c# application. They are as is with lots of commented code that I have left in. I do this deliberately so that when I revisit I can see what I have changed from or other ideas but you will get the drift. The c# app will recognize the bootloader code and my user apps, you can set the bootloader flag in eprom from both as well as reboot. I have made numerous small changes to the original c# application and some of the ideas may inspire others. Bear in mind that I did these quickly to incorporate into my own work and did not polish them up. Thanks to the original author of the c# application at http://eegeek.net and to microchip. Regards,John.
|
xiaofan
Super Member
- Total Posts : 6247
- Reward points : 0
- Joined: 2005/04/14 07:05:25
- Location: Singapore
- Status: offline
RE: I converted Bootload to 2.1 framework
2008/05/11 03:06:55
(permalink)
Thanks a lot. I am afraid I did not receive your email due to the stupid Gmail filtering system. Could you sent it again? Say if you want to send the the file "bootloader.zip", change it to "bootloader.zipfile" and then send it to me again. Sorry I did not tell you ealier.
|
schneiderj
Super Member
- Total Posts : 497
- Reward points : 0
- Joined: 2008/01/19 07:46:49
- Location: France, close to Paris
- Status: offline
RE: I converted Bootload to 2.1 framework
2008/05/12 01:36:26
(permalink)
I am sorry to post here, in the middle of specialist discussion, but this topic correspond exactly to my question. With your help I have modified the version 2.1 of Jan for the HID and would like to use a bootloader to write to the PIC this hex file. The old version did not work, so which one did I have to use ? Thanks for your help Jean-Marie
|
xiaofan
Super Member
- Total Posts : 6247
- Reward points : 0
- Joined: 2005/04/14 07:05:25
- Location: Singapore
- Status: offline
RE: I converted Bootload to 2.1 framework
2008/05/12 02:07:07
(permalink)
Why does the old version not work? It should work. By the way, you need to program the bootloader hex with a suitable programmer (say PICkit 2) before you can use the bootloader PC software to upload your hex file.
|
schneiderj
Super Member
- Total Posts : 497
- Reward points : 0
- Joined: 2008/01/19 07:46:49
- Location: France, close to Paris
- Status: offline
RE: I converted Bootload to 2.1 framework
2008/05/12 02:56:02
(permalink)
|
xiaofan
Super Member
- Total Posts : 6247
- Reward points : 0
- Joined: 2005/04/14 07:05:25
- Location: Singapore
- Status: offline
RE: I converted Bootload to 2.1 framework
2008/05/12 03:01:40
(permalink)
|