AVR Studioでコンパイルエラーが発生しました

このQ&Aのポイント
  • AVR Studioでビルドを行った際にコンパイルエラーが発生しました。
  • エラーメッセージには、fork: Resource temporarily unavailableという内容が含まれています。
  • ビルド結果のエラーが問題になっていますが、実行ファイルは正常に動作しているようです。解決方法を教えていただきたいです。
回答を見る
  • ベストアンサー

AVR studioでコンパイルエラーが出る。

現在windows8.1のノートPCにAVR Studio4.19とAVR GCCをインストールしてビルドを行ったところ、次のようなエラーが出てきました。 -----(エラー内容)------------------------------------------------------------ Build started 15.4.2014 at 17:48:51 0 [main] sh 8956 sync_with_child: child 10164(0x158) died before initialization with status code 0xC0000142 37839 [main] sh 8956 sync_with_child: *** child state waiting for longjmp /usr/bin/sh: fork: Resource temporarily unavailable avr-objcopy -O ihex -R .eeprom -R .fuse -R .lock -R .signature **********.elf **********.hex avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 --no-change-warnings -O ihex **********.elf **********.eep || exit 0 0 [main] sh 8712 sync_with_child: child 5884(0x150) died before initialization with status code 0xC0000142 4609 [main] sh 8712 sync_with_child: *** child state waiting for longjmp /usr/bin/sh: fork: Resource temporarily unavailable make: [**********.eep] Error 128 (ignored) avr-objdump -h -S **********.elf > **********.lss 0 [main] sh 6836 sync_with_child: child 7088(0x150) died before initialization with status code 0xC0000142 70590 [main] sh 6836 sync_with_child: *** child state waiting for longjmp /usr/bin/sh: fork: Resource temporarily unavailable make: *** [**********.lss] Error 128 Build failed with 1 errors and 0 warnings... ------------------------------------------------------------------------- エラーというのが出ていたのですが、実行ファイルの”.hex”ファイルは出力されていました。 そして、それをATmega88のマイコンにダウンロードしてみたのですが、特に問題なく動いているのですが、今回のビルド結果でエラーとして問題になっていることと、解決方法とかご教示頂きますよう、よろしくお願い致します。

質問者が選んだベストアンサー

  • ベストアンサー
noname#195576
noname#195576
回答No.1

error 128 と、エラーコードが出てるのだからその意味を ヘルプなりマニュアルで調べましょう。 [ignoerd]、つまり「無視した」とも表示されてるので 甚大な影響がない類のエラーなのでしょう。何かの定義が必須なのにないから 無視してデフォルト値を使っちゃったよん、とか。

techhouse
質問者

お礼

回答頂きありがとうございます。 助かります。今"error 128"の内容について調べているのですが、AVR GCCのコンパイラのマニュアルは http://cega.jp/avr-libc-jp/pages.html こちらのサイトで良いのでしょうか? 引き続きご教示頂けると助かります。

関連するQ&A

  • avr studio4 について

    #include <avr/io.h> #include "adc.h" #define SENSOR_IR 1 #define SENSOR_PORT PORTC #define SENSOR_DDR DDRC #define LED_PORT PORTD #define LED_DDR DDRD // 点灯パターン 16x8ドット unsigned int pat[]={ //123456789ABCDEFG 0b0011010001011100, 0b0101010001010010, 0b1001010001010010, 0b1001001010011100, 0b1111001010010100, 0b1001001010010100, 0b1001000100010010, 0b1001000100010010 }; int main(void) { #define DOTMAX (16*3) #define THRESHOLD 200 #define SHIFTCNT 50 int adc; int adc_back; int line; char iso; char edge=0; unsigned int cnt; unsigned int cnt_mst; unsigned int bitnum; int turn; ad_init(0); turn=0; iso=0; SENSOR_DDR |= (1<<SENSOR_IR); SENSOR_PORT |= (1<<SENSOR_IR); LED_DDR |= 0xff; turn=10000; while(turn-->0); cnt = 0; cnt_mst = 1; while(1) { bitnum = (DOTMAX * cnt) / cnt_mst; bitnum += iso; bitnum &= 0xf; // bitnum = bitnum mod 16 for(line=0; line<8; line++){ if((1<<bitnum) & pat[line]) LED_PORT |=(1<<line); else LED_PORT &= ~(1<<line); } cnt++; adc_back = adc; adc = ad_get(); if(edge==0) { if(adc < (adc_back-THRESHOLD)) { edge = ~edge; cnt_mst = cnt-(cnt/(DOTMAX*2)); cnt=0; turn++; if(turn >= SHIFTCNT){ turn=0; iso =(iso-1)& 0xf; } } }else{ if(adc > (adc_back+THRESHOLD)) { edge = ~edge; } } } return 0; } と入力してビルドしたところ Build started 5.2.2007 at 02:21:46 avr-gcc -mmcu=atmega168 -Wall -gdwarf-2 -std=gnu99 -DF_CPU=1000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT loopled.o -MF dep/loopled.o.d -c ../loopled.c ../loopled.c: In function 'main': ../loopled.c:87:24: warning: 'adc' may be used uninitialized in this function [-Wmaybe-uninitialized] avr-gcc -mmcu=atmega168 -Wall -gdwarf-2 -std=gnu99 -DF_CPU=1000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT adc.o -MF dep/adc.o.d -c ../adc.c avr-gcc -mmcu=atmega168 -Wl,-Map=loopled.map loopled.o adc.o -o loopled.elf avr-objcopy -O ihex -R .eeprom -R .fuse -R .lock -R .signature loopled.elf loopled.hex avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 --no-change-warnings -O ihex loopled.elf loopled.eep || exit 0 avr-objdump -h -S loopled.elf > loopled.lss AVR Memory Usage ---------------- Device: atmega168 Program: 526 bytes (3.2% Full) (.text + .data + .bootloader) Data: 16 bytes (1.6% Full) (.data + .bss + .noinit) Build succeeded with 1 Warnings... とでてきました どうすればビルドできますか?

  • AVRマイコン ビルドエラー

    AVRマイコンを #include <avr/io.h> int main(void) { DDRD =0b11111111; PORTD=0b11111111; } で、ビルドしようとしているのですが、 ../test3.c:0: error: MCU `atmega88p' supported for assembler only と、その後に ../test3.c:5: error: `DDRD' undeclared (first use in this function) 等と、エラーが出てビルド出来ません。 どうすればいいのでしょうか? 回答お願いします。

  • AVR Studio4 の使用方法

    AVR Studio4 をダウンロードし C言語でプログラムを作りたいのですが WinAVR もいれ AVR Gccで製作しました。 簡単な テスト サンプルをコピー ビルドすると make: Makefile: No such file or directory make: *** No rule to make target `Makefile'. Stop. Build failed with 2 errors and 0 warnings... が表示され コンパイルできません。  C言語プログラム すべて このようなエラーが出て コンパイルできません。  どのように直せば C言語プログラム受け付けてくれるのでしょうか?

  • ubuntuでのコンパイル

    Linux超初心者です。 今回困っていることはubutuでコンパイルができないことです。 ubuntuのバージョンは7.10 Gutsy Gibbonです。 教えてgooでも何個かそれに関する質問があったのですがそれを行ってもだめでした。 まず、ubuntuには開発環境が入っていないということでbuild-essentialをインストールしようとおもいました。 $ sudo apt-get install build-essential と入力したところ E: ロック /var/lib/dpkg/lock が取得できませんでした - open (11 Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? と返ってきてインストールできませんでした。 一応GUI画面でもやっとこうと思いでやりましたがSynapticに検索にすら引っかからず。。。 それで今度はubuntuに関するサイトからbuild-essentialのインストーラーをミラーサイトからダウンロードしてインストールを行ったのですが Error:Dependency is not satisfible: libc6-dev|libc-dev というエラーメッセージがでてまた無理でした。 それでそのエラーメッセージにあるlibc6-devをインストールしないといけないのかと思い。これも行ってみました。 ~$ sudo apt-get install libc E: ロック /var/lib/dpkg/lock が取得できませんでした - open (11 Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? とまた同じエラー $ sudo apt-get install libc6 E: ロック /var/lib/dpkg/lock が取得できませんでした - open (11 Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? こちらも同じエラー。 よくわからないですがwhichというコマンドもためしておきました。 ~$ which gcc /usr/bin/gcc ディレクトリ指定されるって事はコンパイラ入ってるのかと思い、試しにhello worldをコンパイルしてみましたが、 $ gcc hello.c hello.c:6:19: error: stdio.h: No such file or directory hello.c: In function ‘main’: hello.c:10: 警告: incompatible implicit declaration of built-in function ‘printf’ だめでした。 書いてる情報が少なかったらごめんなさい。 とりあえず困っているのでよろしくお願いします。

  • 初めての質問ですがよろしくお願いいたします。

    初めての質問ですがよろしくお願いいたします。 レンタルサーバーを借りまして、使ってますがよくダウンします。 サポートに連絡をしましたら、下記内容の連絡が来ました。 /www/logs/error_log:[Thu Apr 22 11:34:39 2010] [error] (35)Resource temporarily unavailable: fork: Unable to fork new process /www/logs/error_log:[Thu Apr 22 11:34:52 2010] [error] (35)Resource temporarily unavailable: fork: Unable to fork new process /www/logs/error_log:[Thu Apr 22 11:34:59 2010] [error] (35)Resource temporarily unavailable: fork: Unable to fork new process そして、リソースが足りないからグレードアップをすすめてきましたが、いかがでしょうか? お力をお貸しください、ご協力をお願いします。

  • AVRマイコン開発

    #include <avr/io.h> int main(void) { volatile long i; PORTB = 0xff; DDRB = 0xff; while(1) { P1NB |= _BV(PB0); for (i = 5000; i > 0; i--); } return 0; } Build failed... No build tools defined. こんなエラーがでたのですがどこが間違っているのでしょうか?

  • Win10 Avr Build エラー

    Win10 AvrStudio4.19 で ASM は Build Run Enter で 正常ですが GCC を Build Run Enter とすると " AVRStudio MFC Application は動作を停止しました。{プログラムの終了}" と表示が でる HEX ファイルは一応できているがシミレーションに移れない。アプリは AvrStudio4.19 をインストール してから-toolchain-3.4.1 を インストール してあります。Web で ビルドエラーで検索すると 結果はStudio4をインストしtoolchain-3.4.1 をインストすれば GCC を 正常にコンパイルできました。の内容で 終わっているもの ばかりです。AVRStudio MFC Application は動作を停止しました。ここの異常を修復する方法はないでしょうか。 試した GCC ファイル 下記 //**TI2313 #include <avr/io.h> int main() { DDRD = 0b00000001; while(1) { PORTD = 0b00000001; } return 0; }

  • [GCC]libgccをコンパイルするのに適切なヘッダファイルは?

    ルネサスSH系CPU用のGCCクロスコンパイラをmakeしようとしています。 ところどころパッチを当てながら、libgccをコンパイルするstageまで来たのですが、その途中でエラーになって先に進めません。 エラーとソースコードから読み取れる範囲では、どうもpthread.hで定義されるべきpthread_tなどの構造体が定義されていないか、または、#if~#endifブロックでスキップされてしまっているようです。 今回はクロスコンパイラ用ということで、--with-headersオプションを使って、newlib用のヘッダファイルを使用してビルドしようとしていますが、newlibのヘッダファイルはlibgccのビルド用としては不適当なのでしょうか?他におすすめできるライブラリヘッダはありますでしょうか? (環境) ホストOS:cygwin-i686 ターゲット:sh-linux (elf) ビルドしようとしているGCC:4.3.3 binutils:2.19.51 newlib:1.19.0 (コンフィグレーション) configure --target=sh-linux --prefix=/usr --with-gnu-as --with-gnu-ld --with-headers=(newlibのlibc/include) --with-newlib 以上です。よろしくお願いいたします。

  • プロセス多重起動エラー(「fork 関数が失敗しました。」)について

    AIXのサーバで検知した異常をAIX側からhp-uxのサーバのシェルを起動することで通知するという仕組みを構築しました。 検証で多数の異常を発生させたところ、 以下ようなメッセージがAIX側で出力されました。 cannot accept event with [sh: fork 関数が失敗しました。すでに多くのプロセスが存在します。] cannot accept event with [ remshd: fork: Resource temporarily unavailable] このメッセージはシェルを起動したサーバとシェルが実行されるサーバの どちらから出力されたメッセージなのでしょうか。 両サーバのmaxuprcとnprocを確認してみましたが、 どちらもnprocの制限値まで余裕があり、 メッセージ元がどちらのサーバなのか切り分けができない状態です。 どなたか教えてください。 よろしくお願いします。

  • Androidコンパイル時のエラーについて

    Androidの開発中に下記エラーが出ます。 対処の解る方がおりましたらば教えていただけますでしょう 宜しくお願いいたします。 詳細内容及びソース、XML エラー 2011-05-11 16:09:27 - BMICalculator2] res\layout\main.out.xml:0: Originally defined here. [2011-05-11 16:09:27 - BMICalculator2] C:\workspace\BMICalculator2\res\values\strings.out.xml:1: エラー: Error parsing XML: no element found [2011-05-11 16:09:27 - BMICalculator2] C:\workspace\BMICalculator2\res\layout\main.out.xml:1: エラー: Error parsing XML: no element found [2011-05-11 16:09:27 - BMICalculator2] C:\workspace\BMICalculator2\res\layout\main.xml:38: エラー: エラー: No resource found that matches the given name (at 'id' with value '@id+/button_calculate'). [2011-05-11 16:09:28 - BMICalculator2] res\layout\main.xml:0: エラー: Resource entry main is already defined. [2011-05-11 16:09:28 - BMICalculator2] res\layout\main.out.xml:0: Originally defined here. [2011-05-11 16:09:28 - BMICalculator2] C:\workspace\BMICalculator2\res\values\strings.out.xml:1: エラー: Error parsing XML: no element found [2011-05-11 16:09:28 - BMICalculator2] C:\workspace\BMICalculator2\res\layout\main.out.xml:1: エラー: Error parsing XML: no element found [2011-05-11 16:09:28 - BMICalculator2] C:\workspace\BMICalculator2\res\layout\main.xml:38: エラー: エラー: No resource found that matches the given name (at 'id' with value '@id+/button_calculate'). ソース package com.mamezou.android.bmi.alc; import android.app.Activity; import android.os.Bundle; public class BMICalculatorActivity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } } string.XML <?xml version="1.0" encoding="utf-8"?> <resources> <string name="hello">Hello.Wopld.BMICalculatorActivity</string> <string name="app_name">BMI Calculator</string> <string name="label_description">BMIを計算します</string> <string name="label_height">身長(cm)</string> <string name="label_weight">体重(kg)</string> <string name="button_calculate">計算</string> </resources> main.XML <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/label_description" /> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/label_height" /> <EditText android:id="@+id/text_height" android:layout_width="fill_parent" android:layout_height="wrap_content" android:numeric="integer" android:maxLength="3" android:text="160" /> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/label_weight" /> <EditText android:id="@+id/text_weight" android:layout_width="fill_parent" android:layout_height="wrap_content" android:numeric="integer" android:maxLength="3" android:text="50" /> <Button android:id="@+id/button_calculate" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/button_calculate" /> </LinearLayout>