Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Alexandre Malecot
freertos-cu-gps
Commits
709eab43
Commit
709eab43
authored
Jun 11, 2018
by
Colin González
Browse files
Reorganized the file hierarchy
parent
49ba2b72
Changes
1000
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
7552 additions
and
39 deletions
+7552
-39
Makefile
Makefile
+63
-39
at91lib/at91lib.dir
at91lib/at91lib.dir
+59
-0
at91lib/boards/at91cap9-dk/at91cap9/AT91CAP9.h
at91lib/boards/at91cap9-dk/at91cap9/AT91CAP9.h
+6302
-0
at91lib/boards/at91cap9-dk/at91cap9/bcram.icf
at91lib/boards/at91cap9-dk/at91cap9/bcram.icf
+36
-0
at91lib/boards/at91cap9-dk/at91cap9/bcram.lds
at91lib/boards/at91cap9-dk/at91cap9/bcram.lds
+89
-0
at91lib/boards/at91cap9-dk/at91cap9/bcram.sct
at91lib/boards/at91cap9-dk/at91cap9/bcram.sct
+49
-0
at91lib/boards/at91cap9-dk/at91cap9/chip.h
at91lib/boards/at91cap9-dk/at91cap9/chip.h
+130
-0
at91lib/boards/at91cap9-dk/at91cap9/chip.mak
at91lib/boards/at91cap9-dk/at91cap9/chip.mak
+35
-0
at91lib/boards/at91cap9-dk/at91cap9/ddram.icf
at91lib/boards/at91cap9-dk/at91cap9/ddram.icf
+36
-0
at91lib/boards/at91cap9-dk/at91cap9/ddram.lds
at91lib/boards/at91cap9-dk/at91cap9/ddram.lds
+89
-0
at91lib/boards/at91cap9-dk/at91cap9/ddram.sct
at91lib/boards/at91cap9-dk/at91cap9/ddram.sct
+49
-0
at91lib/boards/at91cap9-dk/at91cap9/norflash.lds
at91lib/boards/at91cap9-dk/at91cap9/norflash.lds
+90
-0
at91lib/boards/at91cap9-dk/at91cap9/sdram.icf
at91lib/boards/at91cap9-dk/at91cap9/sdram.icf
+36
-0
at91lib/boards/at91cap9-dk/at91cap9/sdram.lds
at91lib/boards/at91cap9-dk/at91cap9/sdram.lds
+89
-0
at91lib/boards/at91cap9-dk/at91cap9/sdram.sct
at91lib/boards/at91cap9-dk/at91cap9/sdram.sct
+49
-0
at91lib/boards/at91cap9-dk/at91cap9/sdram_samba.lds
at91lib/boards/at91cap9-dk/at91cap9/sdram_samba.lds
+87
-0
at91lib/boards/at91cap9-dk/at91cap9/sram.icf
at91lib/boards/at91cap9-dk/at91cap9/sram.icf
+27
-0
at91lib/boards/at91cap9-dk/at91cap9/sram.lds
at91lib/boards/at91cap9-dk/at91cap9/sram.lds
+88
-0
at91lib/boards/at91cap9-dk/at91cap9/sram.sct
at91lib/boards/at91cap9-dk/at91cap9/sram.sct
+53
-0
at91lib/boards/at91cap9-dk/at91cap9/sram_samba.lds
at91lib/boards/at91cap9-dk/at91cap9/sram_samba.lds
+96
-0
No files found.
Too many changes to show.
To preserve performance only
1000 of 1000+
files are displayed.
Plain diff
Email patch
Makefile
View file @
709eab43
...
...
@@ -15,22 +15,22 @@ BOARD = at91sam9g20-ek
# TRACE_LEVEL_ERROR 2
# TRACE_LEVEL_FATAL 1
# TRACE_LEVEL_NO_TRACE 0
#
TRACE_LEVEL = 5
TRACE_LEVEL
=
5
AT91LIB
=
src/at91lib
FREERTOS
=
src/freertos
# Optimization level, put in comment for debugging
OPTIMIZATION
=
-Os
AT91LIB
=
./at91lib
FREERTOS
=
./freertos
# Output file basename
OUTPUT
=
img
OUTPUT
=
img
-
$(BOARD)
-
$(CHIP)
# Compile with specific chip features
CHIP_CORE
=
arm926ej_s
CHIP_IP_MCI
=
MCI_PDC
CHIP_IP_UDP
=
USB_UDP
CHIP_IP_UHP
=
USB_OHCI
# Compile with chip specific features
include
$(AT91LIB)/boards/$(BOARD)/$(CHIP)/chip.mak
# Compile for all available
memories
MEMORIES
=
sdram
# Compile for all
memories
available
on the board (this sets $(MEMORIES))
include
$(AT91LIB)/boards/$(BOARD)/board.mak
# Output directories
BIN
=
bin
...
...
@@ -50,10 +50,12 @@ STRIP = $(CROSS_COMPILE)strip
OBJCOPY
=
$(CROSS_COMPILE)
objcopy
# Flags
INCLUDES
=
-I
$(AT91LIB)
/boards/
$(BOARD)
INCLUDES
=
-I
$(AT91LIB)
/boards/
$(BOARD)
INCLUDES
+=
-I
$(AT91LIB)
/peripherals
INCLUDES
+=
-I
$(AT91LIB)
/components
INCLUDES
+=
-I
$(AT91LIB)
INCLUDES
+=
-I
$(FREERTOS)
/portable/GCC/ARM9_AT91SAM9G20
INCLUDES
+=
-I
$(FREERTOS)
/portable/MemMang
INCLUDES
+=
-I
$(FREERTOS)
/portable/
...
...
@@ -61,15 +63,17 @@ INCLUDES += -I$(FREERTOS)/include
INCLUDES
+=
-I
$(FREERTOS)
INCLUDES
+=
-Isrc
/
OPTIM
=
-O3
ifeq
($(CHIP_CORE), cortexm3)
TARGET_OPTS
=
-mcpu
=
cortex-m3
-mthumb
else
TARGET_OPTS
=
endif
CFLAGS
=
-Wall
-Wextra
CFLAGS
+=
-mcpu
=
arm926ej-s
# -fomit-frame-pointer -fno-strict-aliasing -fno-dwarf2-cfi-asm
CFLAGS
+=
-mthumb-interwork
-D
THUMB_INTERWORK
CFLAGS
+=
-g
$(OPTIM)
$(INCLUDES)
-D
$(CHIP)
# -DTRACE_LEVE=$(TRACE_LEVEL)
ASFLAGS
=
-Wall
-g
$(OPTIM)
$(INCLUDES)
-D
$(CHIP)
-D__ASSEMBLY__
LDFLAGS
=
-mthumb
-g
$(OPTIM)
-nostartfiles
-Wl
,--gc-sections
CFLAGS
=
$(TARGET_OPTS)
CFLAGS
+=
-Wall
-mlong-calls
-ffunction-sections
CFLAGS
+=
-g
$(OPTIMIZATION)
$(INCLUDES)
-D
$(CHIP)
-DTRACE_LEVE
=
$(TRACE_LEVEL)
ASFLAGS
=
$(TARGET_OPTS)
-Wall
-g
$(OPTIM)
$(INCLUDES)
-D
$(CHIP)
-D__ASSEMBLY__
LDFLAGS
=
-g
$(OPTIMIZATION)
-nostartfiles
$(TARGET_OPTS)
-Wl
,--gc-sections
#-------------------------------------------------------------------------------
# FILES
...
...
@@ -102,6 +106,8 @@ VPATH += $(FREERTOS)
# Objects build from C source files
C_OBJECTS
=
main.o
# AT91LIB objects
C_OBJECTS
+=
led.o
C_OBJECTS
+=
stdio.o
C_OBJECTS
+=
dbgu.o
...
...
@@ -115,21 +121,22 @@ C_OBJECTS += board_memories.o
C_OBJECTS
+=
aic.o
C_OBJECTS
+=
cp15.o
C_OBJECTS
+=
pit.o
# FreeRTOS objects build from C source files
C_OBJECTS
+=
port.o
C_OBJECTS
+=
portISR.o
C_OBJECTS
+=
tasks.o
C_OBJECTS
+=
queue.o
C_OBJECTS
+=
event_groups.o
C_OBJECTS
+=
list.o
C_OBJECTS
+=
stream_buffer.o
C_OBJECTS
+=
timers.o
C_OBJECTS
+=
heap_
2
.o
C_OBJECTS
+=
heap_
1
.o
# Objects build
with ARM instruction set from C
source files
A
R
M_OBJECTS
=
portISR
.o
# Objects build
from assembly
source files
A
S
M_OBJECTS
=
board_fstartup
.o
# Objects build form assembly source files
ASM_OBJECTS
=
board_cstartup.o
# AT91LIB objects built from assembly source files
ASM_OBJECTS
+=
cp15_asm_gcc.o
#Append OBJ and BIN directories to output filename
...
...
@@ -140,42 +147,59 @@ OUTPUT := $(BIN)/$(OUTPUT)
#-------------------------------------------------------------------------------
all
:
$(BIN) $(OBJ) $(MEMORIES)
phony
:
flash clean
$(BIN) $(OBJ)
:
mkdir
$@
define
RULES
ARM_OBJECTS_$(1)
=
$(
addprefix
$(OBJ)
/
$(1)
_,
$(ARM_OBJECTS)
)
C_OBJECTS_$(1)
=
$(
addprefix
$(OBJ)
/
$(1)
_,
$(C_OBJECTS)
)
ASM_OBJECTS_$(1)
=
$(
addprefix
$(OBJ)
/
$(1)
_,
$(ASM_OBJECTS)
)
$(1)
:
$$(ARM_OBJECTS_$(1))
$$(ASM_OBJECTS_$(1)) $$(C_OBJECTS_$(1))
$(1)
:
$$(ASM_OBJECTS_$(1)) $$(C_OBJECTS_$(1))
$(CC)
$(LDFLAGS)
-T
"
$(AT91LIB)
/boards/
$(BOARD)
/
$(CHIP)
/
$$
@.lds"
\
-o
$(OUTPUT)
-
$$
@.elf
$$
^
$(OBJCOPY)
-O
binary
$(OUTPUT)
-
$$
@.elf
$(OUTPUT)
-
$$
@.bin
$(SIZE)
$$
^
$(OUTPUT)
-
$$
@.elf
$$(ARM_OBJECTS_$(1))
:
$(OBJ)/$(1)_%.o: %.c Makefile $(OBJ) $(BIN)
$(CC)
$(CFLAGS)
-D
$(1)
-c
-o
$$
@
$$
<
$$(C_OBJECTS_$(1))
:
$(OBJ)/$(1)_%.o: %.c Makefile $(OBJ) $(BIN)
$(CC)
$(CFLAGS)
-mthumb
-D
$(1)
-c
-o
$$
@
$$
<
@
echo
$(CFLAGS)
$(CC)
$(CFLAGS)
-D
$(1)
-c
-o
$$
@
$$
<
$$(ASM_OBJECTS_$(1))
:
$(OBJ)/$(1)_%.o: %.S Makefile $(OBJ) $(BIN)
$(CC)
$(ASFLAGS)
-D
$(1)
-c
-o
$$
@
$$
<
debug_$(1)
:
$(1)
perl ../resources/gdb/debug.pl
$(OUTPUT)
-
$(1)
.elf
@
echo
"Starting a remote gdb session."
./opt/gdb/debug.sh
$(OUTPUT)
-
$(1)
.elf
endef
$(foreach
MEMORY,
$(MEMORIES),
$(eval
$(call
RULES,$(MEMORY))))
ifeq
(flash, $(firstword $(MAKECMDGOALS)))
FLASH_ARGS
:=
$(
wordlist
2,
$(
words
$(MAKECMDGOALS)
)
,
$(MAKECMDGOALS)
)
endif
.PHONY
:
nand ram jlink flash connect clean
jlink
:
sdram
@
echo
"Starting a J-Link connection."
./opt/jlink/jlink.sh
connect
:
@
echo
"Connectiong to debug port."
./opt/tty/connect.sh
flash
:
./src/flashing/flash.sh
flash
:
sdram
@
echo
"Flashing binary to "
$(FLASH_ARGS)
"."
./opt/flashing/flash.sh
$(FLASH_ARGS)
nand
:
@
:
ram
:
@
:
$(foreach
MEMORY,
$(MEMORIES),
$(eval
$(call
RULES,$(MEMORY))))
clean
:
-
rm
-f
$(OBJ)
/
*
.o
$(BIN)
/
*
.bin
$(BIN)
/
*
.elf flash.log
-
rm
-f
$(OBJ)
/
*
.o
$(BIN)
/
*
.bin
$(BIN)
/
*
.elf flash.log
cmd.gdb
at91lib/at91lib.dir
0 → 100644
View file @
709eab43
/* ----------------------------------------------------------------------------
* ATMEL Microcontroller Software Support
* ----------------------------------------------------------------------------
* Copyright (c) 2008, 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.
* ----------------------------------------------------------------------------
*/
//------------------------------------------------------------------------------
/// \dir
/// !!!Purpose
///
/// This directory provides a library of highly re-usable code to build
/// applications on Atmel AT91 microcontrollers.
///
/// !!!Contents
/// AT91LIB can basically be divided into two sections:
/// - Board-dependant definitions and routines
/// - Re-usable & portable software modules
///
/// Board-specific code is entirely located in the #board# subdirectory. The
/// second group is then split into several sub-directories, depending on
/// the nature of the software module. Currently, the following directories
/// are defined:
/// - components
/// - drivers
/// - memories
/// - peripherals
/// - usb
/// - utility
///
/// For more information about what a particular group contains, please refer to
/// its documentation page.
///
/// \note Depending on the project, not all the subdirectories will be
/// available (i.e. the #usb# directory will not be in non-USB projects).
//------------------------------------------------------------------------------
at91lib/boards/at91cap9-dk/at91cap9/AT91CAP9.h
0 → 100644
View file @
709eab43
This diff is collapsed.
Click to expand it.
at91lib/boards/at91cap9-dk/at91cap9/bcram.icf
0 → 100644
View file @
709eab43
/*###ICF### Section handled by ICF editor, don't touch! ****/
/*-Editor annotation file-*/
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\a_v1_0.xml" */
/*-Memory Regions-*/
define symbol __ICFEDIT_region_BCRAM_start__ = 0x20000000;
define symbol __ICFEDIT_region_BCRAM_end__ = 0x20FFFFFF;
define symbol __ICFEDIT_region_RAM_start__ = 0x100000;
define symbol __ICFEDIT_region_RAM_end__ = 0x107fff;
/*-Sizes-*/
define symbol __ICFEDIT_size_startup__ = 0x100;
define symbol __ICFEDIT_size_vectors__ = 0x100;
define symbol __ICFEDIT_size_cstack__ = 0x1000;
define symbol __ICFEDIT_size_sysstack__ = 0x60;
define symbol __ICFEDIT_size_irqstack__ = 0x60;
define symbol __ICFEDIT_size_heap__ = 0x0;
/**** End of ICF editor section. ###ICF###*/
define memory mem with size = 4G;
define region VEC_region = mem:[from __ICFEDIT_region_RAM_start__ size __ICFEDIT_size_vectors__];
define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__+__ICFEDIT_size_vectors__ to __ICFEDIT_region_RAM_end__];
define region STA_region = mem:[from __ICFEDIT_region_BCRAM_start__ size __ICFEDIT_size_startup__];
define region BCRAM_region = mem:[from __ICFEDIT_region_BCRAM_start__+__ICFEDIT_size_startup__ to __ICFEDIT_region_BCRAM_end__];
define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
define block SYS_STACK with alignment = 8, size = __ICFEDIT_size_sysstack__ { };
define block IRQ_STACK with alignment = 8, size = __ICFEDIT_size_irqstack__ { };
define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
initialize by copy { section .vectors };
initialize by copy { section .ramfunc };
do not initialize { section .noinit };
place in STA_region { section .cstartup };
place in VEC_region { section .vectors };
place in RAM_region { section .ramfunc };
place in BCRAM_region { readonly, readwrite, block IRQ_STACK, block SYS_STACK, block CSTACK, block HEAP };
at91lib/boards/at91cap9-dk/at91cap9/bcram.lds
0 → 100644
View file @
709eab43
/* ----------------------------------------------------------------------------
* ATMEL Microcontroller Software Support
* ----------------------------------------------------------------------------
* Copyright (c) 2008, 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 external BCRAM on the AT91CAP9
*----------------------------------------------------------------------------*/
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
OUTPUT_ARCH(arm)
ENTRY(entry)
MEMORY
{
sram (W!RX) : ORIGIN = 0x100000, LENGTH = 0x8000
bcram (W!RX) : ORIGIN = 0x20000000, LENGTH = 0x1000000
}
SECTIONS
{
.fixed :
{
. = ALIGN(4);
_sfixed = .;
*(.text*)
*(.rodata*)
*(.glue_7)
*(.glue_7t)
*(.data)
*(.CP15_*)
. = ALIGN(4);
_efixed = .;
} >bcram
.prerelocate : AT (_efixed)
{
. = ALIGN(4);
_sprerelocate = .;
. = ALIGN(4);
_eprerelocate = .;
}
.postrelocate : AT (_efixed + SIZEOF(.prerelocate))
{
. = ALIGN(4);
_spostrelocate = .;
*(.vectors);
*(.ramfunc)
. = ALIGN(4);
_epostrelocate = .;
} >sram
.bss (NOLOAD) : {
_szero = .;
*(.bss)
. = ALIGN(4);
_ezero = .;
} >bcram
_sstack = 0x21000000;
}
end = .;
PROVIDE(__HEAP_START = _ezero );
at91lib/boards/at91cap9-dk/at91cap9/bcram.sct
0 → 100644
View file @
709eab43
; * ----------------------------------------------------------------------------
; * ATMEL Microcontroller Software Support
; * ----------------------------------------------------------------------------
; * Copyright (c) 2008, 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 scatter for running in external SDRAM on the AT91SAMCAP9
; *----------------------------------------------------------------------------*/
Load_region 0x20000000 0x1000000 {
Fixed_region 0x20000000 {
*(cstartup +First)
.ANY (+RO +RW +ZI)
}
Relocate_region 0x100000 0x8000 {
*.o (VECTOR, +First)
}
ARM_LIB_HEAP 0x20FFE000 EMPTY 0x1000 {
}
ARM_LIB_STACK 0x21000000 EMPTY -0x1000 {
}
}
\ No newline at end of file
at91lib/boards/at91cap9-dk/at91cap9/chip.h
0 → 100644
View file @
709eab43
/* ----------------------------------------------------------------------------
* ATMEL Microcontroller Software Support
* ----------------------------------------------------------------------------
* Copyright (c) 2008, 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.
* ----------------------------------------------------------------------------
*/
//------------------------------------------------------------------------------
/// \unit
/// !Purpose
///
/// Definition of AT91CAP9 characteristics and features
///
/// !Usage
/// -# For ARM core feature, see "AT91CAP9 - ARM core features".
/// -# For IP features, see "AT91CAP9 - IP features".
/// -# For misc, see "AT91CAP9 - Misc".
//------------------------------------------------------------------------------
#ifndef CHIP_H
#define CHIP_H
//------------------------------------------------------------------------------
// Headers
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// Definitions
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
/// \page "AT91CAP9 - ARM core features"
/// This page lists several characteristics related to the ARM core
///
//ARM core features
/// ARM core definition.
#define arm926ej_s
/// family definition.
//#define at91cap9 (already defined)
/// temporary define, to be removed
#define CP15_PRESENT
//------------------------------------------------------------------------------
/// \page "AT91CAP9 - IP features"
/// This page lists several characteristics related to the embedded IP
///
//IP FEATURES
// DMA channels number
#define CHIP_DMA_CHANNEL_NUM 4
/// Indicates chip has an UDP High Speed.
#define CHIP_USB_UDPHS
/// Indicates chip has an Host Full Speed.
#define CHIP_USB_UHP_OHCI
/// Indicates chip has an internal pull-up.
#define CHIP_USB_PULLUP_INTERNAL
/// Number of USB endpoints
#define CHIP_USB_NUMENDPOINTS 8
/// Endpoints max paxcket size
#define CHIP_USB_ENDPOINTS_MAXPACKETSIZE(i) \
((
i
==
0
)
?
64
:
\
((
i
==
1
)
?
1024
:
\
((
i
==
2
)
?
1024
:
\
((
i
==
3
)
?
1024
:
\
((
i
==
4
)
?
1024
:
\
((
i
==
5
)
?
1024
:
\
((
i
==
6
)
?
1024
:
\
((
i
==
7
)
?
1024
:
0
))))))))
/// Endpoints Number of Bank
#define CHIP_USB_ENDPOINTS_BANKS(i) \
((
i
==
0
)
?
1
:
\
((
i
==
1
)
?
3
:
\
((
i
==
2
)
?
3
:
\
((
i
==
3
)
?
2
:
\
((
i
==
4
)
?
2
:
\
((
i
==
5
)
?
2
:
\
((
i
==
6
)
?
2
:
\
((
i
==
7
)
?
2
:
0
))))))))
/// Endpoints max paxcket size
#define CHIP_USB_ENDPOINTS_DMA(i) \
((
i
==
1
)
?
1
:
\
((
i
==
2
)
?
1
:
\
((
i
==
3
)
?
1
:
\
((
i
==
4
)
?
1
:
\
((
i
==
5
)
?
1
:
\
((
i
==
6
)
?
1
:
0
))))))
//------------------------------------------------------------------------------
/// \page "AT91CAP9 - Misc "
/// This page lists misc features
///
//Misc
#endif //#ifndef CHIP_H
at91lib/boards/at91cap9-dk/at91cap9/chip.mak
0 → 100644
View file @
709eab43
# ----------------------------------------------------------------------------
# ATMEL Microcontroller Software Support
# ----------------------------------------------------------------------------
# Copyright (c) 2008, 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.
# ----------------------------------------------------------------------------
# Defines which are the specific available IP for the chip AT91CAP9
CHIP_CORE
=
arm926ej_s
CHIP_IP_TS
=
NO_TSADC
CHIP_IP_MCI
=
MCI_PDC
CHIP_IP_UDP
=
USB_UDPHS
CHIP_IP_UHP
=
USB_OHCI
at91lib/boards/at91cap9-dk/at91cap9/ddram.icf
0 → 100644
View file @
709eab43
/*###ICF### Section handled by ICF editor, don't touch! ****/
/*-Editor annotation file-*/
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\a_v1_0.xml" */
/*-Memory Regions-*/
define symbol __ICFEDIT_region_DDRAM_start__ = 0x70000000;
define symbol __ICFEDIT_region_DDRAM_end__ = 0x71FFFFFF;
define symbol __ICFEDIT_region_RAM_start__ = 0x100000;
define symbol __ICFEDIT_region_RAM_end__ = 0x107fff;
/*-Sizes-*/
define symbol __ICFEDIT_size_startup__ = 0x100;
define symbol __ICFEDIT_size_vectors__ = 0x100;
define symbol __ICFEDIT_size_cstack__ = 0x1000;
define symbol __ICFEDIT_size_sysstack__ = 0x60;
define symbol __ICFEDIT_size_irqstack__ = 0x60;
define symbol __ICFEDIT_size_heap__ = 0x0;
/**** End of ICF editor section. ###ICF###*/
define memory mem with size = 4G;
define region VEC_region = mem:[from __ICFEDIT_region_RAM_start__ size __ICFEDIT_size_vectors__];
define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__+__ICFEDIT_size_vectors__ to __ICFEDIT_region_RAM_end__];
define region STA_region = mem:[from __ICFEDIT_region_DDRAM_start__ size __ICFEDIT_size_startup__];
define region DDRAM_region = mem:[from __ICFEDIT_region_DDRAM_start__+__ICFEDIT_size_startup__ to __ICFEDIT_region_DDRAM_end__];
define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
define block SYS_STACK with alignment = 8, size = __ICFEDIT_size_sysstack__ { };
define block IRQ_STACK with alignment = 8, size = __ICFEDIT_size_irqstack__ { };
define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
initialize by copy { section .vectors };
initialize by copy { section .ramfunc };
do not initialize { section .noinit };
place in STA_region { section .cstartup };
place in VEC_region { section .vectors };
place in RAM_region { section .ramfunc };
place in DDRAM_region { readonly, readwrite, block IRQ_STACK, block SYS_STACK, block CSTACK, block HEAP };
at91lib/boards/at91cap9-dk/at91cap9/ddram.lds
0 → 100644
View file @
709e