• AVR Freaks

Hot!Does a complete HW SW EZBL example project exist?

Page: 12 > Showing page 1 of 2
Author
SJFreeland
Starting Member
  • Total Posts : 44
  • Reward points : 0
  • Joined: 2017/05/05 21:47:46
  • Location: 0
  • Status: offline
2019/04/23 16:22:24 (permalink)
0

Does a complete HW SW EZBL example project exist?

This post is to request help from anyone familiar with implementation of EZBL on a PIC24F. I have a demo project using a PIC24FJ256GB410 / RN4870 BLE for communications running on a Explorer 16/32. EZBL was suggested by official microchip case based tech support (Case 00340364) 10/18/2018. But, I cannot find an example project covering both HW and SW that takes a working prototype from the Explorer / PIMM environment to a stand alone device.
 
Unfortunately I have been away. The website seems to be different since my last visit. Case 00340364 describes a project where a USB Memory stick is plugged into an Explorer, EZBL loads a new program, and the LEDs blink at a different rate showing the programming was successful. I am continuing to search for this example. I think it is very close to what I need.
 
I would want to make this run from a laptop rather than a memory stick, but that should be a detail.
 
What I need is the necessary HW to copy from the Explorer / PIMM implementation so my board designer can create the standalone board. If I can find that USB memory stick example, it should cover the necessary SW issues, or at least give me a goof\d start.
 
Thanks, All.
 
#1

