Odd behavior with mikroC Pro For PIC

Discussion in 'Embedded Systems and Microcontrollers' started by mikejp56, Aug 6, 2015.

  1. mikejp56

    Thread Starter Member

    Jun 14, 2015
    49
    1
    Hi All,
    I am very green with PICs, but not with electronics and PCs. I am experiencing an odd behavior with mikroC Pro for PICS. I have a program that I have compiled, and successfully loaded the hex file to the PIC, a 12F683. I loaded the file in mikroC Pro to fiddle some bits, and after saving the modified code, the only option that is enabled in the Build dropdown is Stop Build All. I select this but it always stays as the only available option. I can shut down mikroC Pro and reopen it, but it doesn't change. This prevents me from building new hex files.
    What is going on here? I have attached a screenshot.
    Regards,
    mikejp56

    EDIT: So as an experiment I created a new project, and now I have the Build options available in the Build dropdown.
    Why does creating a new project now allow me to rebuild old modified projects?
    Any answers would be greatly appreciated!
    mikejp56
     
  2. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,392
    1,606
    The project file got corrupted. It happens form time to time.
     
  3. mikejp56

    Thread Starter Member

    Jun 14, 2015
    49
    1
    Hi ErnieM,
    So do I just delete the project and redo it? Is there a setting to make it less likely to happen?
    Thanks for the quick response.
    mikejp56
     
  4. MrCarlos

    Active Member

    Jan 2, 2010
    400
    134
    Hi Mike Pollack

    I think you should delete the files generated when compiling code.
    Extensions of those files I've noticed that I have to delete are:
    *.CFG
    *.CP
    *.DCT
    *.MCL
    *.LST
    *.LOG
    *.mcppi_callertable.txt
    *.DIC
    *.DBG
    *.DLT
    *.BRK
    *.INI

    You can also modify your code, for example by adding a blank line anywhere in the code.
    The compiler will think that this is another code. I've done it so well.

    If the project is corrupted, you can copy the code in a text editor.
    Then rebuild the project pasting the code.

    I hope this information helps.
     
    Last edited: Aug 6, 2015
  5. mikejp56

    Thread Starter Member

    Jun 14, 2015
    49
    1
    Hi MrCarlos,
    Thanks for the info. That is what I have done on several occasions. But why does this happen?
    Regards,
    mikejp56
     
  6. MrCarlos

    Active Member

    Jan 2, 2010
    400
    134
    Hi Mike Pollack
    .
    I think after ordering Build the MicroC keeps a record. and does not do again but it did.
    In some of the files we erase.
    .
    Therefore in the menu Build the Build option is disabled.
    .
    This option is also disabled while it is compiling. Give him time to finish compiling.
     
  7. mikejp56

    Thread Starter Member

    Jun 14, 2015
    49
    1
    Hi MrCarlos,
    OK, thanks again for the answer!
    Regards,
    mikejp56
     
  8. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,392
    1,606
    I've only had a project file go bad on rare occasions so I've never been able to track down WHY it happens.

    I just curce a bit, shrug, and rebuild the project file starting from the wizzard.

    Note I just use the same code files as they are, just load them into a new project.
     
  9. mikejp56

    Thread Starter Member

    Jun 14, 2015
    49
    1
    Hi ErnieM,
    Thanks for the feedback. Rebuild it is!
    Regards,
    mikejp56
     
  10. pwdixon

    Member

    Oct 11, 2012
    488
    56
    And, 'stop build all' doesn't work, never has and ME know it they just haven't fixed it.
     
Loading...