Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Toutou

macrumors 65816
Jan 6, 2015
1,082
1,575
Prague, Czech Republic
I tried this for you and it seems to do something. (it's a a command line app)

The process is pretty straightforward, just get the app from Github (download directly or via git if you're familiar), then enter the directory in terminal and run
Code:
make
, then
Code:
sudo make install
.

You'll need the libusb library (available from Homebrew) and the xcode command line tools (a prompt will come up automatically if you don't have them)

Just ask if you have any questions.
 

Attachments

  • Snímek obrazovky 2017-02-12 v 22.19.22.png
    Snímek obrazovky 2017-02-12 v 22.19.22.png
    116.1 KB · Views: 1,188

macstatic

macrumors 68020
Original poster
Oct 21, 2005
2,023
164
Norway
Thanks for looking into it.
Command line app! Ouch :(
Oh well, as long as I won't be burning EPROMs daily and know exactly what to type beforehand I guess it should do the job.

1) which files exactly do I need to get from the Minipro GitHub page? There's a long listing of files and folders to choose from.

2) I believe I found the Homebrew site -that's the correct one, right?
So I copied the command line as in structed on the top of that page, as follows:
Code:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
... and pasted it into my terminal window which proceeded by installing a bunch of stuff.
Correct so far?

3) I didn't quite understand the part about libusb, but (after a quick read through the Homebrew site) I made a guess and entered the following in the Terminal:
Code:
brew install libusb
... which resulted in the following:
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
No changes to formulae.

==> Using the sandbox
==> Downloading https://github.com/libusb/libusb/releases/download/v1.0.21/libusb-1.0.21.tar.bz2
==> Downloading from https://github-cloud.s3.amazonaws.c...02-9a9b-11e6-85f7-70b3577a8763.bz2?X-Amz-Algo
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/libusb/1.0.21
==> make install
/usr/local/Cellar/libusb/1.0.21: 29 files, 557.7K, built in 30 seconds
$
Looking good so far?

4) How do I install Xcode? I'm not sure if I missed a prompt or not when installing Homebrew or libusb.

5) So once I get Xcode installed I assume I've prepared my Mac for allowing the MiniPro software to be compiled to I can actually run it, right?
 

Toutou

macrumors 65816
Jan 6, 2015
1,082
1,575
Prague, Czech Republic
Looking good so far?
You did everything right, the first command installed Homebrew onto your computer and the second one told Homebrew to get you the libusb library.
And guess what? Homebrew got the libusb from github and, right here:
Code:
==> ./configure --prefix=/usr/local/Cellar/libusb/1.0.21
==> make install
COMPILED it.


Soo, now you will need your app. Above the long list of files, on the left side, there is a green button that says Clone or download. Click it, then Download ZIP.
Unpack the archive, a new folder "minipro-master" will appear.

Now the fun part - launch the terminal and enter the "minipro-master" folder, like this:
Code:
cd path/to/the/minipro-master
If you're not sure about the exact path, just type "cd " (with the space!) and drag the folder from Finder to the Terminal window. On my machine that would be
Code:
cd /Users/toutou/Downloads/minipro-master

