[Start]2.Putting a program on Pokitto, step-by-step


#1

Attention: there is a NEW EASY PROGRAMMER that helps you with connecting to Windows and Mac OSX

The instructions on this page will be updated soon. Meanwhile check the link below for the easiest way to connect Pokitto to Windows and Mac

Windows

Here is a video guide for Windows. The USB cable connection and buttons apply for all OS’s:

Mac OSX

Copying a .bin directly to Pokitto in MacOSX Finder will not work because Finder puts invisible files in the directory that corrupt the Pokitto.

You can:

1. Use a small helper application (requires computer admin rights)

@adekto has contributed a fantastic helper application for Macintosh

2. OR: copy binary using ‘cp’ command in terminal

  • open terminal
  • go to the directory where you downloaded the binary
  • connect the Pokitto (connect USB cable, press and hold lower button at the back & turn on - CRP DISABLD volume appears)
  • empty the Pokitto memory using the following:

rm /Volumes/CRP\ DISABLD/*.*

  • copy your new binary (for example HelloWorld.bin) using the cp copy command

cp HelloWorld.bin /Volumes/CRP\ DISABLD/

  • reset Pokitto and your new program is running!

Linux

See discussion below


[Solved]Pokitto does not appear as a flash drive
[Solved]Can't get back to loader
#2

#mac users
the mac is wonderful but it has some odd behaviour and therefore
the steps are going to be a bit complicated.

  • start the terminal application and change directory to the desktop cd Desktop/
  • run nano and set the file name nano pokitto.command
  • paste in this code:
#!/bin/sh
echo "drag .bin file and press enter"
read BIN
cp $BIN /Volumes/CRP\ DISABLD/firmware.bin
diskutil unmount /Volumes/CRP\ DISABLD
  • press control x to save then y and then enter
  • run this command to set the permissions of the file chmod +x pokitto.command

now you can plug in your device and press and hold reset and then tap flash on the back of the pokitto and CRP DISABLD will pop up on the desktop.
now if you have a pokitto program from mbed your ready to go


double click the pokitto.command file
and drag and drop the pokitto bin on the window and press enter

the drive should eject on its own and you can unplug the pokitto from the mac safely

here is also a video version of this tutorial to show you how to do it:


[Start]1.Assembling and connecting Pokitto to PC
Pokitto Mac Loader App v1.0
#3

Your linux version doesn’t work for me.

Given that proper operation depends on which order blocks are writetn in, the file system might matter. Which file system is your Pokitto being mounted as?


#5

Sorry, I read the Unix script as a Linux version. I can see and delete firmware.bin, and copy files to it on Ubuntu.


#6

#raspberry pi
thats right you can program the pokitto with the raspberry pi, heres how.

  • change directory to the desktop cd Desktop
  • run nano and set the file name nano pokitto.sh
  • paste this code:
#!/bin/sh
echo "copy .bin location and press enter"
read BIN
dd bs=1024 conv=nocreat,notrunc if=$BIN of =/media/pi/CRP\ DISABLD/firmware.bin
umount /media/pi/CRP\ DISABLD
  • press ctrl xto save then yand then enter
  • run this command to set the permissions of the file chmod +x pokitto.sh

now you can plug in your device and press and hold reset and then tap flash on the back of the pokitto
you can now download your .bin from mbed web IDE and double click the pokitto.sh
a popup might show up and you can press Execute in Terminal
now you can copy the file location in the terminal and hit enter, this might take some time
wen this is done its safe to remove the pokitto for the pi


#7

This should also work on desktop Linux systems. There are a couple of things that different distros do differently (which includes the RPi, as there are multiple distributions for it as well) to worry about:

“/bin/sh” isn’t standardize, and different distributions use different shells. I think the script is pure posix, so should work in all of them, but maybe not.

More importantly, automount behavior varies a lot between distros. Not only different locations, but whether or not it happens at all. If it’s a different location, you hopefully know where. If it’s not at all, I recommend adding something like:

/dev/disk/by-label/CRP\x20DISABLD /media/mwm/POKITTO vfat noauto,user,uid=1000,gid=1000 0 0

Arrgh. One line, of course. Change the mount directory (/media/mwm/POKITTO) to your preference, and the uid and gid to yours. You’ll need to create the mount directory owned by you, and possibly enable user mounts. But you can then just do mount /media/mwm/POKITTO to mount it, and similar to unmount.


Urgent: Linux Pokitto mount points, please report
#8

How to make these .bin files from my project?

EDIT: Whoops. There´s a .exe in the “build” folder that do it isn´t it?


#9

For usability and not freaking out newbie users who would stumble upon “programming mode” by accident, I would change the screen from white, to something more friendly.

Maybe little pokitto guy with a text above saying: Upload new firmware.bin or restart your pokitto to go back.


#10

Unfortunately I have no control over that. In USB flash mode, the code is coming from the internal ROM as provided by NXP


#11

Thank you @adekto, the mac instructions & command tool work very well