• AVR Freaks

Hot!Programming in Mplab X 5.05

Author
tinutac
New Member
  • Total Posts : 7
  • Reward points : 0
  • Joined: 2018/10/16 08:51:47
  • Location: 0
  • Status: offline
2018/10/23 04:10:12 (permalink)
0

Programming in Mplab X 5.05

Due to MplabX 4.x continuously crashing and messing my project configurations on my machine running Windows 8.1 Enterprise, I've decided to wait for MplabX 5 so last week I've installed 5.05. Everything went fine but when I'm programming my PIC (PIC24EP512GU810) via the IDE (ICD3), despite getting the message that everything went fine, the PIC is somehow hanging (power down/up of my board doesn't change anything). If I read the PIC memory via IPE and verify it against the HEX everything is fine. 
If I export the HEX of the same project and do the programming via IPE (also 5.05) everything is ok. 
If I program the same project in 3.65 absolutely no issues. 
Did anyone else encounter this issue?
#1

13 Replies Related Threads

    GeorgePauley
    Moderator
    • Total Posts : 1127
    • Reward points : 0
    • Joined: 2009/12/01 13:59:30
    • Location: Chandler AZ
    • Status: offline
    Re: Programming in Mplab X 5.05 2018/10/23 09:07:31 (permalink)
    +3 (3)
    I'm wondering...  One major difference between IDE and IPE is that IPE will only program in release mode, whereas the IDE will program (and in fact defaults to) debug mode.  If you program in debug mode the board would not run stand-alone (it has to be controlled by the tool in debug mode.)
     
    Or it could be something else entirely.  :)
    #2
    tinutac
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2018/10/16 08:51:47
    • Location: 0
    • Status: offline
    Re: Programming in Mplab X 5.05 2018/10/29 06:54:48 (permalink)
    0
    Sorry for the delayed reply. 
    You might have something there. I'm usually programming by using the Make and program option in the right click menu (on the project name). I now see in the help of the project menu: Make and Program Device
    programs the target device and holds in Reset (do not run).
    I now wonder if there was a bug in 3.85 or something weird in my configs because I've always used that option to do the programming and it never held the PIC in reset and it was a quite convenient way to program a specific open project (not necessarily the main one) since I'm working with several projects in parallel.
    #3
    KTrenholm
    Super Member
    • Total Posts : 709
    • Reward points : 0
    • Joined: 2012/08/08 14:04:23
    • Location: Connecticut, USA
    • Status: offline
    Re: Programming in Mplab X 5.05 2018/10/29 07:14:46 (permalink)
    0
    "Make and Program Device" usually works fine for me to program release builds and it doesn't hold me in reset.  Is that a setting somewhere maybe?  Is your programmer actually holding you in reset in your case?
     
    I wonder if maybe you aren't starting up because the DEBUG config bits are set?  Make sure they're clear, the IDE will automatically set them to ON when debugging.
    #4
    tinutac
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2018/10/16 08:51:47
    • Location: 0
    • Status: offline
    Re: Programming in Mplab X 5.05 2018/10/29 08:08:45 (permalink)
    0
    At least I'm not alone in using Make&Program for release builds programming :).
    Programmer for sure holding in reset, if I disconnect the programmer my PIC starts running. 
    Except for migrating the project from 3.85 to 5.05 nothing changed, so in theory, there is no reason for it to be programmed in debug mode. I didn't even try to debug yet in 5.05. 
    #5
    KTrenholm
    Super Member
    • Total Posts : 709
    • Reward points : 0
    • Joined: 2012/08/08 14:04:23
    • Location: Connecticut, USA
    • Status: offline
    Re: Programming in Mplab X 5.05 2018/10/29 08:24:14 (permalink)
    +1 (1)
     
    Hmm, there is a "Hold in Reset" button in MPLAB X on the top toolbar, is that currently set as on?
    Picture below, I'm using the "Darcula" theme with slightly different colored icons, but here it is:
    Attachments are not available: Download requirements not met
    [EDIT] hmm, I think images are busted when I just try and copy it into the post body.  Uploading them is fine it seems.
     
    That is in the "Off" position (chip not holding in reset).  When it's "On" it shows a little play button icon rather than the pause icon.
     

    Attachment(s)

    Attachments are not available: Download requirements not met
    #6
    tinutac
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2018/10/16 08:51:47
    • Location: 0
    • Status: offline
    Re: Programming in Mplab X 5.05 2018/10/29 08:30:26 (permalink)
    0
    Here same. So hold in reset not active. 
    #7
    KTrenholm
    Super Member
    • Total Posts : 709
    • Reward points : 0
    • Joined: 2012/08/08 14:04:23
    • Location: Connecticut, USA
    • Status: offline
    Re: Programming in Mplab X 5.05 2018/10/29 08:34:06 (permalink)
    0
    If you toggle it on then back off does it do anything?
    #8
    tinutac
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2018/10/16 08:51:47
    • Location: 0
    • Status: offline
    Re: Programming in Mplab X 5.05 2018/10/29 09:09:41 (permalink)
    0
    Yes, it puts the PIC on hold or releases the hold. 
    If I set in on hold (so showing release from hold, arrow) and program via the right click menu the PIC is held as long as programmer connected. 
    If I press on "Release from Reset" it will release the PIC. 
    If I leave it on "Release from Reset" and reprogram via the right click menu, the PIC is held (again as long as programmer connected). If I click it again ("Hold on Reset"), PIC is still held. If I press again (release) then PIC is released. 
    It seems it doesn't matter if that button in in hold/release state. Programming via right click menu (project menu) still puts the PIC on hold (but doesn't update the button to reflect the actual state of the PIC, which is pretty annoying). 
    It seems that the only way I can continue with 5.05 is to program via the toolbar button (for release). Or to release it from the toolbar if programming via the Project Menu. 
    #9
    KTrenholm
    Super Member
    • Total Posts : 709
    • Reward points : 0
    • Joined: 2012/08/08 14:04:23
    • Location: Connecticut, USA
    • Status: offline
    Re: Programming in Mplab X 5.05 2018/10/29 09:16:10 (permalink)
    0
    Oh I think I missed that this only occurs for you when programming via Right Clicking the project.
     
    "Right Click > Make and Program Device" I assume?  I only ever really use the "Make and Program Device Main Project" toolbar button.
     
    I'll see if I can reproduce with my ICD3
    #10
    KTrenholm
    Super Member
    • Total Posts : 709
    • Reward points : 0
    • Joined: 2012/08/08 14:04:23
    • Location: Connecticut, USA
    • Status: offline
    Re: Programming in Mplab X 5.05 2018/10/29 09:23:19 (permalink)
    0
    Yup, I can confirm same behavior with my ICD3 and a PIC24F16KM202.  Seems like a bug?
     
    - Only occurs when programming project by right clicking the project and selecting "Make and Program Device". 
    - Does not occur when using "Make and Program Device Main project" toolbar button.
    - PIC successfully programs, but ICD3 does not release reset after programming.
    - Toggling the "Hold In Reset" toolbar button works to get back out of Reset.
     
    #11
    tinutac
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2018/10/16 08:51:47
    • Location: 0
    • Status: offline
    Re: Programming in Mplab X 5.05 2018/10/29 09:26:07 (permalink)
    0
    No problem :)
    If I understand correctly, according to the manual, this is the intended behaviour. If I program via the toolbar everything goes as it should.
    It seems that for a reason or another, the 3.x IDE was behaving differently. 
     
    #12
    KTrenholm
    Super Member
    • Total Posts : 709
    • Reward points : 0
    • Joined: 2012/08/08 14:04:23
    • Location: Connecticut, USA
    • Status: offline
    Re: Programming in Mplab X 5.05 2018/10/29 09:34:41 (permalink)
    0
    Really?  Hm, I guess if it's intended it's intended.  What manual (and where in it) did you find that from?
     
    Maybe use the "Run" command when right clicking the project.  It looks like that option builds, programs, and releases from reset.
     
     
    #13
    tinutac
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2018/10/16 08:51:47
    • Location: 0
    • Status: offline
    Re: Programming in Mplab X 5.05 2018/10/30 03:51:53 (permalink)
    0
    Mplab X manual, MPLAB X IDE Windows and Dialogs: Projects Window, Projects Window - Project Menu 
    nbdocs:/com/microchip/mplab/help/docs/MPLABX_12_70.html#763516 
    #14
    Jump to:
    © 2019 APG vNext Commercial Version 4.5