Now you're in the correct folder to begin the horrible and mystical ritual of — [violent thunder, a lightning strikes] — COMPILING!!!!
Code:
make
And that's it. That's how you compile 98% of things. (There's usually a file called "Makefile" that contains all the commands necessary, and the "make" command interacts with this file).

The app is now a binary ready to be launched, but it still needs a couple of its files and directories prepared here and there, a process best known as "installation":
Code:
sudo make install

essentially you're telling the "make" utility to run the "install" sequence from the Makefile. And with "sudo" you're running this as a root user (the god almighty). You'll be prompted for your password. Enter it (nothing will appear, no asterisks or anything).

Boom. Your app is ready to be launched as "minipro".
 

macstatic

macrumors 68020
Original poster
Oct 21, 2005
2,023
164
Norway
Cool! Your explanation is very clear, but I must have done something wrong with the libusb installation as the following error message comes up when trying to "make" (after having unzipped the downloaded file from Github):

Code:
$ make
cc -g -O0 `pkg-config --cflags libusb-1.0`   -c -o byte_utils.o byte_utils.c
/bin/sh: pkg-config: command not found
cc -g -O0 `pkg-config --cflags libusb-1.0`   -c -o database.o database.c
/bin/sh: pkg-config: command not found
cc -g -O0 `pkg-config --cflags libusb-1.0`   -c -o minipro.o minipro.c
/bin/sh: pkg-config: command not found
minipro.c:1:10: fatal error: 'libusb.h' file not found
#include <libusb.h>
         ^
1 error generated.
make: *** [minipro.o] Error 1
$

What do I need to do now?
I might add that my Mac is set up for multiple users. I always log in as a "standard" user, but if I install something I have to enter the "admin" username and password. And this is where things get confusing, because when I'm asked to "sudo" I never get it to work unless I first do a "login admin_username" (where "admin_username" of course is the admin's username, followed by its password), but then again I don't get access to the files/folders that belongs to my standard user... Maybe that's partly where the above problems lie.

Also, will this app end up in the usual /Applications/ folder, another "common access" folder (such as /System/ or /Library/) or somewhere within my own user folder so I have to use the "sudo" command every time I need to use this particular command line app?
 
Last edited:

Toutou

