2012年9月24日月曜日

TI C2000 LaunchPad を試しました。

2012年8月 テキサス・インスツルメンツ(TI)より、LaunchPad第二弾、C2000 LaunchPadがリリースされました。


 TIのホームページで同LaunchPadの外観を見て、40本のPinが引き出されていて、MSP430 LaunchPadに比べ、拡張性が高いと思い、早々に発注しました。購入価格は1551円
  9月上旬に届けられた、パッケージを開くと、意外と質素、まあ、MSP430 LaunchPadのパケージが価格のわりに凝り過ぎの感が否めなかったからでしょうか。

 まず C2000 LaunchPad で デモプログラムのデバッグが出来るまでの手順を以下に記します。
1.LaunchPadデモプログラムの稼働
   ・付属のUSBケーブルでLaunchPadを PCにつなぎます。(FT2232ドライバ(FTDI)はMSP430 LaunchPad等で導入済み)
     LaunchPadのLED0~3が流れるように点滅します。
   ・PCでターミナルソフトを立ち上げます。シリアル接続でボーレートを11520に設定します。
   ・LaunchPadのResetスイッチを押します。
    TIのロゴマークのパターンがターミナルソフトに出力されます。
   ・スイッチS3を押すと、LEDの点滅が変化し、ターミナルソフトに温度変化が出力されます。
   

2.Code Composer Studio(CCSV5)のインストール
   MSP430を試したときのバージョン4(CCSV4)で、C2000 TMS320F28027のプロジェクトを作成、(TIのホームページよりダウンロード(sprc191.zip)したサンプルプログラム を使用)
 
   ビルドは成功するのですが、LaunchPadとの接続が出来ない。接続エラーも出力しない。(うんともすんとも言わない状態)  CCSV4では無理と判断 CCSV5のインストールを行いました。
 1)TIからCCSV5をダウンロードした ccs_setup_5.2.1.00018.exe を実行
 
    CCSV5はc:\tiのフォルダにインストールされる。
 2)CCSV5を実行 ライセンス登録を行う。
  
   ・ライセンス管理のため ネットワークカードのMACアドレスが必要
    コマンドプロンプトで ipconfig /all を実行 イーサネットアダプタの物理アドレスを使う。
   ・メールで送られてきた ライセンスファイル(TMDFCCS-ALLT90A-v5.lic)を c:\ti\licenceのフォルダに置く。
3.controlSUITEのインストール
  これは、LaunchPadのデモプログラム(C2kLaunchPadDemo)を利用するためにインストールしました。
  デモプログラム
C:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_examples\C2kLaunchPadDemo
4.デモプログラムのデバッグ
 1)CCSV5を立ち上げ、前述のデモプログラムをImportしました。
  ・Buildを実行すると成功、しかしLaunchPadとの接続エラーでデバッグは実行出来ず。
 2)デモプロジェクトにNewでTarget Configuration File を作成しました。
  ・Connection: Texas Instruments XDS100v1 USB Emulatorを選択
  ・Boad or Device: TMS320F28027にチェック
  ・Save Configuration 後 Test Connectionを実行 =>成功
   ※接続ログ 後述
 3)デバッグを実行
  今回 C2000 LauchPad のデバッグ 実行から開始までかなり時間がかかりました。(40秒)

5.開発初期プロジェクトの作成
 1)File/NewでCCS Project を作成する。
       ・Project name 入力
   ・Device Family:C2000
              Variant:2802x Piccolo TMS320F28027
        ・Connection:Texas Instruments XDS100v1 USB Emulator
       ・Project templates and examples  で Empty Project(with main.c) を選択
   *Taget Configration File は TMS320F28027.ccxml で作成されました。
 2)プログラムコーディング/ビルド/デバッグ
   LED0~3の点滅のプログラムはビルド成功しかし、コーディングを進めるに従い、次のエラー発生

../28027_RAM_lnk.cmd", line 114: error #10099-D: program will not fit into available memory.  placement with alignment/blocking fails for section ".text" size 0xaa5 page 0.  Available memory ranges:
   
どうも RAMのエリアが足りないエラーのようです。
   ・cmdファイル 28027_RAM_lnk.cmd の置き換え。
    とりあえずデモプロジェクトで使われている 2つのcmdファイルに置き換えました。
   <cmdファイル>
     ●F2802x_Headers_nonBIOS.cmd
        C:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_headers\cmd
     ●F28027.cmd
        C:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\cmd
これで一部WARNINGはでるものの一応ビルドは成功しました。

 何とかLED の点滅が可能になったので、キャラクタLCDでメッセージが表示を試しました。

----------------------------------------
 
  
 現時点では、まだデバッグは出来るものの、フラッシュROMへの書き込みは不調のようで、C2000 LaunchPadでもう少しじたばたしそうです。
----------------------------------------
C2000 LaunchPadの40本のピン 意外とGPIOに割り当てられたピンが少なく、少々残念、購入前に リファレンスマニュアルを読み込んでおけば。。。。。
----------------------------------------
※ 成功のLaunchPad 接続ログ
=======================================
  
[Start]
Execute the command:
%ccs_base%/common/uscif/dbgjtag -f %boarddatafile% -rv -o -F inform,logfile=yes -S pathlength -S integrity
[Result]

-----[Print the board config pathname(s)]------------------------------------
C:\Users\yanagi\AppData\Local\.TI\213602635\
    0\0\BrdDat\testBoard.dat
-----[Print the reset-command software log-file]-----------------------------
This utility has selected a 100- or 510-class product.
This utility will load the adapter 'jioserdesusb.dll'.
The library build date was 'May 30 2012'.
The library build time was '22:52:27'.
The library package version is '5.0.747.0'.
The library component version is '35.34.40.0'.
The controller does not use a programmable FPGA.
The controller has a version number of '4' (0x00000004).
The controller has an insertion length of '0' (0x00000000).
This utility will attempt to reset the controller.
This utility has successfully reset the controller.
-----[Print the reset-command hardware log-file]-----------------------------
The scan-path will be reset by toggling the JTAG TRST signal.
The controller is the FTDI FT2232 with USB interface.
The link from controller to target is direct (without cable).
The software is configured for FTDI FT2232 features.
The controller cannot monitor the value on the EMU[0] pin.
The controller cannot monitor the value on the EMU[1] pin.
The controller cannot control the timing on output pins.
The controller cannot control the timing on input pins.
The scan-path link-delay has been set to exactly '0' (0x0000).
-----[The log-file for the JTAG TCLK output generated from the PLL]----------
There is no hardware for programming the JTAG TCLK frequency.
-----[Measure the source and frequency of the final JTAG TCLKR input]--------
There is no hardware for measuring the JTAG TCLK frequency.
-----[Perform the standard path-length test on the JTAG IR and DR]-----------
This path-length test uses blocks of 512 32-bit words.
The test for the JTAG IR instruction path-length succeeded.
The JTAG IR instruction path-length is 38 bits.
The test for the JTAG DR bypass path-length succeeded.
The JTAG DR bypass path-length is 1 bits.
-----[Perform the Integrity scan-test on the JTAG IR]------------------------
This test will use blocks of 512 32-bit words.
This test will be applied just once.
Do a test using 0xFFFFFFFF.
Scan tests: 1, skipped: 0, failed: 0
Do a test using 0x00000000.
Scan tests: 2, skipped: 0, failed: 0
Do a test using 0xFE03E0E2.
Scan tests: 3, skipped: 0, failed: 0
Do a test using 0x01FC1F1D.
Scan tests: 4, skipped: 0, failed: 0
Do a test using 0x5533CCAA.
Scan tests: 5, skipped: 0, failed: 0
Do a test using 0xAACC3355.
Scan tests: 6, skipped: 0, failed: 0
All of the values were scanned correctly.
The JTAG IR Integrity scan-test has succeeded.
-----[Perform the Integrity scan-test on the JTAG DR]------------------------
This test will use blocks of 512 32-bit words.
This test will be applied just once.
Do a test using 0xFFFFFFFF.
Scan tests: 1, skipped: 0, failed: 0
Do a test using 0x00000000.
Scan tests: 2, skipped: 0, failed: 0
Do a test using 0xFE03E0E2.
Scan tests: 3, skipped: 0, failed: 0
Do a test using 0x01FC1F1D.
Scan tests: 4, skipped: 0, failed: 0
Do a test using 0x5533CCAA.
Scan tests: 5, skipped: 0, failed: 0
Do a test using 0xAACC3355.
Scan tests: 6, skipped: 0, failed: 0
All of the values were scanned correctly.
The JTAG DR Integrity scan-test has succeeded.
[End]
=======================================





    

0 件のコメント:

コメントを投稿