OBootLin is a software that allows to download into the OSIMPLC’s Flash memory, the *.hex file containing the machine code compiled from Ladder scheme (*.ld file) by LDmicro, or generated by another programming software and its compiler.
OBootLin runs on GNU/Linux Operative Systems, and is GPLv2 licensed.
OBootLin is a slightly modified version of TinyBootloaderLin, and it uses firmware adapted for OSIMPLC preinstalled microcontrollers: PIC16F887 (standard) and PIC18F4520 (alternative), with 20 MHz external crystal oscilator.
These firmwares are totally compatible with other free and privative softwares which can perform the same task, all of them derived from the original Tiny Pic Bootloader TPBL: TinyBootloaderLin (original and fork), under GNU/Linux O.S.; TPBLwin and MultiBootloader+, under Windows O.S.
From OSIMPLC Downloads page, download OBootLin.zip file.
python python-pyserial python-wxpython
python3 python3-serial python3-wxgtk4.0
python3 python3-pyserial python3-wxpython4
No special process is required to install OBootLin.
Simply, decompressing the obootlin.zip archive onto a new subdirectory inside /home/$USER directory (preferably aside LDmicro subdirectory).
Connect the OSIMPLC Programming Cable, or a generic USB-TTL adapter, to USB port in PC and to TTL connector (pinout) in OSIMPLC.
In GNU/Linux, the programming cable or the adapter will appear as /dev/ttyUSB[0-9] device.
Check port assignement:
[$USER@$hostname ~]$ ls -l /dev | grep ttyUSB
crw-rw---- 1 root uucp 188, 0 mar 2 13:13 ttyUSB0
Note: if another USB-serial adapter is previously connected, the programming cable or new adapter will be renumbered to /dev/ttyUSB1, and so on.
IMPORTANT:
User must be added to the group that allows USB serial access (root permissions required):
Arch Linux and others (Fedora, openSUSE): uucp
group.
Debian, Ubuntu and derivatives: dialout
and plugdev
groups.
In a virtual terminal, change to Obootlin directory:
[$USER@$hostname ~]$ cd /home/$USER/../ObootLin/
Execute OBootLin by means python3:
[$USER@$hostname ObootLin]$ python3 tinybldlin.py
As alternative, generaten OBootLin.desktop launcher that allows automatic execution of OBootLin, without de need to do it from virtual terminal.
Copies of OBootLin.desktop file can be installed in different user’s subdirectories: (Desktop) and/or others.
Use a text editor to copy and modify the following launcher example: OBootLin.desktop
[Desktop Entry]
Name=OBootLin
Exec=/home/$USER/path/to/OBootLin/obootlin.py
Type=Application
StartupNotify=true
Path=/home/$USER/path/to/OBootLin/
Icon=/home/$USER/path/to/OBootLin/modules/images/obootlin.png
In configuration Section (left down) in OBootLin:
In OBootLin command section (left above) press the CheckPIC button, while progress bar is running (timeout), press and release the RESET button in OSIMPLC.
If operation is succefully, Messages Tab will show:
Connected to /dev/ttyUSB0 at 19200
Searching for PIC ...
Found:16F 886/887 [18F 452o]
Select *.hex file to transfer (compiled by LDmicro or another programming software) using the Browse button (right above). A SelectHexFile dialog will open, allowing directories tree navigation, and selection of the desired file containing the corresponding user program.
In OBootLin command section (left above), press the Write Flash button, while progress bar is running (timeout), press and release the RESET button in OSIMPLC.
If operation is succefully, Messages Tab will show:
Connected to /dev/ttyUSB0 at 19200
HEX:xx days old,INX32M,16Fcode+cfg,total=xxxx bytes.
Searching for PIC ...
Found:16F 886/887
Write OK at hh:mm time: x.xxx sec
NOTE: To communicate OSIMPLC with PC, programming cable, USB-TTL or USB-RS485 adapters can be used.**
In Terminal tab: Select data baudrate in using dropdown list.
NOTE: user program data baudrate through UART can be different from OSIMPLC programming and check baudrate, it must be defined in LDmicro MCU parameters menu (or in menus/settings in other softwares).
Opening communication: Press Open button.
Receiving data:
If OSIMPLC is sending data though ist serial ports (TTL or RS-485), they will be displayed in text field.
Using Rx dropdown list, user can see data as Char (character) or Hex codes.
Being open the comm port, user can select and copy chunks of the text field contents.
Sending data:
Using Tx dropdown list, user can send data as Char (character).
User can type chars in Tx text field, or copy/paste from a file and paste on it.
After that, Send button or Enter in keyboard must be pressed to execute transmission.
Other types of data can be sent (char\ , Type, TypEcho).
Closing communication: Press Close button.
https://github.com/osimplc/obootlin
This forked code is a stripped and slightly modified version from Tiny Pic Bootloader for GNU/Linux, Luis Claudio Gamboa fork.
It has a modified pictype.py module, with only PIC16F887 and 18F4520 microcontrollers identifiers.
Also, it has only the firmware for PIC16F887 and 18F4520 microcontrollers, running at 20 MHz on external crystal oscillator.
https://github.com/lcgamboa/tinybldlin
This forked code is a modified version to handle different bootloader sizes defined by user in file “modules/pictype.py”.
Latest commit: d7cf21b, 2018-12-16.
Conversion to python3.
http://tinybldlin.sourceforge.net/
The original Tiny Pic Bootloader for GNU/Linux was writed by Fernando Juarez V.
Tiny Pic Bootloader for GNU/Linux is licensed under GPL v2.
TinybldLin has been writted in python using python-serial module and wxphython; it can be run on any linux distro (and maybe mac) who has installed those dependencies.
“This port pretend to be more than a clone of the original tinybldWin.exe; it pretends, in the future, add new futures and enhaces the original ones.”
Latest version: tinybldlin-0.8.1-src.tar.gz, 2012-11-15.
http://www.etc.ugal.ro/cchiculita/software/picbootloader.htm
Tiny Pic Bootloader for Windows (tinybld) was writed by Claudiu Chiculita, whom developed the firmware and the first versions (under Delphi) for Windows OS.
tinybld firmwares are the smallest bootloaders available for PICs, they occupy 100 words max. (200 bytes) for devices from 16F, 18F, dsPIC30 families that have self-programming support.
Tiny Pic Bootloader for Windows is free (as No Cost) software, but it has not a Free (as Libre) Software license, nor its source code is available.
Latest version: TinyBld-1_10_6_pc_beta.zip, 2011-06-18.