• 締切済み

HEWを使用しているのですが、このようなエラーが出ました。

HEWを使用しているのですが、このようなエラーが出ました。 C:\Hiae_7751RTE\Product\T-Kernel\sh7751R\include\queue.h(28) : C2500 (E) Illegal token "void" C:\Hiae_7751RTE\Product\T-Kernel\sh7751R\include\queue.h(29) : C2500 (E) Illegal token "{" 最初はコンパイルエラーもリンクエラーもなかったのですが、intprg.c、resetprg.cを消した(この時点でもエラーはなし)のでstacksct.hを別のソースファイルからインクルードさせてみたら上のようなエラーが出ました。エラーが出たのでstacksct.hをインクルードさせるのもやめてみましたがエラーは消えません。 新しくプロジェクトを作ってみましたがダメでした。 また、queue.hは書き換えていません。 なぜ関係のないqueue.hにエラーがでたのでしょうか? queue.hのエラーが出た行です↓ ---------------------------------- Inline void QueInit( QUEUE *que ) { ----------------------------------

みんなの回答

  • z64423
  • ベストアンサー率53% (26/49)
回答No.2

HEW は使ったことないですが、プリプロセッサ出力を見れば、原因が分かると思いますよ。 ↓マニュアル http://documentation.renesas.com/jpn/products/tool/j702248_superh.pdf のp11に「preprocessor=ファイル名」とすればプリプロセッサ出力を書き出せるようなので、出力ファイルをエディタで開いて 1) queue.h を検索 2) QueInit( を検索  Inline void QueInit() がどう展開されているか調べる。 3) 正しければ、その位置から上方向にさかのぼって、あやしそうなところを見つける。 4) 見つからない場合は、「2)」の QueInit() の行を含む、それより前(上)の数行 [*1] をコピーして、例えば「test00.c」のような適当なファイルに保存。 5) 「4)」のファイルを普通にコンパイルする。  エラーになるはずなので、ソースをじっくり調査する。  [*1] 空行(何もコードのない行)を除いて、関数プロトタイプ宣言とか外部変数宣言とかを数行、の意。 まぁ、「Inline」が怪しそうですが…

  • wathavy
  • ベストアンサー率22% (505/2263)
回答No.1

ルネサスには問い合わせてみましたか? あと、プロジェクトファイルをバックアップしていないのでしょうか? 変更前の状態のプロジェクトを持たずに、変更してしまってエラーが出ても、後の祭りですよ。 変な現象が山ほど出ます。 改造する直前に、動作しているプロジェクトは必ず、番号をつけて注記を書いて(テキストでいい) 圧縮するなりして保存しておかなければ、後戻りできなくなった時点でお手上げです。

関連するQ&A

  • HEWで作成したプログラムをRAM上でデバッグしているのですが、実行途

    HEWで作成したプログラムをRAM上でデバッグしているのですが、実行途中でCPUアドレスエラー(read)になってしまい困っています。 原因として何が考えられるでしょうか? 環境は SH7751R T-Engineボード(OS:T-Kernel BASIC版) デバッガ:HI ApplicationEngine for T-Engine です。 よろしくお願いします。

  • 【ルネサスのマイコン】E8aからR8C35Aへのコンパイル、書き込み

    初心者です。E8aからR8C35Aへのコンパイル、書き込みができず困っております。 簡単なプログラミングでまずはLEDを点灯させてみたいのですが、HEW4でのコンパイルでエラーが出てしまいます。 sfr_r835a.hをincludeして、かつ、HEW4上のheader fileにも追加しているのに、「P1-1」が使えない理由が分かりません。。。 どなたがご教授頂けませんでしょうか?よろしくお願いいたします。 <エラー内容> [Error(ccom)] unknown variable P1_1 <C source file> #include "sfr_r835a.h" void main(void) { P1_1=0; while(1); } <参考にしたHP> http://goda.blog3.fc2.com/blog-entry-195.html

  • HEWでのコンパイルエラー

    とある人に頂いたH8Sデバッグボードを動作させるためのサンプルHEWプロジェクトをコンパイルしたところ次のエラーが出てしまいます…。 License has expired. Maximum link size limited to 64KB code+data. L3430 (F) The total section size exceeded the limit このエラーの意味を、Google先生に色々尋ねてはみたのですが答えが出てきませんでした。もちろんH8S C/C++コンパイラマニュアルも調べました。 無償評価版のHEWを使っているので「合計リンクサイズが64KBを超えてますよ」というエラーなのでしょうか?? どなたかこのエラーの意味をご存知の方がおられましたらご回答願います。

  • 長い文字列を配列に入れるには?

    VBから長い文字列を送って,c言語で受け取りたいのですが,うまく配列に入れることが出来ません.文字列サイズは最低でも4000バイト必要です. #include <stdio.h> #include <stdlib.h> #include <string.h> //VBから送られてくるデータ char getch[4000]="start1T\tpose 0 0 -5 0 -5 0 -5 0 -5 0 0 0 0 0\ ..省略.. 25\t\n"; void main(void){ char *token; char seps[]="\t\n"; FILE *pose; pose=fopen("pose.txt","a"); if((token=strtok(getch,"\t"))==NULL){ printf("Error File1\n"); exit(1); } printf("%s\n",token); while(strcmp(token,"\n")!=0){ token=strtok(NULL,"\t"); fputs(token,pose); fputs("\n",pose); printf("%s\n",token); } fclose(pose); }

  • HEW4での通信エラーについて

    HEW4での通信エラーについて ルネサスのR8C/29マイコンを使用しているのですが、 HEW4で作ったプログラムをマイコンにダウンロードする際に、 「通信エラーが発生しました。ターゲットよりデータを受信できません。 (16014)」 と表示され、通信ができません。 どうしたら通信できるようになるのでしょうか? ソフトのインストールで失敗しているのか、ケーブルの接続で失敗しているのか、よくわかりません。 もしわかる方がいらっしゃれば、回答よろしくお願いします。 ここに書いた内容で足りない情報があれば、わかる範囲で記述させていただきます。 当方初心者ですので、誤った言葉の表記がありましたら申し訳ありません。 マイコンとPCは、USB-シリアルケーブルで接続しています。 OSはWindows XPです。

  • Hitachi Embedded Workshop (HEW) Ver.2.0のエラーについて。

    今秋月のH8マイコンのキットを使って研修を行っています。 そして Hitachi Embedded Workshop (HEW) Ver.2.0 を使っているのですが前まではちゃんとビルドできたものができなくなってしまいました。 CドライブのHEWフォルダの中身を少しいじったせいかもしれません どなたかお力をお貸し下さい。 ちなみにエラーメッセージが phase H8s,H8/300 c/c++ Library Generator Starting C3300(F) cannot open internal file Library Generator Abort Build stopped - Fatal Error 1Error,0Warnings と出てきます。 ちなみに環境はウィンドウズXPでC言語で書いています。 どなたか少しでもわかる方お願いします。 足らなければ補足します

  • リンカのエラー

    SH-7144Fマイコンの開発をしています。 リンカで以下のようなエラーが出て困っています。 L2310 (E) Undefined external symbol "_set_imask_ccr" referenced in "C:\Users\***\Desktop\***\***\Debug\isac.obj" machine.hはincludeしていますし、何が原因かわかりません。 IDEはHEW4を使用しています。 何方かお願いします。

  • CGIへのコンパイルエラー

    初めまして。プログラミング暦はほとんどありません。javaを少しかじった程度です。今回Ajaxへ挑戦しようと思い、 http://itpro.nikkeibp.co.jp/article/COLUMN/20060115/227278/?ST=nettech の予測補完インタフェースを作成しよとしています。 環境はfedoracore5でXPからのputyからの遠隔です。 complete.cをcomplete.cgiへコンパイルするときに、 [root@localhost html]# gcc -Wall -O2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include complete.c -o complete.cgi -lglib-2.0 -lsary -lpthread complete.c:1: error: stray ‘\357’ in program complete.c:1: error: stray ‘\273’ in program complete.c:1: error: stray ‘\277’ in program complete.c:1: error: stray ‘#’ in program complete.c:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token In file included from complete.c:2: /usr/include/string.h:39: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/string.h:43: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/string.h:52: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/string.h:59: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/string.h:62: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/string.h:66: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/string.h:88: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/string.h:96: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/string.h:102: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/string.h:109: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘strxfrm’ /usr/include/string.h:184: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘strcspn’ /usr/include/string.h:188: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘strspn’ /usr/include/string.h:242: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘strlen’ /usr/include/string.h:270: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/string.h:288: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/string.h:292: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/string.h:296: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/string.h:299: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/string.h:329: error: expected declaration specifiers or ‘...’ before ‘size_t’ In file included from /usr/include/string.h:417, from complete.c:2: /usr/include/bits/string2.h:969: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__strcspn_c1’ /usr/include/bits/string2.h:971: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__strcspn_c1’ /usr/include/bits/string2.h:979: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__strcspn_c2’ /usr/include/bits/string2.h:982: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__strcspn_c2’ /usr/include/bits/string2.h:991: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__strcspn_c3’ /usr/include/bits/string2.h:994: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__strcspn_c3’ とエラーがでます。どうしたらいいでしょうか?(文字数の関係で半分しか掲載できませんでした。)よろしくお願いいたします。

    • ベストアンサー
    • CGI
  • エラーがわかりません、、

    以下のプログラムを入力したときに以下のえらーがでます。 List13-4.c: In function ‘get_data’: List13-4.c:18: error: expected expression before ‘)’ token 18行目を探すのですが、自力では見つけられません。もしかしたら 別のところが間違っていて18行目がエラーと出ているのかなと思っています。ならいたてですぐにわかるようなミスかもしれないですが、よろしくお願いします。 #include <stdio.h> #include <time.h> char data_file[] = "datetime.data"; void get_data(void) { FILE *fp; if((fp = fopen(data_file,"r")) == NULL){ printf("本プログラムを実行するのは初めてですね\n"); } else{ int year,month,day,h,m,s; fscanf(fp,"%d %d %d %d %d %d",&year,&month,&day,&h,&m,&s); printf("前回は%d年%d月%d日%d時%d分%d秒でした\n",year,month,day,h,m,s,); fclose(fp); } } void put_data(void) { FILE *fp; time_t t; struct tm *local; time(&t); local = localtime(&t); if((fp = fopen(data_file,"w")) == NULL) printf("\aファイルをオープンできません\n"); else{ fprintf(fp,"%d %d %d %d %d %d\n", local->tm_year + 1900,local->tm_mon + 1 ,local->tm_mday, local->tm_hour, local->tm_min, local->tm_sec); fclose(fp); } } int main(void) { get_data(); put_data(); return(0); }

  • VC++2005でLAPACKを使用するとエラーが出る

    タイトルの通りなのですが,VC++2005でLAPACKを使用するとエラーが出て,困っています. vc\include\clapack.h(1486) : error C2144: 構文エラー : 'char' は ')' によって先行されなければなりません。 vc\include\clapack.h(1486) : error C2144: 構文エラー : 'char' は ';' によって先行されなければなりません。 vc\include\clapack.h(1486) : warning C4091: '' : 変数が何も宣言されていないときは、'char' の左辺を無視します。 vc\include\clapack.h(1486) : error C2143: 構文エラー : ';' が ',' の前にありません。 vc\include\clapack.h(1486) : error C2059: 構文エラー : ',' vc\include\clapack.h(1486) : error C2059: 構文エラー : ')' vc\include\clapack.h(2861) : error C2144: 構文エラー : 'char' は ')' によって先行されなければなりません。 vc\include\clapack.h(2861) : error C2144: 構文エラー : 'char' は ';' によって先行されなければなりません。 vc\include\clapack.h(2861) : warning C4091: '' : 変数が何も宣言されていないときは、'char' の左辺を無視します。 vc\include\clapack.h(2861) : error C2143: 構文エラー : ';' が ',' の前にありません。 vc\include\clapack.h(2861) : error C2059: 構文エラー : ',' vc\include\clapack.h(2861) : error C2059: 構文エラー : ')' 主にhttp://sakura.math.kyushu-u.ac.jp/wiki/index.php?%E8%A8%88%E7%AE%97%E6%A9%9F%E8%A8%AD%E5%AE%9A%2FCLAPACKを参考にして作成しているのですが・・・上手くいきません.詳しい方,ご教授お願い致します.