• AVR Freaks

Hot!AVR Assembler with MPLAB X Ide

Author
Strontium
New Member
  • Total Posts : 2
  • Reward points : 0
  • Joined: 2019/06/17 19:08:40
  • Location: 0
  • Status: offline
2019/06/19 04:30:35 (permalink)
0

AVR Assembler with MPLAB X Ide

I am starting to write an assembly program for ATTINY416.  And have a few issues.
 
1. How do i change the extension to .S from .s?
        .s is the convention for assembler source WITHOUT C Preprocessing, but I am using C preprocessing.  The IDE is calling GCC with the flags to enable Preprocessing, BUT if I ask the compiler to save temporary files, there is a conflict, because the compiler wants to generate a .s file as preprocessed source.  And I would like to see that.
 
2. It seems the Project Properties "Additional options" doesn't do anything. 
        If I place -save-temps in there for assembler source, either kind then that option is not passed to the compiler.  The ONLY way i have found to do it, is to manually add options to the Makefile "MP_EXTRA_AS_PRE"
 
3. Is there a way to generate a listing, and have it take the name of the assembler file?
        I CAN generate a listing by adding "MP_EXTRA_AS_PRE=-Wa,-adhln=test.lst" to the Makefile, BUT i don't want the listing to be called "test.lst" I want it to be called myfile.lst where "myfile" is the name of each assembly file in my project.  Whats the way to achieve this?
#1

1 Reply Related Threads

    Strontium
    New Member
    • Total Posts : 2
    • Reward points : 0
    • Joined: 2019/06/17 19:08:40
    • Location: 0
    • Status: offline
    Re: AVR Assembler with MPLAB X Ide 2019/06/19 16:43:19 (permalink)
    0
    I am going to partly answer my own questions:
     
    1. Rename to .S
         I had to manually rename from the command line, and then adjust the project configuration to match.  This gave me strange errors, like it was still looking for a .s file.  So, from the command line i did a make clean and then make built the newly renamed file.  Since that the IDE has also behaved.  Not sure if this is EVERYTHING i did, because i fiddled a lot before it started working.
     
    2. Still don't know.  The Extra Options dialog entries seem broken.
     
    3. MP_EXTRA_AS_PRE=-Wa,-adhln=$*.lst -save-temps=obj
    This will cause GCC to save its temporaries and generate a .lst file in the build directory.  The catch is the listing file will ONLY work if you run make from the command line.  Running make in the IDE generates a ".lst" file (yes, no name just the extension) in the root directory of the project.  Which is kinda useless.  Not sure WHY the IDE and command line invocations of MAKE differ.
    #2
    Jump to:
    © 2019 APG vNext Commercial Version 4.5