Bliss OS (Pinebook) 20170919 [Oct 13] | Bliss OS (PINE A64(+)) 20170919 [Oct 13] | Linux Images (ROCK64) 0.5.10-118 [Oct 2] | Android Images (ROCK64) 0.3.4-86 [Oct 2] | Android 6.0.1 (PINE A64-LTS / SOPINE) 20170726 [Sep 29] | Android 7.1 (Pinebook) 0.3.10-66 [Sep 19] | Android 7.1 (PINE A64(+)) 0.3.10-66 [Sep 19] | Android 7.1 (SOPINE) 0.3.10-66 [Sep 19] | PINE64 Installer v2.0.0-beta.3 [Sep 12]

Getting Started | Visit the WIKI | IRC Logs | Forum Rules/Policy


Programming PADI with Arduino IDE
#1
This thread aims to be a complete guide to programming the PADI with the Arduino IDE for OSX, Windows and Linux.

Download the latest version of the Arduino IDE.
On Linux or Windows it is recommended to run it in portable mode, on OSX this is not possible.

Install the latest stable version of the 0.9.x (not 0.10.x) versions of OpenOCD. Prebuild binaries can be downloaded from the gnu-mcu-eclipse page for all supported operating systems.

In your Arduino IDE installations add these two urls to the additionals board managers:

Code:
https://github.com/Ameba8195/Arduino/raw/master/release/package_realtek.com_ameba_index.json,
https://github.com/gtalusan/PADIIoTStamp/raw/master/release/package_padiiotstamp_index.json


Go to "Tools" -> "Board" -> "Boards Manager" and install both "Realtek Ameba Boards" and the "padiiotstamp" packages.
If necessary update the platform.txt file of "padiiotstamp" package to point to the correct OpenOCD installation, on Windows it is also necessary to hardcode the path to the output binary (ram_all.bin) in this same file.

If you are using the JLINK adapter you might have to add this line the 
/Path_to_OpenOCD/scripts/interface/jlink.cfg file to automatically switch to SWD instead of JTAG.
Code:
transport select swd



Select the board "PADI IoT Stamp" and select your JTAG device type. Your PADI can now be programmed.
Reply
#2
Thanks for writing this up, once I have some free time I need to get back to playing with my PADIs...
Come have a chat in the Pine A64 IRC channel >>
Reply
#3
(06-13-2017, 03:30 PM)xalius Wrote: Thanks for writing this up, once I have some free time I need to get back to playing with my PADIs...

Agreed-- my thanks too!

... this may be a game changer for folks needed to customize the padi;  also, this may be what tllim has in mind with the PADuino !

Shy
marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )
Reply
#4
It took me a full day to get it working because of all this easy to fix but hard to find issues. If some things are not clear enough or anyone has any additions I'm happy to edit the first post.

Programming this board is a lot of fun and you don't need any additional mcu.
Reply
#5
(06-14-2017, 02:35 PM)thomash Wrote: It took me a full day to get it working because of all this easy to fix but hard to find issues. If some things are not clear enough or anyone has any additions I'm happy to edit the first post.

Programming this board is a lot of fun and you don't need any additional mcu.

Congratulations thomash on getting to this milestone.

The instructions you provided worked for me, after I noted your comment about 
OpenOCD 9. I had been banging my head on OpenOCD 10 for several days. 
The same process with openocd 10 failed by making the padi swd 
programmer look/act bricked, unable to change the transport to swd.

reverting to OpenOCD 9 worked on second try...

Other experiences that might be of interest to others:

Experience 1:
Hosting from debian 8.7 with x86_64 architecture failed because there 
were no hosts for my platform in package_padiiotstamp_index.json. Adding 
"x86_64-linux-gnu" , "i686-linux-gnu" successfully installed openocd_tools 
( since the tools were not architecture dependant).

I had to make similar changes to Ameba8195 since my platform identified as 
"X86_64-linux-gnu" instead of the provided "X86_64-pc-linux-gnu"

In both cases I just served locally modified package.[].json files 
for preferences.txt.


experience 2:
hosting from debian8.7 on raspberry pi 3
 
 When my swd programmer looked bricked, I tried moving to using a 
raspberry pi as the programming host. This does work as far as SWD 
goes, but fails for PADIIoTStamp AND Ameba8195 because neither offers
the "arm-linux-gnueabihf" host in the respective package.[].json files.
 
 Making the same changes as for x86_64-linux-gnu but substituting 
"arm-linux-gnueabihf". You also need to add a stanza to point to a locally 
modified ameba_tools for the raspberry pi executables. You also need a 
stanza pointing to downloads.arduino gcc-arm-none-eabi for arm.  
This was a "close, but no cigar" attempt so I am back to X86_64 until 
I deliver some projects.

Thanks again for reporting success.
Reply
#6
Thanks for writing this up, once I have some free time I need to get back to playing with my PADIs...
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  PADI IoT Stamp CAD file collection thomash 2 304 09-05-2017, 08:07 PM
Last Post: machinehum

Forum Jump:


Users browsing this thread: 1 Guest(s)