Ladder Logic for Netzer, PIC and AVR
The original code (Release 2.2) was taken form the Ladder Micro project maintained by Jonathan Westhues: http://cq.cx/ladder.pl
Basically the project is extended with CMake list files to build it with other toolchains like MinGW compiler (also CrossCompile is possible from Linux).
Furthermore some special features for the Netzer (PIC based) platform are added. On this platform a very fast interpreter (entirely written in assembler) was implemented, which runs with int code generated by this ldmico extension. Read more: http://www.mobacon.de/wiki/doku.php/en/netzer/process
- Using Microsoft Visual C++ Compiler
LDmicro is built using Microsoft Visual C++ compiler. If that is installed correctly, then you should be able to just run
make.bat
and see everything build.
make.bat uses nmake.exe to compile the project, but Microsoft Visual Studio doesn't add nmake into your path automatically. You can start Visual Studio Command Prompt, change into ./ldmico, and run make.bat
(or just enter nmake D=LDLANG_XX
, where XX can be set to EN, DE, FR, ES, IT, PT, TR or CN).
Various source and header files are generated automatically. The perl scripts to do this are included with this distribution, but it's necessary to have a perl.exe in your path somewhere.
- Using GCC Compiler
For compiling on Windows start a command prompt and enter the following commands:
cd ldmicro
mkdir build
cd build
cmake -G "MSYS Makefiles" -DLANGUAGE=DE ..
make all
Ensure that CMake, MinGW and MSYS are installed and in your path. LANGUAGE can be set to EN, DE, FR, ES, IT, PT, TR or CN.
For cross compiling on Linux start a command prompt and enter the following commands:
cd ldmicro
mkdir build
cd build
cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=../Toolchain-mingw32.cmake -DLANGUAGE=DE ..
make all
LANGUAGE can be set to EN, DE, FR, ES, IT, PT, TR or CN.
MinGW and CMake can be installed with
sudo apt-get install mingw32 cmake
For using ldmicro on Linux you have to install wine and winetricks. After installation you also should install ldmicro used fonts:
winetricks Lucida Tahoma
Start ldmicro with simply typing:
./ldmicro.exe