macrumors 65816
Jan 6, 2015
1,082
1,575
Prague, Czech Republic
The multiuser setup shouldn't be a problem. Your homebrew installation looks fine.
The first error in the output is at
Code:
/bin/sh: pkg-config: command not found
So let's make sure you have that tool:
Code:
brew install pkg-config
(I didn't get this error because I have it.)

After this both the pkg-config tool and the libusb library should be ready and
Code:
brew list
should list both.

If everything looks good, try again.
 

macstatic

macrumors 68020
Original poster
Oct 21, 2005
2,023
164
Norway
One step further....
Your suggestion worked, so now I have "pkg-config" installed.
"Brew list" shows two items: libusb and pkg-config

but..... this multi-user/sudo thing is confusing me.
For instance, this is what happened when I tried to do the above (logged in on my Mac as my normal user):

$ brew install pkg-config
Error: /usr/local/Cellar is not writable. You should change the
ownership and permissions of /usr/local/Cellar back to your
user account:
sudo chown -R $(whoami) /usr/local/Cellar
Warning: pkg-config-0.29.1_2 already installed
Error: Permission denied - /usr/local/Cellar/pkg-config/0.29.1_2/INSTALL_RECEIPT.json20170218-21849-1414tf4
$ whoami
MY_USERNAME
$ sudo chown -R $MY_USERNAME /usr/local/Cellar

WARNING: Improper use of the sudo command could lead to data loss
or the deletion of important system files. Please double-check your
typing when using sudo. Type "man sudo" for more information.

To proceed, enter your password, or type Ctrl-C to abort.

Password:
MY_USERNAME is not in the sudoers file. This incident will be reported.
$

In the above example I enter my normal user's password, which obviously doesn't work.
so next I try to use my admin username instead (still logged in on my Mac as a normal user):

$ sudo chown -R $MY_ADMIN_USERNAME /usr/local/Cellar

WARNING: Improper use of the sudo command could lead to data loss
or the deletion of important system files. Please double-check your
typing when using sudo. Type "man sudo" for more information.

To proceed, enter your password, or type Ctrl-C to abort.

Password:
Sorry, try again.
Password:
Sorry, try again.
Password:
Sorry, try again.
sudo: 3 incorrect password attempts
$

So since none of that worked I logged in as the admin within the Terminal (still logged into the Mac as a normal user though):

$ login MY_ADMIN_USERNAME
Password:

This time it worked!
Now it's time to install the MiniPro software.
I don't quite understand how I got "make" to work earlier, but perhaps I could do that even without being an admin. However, doing a sudo make install appears to ask for the admin username which (as shown earlier) never works regardless which password I give it.
The whole thing appears to be a chicken & egg situation.
If login as the admin, then try to cd to the "minipro-master" directory I'm denied that:

$ cd /FILEPATH/minipro-master
-bash: cd: /FILEPATH/minipro-master: Permission denied
$

So next I go to the Terminal, logout (so I'm back to the regular user), cd to the above directory and try to install, which also doesn't work (probably because I'm not an admin):

$ logout
$ whoami
MY_USERNAME
$ cd /FILEPATH/minipro-master
$ pwd
/FILEPATH/minipro-master

$ make install
mkdir -p /usr/local/bin/
mkdir -p /usr/local/lib/udev/rules.d/
mkdir: /usr/local/lib/udev/rules.d/: Permission denied
make: *** [install] Error 1
$


So is the solution to put the installation files on a USB memory stick, logout as my normal user on the Mac, log into the admin user area, then install everything from there? Cumbersome, so I hope there's some easier way.
 

Toutou

macrumors 65816
Jan 6, 2015
1,082
1,575
Prague, Czech Republic
$ whoami
MY_USERNAME
$ sudo chown -R $MY_USERNAME /usr/local/Cellar

Correct idea, incorrect usage. (But that's okay, this can be a little confusing)
Look at this example: (the echo command just prints output)
Snímek obrazovky 2017-02-18 v 16.18.46.png

"whoami" is a command that prints (returns as an output) your current username, as in "who am I?"

"echo $whoami" literally means "print the value of a variable called whoami" — nothing happens, I didn't create the variable.

"echo $toutou", again, just prints the empty variable toutou

"$(command)" means "run this command and just put the output here", so "echo $(whoami)" means literally "print whatever output the "whoami" command will produce".

The last one is an example of how variables work. First I'm telling it to, literally, "take whatever output the "whoami" command will produce and store that as variable called X", and then the second command is "print the value of a variable X".

Your command "sudo chown -R $MY_USERNAME /usr/local/Cellar" would, as you now know, change ownership of the directory (+ everything inside) /usr/local/Cellar to a user whose name is stored in a variable called MY_USERNAME.

The correct form:
Code:
sudo chown -R $(whoami) /usr/local/Cellar
will literally tell it to "change ownership of the directory (+ everything inside) /usr/local/Cellar to a user whose name gets printed by running the "whoami" command.
Which is exactly what you wanted to do.

But I believe this isn't necessary, the directory should already be owned by your admin user.

Now, this:
Code:
-bash: cd: /FILEPATH/minipro-master: Permission denied
does make sense. The minipro-master folder belongs to your normal user, right? Not to your admin user. The admin in OSX is not an actual root account ("root" in the Unix lingo), it's just a user that is able to request root privileges via "sudo".

Login into your admin account. Try to cd into the folder, it won't let you. But we won't be needing the folder anymore, so let's just ruin it.
Code:
sudo chmod a+rwx /path/to/minipro-master
literally "give (+) everyone (a) permission to read/write/execute (rwx) in the folder.

This will prompt you for a password, and because you're logged in as your admin, enter your admin user password. This should work 100% if you can log in with the same password.

And then give the "sudo make install" a go. That one won't work without "sudo" at all.
 

chown33

Moderator
Staff member
Aug 9, 2009
10,990
8,874
A sea of green
One step further....
Your suggestion worked, so now I have "pkg-config" installed.
"Brew list" shows two items: libusb and pkg-config

but..... this multi-user/sudo thing is confusing me.
For instance, this is what happened when I tried to do the above (logged in on my Mac as my normal user):
...
You can't use 'sudo' from your normal user account. You must be an admin user to use 'sudo'.

When you're logged in as your admin user, you can add your normal user account name to the file /etc/sudoers. You should read about how to do this correctly, lest you bork the sudoers file. Google: add user to sudoers.


A completely different approach would be to change the permissions of /usr/local/Cellar so your normal user account has write permission. Post the complete output of the following command line:
Code:
ls -ld /usr/local/Cellar ; id

In general, the approach would be to give /usr/local/Cellar a group that your user is a member of, or to add your user to the group already assigned to /usr/local/Cellar. A suitable choice will be apparant after seeing the output from the given command line.

Also, changing the group of /usr/local/Cellar requires ownership or being root, and joining a group requires being root. This means you'll be using your admin account to make the changes, not your normal account.
 

macstatic

macrumors 68020
Original poster
Oct 21, 2005
2,023
164
Norway
$ whoami
MY_USERNAME
$ sudo chown -R $MY_USERNAME /usr/local/Cellar

Correct idea, incorrect usage. (But that's okay, this can be a little confusing)
Look at this example: (the echo command just prints output)

Yes, your explanation makes sense, but it's often difficult to understand the different syntaxes in command line examples, like here where I should use the brackets literally.



The correct form:
Code:
sudo chown -R $(whoami) /usr/local/Cellar
will literally tell it to "change ownership of the directory (+ everything inside) /usr/local/Cellar to a user whose name gets printed by running the "whoami" command.
Which is exactly what you wanted to do.

But I believe this isn't necessary, the directory should already be owned by your admin user.

Yes, I took a look and you're right.


Now, this:
Code:
-bash: cd: /FILEPATH/minipro-master: Permission denied
does make sense. The minipro-master folder belongs to your normal user, right? Not to your admin user. The admin in OSX is not an actual root account ("root" in the Unix lingo), it's just a user that is able to request root privileges via "sudo".

I guess this makes sense when I take a look at the "Users & groups" system preference where I can tell if a certain user should be an admin or standard user. I just never looked at it that way.
So "root" on the other hand is an actual user account, which by default has those same priveleges as any user who has been defined as an "admin"?


Login into your admin account. Try to cd into the folder, it won't let you. But we won't be needing the folder anymore, so let's just ruin it.

Code:
sudo chmod a+rwx /path/to/minipro-master
literally "give (+) everyone (a) permission to read/write/execute (rwx) in the folder.

This will prompt you for a password, and because you're logged in as your admin, enter your admin user password. This should work 100% if you can log in with the same password.

And then give the "sudo make install" a go. That one won't work without "sudo" at all.

(after spending lots of time trying all this and more without it working...) I decided to give the "make" command a go (even though I had done that before), so I did, then continued with "sudo make install" (still logged in as the admin user via the Terminal) and presto! it works :)
I'm not sure what went wrong where, but at least I got it installed (I entered "minipro" in the Terminal and it responded with a list of options.

So, do I still need to have Homebrew installed in order to have it working, or was that just for compiling it? If it takes up a lot of room and I don't need it I might just as well uninstall it (I noticed there were instructions for that on the Homebrew website).
 

repetto74

macrumors newbie
Oct 22, 2017
2
0
Hi,

I am trying to install this open source program to control the TL866 programmer under Mac OSX. I have successfully given the Sudo Make Install command but then I do not know what I am supposed to get back?
Where is the compiled program? In the Minipro-master folder I do have a couple of Unix exec being created but they just give a list of commands when double-clicking on them.
I am supposed to have a DMG package to install or what? Sorry I am not an expert of Unix command Line installations :(




Yes, your explanation makes sense, but it's often difficult to understand the different syntaxes in command line examples, like here where I should use the brackets literally.





Yes, I took a look and you're right.




I guess this makes sense when I take a look at the "Users & groups" system preference where I can tell if a certain user should be an admin or standard user. I just never looked at it that way.
So "root" on the other hand is an actual user account, which by default has those same priveleges as any user who has been defined as an "admin"?




(after spending lots of time trying all this and more without it working...) I decided to give the "make" command a go (even though I had done that before), so I did, then continued with "sudo make install" (still logged in as the admin user via the Terminal) and presto! it works :)
I'm not sure what went wrong where, but at least I got it installed (I entered "minipro" in the Terminal and it responded with a list of options.

So, do I still need to have Homebrew installed in order to have it working, or was that just for compiling it? If it takes up a lot of room and I don't need it I might just as well uninstall it (I noticed there were instructions for that on the Homebrew website).
 

macstatic

macrumors 68020
Original poster
Oct 21, 2005
2,023
164
Norway
It's been a while since I did the above and don't remember the details, but I concluded that having a command-line based EPROM programmer wasn't my thing as there are too many details to keep track of, so I ended up creating a Bootcamp partition with Windows on it, then installing the actual software that came with it. For me, this works a whole lot better even though I wish there was a Mac version of the software.
 

Toutou

macrumors 65816
Jan 6, 2015
1,082
1,575
Prague, Czech Republic
I have successfully given the Sudo Make Install command but then I do not know what I am supposed to get back?
Where is the compiled program? In the Minipro-master folder I do have a couple of Unix exec being created but they just give a list of commands when double-clicking on them.


After the make install command the utility should be already installed on your system and should be available as "minipro" in the terminal. Again, this is a command line app, you're not supposed to see any user interface.
 

repetto74

macrumors newbie
Oct 22, 2017
2
0
After the make install command the utility should be already installed on your system and should be available as "minipro" in the terminal. Again, this is a command line app, you're not supposed to see any user interface.

Hi Toutou,

OK thanks for the clarification. Well this is looking a little bit too complicated then to run for me. Better to switch on Windows when IC programming is required then :).

Thanks
Rick
 

macstatic

macrumors 68020
Original poster
Oct 21, 2005
2,023
164
Norway
I think that might be the simpler solution. So far I haven't run into any problems using the Windows software along with the said EPROM programmer on my Mac with Bootcamp.
 

macstatic

macrumors 68020
Original poster
Oct 21, 2005
2,023
164
Norway
That's awesome!
Will it also work with the "CS" (MiniPro TL-866CS)?

Would you mind making a pre-compiled, ready to use app to download? Many people (such as myself) struggle to do that sort of thing ourselves.
 

nivlekius

macrumors newbie
Sep 21, 2021
8
0
That's awesome!
Will it also work with the "CS" (MiniPro TL-866CS)?

Would you mind making a pre-compiled, ready to use app to download? Many people (such as myself) struggle to do that sort of thing ourselves.
It uses the minipro command line tools app by David Griffith. It doesn’t say that it works with that programmer but you can alway try. And it is already compiled. I wrote it with swift. Just download it and unzip and it should be ready to go
 

macstatic

macrumors 68020
Original poster
Oct 21, 2005
2,023
164
Norway
Ah, I see! It's been a while since I installed these things and I forget the details, but I think I figured it at least the first part after re-reading through your docs a few times...

1) Open the OSX Terminal app, enter the following command to install "Brew" (as explained on that website's first page):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

2) Now install the MiniPro software, with the folowing command:
brew install minipro

3) then, the installation of avr-gcc (as explained here):
xcode-select --install
followed by:
brew tap osx-cross/avr
and finally (this part seemed to take forever):
brew install avr-gcc

4) so now I checked to see if the above GCC stuff was installed and the paths, as explained in the GUI docs, but in my case the results were slightly different:
which minipro
which showed the path here being: /usr/local/bin/minipro
then check the avr-gcc path:
which avr-gcc
which, on my computer said it was here: /usr/local/bin/avr-gcc
and then check the avr-objcopy path:
which avr-objcopy
which I'm told is here: /usr/local/bin/avr-objcopy

