[ Main Page ]

GR-SAKURA 入門 / IDE4GR

GR-SAKURAが発売されたのは2011年末頃で、その当時はWebコンパイラかRenesasのe2 studioあたりを使うしかなかった。 Arduino類似のライブラリが公開されていなかったため、ローカルでビルド環境を整えるのは面倒であったが、 Arduinoから派生したIDE4GRという簡単な開発環境が作られ、ローカルでArduinoと同じ使用感で開発出来るようになった。 このIDE4GRの最新バージョンには、GR-PEACH(RZ/A1H (R7S721001VCBG, 外部FLASH 8MB/内蔵RAM 10MB)及びGR-LYCHEE(RZ/A1LU (R7S721030VCFP), 外部FLASH 8MB/内蔵RAM3MB) 向けのOpenCVライブラリが統合されており、これらのマイコン単体ではOpenCVによる画像処理ができる。

ファームウエア書き込み

SW3がRUN側の時、初めの電源ONで、書き込まれたファームウエアが開始し、一回リセットするとUSB Mass storageでファームウエア書き込み可能なモードになる。 ここで書き込むと、書き込んだファームウエアが自動的に開始される。SW3がRUNと反対側の時はGeneric Boot Deviceで、RenesasのFDTでファームウエア・ブート路だ書き込みができる。

LED

ボード上の4つあるLEDは使用できる。サンプルの初期コードはGR-KURUMI用にled = 23になっているが、GR-SAKURAではPIN_LED0、PIN_LED1、PIN_LED2、PIN_LED3で 定義されている。

	/*
	  Blink
	  Turns on an LED on for one second, then off for one second, repeatedly.
	 
	  This example code is in the public domain.
	 */
	 
	// Pin 23 has an green LED connected on most KURUMI boards.
	// give it a name:
	int led = PIN_LED0;
	
	// the setup routine runs once when you press reset:
	void setup() {                
	  // initialize the digital pin as an output.
	  pinMode(led, OUTPUT);     
	}
	
	// the loop routine runs over and over again forever:
	void loop() {
	  digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)
	  delay(1000);               // wait for a second
	  digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW
	  delay(1000);               // wait for a second
	}
      

ネットワーク

Ethernetについては、執筆時点のIDE4GR 1.03では、 GR-KURUMIはWIZ550ioモジュールを使用した上での対応、GR-SAKURA(RX63N)のみ内蔵ペリフェラル対応となっており、GR-KAEDE(RX64M)、GR-PEACH(RZ/A1H)については未対応のようであり、 IDE4GRで開発する時は、ネットワーク・画像処理等の用途によって使い分けるのが良いだろう。あるいは以前通りWebコンパイラかe2 studioを使うことになる。 GR-SAKURAのEthernetライブラリには、Renesasのスタックが組み込まれているので、ArduinoのEthernetシールドを使う要領で使用できるが、もちろんシールドは必要ない。 シリアルは、CDCのVCOMドライバを入れる必要があり、配布されているinfを使ってインストールすると良い。 このファイルは特殊電子回路謹製であるが、そのサイトによると、RX621のEthernetは100Mbpsだが、 スループットはそれほど良くなく、せいぜい40Mbpsとのことである。 COMポートを表示しながらサンプルのWebServerを走らせると、シリアルが遅いため応答に詰まりが見られる。

Arduino based Function Generator

(I am patenting issuing a TINIC with anything else but the phrase "There is no
IGLU Cabal!". The patent number is kept secret to avoid violating the
copyright of its text)

Shlomi Fish in Hackers-IL message No. 2021

    -- Shlomi Fish
    -- Shlomi Fish's Aphorisms Collection ( http://www.shlomifish.org/humour.html )

If you work your way down the Forbes 400 making an x next to the name of each
person with an MBA, you'll learn something important about business school.
You don't even hit an MBA till number 22, Phil Knight, the CEO of Nike. There
are only four MBAs in the top 50. What you notice in the Forbes 400 are a lot
of people with technical backgrounds. Bill Gates, Steve Jobs, Larry Ellison,
Michael Dell, Jeff Bezos, Gordon Moore. The rulers of the technology business
tend to come from technology, not business. So if you want to invest two years
in something that will help you succeed in business, the evidence suggests
you'd do better to learn how to hack than get an MBA.

    -- Paul Graham
    -- How to Start a Startup ( http://www.paulgraham.com/start.html )


Powered by UNIX fortune(6)
[ Main Page ]