-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
8,795 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
# | ||
# @(#) $Id: Makefile.target 2709 2015-11-22 10:35:14Z ertl-honda $ | ||
# | ||
|
||
# | ||
# Makefile のターゲット依存部(SAMD21用) | ||
# | ||
|
||
# | ||
# ボード名,プロセッサ名,開発環境名の定義 | ||
# | ||
BOARD = samd21 | ||
PRC = arm_m | ||
TOOL = gcc | ||
|
||
# | ||
# コアタイプ | ||
# | ||
CORE_TYPE = CORTEX_M0PLUS | ||
|
||
# | ||
# FPUを使用するか | ||
# | ||
#FPU_USAGE = | ||
|
||
# | ||
# Atmel Studioで生成したライブラリの置き場所 | ||
# | ||
HARMONYDIR = $(TARGETDIR)/lib | ||
|
||
# | ||
# FPUのABI | ||
# | ||
FPU_ABI = hard | ||
|
||
# | ||
# コンパイルオプション | ||
# | ||
INCLUDES := $(INCLUDES) -I$(TARGETDIR) \ | ||
-I"$(HARMONYDIR)" \ | ||
|
||
COPTS := $(COPTS) | ||
LDFLAGS := $(LDFLAGS) | ||
CDEFS := $(CDEFS) | ||
CFG1_OUT_LDFLAGS := -nostdlib $(CFG1_OUT_LDFLAGS) | ||
|
||
# | ||
# ファイルサイズ削減のためのオプション | ||
# | ||
COPTS := $(COPTS) -ffunction-sections -fdata-sections | ||
LDFLAGS := $(LDFLAGS) -Wl,--gc-sections | ||
|
||
# | ||
# カーネルに関する定義 | ||
# | ||
KERNEL_DIR := $(KERNEL_DIR) $(TARGETDIR) \ | ||
$(HARMONYDIR) | ||
|
||
KERNEL_ASMOBJS := $(KERNEL_ASMOBJS) | ||
KERNEL_COBJS := $(KERNEL_COBJS) target_config.o core_timer.o \ | ||
target_vector.o clock.o | ||
|
||
# | ||
# システムサービスに関する定義 | ||
# | ||
SYSSVC_DIR := $(SYSSVC_DIR) | ||
SYSSVC_COBJS := $(SYSSVC_COBJS) target_serial.o | ||
|
||
# | ||
# コンフィギュレータ関係の変数の定義 | ||
# | ||
CFG_TABS := $(CFG_TABS) --cfg1-def-table $(TARGETDIR)/target_def.csv | ||
|
||
# | ||
# トレースログに関する設定 | ||
# | ||
ifeq ($(ENABLE_TRACE),true) | ||
COPTS := $(COPTS) | ||
CDEFS := $(CDEFS) -DTOPPERS_ENABLE_TRACE | ||
KERNEL_DIR := $(KERNEL_DIR) $(SRCDIR)/arch/logtrace | ||
KERNEL_COBJS := $(KERNEL_COBJS) trace_config.o trace_dump.o | ||
endif | ||
|
||
# | ||
# GNU開発環境のターゲットアーキテクチャの定義 | ||
# | ||
GCC_TARGET = arm-none-eabi | ||
|
||
# | ||
# リンカスクリプトの定義 | ||
# | ||
LDSCRIPT = $(TARGETDIR)/samd21.ld | ||
|
||
# | ||
# スタートアップモジュールに関する定義 | ||
# | ||
# samd21.ldに「STARTUP(start.o)」を記述したため,スタートアップモジュー | ||
# ルの名前をHIDDEN_OBJSに定義する. | ||
# | ||
#HIDDEN_OBJS = start.o | ||
# | ||
#$(HIDDEN_OBJS): %.o: %.S | ||
# $(CC) -c $(CFLAGS) $(KERNEL_CFLAGS) $< | ||
# | ||
#$(HIDDEN_OBJS:.o=.d): %.d: %.S | ||
# @$(PERL) $(SRCDIR)/utils/makedep -C $(CC) \ | ||
# -O "$(CFLAGS) $(KERNEL_CFLAGS)" $< >> Makefile.depend | ||
# | ||
#LDFLAGS := $(LDFLAGS) | ||
|
||
# | ||
# 依存関係の定義 | ||
# | ||
cfg1_out.c: $(TARGETDIR)/target_def.csv | ||
kernel_cfg.timestamp: $(TARGETDIR)/target.tf | ||
$(OBJFILE): $(TARGETDIR)/target_check.tf | ||
|
||
# | ||
# オフセットファイル生成のための定義 | ||
# | ||
OFFSET_TF := $(TARGETDIR)/target_offset.tf | ||
|
||
# | ||
# プロセッサ依存部のインクルード | ||
# | ||
include $(SRCDIR)/arch/$(PRC)_$(TOOL)/common/Makefile.core |
Oops, something went wrong.