now's where I get confused....
First I'm not sure if I'm getting the download right. On your Minipro-GUI Github page I clicked on the green "Code" button, then on "Download zip", like this:
Screen Shot 2021-09-22 at 09.56.37.png

After unzipping it on my Mac I was left with a folder containing two files:
Screen Shot 2021-09-22 at 10.56.54.png


Seeing that "LICENSE" appeared to be a command-line type file I double-clicked it, which appears to be somewhat in the right direction, although I received some error messages in the Terminal:

$ /Volumes/Users/USERNAME/Downloads/MiniPro\ GUI\ for\ Mac/MiniPro-GUI-main/LICENSE ; exit; /Volumes/Users/USERNAME/Downloads/MiniPro GUI for Mac/MiniPro-GUI-main/LICENSE: line 1: MIT: command not found /Volumes/Users/USERNAME/Downloads/MiniPro GUI for Mac/MiniPro-GUI-main/LICENSE: line 3: syntax error near unexpected token `c' /Volumes/Users/USERNAME/Downloads/MiniPro GUI for Mac/MiniPro-GUI-main/LICENSE: line 3: `Copyright (c) 2021 DLXXV-Kelvin' logout Saving session... ...copying shared history... ...saving history...truncating history files... ...completed. [Process completed]


So where did I go wrong? Did I misunderstand something perhaps?
PS: great news: it does work with my "CS" version of the programmer. The MiniPro Gitlab page says:

