Developing Program for Lipman Nurit in Linux
I have a project to program a wireless POS from Lipman, called Nurit (mine is 8010) series. The SDK for this device is only available for Windows, with a compiler from 3rd party (which also only available for Windows). A GCC Port for this device is provided, but without source code (or may be I just don't know where to find it), and it has some mysterious bugs when generating code (the assembly codes it generates look perfectly fine). There is no emulator for this device, and to be able to debug the device, some special debugging device is needed (which we don't have), and this adds a frustration for me.
Nurit OS is a new platform for me, so I still need to read its documentation. The API Documentation for Lipman Nurit is written in chm format, and by default most Linux distribution don't come with a CHM file reader.
xchm is quite nice for reading CHM files, but not all of chm file feature is supported. This is the native application for reading chm files on Linux.
Running hh.exe with wine
Opening chm files with hh.exe is a little better, because you will get most of the Windows TEMP Help functionality, but it is also slower (because of the API call overhead)
Cross Compiling using Wine
To compile Nurit application (ARM version), you would need hcarm (the documentation suggest version 4.5a, and this is what I used right now). The application doesn't need a special configuration to be run under Wine. The instruction for running hcarm to compile Nurit application under Wine is:
- If your hcarm folder in your Windows partition is accessible from Linux, create a link to hcarm_4.5a, to do that, from your wine C directory (where the drive C is mapped in your path) type:
ln -s /windows/hcarm_4.5a. You can also copy the hcarm_4.5a directory (recursively)to your wine C folder.
- Copy your ADE_ARM directory recursively (i.e. you must also copy all the directories in it) to your Wine C directory.
- Create a short batch file to setup the path (this supposed to be settable from wine.conf, but I haven't been able to make it work and hasn't look in to it again). The batch file should contain:
- change directory to
build.bat, if everything went OK, you should get the output hex file
Using GCC and Writing API wrapper for Linux
Compiling using the hcarm compiler is slow, and you must deploy (download) the program to the device for testing, and this makes it double slow. If you are going to develop a large application (or many application), I suggest you wrote a wrapper for the Nurit API (so you will have some kind of emulator)
Building using the batch file is not efficient, because files that are not changed gets recompiled (which is really bad, because the build process is already slow). There is nothing special in creating a Makefile for Nurit, but you must remember to use different parameters when compiling APPLHEAD.C and the rest of the file. Here is some variable definition that might be useful for you.
APPLHEADFLAGS=-Hthumb -Hoff=Char_default_unsigned -HB -Hoff=Word_align_vars CFLAGS=-Hpic -Hthumb -Hoff=Char_default_unsigned -HB -Hoff=Word_align_vars -Hon=Version3M -Hon=Version4 -Hinterwork -Os -Hoff=behaved -Hoff=recognize_library LDOPTS=-z dup -zpurgetext -Xnocompress -Bpictable -Bcopydata -Csymbols -Cglobals CC=hcarm LD=ldarm ELF2HEX=elf2hex