次のようなPICアセンブリコードのコンパイルエラーの解決方法です。
"C:¥Program Files (x86)¥Microchip¥xc8¥v1.38¥bin¥xc8.exe" --pass1 … make[2]: *** No rule to make target 'build/default/production/xyz.obj', needed by 'dist/default/production/lcd.X.production.hex'. Stop. make[2]: *** Waiting for unfinished jobs.... make[1]: *** [.build-conf] Error 2 make: *** [.build-impl] Error 2 make[2]: Leaving directory 'C:/Users/sTea/Documents/MPLABXProjects/lcd.X' nbproject/Makefile-default.mk:84: recipe for target '.build-conf' failed make[1]: Leaving directory 'C:/Users/sTea/Documents/MPLABXProjects/lcd.X' nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed BUILD FAILED (exit value 2, total time: 3s)
それは、、、
ファイル拡張子を”.s”から”.asm”に変える、です。
どうも、”.s”はxc16とxc32用で、xc8では”.asm”を使うようです。
手順は、
- [Projects]ウィンドウから”xyz.s”を右クリックメニュー[Remove From Project]で削除。
- [Files]ウィンドウで”xyz.s”から右メニュー[Properties]を開き、[Extension]を”s”から”asm”に変更。
- [Projects]ウィンドウに戻り、[Source Files]を右クリックし、[Add Existing Item…]から”xyz.asm”を選択。
- 念のため[Clean And Build Main Project]を実行。
原因は[Source Files]の右メニュー[New][pic_8b_func.asm…]で開くNew File Wizardの初期値が”.s”に成っていることであろう。
デフォルトとして設定できるようなので設定して置くべきか?(xc16とxc32でも”.asm”が使えるなら)
eid=950642