Features​

  • Native support for Linux, BSD, and other flavors of Unix.
  • Compatibility with Minipro TL866CS, TL866A, and TL866II+ from Autoelectric (http://www.autoelectric.cn/en/tl866_main.html)
  • More than 13000 target devices (including AVRs, PICs, various BIOSes and EEPROMs)
  • ZIF40 socket and ISP support
  • Vendor-specific MCU configuration bits
  • Chip ID verification
  • Overcurrent protection
  • System testing
 

nivlekius

macrumors newbie
Sep 21, 2021
8
0
I’ll be honest with you I’ve never used Git before. Let me see if I can figure out the problem. I might need to use a different download site
 

nivlekius

macrumors newbie
Sep 21, 2021
8
0
The file is in there now. I forgot to commit when i uploaded it last night. Good job on me testing the download. Sorry about that
 

macstatic

macrumors 68020
Original poster
Oct 21, 2005
2,023
164
Norway
No problem :)
But now I have another problem:

Screen Shot 2021-09-22 at 19.37.46.png
Screen Shot 2021-09-22 at 19.32.33.png

Is there a specific reason you made it not work with anything but the latest OS, or is this just a matter of "allowing" the app to run on earlier OS versions? I'm still on High Sierra 10.13 because of some old software I'm still using (ands I don't think MacOS 11.x can run on my computer anyway), so it would be great if the GUI could be made to work on my older OS.

Also, there's now a ZIP file inside the first ZIP file. Maybe you could just put it all in a single ZIP file?
Screen Shot 2021-09-22 at 19.36.26.png
 

nivlekius

macrumors newbie
Sep 21, 2021
8
0
No problem :)
But now I have another problem:

