Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
7 years, 5 months ago.
unrecognized option '-T'のエラーについて
お世話になります。高橋と申します。mbedのコードをダウンロード後にlpcxpresso用にExportした後に作成されたXXXX_lpcxpresso_lpc11u35 (or 1768)_501.zipを解凍後にlpcxpresso ver.3.0_1023にimportした後にbuildしたのですが以下のエラーが出ます。
-L"C:\nxp\LPC11U35_mbed_C++\Camera-XBee-Wifi\mbed\platform" -Xlinker -Map="Camera-XBee-Wifi.map" -Xlinker gc-sections -mcpu=cortex-m0 -mthumb -T "" -o"Camera-XBee-Wifi.axf" ./main.o ./TextLCD/TextLCD.o ./CameraC1098/CameraC1098.o ./CameraC1098/SerialBuffered.o
c:/nxp/lpcxpresso_4.3.0_1023/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.5.1/../../../../arm-none-eabi/bin/ld.exe: unrecognized option '-T'
c:/nxp/lpcxpresso_4.3.0_1023/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.5.1/../../../../arm-none-eabi/bin/ld.exe: use the help option for usage information
collect2: ld returned 1 exit status
make: * [Camera-XBee-Wifi.axf] Error 1
特にunrecognized option '-T'のエラーが必ず出ます。 アドバイス宜しく願います。
1 Answer
7 years, 5 months ago.
LPCXpresso IDEにexportしたプロジェクトで発生する問題は、こちらのissueに登録されています(現時点では未だ解決されていません)。
https://github.com/ARMmbed/mbed-os/issues/2448
暫定的な対策としては、プロジェクトに含まれているmbedライブラリを削除し、代わりにmbed-devライブラリを使ったプロジェクトをexportします。これによって、オプションの問題は発生しません。
リンク時にの多重定義エラーが発生すると思いますが、startup_LPC11xx.cpp内の以下の関数定義をコメントアウトすることで正常にリンクすることが出来ます(こちらの問題は別途修正します)。
int __aeabi_atexit(void *object, void (*destructor)(void *), void *dso_handle) { return 0; }