[ 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

If I am not for myself, who will be for
me? If I am only for myself, who am I?

	-- One of Nadav Har'El's Email Signatures.

                -->  ispy_ has joined ##programming
            <ispy_>  hi gang.
            <ispy_>  I'm a n00b programmer and think I should learn A and
                     B before C, right?
          <std_orb>  ispy_: General understanding should come before that.
            <ispy_>  std_orb: I have no idea what I'm doing...
          <std_orb>  ispy_: I can see that
                  *  ispy_ kicks the dirt...
 <tommy_the-dragon>  ive been meaning to get into it
            <ispy_>  Is C like JavaScript?
            <ispy_>  Same thing right?
 <tommy_the-dragon>  ispy_: lol
          <rindolf>  ispy_: Perl is more like C than JS is.
            <ispy_>  rindolf: Never heard of Perl... I should google that.
          <rindolf>  ispy_: use Bing search instead.
          <rindolf>  Or Altavista.
         <Terminus>  rindolf: i see.
            <ispy_>  rindolf, std_orb, tommy_the-dragon ... thanks for the
                     pointers :)
          <rindolf>  ispy_: you should learn Intercal, it's the most
                     expressive language possible.
            <ispy_>  rindolf: Sounds exciting!
         <Terminus>  intercal... lol!
            <ispy_>  haha
            <ispy_>  ok ok ok... I can't continue this... I'm practically
                     laughing my ass off at my desk.
          <rindolf>  :-)
            <ispy_>  hehe

    -- Emulating a Clueless Newbie
    -- ##programming, Freenode


Powered by UNIX fortune(6)
[ Main Page ]