* preinstall.am, shared/lpc/include/lpc-i2s.h,
	shared/startup/linkcmds.armv4, shared/startup/linkcmds.armv7: New
	files.
	* Makefile.am: Added header and linker command files intended to be
	used by every ARM BSP.
	* shared/startup/linkcmds.base: Support for EABI and ARM ELF standard.
	* shared/include/linker-symbols.h: Update due to linker command file
	changes.
	* shared/start/start.S, shared/include/start.h: Renamed entry symbol
	from start to _start to avoid namespace conflicts.  Update due to
	linker command file changes.
This commit is contained in:
Sebastian Huber
2010-12-03 09:23:52 +00:00
parent 87b4f1237c
commit a3579d3b2d
10 changed files with 551 additions and 243 deletions
+14
View File
@@ -1,3 +1,17 @@
2010-12-03 Sebastian Huber <sebastian.huber@embedded-brains.de>
* preinstall.am, shared/lpc/include/lpc-i2s.h,
shared/startup/linkcmds.armv4, shared/startup/linkcmds.armv7: New
files.
* Makefile.am: Added header and linker command files intended to be
used by every ARM BSP.
* shared/startup/linkcmds.base: Support for EABI and ARM ELF standard.
* shared/include/linker-symbols.h: Update due to linker command file
changes.
* shared/start/start.S, shared/include/start.h: Renamed entry symbol
from start to _start to avoid namespace conflicts. Update due to
linker command file changes.
2010-11-23 Gedare Bloom <giddyup44@yahoo.com>
PR 1719/cpukit
+8
View File
@@ -9,6 +9,13 @@ ACLOCAL_AMFLAGS = -I ../../../aclocal
## added but it is present in the source tree.
SUBDIRS = @RTEMS_BSP_FAMILY@
include_bspdir = $(includedir)/bsp
include_bsp_HEADERS = shared/include/linker-symbols.h
dist_project_lib_DATA = shared/startup/linkcmds.base
dist_project_lib_DATA += shared/startup/linkcmds.armv4
dist_project_lib_DATA += shared/startup/linkcmds.armv7
EXTRA_DIST =
# comm
@@ -18,5 +25,6 @@ EXTRA_DIST += shared/comm/uart.c
# abort
EXTRA_DIST += shared/abort/simple_abort.c
include $(srcdir)/preinstall.am
include $(top_srcdir)/../../../automake/subdirs.am
include $(top_srcdir)/../../../automake/local.am
+41
View File
@@ -0,0 +1,41 @@
## Automatically generated by ampolish3 - Do not edit
if AMPOLISH3
$(srcdir)/preinstall.am: Makefile.am
$(AMPOLISH3) $(srcdir)/Makefile.am > $(srcdir)/preinstall.am
endif
PREINSTALL_DIRS =
DISTCLEANFILES = $(PREINSTALL_DIRS)
all-am: $(PREINSTALL_FILES)
PREINSTALL_FILES =
CLEANFILES = $(PREINSTALL_FILES)
$(PROJECT_LIB)/$(dirstamp):
@$(MKDIR_P) $(PROJECT_LIB)
@: > $(PROJECT_LIB)/$(dirstamp)
PREINSTALL_DIRS += $(PROJECT_LIB)/$(dirstamp)
$(PROJECT_INCLUDE)/bsp/$(dirstamp):
@$(MKDIR_P) $(PROJECT_INCLUDE)/bsp
@: > $(PROJECT_INCLUDE)/bsp/$(dirstamp)
PREINSTALL_DIRS += $(PROJECT_INCLUDE)/bsp/$(dirstamp)
$(PROJECT_INCLUDE)/bsp/linker-symbols.h: shared/include/linker-symbols.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/linker-symbols.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/linker-symbols.h
$(PROJECT_LIB)/linkcmds.base: shared/startup/linkcmds.base $(PROJECT_LIB)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.base
PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds.base
$(PROJECT_LIB)/linkcmds.armv4: shared/startup/linkcmds.armv4 $(PROJECT_LIB)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.armv4
PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds.armv4
$(PROJECT_LIB)/linkcmds.armv7: shared/startup/linkcmds.armv7 $(PROJECT_LIB)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.armv7
PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds.armv7
@@ -74,21 +74,31 @@ LINKER_SYMBOL(bsp_section_text_begin)
LINKER_SYMBOL(bsp_section_text_end)
LINKER_SYMBOL(bsp_section_text_size)
LINKER_SYMBOL(bsp_section_text_load_begin)
LINKER_SYMBOL(bsp_section_text_load_end)
LINKER_SYMBOL(bsp_section_rodata_begin)
LINKER_SYMBOL(bsp_section_rodata_end)
LINKER_SYMBOL(bsp_section_rodata_size)
LINKER_SYMBOL(bsp_section_rodata_load_begin)
LINKER_SYMBOL(bsp_section_rodata_load_end)
LINKER_SYMBOL(bsp_section_data_begin)
LINKER_SYMBOL(bsp_section_data_end)
LINKER_SYMBOL(bsp_section_data_size)
LINKER_SYMBOL(bsp_section_data_load_begin)
LINKER_SYMBOL(bsp_section_data_load_end)
LINKER_SYMBOL(bsp_section_fast_begin)
LINKER_SYMBOL(bsp_section_fast_end)
LINKER_SYMBOL(bsp_section_fast_size)
LINKER_SYMBOL(bsp_section_fast_load_begin)
LINKER_SYMBOL(bsp_section_fast_text_begin)
LINKER_SYMBOL(bsp_section_fast_text_end)
LINKER_SYMBOL(bsp_section_fast_text_size)
LINKER_SYMBOL(bsp_section_fast_text_load_begin)
LINKER_SYMBOL(bsp_section_fast_text_load_end)
LINKER_SYMBOL(bsp_section_fast_data_begin)
LINKER_SYMBOL(bsp_section_fast_data_end)
LINKER_SYMBOL(bsp_section_fast_data_size)
LINKER_SYMBOL(bsp_section_fast_data_load_begin)
LINKER_SYMBOL(bsp_section_fast_data_load_end)
LINKER_SYMBOL(bsp_section_bss_begin)
LINKER_SYMBOL(bsp_section_bss_end)
@@ -106,6 +116,10 @@ LINKER_SYMBOL(bsp_vector_table_begin)
LINKER_SYMBOL(bsp_vector_table_end)
LINKER_SYMBOL(bsp_vector_table_size)
#define BSP_FAST_TEXT_SECTION __attribute__((section(".bsp_fast_text")))
#define BSP_FAST_DATA_SECTION __attribute__((section(".bsp_fast_data")))
/** @} */
#ifdef __cplusplus
+2 -2
View File
@@ -38,14 +38,14 @@ extern "C" {
* @{
*/
#define BSP_START_SECTION __attribute__((section(".bsp_start")))
#define BSP_START_TEXT_SECTION __attribute__((section(".bsp_start_text")))
#define BSP_START_DATA_SECTION __attribute__((section(".bsp_start_data")))
/**
* @brief System start entry.
*/
void start(void);
void _start(void);
/**
* @brief Start entry hook 0.
@@ -0,0 +1,131 @@
/**
* @file
*
* @ingroup lpc_i2s
*
* @brief I2S API.
*/
/*
* Copyright (c) 2010 embedded brains GmbH. All rights reserved.
*
* embedded brains GmbH
* Obere Lagerstr. 30
* 82178 Puchheim
* Germany
* <rtems@embedded-brains.de>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
*/
#ifndef LIBBSP_ARM_SHARED_LPC_I2S_H
#define LIBBSP_ARM_SHARED_LPC_I2S_H
#include <bsp/utility.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* @defgroup lpc_dma I2S Support
*
* @ingroup lpc
*
* @brief I2S support.
*
* @{
*/
/**
* @brief I2S control block.
*/
typedef struct {
uint32_t dao;
uint32_t dai;
uint32_t txfifo;
uint32_t rxfifo;
uint32_t state;
uint32_t dma [2];
uint32_t irq;
uint32_t txrate;
uint32_t rxrate;
} lpc_i2s;
/**
* @name I2S Digital Audio Input and Output
*
* @{
*/
#define I2S_DAIO_WORDWIDTH(val) BSP_FLD32(val, 0, 1)
#define I2S_DAIO_MONO BSP_BIT32(2)
#define I2S_DAIO_STOP BSP_BIT32(3)
#define I2S_DAIO_RESET BSP_BIT32(4)
#define I2S_DAIO_WS_SEL BSP_BIT32(5)
#define I2S_DAIO_WS_HALFPERIOD(val) BSP_FLD32(val, 6, 14)
#define I2S_DAIO_MUTE BSP_BIT32(15)
/** @} */
/**
* @name I2S Status Feedback
*
* @{
*/
#define I2S_STATE_IRQ BSP_BIT32(0)
#define I2S_STATE_DMAREQ_0 BSP_BIT32(1)
#define I2S_STATE_DMAREQ_1 BSP_BIT32(2)
#define I2S_STATE_RX_LEVEL_GET(reg) BSP_FLD32GET(reg, 8, 11)
#define I2S_STATE_TX_LEVEL_GET(reg) BSP_FLD32GET(reg, 16, 19)
/** @} */
/**
* @name I2S DMA Configuration
*
* @{
*/
#define I2S_DMA_RX_ENABLE BSP_BIT32(0)
#define I2S_DMA_TX_ENABLE BSP_BIT32(1)
#define I2S_DMA_RX_DEPTH(val) BSP_FLD32(val, 8, 11)
#define I2S_DMA_TX_DEPTH(val) BSP_FLD32(val, 16, 19)
/** @} */
/**
* @name I2S Interrupt Request Control
*
* @{
*/
#define I2S_IRQ_RX BSP_BIT32(0)
#define I2S_IRQ_TX BSP_BIT32(1)
#define I2S_IRQ_RX_DEPTH(val) BSP_FLD32(val, 8, 11)
#define I2S_IRQ_TX_DEPTH(val) BSP_FLD32(val, 16, 19)
/** @} */
/**
* @name I2S Transmit and Receive Clock Rate
*
* @{
*/
#define LPC24XX_I2S_RATE(val) BSP_FLD32(val, 0, 9)
#define LPC32XX_I2S_RATE_X_DIVIDER BSP_FLD32(val, 0, 7)
#define LPC32XX_I2S_RATE_Y_DIVIDER BSP_FLD32(val, 8, 15)
/** @} */
/** @} */
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* LIBBSP_ARM_SHARED_LPC_I2S_H */
+4 -4
View File
@@ -32,10 +32,10 @@
/* Global symbols */
.globl start
.globl _start
.globl bsp_start_memcpy
.section ".bsp_start", "ax"
.section ".bsp_start_text", "ax"
.arm
@@ -63,7 +63,7 @@ handler_addr_reset:
#ifdef BSP_START_RESET_VECTOR
.word BSP_START_RESET_VECTOR
#else
.word start
.word _start
#endif
handler_addr_undef:
@@ -96,7 +96,7 @@ handler_addr_fiq:
/* Start entry */
start:
_start:
/*
* We do not save the context since we do not return to the boot
@@ -0,0 +1,38 @@
/**
* @file
*
* @ingroup bsp_linker
*
* @brief Linker command file for ARMv4T architecture.
*/
/*
* Copyright (c) 2010 embedded brains GmbH. All rights reserved.
*
* embedded brains GmbH
* Obere Lagerstr. 30
* 82178 Puchheim
* Germany
* <rtems@embedded-brains.de>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
*/
bsp_stack_abt_size = DEFINED (bsp_stack_abt_size) ? bsp_stack_abt_size : 128;
bsp_stack_abt_size = ALIGN (bsp_stack_abt_size, bsp_stack_align);
bsp_stack_fiq_size = DEFINED (bsp_stack_fiq_size) ? bsp_stack_fiq_size : 128;
bsp_stack_fiq_size = ALIGN (bsp_stack_fiq_size, bsp_stack_align);
bsp_stack_irq_size = DEFINED (bsp_stack_irq_size) ? bsp_stack_irq_size : 512;
bsp_stack_irq_size = ALIGN (bsp_stack_irq_size, bsp_stack_align);
bsp_stack_svc_size = DEFINED (bsp_stack_svc_size) ? bsp_stack_svc_size : 512;
bsp_stack_svc_size = ALIGN (bsp_stack_svc_size, bsp_stack_align);
bsp_stack_und_size = DEFINED (bsp_stack_und_size) ? bsp_stack_und_size : 128;
bsp_stack_und_size = ALIGN (bsp_stack_und_size, bsp_stack_align);
INCLUDE linkcmds.base
@@ -0,0 +1,26 @@
/**
* @file
*
* @ingroup bsp_linker
*
* @brief Linker command file for ARMv7 architecture.
*/
/*
* Copyright (c) 2010 embedded brains GmbH. All rights reserved.
*
* embedded brains GmbH
* Obere Lagerstr. 30
* 82178 Puchheim
* Germany
* <rtems@embedded-brains.de>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
*/
bsp_stack_main_size = DEFINED (bsp_stack_main_size) ? bsp_stack_main_size : 4096;
bsp_stack_main_size = ALIGN (bsp_stack_main_size, bsp_stack_align);
INCLUDE linkcmds.base
File diff suppressed because it is too large Load Diff