Using Microchip MPASM with UES

Using Microchip MPASM with UES

6
NewbieNewbie
6

    Dec 07, 2013#1

    Hello. I'm using UES 11.10.0.1003, and would like to launch the Microchip MPASM PIC assembler from the Build toolbar. I have read the help file about adding a new compiler, and it seems complicated. I also looked at the Microchip C compiler configuration file as an example..

    As instructed by the help file topic, Adding A New Compiler, I created a Microchip MPASM Assembler directory in UES_PATH\Configs\ and saved an empty PIC Application file in it. The help file then says, "...when the configuration file is completed, the added directory and file names will be used to populate the compiler list in UEStudio when the Edit Configuration button is pressed in the Select Compiler dialog."

    This makes sense to me. The help file also says, under the Select Compiler dialog section that if I open that dialog, I can edit the compiler configuration file. But the Select Compiler button on the menu is disabled -- I can't get to the dialog!

    I had an old version of UES (or UE) launching MPASM, so I know it can be done, but the configuration apparently was lost over several upgrades and a new computer.

    Is there a config file for the Microchip MPASM that I can download and use?

    If not, can anyone suggest a way to add this assembler to UES?

    Thanks for any help.

    --- Mike

    6,680583
    Grand MasterGrand Master
    6,680583

      Dec 07, 2013#2

      UEStudio v14.00 contains an Application file for Microchip C Compiler.

      Code: Select all

      # ----------- Microchip C configuration ------------
      # --- general --------------------------------------
      # $P  - project name
      # $Pp - path to project directory
      # $Pn - project name
      # --- compile --------------------------------------
      # $I  - input full name
      # $Ip - input path
      # $In - input name
      # $Ie - input extension
      # $O  - output file
      # $Op - path to output file
      # $On - output filename (without path)
      # $Oe - output extension
      # $R  - release/debug setting for compiler
      # --- build ----------------------------------------
      # $T  - target full name
      # $Tp - target path
      # $Tn - target name
      # $O  - output file
      # $Op - path to output file
      # $On - output filename (without path)
      # $Oe - output extension
      # $R  - release/debug setting for linker
      
      [Settings]
      Target = 
      Category&01 = DEFAULT RUN CONFIGURATION
      Working Directory =.
      Category&02 = COMPILER OPTIONS
      Memory Model = s|l
      Linker Script = 
      Compiler = MCC18
      Linker = MPLINK
      Excluded Files = Excludes
      Compiler Options = -Opa-
      Linker Options =
      Debugger= 
      
      [SettingsInfo]
      Target = Provides a space for you to specify an output file and location of the program that the linker creates.
      Working Directory = Provides a space for you to specify the directory in which executing occurs. If you do not specify a directory, executing occurs in the directory where the executable is located.
      Excluded Files = This will exclude the file(s) included in this UE project group from the build.
      Compiler Options = Provides a space for you to specify an additional compiler options.
      Linker Options = Provides a space for you to specify an additional linker options.
      Memory Model = s-small, l-large.
      Debugger=Provides a space for you to set the debugger you want to use to debug application.
      
      [Variables]
      CPATH =C:\MCC
      MCC = $(CPATH)\BIN\$(Compiler)
      MCL = $(CPATH)\BIN\$(Linker)
      LINKSCRIPT = $(MCC)\LKR\$(Linker Script)
      UPLOADER = Z16080Upload.exe
      
      [Environment]
      
      [General]
      TargetExt = .EXE
      ReleaseOut = Release
      DebugOut = Debug
      UseFullPaths = 0
      UseDosNames = 1
      Excludes = $(Excluded Files)
      
      [MakeCommands]
      upload = Upload Application
      debug=Start Debugger
      makef=Show Makefile
      
      [Upload Application]
      Title = Upload $T
      Cmd0 = $(UPLOADER) $T
      Depends = $T
      ShowWindow = 1
      DisplayConsole = 1
      
      [InsertFiles]
      
      [FileGroups]
      FGO = .o;
      
      [GroupFormats]
      FGO = %s
      
      [Build]
      Out = $T
      Depends = $FGO
      Cmd0 = $(MCL)\MPLINK $(Linker Options) /m $On.map /o $O /l $(MCC)\lib $(LINKSCRIPT) $FGO
      
      [.C]
      Out = $In.o
      ReleaseFlag = -O
      Cmd0 = $(MCC)\BIN\$(Compiler) -w2 -m$(Memory Model) -p=18C252 -i$(MCC)\H $R $I
      
      [Start Debugger]
      Title=Debug $T
      Cmd0=$(Debugger) $T
      Depends=$T
      ShowWindow=1
      
      [Show Makefile]
      Title=Show makefile
      Cmd0=uestudio $(UESMAKEFILE)
      ShowWindow=1
      DisplayConsole=0
      You need to change
      • parts of group [Settings] as you most likely want assembler instead of C compiler options available for selection,
      • parts of group [SettingsInfo] according to the changes in group [Settings],
      • you may want to add a variable in [Variables] for calling the assembler executable,
      • group [.C] needs to be replaced by a group for your assembler files with extension .ASM or whatever is used for your assembler files with adapting ReleaseFlag = and Cmd0 = for the assembler,
      • and last the comment in the first line should be also modified for completness.
      The Select Compiler command is disabled as long as you have not created an UEStudio project. So you must first execute Project - New Project/Workspace - Create New Project and configure the new project by specifying a project name, selecting the projects directory, adding your assembler file(s) to the project, and select already now the compiler respectively assembler on Settings tab using button Set/change compiler.
      Best regards from an UC/UE/UES for Windows user from Austria