DISCLAIMER: This is to share my experience how to run Arduino on Wine in Mac OS Mojave. By any means, this is unnecessary but may enlighten how to setup serial port device on a Mac with a program that only being ported on Windows (e.g. automotive dev tools).
To begin, you will need to instal Wine on your Mac (here I am using Mojave), Download - WineHQ Wiki
It would be good to also have homebrew installed https://brew.sh/
Get familiar with Wine:
- After installation, run Wine from your application folder
- Then run
winecfg
in the terminal that was opened by running Wine application, this will add a hidden folder in your user directory (/Users//.wine) and build a c:\ drive - To browse in Wine, type
wine explorer
in the terminal
Setup the USB port:
- Attach your Adruino board on your USB port, you could use
lsusb
(use homebrew to install) to see the list of available USB devices - In the terminal look for the USB device by
ls /dev/cu.*
(mine showscu.usbmodem143101
) - Now, you need to make a symbolic link between the /dev/cu. and COM1 port, by typing
ln -s /dev/cu.<usbDeviceName> ~/.wine/dosdevices/com1
- If sucessfully linked, you should see it by
ls -l ~/.wine/dosdevices/
Setup the COM port in Wine:
The last step should be editing the Wine registery to "enable" com1 port in the Wine/Windows environment by using gedit
(use homebrew to install), gedit ~/.wine/system.reg
. Next, add the following lines in the list:
[Hardware\Devicemap\Serialcomm] 1231984861
"Serial0"="COM1"
Run Adruino IDE program:
- Open the Adruino IDE by using
wine explorer
in the terminal - Try to open and upload a program (example programs), setup the device and port to COM1
- If all the above instructions you have followed, then you should see your program running on the board
Now, with the same method above, you could install and run any serial board on your Mac using Wine!