Hot!.asm files not being automatically assembled

Page: 12 > Showing page 1 of 2
Author
mchahn
Senior Member
  • Total Posts : 100
  • Reward points : 0
  • Joined: 2016/08/03 11:47:25
  • Location: 0
  • Status: offline
2018/04/11 11:17:24 (permalink)
0

.asm files not being automatically assembled

I have three .asm files mixed in with my C source files.  The files define sects with just DW data.  The C code references them as "extern const".  
 
I'm using mplab.  Building works fine but only after I right-click on each .asm file and manually assemble them.  If I do a clean or I restart mplab I have to once again manually assemble them or I get errors like the ones shown below.  Maybe they are being compiled as C files?  I have the .asm files in the "Source Files" folder in the projects pane.  Should they be somewhere else? 
 
This is a real PITA.  Can someone help?
 
--- errors below ---
 
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory '/root/dev/p3/pic/p3m'
make -f nbproject/Makefile-default.mk dist/default/production/p3m.production.hex
make[2]: Entering directory '/root/dev/p3/pic/p3m'
"/opt/microchip/xc8/v1.44/bin/xc8" --pass1 --chip=16F15354 -Q -G --double=24 --float=24 --opt=none --addrqual=ignore -P -N255 --warn=-3 --asmlist -DXPRJ_default=default --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" --msgdisable=373 -obuild/default/production/exp.p1 exp.c
"/opt/microchip/xc8/v1.44/bin/xc8" --pass1 --chip=16F15354 -Q -G --double=24 --float=24 --opt=none --addrqual=ignore -P -N255 --warn=-3 --asmlist -DXPRJ_default=default --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" --msgdisable=373 -obuild/default/production/main.p1 main.c
"/opt/microchip/xc8/v1.44/bin/xc8" --pass1 --chip=16F15354 -Q -G --double=24 --float=24 --opt=none --addrqual=ignore -P -N255 --warn=-3 --asmlist -DXPRJ_default=default --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" --msgdisable=373 -obuild/default/production/lcd.p1 lcd.c
"/opt/microchip/xc8/v1.44/bin/xc8" --pass1 --chip=16F15354 -Q -G --double=24 --float=24 --opt=none --addrqual=ignore -P -N255 --warn=-3 --asmlist -DXPRJ_default=default --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" --msgdisable=373 -obuild/default/production/smot.p1 smot.c
"/opt/microchip/xc8/v1.44/bin/xc8" --pass1 --chip=16F15354 -Q -G --double=24 --float=24 --opt=none --addrqual=ignore -P -N255 --warn=-3 --asmlist -DXPRJ_default=default --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" --msgdisable=373 -obuild/default/production/util.p1 util.c
"/opt/microchip/xc8/v1.44/bin/xc8" -C --chip=16F15354 -Q -G --double=24 --float=24 --opt=none --addrqual=ignore -P -N255 --warn=-3 --asmlist -DXPRJ_default=default --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" --msgdisable=373 -obuild/default/production/logotable.obj logotable.asm
"/opt/microchip/xc8/v1.44/bin/xc8" --pass1 --chip=16F15354 -Q -G --double=24 --float=24 --opt=none --addrqual=ignore -P -N255 --warn=-3 --asmlist -DXPRJ_default=default --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" --msgdisable=373 -obuild/default/production/i2c.p1 i2c.c
"/opt/microchip/xc8/v1.44/bin/xc8" --pass1 --chip=16F15354 -Q -G --double=24 --float=24 --opt=none --addrqual=ignore -P -N255 --warn=-3 --asmlist -DXPRJ_default=default --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" --msgdisable=373 -obuild/default/production/logotable.p1 logotable.c
logotable.asm:317: error: (844) lexical error
logotable.asm:318: error: (844) lexical error
logotable.asm:319: error: (845) symbol "RC5PPSbits_t" defined more than once
logotable.asm:319: error: (844) lexical error
build/default/production/logotable.pre:321: error: (876) syntax error
build/default/production/logotable.pre:19391: error: (845) symbol "extern" defined more than once
build/default/production/logotable.pre:19391: error: (845) symbol "volatile" defined more than once
build/default/production/logotable.pre:19391: error: (844) lexical error
build/default/production/logotable.pre:324: error: (876) syntax error
build/default/production/logotable.pre:326: error: (876) syntax error
build/default/production/logotable.pre:329: error: (844) lexical error
build/default/production/logotable.pre:330: error: (844) lexical error
build/default/production/logotable.pre:331: error: (845) symbol "unsigned" defined more than once
build/default/production/logotable.pre:331: error: (876) syntax error
build/default/production/logotable.pre:332: error: (845) symbol "unsigned" defined more than once
build/default/production/logotable.pre:332: error: (876) syntax error
build/default/production/logotable.pre:333: error: (845) symbol "unsigned" defined more than once
build/default/production/logotable.pre:333: error: (876) syntax error
build/default/production/logotable.pre:334: error: (845) symbol "unsigned" defined more than once
build/default/production/logotable.pre:334: error: (876) syntax error
build/default/production/logotable.pre:335: advisory: (1) too many errors (21)
(908) exit status = 1
nbproject/Makefile-default.mk:256: recipe for target 'build/default/production/logotable.obj' failed
make[2]: *** [build/default/production/logotable.obj] Error 1

 
 
#1

21 Replies Related Threads

    RISC
    Super Member
    • Total Posts : 5171
    • Reward points : 0
    • Status: online
    Re: .asm files not being automatically assembled 2018/04/11 13:13:31 (permalink)
    0
    Hi,
     
    Do you use XC8 compiler ?
    If my memory is correct, for XC8 assembly files need the .as extension
    Check the XC8 compiler manual section 6.2 :
    c:\Program Files (x86)\Microchip\xc8\v1.45\docs\MPLAB_XC8_C_Compiler_User_Guide.pdf
    Pay attention...the syntax of XC8 assembler is I believe different
     
    Regards
    #2
    Gort2015
    Klaatu Barada Nikto
    • Total Posts : 2596
    • Reward points : 0
    • Joined: 2015/04/30 10:49:57
    • Location: 0
    • Status: offline
    Re: .asm files not being automatically assembled 2018/04/11 13:30:28 (permalink)
    0
    So you created data in some files, are you accessing that data? (rd/wr)
     
    Show some code.

    MPLab X playing up, bug in your code? Nevermind, Star Trek:Discovery will be with us soon.
    https://www.youtube.com/watch?v=Iu1qa8N2ID0
    + ST:Continues, "What Ships are Made for", Q's back.
    #3
    Gort2015
    Klaatu Barada Nikto
    • Total Posts : 2596
    • Reward points : 0
    • Joined: 2015/04/30 10:49:57
    • Location: 0
    • Status: offline
    Re: .asm files not being automatically assembled 2018/04/11 13:37:26 (permalink)
    0
    .asm
     

    MPLab X playing up, bug in your code? Nevermind, Star Trek:Discovery will be with us soon.
    https://www.youtube.com/watch?v=Iu1qa8N2ID0
    + ST:Continues, "What Ships are Made for", Q's back.
    #4
    du00000001
    Just Some Member
    • Total Posts : 1885
    • Reward points : 0
    • Joined: 2016/05/03 13:52:42
    • Location: Germany
    • Status: offline
    Re: .asm files not being automatically assembled 2018/04/11 14:30:41 (permalink)
    0
    Try .as

    PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
    #5
    1and0
    Access is Denied
    • Total Posts : 8001
    • Reward points : 0
    • Joined: 2007/05/06 12:03:20
    • Location: Harry's Gray Matter
    • Status: offline
    Re: .asm files not being automatically assembled 2018/04/11 14:57:57 (permalink)
    +1 (1)
    mchahn
    I have three .asm files mixed in with my C source files.  The files define sects with just DW data.  The C code references them as "extern const".  
    ...
    logotable.asm:318: error: (844) lexical error
    logotable.asm:319: error: (845) symbol "RC5PPSbits_t" defined more than once
    logotable.asm:319: error: (844) lexical error
    build/default/production/logotable.pre:321: error: (876) syntax error
    build/default/production/logotable.pre:19391: error: (845) symbol "extern" defined more than once
    build/default/production/logotable.pre:19391: error: (845) symbol "volatile" defined more than once
    ...
    build/default/production/logotable.pre:331: error: (845) symbol "unsigned" defined more than once
    [/code]

    I think it does not matter rather it's .as or .asm.  From the error messages, it looks like you are using C keywords and/or symbols in the assembly code.  Post your .asm files.
    #6
    du00000001
    Just Some Member
    • Total Posts : 1885
    • Reward points : 0
    • Joined: 2016/05/03 13:52:42
    • Location: Germany
    • Status: offline
    Re: .asm files not being automatically assembled 2018/04/11 15:12:42 (permalink)
    0
    Oh - I missed the assembler's error messages. So the extension is ok, but logotable.asm has one or more errors.
    Once the *.asm assemble without errors ...

    PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
    #7
    mchahn
    Senior Member
    • Total Posts : 100
    • Reward points : 0
    • Joined: 2016/08/03 11:47:25
    • Location: 0
    • Status: offline
    Re: .asm files not being automatically assembled 2018/04/11 15:37:09 (permalink)
    0
    The problem was fixed by switching from .asm to .as.  This is very surprising to me.
     
    I know the assembly file had no errors because using the right-click assemble gave no errors.  Also I only have DW code.  Here it is anyway ...
     
     

    PSECT font708sect,class=CODE,local,delta=2
    GLOBAL _font708
    _font708:
     DW 0x0000
     DW 0x0000
     DW 0x0000
     DW 0x0000
     DW 0x1e80
     DW 0x0000
    ... (376 more DW lines snipped)

    #8
    mchahn
    Senior Member
    • Total Posts : 100
    • Reward points : 0
    • Joined: 2016/08/03 11:47:25
    • Location: 0
    • Status: offline
    Re: .asm files not being automatically assembled 2018/04/11 17:19:32 (permalink)
    0
    I was wrong.  The problem has not gone away.  I'm not sure how I thought it did.  So I still need help.
     
    > Do you use XC8 compiler ?
     
    Yes.
     
    > logotable.asm has one or more errors.
     
    Only because it is trying to be compiled as C.
     
    > Show some code.
     
    I showed the asm code in my last post.  Here is some C code that uses it ...
     
     
    // font813 is defined in font813.as
    extern const uint16 font813;

    uint16 font813Addr;
    uint16 font813Index;
    uint16 font813Word;

    void initFont813() {
      font813Addr = (uint16) &font813;
    }

    uint16 getRomWord(uint16 addr) {
        NVMCON1bits.NVMREGS = 0;
        NVMADRL = addr & 0xff;
        NVMADRH = addr >> 8;
        NVMCON1bits.RD = 1;
        return ((uint16) NVMDATH << 8) | NVMDATL;
    }

    <snip>
    getRomWord(font813Addr + romOfs++);
    <snip>

     
    #9
    Gort2015
    Klaatu Barada Nikto
    • Total Posts : 2596
    • Reward points : 0
    • Joined: 2015/04/30 10:49:57
    • Location: 0
    • Status: offline
    Re: .asm files not being automatically assembled 2018/04/12 06:58:51 (permalink)
    0
    It's been a long time since I used 8bit.
    Using xc8, my file types are .asm
     
    When you created the assembler file, you did select new assembly file?
     
    Did you terminate with .end ?

    MPLab X playing up, bug in your code? Nevermind, Star Trek:Discovery will be with us soon.
    https://www.youtube.com/watch?v=Iu1qa8N2ID0
    + ST:Continues, "What Ships are Made for", Q's back.
    #10
    Gort2015
    Klaatu Barada Nikto
    • Total Posts : 2596
    • Reward points : 0
    • Joined: 2015/04/30 10:49:57
    • Location: 0
    • Status: offline
    Re: .asm files not being automatically assembled 2018/04/12 07:19:09 (permalink)
    0
    It should not be compiled as C.

    MPLab X playing up, bug in your code? Nevermind, Star Trek:Discovery will be with us soon.
    https://www.youtube.com/watch?v=Iu1qa8N2ID0
    + ST:Continues, "What Ships are Made for", Q's back.
    #11
    Gort2015
    Klaatu Barada Nikto
    • Total Posts : 2596
    • Reward points : 0
    • Joined: 2015/04/30 10:49:57
    • Location: 0
    • Status: offline
    Re: .asm files not being automatically assembled 2018/04/12 07:22:41 (permalink)
    0
    It may be helpful, this is 16bit asm:  It goes in the constant section.
    .global _Font_Standard
    .section .const,psv
    ;----------------------------------------------------
    _Font_Standard:
    ;ascii start and ascii end
    .byte 32,144
    ;dimensions width and height
    .byte 5,7
    ;SPACE
    .byte 0b00000000
    .byte 0b00000000
    .byte 0b00000000
    .byte 0b00000000
    .byte 0b00000000
    .byte 0b00000000
    .byte 0b00000000
    ;EXPLANATION MARK !
    .byte 0b00100000
    .byte 0b00100000
    .byte 0b00100000
    .byte 0b00100000
    .byte 0b00000000
    .byte 0b00100000
    .byte 0b00000000

     

    MPLab X playing up, bug in your code? Nevermind, Star Trek:Discovery will be with us soon.
    https://www.youtube.com/watch?v=Iu1qa8N2ID0
    + ST:Continues, "What Ships are Made for", Q's back.
    #12
    davekw7x
    Entropy++
    • Total Posts : 1405
    • Reward points : 0
    • Joined: 2012/01/16 12:01:07
    • Location: Left Coast, USA
    • Status: offline
    Re: .asm files not being automatically assembled 2018/04/12 08:14:52 (permalink)
    +1 (1)
    mchahn
     

    .
    .
    .
    "/opt/microchip/xc8/v1.44/bin/xc8" -C --chip=16F15354 -Q -G --double=24 --float=24 --opt=none --addrqual=ignore -P -N255 --warn=-3 --asmlist -DXPRJ_default=default --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" --msgdisable=373 -obuild/default/production/logotable.obj logotable.asm
    .
    .
    "/opt/microchip/xc8/v1.44/bin/xc8" --pass1 --chip=16F15354 -Q -G --double=24 --float=24 --opt=none --addrqual=ignore -P -N255 --warn=-3 --asmlist -DXPRJ_default=default --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" --msgdisable=373 -obuild/default/production/logotable.p1 logotable.c

     



    (Look at the names of the files being processed at the ends of the lines.)
     
     
    Do you have a file named logotable.asm and another file named logotable.c?
     
    I know I am confused; maybe there is confusion somewhere between MPLABX and the Makefile and the compiler.
     
    Just a thought:
    What happens if you change one of the file names?  (After renaming, you might have to delete the cache; sometimes simply doing a "clean and make" doesn't do it, since "clean" doesn't really clean everything.)
     
    Regards,

    Dave
    post edited by davekw7x - 2018/04/12 08:18:34

    Sometimes I just can't help myself...
    #13
    Gort2015
    Klaatu Barada Nikto
    • Total Posts : 2596
    • Reward points : 0
    • Joined: 2015/04/30 10:49:57
    • Location: 0
    • Status: offline
    Re: .asm files not being automatically assembled 2018/04/12 09:32:50 (permalink)
    -1 (1)
    It's normal to have the same filename with different extensions.
    x.c
    x.h
    x.s
    x.o
     
    --errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l:

    Looking at that, you are mixing c with asm files, probably printf.



    MPLab X playing up, bug in your code? Nevermind, Star Trek:Discovery will be with us soon.
    https://www.youtube.com/watch?v=Iu1qa8N2ID0
    + ST:Continues, "What Ships are Made for", Q's back.
    #14
    du00000001
    Just Some Member
    • Total Posts : 1885
    • Reward points : 0
    • Joined: 2016/05/03 13:52:42
    • Location: Germany
    • Status: offline
    Re: .asm files not being automatically assembled 2018/04/12 09:45:51 (permalink)
    +2 (2)
    @ Gort2015 & rest of world
    With any reasonable compiler it is a bad idea to have a .c and a .as(m) source (plus eventually some .cpp file) with the same file name as all are by default compiled resp. assembled to the same destination file: <filename>.o (or <filename>.obj). Although this situation can be managed, I recommend to have unique filenames for the files creating code.
    (But you may have some .h and/or .inc or alike files with the same filename as the "code-generating" files. This is not a problem.)

    PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
    #15
    mchahn
    Senior Member
    • Total Posts : 100
    • Reward points : 0
    • Joined: 2016/08/03 11:47:25
    • Location: 0
    • Status: offline
    Re: .asm files not being automatically assembled 2018/04/12 10:07:37 (permalink)
    0
    > When you created the assembler file, you did select new assembly file?
     
    No, I used "add existing item...".  I just did what you said and copied the file contents over.  Now everything works.
     
    I would consider this a bug.   "add existing item..." should properly handle asm files.  There is even a file filter for asm files.
     
    Thanks to all for the help.
     
    EDIT:  The asm files are green in the projects pane now.  So the magic genie in the IDE now knows they are asm. 
    post edited by mchahn - 2018/04/12 10:10:05
    #16
    Gort2015
    Klaatu Barada Nikto
    • Total Posts : 2596
    • Reward points : 0
    • Joined: 2015/04/30 10:49:57
    • Location: 0
    • Status: offline
    Re: .asm files not being automatically assembled 2018/04/12 10:51:01 (permalink)
    0
    I do use unique names.
    If I have x.c and x.s, the x.c I make invisible.
     
     
    "Add existing item" - If the file was created as an asm file then it just adds it back in.
    Use that if you remove a file or mplab x screws up - often when creating libraries.
    (I've had to use that 100's of times)

    MPLab X playing up, bug in your code? Nevermind, Star Trek:Discovery will be with us soon.
    https://www.youtube.com/watch?v=Iu1qa8N2ID0
    + ST:Continues, "What Ships are Made for", Q's back.
    #17
    mchahn
    Senior Member
    • Total Posts : 100
    • Reward points : 0
    • Joined: 2016/08/03 11:47:25
    • Location: 0
    • Status: offline
    Re: .asm files not being automatically assembled 2018/04/12 10:53:58 (permalink)
    0
    > "Add existing item" - If the file was created as an asm file then it just adds it back in.
     
    One would think that it would know a file not seen before that ends in .asm is an assembly file.  It could at least ask what type a file it is.
     
    EDIT:  I added all my .c and .h files with "Add existing item" and they worked great.  As I said before, "Add existing item" even offers a file filter for assembly files.
    post edited by mchahn - 2018/04/12 10:55:52
    #18
    crosland
    Super Member
    • Total Posts : 1188
    • Reward points : 0
    • Joined: 2005/05/10 10:55:05
    • Location: Bucks, UK
    • Status: offline
    Re: .asm files not being automatically assembled 2018/04/12 10:56:26 (permalink)
    +2 (2)
    Gort2015
    It's normal to have the same filename with different extensions.
    x.c
    x.h
    x.s
    x.o
     

     
    But not C and assembler source files.
     
    .h and .o are irrelevant to this discussion. Neither are source files and and one is generated output.
     
    #19
    davekw7x
    Entropy++
    • Total Posts : 1405
    • Reward points : 0
    • Joined: 2012/01/16 12:01:07
    • Location: Left Coast, USA
    • Status: offline
    Re: .asm files not being automatically assembled 2018/04/12 12:23:04 (permalink)
    0
    du00000001
    @ Gort2015 & rest of world
    With any reasonable compiler it is a bad idea to have a .c and a .as(m) source (plus eventually some .cpp file) with the same file name as all are by default compiled resp. assembled to the same destination file: <filename>.o (or <filename>.obj). Although this situation can be managed, I recommend to have unique filenames for the files creating code.
    (But you may have some .h and/or .inc or alike files with the same filename as the "code-generating" files. This is not a problem.)




    I left the full text here because I agree.   And, specifically, I have seen problems like the ones reported here when helping a colleague to debug a project.
     
    In fact, I cooked up my own little project with Main.c and Main.asm that exhibited exactly the symptoms reported in the first post.  This is with XC8 version 1.45, MPLABX version 4.15.  The device happens to be a PIC16F18345 since I was working on a project with this one at the time I saw this.
     
    Here's the complete compiler output from "Clean and Build":

     
    make -f nbproject/Makefile-Bad_Test_16F18345.mk SUBPROJECTS= .build-conf
    make[1]: Entering directory '/home/dave/MPLABXProjects/16F18325_16F18345/16F18345_WithAsm.X'
    make  -f nbproject/Makefile-Bad_Test_16F18345.mk dist/Bad_Test_16F18345/production/16F18345_WithAsm.X.production.hex
    make[2]: Entering directory '/home/dave/MPLABXProjects/16F18325_16F18345/16F18345_WithAsm.X'
    "/opt/microchip/xc8/v1.45/bin/xc8" --pass1  --chip=16F18345 -Q -G  --double=24 --float=24 --opt=+asm,+asmfile,-speed,+space,-debug,-local --addrqual=ignore --mode=free -P -N255 --warn=0 --asmlist -DXPRJ_Bad_Test_16F18345=Bad_Test_16F18345  --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-osccal,-resetbits,-download,-stackcall,+clib   --output=-mcof,+elf:multilocs --stack=compiled:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s"    -obuild/Bad_Test_16F18345/production/Main.p1  Main.c
    "/opt/microchip/xc8/v1.45/bin/xc8" -C  --chip=16F18345 -Q -G  --double=24 --float=24 --opt=+asm,+asmfile,-speed,+space,-debug,-local --addrqual=ignore --mode=free -P -N255 --warn=0 --asmlist -DXPRJ_Bad_Test_16F18345=Bad_Test_16F18345  --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s"  -obuild/Bad_Test_16F18345/production/Main.obj  Main.asm
    build/Bad_Test_16F18345/production/Main.pre:11: error: (876) syntax error
    build/Bad_Test_16F18345/production/Main.pre:12: error: (845) symbol "unsigned" defined more than once
    build/Bad_Test_16F18345/production/Main.pre:12: error: (876) syntax error
    build/Bad_Test_16F18345/production/Main.pre:13: error: (845) symbol "unsigned" defined more than once
    build/Bad_Test_16F18345/production/Main.pre:13: error: (876) syntax error
    build/Bad_Test_16F18345/production/Main.pre:14: error: (845) symbol "unsigned" defined more than once
    build/Bad_Test_16F18345/production/Main.pre:14: error: (876) syntax error
    build/Bad_Test_16F18345/production/Main.pre:15: error: (845) symbol "unsigned" defined more than once
    build/Bad_Test_16F18345/production/Main.pre:15: error: (876) syntax error
    build/Bad_Test_16F18345/production/Main.pre:16: error: (844) lexical error
    build/Bad_Test_16F18345/production/Main.pre:17: error: (844) lexical error
    build/Bad_Test_16F18345/production/Main.pre:18: error: (845) symbol "unsigned" defined more than once
    build/Bad_Test_16F18345/production/Main.pre:18: error: (876) syntax error
    build/Bad_Test_16F18345/production/Main.pre:19: error: (844) lexical error
    build/Bad_Test_16F18345/production/Main.pre:20: error: (844) lexical error
    build/Bad_Test_16F18345/production/Main.pre:20: error: (845) symbol "struct" defined more than once
    build/Bad_Test_16F18345/production/Main.pre:21: error: (845) symbol "unsigned" defined more than once
    build/Bad_Test_16F18345/production/Main.pre:21: error: (876) syntax error
    build/Bad_Test_16F18345/production/Main.pre:22: error: (844) lexical error
    build/Bad_Test_16F18345/production/Main.pre:23: error: (844) lexical error
    build/Bad_Test_16F18345/production/Main.pre:24: advisory: (1) too many errors (21)
    (908) exit status = 1
    nbproject/Makefile-Bad_Test_16F18345.mk:128: recipe for target 'build/Bad_Test_16F18345/production/Main.obj' failed
    make[2]: *** [build/Bad_Test_16F18345/production/Main.obj] Error 1
    make[2]: *** Waiting for unfinished jobs....
    make[2]: *** [build/Bad_Test_16F18345/production/Main.p1] Error 1
    make[1]: *** [.build-conf] Error 2
    make: *** [.build-impl] Error 2
    Main.asm:1: warning: (374) missing basic type; int assumed
    Main.asm:1: error: (372) "," expected
    Main.asm:1: error: (192) undefined identifier "EEDATA"
    Main.asm:1: error: (188) constant expression required
    Main.asm:2: warning: (374) missing basic type; int assumed
    Main.asm:2: error: (372) "," expected
    Main.asm:3: warning: (374) missing basic type; int assumed
    Main.asm:3: error: (314) ";" expected
    Main.asm:13: error: (314) ";" expected
    Main.asm:14: error: (314) ";" expected
    Main.asm:15: error: (314) ";" expected
    Main.asm:16: error: (314) ";" expected
    Main.asm:17: error: (285) no identifier in declaration
    Main.asm:17: warning: (374) missing basic type; int assumed
    Main.asm:17: error: (314) ";" expected
    Main.asm:24: error: (285) no identifier in declaration
    Main.asm:24: warning: (374) missing basic type; int assumed
    Main.asm:24: error: (314) ";" expected
    Main.asm:24: warning: (374) missing basic type; int assumed
    Main.asm:25: warning: (374) missing basic type; int assumed
    Main.asm:25: error: (985) qualifiers redeclared
    Main.asm:25: error: (1098) conflicting declarations for variable "PMDATHbits_t" (Main.asm:24)
    (908) exit status = 1
    nbproject/Makefile-Bad_Test_16F18345.mk:106: recipe for target 'build/Bad_Test_16F18345/production/Main.p1' failed
    make[2]: Leaving directory '/home/dave/MPLABXProjects/16F18325_16F18345/16F18345_WithAsm.X'
    nbproject/Makefile-Bad_Test_16F18345.mk:90: recipe for target '.build-conf' failed
    make[1]: Leaving directory '/home/dave/MPLABXProjects/16F18325_16F18345/16F18345_WithAsm.X'
    nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed

    BUILD FAILED (exit value 2, total time: 1s)

     
    Here's Main.asm:

     
        psect eeprom_data,class=EEDATA,space=3,size=16,delta=2

        db 0x12
        db 0x34
        db 0x56
        db 0x78
     

     
    By fiddle-farting around with different sequences of Clean, Clean-and-Build, and Build, I could get it to build properly, but when I changed anything in either of the files and did a "Clean and Build" it failed again.  (See Footnote.)
     
    When I made a new configuration with Main.c and EEpromData.asm,  it built perfectly every time.  (EEpromData.asm in the "Good" configuration is identical to Main.asm in the "Bad" configuration)
     
    Bottom line: I rarely offer suggestions without some personal, direct experience with subject of the thread.  Of course I could be wrong, and whether it's "wrong" or "right," it may (or, maybe, not) help the Original Poster.  The suggestion may (or, maybe, not) be entirely appropriate.  Take it or leave it.  No hard feelings.
     
    Regards,

    Dave
     
    Footnote:
    My conclusion is that, after getting the "bad" configuration (with same base names but different "extensions" for the two files) to "work" some of the time, the probability of failure on any given click of "Build" depends on whether or not I had buried a chicken head under the front porch steps at the exact instant of vernal equinox.  I will have to wait a year to get another data point in attempting to prove the strength of the correlation.  In the meanwhile, I'll avoid having source files with the same base name.  The "good" configuration (with different base names for the files) "worked" every single time.  And that's all I have to say about that.
     
     
    post edited by davekw7x - 2018/04/13 18:52:08

    Sometimes I just can't help myself...
    #20
    Page: 12 > Showing page 1 of 2
    Jump to:
    © 2018 APG vNext Commercial Version 4.5