Announcement

Collapse
No announcement yet.

Compile Script & Documentation

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Compile Script & Documentation

    I'm working on creating a compile script for a pretty complex project but having some trouble. I'm using a Windows .bat script to do the job and can successfully invoke and run the script, but the result is not as expected. The IDE will normally produce the .4XE or .4FN files I desire, but the compile script I've written produces .aux, .bin, .err, .map, and .pjt files. How do I get the blasted thing to create .4XE and .4FN files?

    Also, I'm interested in writing a loader script using the SCRIPTC.exe program but can't find any documentation. Any help would be appreciated?

    For reference, here's my compileAll.bat script

    Code:
    [COLOR=#608b4e]REM Work Paths[/COLOR]
    [COLOR=#569cd6]set[/COLOR][COLOR=#d4d4d4] FourDPath=C:\PROGRA~2\4DLABS~1\4DWORK~1[/COLOR]
    [COLOR=#569cd6]set[/COLOR][COLOR=#d4d4d4] ProjectPath=D:\project\v2[/COLOR]
    
    [COLOR=#608b4e]REM Paths[/COLOR]
    [COLOR=#569cd6]set[/COLOR][COLOR=#d4d4d4] CompilerPath=[/COLOR][COLOR=#9cdcfe]%FourDPath%[/COLOR][COLOR=#d4d4d4]\DEP[/COLOR]
    [COLOR=#569cd6]set[/COLOR][COLOR=#d4d4d4] FourDIncludesPath=[/COLOR][COLOR=#9cdcfe]%FourDPath%[/COLOR][COLOR=#d4d4d4]\INCLUDE[/COLOR]
    [COLOR=#569cd6]set[/COLOR][COLOR=#d4d4d4] ProjectIncludesPath=[/COLOR][COLOR=#9cdcfe]%ProjectPath%[/COLOR][COLOR=#d4d4d4]\inherits[/COLOR]
    [COLOR=#569cd6]set[/COLOR][COLOR=#d4d4d4] ScreensPath=[/COLOR][COLOR=#9cdcfe]%ProjectPath%[/COLOR][COLOR=#d4d4d4]\screens[/COLOR]
    
    [COLOR=#608b4e]REM Compile the display manager[/COLOR]
    [COLOR=#9cdcfe]%CompilerPath%[/COLOR][COLOR=#d4d4d4]\4dcompiler.exe -Q -P -N [/COLOR][COLOR=#9cdcfe]%FourDIncludesPath%[/COLOR][COLOR=#d4d4d4] -P [/COLOR][COLOR=#9cdcfe]%ProjectIncludesPath%[/COLOR][COLOR=#d4d4d4] -O [/COLOR][COLOR=#9cdcfe]%ProjectPath%[/COLOR][COLOR=#d4d4d4]\output\manager[/COLOR]
    [COLOR=#9cdcfe]%ProjectPath%[/COLOR][COLOR=#d4d4d4]\manager\manager.4dg[/COLOR]
    Last edited by japfohl; 7 September 2017, 03:19 AM.

  • #2
    Try the attached, use /? to see the command line options.

    The samples contain the documentation relevant to them, they are beneath the C:\Users\Public\Documents\4D Labs\SCRIPTS folder
    Attached Files
    Mark

    Comment


    • #3
      Does ScriptC Support the Diablo based boards? When I try passing that one in it crashed and I get a stack dump and a bunch of program disassembly.

      Comment


      • #4
        If you are talking about line 1 in Scriptc, just use the line that is in the samples as is (The line has no functionality for the demonstrated usage, but must be there)

        If you still get an error, there should be some text outlining why at the start.

        If there isn't please post your script here
        Mark

        Comment


        • #5
          I pass file.bin to makeXeFn.exe Which successfully generates file.4XE, however the file.cfg is incomplete. The contents of file.cfg are "Unknown,0,Diablo,Unknown" instead of "Gen4-uL CD-43DT,2,Diablo,Gen4-uLCD-43DT-A." What am I doing wrong?

          Comment


          • #6
            Hello dom,

            If the incomplete '.cfg' file causes error(s) when loading the program to yor display, please try using this version of the program loader to load your project to your module.

            I hope this helps.

            Best regards,
            Attached Files
            Michael

            Comment


            • #7
              This version does allow me to load the program with an incomplete .cfg file, thanks. My concern, though, is that this now allows me to load a program compiled for a certain display model to any display model. Having a program loader that verifies the .cfg ensures that a program can only be loaded to a display that it was compiled for. In my Powershell script I have
              Start-Process -FilePath "$make4XEpath" -ArgumentList """$workName.bin"" ""$projectPath"""
              Where $make4XEpath is the path to makeXeFn.exe, $workName.bin is the path to the binary created by 4dcompiler.exe, and $projectPath is the output directory. I'm not sure what I'm doing wrong here.

              Having this updated program loader that doesn't verify the .cfg will do the trick, but ideally I would have a properly generated .cfg file that is verified by the program loader. This would just add an extra layer of security by stopping the less technical support staff from loading a program to the wrong display

              Comment


              • #8
                Any word on the proper method of generating a .cfg file outside of the IDE?
                Last edited by dom; 26 January 2019, 04:35 AM.

                Comment


                • #9
                  Originally posted by dom View Post
                  I pass file.bin to makeXeFn.exe Which successfully generates file.4XE, however the file.cfg is incomplete. The contents of file.cfg are "Unknown,0,Diablo,Unknown" instead of "Gen4-uL CD-43DT,2,Diablo,Gen4-uLCD-43DT-A." What am I doing wrong?
                  I have the same problem and I cannot find a way to solve it.
                  I have some child programs (.4FN) designed in VISI and saved on the uSD. If I compile them with Workshop IDE they work correctly. However, by using makeXeFn.exe they are created but they don't work.
                  Since the code is exactly the same, something is going wrong during the compiling process.
                  The only thing I can tell is that using the IDE the config files are correctly created for all child programs while it doesn't happen by using the makeXeFn executable file that creates only config files with "Unknown,0,Diablo,Unknown".

                  Any idea/suggestion what is going wrong and where should I look to find the problem?
                  Last edited by pasquale.gaeta; 2 September 2021, 03:37 PM.

                  Comment


                  • #10
                    Hi,

                    Good Day.

                    You can check this application note as reference.

                    ViSi: Run Child Program

                    Best Regards,
                    Ferdinand

                    Comment


                    • #11
                      Originally posted by frsantiago View Post
                      Hi,

                      Good Day.

                      You can check this application note as reference.

                      ViSi: Run Child Program

                      Best Regards,
                      Ferdinand
                      Hi Ferdinand,

                      I checked the document and except for telling me an alternative way to design child programs using ViSi, it is not helping me how to use the makeXeFn executable program to get the .4XE or 4FN files from the .bin.
                      I tried with child programs and main program, which is developed with Designer, and gives me only the same result:
                      • 4XE, 4FN files compiled with the IDE work
                      • 4XE, 4FN files compiled with the executable program don't work
                      I check the outputs files given by the compilation with IDE and Compiler.exe and both are the same.
                      I would like to understand what is going wrong to have different 4XE and 4FN files. In other words, I would like to understand how the program makeXeFn.exe is determining and creating the .cfg files and it is affecting the 4XE and 4FN files.

                      I attached the outputs coming from both compiling processes. I hope it can help to understand what is going wrong. There you can find all information, compiler version included.
                      I'm using the display model Gen4-uLCD-70DT-SB and my IDE version is 4.7.0.9

                      I don't want to be repetitive, but my way to make the child program works. The pattern has been tested over years and by using the IDE everything works fine. Unfortunately, the modules (child programs) are many, and compiling all of them manually is a nightmare.
                      Attached Files

                      Comment


                      • #12
                        Originally posted by pasquale.gaeta View Post

                        Hi Ferdinand,

                        I checked the document and except for telling me an alternative way to design child programs using ViSi, it is not helping me how to use the makeXeFn executable program to get the .4XE or 4FN files from the .bin.
                        I tried with child programs and main program, which is developed with Designer, and gives me only the same result:
                        • 4XE, 4FN files compiled with the IDE work
                        • 4XE, 4FN files compiled with the executable program don't work
                        I check the outputs files given by the compilation with IDE and Compiler.exe and both are the same.
                        I would like to understand what is going wrong to have different 4XE and 4FN files. In other words, I would like to understand how the program makeXeFn.exe is determining and creating the .cfg files and it is affecting the 4XE and 4FN files.

                        I attached the outputs coming from both compiling processes. I hope it can help to understand what is going wrong. There you can find all information, compiler version included.
                        I'm using the display model Gen4-uLCD-70DT-SB and my IDE version is 4.7.0.9

                        I don't want to be repetitive, but my way to make the child program works. The pattern has been tested over years and by using the IDE everything works fine. Unfortunately, the modules (child programs) are many, and compiling all of them manually is a nightmare.
                        Could anyone tell me how the 4XE and 4FN are created from the .BIN file? I still have the issue that the 4FN and 4XE files created with the IDE work while the ones created with the compiler.exe don't.

                        Comment

                        Working...
                        X