E2Liteでのデバッグコンソール  (CS+/RX231)

いつも御世話になっております。

 

E2Liteでのデバッグコンソール機能を使用したく、探した所

 

・E2Liteのプロパティには『[デバッグ・ツール設定]タブ[ストリーム入出力]』が存在しない

・またE1/E20/E2エミュレータ, E2エミュレータLiteユーザーズマニュアル別冊(RX接続時の注意事項)を読むと、E2Liteには[ストリーム入出力]という機能の記載がない

 

より、E2Liteではデバッグコンソールの機能はないという事でしょうか?

Parents
  • bunbunさん、こんにちは。NoMaYです。

    > Flashする際はそのコードが不要なので、どのように無効にするか良いかまだ分かっておりません。

    デバッグ用printf出力の有効/無効を切り替えるやり方は、RXスマートコンフィグレータとは関係無しに、以下のような記述をヘッダファイルに記述して切り替えるのがオーソドックスなやり方だと思います。なお、RXスマートコンフィグレータでprintf等の出力先(やscanf等の入力元)を変更したい場合に関係する画面コピーを載せておきます。また、私がかふぇルネに投稿したプログラムで実際に出力先を変更している投稿のURLも載せておきます。

    #if defined(NDEBUG) && !defined(_DEBUG)
    #define dbgprintf(...)
    #else
    #define dbgprintf(...) printf(__VA_ARGS__)
    #endif

    RXスマートコンフィグレータのデフォルト設定のprintf等の出力先(やscanf等の入力元)の画面コピー


    RXスマートコンフィグレータのprintf等の出力先(やscanf等の入力元)を変更したい場合の画面コピー


    FITのR_BSPモジュールのドキュメントの画面コピー


    私がかふぇルネに投稿したプログラムで実際に出力先を変更している投稿のURL

    TB-RX65N/TB-RX231/TB-RX130+CC-RX/GNURXでCoreMark®ベンチマークを動かせるようにしてみようと思います
    japan.renesasrulz.com/cafe_rene/f/forum21/6022/tb-rx65n-tb-rx231-tb-rx130-cc-rx-gnurx-coremark/33619#33619

    ちなみに、FITのR_BSPモジュールのソースでprintf等の出力先(やscanf等の入力元)を変更している部分は以下です。(以下はR_BSP V5.40のものです。)

    src/smc_gen/r_bsp/mcu/all/lowlvl.c

    void charput (char output_char)
    {
        /* If user has provided their own charput() function, then call it. */
    #if BSP_CFG_USER_CHARPUT_ENABLED == 1
        BSP_CFG_USER_CHARPUT_FUNCTION(output_char);
    #else
        /* Wait for transmit buffer to be empty */
        /* WAIT_LOOP */
        while(0 != (BSP_PRV_E1_DBG_PORT.dbgstat & BSP_PRV_TXFL0EN))
        {
            /* do nothing */
            R_BSP_NOP();
        }

        /* Write the character out */
        /* Casting is valid because it matches the type to the right side or argument. */
        BSP_PRV_E1_DBG_PORT.tx_data = (int32_t)output_char;
    #endif
    } /* End of function charput() */
    char charget (void)
    {
        /* If user has provided their own charget() function, then call it. */
    #if BSP_CFG_USER_CHARGET_ENABLED == 1
        return BSP_CFG_USER_CHARGET_FUNCTION();
    #else
        /* Wait for rx buffer buffer to be ready */
        /* WAIT_LOOP */
        while(0 == (BSP_PRV_E1_DBG_PORT.dbgstat & BSP_PRV_RXFL0EN))
        {
            /* do nothing */
            R_BSP_NOP();
        }

        /* Read data, send back up */
        /* Casting is valid because it matches the type to the retern value. */
        return (char)BSP_PRV_E1_DBG_PORT.rx_data;
    #endif
    } /* End of function charget() */

    src/smc_gen/r_config/r_bsp_config.h

    /* If desired the user may redirect the stdio charget() and/or charput() functions to their own respective functions
       by enabling below and providing and replacing the my_sw_... function names with the names of their own functions. */
    #define BSP_CFG_USER_CHARGET_ENABLED    (0)
    #define BSP_CFG_USER_CHARGET_FUNCTION     my_sw_charget_function

    #define BSP_CFG_USER_CHARPUT_ENABLED    (0)
    #define BSP_CFG_USER_CHARPUT_FUNCTION     my_sw_charput_function

     

