Skip to main content
Skip table of contents

Diskless operation


This page applies to Harlequin v13.1r0 and later; and to Harlequin Core but not Harlequin MultiRIP.

As of Harlequin v13, this section is DEPRECATED; DO NOT USE IT, as this functionality will be removed in a future version.

This section provides information on how you can modify and re-build the RIP for diskless operation. This allows the SW folder to be imported into memory.

Diskless operation is relevant mainly to embedded systems. When using an in-memory SW folder on standard platforms, the disk is still utilized because it is undesirable to consume RAM space with temporary raster data, thus reducing the amount of RAM available for ripping. Therefore you should note that when the SW folder is in-memory, the disk is used to store temporary pagebuffer data.

The import tool is a self-contained, command-line driven program which is used to transform a directory tree structure into one or more C files. The C files can then be compiled into the RIP as built-in data and loaded into memory by the RAM PostScript device (usually device type RAM_DEVICE_TYPE, but redefined to take OS_DEVICE_TYPE in diskless mode).

In normal circumstances the import tool is called automatically by the Makefile, so there is no need to manually use it.

The import tool utility is in the following location:

\<install folder>\bin\imptool.exe

On Linux and macOS go to:

\<install folder>\bin\imptool

For more information see Using the import tool below.

Using the import tool

The import tool is used on a command-line in the following form:

imptool -root <source> -output <file> -var <varname> [-multiple [-line max] ]

where:

root source

The source file or directory to be converted. (Required).

output file

The target C file to output. (Required).

var varname

The variable name in target C file. (Required).

multiple

Multiple mode creates several smaller, more easily handled files. Without this option one very large C file is created. (Optional).

line max

When used with Multiple mode the line max option specifies the maximum number of lines in each individual C file. (Optional).

help

Displays a simple help message.

To convert the SW folder to one or more C files, use the following method:

1. Because of the size of SW folder, you should begin with an unused installation of the SDK, and further, you should remove all unnecessary files from the SW folder before running the import tool. If you intend to use the clrip application with an in-memory SW folder, you must not remove the TestConfig folder from SW folder before running the import tool.

When creating an in-memory SW folder, we recommend that you use the -multiple mode to avoid running out of memory. For more information see Errors and warnings when compiling with an in-memory SW folder below.

2. At a Windows command prompt, find and then CD to the location of the import tool in your distribution and run:

imptool -root ..\..\SW -output sw.c -var pSWRam

Using a Linux terminal window, find and then CD to the location of the import tool in your distribution and run:

./imptool -root ../../SW -output sw.c -var pSWRam

In a macOS terminal window, find and then CD to the location of the import tool in your distribution and run:

imptool -root ./../lib/SW -output ./sw.c -var pSWRam

Note the leading ./ to be used when specifying a relative path name on macOS. A single file called sw.c is created in the same directory as the import tool.

To create multiple files on Windows use:

imptool -root ..\..\SW -output sw.c -var pSWRam -multiple

On Linux use:

./imptool -root ../../SW -output sw.c -var pSWRam -multiple

On macOS use:

imptool -root ./../lib/SW -output ./sw.c -var pSWRam -multiple

In this case, as well as the sw.c file, a number of extra files are created, named: mfs0.c, mfs1.c, mfs2.c, and so on.

For more information see Building the RIP with an in-memory SW folder - Windows and Building the RIP with an in-memory SW folder - Linux macOS below.

Building the RIP with an in-memory SW folder - Windows

To build the RIP with an in-memory SW folder.

  1. Ensure you have selected the correct build environment for the OS you are using and the OS you are targeting.
  2. Go to the location of the Makefile: \<install folder>\bin
  3. Build the RIP using the following command:
    nmake USE_RAM_SW_FOLDER=1 -f Makefile

The Makefile drives the import tool and the compiler automatically.

