Here's what I came up with. Perhaps someone could try it.
1. It's up to you where the files are located.
You could use ~/jal/ or something else.
So, create whatever directory is necessary.
I have everything in ~/microchip/
2. Navigate to whatever base directory you're using:
$ cd ~/microchip
3. Download the JAL compiler.
Or clone it from github: ~/microchip$ git clone
https://github.com/jallib/jalv2compiler.git4. Navigate to the bin directory:
~/microchip$ cd jalv2compiler/bin
5. For safety, remove all execute permissions:
~/microchip/jalv2compiler/bin$ chmod -x *
6. Add execute permission to the just the 64-bit linux binary:
~/microchip/jalv2compiler/bin$ chmod +x jalv2-x86-64
7. Return to the main directory:
~/microchip/jalv2compiler/bin$ cd ../..
8. Download jallib.
Or clone it from github: ~/microchip$ git clone
https://github.com/jallib/jallib.git9. One example of compiling a JAL program from the project's directory:
~/microchip/projects/test$ ~/microchip/jalv2compiler/bin/jalv2-x86-64 test.jal -s ~/microchip/jallib/include/device/ -s ~/microchip/jallib/include/jal/ -no-codfile -no-lst -no-variable-reuse
10. If you want to use the PICKit2, download pk2cmd.
Or clone it from github: ~/microchip$ git clone
https://github.com/psmay/pk2cmd11. The full libusb package is necessary to use pk2cmd.
Check if it is installed:
$ apt list --installed libusb-dev
If not installed, install it:
$ sudo apt-get install libusb-dev
12. Build and install pk2cmd:
~/microchip/$ cd pk2cmd/pk2cmd
~/microchip/pk2cmd/pk2cmd$ make linux
~/microchip/pk2cmd/pk2cmd$ sudo make install
13. With the PICKit2 connected and attached to a PIC via ICSP...
Detect the PIC device:
$ pk2cmd -P
One example of writing a hex file:
$ pk2cmd -B/home/mike/microchip/pk2cmd/ -PPIC16F886 -f my_hex_file.hex -M -Y
Running pk2cmd with no arguments will list the help instructions
Regards,
Mike