Reply
  • bunbunさん、こんにちは。NoMaYです。

    > Flashする際はそのコードが不要なので、どのように無効にするか良いかまだ分かっておりません。

    デバッグ用printf出力の有効/無効を切り替えるやり方は、RXスマートコンフィグレータとは関係無しに、以下のような記述をヘッダファイルに記述して切り替えるのがオーソドックスなやり方だと思います。なお、RXスマートコンフィグレータでprintf等の出力先(やscanf等の入力元)を変更したい場合に関係する画面コピーを載せておきます。また、私がかふぇルネに投稿したプログラムで実際に出力先を変更している投稿のURLも載せておきます。

    #if defined(NDEBUG) && !defined(_DEBUG)
    #define dbgprintf(...)
    #else
    #define dbgprintf(...) printf(__VA_ARGS__)
    #endif

    RXスマートコンフィグレータのデフォルト設定のprintf等の出力先(やscanf等の入力元)の画面コピー


    RXスマートコンフィグレータのprintf等の出力先(やscanf等の入力元)を変更したい場合の画面コピー


    FITのR_BSPモジュールのドキュメントの画面コピー


    私がかふぇルネに投稿したプログラムで実際に出力先を変更している投稿のURL

    TB-RX65N/TB-RX231/TB-RX130+CC-RX/GNURXでCoreMark®ベンチマークを動かせるようにしてみようと思います
    japan.renesasrulz.com/cafe_rene/f/forum21/6022/tb-rx65n-tb-rx231-tb-rx130-cc-rx-gnurx-coremark/33619#33619

    ちなみに、FITのR_BSPモジュールのソースでprintf等の出力先(やscanf等の入力元)を変更している部分は以下です。(以下はR_BSP V5.40のものです。)

    src/smc_gen/r_bsp/mcu/all/lowlvl.c

    void charput (char output_char)
    {
        /* If user has provided their own charput() function, then call it. */
    #if BSP_CFG_USER_CHARPUT_ENABLED == 1
        BSP_CFG_USER_CHARPUT_FUNCTION(output_char);
    #else
        /* Wait for transmit buffer to be empty */
        /* WAIT_LOOP */
        while(0 != (BSP_PRV_E1_DBG_PORT.dbgstat & BSP_PRV_TXFL0EN))
        {
            /* do nothing */
            R_BSP_NOP();
        }

        /* Write the character out */
        /* Casting is valid because it matches the type to the right side or argument. */
        BSP_PRV_E1_DBG_PORT.tx_data = (int32_t)output_char;
    #endif
    } /* End of function charput() */
    char charget (void)
    {
        /* If user has provided their own charget() function, then call it. */
    #if BSP_CFG_USER_CHARGET_ENABLED == 1
        return BSP_CFG_USER_CHARGET_FUNCTION();
    #else
        /* Wait for rx buffer buffer to be ready */
        /* WAIT_LOOP */
        while(0 == (BSP_PRV_E1_DBG_PORT.dbgstat & BSP_PRV_RXFL0EN))
        {
            /* do nothing */
            R_BSP_NOP();
        }

        /* Read data, send back up */
        /* Casting is valid because it matches the type to the retern value. */
        return (char)BSP_PRV_E1_DBG_PORT.rx_data;
    #endif
    } /* End of function charget() */

    src/smc_gen/r_config/r_bsp_config.h

    /* If desired the user may redirect the stdio charget() and/or charput() functions to their own respective functions
       by enabling below and providing and replacing the my_sw_... function names with the names of their own functions. */
    #define BSP_CFG_USER_CHARGET_ENABLED    (0)
    #define BSP_CFG_USER_CHARGET_FUNCTION     my_sw_charget_function

    #define BSP_CFG_USER_CHARPUT_ENABLED    (0)
    #define BSP_CFG_USER_CHARPUT_FUNCTION     my_sw_charput_function

     

Children