When importing the SW folder, the Makefile assumes that the root of the SW folder is at ..\SW, which is the default location in the SDK. If you wish to import the SW folder from a different root directory, you must reconfigure the definition of SW_ROOT_DIR. This can be done either by editing the Makefile, or by overriding the definition on the command line. Using for example:

nmake USE_RAM_SW_FOLDER=1 SW_ROOT_DIR=C:\OEMPreparedSWFolder\SW -f Makefile

If you wish to re-import the SW folder, you need to manually delete swfolderlib.lib and run the build again.

A RIP with an in-memory SW folder is created.

4. For a Visual Studio build, use the equivalent of nmake USE_RAM_SW_FOLDER=1 -f Makefile: Right click on clrip in the Solution Explorer, open the Properties dialog, and add USE_RAM_SW_FOLDER; to Configuration Properties -> C/C++ -> Preprocessor -> Preprocessor Definitions. Then use Build -> Rebuild Solution to recompile all the files in the project with the new setting.

Errors and warnings when compiling with an in-memory SW folder

When compiling the RIP with an in-memory SW folder you may see a warning similar to the following:

TEXT
                      nmake version is: 7.10.3077 sw.c
                      ..\lib\skinkit\src\sw.c(3076988) : warning C4049: compiler limit : terminating line number emission
                      Compiler limit for line number is 65535

This occurs because the SW folder is very large, and the import tool creates a lot of static binary data which it then divides into small chunks. The warning happens because there are more than 64K lines in the sw.c file, and because the compiler/linker/debugger can only allocate 16-bits to hold the line number. Therefore, any further warnings or errors cannot be reported with a line number. There is no executable code in the file, so this error can safely be ignored. Using the -multiple option offers the benefit of producing multiple smaller more easily handled files, but using it does not necessarily prevent the error.

If an error similar to the following occurs, your machine has run out of memory:

TEXT
fatal error C1002: compiler is out of heap space in pass 2<br />
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.

Building the RIP with an in-memory SW folder - Linux macOS

To build the RIP with an in-memory SW folder:

  1. On Linux use the following command:

gmake USE_RAM_SW_FOLDER=1 -f Makefile

On macOS use:

make USE_RAM_SW_FOLDER=1 -f Makefile

The Makefile drives the import tool and the compiler automatically.

When importing the SW folder, the Makefile assumes that the root of the SW folder is at ../SW, which is the default location in the SDK. If you wish to import the SW folder from a different root directory, you must reconfigure the definition of SW_ROOT_DIR. This can be done either by editing the Makefile, or by overriding the definition on the command line. Using for example:

gmake USE_RAM_SW_FOLDER=1 SW_ROOT_DIR=/OEMPreparedSWFolder/SW -f Makefile

If you wish to re-import the SW folder, you need to manually delete swfolderlib (on macOS) and swfolderlib.a (on Linux) and run the build again.

  1. If you created a single file from the SW folder, use an editor to open the Makefile and add the following object to the LE_OFILES list:

LE_OFILES

$(OBJ_DIR)/skinkit/sw.o/

If you created multiple files from the SW folder, use an editor to open the Makefile and add the following list of objects to the LE_OFILES list:

TEXT
                      LE_OFILES
                      $(OBJ_DIR)/skinkit/sw.o/
                      $(OBJ_DIR)/skinkit/mfs0.o/
                      $(OBJ_DIR)/skinkit/mfs1.o/
                      $(OBJ_DIR)/skinkit/mfs2.o/
                      $(OBJ_DIR)/skinkit/mfs3.o/ and so on...
  1. Ensure you have selected the correct build environment for the OS you are using and the OS you are targeting.
  2. Go to the location of the Makefile which is in the following directory:

/Harlequin_RIP_SDK_xxxx/bin/

On Linux build the RIP using the following command:

gmake -e SWOPT=-DUSE_RAM_SW_FOLDER -f Makefile

On macOS build the RIP using the following command:

make -e SWOPT=-DUSE_RAM_SW_FOLDER -f Makefile

You would then have a RIP with in-memory SW folder.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.