mirror of
https://github.com/arduino/Arduino.git
synced 2025-03-15 12:29:26 +01:00
Merge branch 'master' into boards-cputype
This commit is contained in:
commit
9125436bb0
@ -163,9 +163,9 @@ shiftOut KEYWORD2 ShiftOut
|
|||||||
tone KEYWORD2 Tone
|
tone KEYWORD2 Tone
|
||||||
|
|
||||||
Serial KEYWORD3 Serial
|
Serial KEYWORD3 Serial
|
||||||
|
Serial1 KEYWORD3 Serial
|
||||||
Serial2 KEYWORD3 Serial
|
Serial2 KEYWORD3 Serial
|
||||||
Serial3 KEYWORD3 Serial
|
Serial3 KEYWORD3 Serial
|
||||||
Serial4 KEYWORD3 Serial
|
|
||||||
SerialUSB KEYWORD3 Serial
|
SerialUSB KEYWORD3 Serial
|
||||||
begin KEYWORD2 Serial_Begin
|
begin KEYWORD2 Serial_Begin
|
||||||
end KEYWORD2 Serial_End
|
end KEYWORD2 Serial_End
|
||||||
|
@ -1,22 +1,5 @@
|
|||||||
|
|
||||||
arduino_due_x.name=Arduino Due Dev. Ed.
|
arduino_due_x_dbg.name=Arduino Due Dev. Ed. (Programming port)
|
||||||
arduino_due_x.upload.tool=bossac
|
|
||||||
arduino_due_x.upload.protocol=sam-ba
|
|
||||||
arduino_due_x.upload.maximum_size=524288
|
|
||||||
arduino_due_x.upload.use_1200bps_touch=true
|
|
||||||
arduino_due_x.upload.wait_for_upload_port=true
|
|
||||||
arduino_due_x.upload.native_usb=true
|
|
||||||
arduino_due_x.build.mcu=cortex-m3
|
|
||||||
arduino_due_x.build.f_cpu=84000000L
|
|
||||||
arduino_due_x.build.core=arduino
|
|
||||||
arduino_due_x.build.extra_flags=-D__SAM3X8E__ -mthumb -DUSB_PID={build.pid} -DUSB_VID={build.vid} -DUSBCON
|
|
||||||
arduino_due_x.build.ldscript=linker_scripts/gcc/flash.ld
|
|
||||||
arduino_due_x.build.variant=arduino_due_x
|
|
||||||
arduino_due_x.build.variant_system_lib=libsam_sam3x8e_gcc_rel.a
|
|
||||||
arduino_due_x.build.vid=0x2341
|
|
||||||
arduino_due_x.build.pid=0x003e
|
|
||||||
|
|
||||||
arduino_due_x_dbg.name=Arduino Due Dev. Ed. (Debug port)
|
|
||||||
arduino_due_x_dbg.upload.tool=bossac
|
arduino_due_x_dbg.upload.tool=bossac
|
||||||
arduino_due_x_dbg.upload.protocol=sam-ba
|
arduino_due_x_dbg.upload.protocol=sam-ba
|
||||||
arduino_due_x_dbg.upload.maximum_size=524288
|
arduino_due_x_dbg.upload.maximum_size=524288
|
||||||
@ -33,3 +16,20 @@ arduino_due_x_dbg.build.variant_system_lib=libsam_sam3x8e_gcc_rel.a
|
|||||||
arduino_due_x_dbg.build.vid=0x2341
|
arduino_due_x_dbg.build.vid=0x2341
|
||||||
arduino_due_x_dbg.build.pid=0x003e
|
arduino_due_x_dbg.build.pid=0x003e
|
||||||
|
|
||||||
|
arduino_due_x.name=Arduino Due Dev. Ed. (Native port)
|
||||||
|
arduino_due_x.upload.tool=bossac
|
||||||
|
arduino_due_x.upload.protocol=sam-ba
|
||||||
|
arduino_due_x.upload.maximum_size=524288
|
||||||
|
arduino_due_x.upload.use_1200bps_touch=true
|
||||||
|
arduino_due_x.upload.wait_for_upload_port=true
|
||||||
|
arduino_due_x.upload.native_usb=true
|
||||||
|
arduino_due_x.build.mcu=cortex-m3
|
||||||
|
arduino_due_x.build.f_cpu=84000000L
|
||||||
|
arduino_due_x.build.core=arduino
|
||||||
|
arduino_due_x.build.extra_flags=-D__SAM3X8E__ -mthumb -DUSB_PID={build.pid} -DUSB_VID={build.vid} -DUSBCON
|
||||||
|
arduino_due_x.build.ldscript=linker_scripts/gcc/flash.ld
|
||||||
|
arduino_due_x.build.variant=arduino_due_x
|
||||||
|
arduino_due_x.build.variant_system_lib=libsam_sam3x8e_gcc_rel.a
|
||||||
|
arduino_due_x.build.vid=0x2341
|
||||||
|
arduino_due_x.build.pid=0x003e
|
||||||
|
|
||||||
|
@ -1,42 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (c) 2012 Google, Inc. All right reserved.
|
|
||||||
#
|
|
||||||
# This library is free software; you can redistribute it and/or
|
|
||||||
# modify it under the terms of the GNU Lesser General Public
|
|
||||||
# License as published by the Free Software Foundation; either
|
|
||||||
# version 2.1 of the License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This library is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
# See the GNU Lesser General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU Lesser General Public
|
|
||||||
# License along with this library; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
#
|
|
||||||
|
|
||||||
SUBMAKE_OPTIONS=--no-builtin-rules --no-builtin-variables --no-print-directory
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
|
||||||
# Rules
|
|
||||||
#-------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
all: adk2
|
|
||||||
|
|
||||||
.PHONY: adk2
|
|
||||||
adk2:
|
|
||||||
@echo ------------------------------------------------------------------------------------
|
|
||||||
@echo --- Making variant adk2
|
|
||||||
@$(MAKE) DEBUG=1 $(SUBMAKE_OPTIONS) -f libvariant_adk2.mk
|
|
||||||
# @$(MAKE) $(SUBMAKE_OPTIONS) -f libvariant_adk2.mk
|
|
||||||
@echo ------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
.PHONY: clean
|
|
||||||
clean:
|
|
||||||
@echo ------------------------------------------------------------------------------------
|
|
||||||
@echo --- Cleaning variant adk2
|
|
||||||
@$(MAKE) DEBUG=1 $(SUBMAKE_OPTIONS) -f libvariant_adk2.mk $@
|
|
||||||
# @$(MAKE) $(SUBMAKE_OPTIONS) -f libvariant_adk2.mk $@
|
|
||||||
@echo ------------------------------------------------------------------------------------
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (c) 2011 Arduino. All right reserved.
|
|
||||||
#
|
|
||||||
# This library is free software; you can redistribute it and/or
|
|
||||||
# modify it under the terms of the GNU Lesser General Public
|
|
||||||
# License as published by the Free Software Foundation; either
|
|
||||||
# version 2.1 of the License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This library is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
# See the GNU Lesser General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU Lesser General Public
|
|
||||||
# License along with this library; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
#
|
|
||||||
|
|
||||||
# Optimization level
|
|
||||||
# -O1 Optimize
|
|
||||||
# -O2 Optimize even more
|
|
||||||
# -O3 Optimize yet more
|
|
||||||
# -O0 Reduce compilation time and make debugging produce the expected results
|
|
||||||
# -Os Optimize for size
|
|
||||||
OPTIMIZATION = -g -O0 -DDEBUG
|
|
@ -1,82 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (c) 2011 Arduino. All right reserved.
|
|
||||||
#
|
|
||||||
# This library is free software; you can redistribute it and/or
|
|
||||||
# modify it under the terms of the GNU Lesser General Public
|
|
||||||
# License as published by the Free Software Foundation; either
|
|
||||||
# version 2.1 of the License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This library is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
# See the GNU Lesser General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU Lesser General Public
|
|
||||||
# License along with this library; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
#
|
|
||||||
|
|
||||||
# Tool suffix when cross-compiling
|
|
||||||
CROSS_COMPILE = $(ARM_GCC_TOOLCHAIN)/arm-none-eabi-
|
|
||||||
|
|
||||||
# Compilation tools
|
|
||||||
AR = $(CROSS_COMPILE)ar
|
|
||||||
CC = $(CROSS_COMPILE)gcc
|
|
||||||
CXX = $(CROSS_COMPILE)g++
|
|
||||||
AS = $(CROSS_COMPILE)as
|
|
||||||
NM = $(CROSS_COMPILE)nm
|
|
||||||
ifeq ($(OS),Windows_NT)
|
|
||||||
RM=cs-rm -Rf
|
|
||||||
else
|
|
||||||
RM=rm -Rf
|
|
||||||
endif
|
|
||||||
|
|
||||||
SEP=\\
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------------------
|
|
||||||
# C Flags
|
|
||||||
|
|
||||||
CFLAGS += -Wall -Wchar-subscripts -Wcomment -Wformat=2 -Wimplicit-int
|
|
||||||
CFLAGS += -Werror-implicit-function-declaration -Wmain -Wparentheses
|
|
||||||
CFLAGS += -Wsequence-point -Wreturn-type -Wswitch -Wtrigraphs -Wunused
|
|
||||||
CFLAGS += -Wuninitialized -Wunknown-pragmas -Wfloat-equal -Wundef
|
|
||||||
CFLAGS += -Wshadow -Wpointer-arith -Wbad-function-cast -Wwrite-strings
|
|
||||||
CFLAGS += -Wsign-compare -Waggregate-return -Wstrict-prototypes
|
|
||||||
CFLAGS += -Wmissing-prototypes -Wmissing-declarations
|
|
||||||
CFLAGS += -Wformat -Wmissing-format-attribute -Wno-deprecated-declarations
|
|
||||||
CFLAGS += -Wpacked -Wredundant-decls -Wnested-externs -Winline -Wlong-long
|
|
||||||
CFLAGS += -Wunreachable-code
|
|
||||||
CFLAGS += -Wcast-align
|
|
||||||
#CFLAGS += -Wmissing-noreturn
|
|
||||||
#CFLAGS += -Wconversion
|
|
||||||
|
|
||||||
CFLAGS += --param max-inline-insns-single=500 -mcpu=cortex-m3 -mthumb -mlong-calls -ffunction-sections -fdata-sections -nostdlib -std=c99
|
|
||||||
CFLAGS += $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) -D$(VARIANT)
|
|
||||||
|
|
||||||
# To reduce application size use only integer printf function.
|
|
||||||
CFLAGS += -Dprintf=iprintf
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------------------
|
|
||||||
# CPP Flags
|
|
||||||
|
|
||||||
CPPFLAGS += -Wall -Wchar-subscripts -Wcomment -Wformat=2
|
|
||||||
CPPFLAGS += -Wmain -Wparentheses -Wcast-align -Wunreachable-code
|
|
||||||
CPPFLAGS += -Wsequence-point -Wreturn-type -Wswitch -Wtrigraphs -Wunused
|
|
||||||
CPPFLAGS += -Wuninitialized -Wunknown-pragmas -Wfloat-equal -Wundef
|
|
||||||
CPPFLAGS += -Wshadow -Wpointer-arith -Wwrite-strings
|
|
||||||
CPPFLAGS += -Wsign-compare -Waggregate-return -Wmissing-declarations
|
|
||||||
CPPFLAGS += -Wformat -Wmissing-format-attribute -Wno-deprecated-declarations
|
|
||||||
CPPFLAGS += -Wpacked -Wredundant-decls -Winline -Wlong-long
|
|
||||||
#CPPFLAGS += -Wmissing-noreturn
|
|
||||||
#CPPFLAGS += -Wconversion
|
|
||||||
|
|
||||||
CPPFLAGS += --param max-inline-insns-single=500 -mcpu=cortex-m3 -mthumb -mlong-calls -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -std=c++98
|
|
||||||
CPPFLAGS += $(OPTIMIZATION) $(INCLUDES) -D$(CHIP)
|
|
||||||
|
|
||||||
# To reduce application size use only integer printf function.
|
|
||||||
CPPFLAGS += -Dprintf=iprintf
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------------------
|
|
||||||
# ASM Flags
|
|
||||||
|
|
||||||
ASFLAGS = -mcpu=cortex-m3 -mthumb -Wall -g $(OPTIMIZATION) $(INCLUDES)
|
|
@ -1,183 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (c) 2012 Google, Inc. All right reserved.
|
|
||||||
#
|
|
||||||
# This library is free software; you can redistribute it and/or
|
|
||||||
# modify it under the terms of the GNU Lesser General Public
|
|
||||||
# License as published by the Free Software Foundation; either
|
|
||||||
# version 2.1 of the License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This library is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
# See the GNU Lesser General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU Lesser General Public
|
|
||||||
# License along with this library; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
#
|
|
||||||
|
|
||||||
# Makefile for compiling libArduino
|
|
||||||
.SUFFIXES: .o .a .c .s
|
|
||||||
|
|
||||||
CHIP=__SAM3X8E__
|
|
||||||
VARIANT=adk2
|
|
||||||
LIBNAME=libvariant_$(VARIANT)
|
|
||||||
TOOLCHAIN=gcc
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
|
||||||
# Path
|
|
||||||
#-------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
# Output directories
|
|
||||||
OUTPUT_BIN = ../../../../../arduino/sam/cores/sam
|
|
||||||
|
|
||||||
# Libraries
|
|
||||||
PROJECT_BASE_PATH = ..
|
|
||||||
SYSTEM_PATH = ../../../../../arduino/sam/system
|
|
||||||
CMSIS_ROOT_PATH = $(SYSTEM_PATH)/CMSIS
|
|
||||||
CMSIS_ARM_PATH=$(CMSIS_ROOT_PATH)/CMSIS/Include
|
|
||||||
CMSIS_ATMEL_PATH=$(CMSIS_ROOT_PATH)/Device/ATMEL
|
|
||||||
#CMSIS_CHIP_PATH=$(CMSIS_ROOT_PATH)/Device/ATMEL/$(CHIP_SERIE)
|
|
||||||
|
|
||||||
ARDUINO_PATH = ../../../../../arduino/sam/cores/sam
|
|
||||||
VARIANT_BASE_PATH = ../../../variants
|
|
||||||
VARIANT_PATH = ../../../variants/$(VARIANT)
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
|
||||||
# Files
|
|
||||||
#-------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#vpath %.h $(PROJECT_BASE_PATH) $(SYSTEM_PATH) $(VARIANT_PATH)
|
|
||||||
vpath %.cpp $(PROJECT_BASE_PATH)
|
|
||||||
|
|
||||||
VPATH+=$(PROJECT_BASE_PATH)
|
|
||||||
|
|
||||||
INCLUDES =
|
|
||||||
#INCLUDES += -I$(PROJECT_BASE_PATH)
|
|
||||||
INCLUDES += -I$(ARDUINO_PATH)
|
|
||||||
INCLUDES += -I$(ARDUINO_PATH)/USB
|
|
||||||
INCLUDES += -I$(SYSTEM_PATH)
|
|
||||||
INCLUDES += -I$(SYSTEM_PATH)/libsam
|
|
||||||
INCLUDES += -I$(VARIANT_BASE_PATH)
|
|
||||||
INCLUDES += -I$(VARIANT_PATH)
|
|
||||||
INCLUDES += -I$(CMSIS_ARM_PATH)
|
|
||||||
INCLUDES += -I$(CMSIS_ATMEL_PATH)
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
|
||||||
ifdef DEBUG
|
|
||||||
include debug.mk
|
|
||||||
else
|
|
||||||
include release.mk
|
|
||||||
endif
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
|
||||||
# Tools
|
|
||||||
#-------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
include $(TOOLCHAIN).mk
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
|
||||||
ifdef DEBUG
|
|
||||||
OUTPUT_OBJ=debug
|
|
||||||
OUTPUT_LIB_POSTFIX=dbg
|
|
||||||
else
|
|
||||||
OUTPUT_OBJ=release
|
|
||||||
OUTPUT_LIB_POSTFIX=rel
|
|
||||||
endif
|
|
||||||
|
|
||||||
OUTPUT_LIB=$(LIBNAME)_$(TOOLCHAIN)_$(OUTPUT_LIB_POSTFIX).a
|
|
||||||
OUTPUT_PATH=$(OUTPUT_OBJ)_$(VARIANT)
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
|
||||||
# C source files and objects
|
|
||||||
#-------------------------------------------------------------------------------
|
|
||||||
C_SRC=$(wildcard $(PROJECT_BASE_PATH)/*.c)
|
|
||||||
|
|
||||||
C_OBJ_TEMP = $(patsubst %.c, %.o, $(notdir $(C_SRC)))
|
|
||||||
|
|
||||||
# during development, remove some files
|
|
||||||
C_OBJ_FILTER=
|
|
||||||
|
|
||||||
C_OBJ=$(filter-out $(C_OBJ_FILTER), $(C_OBJ_TEMP))
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
|
||||||
# CPP source files and objects
|
|
||||||
#-------------------------------------------------------------------------------
|
|
||||||
CPP_SRC=$(wildcard $(PROJECT_BASE_PATH)/*.cpp)
|
|
||||||
|
|
||||||
CPP_OBJ_TEMP = $(patsubst %.cpp, %.o, $(notdir $(CPP_SRC)))
|
|
||||||
|
|
||||||
# during development, remove some files
|
|
||||||
CPP_OBJ_FILTER=
|
|
||||||
|
|
||||||
CPP_OBJ=$(filter-out $(CPP_OBJ_FILTER), $(CPP_OBJ_TEMP))
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
|
||||||
# Assembler source files and objects
|
|
||||||
#-------------------------------------------------------------------------------
|
|
||||||
A_SRC=$(wildcard $(PROJECT_BASE_PATH)/*.s)
|
|
||||||
|
|
||||||
A_OBJ_TEMP=$(patsubst %.s, %.o, $(notdir $(A_SRC)))
|
|
||||||
|
|
||||||
# during development, remove some files
|
|
||||||
A_OBJ_FILTER=
|
|
||||||
|
|
||||||
A_OBJ=$(filter-out $(A_OBJ_FILTER), $(A_OBJ_TEMP))
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
|
||||||
# Rules
|
|
||||||
#-------------------------------------------------------------------------------
|
|
||||||
all: $(VARIANT)
|
|
||||||
|
|
||||||
$(VARIANT): create_output $(OUTPUT_LIB)
|
|
||||||
|
|
||||||
.PHONY: create_output
|
|
||||||
create_output:
|
|
||||||
@echo ------------------------------------------------------------------------------------
|
|
||||||
@echo -------------------------
|
|
||||||
@echo --- Preparing variant $(VARIANT) files in $(OUTPUT_PATH) $(OUTPUT_BIN)
|
|
||||||
@echo -------------------------
|
|
||||||
# @echo *$(INCLUDES)
|
|
||||||
# @echo -------------------------
|
|
||||||
# @echo *$(C_SRC)
|
|
||||||
# @echo -------------------------
|
|
||||||
# @echo *$(C_OBJ)
|
|
||||||
# @echo -------------------------
|
|
||||||
# @echo *$(addprefix $(OUTPUT_PATH)/, $(C_OBJ))
|
|
||||||
# @echo -------------------------
|
|
||||||
# @echo *$(CPP_SRC)
|
|
||||||
# @echo -------------------------
|
|
||||||
# @echo *$(CPP_OBJ)
|
|
||||||
# @echo -------------------------
|
|
||||||
# @echo *$(addprefix $(OUTPUT_PATH)/, $(CPP_OBJ))
|
|
||||||
# @echo -------------------------
|
|
||||||
# @echo *$(A_SRC)
|
|
||||||
# @echo -------------------------
|
|
||||||
|
|
||||||
-@mkdir $(OUTPUT_PATH) 1>NUL 2>&1
|
|
||||||
@echo ------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
$(addprefix $(OUTPUT_PATH)/,$(C_OBJ)): $(OUTPUT_PATH)/%.o: %.c
|
|
||||||
# @"$(CC)" -v -c $(CFLAGS) $< -o $@
|
|
||||||
@"$(CC)" -c $(CFLAGS) $< -o $@
|
|
||||||
|
|
||||||
$(addprefix $(OUTPUT_PATH)/,$(CPP_OBJ)): $(OUTPUT_PATH)/%.o: %.cpp
|
|
||||||
# @"$(CC)" -c $(CPPFLAGS) $< -o $@
|
|
||||||
@"$(CC)" -xc++ -c $(CPPFLAGS) $< -o $@
|
|
||||||
|
|
||||||
$(addprefix $(OUTPUT_PATH)/,$(A_OBJ)): $(OUTPUT_PATH)/%.o: %.s
|
|
||||||
@"$(AS)" -c $(ASFLAGS) $< -o $@
|
|
||||||
|
|
||||||
$(OUTPUT_LIB): $(addprefix $(OUTPUT_PATH)/, $(C_OBJ)) $(addprefix $(OUTPUT_PATH)/, $(CPP_OBJ)) $(addprefix $(OUTPUT_PATH)/, $(A_OBJ))
|
|
||||||
@"$(AR)" -v -r "$(OUTPUT_BIN)/$@" $^
|
|
||||||
@"$(NM)" "$(OUTPUT_BIN)/$@" > "$(OUTPUT_BIN)/$@.txt"
|
|
||||||
|
|
||||||
|
|
||||||
.PHONY: clean
|
|
||||||
clean:
|
|
||||||
@echo ------------------------------------------------------------------------------------
|
|
||||||
@echo --- Cleaning $(VARIANT) files [$(OUTPUT_PATH)$(SEP)*.o]
|
|
||||||
-@$(RM) $(OUTPUT_PATH) 1>NUL 2>&1
|
|
||||||
-@$(RM) $(OUTPUT_BIN)/$(OUTPUT_LIB) 1>NUL 2>&1
|
|
||||||
@echo ------------------------------------------------------------------------------------
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (c) 2011 Arduino. All right reserved.
|
|
||||||
#
|
|
||||||
# This library is free software; you can redistribute it and/or
|
|
||||||
# modify it under the terms of the GNU Lesser General Public
|
|
||||||
# License as published by the Free Software Foundation; either
|
|
||||||
# version 2.1 of the License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This library is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
# See the GNU Lesser General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU Lesser General Public
|
|
||||||
# License along with this library; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
#
|
|
||||||
|
|
||||||
# Optimization level
|
|
||||||
# -O1 Optimize
|
|
||||||
# -O2 Optimize even more
|
|
||||||
# -O3 Optimize yet more
|
|
||||||
# -O0 Reduce compilation time and make debugging produce the expected results
|
|
||||||
# -Os Optimize for size
|
|
||||||
OPTIMIZATION = -Os
|
|
@ -1,31 +0,0 @@
|
|||||||
#*******************************************************
|
|
||||||
#
|
|
||||||
# Connect to J-Link and debug application in flash.
|
|
||||||
#
|
|
||||||
|
|
||||||
# define 'reset' command
|
|
||||||
define reset
|
|
||||||
|
|
||||||
# Connect to the J-Link gdb server
|
|
||||||
target remote localhost:2331
|
|
||||||
# Reset the chip to get to a known state
|
|
||||||
monitor reset
|
|
||||||
|
|
||||||
# Select flash device
|
|
||||||
monitor flash device = AT91SAM3U4E
|
|
||||||
# Enable flash download and flash breakpoints
|
|
||||||
monitor flash download = 1
|
|
||||||
# Load the program
|
|
||||||
load
|
|
||||||
|
|
||||||
# Reset peripheral (RSTC_CR)
|
|
||||||
set *0x400e1200 = 0xA5000004
|
|
||||||
|
|
||||||
# Initializing PC and stack pointer
|
|
||||||
mon reg sp=(0x80000)
|
|
||||||
set *0x80004 = *0x80004 & 0xFFFFFFFE
|
|
||||||
mon reg pc=(0x80004)
|
|
||||||
info reg
|
|
||||||
|
|
||||||
# end of 'reset' command
|
|
||||||
end
|
|
@ -1,23 +0,0 @@
|
|||||||
#*************************************************
|
|
||||||
#
|
|
||||||
# Connect to J-Link and debug application in sram on SAM3U
|
|
||||||
#
|
|
||||||
# Note:
|
|
||||||
# First,users should do Step1 and Step2 according to your project,
|
|
||||||
# then do Step3.
|
|
||||||
|
|
||||||
# Step1: Connect to the J-Link gdb server
|
|
||||||
#target remote localhost:2331
|
|
||||||
#mon reset
|
|
||||||
|
|
||||||
# Step2: Load file(eg. getting-started project)
|
|
||||||
#load bin/basic-dhrystone-project-at91sam3u-ek-at91sam3u4-sram.elf
|
|
||||||
#symbol-file bin/basic-dhrystone-project-at91sam3u-ek-at91sam3u4-sram.elf
|
|
||||||
|
|
||||||
# Step3: Initializing PC and stack pointer
|
|
||||||
# Perpheral reset RSTC_CR
|
|
||||||
set *0x400e1200 = 0xA5000004
|
|
||||||
# Modify pc value to even before writing pc register
|
|
||||||
mon reg sp=(0x20000000)
|
|
||||||
set *0x20000004 = *0x20000004 & 0xFFFFFFFE
|
|
||||||
mon reg pc=(0x20000004)
|
|
Binary file not shown.
@ -1,381 +0,0 @@
|
|||||||
|
|
||||||
adc10_sam3u.o:
|
|
||||||
|
|
||||||
adc12_sam3u.o:
|
|
||||||
|
|
||||||
adc_sam3snxa.o:
|
|
||||||
|
|
||||||
pio.o:
|
|
||||||
00000000 T PIO_Clear
|
|
||||||
00000000 T PIO_Configure
|
|
||||||
00000000 T PIO_DisableInterrupt
|
|
||||||
00000000 T PIO_Get
|
|
||||||
00000000 T PIO_GetOutputDataStatus
|
|
||||||
00000000 T PIO_PullUp
|
|
||||||
00000000 T PIO_Set
|
|
||||||
00000000 T PIO_SetDebounceFilter
|
|
||||||
00000000 T PIO_SetInput
|
|
||||||
00000000 T PIO_SetOutput
|
|
||||||
00000000 T PIO_SetPeripheral
|
|
||||||
|
|
||||||
pmc.o:
|
|
||||||
00000000 T pmc_clr_fast_startup_input
|
|
||||||
00000000 T pmc_disable_all_pck
|
|
||||||
00000000 T pmc_disable_all_periph_clk
|
|
||||||
00000000 T pmc_disable_interrupt
|
|
||||||
00000000 T pmc_disable_pck
|
|
||||||
00000000 T pmc_disable_periph_clk
|
|
||||||
00000000 T pmc_disable_pllack
|
|
||||||
00000000 T pmc_disable_udpck
|
|
||||||
00000000 T pmc_disable_upll_clock
|
|
||||||
00000000 T pmc_enable_all_pck
|
|
||||||
00000000 T pmc_enable_all_periph_clk
|
|
||||||
00000000 T pmc_enable_backupmode
|
|
||||||
00000000 T pmc_enable_interrupt
|
|
||||||
00000000 T pmc_enable_pck
|
|
||||||
00000000 T pmc_enable_periph_clk
|
|
||||||
00000000 T pmc_enable_pllack
|
|
||||||
00000000 T pmc_enable_sleepmode
|
|
||||||
00000000 T pmc_enable_udpck
|
|
||||||
00000000 T pmc_enable_upll_clock
|
|
||||||
00000000 T pmc_enable_waitmode
|
|
||||||
00000000 T pmc_get_interrupt_mask
|
|
||||||
00000000 T pmc_get_status
|
|
||||||
00000000 T pmc_get_writeprotect_status
|
|
||||||
00000000 T pmc_is_locked_pllack
|
|
||||||
00000000 T pmc_is_locked_upll
|
|
||||||
00000000 T pmc_is_pck_enabled
|
|
||||||
00000000 T pmc_is_periph_clk_enabled
|
|
||||||
00000000 T pmc_mck_set_prescaler
|
|
||||||
00000000 T pmc_mck_set_source
|
|
||||||
00000000 T pmc_osc_disable_fastrc
|
|
||||||
00000000 T pmc_osc_disable_xtal
|
|
||||||
00000000 T pmc_osc_enable_fastrc
|
|
||||||
00000000 T pmc_osc_is_ready_32kxtal
|
|
||||||
00000000 T pmc_osc_is_ready_mainck
|
|
||||||
00000000 T pmc_pck_set_prescaler
|
|
||||||
00000000 T pmc_pck_set_source
|
|
||||||
00000000 T pmc_set_fast_startup_input
|
|
||||||
00000000 T pmc_set_writeprotect
|
|
||||||
00000000 T pmc_switch_mainck_to_fastrc
|
|
||||||
00000000 T pmc_switch_mainck_to_xtal
|
|
||||||
00000000 T pmc_switch_mck_to_mainck
|
|
||||||
00000000 T pmc_switch_mck_to_pllack
|
|
||||||
00000000 T pmc_switch_mck_to_sclk
|
|
||||||
00000000 T pmc_switch_mck_to_upllck
|
|
||||||
00000000 T pmc_switch_pck_to_mainck
|
|
||||||
00000000 T pmc_switch_pck_to_pllack
|
|
||||||
00000000 T pmc_switch_pck_to_sclk
|
|
||||||
00000000 T pmc_switch_pck_to_upllck
|
|
||||||
00000000 T pmc_switch_sclk_to_32kxtal
|
|
||||||
00000000 T pmc_switch_udpck_to_pllack
|
|
||||||
00000000 T pmc_switch_udpck_to_upllck
|
|
||||||
|
|
||||||
pwmc.o:
|
|
||||||
00000000 t FindClockConfiguration
|
|
||||||
00000000 T PWMC_ConfigureChannel
|
|
||||||
00000000 T PWMC_ConfigureChannelExt
|
|
||||||
00000000 T PWMC_ConfigureClocks
|
|
||||||
00000000 T PWMC_ConfigureComparisonUnit
|
|
||||||
00000000 T PWMC_ConfigureEventLineMode
|
|
||||||
00000000 T PWMC_ConfigureSyncChannel
|
|
||||||
00000000 T PWMC_DisableChannel
|
|
||||||
00000000 T PWMC_DisableChannelIt
|
|
||||||
00000000 T PWMC_DisableIt
|
|
||||||
00000000 T PWMC_DisableOverrideOutput
|
|
||||||
00000000 T PWMC_EnableChannel
|
|
||||||
00000000 T PWMC_EnableChannelIt
|
|
||||||
00000000 T PWMC_EnableFaultProtection
|
|
||||||
00000000 T PWMC_EnableIt
|
|
||||||
00000000 T PWMC_EnableOverrideOutput
|
|
||||||
00000000 T PWMC_FaultClear
|
|
||||||
00000000 T PWMC_SetDeadTime
|
|
||||||
00000000 T PWMC_SetDutyCycle
|
|
||||||
00000000 T PWMC_SetFaultMode
|
|
||||||
00000000 T PWMC_SetFaultProtectionValue
|
|
||||||
00000000 T PWMC_SetOverrideValue
|
|
||||||
00000000 T PWMC_SetPeriod
|
|
||||||
00000000 T PWMC_SetSyncChannelUpdatePeriod
|
|
||||||
00000000 T PWMC_SetSyncChannelUpdateUnlock
|
|
||||||
00000000 T PWMC_WriteBuffer
|
|
||||||
U __assert_func
|
|
||||||
00000000 r __func__.3192
|
|
||||||
00000000 r __func__.3203
|
|
||||||
00000000 r __func__.3218
|
|
||||||
00000000 r __func__.3229
|
|
||||||
00000000 r __func__.3240
|
|
||||||
00000000 r __func__.3247
|
|
||||||
00000000 r __func__.3331
|
|
||||||
00000000 r __func__.3337
|
|
||||||
|
|
||||||
rtc.o:
|
|
||||||
00000000 T RTC_ClearSCCR
|
|
||||||
00000000 T RTC_DisableIt
|
|
||||||
00000000 T RTC_EnableIt
|
|
||||||
00000000 T RTC_GetDate
|
|
||||||
00000000 T RTC_GetHourMode
|
|
||||||
00000000 T RTC_GetSR
|
|
||||||
00000000 T RTC_GetTime
|
|
||||||
00000000 T RTC_SetDate
|
|
||||||
00000000 T RTC_SetDateAlarm
|
|
||||||
00000000 T RTC_SetHourMode
|
|
||||||
00000000 T RTC_SetTime
|
|
||||||
00000000 T RTC_SetTimeAlarm
|
|
||||||
U __assert_func
|
|
||||||
00000000 r __func__.3189
|
|
||||||
00000000 r __func__.3198
|
|
||||||
00000000 r __func__.3203
|
|
||||||
|
|
||||||
rtt.o:
|
|
||||||
00000000 T RTT_EnableIT
|
|
||||||
00000000 T RTT_GetStatus
|
|
||||||
00000000 T RTT_GetTime
|
|
||||||
00000000 T RTT_SetAlarm
|
|
||||||
00000000 T RTT_SetPrescaler
|
|
||||||
U __assert_func
|
|
||||||
00000000 r __func__.3196
|
|
||||||
00000000 r __func__.3204
|
|
||||||
|
|
||||||
spi.o:
|
|
||||||
00000000 T SPI_Configure
|
|
||||||
00000000 T SPI_ConfigureNPCS
|
|
||||||
00000000 T SPI_Disable
|
|
||||||
00000000 T SPI_DisableIt
|
|
||||||
00000000 T SPI_Enable
|
|
||||||
00000000 T SPI_EnableIt
|
|
||||||
00000000 T SPI_GetStatus
|
|
||||||
00000000 T SPI_IsFinished
|
|
||||||
00000000 T SPI_Read
|
|
||||||
00000000 T SPI_Write
|
|
||||||
U pmc_enable_periph_clk
|
|
||||||
|
|
||||||
tc.o:
|
|
||||||
00000000 T TC_Configure
|
|
||||||
00000000 T TC_FindMckDivisor
|
|
||||||
00000000 T TC_Start
|
|
||||||
00000000 T TC_Stop
|
|
||||||
U __assert_func
|
|
||||||
00000000 r __func__.3191
|
|
||||||
00000000 r __func__.3197
|
|
||||||
00000000 r __func__.3203
|
|
||||||
|
|
||||||
timetick.o:
|
|
||||||
00000000 T GetTickCount
|
|
||||||
00000000 T Sleep
|
|
||||||
00000000 T TimeTick_Configure
|
|
||||||
00000000 T TimeTick_Increment
|
|
||||||
00000000 T Wait
|
|
||||||
00000000 b _dwTickCount
|
|
||||||
|
|
||||||
twi.o:
|
|
||||||
00000000 T TWI_ByteReceived
|
|
||||||
00000000 T TWI_ByteSent
|
|
||||||
00000000 T TWI_ConfigureMaster
|
|
||||||
00000000 T TWI_ConfigureSlave
|
|
||||||
00000000 T TWI_DisableIt
|
|
||||||
00000000 T TWI_EnableIt
|
|
||||||
00000000 T TWI_GetMaskedStatus
|
|
||||||
00000000 T TWI_GetStatus
|
|
||||||
00000000 T TWI_ReadByte
|
|
||||||
00000000 T TWI_SendSTOPCondition
|
|
||||||
00000000 T TWI_StartRead
|
|
||||||
00000000 T TWI_StartWrite
|
|
||||||
00000000 T TWI_Stop
|
|
||||||
00000000 T TWI_TransferComplete
|
|
||||||
00000000 T TWI_WriteByte
|
|
||||||
U __assert_func
|
|
||||||
00000000 r __func__.3556
|
|
||||||
00000000 r __func__.3571
|
|
||||||
00000000 r __func__.3575
|
|
||||||
00000000 r __func__.3582
|
|
||||||
00000000 r __func__.3586
|
|
||||||
00000000 r __func__.3591
|
|
||||||
00000000 r __func__.3599
|
|
||||||
00000000 r __func__.3613
|
|
||||||
00000000 r __func__.3618
|
|
||||||
00000000 r __func__.3622
|
|
||||||
00000000 r __func__.3627
|
|
||||||
00000000 r __func__.3631
|
|
||||||
|
|
||||||
usart.o:
|
|
||||||
00000000 T USART_Configure
|
|
||||||
00000000 T USART_DisableIt
|
|
||||||
00000000 T USART_EnableIt
|
|
||||||
00000000 T USART_GetChar
|
|
||||||
00000000 T USART_GetStatus
|
|
||||||
00000000 T USART_IsDataAvailable
|
|
||||||
00000000 T USART_IsRxReady
|
|
||||||
00000000 T USART_PutChar
|
|
||||||
00000000 T USART_Read
|
|
||||||
00000000 T USART_ReadBuffer
|
|
||||||
00000000 T USART_SetIrdaFilter
|
|
||||||
00000000 T USART_SetReceiverEnabled
|
|
||||||
00000000 T USART_SetTransmitterEnabled
|
|
||||||
00000000 T USART_Write
|
|
||||||
00000000 T USART_WriteBuffer
|
|
||||||
U __assert_func
|
|
||||||
00000000 r __func__.3477
|
|
||||||
|
|
||||||
wdt.o:
|
|
||||||
00000000 T WDT_Disable
|
|
||||||
00000000 T WDT_Enable
|
|
||||||
00000000 T WDT_GetPeriod
|
|
||||||
00000000 T WDT_GetStatus
|
|
||||||
00000000 T WDT_Restart
|
|
||||||
|
|
||||||
system_sam3xa.o:
|
|
||||||
00000000 D SystemCoreClock
|
|
||||||
00000000 T SystemCoreClockUpdate
|
|
||||||
00000000 T SystemInit
|
|
||||||
00000000 T system_init_flash
|
|
||||||
|
|
||||||
startup_sam3xa.o:
|
|
||||||
00000000 W ADC_Handler
|
|
||||||
00000000 W BusFault_Handler
|
|
||||||
00000000 W CAN0_Handler
|
|
||||||
00000000 W CAN1_Handler
|
|
||||||
00000000 W DACC_Handler
|
|
||||||
00000000 W DMAC_Handler
|
|
||||||
00000000 W DebugMon_Handler
|
|
||||||
00000000 T Dummy_Handler
|
|
||||||
00000000 W EFC0_Handler
|
|
||||||
00000000 W EFC1_Handler
|
|
||||||
00000000 W EMAC_Handler
|
|
||||||
00000000 W HSMCI_Handler
|
|
||||||
00000000 W HardFault_Handler
|
|
||||||
00000000 W MemManage_Handler
|
|
||||||
00000000 W NMI_Handler
|
|
||||||
00000000 W PIOA_Handler
|
|
||||||
00000000 W PIOB_Handler
|
|
||||||
00000000 W PIOC_Handler
|
|
||||||
00000000 W PIOD_Handler
|
|
||||||
00000000 W PMC_Handler
|
|
||||||
00000000 W PWM_Handler
|
|
||||||
00000000 W PendSV_Handler
|
|
||||||
00000000 W RSTC_Handler
|
|
||||||
00000000 W RTC_Handler
|
|
||||||
00000000 W RTT_Handler
|
|
||||||
00000000 T Reset_Handler
|
|
||||||
00000000 W SMC_Handler
|
|
||||||
00000000 W SPI0_Handler
|
|
||||||
00000000 W SSC_Handler
|
|
||||||
00000000 W SUPC_Handler
|
|
||||||
00000000 W SVC_Handler
|
|
||||||
00000000 W SysTick_Handler
|
|
||||||
00000000 W TC0_Handler
|
|
||||||
00000000 W TC1_Handler
|
|
||||||
00000000 W TC2_Handler
|
|
||||||
00000000 W TC3_Handler
|
|
||||||
00000000 W TC4_Handler
|
|
||||||
00000000 W TC5_Handler
|
|
||||||
00000000 W TC6_Handler
|
|
||||||
00000000 W TC7_Handler
|
|
||||||
00000000 W TC8_Handler
|
|
||||||
00000000 W TRNG_Handler
|
|
||||||
00000000 W TWI0_Handler
|
|
||||||
00000000 W TWI1_Handler
|
|
||||||
00000000 W UART_Handler
|
|
||||||
00000000 W UOTGHS_Handler
|
|
||||||
00000000 W USART0_Handler
|
|
||||||
00000000 W USART1_Handler
|
|
||||||
00000000 W USART2_Handler
|
|
||||||
00000000 W USART3_Handler
|
|
||||||
00000000 W UsageFault_Handler
|
|
||||||
00000000 W WDT_Handler
|
|
||||||
U __libc_init_array
|
|
||||||
U _erelocate
|
|
||||||
U _estack
|
|
||||||
U _etext
|
|
||||||
U _ezero
|
|
||||||
U _sfixed
|
|
||||||
U _srelocate
|
|
||||||
U _szero
|
|
||||||
00000000 R exception_table
|
|
||||||
U main
|
|
||||||
|
|
||||||
adc.o:
|
|
||||||
00000000 T adc_configure_power_save
|
|
||||||
00000000 T adc_configure_sequence
|
|
||||||
00000000 T adc_configure_timing
|
|
||||||
00000000 T adc_configure_trigger
|
|
||||||
00000000 T adc_disable_all_channel
|
|
||||||
00000000 T adc_disable_anch
|
|
||||||
00000000 T adc_disable_channel
|
|
||||||
00000000 T adc_disable_channel_differential_input
|
|
||||||
00000000 T adc_disable_channel_input_offset
|
|
||||||
00000000 T adc_disable_interrupt
|
|
||||||
00000000 T adc_disable_tag
|
|
||||||
00000000 T adc_disable_ts
|
|
||||||
00000000 T adc_enable_all_channel
|
|
||||||
00000000 T adc_enable_anch
|
|
||||||
00000000 T adc_enable_channel
|
|
||||||
00000000 T adc_enable_channel_differential_input
|
|
||||||
00000000 T adc_enable_channel_input_offset
|
|
||||||
00000000 T adc_enable_interrupt
|
|
||||||
00000000 T adc_enable_tag
|
|
||||||
00000000 T adc_enable_ts
|
|
||||||
00000000 T adc_get_actual_adc_clock
|
|
||||||
00000000 T adc_get_channel_status
|
|
||||||
00000000 T adc_get_channel_value
|
|
||||||
00000000 T adc_get_comparison_mode
|
|
||||||
00000000 T adc_get_interrupt_mask
|
|
||||||
00000000 T adc_get_latest_value
|
|
||||||
00000000 T adc_get_overrun_status
|
|
||||||
00000000 T adc_get_pdc_base
|
|
||||||
00000000 T adc_get_status
|
|
||||||
00000000 T adc_get_tag
|
|
||||||
00000000 T adc_get_writeprotect_status
|
|
||||||
00000000 T adc_init
|
|
||||||
00000000 T adc_set_bias_current
|
|
||||||
00000000 T adc_set_channel_input_gain
|
|
||||||
00000000 T adc_set_comparison_channel
|
|
||||||
00000000 T adc_set_comparison_mode
|
|
||||||
00000000 T adc_set_comparison_window
|
|
||||||
00000000 T adc_set_resolution
|
|
||||||
00000000 T adc_set_writeprotect
|
|
||||||
00000000 T adc_start
|
|
||||||
00000000 T adc_start_sequencer
|
|
||||||
00000000 T adc_stop
|
|
||||||
00000000 T adc_stop_sequencer
|
|
||||||
|
|
||||||
udp.o:
|
|
||||||
|
|
||||||
udphs.o:
|
|
||||||
|
|
||||||
uotghs.o:
|
|
||||||
00000000 T UDD_Attach
|
|
||||||
00000000 T UDD_ClearIN
|
|
||||||
00000000 T UDD_ClearOUT
|
|
||||||
00000000 T UDD_ClearSetupInt
|
|
||||||
00000000 T UDD_Detach
|
|
||||||
00000000 T UDD_FifoByteCount
|
|
||||||
00000000 T UDD_GetFrameNumber
|
|
||||||
00000000 T UDD_Init
|
|
||||||
00000000 T UDD_InitEP
|
|
||||||
00000000 T UDD_InitEndpoints
|
|
||||||
00000000 T UDD_ReadWriteAllowed
|
|
||||||
00000000 T UDD_ReceivedSetupInt
|
|
||||||
00000000 T UDD_Recv
|
|
||||||
00000000 T UDD_Recv8
|
|
||||||
00000000 T UDD_ReleaseRX
|
|
||||||
00000000 T UDD_ReleaseTX
|
|
||||||
00000000 T UDD_Send
|
|
||||||
00000000 T UDD_Send8
|
|
||||||
00000000 T UDD_SetAddress
|
|
||||||
00000000 T UDD_SetStack
|
|
||||||
00000000 T UDD_Stall
|
|
||||||
00000000 T UDD_WaitForINOrOUT
|
|
||||||
00000000 T UDD_WaitIN
|
|
||||||
00000000 T UDD_WaitOUT
|
|
||||||
00000000 T UOTGHS_Handler
|
|
||||||
U g_interrupt_enabled
|
|
||||||
00000000 b gpf_isr
|
|
||||||
U pmc_enable_periph_clk
|
|
||||||
U pmc_enable_udpck
|
|
||||||
U pmc_enable_upll_clock
|
|
||||||
U pmc_switch_udpck_to_upllck
|
|
||||||
00000000 b ul_recv_fifo_ptr
|
|
||||||
00000000 b ul_send_fifo_ptr
|
|
||||||
|
|
||||||
interrupt_sam_nvic.o:
|
|
||||||
00000000 D g_interrupt_enabled
|
|
@ -1,144 +0,0 @@
|
|||||||
/* ----------------------------------------------------------------------------
|
|
||||||
* SAM Software Package License
|
|
||||||
* ----------------------------------------------------------------------------
|
|
||||||
* Copyright (c) 2012, Atmel Corporation
|
|
||||||
*
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following condition is met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright notice,
|
|
||||||
* this list of conditions and the disclaimer below.
|
|
||||||
*
|
|
||||||
* Atmel's name may not be used to endorse or promote products derived from
|
|
||||||
* this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
|
|
||||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
|
|
||||||
* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
||||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
||||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
|
||||||
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
* ----------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
|
|
||||||
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
|
|
||||||
OUTPUT_ARCH(arm)
|
|
||||||
SEARCH_DIR(.)
|
|
||||||
|
|
||||||
/* Memory Spaces Definitions */
|
|
||||||
MEMORY
|
|
||||||
{
|
|
||||||
rom (rx) : ORIGIN = 0x00080000, LENGTH = 0x00080000 /* Flash, 512K */
|
|
||||||
sram0 (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00010000 /* sram0, 64K */
|
|
||||||
sram1 (rwx) : ORIGIN = 0x20080000, LENGTH = 0x00008000 /* sram1, 32K */
|
|
||||||
ram (rwx) : ORIGIN = 0x20070000, LENGTH = 0x00018000 /* sram, 96K */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* The stack size used by the application. NOTE: you need to adjust */
|
|
||||||
STACK_SIZE = DEFINED(STACK_SIZE) ? STACK_SIZE : 0x2000 ;
|
|
||||||
|
|
||||||
/* Section Definitions */
|
|
||||||
SECTIONS
|
|
||||||
{
|
|
||||||
.text :
|
|
||||||
{
|
|
||||||
. = ALIGN(4);
|
|
||||||
_sfixed = .;
|
|
||||||
KEEP(*(.vectors .vectors.*))
|
|
||||||
*(.text .text.* .gnu.linkonce.t.*)
|
|
||||||
*(.glue_7t) *(.glue_7)
|
|
||||||
*(.rodata .rodata* .gnu.linkonce.r.*)
|
|
||||||
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
|
||||||
|
|
||||||
/* Support C constructors, and C destructors in both user code
|
|
||||||
and the C library. This also provides support for C++ code. */
|
|
||||||
. = ALIGN(4);
|
|
||||||
KEEP(*(.init))
|
|
||||||
. = ALIGN(4);
|
|
||||||
__preinit_array_start = .;
|
|
||||||
KEEP (*(.preinit_array))
|
|
||||||
__preinit_array_end = .;
|
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
__init_array_start = .;
|
|
||||||
KEEP (*(SORT(.init_array.*)))
|
|
||||||
KEEP (*(.init_array))
|
|
||||||
__init_array_end = .;
|
|
||||||
|
|
||||||
. = ALIGN(0x4);
|
|
||||||
KEEP (*crtbegin.o(.ctors))
|
|
||||||
KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
|
|
||||||
KEEP (*(SORT(.ctors.*)))
|
|
||||||
KEEP (*crtend.o(.ctors))
|
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
KEEP(*(.fini))
|
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
__fini_array_start = .;
|
|
||||||
KEEP (*(.fini_array))
|
|
||||||
KEEP (*(SORT(.fini_array.*)))
|
|
||||||
__fini_array_end = .;
|
|
||||||
|
|
||||||
KEEP (*crtbegin.o(.dtors))
|
|
||||||
KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
|
|
||||||
KEEP (*(SORT(.dtors.*)))
|
|
||||||
KEEP (*crtend.o(.dtors))
|
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
_efixed = .; /* End of text section */
|
|
||||||
} > rom
|
|
||||||
|
|
||||||
/* .ARM.exidx is sorted, so has to go in its own output section. */
|
|
||||||
PROVIDE_HIDDEN (__exidx_start = .);
|
|
||||||
.ARM.exidx :
|
|
||||||
{
|
|
||||||
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
|
|
||||||
} > rom
|
|
||||||
PROVIDE_HIDDEN (__exidx_end = .);
|
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
_etext = .;
|
|
||||||
|
|
||||||
.relocate : AT (_etext)
|
|
||||||
{
|
|
||||||
. = ALIGN(4);
|
|
||||||
_srelocate = .;
|
|
||||||
*(.ramfunc .ramfunc.*);
|
|
||||||
*(.data .data.*);
|
|
||||||
. = ALIGN(4);
|
|
||||||
_erelocate = .;
|
|
||||||
} > ram
|
|
||||||
|
|
||||||
/* .bss section which is used for uninitialized data */
|
|
||||||
.bss (NOLOAD) :
|
|
||||||
{
|
|
||||||
. = ALIGN(4);
|
|
||||||
_sbss = . ;
|
|
||||||
_szero = .;
|
|
||||||
*(.bss .bss.*)
|
|
||||||
*(COMMON)
|
|
||||||
. = ALIGN(4);
|
|
||||||
_ebss = . ;
|
|
||||||
_ezero = .;
|
|
||||||
} > ram
|
|
||||||
|
|
||||||
/* stack section */
|
|
||||||
.stack (NOLOAD):
|
|
||||||
{
|
|
||||||
. = ALIGN(8);
|
|
||||||
_sstack = .;
|
|
||||||
. = . + STACK_SIZE;
|
|
||||||
. = ALIGN(8);
|
|
||||||
_estack = .;
|
|
||||||
} > ram
|
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
_end = . ;
|
|
||||||
}
|
|
@ -1,145 +0,0 @@
|
|||||||
/* ----------------------------------------------------------------------------
|
|
||||||
* SAM Software Package License
|
|
||||||
* ----------------------------------------------------------------------------
|
|
||||||
* Copyright (c) 2012, Atmel Corporation
|
|
||||||
*
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following condition is met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright notice,
|
|
||||||
* this list of conditions and the disclaimer below.
|
|
||||||
*
|
|
||||||
* Atmel's name may not be used to endorse or promote products derived from
|
|
||||||
* this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
|
|
||||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
|
|
||||||
* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
||||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
||||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
|
||||||
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
* ----------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
|
|
||||||
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
|
|
||||||
OUTPUT_ARCH(arm)
|
|
||||||
SEARCH_DIR(.)
|
|
||||||
|
|
||||||
/* Memory Spaces Definitions */
|
|
||||||
MEMORY
|
|
||||||
{
|
|
||||||
rom (rx) : ORIGIN = 0x00080000, LENGTH = 0x00080000 /* Flash, 512K */
|
|
||||||
sram0 (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00010000 /* sram0, 64K */
|
|
||||||
sram1 (rwx) : ORIGIN = 0x20080000, LENGTH = 0x00008000 /* sram1, 32K */
|
|
||||||
ram (rwx) : ORIGIN = 0x20070000, LENGTH = 0x00018000 /* sram, 96K */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* The stack size used by the application. NOTE: you need to adjust */
|
|
||||||
STACK_SIZE = DEFINED(STACK_SIZE) ? STACK_SIZE : 0x2000 ;
|
|
||||||
|
|
||||||
/* Section Definitions */
|
|
||||||
SECTIONS
|
|
||||||
{
|
|
||||||
.text :
|
|
||||||
{
|
|
||||||
. = ALIGN(4);
|
|
||||||
_sfixed = .;
|
|
||||||
KEEP(*(.vectors .vectors.*))
|
|
||||||
*(.text .text.* .gnu.linkonce.t.*)
|
|
||||||
*(.glue_7t) *(.glue_7)
|
|
||||||
*(.rodata .rodata* .gnu.linkonce.r.*)
|
|
||||||
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
|
||||||
|
|
||||||
/* Support C constructors, and C destructors in both user code
|
|
||||||
and the C library. This also provides support for C++ code. */
|
|
||||||
. = ALIGN(4);
|
|
||||||
KEEP(*(.init))
|
|
||||||
. = ALIGN(4);
|
|
||||||
__preinit_array_start = .;
|
|
||||||
KEEP (*(.preinit_array))
|
|
||||||
__preinit_array_end = .;
|
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
__init_array_start = .;
|
|
||||||
KEEP (*(SORT(.init_array.*)))
|
|
||||||
KEEP (*(.init_array))
|
|
||||||
__init_array_end = .;
|
|
||||||
|
|
||||||
. = ALIGN(0x4);
|
|
||||||
KEEP (*crtbegin.o(.ctors))
|
|
||||||
KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
|
|
||||||
KEEP (*(SORT(.ctors.*)))
|
|
||||||
KEEP (*crtend.o(.ctors))
|
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
KEEP(*(.fini))
|
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
__fini_array_start = .;
|
|
||||||
KEEP (*(.fini_array))
|
|
||||||
KEEP (*(SORT(.fini_array.*)))
|
|
||||||
__fini_array_end = .;
|
|
||||||
|
|
||||||
KEEP (*crtbegin.o(.dtors))
|
|
||||||
KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
|
|
||||||
KEEP (*(SORT(.dtors.*)))
|
|
||||||
KEEP (*crtend.o(.dtors))
|
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
_efixed = .; /* End of text section */
|
|
||||||
} > ram
|
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
_etext = .;
|
|
||||||
|
|
||||||
.relocate : AT (_etext)
|
|
||||||
{
|
|
||||||
. = ALIGN(4);
|
|
||||||
_srelocate = .;
|
|
||||||
*(.ramfunc .ramfunc.*);
|
|
||||||
*(.data .data.*);
|
|
||||||
. = ALIGN(4);
|
|
||||||
_erelocate = .;
|
|
||||||
} > ram
|
|
||||||
|
|
||||||
/* .bss section which is used for uninitialized data */
|
|
||||||
.bss (NOLOAD) :
|
|
||||||
{
|
|
||||||
. = ALIGN(4);
|
|
||||||
_sbss = . ;
|
|
||||||
_szero = .;
|
|
||||||
*(.bss .bss.*)
|
|
||||||
*(COMMON)
|
|
||||||
. = ALIGN(4);
|
|
||||||
_ebss = . ;
|
|
||||||
_ezero = .;
|
|
||||||
} > ram
|
|
||||||
|
|
||||||
/* stack section */
|
|
||||||
.stack (NOLOAD):
|
|
||||||
{
|
|
||||||
. = ALIGN(8);
|
|
||||||
_sstack = .;
|
|
||||||
. = . + STACK_SIZE;
|
|
||||||
. = ALIGN(8);
|
|
||||||
_estack = .;
|
|
||||||
} > ram
|
|
||||||
|
|
||||||
/* .ARM.exidx is sorted, so has to go in its own output section. */
|
|
||||||
PROVIDE_HIDDEN (__exidx_start = .);
|
|
||||||
.ARM.exidx :
|
|
||||||
{
|
|
||||||
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
|
|
||||||
} > ram
|
|
||||||
PROVIDE_HIDDEN (__exidx_end = .);
|
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
_end = . ;
|
|
||||||
}
|
|
||||||
|
|
@ -1,49 +0,0 @@
|
|||||||
/*###ICF### Section handled by ICF editor, don't touch! ****/
|
|
||||||
/*-Editor annotation file-*/
|
|
||||||
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\a_v1_0.xml" */
|
|
||||||
/*-Vector table start*/
|
|
||||||
define symbol __ICFEDIT_vector_start__ = 0x00080000; /*Add for CMSIS*/
|
|
||||||
/*-Memory Regions-*/
|
|
||||||
define symbol __ICFEDIT_region_RAM0_start__ = 0x20000000;
|
|
||||||
define symbol __ICFEDIT_region_RAM0_end__ = 0x20007FFF;
|
|
||||||
define symbol __ICFEDIT_region_RAM1_start__ = 0x20080000;
|
|
||||||
define symbol __ICFEDIT_region_RAM1_end__ = 0x20083FFF;
|
|
||||||
define symbol __ICFEDIT_region_ROM0_start__ = 0x00080000;
|
|
||||||
define symbol __ICFEDIT_region_ROM0_end__ = 0x0009FFFF;
|
|
||||||
define symbol __ICFEDIT_region_ROM1_start__ = 0x00100000;
|
|
||||||
define symbol __ICFEDIT_region_ROM1_end__ = 0x0011FFFF;
|
|
||||||
/*-Sizes-*/
|
|
||||||
/*define symbol __ICFEDIT_size_cstack__ = 0x1000;*//*for nandflash*/
|
|
||||||
define symbol __ICFEDIT_size_cstack__ = 0x2000;
|
|
||||||
define symbol __ICFEDIT_size_heap__ = 0x200;
|
|
||||||
/*-Specials-*/
|
|
||||||
/*define symbol __ICFEDIT_region_RAM_VECT_start__ = __ICFEDIT_region_RAM0_start__;*/ /*Referenced for CMSIS*/
|
|
||||||
/*define symbol __ICFEDIT_size_vectors__ = 0x100;*/ /*Referenced for CMSIS*/
|
|
||||||
/*-Exports-*/
|
|
||||||
/*export symbol __ICFEDIT_region_RAM_VECT_start__;*/
|
|
||||||
export symbol __ICFEDIT_vector_start__; /*Add for CMSIS*/
|
|
||||||
/**** End of ICF editor section. ###ICF###*/
|
|
||||||
|
|
||||||
define memory mem with size = 4G;
|
|
||||||
/*define region RAM_VECT_region = mem:[from __ICFEDIT_region_RAM_VECT_start__ size __ICFEDIT_size_vectors__];*/ /*Referenced for CMSIS*/
|
|
||||||
/*define region RAM0_region = mem:[from __ICFEDIT_region_RAM0_start__+__ICFEDIT_size_vectors__ to __ICFEDIT_region_RAM0_end__];*/ /*Referenced for CMSIS*/
|
|
||||||
define region RAM0_region = mem:[from __ICFEDIT_region_RAM0_start__ to __ICFEDIT_region_RAM0_end__];
|
|
||||||
define region RAM1_region = mem:[from __ICFEDIT_region_RAM1_start__ to __ICFEDIT_region_RAM1_end__];
|
|
||||||
/*define region RAM_region = mem:[from __ICFEDIT_region_RAM0_start__+__ICFEDIT_size_vectors__ to __ICFEDIT_region_RAM0_end__] |
|
|
||||||
mem:[from __ICFEDIT_region_RAM1_start__ to __ICFEDIT_region_RAM1_end__];*/ /*Referenced for CMSIS*/
|
|
||||||
define region ROM0_region = mem:[from __ICFEDIT_region_ROM0_start__ to __ICFEDIT_region_ROM0_end__];
|
|
||||||
define region ROM1_region = mem:[from __ICFEDIT_region_ROM1_start__ to __ICFEDIT_region_ROM1_end__];
|
|
||||||
|
|
||||||
/*define block RamVect with alignment = 8, size = __ICFEDIT_size_vectors__ { };*/
|
|
||||||
define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
|
|
||||||
define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
|
|
||||||
|
|
||||||
initialize by copy { readwrite };
|
|
||||||
do not initialize { section .noinit };
|
|
||||||
|
|
||||||
/*place at start of ROM0_region { readonly section .vectors };*/ /*Referenced for CMSIS*/
|
|
||||||
place at address mem:__ICFEDIT_vector_start__ { readonly section .intvec }; /*Add for CMSIS*/
|
|
||||||
place in ROM0_region { readonly };
|
|
||||||
place in RAM0_region { readwrite, block HEAP };
|
|
||||||
place in RAM1_region { block CSTACK }; /* for nandflash*/
|
|
||||||
/*place in RAM_VECT_region { block RamVect };*/ /*Referenced for CMSIS*/
|
|
@ -1,33 +0,0 @@
|
|||||||
/*###ICF### Section handled by ICF editor, don't touch! ****/
|
|
||||||
/*-Editor annotation file-*/
|
|
||||||
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\a_v1_0.xml" */
|
|
||||||
/*-Vector table start*/
|
|
||||||
define symbol __ICFEDIT_vector_start__ = 0x20000000;
|
|
||||||
/*-Memory Regions-*/
|
|
||||||
define symbol __ICFEDIT_region_RAM0_start__ = 0x20000000;
|
|
||||||
define symbol __ICFEDIT_region_RAM0_end__ = 0x20007FFF;
|
|
||||||
define symbol __ICFEDIT_region_RAM1_start__ = 0x20080000;
|
|
||||||
define symbol __ICFEDIT_region_RAM1_end__ = 0x20083FFF;
|
|
||||||
/*-Sizes-*/
|
|
||||||
define symbol __ICFEDIT_size_cstack__ = 0x900;
|
|
||||||
define symbol __ICFEDIT_size_heap__ = 0x200;
|
|
||||||
/*-Exports-*/
|
|
||||||
export symbol __ICFEDIT_vector_start__;
|
|
||||||
/**** End of ICF editor section. ###ICF###*/
|
|
||||||
|
|
||||||
define memory mem with size = 4G;
|
|
||||||
define region RAM0_region = mem:[from __ICFEDIT_region_RAM0_start__ to __ICFEDIT_region_RAM0_end__];
|
|
||||||
define region RAM1_region = mem:[from __ICFEDIT_region_RAM1_start__ to __ICFEDIT_region_RAM1_end__];
|
|
||||||
/*define region RAM_region = mem:[from __ICFEDIT_region_RAM0_start__+__ICFEDIT_size_vectors__ to __ICFEDIT_region_RAM0_end__] |
|
|
||||||
mem:[from __ICFEDIT_region_RAM1_start__ to __ICFEDIT_region_RAM1_end__];*/
|
|
||||||
|
|
||||||
/* define block RamVect with alignment = 8, size = __ICFEDIT_size_vectors__ { }; */
|
|
||||||
define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
|
|
||||||
define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
|
|
||||||
|
|
||||||
initialize by copy { readwrite };
|
|
||||||
do not initialize { section .noinit };
|
|
||||||
|
|
||||||
place at address mem:__ICFEDIT_vector_start__ { readonly section .intvec };
|
|
||||||
place in RAM0_region { readonly };
|
|
||||||
place in RAM1_region { readwrite, block CSTACK, block HEAP };
|
|
@ -1,21 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright (c) 2011 Arduino. All right reserved.
|
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU Lesser General Public
|
|
||||||
License as published by the Free Software Foundation; either
|
|
||||||
version 2.1 of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
This library is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
See the GNU Lesser General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Lesser General Public
|
|
||||||
License along with this library; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
// API compatibility
|
|
||||||
#include "variant.h"
|
|
||||||
|
|
@ -1,376 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright (c) 2012 Google, Inc. All right reserved.
|
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU Lesser General Public
|
|
||||||
License as published by the Free Software Foundation; either
|
|
||||||
version 2.1 of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
This library is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
See the GNU Lesser General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Lesser General Public
|
|
||||||
License along with this library; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "variant.h"
|
|
||||||
|
|
||||||
/*
|
|
||||||
* ADK2 Board pin | PORT
|
|
||||||
* ----------------+--------
|
|
||||||
* 0 RXD0 | PA10
|
|
||||||
* 1 TXD0 | PA11
|
|
||||||
* 2 PWML0 | PA21
|
|
||||||
* 3 PWML1 | PC4
|
|
||||||
* 4 PWML2 | PC6
|
|
||||||
* 5 PWML3 | PC8
|
|
||||||
* 6 PWML4 | PC21
|
|
||||||
* 7 PWML5 | PC22
|
|
||||||
* 8 PWML6 | PC23
|
|
||||||
* 9 PWML7 | PC24
|
|
||||||
* 10 PWMH0 | PC3
|
|
||||||
* 11 PWMH1 | PC5
|
|
||||||
* 12 PWMH2 | PC7
|
|
||||||
* 13 PWMH3 | PC9 ("L" LED on board)
|
|
||||||
* 14 TX3 | PD4
|
|
||||||
* 15 RX3 | PD5
|
|
||||||
* 16 TX2 | PB20
|
|
||||||
* 17 RX2 | PB21
|
|
||||||
* 18 TX1 | PA13
|
|
||||||
* 19 RX1 | PA12
|
|
||||||
* 20 SDA | PA17
|
|
||||||
* 21 SCL | PA18
|
|
||||||
* 22 | PA14
|
|
||||||
* 23 | PA15
|
|
||||||
* 24 | PD0
|
|
||||||
* 25 | PD1
|
|
||||||
* 26 | PD2
|
|
||||||
* 27 | PD3
|
|
||||||
* 28 | PB23
|
|
||||||
* 29 | PB22
|
|
||||||
* 30 | PC28
|
|
||||||
* 31 | PC27
|
|
||||||
* 32 | PC26
|
|
||||||
* 33 | PC25
|
|
||||||
* 34 | PB8
|
|
||||||
* 35 | PB9
|
|
||||||
* 36 | PB6
|
|
||||||
* 37 | PB7
|
|
||||||
* 38 | PB4
|
|
||||||
* 39 | PB5
|
|
||||||
* 40 | PB2
|
|
||||||
* 41 | PB3
|
|
||||||
* 42 | PB0
|
|
||||||
* 43 | PB1
|
|
||||||
* 44 | PA29
|
|
||||||
* 45 | PA19
|
|
||||||
* 46 | PA20
|
|
||||||
* 47 | PA16
|
|
||||||
* 48 | PC29
|
|
||||||
* 49 | PC30
|
|
||||||
* 50 | PA25
|
|
||||||
* 51 | PA26
|
|
||||||
* 52 | PA27
|
|
||||||
* 53 | PA28
|
|
||||||
* A0 | PA24
|
|
||||||
* A1 | PA23
|
|
||||||
* A2 | PA22
|
|
||||||
* A3 | PA6
|
|
||||||
* A4 | PA4
|
|
||||||
* A5 | PA3
|
|
||||||
* A6 | PA2
|
|
||||||
* A7 | PB17
|
|
||||||
* A8 | PB18
|
|
||||||
* A9 | PB19
|
|
||||||
* A10 | Pxx
|
|
||||||
* A11 | Pxx
|
|
||||||
* A12 | PB15 (DAC0)
|
|
||||||
* A13 | PB16 (DAC1)
|
|
||||||
* A14 | Pxx
|
|
||||||
* A15 | Pxx
|
|
||||||
* SDA1 | PB12
|
|
||||||
* SCL1 | PB13
|
|
||||||
*
|
|
||||||
* LEDs | PORT
|
|
||||||
* ----------------+--------
|
|
||||||
* "TX" | (On LPC1343)
|
|
||||||
* "RX" | (On LPC1343)
|
|
||||||
* "L" | PC9
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Pins descriptions
|
|
||||||
*/
|
|
||||||
extern const PinDescription g_APinDescription[]=
|
|
||||||
{
|
|
||||||
// 0 .. 53 - Digital pins
|
|
||||||
// ----------------------
|
|
||||||
// 0/1 - USART0 (Serial)
|
|
||||||
{ PIOA, PIO_PA10A_RXD0, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // RXD0
|
|
||||||
{ PIOA, PIO_PA11A_TXD0, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // TXD0
|
|
||||||
|
|
||||||
// 2
|
|
||||||
{ PIOA, PIO_PA21B_PWML0, ID_PIOA, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM), NO_ADC, NO_ADC, PWM_CH0, NO_TC }, // PWML0
|
|
||||||
{ PIOC, PIO_PC4B_PWML1, ID_PIOC, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM), NO_ADC, NO_ADC, PWM_CH1, NO_TC }, // PWML1
|
|
||||||
{ PIOC, PIO_PC6B_PWML2, ID_PIOC, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM), NO_ADC, NO_ADC, PWM_CH2, NO_TC }, // PWML2
|
|
||||||
|
|
||||||
// 5
|
|
||||||
{ PIOC, PIO_PC8B_PWML3, ID_PIOC, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM), NO_ADC, NO_ADC, PWM_CH3, NO_TC }, // PWML3
|
|
||||||
{ PIOC, PIO_PC21B_PWML4, ID_PIOC, PIO_PERIPH_B, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PWML4
|
|
||||||
{ PIOC, PIO_PC22B_PWML5, ID_PIOC, PIO_PERIPH_B, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PWML5
|
|
||||||
{ PIOC, PIO_PC23B_PWML6, ID_PIOC, PIO_PERIPH_B, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PWML6
|
|
||||||
{ PIOC, PIO_PC24B_PWML7, ID_PIOC, PIO_PERIPH_B, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PWML7
|
|
||||||
// 10
|
|
||||||
{ PIOC, PIO_PC3B_PWMH0, ID_PIOC, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM), NO_ADC, NO_ADC, PWM_CH0, NO_TC }, // PWMH0
|
|
||||||
{ PIOC, PIO_PC5B_PWMH1, ID_PIOC, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM), NO_ADC, NO_ADC, PWM_CH1, NO_TC }, // PWMH1
|
|
||||||
{ PIOC, PIO_PC7B_PWMH2, ID_PIOC, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM), NO_ADC, NO_ADC, PWM_CH2, NO_TC }, // PWMH2
|
|
||||||
|
|
||||||
// 13 - AMBER LED
|
|
||||||
{ PIOC, PIO_PC9B_PWMH3, ID_PIOC, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM), NO_ADC, NO_ADC, PWM_CH3, NO_TC }, // PWMH3
|
|
||||||
|
|
||||||
// 14/15 - USART3 (Serial4)
|
|
||||||
{ PIOD, PIO_PD4B_TXD3, ID_PIOD, PIO_PERIPH_B, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // TXD3
|
|
||||||
{ PIOD, PIO_PD5B_RXD3, ID_PIOD, PIO_PERIPH_B, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // RXD3
|
|
||||||
|
|
||||||
// 16/17 - USART2 (Serial3)
|
|
||||||
{ PIOB, PIO_PB20A_TXD2, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // TXD2
|
|
||||||
{ PIOB, PIO_PB21A_RXD2, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // RXD2
|
|
||||||
|
|
||||||
// 18/19 - USART1 (Serial2)
|
|
||||||
{ PIOA, PIO_PA13A_TXD1, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // TXD1
|
|
||||||
{ PIOA, PIO_PA12A_RXD1, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // RXD1
|
|
||||||
|
|
||||||
// 20/21 - TWI0
|
|
||||||
{ PIOA, PIO_PA17A_TWD0, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // TWD0 - SDA0
|
|
||||||
{ PIOA, PIO_PA18A_TWCK0, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // TWCK0 - SCL0
|
|
||||||
|
|
||||||
// 22
|
|
||||||
{ PIOA, PIO_PA14, ID_PIOA, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 22
|
|
||||||
{ PIOA, PIO_PA15, ID_PIOA, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 23
|
|
||||||
{ PIOD, PIO_PD0, ID_PIOD, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 24
|
|
||||||
{ PIOD, PIO_PD1, ID_PIOD, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 25
|
|
||||||
|
|
||||||
// 26
|
|
||||||
{ PIOD, PIO_PD2, ID_PIOD, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 26
|
|
||||||
{ PIOD, PIO_PD3, ID_PIOD, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 27
|
|
||||||
{ PIOB, PIO_PB23, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 28
|
|
||||||
{ PIOB, PIO_PB22, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 29
|
|
||||||
|
|
||||||
// 30
|
|
||||||
{ PIOC, PIO_PC28, ID_PIOC, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 30
|
|
||||||
{ PIOC, PIO_PC27, ID_PIOC, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 31
|
|
||||||
{ PIOC, PIO_PC26, ID_PIOC, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 32
|
|
||||||
{ PIOC, PIO_PC25, ID_PIOC, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 33
|
|
||||||
|
|
||||||
// 34
|
|
||||||
{ PIOB, PIO_PB8, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 34
|
|
||||||
{ PIOB, PIO_PB9, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 35
|
|
||||||
{ PIOB, PIO_PB6, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 36
|
|
||||||
{ PIOB, PIO_PB7, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 37
|
|
||||||
|
|
||||||
// 38
|
|
||||||
{ PIOB, PIO_PB4, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 38
|
|
||||||
{ PIOB, PIO_PB5, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 39
|
|
||||||
{ PIOB, PIO_PB2, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 40
|
|
||||||
{ PIOB, PIO_PB3, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 41
|
|
||||||
|
|
||||||
// 42
|
|
||||||
{ PIOB, PIO_PB0, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 42
|
|
||||||
{ PIOB, PIO_PB1, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 43
|
|
||||||
{ PIOA, PIO_PA29, ID_PIOA, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 44
|
|
||||||
{ PIOA, PIO_PA19, ID_PIOA, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 45
|
|
||||||
|
|
||||||
// 46
|
|
||||||
{ PIOA, PIO_PA20, ID_PIOA, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 46
|
|
||||||
{ PIOA, PIO_PA16, ID_PIOA, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 47
|
|
||||||
{ PIOC, PIO_PC29, ID_PIOC, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 48
|
|
||||||
{ PIOC, PIO_PC30, ID_PIOC, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 49
|
|
||||||
|
|
||||||
// 50
|
|
||||||
{ PIOA, PIO_PA25A_SPI0_MISO, ID_PIOA, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 50
|
|
||||||
{ PIOA, PIO_PA26A_SPI0_MOSI, ID_PIOA, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 51
|
|
||||||
{ PIOA, PIO_PA27A_SPI0_SPCK, ID_PIOA, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 52
|
|
||||||
{ PIOA, PIO_PA28A_SPI0_NPCS0, ID_PIOA, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 53
|
|
||||||
|
|
||||||
// 54 .. 63 - Analog pins
|
|
||||||
// ----------------------
|
|
||||||
{ PIOA, PIO_PA24X1_AD6, ID_PIOA, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC0, ADC6, NO_PWM, NO_TC }, // AD0
|
|
||||||
{ PIOA, PIO_PA23X1_AD5, ID_PIOA, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC1, ADC5, NO_PWM, NO_TC }, // AD1
|
|
||||||
{ PIOA, PIO_PA22X1_AD4, ID_PIOA, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC2, ADC4, NO_PWM, NO_TC }, // AD2
|
|
||||||
{ PIOA, PIO_PA6X1_AD3, ID_PIOA, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC3, ADC3, NO_PWM, NO_TC }, // AD3
|
|
||||||
// 58
|
|
||||||
{ PIOA, PIO_PA4X1_AD2, ID_PIOA, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC4, ADC2, NO_PWM, NO_TC }, // AD4
|
|
||||||
{ PIOA, PIO_PA3X1_AD1, ID_PIOA, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC5, ADC1, NO_PWM, NO_TC }, // AD5
|
|
||||||
{ PIOA, PIO_PA2X1_AD0, ID_PIOA, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC6, ADC0, NO_PWM, TC0_CHA1 }, // AD6
|
|
||||||
{ PIOB, PIO_PB17X1_AD10, ID_PIOB, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC7, ADC10, NO_PWM, NO_TC }, // AD7
|
|
||||||
// 62
|
|
||||||
{ PIOB, PIO_PB18X1_AD11, ID_PIOB, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC8, ADC11, NO_PWM, NO_TC }, // AD8
|
|
||||||
{ PIOB, PIO_PB19X1_AD12, ID_PIOB, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC9, ADC12, NO_PWM, NO_TC }, // AD9
|
|
||||||
|
|
||||||
// 64/65 - TWI1
|
|
||||||
{ PIOB, PIO_PB12A_TWD1, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // TWD1 - SDA1
|
|
||||||
{ PIOB, PIO_PB13A_TWCK1, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // TWCK1 - SCL1
|
|
||||||
|
|
||||||
// 66/67 - Debug UART
|
|
||||||
{ PIOA, PIO_PA8A_URXD, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // UART RXD
|
|
||||||
{ PIOA, PIO_PA9A_UTXD, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // UART TXD
|
|
||||||
|
|
||||||
// 68 .. 74 - "All pins" masks
|
|
||||||
|
|
||||||
// 68 - TWI0 all pins
|
|
||||||
{ PIOA, PIO_PA17A_TWD0|PIO_PA18A_TWCK0, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NO_ADC, NO_PWM, NO_TC },
|
|
||||||
// 69 - TWI1 all pins
|
|
||||||
{ PIOB, PIO_PB12A_TWD1|PIO_PB13A_TWCK1, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NO_ADC, NO_PWM, NO_TC },
|
|
||||||
// 70 - UART (Serial) all pins
|
|
||||||
{ PIOA, PIO_PA8A_URXD|PIO_PA9A_UTXD, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NO_ADC, NO_PWM, NO_TC },
|
|
||||||
// 71 - USART0 (Serial2) all pins
|
|
||||||
{ PIOA, PIO_PA10A_RXD0|PIO_PA11A_TXD0, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NO_ADC, NO_PWM, NO_TC },
|
|
||||||
// 72 - USART1 (Serial3) all pins
|
|
||||||
{ PIOA, PIO_PA12A_RXD1|PIO_PA13A_TXD1, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NO_ADC, NO_PWM, NO_TC },
|
|
||||||
// 73 - USART2 (Serial4) all pins
|
|
||||||
{ PIOB, PIO_PB21A_RXD2|PIO_PB20A_TXD2, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NO_ADC, NO_PWM, NO_TC },
|
|
||||||
// 74 - USART3 (Serial5) all pins
|
|
||||||
{ PIOD, PIO_PD5B_RXD3|PIO_PD4B_TXD3, ID_PIOD, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NO_ADC, NO_PWM, NO_TC },
|
|
||||||
|
|
||||||
// 75 - USB
|
|
||||||
{ PIOB, PIO_PB11A_UOTGID|PIO_PB10A_UOTGVBOF, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL,NO_ADC, NO_ADC, NO_PWM, NO_TC }, // ID - VBOF
|
|
||||||
|
|
||||||
// END
|
|
||||||
{ NULL, 0, 0, PIO_NOT_A_PIN, PIO_DEFAULT, 0, NO_ADC, NO_ADC, NO_PWM, NO_TC }
|
|
||||||
} ;
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* UART objects
|
|
||||||
*/
|
|
||||||
RingBuffer rx_buffer1 ;
|
|
||||||
|
|
||||||
UARTClass Serial1( UART, UART_IRQn, ID_UART, &rx_buffer1 ) ;
|
|
||||||
|
|
||||||
// IT handlers
|
|
||||||
void UART_Handler(void)
|
|
||||||
{
|
|
||||||
Serial1.IrqHandler() ;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
/*
|
|
||||||
* USART objects
|
|
||||||
*/
|
|
||||||
RingBuffer rx_buffer2 ;
|
|
||||||
RingBuffer rx_buffer3 ;
|
|
||||||
RingBuffer rx_buffer4 ;
|
|
||||||
RingBuffer rx_buffer5 ;
|
|
||||||
|
|
||||||
USARTClass Serial2( USART0, USART0_IRQn, ID_USART0, &rx_buffer2 ) ;
|
|
||||||
USARTClass Serial3( USART1, USART1_IRQn, ID_USART1, &rx_buffer3 ) ;
|
|
||||||
USARTClass Serial4( USART2, USART2_IRQn, ID_USART2, &rx_buffer4 ) ;
|
|
||||||
USARTClass Serial5( USART3, USART3_IRQn, ID_USART3, &rx_buffer5 ) ;
|
|
||||||
|
|
||||||
// IT handlers
|
|
||||||
void USART0_Handler( void )
|
|
||||||
{
|
|
||||||
Serial2.IrqHandler() ;
|
|
||||||
}
|
|
||||||
|
|
||||||
void USART1_Handler( void )
|
|
||||||
{
|
|
||||||
Serial3.IrqHandler() ;
|
|
||||||
}
|
|
||||||
|
|
||||||
void USART2_Handler( void )
|
|
||||||
{
|
|
||||||
Serial4.IrqHandler() ;
|
|
||||||
}
|
|
||||||
|
|
||||||
void USART3_Handler( void )
|
|
||||||
{
|
|
||||||
Serial5.IrqHandler() ;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
extern void init( void )
|
|
||||||
{
|
|
||||||
SystemInit() ;
|
|
||||||
|
|
||||||
// Set Systick to 1ms interval, common to all SAM3 variants
|
|
||||||
if ( SysTick_Config( SystemCoreClock / 1000 ) )
|
|
||||||
{
|
|
||||||
// Capture error
|
|
||||||
while ( 1 ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Disable watchdog, common to all SAM variants
|
|
||||||
WDT_Disable( WDT ) ;
|
|
||||||
|
|
||||||
// Initialize Serial port UART, common to all SAM3 variants
|
|
||||||
PIO_Configure(
|
|
||||||
g_APinDescription[PINS_UART].pPort,
|
|
||||||
g_APinDescription[PINS_UART].ulPinType,
|
|
||||||
g_APinDescription[PINS_UART].ulPin,
|
|
||||||
g_APinDescription[PINS_UART].ulPinConfiguration);
|
|
||||||
|
|
||||||
// Initialize Serial ports USART
|
|
||||||
PIO_Configure(
|
|
||||||
g_APinDescription[PINS_USART0].pPort,
|
|
||||||
g_APinDescription[PINS_USART0].ulPinType,
|
|
||||||
g_APinDescription[PINS_USART0].ulPin,
|
|
||||||
g_APinDescription[PINS_USART0].ulPinConfiguration);
|
|
||||||
PIO_Configure(
|
|
||||||
g_APinDescription[PINS_USART1].pPort,
|
|
||||||
g_APinDescription[PINS_USART1].ulPinType,
|
|
||||||
g_APinDescription[PINS_USART1].ulPin,
|
|
||||||
g_APinDescription[PINS_USART1].ulPinConfiguration);
|
|
||||||
PIO_Configure(
|
|
||||||
g_APinDescription[PINS_USART2].pPort,
|
|
||||||
g_APinDescription[PINS_USART2].ulPinType,
|
|
||||||
g_APinDescription[PINS_USART2].ulPin,
|
|
||||||
g_APinDescription[PINS_USART2].ulPinConfiguration);
|
|
||||||
PIO_Configure(
|
|
||||||
g_APinDescription[PINS_USART3].pPort,
|
|
||||||
g_APinDescription[PINS_USART3].ulPinType,
|
|
||||||
g_APinDescription[PINS_USART3].ulPin,
|
|
||||||
g_APinDescription[PINS_USART3].ulPinConfiguration);
|
|
||||||
|
|
||||||
// Initialize USB
|
|
||||||
PIO_Configure(
|
|
||||||
g_APinDescription[PINS_USB].pPort,
|
|
||||||
g_APinDescription[PINS_USB].ulPinType,
|
|
||||||
g_APinDescription[PINS_USB].ulPin,
|
|
||||||
g_APinDescription[PINS_USB].ulPinConfiguration);
|
|
||||||
|
|
||||||
// Initialize 10bit Analog Controller
|
|
||||||
pmc_enable_periph_clk( ID_ADC ) ;
|
|
||||||
adc_init( ADC, SystemCoreClock, ADC_FREQ_MAX, ADC_STARTUP_FAST ) ;
|
|
||||||
adc_configure_timing(ADC, 0, ADC_SETTLING_TIME_3, 1);
|
|
||||||
adc_configure_trigger(ADC, ADC_TRIG_SW, 0); // Disable hardware trigger.
|
|
||||||
adc_disable_interrupt( ADC, 0xFFFFFFFF ) ; // Disable all ADC interrupts.
|
|
||||||
adc_disable_all_channel( ADC ) ;
|
|
||||||
|
|
||||||
// Initialize analogOutput module
|
|
||||||
analogOutputInit();
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,188 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright (c) 2012 Google, Inc. All right reserved.
|
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU Lesser General Public
|
|
||||||
License as published by the Free Software Foundation; either
|
|
||||||
version 2.1 of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
This library is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
See the GNU Lesser General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Lesser General Public
|
|
||||||
License along with this library; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _VARIANT_ADK2_
|
|
||||||
#define _VARIANT_ADK2_
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------
|
|
||||||
* Headers
|
|
||||||
*----------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
// We have native USB on this variant
|
|
||||||
//#define USBCON
|
|
||||||
|
|
||||||
#include "Arduino.h"
|
|
||||||
#ifdef __cplusplus
|
|
||||||
#include "UARTClass.h"
|
|
||||||
#include "USARTClass.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C"{
|
|
||||||
#endif // __cplusplus
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Libc porting layers
|
|
||||||
*/
|
|
||||||
#if defined ( __GNUC__ ) /* GCC CS3 */
|
|
||||||
# include <syscalls.h> /** RedHat Newlib minimal stub */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------
|
|
||||||
* Definitions
|
|
||||||
*----------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#ifndef adk2
|
|
||||||
#define adk2
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/** Name of the board */
|
|
||||||
#define VARIANT_NAME "ADK2"
|
|
||||||
|
|
||||||
/** Frequency of the board main oscillator */
|
|
||||||
#define VARIANT_MAINOSC 12000000
|
|
||||||
|
|
||||||
/** Master clock frequency */
|
|
||||||
#define VARIANT_MCK 84000000
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------
|
|
||||||
* Pins
|
|
||||||
*----------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
// Number of pins defined in PinDescription array
|
|
||||||
#define PINS_COUNT (75u)
|
|
||||||
|
|
||||||
// LEDs
|
|
||||||
#define PIN_LED_13 (13u)
|
|
||||||
#define PIN_LED_RXL (73u) // fixme
|
|
||||||
#define PIN_LED_TXL (74u) // fixme
|
|
||||||
#define PIN_LED PIN_LED_13
|
|
||||||
#define PIN_LED2 PIN_LED_RXL // fixme
|
|
||||||
#define PIN_LED3 PIN_LED_TXL // fixme
|
|
||||||
|
|
||||||
/*
|
|
||||||
* SPI Interfaces
|
|
||||||
*/
|
|
||||||
#define SPI_INTERFACES_COUNT 1
|
|
||||||
|
|
||||||
#define SPI_INTERFACE SPI
|
|
||||||
#define SPI_INTERFACE_ID ID_SPI
|
|
||||||
#define PIN_SPI_SS (53u)
|
|
||||||
#define PIN_SPI_MOSI (51u)
|
|
||||||
#define PIN_SPI_MISO (50u)
|
|
||||||
#define PIN_SPI_SCK (52u)
|
|
||||||
|
|
||||||
static const uint8_t SS = 53 ;
|
|
||||||
static const uint8_t MOSI = 51 ;
|
|
||||||
static const uint8_t MISO = 50 ;
|
|
||||||
static const uint8_t SCK = 52 ;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Wire Interfaces
|
|
||||||
*/
|
|
||||||
#define WIRE_INTERFACES_COUNT 2
|
|
||||||
|
|
||||||
#define PIN_WIRE_SDA (20u)
|
|
||||||
#define PIN_WIRE_SCL (21u)
|
|
||||||
#define WIRE_INTERFACE TWI0
|
|
||||||
#define WIRE_INTERFACE_ID ID_TWI0
|
|
||||||
#define WIRE_ISR_HANDLER TWI1_IrqHandler
|
|
||||||
|
|
||||||
#define PIN_WIRE1_SDA (64u)
|
|
||||||
#define PIN_WIRE1_SCL (65u)
|
|
||||||
#define WIRE1_INTERFACE TWI1
|
|
||||||
#define WIRE1_INTERFACE_ID ID_TWI1
|
|
||||||
#define WIRE1_ISR_HANDLER TWI0_IrqHandler
|
|
||||||
|
|
||||||
/*
|
|
||||||
* UART/USART Interfaces
|
|
||||||
*/
|
|
||||||
#define PINS_UART (70u)
|
|
||||||
|
|
||||||
#define PINS_USART0 (71u)
|
|
||||||
#define PINS_USART1 (72u)
|
|
||||||
#define PINS_USART2 (73u)
|
|
||||||
#define PINS_USART3 (74u)
|
|
||||||
|
|
||||||
/*
|
|
||||||
* USB Interfaces
|
|
||||||
*/
|
|
||||||
#define PINS_USB (75u)
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Analog pins
|
|
||||||
*/
|
|
||||||
static const uint8_t A0 = 54;
|
|
||||||
static const uint8_t A1 = 55;
|
|
||||||
static const uint8_t A2 = 56;
|
|
||||||
static const uint8_t A3 = 57;
|
|
||||||
static const uint8_t A4 = 58;
|
|
||||||
static const uint8_t A5 = 59;
|
|
||||||
static const uint8_t A6 = 60;
|
|
||||||
static const uint8_t A7 = 61;
|
|
||||||
static const uint8_t A8 = 62;
|
|
||||||
static const uint8_t A9 = 63;
|
|
||||||
//static const uint8_t A10 = 64;
|
|
||||||
//static const uint8_t A11 = 65;
|
|
||||||
//static const uint8_t A12 = 66;
|
|
||||||
//static const uint8_t A13 = 67;
|
|
||||||
// static const uint8_t A14 = ;
|
|
||||||
// static const uint8_t A15 = ;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* PWM
|
|
||||||
*/
|
|
||||||
#define PWM_INTERFACE PWM
|
|
||||||
#define PWM_INTERFACE_ID ID_PWM
|
|
||||||
#define PWM_FREQUENCY 1000
|
|
||||||
#define PWM_MAX_DUTY_CYCLE 255
|
|
||||||
#define PWM_MIN_DUTY_CYCLE 0
|
|
||||||
|
|
||||||
/*
|
|
||||||
* TC
|
|
||||||
*/
|
|
||||||
#define TC_INTERFACE TC0
|
|
||||||
#define TC_INTERFACE_ID ID_TC0
|
|
||||||
#define TC_FREQUENCY 1000
|
|
||||||
#define TC_MAX_DUTY_CYCLE 255
|
|
||||||
#define TC_MIN_DUTY_CYCLE 0
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------
|
|
||||||
* Arduino objects - C++ only
|
|
||||||
*----------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
|
|
||||||
extern UARTClass Serial1 ;
|
|
||||||
|
|
||||||
extern USARTClass Serial2 ;
|
|
||||||
extern USARTClass Serial3 ;
|
|
||||||
extern USARTClass Serial4 ;
|
|
||||||
extern USARTClass Serial5 ;
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* _VARIANT_ADK2_ */
|
|
||||||
|
|
Binary file not shown.
Binary file not shown.
@ -1,42 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (c) 2011 Arduino. All right reserved.
|
|
||||||
#
|
|
||||||
# This library is free software; you can redistribute it and/or
|
|
||||||
# modify it under the terms of the GNU Lesser General Public
|
|
||||||
# License as published by the Free Software Foundation; either
|
|
||||||
# version 2.1 of the License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This library is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
# See the GNU Lesser General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU Lesser General Public
|
|
||||||
# License along with this library; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
#
|
|
||||||
|
|
||||||
SUBMAKE_OPTIONS=--no-builtin-rules --no-builtin-variables --no-print-directory
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
|
||||||
# Rules
|
|
||||||
#-------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
all: arduino_due_u
|
|
||||||
|
|
||||||
.PHONY: arduino_due_u
|
|
||||||
arduino_due_u:
|
|
||||||
@echo ------------------------------------------------------------------------------------
|
|
||||||
@echo --- Making arduino_due_u
|
|
||||||
@$(MAKE) DEBUG=1 $(SUBMAKE_OPTIONS) -f libvariant_arduino_due_u.mk
|
|
||||||
# @$(MAKE) $(SUBMAKE_OPTIONS) -f libvariant_arduino_due.mk
|
|
||||||
@echo ------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
.PHONY: clean
|
|
||||||
clean:
|
|
||||||
@echo ------------------------------------------------------------------------------------
|
|
||||||
@echo --- Cleaning arduino_due_u
|
|
||||||
@$(MAKE) DEBUG=1 $(SUBMAKE_OPTIONS) -f libvariant_arduino_due_u.mk $@
|
|
||||||
# @$(MAKE) $(SUBMAKE_OPTIONS) -f libvariant_arduino_due.mk $@
|
|
||||||
@echo ------------------------------------------------------------------------------------
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (c) 2011 Arduino. All right reserved.
|
|
||||||
#
|
|
||||||
# This library is free software; you can redistribute it and/or
|
|
||||||
# modify it under the terms of the GNU Lesser General Public
|
|
||||||
# License as published by the Free Software Foundation; either
|
|
||||||
# version 2.1 of the License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This library is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
# See the GNU Lesser General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU Lesser General Public
|
|
||||||
# License along with this library; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
#
|
|
||||||
|
|
||||||
# Optimization level
|
|
||||||
# -O1 Optimize
|
|
||||||
# -O2 Optimize even more
|
|
||||||
# -O3 Optimize yet more
|
|
||||||
# -O0 Reduce compilation time and make debugging produce the expected results
|
|
||||||
# -Os Optimize for size
|
|
||||||
OPTIMIZATION = -g -O0 -DDEBUG
|
|
@ -1,82 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (c) 2011 Arduino. All right reserved.
|
|
||||||
#
|
|
||||||
# This library is free software; you can redistribute it and/or
|
|
||||||
# modify it under the terms of the GNU Lesser General Public
|
|
||||||
# License as published by the Free Software Foundation; either
|
|
||||||
# version 2.1 of the License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This library is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
# See the GNU Lesser General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU Lesser General Public
|
|
||||||
# License along with this library; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
#
|
|
||||||
|
|
||||||
# Tool suffix when cross-compiling
|
|
||||||
CROSS_COMPILE = $(ARM_GCC_TOOLCHAIN)/arm-none-eabi-
|
|
||||||
|
|
||||||
# Compilation tools
|
|
||||||
AR = $(CROSS_COMPILE)ar
|
|
||||||
CC = $(CROSS_COMPILE)gcc
|
|
||||||
CXX = $(CROSS_COMPILE)g++
|
|
||||||
AS = $(CROSS_COMPILE)as
|
|
||||||
NM = $(CROSS_COMPILE)nm
|
|
||||||
ifeq ($(OS),Windows_NT)
|
|
||||||
RM=cs-rm -Rf
|
|
||||||
else
|
|
||||||
RM=rm -Rf
|
|
||||||
endif
|
|
||||||
|
|
||||||
SEP=\\
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------------------
|
|
||||||
# C Flags
|
|
||||||
|
|
||||||
CFLAGS += -Wall -Wchar-subscripts -Wcomment -Wformat=2 -Wimplicit-int
|
|
||||||
CFLAGS += -Werror-implicit-function-declaration -Wmain -Wparentheses
|
|
||||||
CFLAGS += -Wsequence-point -Wreturn-type -Wswitch -Wtrigraphs -Wunused
|
|
||||||
CFLAGS += -Wuninitialized -Wunknown-pragmas -Wfloat-equal -Wundef
|
|
||||||
CFLAGS += -Wshadow -Wpointer-arith -Wbad-function-cast -Wwrite-strings
|
|
||||||
CFLAGS += -Wsign-compare -Waggregate-return -Wstrict-prototypes
|
|
||||||
CFLAGS += -Wmissing-prototypes -Wmissing-declarations
|
|
||||||
CFLAGS += -Wformat -Wmissing-format-attribute -Wno-deprecated-declarations
|
|
||||||
CFLAGS += -Wpacked -Wredundant-decls -Wnested-externs -Winline -Wlong-long
|
|
||||||
CFLAGS += -Wunreachable-code
|
|
||||||
CFLAGS += -Wcast-align
|
|
||||||
#CFLAGS += -Wmissing-noreturn
|
|
||||||
#CFLAGS += -Wconversion
|
|
||||||
|
|
||||||
CFLAGS += --param max-inline-insns-single=500 -mcpu=cortex-m3 -mthumb -mlong-calls -ffunction-sections -fdata-sections -nostdlib -std=c99
|
|
||||||
CFLAGS += $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) -D$(VARIANT)
|
|
||||||
|
|
||||||
# To reduce application size use only integer printf function.
|
|
||||||
CFLAGS += -Dprintf=iprintf
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------------------
|
|
||||||
# CPP Flags
|
|
||||||
|
|
||||||
CPPFLAGS += -Wall -Wchar-subscripts -Wcomment -Wformat=2
|
|
||||||
CPPFLAGS += -Wmain -Wparentheses -Wcast-align -Wunreachable-code
|
|
||||||
CPPFLAGS += -Wsequence-point -Wreturn-type -Wswitch -Wtrigraphs -Wunused
|
|
||||||
CPPFLAGS += -Wuninitialized -Wunknown-pragmas -Wfloat-equal -Wundef
|
|
||||||
CPPFLAGS += -Wshadow -Wpointer-arith -Wwrite-strings
|
|
||||||
CPPFLAGS += -Wsign-compare -Waggregate-return -Wmissing-declarations
|
|
||||||
CPPFLAGS += -Wformat -Wmissing-format-attribute -Wno-deprecated-declarations
|
|
||||||
CPPFLAGS += -Wpacked -Wredundant-decls -Winline -Wlong-long
|
|
||||||
#CPPFLAGS += -Wmissing-noreturn
|
|
||||||
#CPPFLAGS += -Wconversion
|
|
||||||
|
|
||||||
CPPFLAGS += --param max-inline-insns-single=500 -mcpu=cortex-m3 -mthumb -mlong-calls -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -std=c++98
|
|
||||||
CPPFLAGS += $(OPTIMIZATION) $(INCLUDES) -D$(CHIP)
|
|
||||||
|
|
||||||
# To reduce application size use only integer printf function.
|
|
||||||
CPPFLAGS += -Dprintf=iprintf
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------------------
|
|
||||||
# ASM Flags
|
|
||||||
|
|
||||||
ASFLAGS = -mcpu=cortex-m3 -mthumb -Wall -g $(OPTIMIZATION) $(INCLUDES)
|
|
@ -1,183 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (c) 2012 Arduino. All right reserved.
|
|
||||||
#
|
|
||||||
# This library is free software; you can redistribute it and/or
|
|
||||||
# modify it under the terms of the GNU Lesser General Public
|
|
||||||
# License as published by the Free Software Foundation; either
|
|
||||||
# version 2.1 of the License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This library is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
# See the GNU Lesser General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU Lesser General Public
|
|
||||||
# License along with this library; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
#
|
|
||||||
|
|
||||||
# Makefile for compiling libArduino
|
|
||||||
.SUFFIXES: .o .a .c .s
|
|
||||||
|
|
||||||
CHIP=__SAM3U4E__
|
|
||||||
VARIANT=arduino_due_u
|
|
||||||
LIBNAME=libvariant_$(VARIANT)
|
|
||||||
TOOLCHAIN=gcc
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
|
||||||
# Path
|
|
||||||
#-------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
# Output directories
|
|
||||||
OUTPUT_BIN = ../../../cores/arduino
|
|
||||||
|
|
||||||
# Libraries
|
|
||||||
PROJECT_BASE_PATH = ..
|
|
||||||
SYSTEM_PATH = ../../../system
|
|
||||||
CMSIS_ROOT_PATH = $(SYSTEM_PATH)/CMSIS
|
|
||||||
CMSIS_ARM_PATH=$(CMSIS_ROOT_PATH)/CMSIS/Include
|
|
||||||
CMSIS_ATMEL_PATH=$(CMSIS_ROOT_PATH)/Device/ATMEL
|
|
||||||
#CMSIS_CHIP_PATH=$(CMSIS_ROOT_PATH)/Device/ATMEL/$(CHIP_SERIE)
|
|
||||||
|
|
||||||
ARDUINO_PATH = ../../../cores/arduino
|
|
||||||
VARIANT_BASE_PATH = ../../../variants
|
|
||||||
VARIANT_PATH = ../../../variants/$(VARIANT)
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
|
||||||
# Files
|
|
||||||
#-------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#vpath %.h $(PROJECT_BASE_PATH) $(SYSTEM_PATH) $(VARIANT_PATH)
|
|
||||||
vpath %.cpp $(PROJECT_BASE_PATH)
|
|
||||||
|
|
||||||
VPATH+=$(PROJECT_BASE_PATH)
|
|
||||||
|
|
||||||
INCLUDES =
|
|
||||||
#INCLUDES += -I$(PROJECT_BASE_PATH)
|
|
||||||
INCLUDES += -I$(ARDUINO_PATH)
|
|
||||||
INCLUDES += -I$(ARDUINO_PATH)/USB
|
|
||||||
INCLUDES += -I$(SYSTEM_PATH)
|
|
||||||
INCLUDES += -I$(SYSTEM_PATH)/libsam
|
|
||||||
INCLUDES += -I$(VARIANT_BASE_PATH)
|
|
||||||
INCLUDES += -I$(VARIANT_PATH)
|
|
||||||
INCLUDES += -I$(CMSIS_ARM_PATH)
|
|
||||||
INCLUDES += -I$(CMSIS_ATMEL_PATH)
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
|
||||||
ifdef DEBUG
|
|
||||||
include debug.mk
|
|
||||||
else
|
|
||||||
include release.mk
|
|
||||||
endif
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
|
||||||
# Tools
|
|
||||||
#-------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
include $(TOOLCHAIN).mk
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
|
||||||
ifdef DEBUG
|
|
||||||
OUTPUT_OBJ=debug
|
|
||||||
OUTPUT_LIB_POSTFIX=dbg
|
|
||||||
else
|
|
||||||
OUTPUT_OBJ=release
|
|
||||||
OUTPUT_LIB_POSTFIX=rel
|
|
||||||
endif
|
|
||||||
|
|
||||||
OUTPUT_LIB=$(LIBNAME)_$(TOOLCHAIN)_$(OUTPUT_LIB_POSTFIX).a
|
|
||||||
OUTPUT_PATH=$(OUTPUT_OBJ)_$(VARIANT)
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
|
||||||
# C source files and objects
|
|
||||||
#-------------------------------------------------------------------------------
|
|
||||||
C_SRC=$(wildcard $(PROJECT_BASE_PATH)/*.c)
|
|
||||||
|
|
||||||
C_OBJ_TEMP = $(patsubst %.c, %.o, $(notdir $(C_SRC)))
|
|
||||||
|
|
||||||
# during development, remove some files
|
|
||||||
C_OBJ_FILTER=
|
|
||||||
|
|
||||||
C_OBJ=$(filter-out $(C_OBJ_FILTER), $(C_OBJ_TEMP))
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
|
||||||
# CPP source files and objects
|
|
||||||
#-------------------------------------------------------------------------------
|
|
||||||
CPP_SRC=$(wildcard $(PROJECT_BASE_PATH)/*.cpp)
|
|
||||||
|
|
||||||
CPP_OBJ_TEMP = $(patsubst %.cpp, %.o, $(notdir $(CPP_SRC)))
|
|
||||||
|
|
||||||
# during development, remove some files
|
|
||||||
CPP_OBJ_FILTER=
|
|
||||||
|
|
||||||
CPP_OBJ=$(filter-out $(CPP_OBJ_FILTER), $(CPP_OBJ_TEMP))
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
|
||||||
# Assembler source files and objects
|
|
||||||
#-------------------------------------------------------------------------------
|
|
||||||
A_SRC=$(wildcard $(PROJECT_BASE_PATH)/*.s)
|
|
||||||
|
|
||||||
A_OBJ_TEMP=$(patsubst %.s, %.o, $(notdir $(A_SRC)))
|
|
||||||
|
|
||||||
# during development, remove some files
|
|
||||||
A_OBJ_FILTER=
|
|
||||||
|
|
||||||
A_OBJ=$(filter-out $(A_OBJ_FILTER), $(A_OBJ_TEMP))
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
|
||||||
# Rules
|
|
||||||
#-------------------------------------------------------------------------------
|
|
||||||
all: $(VARIANT)
|
|
||||||
|
|
||||||
$(VARIANT): create_output $(OUTPUT_LIB)
|
|
||||||
|
|
||||||
.PHONY: create_output
|
|
||||||
create_output:
|
|
||||||
@echo ------------------------------------------------------------------------------------
|
|
||||||
@echo -------------------------
|
|
||||||
@echo --- Preparing variant $(VARIANT) files in $(OUTPUT_PATH) $(OUTPUT_BIN)
|
|
||||||
@echo -------------------------
|
|
||||||
# @echo *$(INCLUDES)
|
|
||||||
# @echo -------------------------
|
|
||||||
# @echo *$(C_SRC)
|
|
||||||
# @echo -------------------------
|
|
||||||
# @echo *$(C_OBJ)
|
|
||||||
# @echo -------------------------
|
|
||||||
# @echo *$(addprefix $(OUTPUT_PATH)/, $(C_OBJ))
|
|
||||||
# @echo -------------------------
|
|
||||||
# @echo *$(CPP_SRC)
|
|
||||||
# @echo -------------------------
|
|
||||||
# @echo *$(CPP_OBJ)
|
|
||||||
# @echo -------------------------
|
|
||||||
# @echo *$(addprefix $(OUTPUT_PATH)/, $(CPP_OBJ))
|
|
||||||
# @echo -------------------------
|
|
||||||
# @echo *$(A_SRC)
|
|
||||||
# @echo -------------------------
|
|
||||||
|
|
||||||
-@mkdir $(OUTPUT_PATH) 1>NUL 2>&1
|
|
||||||
@echo ------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
$(addprefix $(OUTPUT_PATH)/,$(C_OBJ)): $(OUTPUT_PATH)/%.o: %.c
|
|
||||||
# @"$(CC)" -v -c $(CFLAGS) $< -o $@
|
|
||||||
@"$(CC)" -c $(CFLAGS) $< -o $@
|
|
||||||
|
|
||||||
$(addprefix $(OUTPUT_PATH)/,$(CPP_OBJ)): $(OUTPUT_PATH)/%.o: %.cpp
|
|
||||||
# @"$(CC)" -c $(CPPFLAGS) $< -o $@
|
|
||||||
@"$(CC)" -xc++ -c $(CPPFLAGS) $< -o $@
|
|
||||||
|
|
||||||
$(addprefix $(OUTPUT_PATH)/,$(A_OBJ)): $(OUTPUT_PATH)/%.o: %.s
|
|
||||||
@"$(AS)" -c $(ASFLAGS) $< -o $@
|
|
||||||
|
|
||||||
$(OUTPUT_LIB): $(addprefix $(OUTPUT_PATH)/, $(C_OBJ)) $(addprefix $(OUTPUT_PATH)/, $(CPP_OBJ)) $(addprefix $(OUTPUT_PATH)/, $(A_OBJ))
|
|
||||||
@"$(AR)" -v -r "$(OUTPUT_BIN)/$@" $^
|
|
||||||
@"$(NM)" "$(OUTPUT_BIN)/$@" > "$(OUTPUT_BIN)/$@.txt"
|
|
||||||
|
|
||||||
|
|
||||||
.PHONY: clean
|
|
||||||
clean:
|
|
||||||
@echo ------------------------------------------------------------------------------------
|
|
||||||
@echo --- Cleaning $(VARIANT) files [$(OUTPUT_PATH)$(SEP)*.o]
|
|
||||||
-@$(RM) $(OUTPUT_PATH) 1>NUL 2>&1
|
|
||||||
-@$(RM) $(OUTPUT_BIN)/$(OUTPUT_LIB) 1>NUL 2>&1
|
|
||||||
@echo ------------------------------------------------------------------------------------
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (c) 2011 Arduino. All right reserved.
|
|
||||||
#
|
|
||||||
# This library is free software; you can redistribute it and/or
|
|
||||||
# modify it under the terms of the GNU Lesser General Public
|
|
||||||
# License as published by the Free Software Foundation; either
|
|
||||||
# version 2.1 of the License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This library is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
# See the GNU Lesser General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU Lesser General Public
|
|
||||||
# License along with this library; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
#
|
|
||||||
|
|
||||||
# Optimization level
|
|
||||||
# -O1 Optimize
|
|
||||||
# -O2 Optimize even more
|
|
||||||
# -O3 Optimize yet more
|
|
||||||
# -O0 Reduce compilation time and make debugging produce the expected results
|
|
||||||
# -Os Optimize for size
|
|
||||||
OPTIMIZATION = -Os
|
|
@ -1,31 +0,0 @@
|
|||||||
#*******************************************************
|
|
||||||
#
|
|
||||||
# Connect to J-Link and debug application in flash.
|
|
||||||
#
|
|
||||||
|
|
||||||
# define 'reset' command
|
|
||||||
define reset
|
|
||||||
|
|
||||||
# Connect to the J-Link gdb server
|
|
||||||
target remote localhost:2331
|
|
||||||
# Reset the chip to get to a known state
|
|
||||||
monitor reset
|
|
||||||
|
|
||||||
# Select flash device
|
|
||||||
monitor flash device = AT91SAM3U4E
|
|
||||||
# Enable flash download and flash breakpoints
|
|
||||||
monitor flash download = 1
|
|
||||||
# Load the program
|
|
||||||
load
|
|
||||||
|
|
||||||
# Reset peripheral (RSTC_CR)
|
|
||||||
set *0x400e1200 = 0xA5000004
|
|
||||||
|
|
||||||
# Initializing PC and stack pointer
|
|
||||||
mon reg sp=(0x80000)
|
|
||||||
set *0x80004 = *0x80004 & 0xFFFFFFFE
|
|
||||||
mon reg pc=(0x80004)
|
|
||||||
info reg
|
|
||||||
|
|
||||||
# end of 'reset' command
|
|
||||||
end
|
|
@ -1,23 +0,0 @@
|
|||||||
#*************************************************
|
|
||||||
#
|
|
||||||
# Connect to J-Link and debug application in sram on SAM3U
|
|
||||||
#
|
|
||||||
# Note:
|
|
||||||
# First,users should do Step1 and Step2 according to your project,
|
|
||||||
# then do Step3.
|
|
||||||
|
|
||||||
# Step1: Connect to the J-Link gdb server
|
|
||||||
#target remote localhost:2331
|
|
||||||
#mon reset
|
|
||||||
|
|
||||||
# Step2: Load file(eg. getting-started project)
|
|
||||||
#load bin/basic-dhrystone-project-at91sam3u-ek-at91sam3u4-sram.elf
|
|
||||||
#symbol-file bin/basic-dhrystone-project-at91sam3u-ek-at91sam3u4-sram.elf
|
|
||||||
|
|
||||||
# Step3: Initializing PC and stack pointer
|
|
||||||
# Perpheral reset RSTC_CR
|
|
||||||
set *0x400e1200 = 0xA5000004
|
|
||||||
# Modify pc value to even before writing pc register
|
|
||||||
mon reg sp=(0x20000000)
|
|
||||||
set *0x20000004 = *0x20000004 & 0xFFFFFFFE
|
|
||||||
mon reg pc=(0x20000004)
|
|
@ -1,44 +0,0 @@
|
|||||||
// ---------------------------------------------------------
|
|
||||||
// ATMEL Microcontroller Software Support - ROUSSET -
|
|
||||||
// ---------------------------------------------------------
|
|
||||||
// The software is delivered "AS IS" without warranty or
|
|
||||||
// condition of any kind, either express, implied or
|
|
||||||
// statutory. This includes without limitation any warranty
|
|
||||||
// or condition with respect to merchantability or fitness
|
|
||||||
// for any particular purpose, or against the infringements of
|
|
||||||
// intellectual property rights of others.
|
|
||||||
// ---------------------------------------------------------
|
|
||||||
// File: at91sam3u-ek-flash.mac
|
|
||||||
// User setup file for CSPY debugger.
|
|
||||||
// ---------------------------------------------------------
|
|
||||||
__var __mac_i;
|
|
||||||
__var __mac_pt;
|
|
||||||
|
|
||||||
/*********************************************************************
|
|
||||||
*
|
|
||||||
* execUserReset()
|
|
||||||
*/
|
|
||||||
execUserReset()
|
|
||||||
{
|
|
||||||
__message "------------------------------ execUserReset ---------------------------------";
|
|
||||||
__message "-------------------------------Set PC Reset ----------------------------------";
|
|
||||||
|
|
||||||
__hwReset(0);
|
|
||||||
|
|
||||||
// perpheral reset RSTC_CR
|
|
||||||
__writeMemory32(0xA5000004,0x400e1200,"Memory");
|
|
||||||
}
|
|
||||||
|
|
||||||
/*********************************************************************
|
|
||||||
*
|
|
||||||
* execUserPreload()
|
|
||||||
*/
|
|
||||||
execUserPreload()
|
|
||||||
{
|
|
||||||
__message "------------------------------ execUserPreload ---------------------------------";
|
|
||||||
|
|
||||||
__hwReset(0); //* Hardware Reset: CPU is automatically halted after the reset
|
|
||||||
|
|
||||||
// perpheral reset RSTC_CR
|
|
||||||
__writeMemory32(0xA5000004,0x400e1200,"Memory");
|
|
||||||
}
|
|
@ -1,44 +0,0 @@
|
|||||||
// ---------------------------------------------------------
|
|
||||||
// ATMEL Microcontroller Software Support - ROUSSET -
|
|
||||||
// ---------------------------------------------------------
|
|
||||||
// The software is delivered "AS IS" without warranty or
|
|
||||||
// condition of any kind, either express, implied or
|
|
||||||
// statutory. This includes without limitation any warranty
|
|
||||||
// or condition with respect to merchantability or fitness
|
|
||||||
// for any particular purpose, or against the infringements of
|
|
||||||
// intellectual property rights of others.
|
|
||||||
// ---------------------------------------------------------
|
|
||||||
// File: at91sam3u-ek-sram.mac
|
|
||||||
// User setup file for CSPY debugger.
|
|
||||||
// ---------------------------------------------------------
|
|
||||||
__var __mac_i;
|
|
||||||
__var __mac_pt;
|
|
||||||
|
|
||||||
/*********************************************************************
|
|
||||||
*
|
|
||||||
* execUserReset()
|
|
||||||
*/
|
|
||||||
execUserReset()
|
|
||||||
{
|
|
||||||
__message "------------------------------ execUserReset ---------------------------------";
|
|
||||||
__message "-------------------------------Set PC Reset ----------------------------------";
|
|
||||||
|
|
||||||
//__hwReset(50);
|
|
||||||
|
|
||||||
// perpheral reset RSTC_CR
|
|
||||||
__writeMemory32(0xA5000004,0x400e1200,"Memory");
|
|
||||||
}
|
|
||||||
|
|
||||||
/*********************************************************************
|
|
||||||
*
|
|
||||||
* execUserPreload()
|
|
||||||
*/
|
|
||||||
execUserPreload()
|
|
||||||
{
|
|
||||||
__message "------------------------------ execUserPreload ---------------------------------";
|
|
||||||
|
|
||||||
__hwReset(0); //* Hardware Reset: CPU is automatically halted after the reset
|
|
||||||
|
|
||||||
// perpheral reset RSTC_CR
|
|
||||||
__writeMemory32(0xA5000004,0x400e1200,"Memory");
|
|
||||||
}
|
|
Binary file not shown.
@ -1,323 +0,0 @@
|
|||||||
|
|
||||||
adc10_sam3u.o:
|
|
||||||
00000000 T adc_check_ovr
|
|
||||||
00000000 T adc_configure_power_save
|
|
||||||
00000000 T adc_configure_timing
|
|
||||||
00000000 T adc_configure_trigger
|
|
||||||
00000000 T adc_disable_channel
|
|
||||||
00000000 T adc_disable_interrupt
|
|
||||||
00000000 T adc_enable_channel
|
|
||||||
00000000 T adc_enable_interrupt
|
|
||||||
00000000 T adc_get_actual_adc_clock
|
|
||||||
00000000 T adc_get_channel_status
|
|
||||||
00000000 T adc_get_interrupt_mask
|
|
||||||
00000000 T adc_get_interrupt_status
|
|
||||||
00000000 T adc_get_latest_value
|
|
||||||
00000000 T adc_get_pdc_base
|
|
||||||
00000000 T adc_get_status
|
|
||||||
00000000 T adc_get_value
|
|
||||||
00000000 T adc_init
|
|
||||||
00000000 T adc_set_resolution
|
|
||||||
00000000 T adc_start
|
|
||||||
00000000 T adc_stop
|
|
||||||
|
|
||||||
adc12_sam3u.o:
|
|
||||||
00000000 T adc12_check_ovr
|
|
||||||
00000000 T adc12_configure_power_save
|
|
||||||
00000000 T adc12_configure_timing
|
|
||||||
00000000 T adc12_configure_trigger
|
|
||||||
00000000 T adc12_disable_channel
|
|
||||||
00000000 T adc12_disable_differential_input
|
|
||||||
00000000 T adc12_disable_input_offset
|
|
||||||
00000000 T adc12_disable_interrupt
|
|
||||||
00000000 T adc12_enable_channel
|
|
||||||
00000000 T adc12_enable_differential_input
|
|
||||||
00000000 T adc12_enable_input_offset
|
|
||||||
00000000 T adc12_enable_interrupt
|
|
||||||
00000000 T adc12_get_actual_adc_clock
|
|
||||||
00000000 T adc12_get_channel_status
|
|
||||||
00000000 T adc12_get_interrupt_mask
|
|
||||||
00000000 T adc12_get_interrupt_status
|
|
||||||
00000000 T adc12_get_latest_value
|
|
||||||
00000000 T adc12_get_pdc_base
|
|
||||||
00000000 T adc12_get_status
|
|
||||||
00000000 T adc12_get_value
|
|
||||||
00000000 T adc12_init
|
|
||||||
00000000 T adc12_set_bias_current
|
|
||||||
00000000 T adc12_set_input_gain
|
|
||||||
00000000 T adc12_set_resolution
|
|
||||||
00000000 T adc12_start
|
|
||||||
00000000 T adc12_stop
|
|
||||||
|
|
||||||
adc_sam3snxa.o:
|
|
||||||
|
|
||||||
pio.o:
|
|
||||||
00000000 T PIO_Clear
|
|
||||||
00000000 T PIO_Configure
|
|
||||||
00000000 T PIO_DisableInterrupt
|
|
||||||
00000000 T PIO_Get
|
|
||||||
00000000 T PIO_GetOutputDataStatus
|
|
||||||
00000000 T PIO_PullUp
|
|
||||||
00000000 T PIO_Set
|
|
||||||
00000000 T PIO_SetDebounceFilter
|
|
||||||
00000000 T PIO_SetInput
|
|
||||||
00000000 T PIO_SetOutput
|
|
||||||
00000000 T PIO_SetPeripheral
|
|
||||||
|
|
||||||
pmc.o:
|
|
||||||
00000000 T PMC_DisablePeripheral
|
|
||||||
00000000 T PMC_EnablePeripheral
|
|
||||||
00000000 T PMC_IsPeripheralEnabled
|
|
||||||
|
|
||||||
pwmc.o:
|
|
||||||
00000000 r C.1.6738
|
|
||||||
00000000 t FindClockConfiguration
|
|
||||||
00000000 T PWMC_ConfigureChannel
|
|
||||||
00000000 T PWMC_ConfigureChannelExt
|
|
||||||
00000000 T PWMC_ConfigureClocks
|
|
||||||
00000000 T PWMC_ConfigureComparisonUnit
|
|
||||||
00000000 T PWMC_ConfigureEventLineMode
|
|
||||||
00000000 T PWMC_ConfigureSyncChannel
|
|
||||||
00000000 T PWMC_DisableChannel
|
|
||||||
00000000 T PWMC_DisableChannelIt
|
|
||||||
00000000 T PWMC_DisableIt
|
|
||||||
00000000 T PWMC_DisableOverrideOutput
|
|
||||||
00000000 T PWMC_EnableChannel
|
|
||||||
00000000 T PWMC_EnableChannelIt
|
|
||||||
00000000 T PWMC_EnableFaultProtection
|
|
||||||
00000000 T PWMC_EnableIt
|
|
||||||
00000000 T PWMC_EnableOverrideOutput
|
|
||||||
00000000 T PWMC_FaultClear
|
|
||||||
00000000 T PWMC_SetDeadTime
|
|
||||||
00000000 T PWMC_SetDutyCycle
|
|
||||||
00000000 T PWMC_SetFaultMode
|
|
||||||
00000000 T PWMC_SetFaultProtectionValue
|
|
||||||
00000000 T PWMC_SetOverrideValue
|
|
||||||
00000000 T PWMC_SetPeriod
|
|
||||||
00000000 T PWMC_SetSyncChannelUpdatePeriod
|
|
||||||
00000000 T PWMC_SetSyncChannelUpdateUnlock
|
|
||||||
00000000 T PWMC_WriteBuffer
|
|
||||||
0000002c r __FUNCTION__.5544
|
|
||||||
00000043 r __FUNCTION__.5555
|
|
||||||
00000059 r __FUNCTION__.5570
|
|
||||||
00000072 r __FUNCTION__.5581
|
|
||||||
00000087 r __FUNCTION__.5592
|
|
||||||
00000099 r __FUNCTION__.5599
|
|
||||||
000000aa r __FUNCTION__.5681
|
|
||||||
000000c7 r __FUNCTION__.5687
|
|
||||||
U __assert_func
|
|
||||||
|
|
||||||
rtc.o:
|
|
||||||
00000000 T RTC_ClearSCCR
|
|
||||||
00000000 T RTC_DisableIt
|
|
||||||
00000000 T RTC_EnableIt
|
|
||||||
00000000 T RTC_GetDate
|
|
||||||
00000000 T RTC_GetHourMode
|
|
||||||
00000000 T RTC_GetSR
|
|
||||||
00000000 T RTC_GetTime
|
|
||||||
00000000 T RTC_SetDate
|
|
||||||
00000000 T RTC_SetDateAlarm
|
|
||||||
00000000 T RTC_SetHourMode
|
|
||||||
00000000 T RTC_SetTime
|
|
||||||
00000000 T RTC_SetTimeAlarm
|
|
||||||
00000000 r __FUNCTION__.5541
|
|
||||||
00000010 r __FUNCTION__.5550
|
|
||||||
0000001d r __FUNCTION__.5555
|
|
||||||
U __assert_func
|
|
||||||
|
|
||||||
rtt.o:
|
|
||||||
00000000 T RTT_EnableIT
|
|
||||||
00000000 T RTT_GetStatus
|
|
||||||
00000000 T RTT_GetTime
|
|
||||||
00000000 T RTT_SetAlarm
|
|
||||||
00000000 T RTT_SetPrescaler
|
|
||||||
00000000 r __FUNCTION__.5548
|
|
||||||
0000000d r __FUNCTION__.5556
|
|
||||||
U __assert_func
|
|
||||||
|
|
||||||
spi.o:
|
|
||||||
U PMC_EnablePeripheral
|
|
||||||
00000000 T SPI_Configure
|
|
||||||
00000000 T SPI_ConfigureNPCS
|
|
||||||
00000000 T SPI_Disable
|
|
||||||
00000000 T SPI_DisableIt
|
|
||||||
00000000 T SPI_Enable
|
|
||||||
00000000 T SPI_EnableIt
|
|
||||||
00000000 T SPI_GetStatus
|
|
||||||
00000000 T SPI_IsFinished
|
|
||||||
00000000 T SPI_Read
|
|
||||||
00000000 T SPI_Write
|
|
||||||
|
|
||||||
tc.o:
|
|
||||||
00000000 T TC_Configure
|
|
||||||
00000000 T TC_FindMckDivisor
|
|
||||||
00000000 T TC_Start
|
|
||||||
00000000 T TC_Stop
|
|
||||||
00000000 r __FUNCTION__.5543
|
|
||||||
0000000d r __FUNCTION__.5549
|
|
||||||
00000016 r __FUNCTION__.5555
|
|
||||||
U __assert_func
|
|
||||||
|
|
||||||
timetick.o:
|
|
||||||
00000000 T GetTickCount
|
|
||||||
00000000 T Sleep
|
|
||||||
00000000 T TimeTick_Configure
|
|
||||||
00000000 T TimeTick_Increment
|
|
||||||
00000000 T Wait
|
|
||||||
00000000 b _dwTickCount
|
|
||||||
|
|
||||||
twi.o:
|
|
||||||
00000000 T TWI_ByteReceived
|
|
||||||
00000000 T TWI_ByteSent
|
|
||||||
00000000 T TWI_ConfigureMaster
|
|
||||||
00000000 T TWI_ConfigureSlave
|
|
||||||
00000000 T TWI_DisableIt
|
|
||||||
00000000 T TWI_EnableIt
|
|
||||||
00000000 T TWI_GetMaskedStatus
|
|
||||||
00000000 T TWI_GetStatus
|
|
||||||
00000000 T TWI_ReadByte
|
|
||||||
00000000 T TWI_SendSTOPCondition
|
|
||||||
00000000 T TWI_StartRead
|
|
||||||
00000000 T TWI_StartWrite
|
|
||||||
00000000 T TWI_Stop
|
|
||||||
00000000 T TWI_TransferComplete
|
|
||||||
00000000 T TWI_WriteByte
|
|
||||||
00000000 r __FUNCTION__.6126
|
|
||||||
00000014 r __FUNCTION__.6141
|
|
||||||
00000027 r __FUNCTION__.6145
|
|
||||||
00000030 r __FUNCTION__.6152
|
|
||||||
0000003e r __FUNCTION__.6156
|
|
||||||
0000004b r __FUNCTION__.6161
|
|
||||||
00000059 r __FUNCTION__.6169
|
|
||||||
00000068 r __FUNCTION__.6183
|
|
||||||
00000075 r __FUNCTION__.6188
|
|
||||||
00000083 r __FUNCTION__.6192
|
|
||||||
00000091 r __FUNCTION__.6197
|
|
||||||
000000a5 r __FUNCTION__.6201
|
|
||||||
U __assert_func
|
|
||||||
|
|
||||||
usart.o:
|
|
||||||
00000000 T USART_Configure
|
|
||||||
00000000 T USART_DisableIt
|
|
||||||
00000000 T USART_EnableIt
|
|
||||||
00000000 T USART_GetChar
|
|
||||||
00000000 T USART_GetStatus
|
|
||||||
00000000 T USART_IsDataAvailable
|
|
||||||
00000000 T USART_IsRxReady
|
|
||||||
00000000 T USART_PutChar
|
|
||||||
00000000 T USART_Read
|
|
||||||
00000000 T USART_ReadBuffer
|
|
||||||
00000000 T USART_SetIrdaFilter
|
|
||||||
00000000 T USART_SetReceiverEnabled
|
|
||||||
00000000 T USART_SetTransmitterEnabled
|
|
||||||
00000000 T USART_Write
|
|
||||||
00000000 T USART_WriteBuffer
|
|
||||||
00000000 r __FUNCTION__.5925
|
|
||||||
U __assert_func
|
|
||||||
|
|
||||||
wdt.o:
|
|
||||||
00000000 T WDT_Disable
|
|
||||||
00000000 T WDT_Enable
|
|
||||||
00000000 T WDT_GetPeriod
|
|
||||||
00000000 T WDT_GetStatus
|
|
||||||
00000000 T WDT_Restart
|
|
||||||
|
|
||||||
exceptions.o:
|
|
||||||
00000000 W ADC12B_IrqHandler
|
|
||||||
00000000 W ADC_IrqHandler
|
|
||||||
00000000 W BusFault_Handler
|
|
||||||
00000000 W DMAC_IrqHandler
|
|
||||||
00000000 W DebugMon_Handler
|
|
||||||
00000000 T Dummy_Handler
|
|
||||||
00000000 W EFC0_IrqHandler
|
|
||||||
00000000 W EFC1_IrqHandler
|
|
||||||
00000000 W MCI_IrqHandler
|
|
||||||
00000000 W MemManage_Handler
|
|
||||||
00000000 W NMI_Handler
|
|
||||||
00000000 W PIOA_IrqHandler
|
|
||||||
00000000 W PIOB_IrqHandler
|
|
||||||
00000000 W PIOC_IrqHandler
|
|
||||||
00000000 W PMC_IrqHandler
|
|
||||||
00000000 W PWM_IrqHandler
|
|
||||||
00000000 W PendSV_Handler
|
|
||||||
00000000 W RSTC_IrqHandler
|
|
||||||
00000000 W RTC_IrqHandler
|
|
||||||
00000000 W RTT_IrqHandler
|
|
||||||
00000000 W SMC_IrqHandler
|
|
||||||
00000000 W SPI_IrqHandler
|
|
||||||
00000000 W SSC_IrqHandler
|
|
||||||
00000000 W SUPC_IrqHandler
|
|
||||||
00000000 W SVC_Handler
|
|
||||||
00000000 W SysTick_Handler
|
|
||||||
00000000 W TC0_IrqHandler
|
|
||||||
00000000 W TC1_IrqHandler
|
|
||||||
00000000 W TC2_IrqHandler
|
|
||||||
00000000 W TWI0_IrqHandler
|
|
||||||
00000000 W TWI1_IrqHandler
|
|
||||||
00000000 W UART_IrqHandler
|
|
||||||
00000000 W UDPHS_IrqHandler
|
|
||||||
00000000 W USART0_IrqHandler
|
|
||||||
00000000 W USART1_IrqHandler
|
|
||||||
00000000 W USART2_IrqHandler
|
|
||||||
00000000 W USART3_IrqHandler
|
|
||||||
00000000 W UsageFault_Handler
|
|
||||||
00000000 W WDT_IrqHandler
|
|
||||||
|
|
||||||
system_sam3u.o:
|
|
||||||
00000000 D SystemCoreClock
|
|
||||||
00000000 T SystemCoreClockUpdate
|
|
||||||
00000000 T SystemInit
|
|
||||||
00000000 T system_init_flash_and_watchdog
|
|
||||||
|
|
||||||
startup_sam3u.o:
|
|
||||||
U ADC12B_IrqHandler
|
|
||||||
U ADC_IrqHandler
|
|
||||||
U BusFault_Handler
|
|
||||||
U DMAC_IrqHandler
|
|
||||||
U DebugMon_Handler
|
|
||||||
U Dummy_Handler
|
|
||||||
U EFC0_IrqHandler
|
|
||||||
U EFC1_IrqHandler
|
|
||||||
U HardFault_Handler
|
|
||||||
U MCI_IrqHandler
|
|
||||||
U MemManage_Handler
|
|
||||||
U NMI_Handler
|
|
||||||
U PIOA_IrqHandler
|
|
||||||
U PIOB_IrqHandler
|
|
||||||
U PIOC_IrqHandler
|
|
||||||
U PMC_IrqHandler
|
|
||||||
U PWM_IrqHandler
|
|
||||||
U PendSV_Handler
|
|
||||||
U RSTC_IrqHandler
|
|
||||||
U RTC_IrqHandler
|
|
||||||
U RTT_IrqHandler
|
|
||||||
00000000 T Reset_Handler
|
|
||||||
U SMC_IrqHandler
|
|
||||||
U SPI_IrqHandler
|
|
||||||
U SSC_IrqHandler
|
|
||||||
U SUPC_IrqHandler
|
|
||||||
U SVC_Handler
|
|
||||||
U SysTick_Handler
|
|
||||||
U TC0_IrqHandler
|
|
||||||
U TC1_IrqHandler
|
|
||||||
U TC2_IrqHandler
|
|
||||||
U TWI0_IrqHandler
|
|
||||||
U TWI1_IrqHandler
|
|
||||||
U UART_IrqHandler
|
|
||||||
U UDPHS_IrqHandler
|
|
||||||
U USART0_IrqHandler
|
|
||||||
U USART1_IrqHandler
|
|
||||||
U USART2_IrqHandler
|
|
||||||
U USART3_IrqHandler
|
|
||||||
U UsageFault_Handler
|
|
||||||
U WDT_IrqHandler
|
|
||||||
U __libc_init_array
|
|
||||||
U _erelocate
|
|
||||||
U _estack
|
|
||||||
U _etext
|
|
||||||
U _ezero
|
|
||||||
U _sfixed
|
|
||||||
U _srelocate
|
|
||||||
U _szero
|
|
||||||
00000000 D exception_table
|
|
||||||
U main
|
|
@ -1,150 +0,0 @@
|
|||||||
/* ----------------------------------------------------------------------------
|
|
||||||
* ATMEL Microcontroller Software Support
|
|
||||||
* ----------------------------------------------------------------------------
|
|
||||||
* Copyright (c) 2009, Atmel Corporation
|
|
||||||
*
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright notice,
|
|
||||||
* this list of conditions and the disclaimer below.
|
|
||||||
*
|
|
||||||
* Atmel's name may not be used to endorse or promote products derived from
|
|
||||||
* this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
|
|
||||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
|
|
||||||
* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
||||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
||||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
|
||||||
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
* ----------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
|
||||||
* Linker script for running in internal FLASH on the SAM3U4
|
|
||||||
*----------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
|
|
||||||
OUTPUT_ARCH(arm)
|
|
||||||
SEARCH_DIR(.)
|
|
||||||
|
|
||||||
/* Memory Spaces Definitions */
|
|
||||||
MEMORY
|
|
||||||
{
|
|
||||||
flash0 (W!RX) : ORIGIN = 0x00080000, LENGTH = 0x00020000 /* Flash0, 128K */
|
|
||||||
flash1 (W!RX) : ORIGIN = 0x00100000, LENGTH = 0x00020000 /* Flash1, 128K */
|
|
||||||
sram0 (W!RX) : ORIGIN = 0x20000000, LENGTH = 0x00008000 /* Sram0, 32K */
|
|
||||||
sram1 (W!RX) : ORIGIN = 0x20080000, LENGTH = 0x00004000 /* Sram1, 16K */
|
|
||||||
rom (rx) : ORIGIN = ORIGIN(flash1)-LENGTH(flash0), LENGTH = LENGTH(flash0)+LENGTH(flash1) /* Flash, 256K */
|
|
||||||
ram (rwx) : ORIGIN = ORIGIN( sram1)-LENGTH( sram0), LENGTH = LENGTH( sram0)+LENGTH( sram1) /* sram, 48K */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* The stack size used by the application. NOTE: you need to adjust */
|
|
||||||
STACK_SIZE = 0x2000;
|
|
||||||
|
|
||||||
/* Section Definitions */
|
|
||||||
SECTIONS
|
|
||||||
{
|
|
||||||
.text :
|
|
||||||
{
|
|
||||||
. = ALIGN(4);
|
|
||||||
_sfixed = .;
|
|
||||||
KEEP(*(.vectors .vectors.*))
|
|
||||||
*(.text .text.* .gnu.linkonce.t.*)
|
|
||||||
*(.glue_7t) *(.glue_7)
|
|
||||||
*(.rodata .rodata* .gnu.linkonce.r.*)
|
|
||||||
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
|
||||||
|
|
||||||
/* Support C constructors, and C destructors in both user code
|
|
||||||
and the C library. This also provides support for C++ code. */
|
|
||||||
. = ALIGN(4);
|
|
||||||
KEEP(*(.init))
|
|
||||||
. = ALIGN(4);
|
|
||||||
__preinit_array_start = .;
|
|
||||||
KEEP (*(.preinit_array))
|
|
||||||
__preinit_array_end = .;
|
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
__init_array_start = .;
|
|
||||||
KEEP (*(SORT(.init_array.*)))
|
|
||||||
KEEP (*(.init_array))
|
|
||||||
__init_array_end = .;
|
|
||||||
|
|
||||||
. = ALIGN(0x4);
|
|
||||||
KEEP (*crtbegin.o(.ctors))
|
|
||||||
KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
|
|
||||||
KEEP (*(SORT(.ctors.*)))
|
|
||||||
KEEP (*crtend.o(.ctors))
|
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
KEEP(*(.fini))
|
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
__fini_array_start = .;
|
|
||||||
KEEP (*(.fini_array))
|
|
||||||
KEEP (*(SORT(.fini_array.*)))
|
|
||||||
__fini_array_end = .;
|
|
||||||
|
|
||||||
KEEP (*crtbegin.o(.dtors))
|
|
||||||
KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
|
|
||||||
KEEP (*(SORT(.dtors.*)))
|
|
||||||
KEEP (*crtend.o(.dtors))
|
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
_efixed = .; /* End of text section */
|
|
||||||
} > flash0
|
|
||||||
|
|
||||||
/* .ARM.exidx is sorted, so has to go in its own output section. */
|
|
||||||
PROVIDE_HIDDEN (__exidx_start = .);
|
|
||||||
.ARM.exidx :
|
|
||||||
{
|
|
||||||
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
|
|
||||||
} > flash0
|
|
||||||
PROVIDE_HIDDEN (__exidx_end = .);
|
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
_etext = .;
|
|
||||||
|
|
||||||
.relocate : AT (_etext)
|
|
||||||
{
|
|
||||||
. = ALIGN(4);
|
|
||||||
_srelocate = .;
|
|
||||||
*(.ramfunc .ramfunc.*);
|
|
||||||
*(.data .data.*);
|
|
||||||
. = ALIGN(4);
|
|
||||||
_erelocate = .;
|
|
||||||
} > sram0
|
|
||||||
|
|
||||||
/* .bss section which is used for uninitialized data */
|
|
||||||
.bss (NOLOAD) :
|
|
||||||
{
|
|
||||||
. = ALIGN(4);
|
|
||||||
_sbss = . ;
|
|
||||||
_szero = .;
|
|
||||||
*(.bss .bss.*)
|
|
||||||
*(COMMON)
|
|
||||||
. = ALIGN(4);
|
|
||||||
_ebss = . ;
|
|
||||||
_ezero = .;
|
|
||||||
} > sram0
|
|
||||||
|
|
||||||
/* stack section */
|
|
||||||
.stack (NOLOAD):
|
|
||||||
{
|
|
||||||
. = ALIGN(8);
|
|
||||||
_sstack = .;
|
|
||||||
. = . + STACK_SIZE;
|
|
||||||
. = ALIGN(8);
|
|
||||||
_estack = .;
|
|
||||||
} > sram1
|
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
_end = . ;
|
|
||||||
}
|
|
@ -1,150 +0,0 @@
|
|||||||
/* ----------------------------------------------------------------------------
|
|
||||||
* ATMEL Microcontroller Software Support
|
|
||||||
* ----------------------------------------------------------------------------
|
|
||||||
* Copyright (c) 2009, Atmel Corporation
|
|
||||||
*
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright notice,
|
|
||||||
* this list of conditions and the disclaimer below.
|
|
||||||
*
|
|
||||||
* Atmel's name may not be used to endorse or promote products derived from
|
|
||||||
* this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
|
|
||||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
|
|
||||||
* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
||||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
||||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
|
||||||
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
* ----------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
|
||||||
* Linker script for running in internal SRAM on the SAM3U4
|
|
||||||
*----------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
|
|
||||||
OUTPUT_ARCH(arm)
|
|
||||||
SEARCH_DIR(.)
|
|
||||||
|
|
||||||
/* Memory Spaces Definitions */
|
|
||||||
MEMORY
|
|
||||||
{
|
|
||||||
flash0 (W!RX) : ORIGIN = 0x00080000, LENGTH = 0x00020000 /* Flash0, 128K */
|
|
||||||
flash1 (W!RX) : ORIGIN = 0x00100000, LENGTH = 0x00020000 /* Flash1, 128K */
|
|
||||||
sram0 (W!RX) : ORIGIN = 0x20000000, LENGTH = 0x00008000 /* Sram0, 32K */
|
|
||||||
sram1 (W!RX) : ORIGIN = 0x20080000, LENGTH = 0x00004000 /* Sram1, 16K */
|
|
||||||
rom (rx) : ORIGIN = ORIGIN(flash1)-LENGTH(flash0), LENGTH = LENGTH(flash0)+LENGTH(flash1) /* Flash, 256K */
|
|
||||||
ram (rwx) : ORIGIN = ORIGIN( sram1)-LENGTH( sram0), LENGTH = LENGTH( sram0)+LENGTH( sram1) /* sram, 48K */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* The stack size used by the application. NOTE: you need to adjust */
|
|
||||||
STACK_SIZE = 0x800;
|
|
||||||
|
|
||||||
/* Section Definitions */
|
|
||||||
SECTIONS
|
|
||||||
{
|
|
||||||
.text :
|
|
||||||
{
|
|
||||||
. = ALIGN(4);
|
|
||||||
_sfixed = .;
|
|
||||||
KEEP(*(.vectors .vectors.*))
|
|
||||||
*(.text .text.* .gnu.linkonce.t.*)
|
|
||||||
*(.glue_7t) *(.glue_7)
|
|
||||||
*(.rodata .rodata* .gnu.linkonce.r.*)
|
|
||||||
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
|
||||||
|
|
||||||
/* Support C constructors, and C destructors in both user code
|
|
||||||
and the C library. This also provides support for C++ code. */
|
|
||||||
. = ALIGN(4);
|
|
||||||
KEEP(*(.init))
|
|
||||||
. = ALIGN(4);
|
|
||||||
__preinit_array_start = .;
|
|
||||||
KEEP (*(.preinit_array))
|
|
||||||
__preinit_array_end = .;
|
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
__init_array_start = .;
|
|
||||||
KEEP (*(SORT(.init_array.*)))
|
|
||||||
KEEP (*(.init_array))
|
|
||||||
__init_array_end = .;
|
|
||||||
|
|
||||||
. = ALIGN(0x4);
|
|
||||||
KEEP (*crtbegin.o(.ctors))
|
|
||||||
KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
|
|
||||||
KEEP (*(SORT(.ctors.*)))
|
|
||||||
KEEP (*crtend.o(.ctors))
|
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
KEEP(*(.fini))
|
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
__fini_array_start = .;
|
|
||||||
KEEP (*(.fini_array))
|
|
||||||
KEEP (*(SORT(.fini_array.*)))
|
|
||||||
__fini_array_end = .;
|
|
||||||
|
|
||||||
KEEP (*crtbegin.o(.dtors))
|
|
||||||
KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
|
|
||||||
KEEP (*(SORT(.dtors.*)))
|
|
||||||
KEEP (*crtend.o(.dtors))
|
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
_efixed = .; /* End of text section */
|
|
||||||
} > sram0
|
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
_etext = .;
|
|
||||||
|
|
||||||
.relocate : AT (_etext)
|
|
||||||
{
|
|
||||||
. = ALIGN(4);
|
|
||||||
_srelocate = .;
|
|
||||||
*(.ramfunc .ramfunc.*);
|
|
||||||
*(.data .data.*);
|
|
||||||
. = ALIGN(4);
|
|
||||||
_erelocate = .;
|
|
||||||
} > sram1
|
|
||||||
|
|
||||||
/* .bss section which is used for uninitialized data */
|
|
||||||
.bss (NOLOAD) :
|
|
||||||
{
|
|
||||||
. = ALIGN(4);
|
|
||||||
_sbss = . ;
|
|
||||||
_szero = .;
|
|
||||||
*(.bss .bss.*)
|
|
||||||
*(COMMON)
|
|
||||||
. = ALIGN(4);
|
|
||||||
_ebss = . ;
|
|
||||||
_ezero = .;
|
|
||||||
} > sram1
|
|
||||||
|
|
||||||
/* stack section */
|
|
||||||
.stack (NOLOAD):
|
|
||||||
{
|
|
||||||
. = ALIGN(8);
|
|
||||||
_sstack = .;
|
|
||||||
. = . + STACK_SIZE;
|
|
||||||
. = ALIGN(8);
|
|
||||||
_estack = .;
|
|
||||||
} > sram1
|
|
||||||
|
|
||||||
/* .ARM.exidx is sorted, so has to go in its own output section. */
|
|
||||||
PROVIDE_HIDDEN (__exidx_start = .);
|
|
||||||
.ARM.exidx :
|
|
||||||
{
|
|
||||||
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
|
|
||||||
} > sram1
|
|
||||||
PROVIDE_HIDDEN (__exidx_end = .);
|
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
_end = . ;
|
|
||||||
}
|
|
@ -1,49 +0,0 @@
|
|||||||
/*###ICF### Section handled by ICF editor, don't touch! ****/
|
|
||||||
/*-Editor annotation file-*/
|
|
||||||
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\a_v1_0.xml" */
|
|
||||||
/*-Vector table start*/
|
|
||||||
define symbol __ICFEDIT_vector_start__ = 0x00080000; /*Add for CMSIS*/
|
|
||||||
/*-Memory Regions-*/
|
|
||||||
define symbol __ICFEDIT_region_RAM0_start__ = 0x20000000;
|
|
||||||
define symbol __ICFEDIT_region_RAM0_end__ = 0x20007FFF;
|
|
||||||
define symbol __ICFEDIT_region_RAM1_start__ = 0x20080000;
|
|
||||||
define symbol __ICFEDIT_region_RAM1_end__ = 0x20083FFF;
|
|
||||||
define symbol __ICFEDIT_region_ROM0_start__ = 0x00080000;
|
|
||||||
define symbol __ICFEDIT_region_ROM0_end__ = 0x0009FFFF;
|
|
||||||
define symbol __ICFEDIT_region_ROM1_start__ = 0x00100000;
|
|
||||||
define symbol __ICFEDIT_region_ROM1_end__ = 0x0011FFFF;
|
|
||||||
/*-Sizes-*/
|
|
||||||
/*define symbol __ICFEDIT_size_cstack__ = 0x1000;*//*for nandflash*/
|
|
||||||
define symbol __ICFEDIT_size_cstack__ = 0x2000;
|
|
||||||
define symbol __ICFEDIT_size_heap__ = 0x200;
|
|
||||||
/*-Specials-*/
|
|
||||||
/*define symbol __ICFEDIT_region_RAM_VECT_start__ = __ICFEDIT_region_RAM0_start__;*/ /*Referenced for CMSIS*/
|
|
||||||
/*define symbol __ICFEDIT_size_vectors__ = 0x100;*/ /*Referenced for CMSIS*/
|
|
||||||
/*-Exports-*/
|
|
||||||
/*export symbol __ICFEDIT_region_RAM_VECT_start__;*/
|
|
||||||
export symbol __ICFEDIT_vector_start__; /*Add for CMSIS*/
|
|
||||||
/**** End of ICF editor section. ###ICF###*/
|
|
||||||
|
|
||||||
define memory mem with size = 4G;
|
|
||||||
/*define region RAM_VECT_region = mem:[from __ICFEDIT_region_RAM_VECT_start__ size __ICFEDIT_size_vectors__];*/ /*Referenced for CMSIS*/
|
|
||||||
/*define region RAM0_region = mem:[from __ICFEDIT_region_RAM0_start__+__ICFEDIT_size_vectors__ to __ICFEDIT_region_RAM0_end__];*/ /*Referenced for CMSIS*/
|
|
||||||
define region RAM0_region = mem:[from __ICFEDIT_region_RAM0_start__ to __ICFEDIT_region_RAM0_end__];
|
|
||||||
define region RAM1_region = mem:[from __ICFEDIT_region_RAM1_start__ to __ICFEDIT_region_RAM1_end__];
|
|
||||||
/*define region RAM_region = mem:[from __ICFEDIT_region_RAM0_start__+__ICFEDIT_size_vectors__ to __ICFEDIT_region_RAM0_end__] |
|
|
||||||
mem:[from __ICFEDIT_region_RAM1_start__ to __ICFEDIT_region_RAM1_end__];*/ /*Referenced for CMSIS*/
|
|
||||||
define region ROM0_region = mem:[from __ICFEDIT_region_ROM0_start__ to __ICFEDIT_region_ROM0_end__];
|
|
||||||
define region ROM1_region = mem:[from __ICFEDIT_region_ROM1_start__ to __ICFEDIT_region_ROM1_end__];
|
|
||||||
|
|
||||||
/*define block RamVect with alignment = 8, size = __ICFEDIT_size_vectors__ { };*/
|
|
||||||
define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
|
|
||||||
define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
|
|
||||||
|
|
||||||
initialize by copy { readwrite };
|
|
||||||
do not initialize { section .noinit };
|
|
||||||
|
|
||||||
/*place at start of ROM0_region { readonly section .vectors };*/ /*Referenced for CMSIS*/
|
|
||||||
place at address mem:__ICFEDIT_vector_start__ { readonly section .intvec }; /*Add for CMSIS*/
|
|
||||||
place in ROM0_region { readonly };
|
|
||||||
place in RAM0_region { readwrite, block HEAP };
|
|
||||||
place in RAM1_region { block CSTACK }; /* for nandflash*/
|
|
||||||
/*place in RAM_VECT_region { block RamVect };*/ /*Referenced for CMSIS*/
|
|
@ -1,33 +0,0 @@
|
|||||||
/*###ICF### Section handled by ICF editor, don't touch! ****/
|
|
||||||
/*-Editor annotation file-*/
|
|
||||||
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\a_v1_0.xml" */
|
|
||||||
/*-Vector table start*/
|
|
||||||
define symbol __ICFEDIT_vector_start__ = 0x20000000;
|
|
||||||
/*-Memory Regions-*/
|
|
||||||
define symbol __ICFEDIT_region_RAM0_start__ = 0x20000000;
|
|
||||||
define symbol __ICFEDIT_region_RAM0_end__ = 0x20007FFF;
|
|
||||||
define symbol __ICFEDIT_region_RAM1_start__ = 0x20080000;
|
|
||||||
define symbol __ICFEDIT_region_RAM1_end__ = 0x20083FFF;
|
|
||||||
/*-Sizes-*/
|
|
||||||
define symbol __ICFEDIT_size_cstack__ = 0x900;
|
|
||||||
define symbol __ICFEDIT_size_heap__ = 0x200;
|
|
||||||
/*-Exports-*/
|
|
||||||
export symbol __ICFEDIT_vector_start__;
|
|
||||||
/**** End of ICF editor section. ###ICF###*/
|
|
||||||
|
|
||||||
define memory mem with size = 4G;
|
|
||||||
define region RAM0_region = mem:[from __ICFEDIT_region_RAM0_start__ to __ICFEDIT_region_RAM0_end__];
|
|
||||||
define region RAM1_region = mem:[from __ICFEDIT_region_RAM1_start__ to __ICFEDIT_region_RAM1_end__];
|
|
||||||
/*define region RAM_region = mem:[from __ICFEDIT_region_RAM0_start__+__ICFEDIT_size_vectors__ to __ICFEDIT_region_RAM0_end__] |
|
|
||||||
mem:[from __ICFEDIT_region_RAM1_start__ to __ICFEDIT_region_RAM1_end__];*/
|
|
||||||
|
|
||||||
/* define block RamVect with alignment = 8, size = __ICFEDIT_size_vectors__ { }; */
|
|
||||||
define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
|
|
||||||
define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
|
|
||||||
|
|
||||||
initialize by copy { readwrite };
|
|
||||||
do not initialize { section .noinit };
|
|
||||||
|
|
||||||
place at address mem:__ICFEDIT_vector_start__ { readonly section .intvec };
|
|
||||||
place in RAM0_region { readonly };
|
|
||||||
place in RAM1_region { readwrite, block CSTACK, block HEAP };
|
|
Binary file not shown.
@ -1,21 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright (c) 2011 Arduino. All right reserved.
|
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU Lesser General Public
|
|
||||||
License as published by the Free Software Foundation; either
|
|
||||||
version 2.1 of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
This library is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
See the GNU Lesser General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Lesser General Public
|
|
||||||
License along with this library; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
// API compatibility
|
|
||||||
#include "variant.h"
|
|
||||||
|
|
@ -1,383 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright (c) 2011 Arduino. All right reserved.
|
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU Lesser General Public
|
|
||||||
License as published by the Free Software Foundation; either
|
|
||||||
version 2.1 of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
This library is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
See the GNU Lesser General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Lesser General Public
|
|
||||||
License along with this library; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "variant.h"
|
|
||||||
|
|
||||||
/*
|
|
||||||
* DUE Board pin | PORT
|
|
||||||
* ----------------+--------
|
|
||||||
* 0 RX0 | PA11
|
|
||||||
* 1 TX0 | PA12
|
|
||||||
* 2 PWML3 | PC9
|
|
||||||
* 3 PWMH3 | PB16
|
|
||||||
* 4 NPCS0 | PA16
|
|
||||||
* 5 TIOA2 | PA30
|
|
||||||
* 6 PWMH2 | PA6
|
|
||||||
* 7 PWML2 | PC8
|
|
||||||
* 8 PWML1 | PC7
|
|
||||||
* 9 PWMH1 | PA5
|
|
||||||
* 10 TIOA0 | PA1
|
|
||||||
* 11 PWMH0 | PA4
|
|
||||||
* 12 PWML0 | PC6
|
|
||||||
* 13 | PC21
|
|
||||||
* 14 TX3 | PA22
|
|
||||||
* 15 RX3 | PA23
|
|
||||||
* 16 TX2 | PA20
|
|
||||||
* 17 RX2 | PA21
|
|
||||||
* 18 TX1 | PA18
|
|
||||||
* 19 RX1 | PA19
|
|
||||||
* 20 SDA | PA24
|
|
||||||
* 21 SCL | PA25
|
|
||||||
* 22 | PC3
|
|
||||||
* 23 | PC2
|
|
||||||
* 24 | PC1
|
|
||||||
* 25 | PC0
|
|
||||||
* 26 | PB28
|
|
||||||
* 27 | PB27
|
|
||||||
* 28 | PB26
|
|
||||||
* 29 | PB25
|
|
||||||
* 30 | PB24
|
|
||||||
* 31 | PB23
|
|
||||||
* 32 | PB22
|
|
||||||
* 33 | PB21
|
|
||||||
* 34 | PB20
|
|
||||||
* 35 | PB19
|
|
||||||
* 36 | PB18
|
|
||||||
* 37 | PB17
|
|
||||||
* 38 | PA28
|
|
||||||
* 39 | PA29
|
|
||||||
* 40 | PC22
|
|
||||||
* 41 | PA31
|
|
||||||
* 42 | PC23
|
|
||||||
* 43 | PB0
|
|
||||||
* 44 | PC24
|
|
||||||
* 45 | PB1
|
|
||||||
* 46 | PC25
|
|
||||||
* 47 | PB2
|
|
||||||
* 48 | PC26
|
|
||||||
* 49 | PB11
|
|
||||||
* 50 | PB12
|
|
||||||
* 51 | PB13
|
|
||||||
* 52 | PC27
|
|
||||||
* 53 | PA27
|
|
||||||
* A0 | PB5
|
|
||||||
* A1 | PB6
|
|
||||||
* A2 | PB7
|
|
||||||
* A3 | PB8
|
|
||||||
* A4 | PC28
|
|
||||||
* A5 | PC29
|
|
||||||
* A6 | PC30
|
|
||||||
* A7 | PC31
|
|
||||||
* A8 | PB3
|
|
||||||
* A9 | PB4
|
|
||||||
* A10 | PC15
|
|
||||||
* A11 | PC16
|
|
||||||
* A12 | PC17
|
|
||||||
* A13 | PC18
|
|
||||||
* A14 | This pin is DAC0 output of LTC1661CMS8
|
|
||||||
* A15 | This pin is DAC1 output of LTC1661CMS8
|
|
||||||
* SDA1 | PA9
|
|
||||||
* SCL1 | PA10
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* LTC1661CMS8 pin | PORT
|
|
||||||
* ----------------+--------
|
|
||||||
* #CS/LD | PB9
|
|
||||||
* SCK | PB10
|
|
||||||
* DIN | PB14
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* LEDs | PORT
|
|
||||||
* ----------------+--------
|
|
||||||
* "TX" | PC19
|
|
||||||
* "RX" | PC14
|
|
||||||
* "L" | PC21
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Pins descriptions
|
|
||||||
*/
|
|
||||||
extern const PinDescription g_APinDescription[]=
|
|
||||||
{
|
|
||||||
// 0 .. 53 - Digital pins
|
|
||||||
// ----------------------
|
|
||||||
// 0/1 - UART (Serial)
|
|
||||||
{ PIOA, PIO_PA11A_URXD, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // URXD
|
|
||||||
{ PIOA, PIO_PA12A_UTXD, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // UTXD
|
|
||||||
|
|
||||||
// 2
|
|
||||||
{ PIOC, PIO_PC9B_PWML3, ID_PIOC, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM), NO_ADC, NO_ADC, PWM_CH3, NO_TC }, // PWML3
|
|
||||||
{ PIOB, PIO_PB16B_PWMH3, ID_PIOB, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM), NO_ADC, NO_ADC, PWM_CH3, NO_TC }, // PWMH3
|
|
||||||
{ PIOC, PIO_PA16A_NPCS0, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // NPCS0
|
|
||||||
|
|
||||||
// 5
|
|
||||||
{ PIOA, PIO_PA30B_TIOA2, ID_PIOA, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), NO_ADC, NO_ADC, NO_PWM, TC0_CHA2 }, // TIOA2
|
|
||||||
{ PIOA, PIO_PA6B_PWMH2, ID_PIOA, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM), NO_ADC, NO_ADC, PWM_CH2, NO_TC }, // PWMH2
|
|
||||||
{ PIOC, PIO_PC8B_PWML2, ID_PIOC, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM), NO_ADC, NO_ADC, PWM_CH2, NO_TC }, // PWML2
|
|
||||||
{ PIOC, PIO_PC7B_PWML1, ID_PIOC, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM), NO_ADC, NO_ADC, PWM_CH1, NO_TC }, // PWML1
|
|
||||||
{ PIOA, PIO_PA5B_PWMH1, ID_PIOA, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM), NO_ADC, NO_ADC, PWM_CH1, NO_TC }, // PWMH1
|
|
||||||
// 10
|
|
||||||
{ PIOA, PIO_PA1, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), NO_ADC, NO_ADC, NO_PWM, TC0_CHA0 }, // TIOA0
|
|
||||||
{ PIOA, PIO_PA4B_PWMH0, ID_PIOA, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM), NO_ADC, NO_ADC, PWM_CH0, NO_TC }, // PWMH0
|
|
||||||
{ PIOC, PIO_PC6B_PWML0, ID_PIOC, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM), NO_ADC, NO_ADC, PWM_CH0, NO_TC }, // PWML0
|
|
||||||
|
|
||||||
// 13 - AMBER LED
|
|
||||||
{ PIOC, PIO_PC21, ID_PIOC, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 13
|
|
||||||
|
|
||||||
// 14/15 - USART2 (Serial4)
|
|
||||||
{ PIOA, PIO_PA22A_TXD2, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // TXD2
|
|
||||||
{ PIOA, PIO_PA23A_RXD2, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // RXD2
|
|
||||||
|
|
||||||
// 16/17 - USART1 (Serial3)
|
|
||||||
{ PIOA, PIO_PA20A_TXD1, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // TXD1
|
|
||||||
{ PIOA, PIO_PA21A_RXD1, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // RXD1
|
|
||||||
|
|
||||||
// 18/19 - USART0 (Serial2)
|
|
||||||
{ PIOA, PIO_PA18A_TXD0, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // TXD0
|
|
||||||
{ PIOA, PIO_PA19A_RXD0, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // RXD0
|
|
||||||
|
|
||||||
// 20/21 - TWI1
|
|
||||||
{ PIOA, PIO_PA24A_TWD1, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // TWD1 - SDA0
|
|
||||||
{ PIOA, PIO_PA25A_TWCK1, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // TWCK1 - SCL0
|
|
||||||
|
|
||||||
// 22
|
|
||||||
{ PIOC, PIO_PC3, ID_PIOC, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 22
|
|
||||||
{ PIOC, PIO_PC2, ID_PIOC, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 23
|
|
||||||
{ PIOC, PIO_PC1, ID_PIOC, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 24
|
|
||||||
{ PIOC, PIO_PC0, ID_PIOC, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 25
|
|
||||||
|
|
||||||
// 26
|
|
||||||
{ PIOB, PIO_PB28, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 26
|
|
||||||
{ PIOB, PIO_PB27, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 27
|
|
||||||
{ PIOB, PIO_PB26, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 28
|
|
||||||
{ PIOB, PIO_PB25, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 29
|
|
||||||
|
|
||||||
// 30
|
|
||||||
{ PIOB, PIO_PB24, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 30
|
|
||||||
{ PIOB, PIO_PB23, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 31
|
|
||||||
{ PIOB, PIO_PB22, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 32
|
|
||||||
{ PIOB, PIO_PB21, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 33
|
|
||||||
|
|
||||||
// 34
|
|
||||||
{ PIOB, PIO_PB20, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 34
|
|
||||||
{ PIOB, PIO_PB19, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 35
|
|
||||||
{ PIOB, PIO_PB18, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 36
|
|
||||||
{ PIOB, PIO_PB17, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 37
|
|
||||||
|
|
||||||
// 38
|
|
||||||
{ PIOA, PIO_PA28, ID_PIOA, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 38
|
|
||||||
{ PIOA, PIO_PA29, ID_PIOA, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 39
|
|
||||||
{ PIOC, PIO_PC22, ID_PIOC, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 40
|
|
||||||
{ PIOA, PIO_PA31, ID_PIOA, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 41
|
|
||||||
|
|
||||||
// 42
|
|
||||||
{ PIOC, PIO_PC23, ID_PIOC, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 42
|
|
||||||
{ PIOB, PIO_PB0 , ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 43
|
|
||||||
{ PIOC, PIO_PC24, ID_PIOC, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 44
|
|
||||||
{ PIOB, PIO_PB1 , ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 45
|
|
||||||
|
|
||||||
// 46
|
|
||||||
{ PIOC, PIO_PC25, ID_PIOC, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 46
|
|
||||||
{ PIOB, PIO_PB2 , ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 47
|
|
||||||
{ PIOC, PIO_PC26, ID_PIOC, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 48
|
|
||||||
{ PIOB, PIO_PB11, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 49
|
|
||||||
|
|
||||||
// 50
|
|
||||||
{ PIOB, PIO_PB12, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 50
|
|
||||||
{ PIOB, PIO_PB13, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 51
|
|
||||||
{ PIOC, PIO_PC27, ID_PIOC, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 52
|
|
||||||
{ PIOA, PIO_PA27, ID_PIOA, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // PIN 53
|
|
||||||
|
|
||||||
// 54 .. 67 - Analog pins
|
|
||||||
// ----------------------
|
|
||||||
{ PIOB, PIO_PB5X1_AD0, ID_PIOB, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC0, ADC0, NO_PWM, NO_TC }, // AD0
|
|
||||||
{ PIOB, PIO_PB6X1_AD1, ID_PIOB, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC1, ADC1, NO_PWM, NO_TC }, // AD1
|
|
||||||
{ PIOB, PIO_PB7X1_AD2, ID_PIOB, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC2, ADC2, NO_PWM, NO_TC }, // AD2
|
|
||||||
{ PIOB, PIO_PB8X1_AD3, ID_PIOB, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC3, ADC3, NO_PWM, NO_TC }, // AD3
|
|
||||||
// 58
|
|
||||||
{ PIOC, PIO_PC28X1_AD4, ID_PIOC, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC4, ADC4, NO_PWM, NO_TC }, // AD4
|
|
||||||
{ PIOC, PIO_PC29X1_AD5, ID_PIOC, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC5, ADC5, NO_PWM, NO_TC }, // AD5
|
|
||||||
{ PIOC, PIO_PC30X1_AD6, ID_PIOC, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC6, ADC6, NO_PWM, NO_TC }, // AD6
|
|
||||||
{ PIOC, PIO_PC31X1_AD7, ID_PIOC, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC7, ADC7, NO_PWM, NO_TC }, // AD7
|
|
||||||
// 62
|
|
||||||
{ PIOB, PIO_PB3X1_AD12B2, ID_PIOB, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC8, ADC2, NO_PWM, NO_TC }, // AD8
|
|
||||||
{ PIOB, PIO_PB4X1_AD12B3, ID_PIOB, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC9, ADC3, NO_PWM, NO_TC }, // AD9
|
|
||||||
{ PIOC, PIO_PC15X1_AD12B4, ID_PIOC, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC10, ADC4, NO_PWM, NO_TC }, // AD10
|
|
||||||
{ PIOC, PIO_PC16X1_AD12B5, ID_PIOC, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC11, ADC5, NO_PWM, NO_TC }, // AD11
|
|
||||||
// 66
|
|
||||||
{ PIOC, PIO_PC17X1_AD12B6, ID_PIOC, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC12, ADC6, NO_PWM, NO_TC }, // AD12
|
|
||||||
{ PIOC, PIO_PC18X1_AD12B7, ID_PIOC, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC13, ADC7, NO_PWM, NO_TC }, // AD13
|
|
||||||
|
|
||||||
// 68/69 - TWI0
|
|
||||||
{ PIOA, PIO_PA9A_TWD0, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // TWD0 - SDA1
|
|
||||||
{ PIOA, PIO_PA10A_TWCK0, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // TWCK0 - SCL1
|
|
||||||
|
|
||||||
// 70/71/72 - External DAC
|
|
||||||
{ PIOB, PIO_PB9, ID_PIOB, PIO_OUTPUT_1, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // DAC-CS
|
|
||||||
{ PIOB, PIO_PB10, ID_PIOB, PIO_OUTPUT_1, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // DAC-SCK
|
|
||||||
{ PIOB, PIO_PB14, ID_PIOB, PIO_OUTPUT_1, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // DAC-DIN
|
|
||||||
|
|
||||||
// 73/74 - LEDs
|
|
||||||
{ PIOC, PIO_PC14, ID_PIOC, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // LED AMBER RXL
|
|
||||||
{ PIOC, PIO_PC19, ID_PIOC, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // LED AMBER TXL
|
|
||||||
|
|
||||||
// 75/76/77 - SPI
|
|
||||||
{ PIOA, PIO_PA13A_MISO, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // MISO
|
|
||||||
{ PIOA, PIO_PA14A_MOSI, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // MOSI
|
|
||||||
{ PIOA, PIO_PA15A_SPCK, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NO_PWM, NO_TC }, // SPCK
|
|
||||||
|
|
||||||
// 78 .. 83 - "All pins" masks
|
|
||||||
|
|
||||||
// 78 - TWI0 all pins
|
|
||||||
{ PIOA, PIO_PA9A_TWD0|PIO_PA10A_TWCK0, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NO_ADC, NO_PWM, NO_TC },
|
|
||||||
// 79 - TWI1 all pins
|
|
||||||
{ PIOA, PIO_PA24A_TWD1|PIO_PA25A_TWCK1, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NO_ADC, NO_PWM, NO_TC },
|
|
||||||
// 80 - UART (Serial) all pins
|
|
||||||
{ PIOA, PIO_PA11A_URXD|PIO_PA12A_UTXD, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NO_ADC, NO_PWM, NO_TC },
|
|
||||||
// 81 - USART0 (Serial2) all pins
|
|
||||||
{ PIOA, PIO_PA19A_RXD0|PIO_PA18A_TXD0, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NO_ADC, NO_PWM, NO_TC },
|
|
||||||
// 82 - USART1 (Serial3) all pins
|
|
||||||
{ PIOA, PIO_PA21A_RXD1|PIO_PA20A_TXD1, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NO_ADC, NO_PWM, NO_TC },
|
|
||||||
// 83 - USART2 (Serial4) all pins
|
|
||||||
{ PIOA, PIO_PA23A_RXD2|PIO_PA22A_TXD2, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NO_ADC, NO_PWM, NO_TC },
|
|
||||||
|
|
||||||
// END
|
|
||||||
{ NULL, 0, 0, PIO_NOT_A_PIN, PIO_DEFAULT, 0, NO_ADC, NO_ADC, NO_PWM, NO_TC }
|
|
||||||
} ;
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* UART objects
|
|
||||||
*/
|
|
||||||
RingBuffer rx_buffer1 ;
|
|
||||||
|
|
||||||
UARTClass Serial1( UART, UART_IRQn, ID_UART, &rx_buffer1 ) ;
|
|
||||||
|
|
||||||
// IT handlers
|
|
||||||
void UART_Handler(void)
|
|
||||||
{
|
|
||||||
Serial1.IrqHandler() ;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
/*
|
|
||||||
* USART objects
|
|
||||||
*/
|
|
||||||
RingBuffer rx_buffer2 ;
|
|
||||||
RingBuffer rx_buffer3 ;
|
|
||||||
RingBuffer rx_buffer4 ;
|
|
||||||
|
|
||||||
USARTClass Serial2( USART0, USART0_IRQn, ID_USART0, &rx_buffer2 ) ;
|
|
||||||
USARTClass Serial3( USART1, USART1_IRQn, ID_USART1, &rx_buffer3 ) ;
|
|
||||||
USARTClass Serial4( USART2, USART2_IRQn, ID_USART2, &rx_buffer4 ) ;
|
|
||||||
|
|
||||||
// IT handlers
|
|
||||||
void USART0_Handler( void )
|
|
||||||
{
|
|
||||||
Serial2.IrqHandler() ;
|
|
||||||
}
|
|
||||||
|
|
||||||
void USART1_Handler( void )
|
|
||||||
{
|
|
||||||
Serial3.IrqHandler() ;
|
|
||||||
}
|
|
||||||
|
|
||||||
void USART2_Handler( void )
|
|
||||||
{
|
|
||||||
Serial4.IrqHandler() ;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
extern void init( void )
|
|
||||||
{
|
|
||||||
SystemInit() ;
|
|
||||||
|
|
||||||
// Set Systick to 1ms interval, common to all SAM3 variants
|
|
||||||
if ( SysTick_Config( SystemCoreClock / 1000 ) )
|
|
||||||
{
|
|
||||||
// Capture error
|
|
||||||
while ( 1 ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Disable watchdog, common to all SAM variants
|
|
||||||
WDT_Disable( WDT ) ;
|
|
||||||
|
|
||||||
// Initialize Serial port UART, common to all SAM3 variants
|
|
||||||
PIO_Configure(
|
|
||||||
g_APinDescription[PINS_UART].pPort,
|
|
||||||
g_APinDescription[PINS_UART].ulPinType,
|
|
||||||
g_APinDescription[PINS_UART].ulPin,
|
|
||||||
g_APinDescription[PINS_UART].ulPinConfiguration);
|
|
||||||
|
|
||||||
// Initialize Serial ports USART
|
|
||||||
PIO_Configure(
|
|
||||||
g_APinDescription[PINS_USART0].pPort,
|
|
||||||
g_APinDescription[PINS_USART0].ulPinType,
|
|
||||||
g_APinDescription[PINS_USART0].ulPin,
|
|
||||||
g_APinDescription[PINS_USART0].ulPinConfiguration);
|
|
||||||
PIO_Configure(
|
|
||||||
g_APinDescription[PINS_USART1].pPort,
|
|
||||||
g_APinDescription[PINS_USART1].ulPinType,
|
|
||||||
g_APinDescription[PINS_USART1].ulPin,
|
|
||||||
g_APinDescription[PINS_USART1].ulPinConfiguration);
|
|
||||||
PIO_Configure(
|
|
||||||
g_APinDescription[PINS_USART2].pPort,
|
|
||||||
g_APinDescription[PINS_USART2].ulPinType,
|
|
||||||
g_APinDescription[PINS_USART2].ulPin,
|
|
||||||
g_APinDescription[PINS_USART2].ulPinConfiguration);
|
|
||||||
|
|
||||||
// Initialize 10bit Analog Controller
|
|
||||||
PMC_EnablePeripheral( ID_ADC ) ;
|
|
||||||
adc_init( ADC, SystemCoreClock, ADC_FREQ_MAX, ADC_STARTUP ) ;
|
|
||||||
adc_configure_timing( ADC, 15 ) ;
|
|
||||||
adc_configure_trigger( ADC, ADC_TRIG_SW ) ;
|
|
||||||
adc_disable_interrupt( ADC, 0xFFFFFFFF ) ; /* Disable all adc interrupt. */
|
|
||||||
adc_disable_channel( ADC, ADC_ALL_CHANNEL ) ;
|
|
||||||
|
|
||||||
// Initialize 12bit Analog Controller
|
|
||||||
PMC_EnablePeripheral( ID_ADC12B ) ;
|
|
||||||
adc12_init( ADC12B, SystemCoreClock, ADC12_FREQ_MAX, ADC12_STARTUP_FAST, 1 ) ;
|
|
||||||
adc12_configure_timing( ADC12B, 15 ) ;
|
|
||||||
adc12_configure_trigger( ADC12B, ADC_TRIG_SW ) ;
|
|
||||||
adc12_disable_interrupt( ADC12B, 0xFFFFFFFF ) ; /* Disable all adc interrupt. */
|
|
||||||
adc12_disable_channel( ADC12B, ADC_ALL_CHANNEL ) ;
|
|
||||||
|
|
||||||
// Initialize analogOutput module
|
|
||||||
analogOutputInit();
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,178 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright (c) 2011 Arduino. All right reserved.
|
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU Lesser General Public
|
|
||||||
License as published by the Free Software Foundation; either
|
|
||||||
version 2.1 of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
This library is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
See the GNU Lesser General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Lesser General Public
|
|
||||||
License along with this library; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _VARIANT_ARDUINO_DUE_U_
|
|
||||||
#define _VARIANT_ARDUINO_DUE_U_
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------
|
|
||||||
* Headers
|
|
||||||
*----------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
// We have native USB on this variant
|
|
||||||
//#define USBCON
|
|
||||||
|
|
||||||
#include "Arduino.h"
|
|
||||||
#ifdef __cplusplus
|
|
||||||
#include "UARTClass.h"
|
|
||||||
#include "USARTClass.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C"{
|
|
||||||
#endif // __cplusplus
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Libc porting layers
|
|
||||||
*/
|
|
||||||
#if defined ( __GNUC__ ) /* GCC CS3 */
|
|
||||||
# include <syscalls.h> /** RedHat Newlib minimal stub */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------
|
|
||||||
* Definitions
|
|
||||||
*----------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#define ArduinoDueU_DevEd
|
|
||||||
|
|
||||||
/** Name of the board */
|
|
||||||
#define VARIANT_NAME "Arduino_DueU_Dev_Ed"
|
|
||||||
|
|
||||||
/** Frequency of the board main oscillator */
|
|
||||||
#define VARIANT_MAINOSC 12000000
|
|
||||||
|
|
||||||
/** Master clock frequency */
|
|
||||||
#define VARIANT_MCK 96000000
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------
|
|
||||||
* Pins
|
|
||||||
*----------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
// Number of pins defined in PinDescription array
|
|
||||||
#define PINS_COUNT (84u)
|
|
||||||
|
|
||||||
// LEDs
|
|
||||||
#define PIN_LED_13 (13u)
|
|
||||||
#define PIN_LED_RXL (73u)
|
|
||||||
#define PIN_LED_TXL (74u)
|
|
||||||
#define PIN_LED PIN_LED_13
|
|
||||||
#define PIN_LED2 PIN_LED_RXL
|
|
||||||
#define PIN_LED3 PIN_LED_TXL
|
|
||||||
|
|
||||||
/*
|
|
||||||
* SPI Interfaces
|
|
||||||
*/
|
|
||||||
#define SPI_INTERFACES_COUNT 1
|
|
||||||
|
|
||||||
#define SPI_INTERFACE SPI
|
|
||||||
#define SPI_INTERFACE_ID ID_SPI
|
|
||||||
#define PIN_SPI_SS (4u)
|
|
||||||
#define PIN_SPI_MOSI (76u)
|
|
||||||
#define PIN_SPI_MISO (75u)
|
|
||||||
#define PIN_SPI_SCK (77u)
|
|
||||||
|
|
||||||
static const uint8_t SS = 4 ;
|
|
||||||
static const uint8_t MOSI = 76 ;
|
|
||||||
static const uint8_t MISO = 75 ;
|
|
||||||
static const uint8_t SCK = 77 ;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Wire Interfaces
|
|
||||||
*/
|
|
||||||
#define WIRE_INTERFACES_COUNT 2
|
|
||||||
|
|
||||||
#define PIN_WIRE_SDA (20u)
|
|
||||||
#define PIN_WIRE_SCL (21u)
|
|
||||||
#define WIRE_INTERFACE TWI1
|
|
||||||
#define WIRE_INTERFACE_ID ID_TWI1
|
|
||||||
#define WIRE_ISR_HANDLER TWI1_IrqHandler
|
|
||||||
|
|
||||||
#define PIN_WIRE1_SDA (68u)
|
|
||||||
#define PIN_WIRE1_SCL (69u)
|
|
||||||
#define WIRE1_INTERFACE TWI0
|
|
||||||
#define WIRE1_INTERFACE_ID ID_TWI0
|
|
||||||
#define WIRE1_ISR_HANDLER TWI0_IrqHandler
|
|
||||||
|
|
||||||
/*
|
|
||||||
* UART/USART Interfaces
|
|
||||||
*/
|
|
||||||
#define PINS_UART (80u)
|
|
||||||
|
|
||||||
#define PINS_USART0 (81u)
|
|
||||||
#define PINS_USART1 (82u)
|
|
||||||
#define PINS_USART2 (83u)
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Analog pins
|
|
||||||
*/
|
|
||||||
static const uint8_t A0 = 54;
|
|
||||||
static const uint8_t A1 = 55;
|
|
||||||
static const uint8_t A2 = 56;
|
|
||||||
static const uint8_t A3 = 57;
|
|
||||||
static const uint8_t A4 = 58;
|
|
||||||
static const uint8_t A5 = 59;
|
|
||||||
static const uint8_t A6 = 60;
|
|
||||||
static const uint8_t A7 = 61;
|
|
||||||
static const uint8_t A8 = 62;
|
|
||||||
static const uint8_t A9 = 63;
|
|
||||||
static const uint8_t A10 = 64;
|
|
||||||
static const uint8_t A11 = 65;
|
|
||||||
static const uint8_t A12 = 66;
|
|
||||||
static const uint8_t A13 = 67;
|
|
||||||
// static const uint8_t A14 = ;
|
|
||||||
// static const uint8_t A15 = ;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* PWM
|
|
||||||
*/
|
|
||||||
#define PWM_INTERFACE PWM
|
|
||||||
#define PWM_INTERFACE_ID ID_PWM
|
|
||||||
#define PWM_FREQUENCY 1000
|
|
||||||
#define PWM_MAX_DUTY_CYCLE 255
|
|
||||||
#define PWM_MIN_DUTY_CYCLE 0
|
|
||||||
|
|
||||||
/*
|
|
||||||
* TC
|
|
||||||
*/
|
|
||||||
#define TC_INTERFACE TC0
|
|
||||||
#define TC_INTERFACE_ID ID_TC0
|
|
||||||
#define TC_FREQUENCY 1000
|
|
||||||
#define TC_MAX_DUTY_CYCLE 255
|
|
||||||
#define TC_MIN_DUTY_CYCLE 0
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------
|
|
||||||
* Arduino objects - C++ only
|
|
||||||
*----------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
|
|
||||||
extern UARTClass Serial1 ;
|
|
||||||
|
|
||||||
extern USARTClass Serial2 ;
|
|
||||||
extern USARTClass Serial3 ;
|
|
||||||
extern USARTClass Serial4 ;
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* _VARIANT_ARDUINO_DUE_U_ */
|
|
||||||
|
|
@ -144,15 +144,15 @@ extern const PinDescription g_APinDescription[]=
|
|||||||
// 13 - AMBER LED
|
// 13 - AMBER LED
|
||||||
{ PIOB, PIO_PB27B_TIOB0, ID_PIOB, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), NO_ADC, NO_ADC, NOT_ON_PWM, TC0_CHB0 }, // TIOB0
|
{ PIOB, PIO_PB27B_TIOB0, ID_PIOB, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), NO_ADC, NO_ADC, NOT_ON_PWM, TC0_CHB0 }, // TIOB0
|
||||||
|
|
||||||
// 14/15 - USART2 (Serial4)
|
// 14/15 - USART3 (Serial3)
|
||||||
{ PIOD, PIO_PD4B_TXD3, ID_PIOD, PIO_PERIPH_B, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // TXD3
|
{ PIOD, PIO_PD4B_TXD3, ID_PIOD, PIO_PERIPH_B, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // TXD3
|
||||||
{ PIOD, PIO_PD5B_RXD3, ID_PIOD, PIO_PERIPH_B, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // RXD3
|
{ PIOD, PIO_PD5B_RXD3, ID_PIOD, PIO_PERIPH_B, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // RXD3
|
||||||
|
|
||||||
// 16/17 - USART1 (Serial3)
|
// 16/17 - USART1 (Serial2)
|
||||||
{ PIOA, PIO_PA13A_TXD1, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // TXD1
|
{ PIOA, PIO_PA13A_TXD1, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // TXD1
|
||||||
{ PIOA, PIO_PA12A_RXD1, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // RXD1
|
{ PIOA, PIO_PA12A_RXD1, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // RXD1
|
||||||
|
|
||||||
// 18/19 - USART0 (Serial2)
|
// 18/19 - USART0 (Serial1)
|
||||||
{ PIOA, PIO_PA11A_TXD0, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // TXD0
|
{ PIOA, PIO_PA11A_TXD0, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // TXD0
|
||||||
{ PIOA, PIO_PA10A_RXD0, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // RXD0
|
{ PIOA, PIO_PA10A_RXD0, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // RXD0
|
||||||
|
|
||||||
@ -258,11 +258,11 @@ extern const PinDescription g_APinDescription[]=
|
|||||||
{ PIOB, PIO_PB12A_TWD1|PIO_PB13A_TWCK1, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER },
|
{ PIOB, PIO_PB12A_TWD1|PIO_PB13A_TWCK1, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER },
|
||||||
// 81 - UART (Serial) all pins
|
// 81 - UART (Serial) all pins
|
||||||
{ PIOA, PIO_PA8A_URXD|PIO_PA9A_UTXD, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER },
|
{ PIOA, PIO_PA8A_URXD|PIO_PA9A_UTXD, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER },
|
||||||
// 82 - USART0 (Serial2) all pins
|
// 82 - USART0 (Serial1) all pins
|
||||||
{ PIOA, PIO_PA11A_TXD0|PIO_PA10A_RXD0, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER },
|
{ PIOA, PIO_PA11A_TXD0|PIO_PA10A_RXD0, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER },
|
||||||
// 83 - USART1 (Serial3) all pins
|
// 83 - USART1 (Serial2) all pins
|
||||||
{ PIOA, PIO_PA13A_TXD1|PIO_PA12A_RXD1, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER },
|
{ PIOA, PIO_PA13A_TXD1|PIO_PA12A_RXD1, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER },
|
||||||
// 84 - USART3 (Serial4) all pins
|
// 84 - USART3 (Serial3) all pins
|
||||||
{ PIOD, PIO_PD4B_TXD3|PIO_PD5B_RXD3, ID_PIOD, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER },
|
{ PIOD, PIO_PD4B_TXD3|PIO_PD5B_RXD3, ID_PIOD, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER },
|
||||||
|
|
||||||
// 85 - USB
|
// 85 - USB
|
||||||
@ -303,24 +303,24 @@ RingBuffer rx_buffer2 ;
|
|||||||
RingBuffer rx_buffer3;
|
RingBuffer rx_buffer3;
|
||||||
RingBuffer rx_buffer4;
|
RingBuffer rx_buffer4;
|
||||||
|
|
||||||
USARTClass Serial2( USART0, USART0_IRQn, ID_USART0, &rx_buffer2 ) ;
|
USARTClass Serial1(USART0, USART0_IRQn, ID_USART0, &rx_buffer2);
|
||||||
USARTClass Serial3( USART1, USART1_IRQn, ID_USART1, &rx_buffer3 ) ;
|
USARTClass Serial2(USART1, USART1_IRQn, ID_USART1, &rx_buffer3);
|
||||||
USARTClass Serial4( USART3, USART3_IRQn, ID_USART3, &rx_buffer4 ) ;
|
USARTClass Serial3(USART3, USART3_IRQn, ID_USART3, &rx_buffer4);
|
||||||
|
|
||||||
// IT handlers
|
// IT handlers
|
||||||
void USART0_Handler(void)
|
void USART0_Handler(void)
|
||||||
{
|
{
|
||||||
Serial2.IrqHandler() ;
|
Serial1.IrqHandler();
|
||||||
}
|
}
|
||||||
|
|
||||||
void USART1_Handler(void)
|
void USART1_Handler(void)
|
||||||
{
|
{
|
||||||
Serial3.IrqHandler() ;
|
Serial2.IrqHandler();
|
||||||
}
|
}
|
||||||
|
|
||||||
void USART3_Handler(void)
|
void USART3_Handler(void)
|
||||||
{
|
{
|
||||||
Serial4.IrqHandler() ;
|
Serial3.IrqHandler();
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@ -339,10 +339,10 @@ void init( void )
|
|||||||
if (SysTick_Config(SystemCoreClock / 1000))
|
if (SysTick_Config(SystemCoreClock / 1000))
|
||||||
{
|
{
|
||||||
// Capture error
|
// Capture error
|
||||||
while ( 1 ) ;
|
while (true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Disable watchdog, common to all SAM variants
|
// Disable watchdog
|
||||||
WDT_Disable(WDT);
|
WDT_Disable(WDT);
|
||||||
|
|
||||||
// Initialize C library
|
// Initialize C library
|
||||||
@ -352,16 +352,12 @@ void init( void )
|
|||||||
for (int i = 0; i < PINS_COUNT; i++)
|
for (int i = 0; i < PINS_COUNT; i++)
|
||||||
digitalWrite(i, LOW);
|
digitalWrite(i, LOW);
|
||||||
|
|
||||||
// Initialize Serial port UART, common to all SAM3 variants
|
// Initialize Serial port U(S)ART pins
|
||||||
PIO_Configure(
|
PIO_Configure(
|
||||||
g_APinDescription[PINS_UART].pPort,
|
g_APinDescription[PINS_UART].pPort,
|
||||||
g_APinDescription[PINS_UART].ulPinType,
|
g_APinDescription[PINS_UART].ulPinType,
|
||||||
g_APinDescription[PINS_UART].ulPin,
|
g_APinDescription[PINS_UART].ulPin,
|
||||||
g_APinDescription[PINS_UART].ulPinConfiguration);
|
g_APinDescription[PINS_UART].ulPinConfiguration);
|
||||||
|
|
||||||
Serial.begin(115200);
|
|
||||||
|
|
||||||
// Initialize Serial ports USART
|
|
||||||
PIO_Configure(
|
PIO_Configure(
|
||||||
g_APinDescription[PINS_USART0].pPort,
|
g_APinDescription[PINS_USART0].pPort,
|
||||||
g_APinDescription[PINS_USART0].ulPinType,
|
g_APinDescription[PINS_USART0].ulPinType,
|
||||||
@ -373,12 +369,12 @@ void init( void )
|
|||||||
g_APinDescription[PINS_USART1].ulPin,
|
g_APinDescription[PINS_USART1].ulPin,
|
||||||
g_APinDescription[PINS_USART1].ulPinConfiguration);
|
g_APinDescription[PINS_USART1].ulPinConfiguration);
|
||||||
PIO_Configure(
|
PIO_Configure(
|
||||||
g_APinDescription[PINS_USART2].pPort,
|
g_APinDescription[PINS_USART3].pPort,
|
||||||
g_APinDescription[PINS_USART2].ulPinType,
|
g_APinDescription[PINS_USART3].ulPinType,
|
||||||
g_APinDescription[PINS_USART2].ulPin,
|
g_APinDescription[PINS_USART3].ulPin,
|
||||||
g_APinDescription[PINS_USART2].ulPinConfiguration);
|
g_APinDescription[PINS_USART3].ulPinConfiguration);
|
||||||
|
|
||||||
// Initialize USB
|
// Initialize USB pins
|
||||||
PIO_Configure(
|
PIO_Configure(
|
||||||
g_APinDescription[PINS_USB].pPort,
|
g_APinDescription[PINS_USB].pPort,
|
||||||
g_APinDescription[PINS_USB].ulPinType,
|
g_APinDescription[PINS_USB].ulPinType,
|
||||||
|
@ -130,11 +130,14 @@ static const uint8_t SCK = PIN_SPI_SCK ;
|
|||||||
/*
|
/*
|
||||||
* UART/USART Interfaces
|
* UART/USART Interfaces
|
||||||
*/
|
*/
|
||||||
|
// Serial
|
||||||
#define PINS_UART (81u)
|
#define PINS_UART (81u)
|
||||||
|
// Serial1
|
||||||
#define PINS_USART0 (82u)
|
#define PINS_USART0 (82u)
|
||||||
|
// Serial2
|
||||||
#define PINS_USART1 (83u)
|
#define PINS_USART1 (83u)
|
||||||
#define PINS_USART2 (84u)
|
// Serial3
|
||||||
|
#define PINS_USART3 (84u)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* USB Interfaces
|
* USB Interfaces
|
||||||
@ -202,10 +205,9 @@ static const uint8_t CANTX = 69;
|
|||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
||||||
extern UARTClass Serial;
|
extern UARTClass Serial;
|
||||||
|
extern USARTClass Serial1;
|
||||||
extern USARTClass Serial2;
|
extern USARTClass Serial2;
|
||||||
extern USARTClass Serial3;
|
extern USARTClass Serial3;
|
||||||
extern USARTClass Serial4 ;
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user