#MAC OSX / mbed online compiler
Macintosh likes to put extra files on USB drives. Since Pokitto is so small, it can not handle these hidden (files starting with a “.” dot) files. If you try to save directly from mbed online compiler to Pokitto, you will get a “disk full” error. That “disk full” is the Mac OSX trying to sneak its disgusting hidden files on the poor Pokitto (I’m joking, but actually its kind of true).
We have a couple of nifty workarounds to this problem. One way is to use the utility @adekto has kindly made for us. But, I discovered there is another way, that makes it even simpler, because you do not have to drag and drop anything. That method is explained here:
Saving directly from browser to Pokitto using Mac’s Automator utility
- Create a specific folder where you will be saving the binaries (e.g. Desktop/pokittodrop)
- Open “Automator” app (it’s a standard Mac utility)
- Create a “Folder Action”, select the folder you have created (see screenshot below)
- Drag n’ drop “Run Shell Script” action from middle column to the window on the right
- Write the script listed below into the “Run shell Script” window, remember to replace ./Desktop/pokittodrop/ with your own chosen folder location. /Volumes/CRP\ DISABLD/ may also be different depending on the language of your operating system. In any case it is the volume that pops up when you connect Pokitto to the Mac in flash drive mode.
- Save your Automator script (File->Save)
- Now, when you compile in mbed online, just “Save as” into your chosen folder. As soon as the file is downloaded in the folder, the Automator script will run and will copy the file over to Pokitto if the Pokitto is connected and is in flash programming mode. (Flash mode means “turn device on while USB connected and lower button at the back is pressed and kept down”)
This is the script:
cp ~/Desktop/pokittodrop/*.bin /Volumes/CRP\ DISABLD/firmware.bin rm ~/Desktop/pokittodrop/*.bin
And this is how the Automator should look like: