ホーム フォーラム Texas Instruments 開発環境 Code Composer Studio CCSv8 C2000 新規CCSプロジェクトの作成について

このトピックには9件の返信が含まれ、4人の参加者がいます。6 年、 4 ヶ月前Yojiro Yojiro さんが最後の更新を行いました。

10件の投稿を表示中 - 1 - 10件目 (全10件中)
  • 投稿者
    投稿
  • #1181 返信
    Rio
    Rio
    従業員

    CCSv8 C2000 新規CCSプロジェクトの作成について

    デバイス型番:TMS320F28027

    TMDSDOCK28027とTMS320F28027を使用してCCSv8環境で開発を行おうとしています。

    下図のように新規CCSプロジェクトの作成を行いました。

    main.cを含むプロジェクトファイルが生成されましたが、

    マイコンの周辺機能やレジスタへのアクセスを行うためにはどのように設定すればいいでしょうか。

    #1231 返信
    Ge
    Ge
    従業員

    新規プロジェクトの作成方法については、以下のマニュアルの44ページにその手順が記載されておりますので、ご確認ください。

    TMS320C2000:Piccolo MCUのソフトウェア開発入門
    http://www.tij.co.jp/jp/lit/an/jaja230a/jaja230a.pdf

    #1282 返信

    satoshi
    参加者

    44ページのヘッダ・ファイルをディレクトリごとコピーするについてですが、

    ——————————————————————————————

    F2802xの場合

    C:\ti\controlSUITE\device_support\f2802x\v200\F2802x_commonフォルダ
    C:\ti\controlSUITE\device_support\f2802x\v200\F2802x_headersフォルダ
    C:\ti\controlSUITE\device_support\f2802x\v200\DSP28x_Project.h
    C:\ti\contorlSUITE\device_support\f2802x\v200\F2802x_Device.h

    ——————————————————————————————

    とありますが、v3.02.00.00の場合、DSP28x_Project.hはcommon\include内に、

    F2802x_Device.hはheaders\include内にあります。

     

    この場合、commonとheadersフォルダをプロジェクトフォルダにコピーする時に、

    DSP28x_Project.hとF2802x_Device.hはどのようにすればいいのでしょうか。

     

    #1304 返信
    Yojiro
    Yojiro
    従業員

    DSP28x_Project.hとF2802x_Device.hは直接コピーせず、それぞれコピーするフォルダに保存されているファイルを使用するようにお願いします。

    C2000Wareでは、F2802x向けのヘッダファイル構成が他のデバイスシリーズ(F2806x, F2803x)と同じ構成になっております。

     

    #1331 返信

    satoshi
    参加者

    48ページに書かれているDSP2802x_headers_BIOS.cmdをExcludeすると、

    ビルド時に以下の警告が出ます。

    Building target: “test8.out”
    Invoking: C2000 Linker
    “C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.1.LTS/bin/cl2000″ -v28 -ml -mt –define=”_DEBUG” -g –diag_warning=225 –diag_wrap=off –display_error_number -z -m”test8.map” –stack_size=0x300 –warn_sections -i”C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.1.LTS/lib” -i”C:/Users/n4777/ccs/device_support/f2802x/v3.02.00.00/common/ccs/Debug” -i”C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.1.LTS/include” –reread_libs –diag_wrap=off –display_error_number –xml_link_info=”test8_linkInfo.xml” –rom_model -o “test8.out” “./common/source/f2802x_codestartbranch.obj” “./common/source/f2802x_cputimers.obj” “./common/source/f2802x_defaultisr.obj” “./common/source/f2802x_piectrl.obj” “./common/source/f2802x_pievect.obj” “./common/source/f2802x_sysctrl.obj” “./common/source/f2802x_usdelay.obj” “./headers/source/F2802x_GlobalVariableDefs.obj” “./source/main.obj” “../cmd/F28027.cmd” -llibc.a -ldriverlib.lib
    <Linking>
    warning #10247-D: creating output section “EmuKeyVar” without a SECTIONS specification
    warning #10247-D: creating output section “PartIdRegsFile” without a SECTIONS specification
    warning #10247-D: creating output section “EmuBModeVar” without a SECTIONS specification
    warning #10247-D: creating output section “FlashCallbackVar” without a SECTIONS specification
    warning #10247-D: creating output section “FlashScalingVar” without a SECTIONS specification
    warning #10247-D: creating output section “SysPwrCtrlRegsFile” without a SECTIONS specification
    warning #10247-D: creating output section “DevEmuRegsFile” without a SECTIONS specification
    warning #10247-D: creating output section “FlashRegsFile” without a SECTIONS specification
    warning #10247-D: creating output section “CpuTimer1RegsFile” without a SECTIONS specification
    warning #10247-D: creating output section “CpuTimer0RegsFile” without a SECTIONS specification
    warning #10247-D: creating output section “CsmPwlFile” without a SECTIONS specification
    warning #10247-D: creating output section “CpuTimer2RegsFile” without a SECTIONS specification
    warning #10247-D: creating output section “GpioIntRegsFile” without a SECTIONS specification
    warning #10247-D: creating output section “NmiIntruptRegsFile” without a SECTIONS specification
    warning #10247-D: creating output section “SciaRegsFile” without a SECTIONS specification
    warning #10247-D: creating output section “CsmRegsFile” without a SECTIONS specification
    warning #10247-D: creating output section “XIntruptRegsFile” without a SECTIONS specification
    warning #10247-D: creating output section “SpiaRegsFile” without a SECTIONS specification
    warning #10247-D: creating output section “PieCtrlRegsFile” without a SECTIONS specification
    warning #10247-D: creating output section “SysCtrlRegsFile” without a SECTIONS specification
    warning #10247-D: creating output section “ECap1RegsFile” without a SECTIONS specification
    warning #10247-D: creating output section “Comp2RegsFile” without a SECTIONS specification
    warning #10247-D: creating output section “Comp1RegsFile” without a SECTIONS specification
    warning #10247-D: creating output section “GpioDataRegsFile” without a SECTIONS specification
    warning #10247-D: creating output section “AdcResultFile” without a SECTIONS specification
    warning #10247-D: creating output section “I2caRegsFile” without a SECTIONS specification
    warning #10247-D: creating output section “EPwm2RegsFile” without a SECTIONS specification
    warning #10247-D: creating output section “EPwm4RegsFile” without a SECTIONS specification
    warning #10247-D: creating output section “GpioCtrlRegsFile” without a SECTIONS specification
    warning #10247-D: creating output section “EPwm1RegsFile” without a SECTIONS specification
    warning #10247-D: creating output section “EPwm3RegsFile” without a SECTIONS specification
    warning #10247-D: creating output section “AdcRegsFile” without a SECTIONS specification
    warning #10247-D: creating output section “PieVectTableFile” without a SECTIONS specification

     

    #1334 返信

    satoshi
    参加者

    v3.02.00.00の場合、例では

    InitFlash()ではなくFLASH_setup(FLASH_Handle flashHandle)を使用していますが、

    この場合、Excludeするべきファイルが異なってくると思うのですが、

    v3.02.00.00ではどのファイルをExcludeすればいいのでしょうか。

    また、Excludeすべきファイルの判断方法があれば教えてください。

    #1337 返信

    satoshi
    参加者

    時に#ifdefで切り替える定数がi2c.cではDEBUG、pie.cでは_DEBUGとなっていますが、

    デバッグ時は両方を定義する必要がありますか?

    #1343 返信
    Yojiro
    Yojiro
    従業員

    リンクエラーにつきましては、DSP2802x_headers_BIOS.cmdをExcludeされる際に、同じフォルダにある”F2802x_Headers_nonBIOS.cmd”もExcludeされていませんでしょうか。エラーメッセージに出力される内容につきましては、F2802x_Headers_nonBIOS.cmdをビルド対象としていただくことで解消いたします。

    FLASH初期化関数につきましては、InitFlash()がcommon\source\f2802x_sysctrl.cに定義されており、資料に記載されている通りのファイル構成で問題ありません。
    FLASH_setupはdriverLibを使用したFLASH ROMの初期化ですので、driverLibをご利用になる際には、別途flash.cをExclude対象から除外いただければと存じます。

    ifdefスイッチで参照している定数DEBUGおよび_DEBUGにつきまして、pie.cの_DEBUGにて有効となる関数(PIE_setDebugIntVectorTable)はデバッグ時にも基本的には使用することはありません。この関数は、お客様で未定義の割り込みハンドラについても、デフォルトのハンドラを使用せずにお客様で作成されたハンドラを使用する場合にご利用いただく関数になります。
    従いまして、デバッグ時は、”DEBUG”のみの定義で問題ございません。

    以上、よろしくお願いします。

    #1346 返信

    satoshi
    参加者

    定数DEBUGと_DEBUGにつきまして、

    device_support\f2802x\examples\drivers内のプロジェクトではすべて_DEBUGが定義されていますが、

    これはDEBUGが正しいのでしょうか。

    #1347 返信
    Yojiro
    Yojiro
    従業員

    サンプルプログラムには、レジスタアクセスを行う方法として、構造体・ビットフィールドによるレジスタアクセスのサンプルと、ドライバAPIタイプのサンプルの2種類用意されております。
    構造体・ビットフィールドタイプでは、DEBUGと定義され、ドライバAPIタイプのサンプルでは_DEBUGと定義されていますので、ご利用方法に合わせて、定義して頂ければと思います。

    これらの定義により有効となる処理につきましては、必須の処理とは限りませんが、すべてのデバッグ機能を組み込まれる場合は、両方の定義を追加頂ければと存じます。

     

    以上、よろしくお願いします。

10件の投稿を表示中 - 1 - 10件目 (全10件中)