28 Replies Related Threads

    NKurzman
    A Guy on the Net
    • Total Posts : 17610
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: offline
    Re: Does a complete HW SW EZBL example project exist? 2019/04/23 16:33:42 (permalink)
    0
    With the RN4870 you should be starting with a serial UART example, Not a USB one.
    #2
    SJFreeland
    Starting Member
    • Total Posts : 44
    • Reward points : 0
    • Joined: 2017/05/05 21:47:46
    • Location: 0
    • Status: offline
    Re: Does a complete HW SW EZBL example project exist? 2019/04/23 19:23:21 (permalink)
    0
    The RN 4870 part of the project connected to the PIMM via the two 50-pin headers on the Explorer, is all working very well as is a color LCD and an RTC chip. What I am missing is a similar understanding of how the EZBL drops into the HW and SW of the existing system.
    #3
    NKurzman
    A Guy on the Net
    • Total Posts : 17610
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: offline
    Re: Does a complete HW SW EZBL example project exist? 2019/04/23 20:15:35 (permalink)
    0
    Step one is how do you plan to connect the PC to you board.  Is it via the RN4870?  I assume if connects to the PIC VIA the UART.  If that is the case, then that is what you are looking for a UART Bootloader.
    Have You installed EZ Bootloader?
    Your Other Option is the MCC Bootloader which I think replaces EZBL for newer PICs.
    Only Microchip support can see your Cases.
    #4
    SJFreeland
    Starting Member
    • Total Posts : 44
    • Reward points : 0
    • Joined: 2017/05/05 21:47:46
    • Location: 0
    • Status: offline
    Re: Does a complete HW SW EZBL example project exist? 2019/04/23 21:48:01 (permalink)
    0
    I see now why you are suggesting UART. Microchip tech support sent this reply last October for Case 00340364:
     
    ********************
     
    Created by : Mrinmaya At (10/18/2018, 2:40 PM)Hi Stephen,

    Thank you for your time this afternoon. Here is a short summary of our phone call:
    - based on the application description, it seems having a bootloader is more relevant than putting a programmer on every board.
    - using a bootloader (such as EZBL) will give you options to implement ways to upgrade the firmware on the field with a medium of your choice (e.g. UART, USB)

    Please let us know if you have any questions.
     
    ********************
     
    So that's why I am looking at EZBL. We may one day program the PIC via BLE. Right now the PIC is interfaced to MPLAB via the PICkit on the Explorer. I need to eliminate the Explorer in the final product. I don't care what the programming system is, just so it is robust. You say I need a UART boot loader. Sounds great! Have I loaded EZBL yet? No. You suggest the MCC bootloader. That sounds great too. Is there an example project that shows what to do? I could find a way to copy you on the text elements of the case if you need it.
     
    Thanks for this discussion.
     
    #5
    NKurzman
    A Guy on the Net
    • Total Posts : 17610
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: offline
    Re: Does a complete HW SW EZBL example project exist? 2019/04/23 22:21:48 (permalink)
    0
    From what I’ve heard EZ BL is replaced by MCC so the code should be quite similar.

    If you have a USB capable PIC , and want to add a USB connection. You can use USB MSD or CDC.

    You can use the UART directly. Or through the Bluetooth module
    You need to figure out what’s going to work for your product.
    #6
    SJFreeland
    Starting Member
    • Total Posts : 44
    • Reward points : 0
    • Joined: 2017/05/05 21:47:46
    • Location: 0
    • Status: offline
    Re: Does a complete HW SW EZBL example project exist? 2019/04/24 18:52:36 (permalink)
    0
    The PIC24FJ256GB410 shows up in MCC as MLS USB DEVICE LITE and MLA USB HOST LITE. I am new to USB. Are the two available MCC interfaces both CDC?
    #7
    NKurzman
    A Guy on the Net
    • Total Posts : 17610
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: offline
    Re: Does a complete HW SW EZBL example project exist? 2019/04/24 22:27:05 (permalink)
    0
    You have a USB Host on you PIC that you plan to plug in a CDC device like an MCP2200?
    #8
    SJFreeland
    Starting Member
    • Total Posts : 44
    • Reward points : 0
    • Joined: 2017/05/05 21:47:46
    • Location: 0
    • Status: offline
    Re: Does a complete HW SW EZBL example project exist? 2019/04/25 13:30:29 (permalink)
    0
    I have UART 5 and UART 6 still available. I am looking at AN1094, "Bootloader for dsPIC30F/33F and PIC24F/24H Devices." and AN1157, "A Serial Bootloader for PIC24F Devices. It is now clear to me that I do not need the USB connection and that a simple serial (RS232, even) will work just fine. These app notes are quite old (2007-2008). Is there a problem using the approach AN1094 or AN1157 describe? Is there a better approach? I particularly like the PIC24F Quick Programmer Windows App as the host talking to the target over a simple serial link. I am running Windows 7. Does that raise any flags?
    #9
    NKurzman
    A Guy on the Net
    • Total Posts : 17610
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: offline
    Re: Does a complete HW SW EZBL example project exist? 2019/04/25 14:32:45 (permalink)
    0
    The Appnotes were replaced by EZBL.  And that is being replaced by MCC.  They may even share common code.
    Yes you can use the Appnote as the base for your Bootloader.
     
    The advantage of the USB MSD is you do not need a PC.  a USB CDC depending on the Application.
    #10
    SJFreeland
    Starting Member
    • Total Posts : 44
    • Reward points : 0
    • Joined: 2017/05/05 21:47:46
    • Location: 0
    • Status: offline
    Re: Does a complete HW SW EZBL example project exist? 2019/04/25 15:27:41 (permalink)
    0
    THNX. AN1157 seems the best fit for now.
    #11
    SJFreeland
    Starting Member
    • Total Posts : 44
    • Reward points : 0
    • Joined: 2017/05/05 21:47:46
    • Location: 0
    • Status: offline
    Re: Does a complete HW SW EZBL example project exist? 2019/04/25 17:11:53 (permalink)
    0
    I am reading the app notes to understand the major HW and SW blocks. I get it that there is a ton of SW supporting the implementation of a target based bootloader. But how does *any* SW get to the target.
     
    On page 3, AN1094 says:
     
    Connect the target board to the host computer via MPLAB ICD2." The instructions for BUILDING AND LOADING THE TARGET SIDE BOOTLOADER surrounding this instruction seem reasonable.
     
    On page 11, AN1157 says:
     
    OPERATION EXAMPLE.
    Here is a brief overview of how to use the PIC24F serial bootloader with the provided P24QP programmer.
    1. ....
    2. Program the bootloader into the device.


    I see the P24QP windows application on page 11 of AN1157. Nice looking app. I assume this is the "provided P24QP programmer." I do not see how we get to step 2, "Program the bootloader into the device." What are the connections? \
     
    On the next page, AN1157 says:
     
    CONNECTING
    Before anything can happen, communications to the
    attached device must be opened. This is done with the
    Connect to Device button. If automatic detection was
    selected, then the software will read the device ID ....
     
    "...attached device ...." I assume this is the target. How did it get attached?
     
    "... then the software ...." Software on the target? How did it get there? I assume the PIC24F has just been soldered to the target board and has NOTHING programmed into its memory. Is the bootloader already programmed in during production?
     
    What am I missing? I continue reading.
     
     
    #12
    NKurzman
    A Guy on the Net
    • Total Posts : 17610
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: offline
    Re: Does a complete HW SW EZBL example project exist? 2019/04/25 18:04:45 (permalink)
    0
    "Attached" as in you connected it yo you computer with a cable
    The Bootloader must be programmed on your PIC24 with a hardware Programmer. (ie PICKit, ICD, or at the factory.)
    The PC program will talk to the Bootloader firmware on the PIC.
    #13
    SJFreeland
    Starting Member
    • Total Posts : 44
    • Reward points : 0
    • Joined: 2017/05/05 21:47:46
    • Location: 0
    • Status: offline
    Re: Does a complete HW SW EZBL example project exist? 2019/04/26 17:31:24 (permalink)
    0
    I have seen the light. MCC is, as you said, the correct path. I found "BOOTLOADER GENERATOR USER'S GUIDE, published 2015-16. Looks like it is for the PIC16F. One of the nice things about AN1157 is that it addresses the PIC24F, my choice for all the development. Is there an MCC Bootloader app note for the PIC24F.
    #14
    SJFreeland
    Starting Member
    • Total Posts : 44
    • Reward points : 0
    • Joined: 2017/05/05 21:47:46
    • Location: 0
    • Status: offline
    Re: Does a complete HW SW EZBL example project exist? 2019/04/27 12:57:54 (permalink)
    0
    Following step-by-step instructions at start of Chapter 4, Bootloader Generator User's Guide. There are significant differences between what I see and the Guide.
     
    1. Select XC8: not available, can only select XC16 (I am using a PIC24FJ256 ...)
    2. System Module configuration does not match. I was going to use the settings from my main project.
    3. I do not see EUSART.
    4. I see MEMORY, but that config section does not match.
    5. In the VERSIONS panel, I see "8-bit Bootloader Library (v2.2.37)", but nothing to select aanywhere.
     
    I must be going in he wrong direction. What did I miss? Someone must be using these tools successfully. Are there examples?
    #15
    SJFreeland
    Starting Member
    • Total Posts : 44
    • Reward points : 0
    • Joined: 2017/05/05 21:47:46
    • Location: 0
    • Status: offline
    Re: Does a complete HW SW EZBL example project exist? 2019/04/28 18:51:28 (permalink)
    0
    Here's a different direction just in case I picked a PIC tat cannot support a bootloader: get an ICD4 that will plug into my Explorer 16/32 environment and allow development of the ICD approach (programming and debugging), then port this to my target. Yes or no?
    #16
    NKurzman
    A Guy on the Net
    • Total Posts : 17610
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: offline
    Re: Does a complete HW SW EZBL example project exist? 2019/04/28 21:12:14 (permalink)
    0
    I think all recent PICs support bootloading.
    Check the data sheet for self writing flash.
    #17
    SJFreeland
    Starting Member
    • Total Posts : 44
    • Reward points : 0
    • Joined: 2017/05/05 21:47:46
    • Location: 0
    • Status: offline
    Re: Does a complete HW SW EZBL example project exist? 2019/04/29 09:03:25 (permalink)
    0
    You must have missed my reply that starts out, "Following step-by-step ...." There are major differences between what I see running MPLAB X IDE v4.20 and the instructions like where is the ESUART peripheral? Also, did you see, "... get an ICD4 that will plug into my Explorer 16/32 environment and allow development of the ICD approach (programming and debugging), then port this to my target. Yes or no?
    #18
    NKurzman
    A Guy on the Net
    • Total Posts : 17610
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: offline
    Re: Does a complete HW SW EZBL example project exist? 2019/04/29 16:56:01 (permalink)
    0
    A Bootloader in Not a Development system.  You will Need a connector for the ICD.  Even if it is Just to Program in the Bootloader.   This will replace the Debugger on board that the Explorer has.  And external ICD will behaive the same as the Explorer, But perhaps a little faster.
     
    As far as you Other Comments, I have not used the Bootloader tools you are, And have no links to the documetation.  So I can not comment on your observations.
     
    You have a 16 bit Chip, so 8 bit directions will not help, Is you chip supported in what you are using (MCC?)
    #19
    SJFreeland
    Starting Member
    • Total Posts : 44
    • Reward points : 0
    • Joined: 2017/05/05 21:47:46
    • Location: 0
    • Status: offline
    Re: Does a complete HW SW EZBL example project exist? 2019/04/29 19:04:13 (permalink)
    0
    I am trying to adequately answer your questions. For the record, a bootloader is two pieces of code (host and target segments) that work together to transmit a HEX file built by MPLAB X IDE to run the target; the target segment must be programmed via ICD, PICkit, or other means (NOT the bootloader). The host segment runs on the PC where MPLAB X IDE is. The host segment gets the HEX file from MPLAB (run time target code build), calls the target bootloader segment over the bootloader UART link (dare  I say the elusive ESUART on the target), the HEX file is transferred, then the HEX file is decoded and programmed into the run time area of the target by the target bootloader segment. The target bootloader segment must be programmed by a PICkit or ICD. The host segment is a Windows app.
     
    With that qualifying paragraph, I need to know what MCC is being discussed in "Bootloader Generator User's Guide", document DS40001779B, last revision (B), DEC 2016 because it does not match the MCC in MPLAB X IDE, v4.20. In particular, DS40001779B shows resources (ESUART, MEMORY) that do not match MCC in MPLAB X IDE v4.20? Where can I find that information? Should I go to tech support and file a new case?
     
    Though I have modified some of the MCC generated code in my current project, clearly MCC is an excellent way to get started. I am not new to Microchip. My last project was a 3 x PIC32 FTIR system where the PICs all talked to each other. I came into that project when the HW was all but settled. For some reason MCC was not used by the lead. Eventually, I got it all running. It was not fun. So, I know what a job it is to get going without MCC.
     
    Thanks for taking all my BS. I am just one of those people who thinks the docs should match the HW and SW.
     
    #20
    Page: 12 > Showing page 1 of 2
    Jump to:
    © 2019 APG vNext Commercial Version 4.5