Required Converting C code to Hex file

Discussion in 'Embedded Systems and Microcontrollers' started by AhmadAliirfan, May 26, 2019.

  1. AhmadAliirfan

    Thread Starter New Member

    May 26, 2019
    4
    0
    I've been trying to convert the following attached code to a hex file and am unable to do so the code is fine but the compiler gives me errors regarding the make file or the include xc.h librairy the rar file for the code is attached. Need it fast
     
  2. MaxHeadRoom

    Expert

    Jul 18, 2013
    18,455
    5,675
    What are you using to compile?
    MPLAB-X etc?
    Max.
     
  3. AhmadAliirfan

    Thread Starter New Member

    May 26, 2019
    4
    0
    Yes I am using MPLAB-X
     
  4. AlbertHall

    AAC Fanatic!

    Jun 4, 2014
    7,947
    1,961
    Did you set the compiler to use the C90 standard (not C99)?
    If not, do so.
     
  5. AhmadAliirfan

    Thread Starter New Member

    May 26, 2019
    4
    0
    I've used the mpasm and the XC8 and the Hitech Picc compiler and the output after building the project is displayed respectively below
    MPASM
    upload_2019-5-27_2-36-51.png

    XC8
    upload_2019-5-27_2-38-24.png
    upload_2019-5-27_2-38-51.png

    Hi Tech PICC
    upload_2019-5-27_2-39-49.png
     
  6. AlbertHall

    AAC Fanatic!

    Jun 4, 2014
    7,947
    1,961
    For XC8 , tell the compiler to use the C90 standard.
    production / set project configuration / customize
    under categories select XC8 global properties
    next to option categories select global options
    Then select C standard C90 and apply
     
  7. Ian Rogers

    Well-Known Member

    Dec 12, 2012
    629
    169
    If you look at the errors this was built previously on an E drive.. If I were you I would start a new project and copy the C code into it.

    Your directory is C:\users........ The code you are using was in an E:\work..... This means legacy directories within the build is messing you up..
     
    JohnInTX likes this.
  8. AhmadAliirfan

    Thread Starter New Member

    May 26, 2019
    4
    0
    Ok thanks ill try that
     
Loading...