MINIPRO(1)
okay bestie, this is MINIPRO(1) β General Commands Manual β and it's all about minipro, the free and open command-line program for controlling chip programmers by Xgecu. π
π NAME π
minipro β free and open command-line program for controlling chip programmers by Xgecu. β¨
π¦ DESCRIPTION π¦
okay so minipro is an Open Source tool that's intended to become a complete cross-platform replacement for the proprietary utility from Xgecu. It currently supports more than 13000 target devices β including AVRs, PICs as well as a huge number of other microcontrollers and various memory chips. π
rn, minipro currently supports the TL866A/CS, TL866II+, and T48. Support for the T56 is very experimental. π«
π GENERAL OPTIONS π
-l,--listβ List all supported devices. π-L,--search <search>β List devices like this. π-q,--programmer <version>β Force a programmer version when listing devices. Possible values (case insensitive):TL866ATL866IIT48T56. ποΈ-Q,--query_supportedβ Query supported programmers. π-k,--presence_checkβ Query the programmer version currently connected. π-d,--get_info <device>β Show device information. βΉοΈ-D,--read_idβ Just read the chip ID and do nothing else (like reading the whole chip contents). This is for use in scripts where you have for example several similar chips with different IDs and want to check if the currently inserted chip is one in your list of allowed ones. Also useful to detect if a chip is inserted at all when using the-yoption. π-r,--read <filename>β Read from the device and write the contents to this file. See NOTES ON MEMORY TYPES below. π-w,--write <filename>β Write to the device using this file. βοΈ-m,--verify <filename>β Verify memory in the device against this file. β-c,--page <type>β Specify memory type (optional). Possible values:code,data,config,user,calibration. The calibration byte(s) are Atmel AVR family specific and are read-only. User memory type is implemented as user row or encryption table on some devices like Atmel AT89S8253. Use-c userto read or write this page. See NOTES ON MEMORY TYPES below. π-f,--format <format>β Specify file format. Possible values:ihex,srec. See NOTES ON FILE FORMATS below. ποΈ-b,--blank_checkβ Blank check. Optionally, you can use-cto specify a memory type. β¬-a <type>,--auto_detectβ Auto-detect SPI 25xx devices. Possible values:8,16. π-z,--pin_checkβ Check for bad pin contact. π-e,--skip_eraseβ Do NOT erase device. π«-E,--eraseβ Just erase device. π§½-o <option>β Specify various options. For multiple options, use-omultiple times. For example:-o vpp=12 -o vcc=5.5or long options:--vpp=12 --vcc=5.5. Valid options are:-o vpp=<value>,--vpp <value>β Set the programming voltage. ForTL866A/CS:10,12.5,13.5,14,15.5,16,17,18,21. ForTL866II+:9,9.5,10,11,11.5,12,12.5,13,13.5,14,14.5,15.5,16,16.5,17,19. β‘-o vdd=<value>,--vdd <value>β Set the VDD write voltage (3.3,4,4.5,5,5.5,6.5). π-o vcc=<value>,--vcc <value>β For setting the VCC verify voltage (3.3,4,4.5,5,5.5,6.5). For setting the VCC logic test voltage (1.8,2.5,3.3,5). π-o pulse=<value>,--pulse <value>β Programming pulse delay (0β65535usec). β±οΈ-o speed=<value>,--speed <value>β Set T48 SPI clock frequency in MHz (3,7.5,15,30). π
-u,--unprotectβ Disable protection before programming. π-P,--protectβ Enable protection after programming. π-v,--skip_verifyβ Do NOT verify after write. π«-p,--device <device>β Specify device (use quotes to avoid mangling by the shell). π―-T,--logic_testβ Logic IC test. Erroneous states are reported with a"-"(minus) sign next to the expected pin state. π§ͺ-i,--icsp_vccβ Use ICSP. Not useful forTL866CS. π-I,--icsp_no_vccβ Use ICSP (without enabling Vcc). Not useful forTL866CS. π-s,--no_size_errorβ Do NOT error on file size mismatch (only a warning). β οΈ-S,--no_size_warningβ No warning message for file size mismatch (can't combine with-s). π€-x,--skip_idβ Do NOT attempt to read ID (only valid in read mode). π-y,--no_id_errorβ Do NOT error on ID mismatch π-V,--versionβ Show version information π·οΈ-t,--hardware_checkβ Start hardware check π οΈ-F,--update <filename>β Update firmware. See UPDATING FIRMWARE below. β¬οΈ--infoic <filename>β Set custominfoic.xmlfile. π--logicic_out <filename>β Write the results of a logic IC test to this file. π§ͺ--logicic <filename>β Set customlogicic.xmlfile. π--algorithms <filename>β Set customalgorithm.xmlfile. See ALGORITHMS below. π§-h,--helpβ Show brief help and quit. π
π NOTES FOR READING AND WRITING π
If -c is omitted and -r is specified then the code, data (if applicable) and config (if applicable) will be written to filename.$ext, filename.eeprom.bin and filename.fuses.conf correspondingly. If -c is omitted and -w is specified, then -c code is assumed. ποΈ
By default, when in write mode and -c config is specified, no erase is performed to preserve the already programmed data. However, you can force an erase in this case with the -E option. π₯
--fuses, --uid, --lock flags will read/write/verify/blank check fuses, user id or lock config section. User ID is Microchip PIC MPU family specific. For example: minipro -p atmega32 -b --fuses will check if fuse bits are in their default state (that is, blank). π
Use --pulse, --vpp, --vdd, --vcc or -o <option> to specify various programming options. These options are available only in write mode ( -w ) and only for some devices like UV erasable EPROMs and GAL/ATF PLDs. Also you can specify --vcc or -o vcc with -T to specify the logic test voltage. Use -d <device> to view if those options are supported. βοΈ
π NOTES ON FILE FORMATS π
If the -f or --format options are not used when reading, the resulting file will be saved as a raw binary file. ποΈ
If the ihex format is chosen and the data size is 64 kilobytes or smaller, the file will be saved in ihex8 format. Just plain hex records are used β no segment/linear address records are inserted. π
If the data size exceeds 64 kilobytes, then the ihex32 format is used. The ihex16 format is not used when reading chips. The same strategy is used for the Motorola srecord format. π
When writing chips, the format is automatically detected. It is therefore not necessary to use the -f or --format options. The exact Intel hex format (ihex8, ihex16, or ihex32) are also automatically detected. π€
π§ ALGORITHMS π§
All the Xgecu programmers contain an FPGA chip (Field Programmable Gate Array) which does most of the low-level work of reading and writing various chips. These FPGAs require bitstreams (algorithms) to be loaded before they're able to do any work. The TL866A/CS, TL866II+, and T48 keep their algorithms on a memory chip on the programmer's circuit boards and are updated whenever the programmer's firmware is updated. The T56 is different in that it requires its algorithms to be loaded from the controlling program. Those algorithms are installed by the official Xgecu software to the host computer. Because of the copyright on that package, the algorithms cannot be included in the minipro distribution. Fortunately a script for doing that is provided. π§
To allow minipro to get needed algorithms into a T58 programmer, dump-alg-minipro.bash is provided to download a copy of the official Xgecu software, extract the algorithms, and pack those data into "algorithm.xml". If the algorithms were not installed right after minipro was installed, this script can be used directly. It should have been installed when minipro was installed by whatever means. First invoke minipro with the -V or --version option and see what directory is listed for "Share dir". Suppose it's "/usr/local/share/minipro". Invoke the script like this:
dump-alg-minipro.bash /usr/local/share/minipro
The script will then do its thing and install "algorithm.xml" to its proper place. β¨
π₯ UPDATING FIRMWARE π₯
Firmware update files can be obtained from the manufacturer's website: http://www.xgecu.com/en/ π
They can also be downloaded and extracted from the following repository: https://github.com/Kreeblah/XGecu_Software π¦
For the TL866A/CS, use the "update.dat" file. π For the TL866IOI+, use the "updateII.dat" file. π For the T48, use the "UpdateT48.dat" file. π For the T56, use the "updateT56.dat" file. π
-F <filename>β Update firmware.miniprowill verify the firmware file and ask if you wish to proceed with writing the file to the programmer. β¬οΈ
πΎ NOTES ON MEMORY TYPES πΎ
If -c is omitted and -r is specified then the code, data (if applicable) and config (if applicable) will be written to filename.$ext, filename.eeprom.bin and filename.fuses.conf correspondingly. If -c is omitted and -w is specified, then -c code is assumed. ποΈ
π ADDING CUSTOM CHIPS π
Okay bestie, so you can add your own custom chips in the infoic.xml file, but here's the tea: because the content gets generated from the infoic.dll file, you gotta add your custom chips in the proper section of that XML file. No rogue entries just vibing wherever, okay? π«Ά
Add any new chip as an <ic> section inside a proper <custom name="MyCustom"> section of the file.
Also β and this one's important β the pinout is hardcoded in the device firmware. So if your chip has a custom pinout, you're gonna need to use a bit-banging technique, which lowkey limits the functionality to only reading it as a PROM type. That's the whole menu, sorry babe. π
In that case, the <protocol_id> value must be set to 0x80000001 and the <variant> value must be set to the pinout value defined in the prom_table array in the prom.c file.
For example, the D2364C PROM has a slightly different pinout than any DIP24 PROM, so the pins have been exchanged in the prom.c file. The index 0x0b has been assigned to this pinout. So the resulting XML entry is:
<custom name="NEC">
<ic name="D2364C@DIP24"
type="1"
protocol_id="0x80000001"
variant="0x0c"
read_buffer_size="0x10"
write_buffer_size="0x00"
code_memory_size="0x2000"
data_memory_size="0x00"
data_memory2_size="0x00"
page_size="0x0000"
pages_per_block="0x0000"
chip_id="0x00000000"
voltages="0x0900"
pulse_delay="0x0000"
flags="0x00000000"
chip_info="0x0000"
pin_map="0x0017"
blank_value = "0x00"
package_details="0x18000000"
config="NULL"
/>
</custom>
π PIPES π
minipro supports reading and writing to standard input and output. To do this, use a dash (-) as a filename for the -w or -r options. Slay, pipes! π₯
For example:
head -c 256k < /dev/urandom | srec_cat - -bin -o - -intel
-Address_Length=4 -obs=16 | minipro -p w49f002u -w-
This is how the hex/srec parsers were tested for reading from stdin. 256kb of random binary data is generated, then converted from binary to intel hex by the srec_cat utility. Finally the converted data is passed to our minipro, which will read this data, convert it to binary by decoding the intel hex format from stdin, and write it to the specified chip. Note the -r- which tells it to read from stdin instead of from a regular file.
This is just a test command to test the ihex/srec parsers. Don't use this in real life (convert from binary to ihex then from ihex to binary). Not me being a bad influence π
You can also read a chip and write the data to stdout like this:
minipro -p w49f002u -r- -f ihex
You can then pass the output to another command line tool with | for other processing, etc. Chain them like friendship bracelets, bestie. π
π FUSES π
Fuses can be read and written with the -c config option. Fuse data is exchanged in a text format. When writing fuses, all fuses on your device must be assigned a value β every single one, no skipping, no leaving anyone on read. π
To see what fuses are supported by your device, use -r with -c config to get your current fuse values. This also shows you what the text format looks like. Iconic behavior, honestly. β¨
π¦ EXAMPLES π¦
minipro -p 7404 -Tβ Check whether a 74(LS/HC/...)04 hex NOT gate chip works correctly. Vibe check the chip, basically. βminipro -p AT29C256@DIP28 -w foobar.binβ Write the contents offoobar.binto an AT29C256 256 kilobit (32-kilobytes) electrically-erasable Flash EPROM. Remember to put single or double quotes around the device name to prevent the shell from interpreting the@(at sign). Protect that at sign, it's the main character. π
π CAVEATS π
The TL866A and TL866CS programmers appear to have a firmware bug such that if not quite enough current is provided to them from a USB port, then the programmer will fail to initialize itself or reset itself after an operation. This problem seems to go hand-in-hand with newer USB 3.0 / xHCI ports and can be avoided by using a powered hub. So yeah β feed it properly or it's gonna ghost you mid-operation. ππ
π AUTHOR π
minipro was created by Valentin Dudouyt in 2014. Many others have contributed code and bug reports. Development is currently coordinated by David Griffith. Community built, community loved, fr fr. π«Ά
π§ HARDWARE π§
The TL866A/CS, TL866II+, T48, and T56 chip programmers are distributed by Xgecu, formerly Autoelectric. Its website is http://www.xgecu.com/en/ β go say hi. πΈ
π DISTRIBUTION π
The canonical repository for minipro is at GitLab:
https://gitlab.com/DavidGriffith/minipro/
It is distributed under the GNU General Public License version 3 or (at your option) any later version.
https://www.gnu.org/licenses/gpl-3.0.en.html
This software is offered as-is with no warranty or liability. If you find a bug or would like minipro to do something it doesn't currently do, please visit the above GitLab website and report your concerns. Bugs are just features waiting for their glow-up, and your reports make that happen. π
And that's the whole page, bestie!! π This edition of the manual is dated 2025-04-12 and it lives under the name MINIPRO(1) β go forth and flash responsibly, mwah πβ¨
π¦ where this page comes from
- alpine 3.24: minipro-doc 0.7.4-r2 Β· GPL-3.0-or-later
- fedora 43: minipro 0.7.4-1.fc43 Β· GPL-3.0-or-later
- fedora 44: minipro 0.7.4-2.fc44 Β· GPL-3.0-or-later
- nixos 26.05: minipro 0.7.4
- nixpkgs unstable: minipro 0.7.4
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms