blob: 56dfd7f3fe4f1101fc39993e874813efb0b62cdc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
# About LDMicro
LDmicro is a ladder logic editor, simulator and compiler for 8-bit microcontrollers. It can generate native code for Atmel AVR and Microchip PIC16 CPUs from a ladder diagram.
# LDMicro for Linux
This is a Linux compatible version of the original LDMicro program for windows created by Jonathan Westhues, and ported to Linux using the Qt library.
GitHub repository of LDMicro for windows can be found [here](https://github.com/akshay-c/LDmicro).
# Instructions
Before modifying contents of this git account, kindly make sure that you do not add unnecessary files that are created during the make process. In order to do so ensure that you add appropriate command to the makefile and execute "make clean" script before uploading your changes to git.
# Building LDMicro for Linux
LDmicro for Linux is built using MinGW C++ compiler.
### Building the Makefile
In order to generate the Makefile that can be used to compile the project, simply run the following commands from a terminal in the project directory:
```
cd /LDmicro/
mkdir build
cd build/
cmake ..
```
### Building LDMicro for Linux
Simply run `make` in the build directory of the project to compile.
_Note_: In order to compile the Makefile must first be generated (see [Building the Makefile](#building-the-makefile)).
Multiple Perl Scripts are executed during the build phase. In order to execute these scripts, to install the perl packages from the terminal (see [External package dependencies](#external-package-dependencies)).
## External package dependencies
The install commands for all the packages required to compile LDMicro for Linux are given below:
_Note_: Be sure to run `sudo apt-get update` and `sudo apt-get upgrade` before running the following commands
* Cmake: `sudo apt-get install cmake`
* Qt5: should be > 5.9
```
sudo apt-get install qt5-default
sudo apt-get install qt511-meta-full <optional>
```
* MinGW:
```
sudo apt-get install gcc-mingw-w64
sudo apt-get install g++-mingw-w64
```
* Perl: `sudo apt-get install perl`
### Additional packages for Ubuntu 14
* g++: >5
```
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get install g++-5
sudo apt-get install gcc-5
```
* Qt: 5.11
```
sudo add-apt-repository ppa:beineri/opt-qt-5.11.1-xenial
```
## Running and testing LDMicro for Linux
### To run program in shell mode use the below command
`./LDmicro /c <.ld file to compile> <.hex destination file>`
### To run program in GUI mode use the below command
`sudo ./LDMicro`
|