Menu

Compiler CMD line option

ToniG
2022-12-28
2023-02-06
  • ToniG

    ToniG - 2022-12-28

    Using Synwrite IDE, compiler build 1189, How do I re-enable /K:A option for asm.
    I am trying to troubleshoot a math calc issue with Mega328 ( likely my code) but the newer version does not show basic code in the asm (just the sub names). In build 1173 I can see every basic line in the asm which is great for analyzing issues.
    The compile.bat already has the /K:A option so this file may not be used by the IDE compile?
    I suspect the HW multiplier in the 328 might not be supported in the simulator I use, I tried #Undefine HardwareMulti & or set HardwareMult=n in the mega328.dat, but its not easy to isolate the code without the basic line in asm.

    I have attached 2 test programs, MathCalc1.gcb gives the correct result 5520, MathTest2.gcb result = 144 (which is just the low byte)
    What is strange is the reference word variables RefCalc1, RefCalc2 also exhibit the same low byte only issue.

    Now I'm struggling to test due to simulator issues...

     
  • Anobium

    Anobium - 2022-12-28

    There ha been no changes to the support of command line switches.

    Looks to me by examining the ASM that your build of the compiler is broken. Reinstall is advised but the ASM is full of codes from the preprocessor, And, my build of 1189 does not exhibit this issue,


    I have tested on build 1208 with /K:A - this works as expected. With the command line parameters from the command line.

     

    Last edit: Anobium 2022-12-28
  • Anobium

    Anobium - 2022-12-28

    Also, you program needs a tweak. Var1 is Debug_Print is a byte. This should be a word.

    Sub Debug_Print(Var1 as Word)
        HSerPrint Var1
        HSerSend 13
     '   HSerSend 10
    End Sub
    
     
  • ToniG

    ToniG - 2022-12-28

    Sorry... the files in the build_ folders are output of 1183 compiler called from SimulIDE,
    arguments=" -NP -A:GCASM -R:text -O:$buildPath$fileName.asm $filePath"

    I will look at my synwrite install.

     
    • Anobium

      Anobium - 2022-12-28

      Where is the build_ folders? We are at build 1210 now.

      re the parameters I would recommend changing to -NP -S:use.ini Then, you have full access all the parameters in the Prefs Editor.

       
  • ToniG

    ToniG - 2022-12-28

    Where is the build_ folders

    In the zip folder attached to first post

    I just installed latest GCstudio 1208, no change to asm
    Files attached for comparative reference.

    I will try compile using cmd line manually to test...


    [I was chasing my tail a bit , I had a program that would not adjust the 3phase duty cycle from 16bit math % calculation, so I made a minimal test code, & as you found I didn't use word var in the Debug_Print sub. ] ^_^
    So I will use 1174 for now for this math issue

     
    • Anobium

      Anobium - 2022-12-28

      Sorry, I am confused. What is the issue remaining?

       
  • ToniG

    ToniG - 2022-12-29

    Latest install of GCstudio, my desktop shortcut to syn.exe calls up the IDE... this is all ok
    When I click on the hex button in Syn IDE, I get the asm output without basic statements, but it has the sub names.
    If I run the file "compile.bat mybas.gcb" in the GCstudio\GreatCowBASIC folder of GCstudio install the asm now contains the basic statements. This is how it used to be before GCstudio.
    So the compiler build does not appear broken.

     
    • Anobium

      Anobium - 2022-12-29

      In GC Code, open Prefs Editor, and change the check box to show Comments in the ASM.

      Or, if using SynWrite from GC Studio then access Prefs Editor and change the check box to show Comments in the ASM.


      When using an installed solution the use.ini has all the settings. And, therefore using Prefs Editor changes use.ini which is passed to the compiler. There are more parameters available via use.ini - the command line would be very complex to support all the new compiler parameters,

       

      Last edit: Anobium 2022-12-29
  • ToniG

    ToniG - 2022-12-29

    Thanks, I will check it.

     
  • Fulvio _

    Fulvio _ - 2023-02-06

    How am I suppose to write a PIC with Pickit3 in Linux?
    All day struggled to find a workable condition with Archlinux. The only available is to set up MplabX-IDE which need Python2 and all the bloat along it.
    I got the attempt to install Pickit-minus, but I can't run appimage.

     
  • Anobium

    Anobium - 2023-02-06

    Please contact me on pickitplus AT anobium co uk ( change the AT to @ and remove the spaces).

    We wrote PICKitPlus. Pickit-minus took our good work and provides no support.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.