SOS EDS バージョン 13.0 およびバージョン 13.1 Alteraの問題のため、セミホストでないアプリケーションを構築するために必要なコードがありません。
この問題を回避するには、以下の手順に従って必要なスプリンクファイルをダウンロードし、セミホスティングを無効にするためにスクリプトを更新してください。
SoC EDS 13.0Sp1 のAltera-SoCFPGA-HardwareLib-GNU.gnu.gz サンプルに基づく Makefile およびスプリントスクリプトの例は、以下のリンクからダウンロードできます。 ExampleFiles_nonSemiHosted.zip (altera-socfpga.ld、Makefile、reset.s)
Altera例をテンプレートとして使用して、セミホスト以外のアプリケーションを有効にする手順
- reset.o をダウンロード:ExampleFiles_nonSemiHosted.zip
- 既存のAlteraスクリプション・スクリプトのアルテラ-socfpga-hosted.ld をコピー / バックアップする
- コンパイル・フラグを変更する
以前は:-lcs3hosted
後:-lcs3unhosted: GROUP(-lgcc -lc -lcs3 -lcs3unhosted -lcs3arm)
- 次のコードセクションをコメントアウトまたは削除します。
/* Enable arm semihosting */
EXTERN(__auto_semihosting) /* force exit to be picked up in a hosted or os environment */
EXTERN (exit atexit) - Makefile をアップデートして reset.o をコンパイルし、ステップ 2 から 4 のスクリプティング・スクリプトの更新をポイントします。
#Assembler Flags
AFLAGS := -g -O0 -mfloat-abi=soft -march=armv7-a -mtune=cortex-a9 -mcpu=cortex-a9 -x assembler
#Assembler source files
A_SRC := reset.s
#Original Linker script
#LINKER_SCRIPT := altera-socfpga_hosted.ld
#Link to updated linker script for non-semihosted
LINKER_SCRIPT := altera-socfpga.ld
#Clause to compile reset.o
reset.o:
-c reset.s -o reset.o
#Updated linker line to add dependency for reset.o
: reset.o
-T reset.o -o
-d > .objdump
> .map
注: Makefiles を編集する際には、タブとスペースの規則が正しいことを確認してください。
この問題は、SOC EDS バージョン 14.0 から修正されました。