Question: Are there any
Build Manager Tricks, Limitations and Examples?
Answer: The following tricks may help.
How to: Always force a rebuild of a file:
Specify a non-existent dependency (manually) – the build manager delegates the responsibility of alerting the user to a missing dependency to the translator, and so forces a build.
How to: Always force a rebuild of a set of inputs using the command line component:
Leave the output mapping edit box empty.
Problem: The assembler doesn't find the include files:
If you are having problems with the assembler not finding included files (using asmXXX), it could be due to the following artefact of the assembler: the include is relative to the invocation directory of the translator (In Pro-DG, this is set to the working directory – the project root). In the future, either the assembler will be altered, or it will be possible to specify the invocation directory for a command via the Project, Settings dialog. For now, make the includes in your asm files are relative to your project working directory.
Question: Are there any Build Manager Limitations?.
Answer: The compiler component currently only allows compilation or assembly. To preprocess or incorporate a link stage, a command line component must be used.
The assembler component currently does not support the creation of any binary code. To output pure binary in .cpe format, or in Motorola s-record format, a command line component must be used.
Cannot provide input mappings that match anything but the end of the file name. e.g. nnn* is disallowed but *nnn is OK. E.g. l*.cpe is disallowed but *e_1.cpe is valid.
Because the same linker script will be used across all configurations there must be only one intermediate directory for each configuration: the one that is referenced in the linker script. A side effect of this is that, when changing configurations, it may be necessary to delete object/output files in order to build this new configuration. A future improvement will remove this restriction.
Also, take care to synchronize the list of object files included in the linker script with the inputs passed to the linker component. Currently, the linker script is not parsed, and so these need to be synchronized at all times to ensure rebuilds when necessary. A future improvement will allow a GUI way to generate a linker script and so the Build Manager can automate the process.
Question: Are there any Build Manager Examples?.
Answer: There are several examples that follow that may help you.
How Ccpsx/Asmpsx wrapped components actually work.
When you use the wrapped compiler and assembler it’s useful to know how the command lines are created so you can see how to write your own.
Command ccpsx [Tab Options] –c$(FileFullPath) -o$(OutDir)($FileName).obj
Assuming the current setting’s intermediate directory is c:\project\int and the translator has an input of c:\project\soure\file.c we get file.c à file.obj via the command line:
ccpsx [Tab Options] –cc:\project\source\file.c –oc:\project\int\file.obj.
The wrapped assembler works similarly.
Command line examples
So, following this example it is easy to create your own command line components which may invoke ccpsx or asmpsx under different modes. Throughout these examples it is assumed that the correct components or folders are connected to the command line component (e.g.. folders with source files in for assembler/compiler, cpe2x command line component connected to the linker and so on).
For example, to just preprocess some C source files using ccpsx use the following settings:
Command ccpsx –E [Tab Options] $(FileFullPath) -o$(OutDir)($FileName).obj
Or, to generate a binary image using asmpx and a symbol file for each source file, use these settings:
Command asmpsx /p [Tab Options] $(FileFullPath),$(OutDir)($FileName).cpe, $(OutDir)($FileName).sym
This is an example of how the execute once mode works with the command line component. It was implemented to facilitate simple linker usage, whereas, in all but the simplest cases, a linker script is necessary. Notice that, when in execute once mode, the output mappings are interpreted as a list of explicit filenames generated relative to the command output directory.
Command psylink [Tab Options] $(InputFileFullPathList),$(OutDir)output.bin, $(OutDir)output.sym, $(OutDir)output.map
Assuming the current setting’s output directory is c:\project\out and the command line component has inputs of one.obj, two.obj, three.obj all found in the c:\project directory we get one.obj, two.obj, three.obj à output.bin, output.sym, output.map via the expanded command line:
psylink c:\project\one.obj+c:\project\two.obj+c:\project\three.obj, c:\project\out\output.bin, c:\project\out\output.sym, c:\project\out\output.map.
It is worth noting that the command line component can be used to invoke a command which does not depend on any input files (i.e. there are no reference to file macros in the command line) and requires execution each time there is a build.
Command explicit command to invoke every time
For the following examples using cpe2x and symmunge, either once only mode, or per input file mode can be used – it doesn’t matter if there is only one input file.
Other tool examples:
CommandOutDir $(COutDir) (or wherever the cpe file is located)
Command cpe2x $(FileFullPath)
CommandOutDir $(COutDir) (or wherever the sym file is located)
Command symmunge $(FileFullPath)
CommandOutDir $(CIntDir) (or wherever the obj files are located)
Command dmpsx $(FileFullPath) –b
Question: How do I set up dependencies so that a project will link if a dependant library file (built in a different project) has been updated?.
Answer: You need to add the library as a manual dependency of the linker script. Select the linker script file in the project pane, choose view->properties -> manual dependencies -> add. Locate the file and click OK. Now, the link phase of that project will be performed if the library file is newer than the outputs of the link.
Question: How do I add my project to Source Safe? Pro-DG doesn't seem to let me, always saying 'Could not initialise Source Control database'.
Answer: Check that ssapi.dll which ships with Visual SourceSafe is properly registered. Locate SSAPI.DLL on your PC. Register the DLL with RegSvr32.exe. If you don't have this executable, ask SN Systems for it
Question: How do I get Pro-DG to download and run the CPE file after a build?.
Answer: You can execute snrun.exe in a command line component at the end of the build. There are a number of Pro-DG enhancements due soon which will enable target communications and also help with the running of external programs controlled by script. Snrun.exe is a command line component which supplements the Windows software for target communication. To find out what it can do, type "start snrun" in a DOS prompt and then type "help"
Question: The fonts don't seem to work in the edit pane.
Answer: Pro-DG v 1,0,0,0 uses version 1.0 of SourceView ActiveX control which only supports the following proportional fonts: Fixedsys, Courier, and Courier New. The bold and italic token styles will only work with the Courier New font.
SN Systems will ship the next version of SourceView as it becomes available which doesn't have these restrictions.