• AVR Freaks

Hot!Microchip Easy Bootloader is actually VERY DIFFICULT

Author
marcosartore
Starting Member
  • Total Posts : 23
  • Reward points : 0
  • Joined: 2007/12/12 09:52:38
  • Location: 0
  • Status: offline
2016/03/09 04:53:14 (permalink)
0

Microchip Easy Bootloader is actually VERY DIFFICULT

Hi All,
I need to build a serial Bootloader for a dsPic33EP512GP806 and went through the Microchip Easy Bootloader, intended as an almost-ready solution.
I started in a conservative way: opening the "ex_boot_uart" project in MPLAB_X and compiling it (MPLAB_X IDE V3.25 with XC compiler V1.26 for Linux).
During compilation I get the following red lines, although the compiler says it was succesfull:
EZBL: Don't know what memory region ".ivt._U2RXInterrupt" belongs in. If using an older ezbl_tools.jar file with a newer compiled, try updating your ezbl_tools to the latest.
EZBL: Don't know what memory region ".ivt._U2TXInterrupt" belongs in. If using an older ezbl_tools.jar file with a newer compiled, try updating your ezbl_tools to the latest.
EZBL: Don't know what memory region ".ivt._T1Interrupt" belongs in. If using an older ezbl_tools.jar file with a newer compiled, try updating your ezbl_tools to the latest.

 
I suspect that this project would never work as is, so I am scared to start modifying it to adapt for my dsPic model.
 
I then tried to compile the "ex_app_led_blink" project and got the following error:
EZBL: Attempting to send blob to bootloader
"/opt/microchip/mplabx/v3.25/sys/java/jre1.8.0_65/bin/"java -jar "ezbl_integration/ezbl_tools.jar" --communicator -com=\\\\.\\COM8 -baud=230400 -timeout=1000 -artifact="dist/uart/production/ex_app_led_blink.production.blob"
Error: Cannot run program "ezbl_integration/ezbl_comm.exe": error=13, Permission denied

 
To my point of view, this "Easy" set is far to be easy.
Can anybody kindly address me, step-by-step, towards the finalization of these programs to my dsPic model ?
 
Many thanks in advance,
Marco
 
#1

