CS+ + RX66T + スマートコンフィグレータ で Lチカ

お世話になっております。
物凄く基本的なことで恥ずかしいですが、よろしくお願いします。

e2studio スマートコンフィグレータ Application Examplesを参考に
Lチカのプログラムを作成しましたがビルドでエラーが発生します。
どこが原因かどなたかお分かりになられますでしょうか。

ターゲットボード:HSBRX66T144
ターゲットデバイス:R5F566TKCxFB
開発環境:CS+ for CC V8.11.00
PC の OS:Microsoft Windows 10 Pro (64bit)
スマートコンフィグレータ:Version 2.20.0

~<20240328_test.cpp>~~~~~~~~~~~~

//#include <stdio.h>
//#include <stdint.h>
#include "r_smc_entry.h"
//#include "r_cg_macrodriver.h"
//#include "r_cg_userdefine.h"
//#include "Config_CMT0.h"

//#include "typedefine.h"
#ifdef __cplusplus
//#include <ios> // Remove the comment when you use ios
//_SINT ios_base::Init::init_cnt; // Remove the comment when you use ios
#endif

extern void R_Config_CMT0_Create(void);
extern void R_Config_CMT0_Create_UserInit(void);
extern void R_Config_CMT0_Start(void);
extern void R_Config_CMT0_Stop(void);

void main(void);
#ifdef __cplusplus
extern "C" {
void abort(void);
}
#endif

void main(void)
{
R_Config_CMT0_Start();

while(1U){
nop();
}

}

#ifdef __cplusplus
void abort(void)
{

}
#endif

~~~~~~~~~~~~~

~<r_cg_userdefine.h>~~~~~~~~~~~~



/***********************************************************************************************************************
Macro definitions (Register bit)
***********************************************************************************************************************/
/* Start user code for register. Do not edit comment generated here */
/* LED port settings */
#define TEST_LED (PORTE.PODR.BIT.B3)
/* End user code. Do not edit comment generated here */

~~~~~~~~~~~~~

~<Config_CMT0_user.c>~~~~~~~~~~~~



#if FAST_INTERRUPT_VECTOR == VECT_CMT0_CMI0
#pragma interrupt r_Config_CMT0_cmi0_interrupt(vect=VECT(CMT0,CMI0),fint)
#else
#pragma interrupt r_Config_CMT0_cmi0_interrupt(vect=VECT(CMT0,CMI0))
#endif
static void r_Config_CMT0_cmi0_interrupt(void)
{
/* Start user code for r_Config_CMT0_cmi0_interrupt. Do not edit comment generated here */
TEST_LED ^= 1U;
/* End user code. Do not edit comment generated here */
}

~~~~~~~~~~~~~

~<エラー内容>~~~~~~~~~~~~

E0562310:Undefined external symbol "R_Config_CMT0_Start()" referenced in "DefaultBuild\20240328_test.obj" 20240328_test.mtpj

~~~~~~~~~~~~~

※ 外部発振入力はボードに合わせて 24MHz に変更しました。
※ コード生成は問題なく終了しているように見えます。
※ LED2 の定義は TEST_LED としてボードに合わせて PE3 としました。
※ 「#include "r_smc_entry.h"」は追加しました。
※ 念のため「extern void R_Config_CMT0_Start(void);」も追加しました。
※ p.20 (2.7 ビルドとハードウェアボードでの実行) でつまずいています。

どなたか助けてください。よろしくお願いします。

Parents
  • C++のソースコードからCのソースコードの関数や変数を利用する時にはソースコードやヘッダファイルに

    #ifdef __cplusplus
    extern "C" {

    extern void R_Config_CMT0_Create(void);
    extern void R_Config_CMT0_Create_UserInit(void);
    extern void R_Config_CMT0_Start(void);
    extern void R_Config_CMT0_Stop(void);
    }
    #endif

    みたいな記述が必要です。

Reply
  • C++のソースコードからCのソースコードの関数や変数を利用する時にはソースコードやヘッダファイルに

    #ifdef __cplusplus
    extern "C" {

    extern void R_Config_CMT0_Create(void);
    extern void R_Config_CMT0_Create_UserInit(void);
    extern void R_Config_CMT0_Start(void);
    extern void R_Config_CMT0_Stop(void);
    }
    #endif

    みたいな記述が必要です。

Children