MPLAB BUILD FAILED (exit value 2,

Discussion in 'Programmer's Corner' started by Batt Vac, Sep 17, 2017.

  1. Batt Vac

    Thread Starter New Member

    Sep 17, 2017
    5
    0
    Could someone give me some direction of this issue. I had a program built by a company and they have me programming my pcb's with MPLAB. My problem is that all of a sudden I'm getting a build failure errors and have no idea why. Unfortunately I'm not a programmer and they didn't go in depth on this with me but when nothing has been changed I just cant understand why or how to repair this issue. Would really appreciate so advise.
    Thanks Screenshot (4).png
     
  2. nsaspook

    AAC Fanatic!

    Aug 27, 2009
    5,698
    6,395
    Maybe you should use the mplab_ipe to program the boards with a precompiled hex file.
    http://ww1.microchip.com/downloads/en/DeviceDoc/50002227C.pdf


    Your error is caused by "main" being seen twice by the compile process. It looks like maybe a stray file called 'newmain.c' is in the makefile now. Open the Projects menu -> DentsDings -> Source Files to select files to examine for a dupe 'main' function. If you're not a programmer this might be confusing.

    Example Project menu view:
    [​IMG]
    There is a 'main' function in the pat.c file in this example.
     
  3. Batt Vac

    Thread Starter New Member

    Sep 17, 2017
    5
    0
    Thank you. I will give it a try right now and see what happens
     
  4. be80be

    AAC Fanatic!

    Jul 5, 2008
    1,769
    348
    Zip the project up and post it I'll have look at and help but would need the project.
     
  5. Batt Vac

    Thread Starter New Member

    Sep 17, 2017
    5
    0
    That's fantastic that you offered to help me out! Thank you very much! I worked all day on it yesterday and somehow I was able to get rid of the errors. I had my pcb maker upgraded the vacuum sensor on the board to a stronger one that's from the same company and same style and its not programming the sensor on when to power off and on. Would you be able to look at the programming on that to see why or would that be something completely different? I will post whatever we need if that's something that might be in the program. That question that I'm asking shows just how little of education that I have on the programming side with my product. I'm just trying to build the best product for everyone that I possibly can.
     
  6. be80be

    AAC Fanatic!

    Jul 5, 2008
    1,769
    348
    Zip up the project and I could look at it Mplab - x can be a pain. But it's hard to post all the files it makes now for you
    and from your pic looks like it's added some from somewhere else.
     
  7. Batt Vac

    Thread Starter New Member

    Sep 17, 2017
    5
    0
    Do you want me to just zip up the MAIN.C file and post it?
     
  8. Batt Vac

    Thread Starter New Member

    Sep 17, 2017
    5
    0
    Heres my file
     
Loading...