View attachment 1840396
View attachment 1840393
Is there a specific reason you made it not work with anything but the latest OS, or is this just a matter of "allowing" the app to run on earlier OS versions? I'm still on High Sierra 10.13 because of some old software I'm still using (ands I don't think MacOS 11.x can run on my computer anyway), so it would be great if the GUI could be made to work on my older OS.

Also, there's now a ZIP file inside the first ZIP file. Maybe you could just put it all in a single ZIP file?
View attachment 1840395
It’s because git automatically puts things into a zip file. As for the app, it should have been for 9.5 and up but must have not set the compile correctly. Let me recompile it
 

nivlekius

macrumors newbie
Sep 21, 2021
8
0
No problem :)
But now I have another problem:

View attachment 1840396
View attachment 1840393
Is there a specific reason you made it not work with anything but the latest OS, or is this just a matter of "allowing" the app to run on earlier OS versions? I'm still on High Sierra 10.13 because of some old software I'm still using (ands I don't think MacOS 11.x can run on my computer anyway), so it would be great if the GUI could be made to work on my older OS.

Also, there's now a ZIP file inside the first ZIP file. Maybe you could just put it all in a single ZIP file?
View attachment 1840395
OK, I recompiled. I forgot to set the Target. It's now set to 10.10 (as low as I can go with it) that is Yosemite. Thanks for doing all the testing. I don't have any older Mac atm. Hopefully you aren't too frustrated. You can just re-download it and it should be good to go.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.