13 Replies Related Threads

    dkhughes
    New Member
    • Total Posts : 9
    • Reward points : 0
    • Joined: 2011/01/24 12:18:01
    • Location: 0
    • Status: offline
    Re: Microchip Easy Bootloader is actually VERY DIFFICULT 2016/03/23 06:20:55 (permalink)
    0
    I know this is older, but I ran into the same error (warning?) messages with XC16 1.26 PRO. It's happening in the java file where it harvests ram sections unrelated to ivt mapping - all nonvolatile sections are just skipped over.  I'm thinking the messages are benign after glancing at the produced linker script and the associated .java file that is spitting out the error.
     
    For your second error, if you look at the command line passed to ezbl_tools it's trying to communicate over a com port to automatically send the app to the bootloader. Provided COM8 actually exists on your dev machine, the error you are showing might be coming from permissions problems in Windows. In the past, by default, serial ports required administrator access. Check to make sure your dev board is hooked up serially to COM8, and if you get the same error, run the ezbl_tools as an administrator.
    #2
    dkhughes
    New Member
    • Total Posts : 9
    • Reward points : 0
    • Joined: 2011/01/24 12:18:01
    • Location: 0
    • Status: offline
    Re: Microchip Easy Bootloader is actually VERY DIFFICULT 2016/03/23 06:23:25 (permalink)
    0
    Just noticed you said linux, not windows. There same rules apply. Your user needs to have proper permissions to the com port group to use a device. This varies by distribution you're on, but search ttyUSB0 permissions linux in your favorite engine and you'll find plenty of guides.
     
    #3
    mruck
    New Member
    • Total Posts : 6
    • Reward points : 0
    • Joined: 2013/12/30 10:12:53
    • Location: 0
    • Status: offline
    Re: Microchip Easy Bootloader is actually VERY DIFFICULT 2016/05/22 19:42:04 (permalink)
    0
    I'm a little late (almost 3 months!) to the discussion, but I'm adding this for the next person looking for EZBL info. There isn't a lot of support in the forums.
     
    The IVT errors are due to a change in compiler behavior. I build ezbl-v1.01 successfully using XC16 v1.20. I recently tried building with a newer rev of the compiler and saw those IVT errors. The newer compiler does something a little different with the IVT, and the EZBL tools do not handle the change. Try an older compiler rev.
    I checked the updated ezbl_v1.01b, and it looks like it did not fix the compiler incompatibility.
     
    I am also building on linux (VM), and I had to initially change the ezbl_tools java code in order to get the project to build. The changes reflect difference in file separator (forward instead of backward slash). Use ant to rebuild that. I also had to change project.properties for the location of crownking.jar, crownking.edc.jar, and jna.jar.
    The OP wasn't asking about the file separator, he probably already worked that out.
     
    I get the second error (can't run ezbl_comm.exe) from the OP as well. I ignore it, copy the blob file to the win8 host machine, and run the java tool by hand in order to load the image. Looks like ezbl_comm.exe is a VC++ project, and probably will not run on Linux. It does not compile with g++ as-is because it includes tchar.h (windows file). I figure if I ever need to reload the target from Linux I can rewrite ezbl_comm. I may also have to fix the invocation in the java code and rebuild ezbl_tools.  
     
    The EZBL is a decent starting point - but it sets up a bunch of tools for you that are not easy to modify. If you're doing things the way the EZBL designers expected (e.g. Windows), it seems pretty straightforward. If you want to do something different, it's not so easy.
     
     
    edited to correct my poor recollection of the changes I made to the ezbl_tools java code.
     
    post edited by mruck - 2016/05/22 20:07:36
    #4
    pchidley
    Super Member
    • Total Posts : 117
    • Reward points : 0
    • Joined: 2009/11/24 13:23:55
    • Location: Calgary, Alberta, Canada
    • Status: offline
    Re: Microchip Easy Bootloader is actually VERY DIFFICULT 2016/05/25 07:45:21 (permalink)
    0
    I agree with Marco.
    Microchip Easy Bootloader is actually VERY DIFFICULT
    Especially with the first 15 pages of the manual missing.  You know, that ones title, "getting started", file structure, design philosophy, how to use it, how to make it work, etc.
     
    So mruck, are you saying EZBL is yet another tool that Microchip has failed to keep up to date and working?
    #5
    mruck
    New Member
    • Total Posts : 6
    • Reward points : 0
    • Joined: 2013/12/30 10:12:53
    • Location: 0
    • Status: offline
    Re: Microchip Easy Bootloader is actually VERY DIFFICULT 2016/05/25 08:49:48 (permalink)
    3 (1)
    hmm - that's not exactly what I said.
     
    The EZBL works for me. Not quite as-is, because I wanted more features than the EZBL has. Like I said, starting point. I won't quibble about EZ because if it was EZ I would write it myself.
     
    Did Microchip keep it up-to-date? Maybe not. Maybe it's in the works. I thought it was originally from a class? If so, maybe the next time they offer the class the IVT errors will get resolved.
     
    Is the documentation all that great? Not really, but I read code for documentation. I search the forums for answers. Not so many answers in the forums yet, but I can't update Microchip docs, so I'll post answers here when I find them.
     
    If Microchip turned around and polished the EZBL a bit, sure that would be nice; but I'm not waiting for them.
     
    In the meantime, if you're going to actually try it out, post questions.
     
    #6
    coarist
    New Member
    • Total Posts : 6
    • Reward points : 0
    • Joined: 2012/02/08 09:29:02
    • Location: 0
    • Status: offline
    Re: Microchip Easy Bootloader is actually VERY DIFFICULT 2018/10/31 08:34:15 (permalink)
    0
    This year EZBL Microchip Easy Bootloader has seen two new releases.
    v2.10 and v2.11
    We are successful with v2.04 and then upgrade to latest v2.11.
     
    This latest v2.11 can be compiled and built using latest MPLABX 5.05.
    #7
    Stampede
    Super Member
    • Total Posts : 400
    • Reward points : 0
    • Joined: 2006/10/04 05:59:28
    • Location: Germany
    • Status: offline
    Re: Microchip Easy Bootloader is actually VERY DIFFICULT 2018/11/01 01:09:15 (permalink)
    0
    Hi,
     
    since using V2.11 i got weird issues that the bootload process gets stuck at the end and reports a mismatch in code. V2.04 worked perfect so far. Anyone experienced this issue `?
    #8
    SikAWRo
    New Member
    • Total Posts : 2
    • Reward points : 0
    • Joined: 2018/11/05 07:28:39
    • Location: Switzerland
    • Status: offline
    Re: Microchip Easy Bootloader is actually VERY DIFFICULT 2018/11/06 08:03:59 (permalink)
    0
    Hi,
    I also have some problems with my ezbl project. I followed the instructions, changed the initializer files and put the files accordingly into my project. but i dont get any connection via my COM-Port. i allways get a timeout. I have custom hardware. Is there something that i'm missing?
     
    Thanks
    #9
    lacdael
    New Member
    • Total Posts : 4
    • Reward points : 0
    • Joined: 2016/11/03 18:52:39
    • Location: Norfolk, England
    • Status: offline
    Re: Microchip Easy Bootloader is actually VERY DIFFICULT 2019/01/29 03:43:33 (permalink)
    0
    I tried with wine on linux, using: ln -s /dev/ttyUSB0 ~/.wine/dosdevices/com1
     
    It didn't work (timeout expires). On windows I have it working, except, for the error:
     0.021198: TX 64 @ 0:
    55 55 55 55 55 55 55 55 4D 43 55 50 48 43 4D 45 UUUUUUUUMCUPHCME
    42 4C 32 42 F4 3A 00 00 E2 B2 63 79 ED 40 E5 2D BL2B.:....cy.@.-
    73 37 4A EC 41 3D 2F C0 52 14 00 00 0A 00 02 00 s7J.A=/.R.......
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    0.039318: RX 2 @ 0:
    55 55 UU

    ...

    0.689358: 15116 bytes sent in 0.689s (21928 bytes/second)
    0.790170: Unknown error '0xB2E2' (unexpected communications data)'

    The app doesn't run. 
    I am using modified version of ex_boot_uart_pic32mm pic32mm0064gpl036_explorer_16.c was changed, for pic32mm0064gpl028
    post edited by lacdael - 2019/07/13 00:09:20
    #10
    ASICAlex
    Starting Member
    • Total Posts : 43
    • Reward points : 0
    • Joined: 2018/02/27 15:40:02
    • Location: 0
    • Status: offline
    Re: Microchip Easy Bootloader is actually VERY DIFFICULT 2019/03/30 22:46:57 (permalink)
    0
    Has anyone tried modifying EZBL for different protocols? I am wanting to use CAN, and looks like you can point the EZBL FIFO to use the CAN buffers, but I still dont' quite understand what I need to do.  Right now I am just trying to figure out how they select whether it wants to use the already built in UART, I2C, or USB :)  I have actually gotten the EZBL to work on my mclv2 board over UART, and if you are using UART it is very easy with all the code built for that.  But now trying to convert it to CAN, it might take me months to figure out exactly what is going on and what exactly I need to change.  Obviously I need to add the CAN functionality code in there, so I guess my first step is to figure out how it differentiates UART/I2C/USB and see if I can replicate some of the UART files in ezbl_lib with CAN.  I also have a CAN bootloader that a microchip engineer sent me, but it is designed for a much different chip than what I am using, so trying to figure out which would be the fastest to get working.
    #11
    edward809
    New Member
    • Total Posts : 2
    • Reward points : 0
    • Joined: 2019/03/26 00:13:07
    • Location: 0
    • Status: offline
    Re: Microchip Easy Bootloader is actually VERY DIFFICULT 2019/03/31 00:43:54 (permalink)
    0
    Hi,
     
    I am trying to build ezbl V2.11 example project ex_boot_uart_pic32mm without any change with MPLAB X IDE V5.15 and XC32 V2.15.
    The build process failed at linking stage (pass 1). This happened to all ezbl projects for PIC32MM chips.
    The output message attached FYR.
    Very thankful if anyone can offer help.
     
    Regards,
     
     

    Attached Image(s)

    #12
    edward809
    New Member
    • Total Posts : 2
    • Reward points : 0
    • Joined: 2019/03/26 00:13:07
    • Location: 0
    • Status: offline
    Re: Microchip Easy Bootloader is actually VERY DIFFICULT 2019/03/31 01:52:57 (permalink)
    0
    Hi,
    My previous post regarding error at linking stage was solved.
    I realized that the loader script was created by XC32 V2.10, so the problem gone by just fold back C toolchain from  v2.15 to v2.10.
     
    Regards,
    #13
    lacdael
    New Member
    • Total Posts : 4
    • Reward points : 0
    • Joined: 2016/11/03 18:52:39
    • Location: Norfolk, England
    • Status: offline
    Re: Microchip Easy Bootloader is actually VERY DIFFICULT 2019/07/13 00:21:47 (permalink)
    0
    My problem was poor connections. Got EZBL working on windows with good connections, as per the help pdf guide.
     
    I also discovered the XC32 - EZBL backward compatibility problem.
     
    Haven't got the EZBL working on a linux system, but that's probably due to my Wine program version on linux interacting with ttys. I intend to use a Bluetooth Low Energy (BLE) serial emulator to bootload, for which Windows 10 is a must as linux is terrible with BLE stuff.
    #14
    Jump to:
    © 2019 APG vNext Commercial Version 4.5