Overblog Suivre ce blog
Editer la page Administration Créer mon blog
Xtase & Androids

Yun core (system configuration)

the whole project
the whole project

If you want to see project which that page is related to, follow this link

@) After 1st upgrading my system (via .tar on SD card), I choosed on expand my fs to it. That's how I proceed :

with Arduino IDE upload sketch "YunDiskSpaceExpander.ino" (google it)
BEWARE : it will format whole SDCard /!\
---> upload via USB then open Serial Terminal (be sure to be set as "New Line")
---> follow the instructions on monitor
be sure to be connected to internet to proceed
I choosed 3000MB user partition for a 8GB sdcard (or 8000M on a 32GB)
then reset the yun (cpu not mcu)

(If your serial monitor is still opened : u will see the linux side booting)

@) As I wanted my Linio controls the MCU (& not the opposite default behaviour)

in /etc/inittab, I commented the line :

ttyATH0::askfirst:/bin/ash --login

It disabled the use of Bridge,Process & Console APIs on 32u4 side, but let me map

.ino ==> Serial1 ---> linux /dev/ttyATH0 that can be used w/ lua, python, cpp ...

(I took this decision because of that the cpu+LinIo boots in ~1min, so the mcu was forced to wait cpu to finish starting in order to work together)

@) Compile MCU sketch directly on Yun : 

  wget https://github.com/noblepepper/YunAvrToolchain/archive/master.zip --no-check-certificate
  & see README.md (17.5 MB)

  # opkg update (else don't see unzip)
  # opkg install unzip
  # opkg install make

  wget https://github.com/noblepepper/YunAvrToolchain/archive/master.zip --no-check-certificate
  mkdir /usr/local
  mv master.zip /usr/local
  cd /usr/local
  unzip master.zip
  mkdir /usr/local/bin
  mv YunAvrToolchain-master/upload /usr/local/bin
  mv YunAvrToolchain-master/newSketch /usr/local/bin
  mv YunAvrToolchain-master/verify /usr/local/bin
  rm master.zip

  # cd /vm_mnt/opt/arduino_toolchain
  # wget http://arduino.cc/download.php?f=/arduino-1.5.8-linux32.tgz --no-check-certificate -O arduino158.tgz
           because can't write the filename to a FAT fs (112MB)
  # cp arduino158.tgz /usr/local
  # cd $_
  # tar zxvf arduino158.tgz (take very very long time)
  # rm arduino158.tgz

  # cd /vm_mnt/opt/arduino_toolchain
  # wget https://github.com/sudar/Arduino-Makefile/archive/master.zip --no-check-certificate
  # mv master.zip.1 makfile.zip
  # cp makfile.zip /usr/local/
  # cd $_
  # unzip makfile.zip
  # rm makfile.zip

 Setup a work area and run a test
  export PATH="$PATH:/usr/local/bin"
   @@ @ this time the sketchbook will be located in /root/sketchbook/
  mkdir -p /vm_mnt/devl/arduino/sketchbook
  ln -s /vm_mnt/devl/arduino/sketchbook /root/sketchbook

  newSketch Blink
    change #!/bin/bash to #!/bin/sh
  cp /usr/local/arduino-1.5.8/examples/01.Basics/Blink/Blink.ino /root/sketchbook/Blink/
  upload Blink
@) Compile CPU cpp directly on Yun

see : http://playground.arduino.cc/Hardware/Yun#Compiling_on_the_Yun

-- if you already have installed gcc for avr : 
 > opkg -t /root install yun-gcc will fail (err : "But that file is already provided by package  * libstdcpp")

# opkg install binutils
# cd /root
# wget  http://downloads.arduino.cc/openwrtyun/1/packages/yun-gcc_4.6.2-2_ar71xx.ipk
# opkg install --force-overwrite /root/yun-gcc_4.6.2-2_ar71xx.ipk
  takes ~env 10min

If you want to see project which that page is related to, follow this link

Partager cette page

Repost 0