since mbed is web based and online i tried it on a macbook
compiled fine but saving it to the pokitto results into temporarly bricking it
im suspecting the the filesystem is dumbing invisible data ( dot files, like spotlight and similar )
since mbed is web based and online i tried it on a macbook
compiled fine but saving it to the pokitto results into temporarly bricking it
im suspecting the the filesystem is dumbing invisible data ( dot files, like spotlight and similar )
looking at potential fix with terminal commands
current fix
rm /Volumes/CRP\ DISABLD/firmware.bin
cp /your/game.bin /Volumes/CRP\ DISABLD/
```
this?
yeaa but you cant ask users to install 30 day trail software
ill just spin this in a little app file where they drag and drop the bin on too
Thereās a couple of commands part way down.
Prevent MDS from attempting to Index
sudo touch /Volumes/your volume name here/.metadata_never_index
Disable Indexing AND Searching of Volumes
sudo mdutil -i off -d /Volumes/your volume name here
Delete existing Spotlight Index
sudo rm -rfv /.Spotlight-V100
Disable creating ā.ds_storeā on USB volumes
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true
Disable creating ā.ds_storeā on network volumes
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
Sorry if this makes your machine explode, implode, hack NORAD, āFriendsā you with Justin Bieber or any other unexpected results.
And further down:
Using the commands:
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true
sudo mdutil -i off -d /Volumes
no more .ds_store and no more ā.example.jpgā when I copy āexample.jpgā from mac to usb.
Even If I keep viewing hidden files with the command
defaults write com.apple.finder AppleShowAllFiles YES
no more .ds_store on Desktop, and no more on any folders.
so, thank you again I do NOT see .ds_store anymore, and best without using any external software.
this isnāt a good solution for peoples machines if they donāt know what there doing, especially with APFS thats going to need all that stuff to convert file systems on the os itself
Itās either that or running a bunch of cleanup scripts afterwards, either manually or if thereās possibly some way to automate them. Truth be told I donāt know what Macs use for scripting, Iāve only used one twice.
Ultimately this is more Apple/Macās fault than the Pokittoās fault, it affects all USB devices that identify as a file system. I donāt know if thereās a way to make the Pokitto refuse to create any of Macās typical side-effect files, but that would come at a price as does every feature.
Really unless thereās a free open-source solution available or something less invasive, this is never going to be a user-friendly issue to solve, but as I say, itās not the Pokittoās fault, itās a long-standing problem with OS Xās approach to managing files.
A brief search lead me to this ādonationwareā (i.e. free but theyād like a donation if possible) program called folderwasher that looks pretty decent.
same problems with other mbed devices. in fact, because pokitto is a ādumbā flash drive, it is one of the few that can be made to work. many others cant
what we really need is a browser plugin that registers .bin mime type and does the copying terminal-style
Dunno if that would work but itās probably worth a shot.
For the online IDE at least, a browser plugin seems like the way to go.
(Iād offer to have a go, but I think most browsers use Javascript and Iām not exactly Javascriptās biggest fan (quite the opposite). The most Iāve ever done is written an image slider (technically re-written, I took one someone else wrote and cleaned it up to make it more extensible and readable).)
ok im trying to write an application right now to open the existing file and rewriting the contents with the source file
i tried but volumes seem to be protected by the os so i can delete files by a program
the current fix i got is
cp game.bin /Volumes/CRP\ DISABLD/firmware.bin
in terminal
at least a mac user cant brick the device, but its a bit annoying to have to do it via the terminal
Canāt you store that as script file and then just double click it?
In Windows you could just write a .bat
file and then double click it to make it run, Iām sure Linux and OS X must have a similar feature.
Failing that you could make an executable in C.
Or if your computer has Lua installed and accessible from the terminal, use a Lua script (Iām sure there must be a way to set those up to be executable via double-click).
well yea a shell script but you have to chmod u+x
it first
also game.bin in the is just an example of your binary file
since you have to cd to it first or just drag the file on the terminal
tried to do it in c but accessing a Volumes needs root access :S
You arenāt admin/root?
Is it a shared computer?
Odd that accessing a USB would need higher priveledges.
On Windows dragging a file onto a .bat
is the same as executing the .bat
with the fileās full path as an argument, perhaps OS X has something similar?
best i got so far is this
name it pokitto.command
file and it its double clickable
#!/bin/sh
echo "drag .bin file and press enter"
read BIN
cp $BIN /Volumes/CRP\ DISABLD/firmware.bin
diskutil unmount /Volumes/CRP\ DISABLD
yes also unmounting the volume cuz mac os complains wen removing usb drives without doing that
Thanks for the batch, Iāll try this tonight. Until now I used the terminal to copy the bin manually
I do similiar thing for Windows just for fun. I know itās not needed.
name it pokitto.bat
@echo off
SET BIN=%1
IF NOT "%BIN%"=="" goto copy
:getbin
echo "drag .bin file and press enter"
SET /P BIN=
:copy
FOR /F "tokens=2 usebackq delims==" %%i IN (`wmic volume where "Label='CRP DISABLD'" get DriveLetter /format:list`) DO set DEST=%%i
cp -f %BIN% %DEST%/firmware.bin
mountvol %DEST% /p
You can directly drop bin file to bat or open bat and drop bin file to cmd screen and press enter.
Iām surprised to see WMIC in use.
I only know about WMI because I had to use it during a serial transmission experiment I did a while back, I havenāt seen it used much.
I donāt know much about batch scripting. I just found WMIC solution on internet