|
From: <ak...@us...> - 2008-02-06 11:16:28
|
Revision: 823
http://can.svn.sourceforge.net/can/?rev=823&view=rev
Author: akhe
Date: 2008-02-06 03:16:23 -0800 (Wed, 06 Feb 2008)
Log Message:
-----------
Added two str arm example projects that use the common structure for libs etc
Added Paths:
-----------
trunk/firmware/arm/str/dosubst.bat
trunk/firmware/arm/str/fourbits730/
trunk/firmware/arm/str/fourbits730/73x_lcd.c
trunk/firmware/arm/str/fourbits730/73x_lcd.h
trunk/firmware/arm/str/fourbits730/Makefile
trunk/firmware/arm/str/fourbits730/Readme.txt
trunk/firmware/arm/str/fourbits730/STR73x-RAM.ld
trunk/firmware/arm/str/fourbits730/STR73x-ROM.ld
trunk/firmware/arm/str/fourbits730/dosubst.bat
trunk/firmware/arm/str/fourbits730/main.c
trunk/firmware/arm/str/fourbits730/startup.s
trunk/firmware/arm/str/fourbits730/vector.s
trunk/firmware/arm/str/fourbits730/vectors.c
trunk/firmware/arm/str/fourbits730/vectors.h
trunk/firmware/arm/str/led730/
trunk/firmware/arm/str/led730/Makefile
trunk/firmware/arm/str/led730/STR73x-RAM.ld
trunk/firmware/arm/str/led730/STR73x-ROM.ld
trunk/firmware/arm/str/led730/main.c
trunk/firmware/arm/str/led730/startup.s
trunk/firmware/arm/str/led730/vector.s
trunk/firmware/arm/str/led730/vectors.c
trunk/firmware/arm/str/led730/vectors.h
Added: trunk/firmware/arm/str/dosubst.bat
===================================================================
--- trunk/firmware/arm/str/dosubst.bat (rev 0)
+++ trunk/firmware/arm/str/dosubst.bat 2008-02-06 11:16:23 UTC (rev 823)
@@ -0,0 +1,2 @@
+subst k: "C:/Program Files/yagarto/arm-elf"
+set INCLUDE = "C:\Program Files\yagarto\arm-elf\include"
Added: trunk/firmware/arm/str/fourbits730/73x_lcd.c
===================================================================
--- trunk/firmware/arm/str/fourbits730/73x_lcd.c (rev 0)
+++ trunk/firmware/arm/str/fourbits730/73x_lcd.c 2008-02-06 11:16:23 UTC (rev 823)
@@ -0,0 +1,459 @@
+/******************** (C) COPYRIGHT 2005 STMicroelectronics **********************
+* File Name : 73x_lcd.c
+* Author : MCD Application Team
+* Date First Issued : 09/27/2005 : V1.0
+* Description : This file provides all the LCD software functions.
+**********************************************************************************
+* History:
+* 09/27/2005 : V1.0
+**********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH
+* CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT
+* OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT
+* OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION
+* CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*********************************************************************************/
+/* Standard includes -----------------------------------------------------------*/
+#include "73x_lcd.h"
+#include "73x_lib.h"
+/* Include of other module interface headers -----------------------------------*/
+/* Local includes --------------------------------------------------------------*/
+/* Private typedef -------------------------------------------------------------*/
+/* Private define --------------------------------------------------------------*/
+/* Private macro ---------------------------------------------------------------*/
+/* Private variables -----------------------------------------------------------*/
+vu16 LCDDelay = 0;
+/* Private function prototypes -------------------------------------------------*/
+// Define GPIO Init Structure */
+GPIO_InitTypeDef GPIO_InitStructure0;
+/* Interface functions ---------------------------------------------------------*/
+/* Private functions -----------------------------------------------------------*/
+
+
+/*******************************************************************************
+* Function Name : LCD_Init
+* Description : Initializes the LCD driver.
+* Input : None
+* Output : None
+* Return : None
+*******************************************************************************/
+void LCD_Init(void)
+{
+ /* GPIO6 Clock Enable */
+ CFG_PeripheralClockConfig(CFG_CLK_GPIO6 , ENABLE);
+ /* GPIO6 Configuration */
+ GPIO_InitStructure0.GPIO_Mode = GPIO_Mode_OUT_PP;
+ GPIO_InitStructure0.GPIO_Pins = GPIO_PIN_0 | GPIO_PIN_1 |GPIO_PIN_10;
+ GPIO_Init(GPIO6, &GPIO_InitStructure0);
+
+ /* GPIO5 Clock Enable */
+ CFG_PeripheralClockConfig(CFG_CLK_GPIO5 , ENABLE);
+ /* GPIO5 Configuration */
+ GPIO_InitStructure0.GPIO_Mode = GPIO_Mode_OUT_PP;
+ GPIO_InitStructure0.GPIO_Pins = GPIO_PIN_12 | GPIO_PIN_13 |GPIO_PIN_14 |GPIO_PIN_15;
+ GPIO_Init(GPIO5, &GPIO_InitStructure0);
+
+ /* GPIO2 Clock Enable */
+ CFG_PeripheralClockConfig(CFG_CLK_GPIO2 , ENABLE);
+ /* GPIO2 Configuration */
+ GPIO_InitStructure0.GPIO_Mode = GPIO_Mode_OUT_PP;
+ GPIO_InitStructure0.GPIO_Pins = GPIO_PIN_0;
+ GPIO_Init(GPIO2, &GPIO_InitStructure0);
+ GPIO_BitWrite(GPIO2, GPIO_PIN_0, Bit_SET);
+
+ // Wait 40 ms
+ LCD_Wait(4000);
+ LCD_Send_Command_4bit(0x30);
+ // Wait 6 ms
+ LCD_Wait(600);
+ LCD_Send_Command_4bit(0x30);
+ // Wait 6 ms
+ LCD_Wait(600);
+ LCD_Send_Command_4bit(0x30);
+ // Wait 6 ms
+ LCD_Wait(600);
+ LCD_Send_Command_4bit(0x20);
+ // Wait 6 ms
+ LCD_Wait(600);
+ LCD_Send_Command_4bit(0x20);
+ // Wait 6 ms
+ LCD_Wait(600);
+ LCD_Send_Command_4bit(0xF0);
+ // Wait 6 ms
+ LCD_Wait(600);
+ LCD_Send_Command_4bit(0x00);
+ // Wait 6 ms
+ LCD_Wait(600);
+ LCD_Send_Command_4bit(0x80);
+ // Wait 6 ms
+ LCD_Wait(600);
+ LCD_Send_Command_4bit(0x00);
+ // Wait 6 ms
+ LCD_Wait(600);
+ LCD_Send_Command_4bit(0x10);
+ // Wait 6 ms
+ LCD_Wait(600);
+ LCD_Send_Command_4bit(0x00);
+ // Wait 6 ms
+ LCD_Wait(600);
+ LCD_Send_Command_4bit(0x60);
+ // Wait 6 ms
+ LCD_Wait(600);
+ }
+
+/*******************************************************************************
+* Function Name : LCD_E_High
+* Description : Puts the LCD Enable line (E) high.
+* Input : None
+* Output : None
+* Return : None
+*******************************************************************************/
+void LCD_E_High(void)
+{
+ GPIO_BitWrite(GPIO6, LCD_PIN_E, Bit_SET);
+}
+
+/*******************************************************************************
+* Function Name : LCD_E_Low
+* Description : Puts the LCD Enable line (E) low.
+* Input : None
+* Output : None
+* Return : None
+*******************************************************************************/
+void LCD_E_Low(void)
+{
+ GPIO_BitWrite(GPIO6, LCD_PIN_E, Bit_RESET);
+}
+
+/*******************************************************************************
+* Function name : LCD_Send_Command_4bit
+* Description : Sends a command to the LCD.
+* Input param : Cmd: command to be sent.
+* Output param : None
+* Return : None
+*******************************************************************************/
+void LCD_Send_Command_4bit(u8 Cmd)
+{
+ // Reset RW bit
+ GPIO_BitWrite(GPIO6, LCD_PIN_RW, Bit_RESET);
+
+ // Reset RS bit
+ GPIO_BitWrite(GPIO6, LCD_PIN_RS, Bit_RESET);
+
+ // Set E bit
+ GPIO_BitWrite(GPIO6, LCD_PIN_E, Bit_SET);
+
+ // Send the command
+ GPIO_ByteWrite(GPIO5, GPIO_MSB, Cmd & 0xF0);
+
+ // Reset E bit
+ GPIO_BitWrite(GPIO6, LCD_PIN_E, Bit_RESET);
+
+ // Cmd Shift
+ Cmd = Cmd << 4;
+
+ // Set E bit
+ GPIO_BitWrite(GPIO6, LCD_PIN_E, Bit_SET);
+
+ // Send the command
+ GPIO_ByteWrite(GPIO5, GPIO_MSB, Cmd & 0xF0);
+
+ // Reset E bit
+ GPIO_BitWrite(GPIO6, LCD_PIN_E, Bit_RESET);
+
+ // Set RS bit
+ GPIO_BitWrite(GPIO6, LCD_PIN_RS, Bit_SET);
+
+ // Set RW bit
+ GPIO_BitWrite(GPIO6, LCD_PIN_RW, Bit_SET);
+}
+
+/*******************************************************************************
+* Function Name : LCD_SendData_4bit
+* Description : Sends data to the LCD.
+* Input : Data: data to be displayed.
+* Output : None
+* Return : None
+*******************************************************************************/
+void LCD_SendData_4bit(u8 Data)
+{
+
+ // Set RS bit
+ GPIO_BitWrite(GPIO6, LCD_PIN_RS, Bit_SET);
+
+ // Reset RW bit
+ GPIO_BitWrite(GPIO6, LCD_PIN_RW, Bit_RESET);
+
+ // Set E bit
+ GPIO_BitWrite(GPIO6, LCD_PIN_E, Bit_SET);
+
+ // Data on GPIO_MSB
+ GPIO_ByteWrite(GPIO5, GPIO_MSB, Data & 0xF0);
+
+
+ // Reset E bit
+ GPIO_BitWrite(GPIO6, LCD_PIN_E, Bit_RESET);
+
+ // Data Shift
+ Data = Data << 4;
+
+ // Set E bit
+ GPIO_BitWrite(GPIO6, LCD_PIN_E, Bit_SET);
+
+ // Data on GPIO_MSB
+ GPIO_ByteWrite(GPIO5, GPIO_MSB, Data);
+
+
+ // Reset E bit
+ GPIO_BitWrite(GPIO6, LCD_PIN_E, Bit_RESET);
+
+ // Reset RS bit
+ GPIO_BitWrite(GPIO6, LCD_PIN_RS, Bit_RESET);
+
+ // Reset RW bit
+ GPIO_BitWrite(GPIO6, LCD_PIN_RW, Bit_SET);
+}
+
+/*******************************************************************************
+* Function Name : LCD_SendString
+* Description : Displays a string on the LCD.
+* Input : - pBuffer: pointer to the buffer containing the data to be
+* displayed on the LCD.
+* - Line: specifies the line where the string will be displayed.
+* - Column: specifies the start column from where the string will
+* be displayed.
+* Output : None
+* Return : None
+*******************************************************************************/
+void LCD_SendString(u8 *pBuffer, u8 Line, u8 Column)
+{
+ u8 len = 0, count = 0;
+
+ len = strlen(( const char *)pBuffer);
+
+ if((len < (LCD_HALF_LENGTH + 2 - Column)))
+ {
+ LCD_SetPosCur(Line, Column);
+
+ for(count =0; count < len; count++)
+ {
+ LCD_SendData_4bit(pBuffer[count]);
+ }
+ }
+ else
+ {
+ LCD_SetPosCur(Line, Column);
+
+ for(count = 0; count <= (LCD_HALF_LENGTH-Column); count++)
+ {
+ LCD_SendData_4bit(pBuffer[count]);
+ }
+
+ LCD_SetPosCur(2, 1);
+
+ for(count = (LCD_HALF_LENGTH-Column+1); count < len; count++)
+ {
+ LCD_SendData_4bit(pBuffer[count]);
+ }
+ }
+}
+
+/*******************************************************************************
+* Function Name : LCD_SendStringByStep
+* Description : Displays a string on the LCD by step.
+* Input : - pBuffer: pointer to the buffer containing the data to be
+* displayed on the LCD.
+* - Line: specifies the line where the string will be displayed.
+* - Column: specifies the start column from where the string will
+* be displayed.
+* Output : None
+* Return : None
+*******************************************************************************/
+void LCD_SendStringByStep(u8 *pBuffer, u8 Line, u8 Column)
+{
+ u8 len = 0, count = 0;
+
+ len = strlen(( const char *)pBuffer);
+
+ if(len < (LCD_HALF_LENGTH + 2 - Column))
+ {
+ LCD_SetPosCur(Line, Column);
+
+ for(count =0; count < len; count++)
+ {
+ // wait 200 ms
+ LCD_Wait(20000);
+ LCD_SendData_4bit(pBuffer[count]);
+ }
+ }
+ else
+ {
+ LCD_SetPosCur(Line, Column);
+
+ for(count = 0; count <= (LCD_HALF_LENGTH-Column); count++)
+ {
+ // wait 200 ms
+ LCD_Wait(20000);
+ LCD_SendData_4bit(pBuffer[count]);
+ }
+
+ LCD_SetPosCur(2, 1);
+
+ for(count = (LCD_HALF_LENGTH-Column+1); count < len; count++)
+ {
+ // wait 200 ms
+ LCD_Wait(20000);
+ LCD_SendData_4bit(pBuffer[count]);
+ }
+ }
+}
+
+/*******************************************************************************
+* Function Name : LCD_SendStringPinPong
+* Description : Displays a string on the LCD as ping pong.
+* Input : - pBuffer: pointer to the buffer containing the data to be
+* displayed on the LCD.
+* - Line: specifies the line where the string will be displayed.
+* - nTime: number of ping pong.
+* Output :
+* Return : None
+*******************************************************************************/
+void LCD_SendStringPinPong(u8 *pBuffer, u8 Line, u32 nTime)
+{
+ u8 len = 0, index = 1;
+ bool Direction = TRUE;
+
+ len = strlen(( const char *)pBuffer);
+
+ while(nTime--)
+ {
+ if(Direction)
+ {
+ LCD_SendString(pBuffer, Line, index);
+ // wait 200 ms
+ LCD_Wait(20000);
+ index++;
+ LCD_LineClear(Line);
+ if(index == (LCD_HALF_LENGTH - len) + 1)
+ {
+ Direction = FALSE;
+ }
+ }
+ else
+ {
+ LCD_SendString(pBuffer, Line, index);
+ // wait 200 ms
+ LCD_Wait(20000);
+ index--;
+ LCD_LineClear(Line);
+ if(index == 1)
+ {
+ Direction = TRUE;
+ }
+ }
+ }
+}
+
+/*******************************************************************************
+* Function Name : LCD_SetPosCur
+* Description : Sets the line and column position of the LCD cursor.
+* Input : - Line: specifies the cursor's line position.
+* - Column: specifies cursor's column position.
+* Output : None
+* Return : None
+*******************************************************************************/
+void LCD_SetPosCur(u8 Line, u8 Column)
+{
+ if(Line == 1)
+ {
+ Column = Column - 1;
+ }
+ else
+ {
+ Column = Column -1 + 64;
+ }
+
+ LCD_Send_Command_4bit(Column | 0x80);
+}
+
+/*******************************************************************************
+* Function Name : LCD_Clear
+* Description : Clears the LCD display.
+* Input : None
+* Output : None
+* Return : None
+*******************************************************************************/
+void LCD_Clear(void)
+{
+ /* reset RS bit */
+ GPIO_BitWrite(GPIO6, LCD_PIN_RS, Bit_RESET);
+
+ /* send "DISPLAY CLEAR COMMAND" command */
+ LCD_Send_Command_4bit(LCD_CMD_CLR_DISP);
+
+}
+
+/*******************************************************************************
+* Function Name : LCD_LineClear
+* Description : Clears the LCD specified line.
+* Input : Line: line to be cleared.
+* Output : None
+* Return : None
+*******************************************************************************/
+void LCD_LineClear(u8 Line)
+{
+ u8 j = 0;
+
+ /* reset RS bit */
+ GPIO_BitWrite(GPIO6, LCD_PIN_RS, Bit_RESET);
+
+ LCD_SetPosCur(Line, 1);
+
+ /* set RS bit */
+ GPIO_BitWrite(GPIO6, LCD_PIN_RS, Bit_SET);
+
+ /* write LCD_HALF_LENGTH spaces to clear the line */
+ for(j = LCD_HALF_LENGTH; j != 0; j--)
+ {
+ LCD_SendData_4bit(' ');
+ }
+}
+
+/*******************************************************************************
+* Function Name : LCD_DigitDisplay
+* Description : Displays a digit on the LCD.
+* Input : - Digit: digit to be displayed.
+* - Line: specifies the line where the digit will be displayed.
+* - Column: specifies the start column from where the digit will
+* be displayed.
+* Output : None
+* Return : None
+*******************************************************************************/
+void LCD_DigitDisplay(u8 Digit, u8 Line, u8 Column)
+{
+ LCD_SetPosCur(Line, Column);
+
+ LCD_SendData_4bit(Digit + 48);
+}
+
+/*******************************************************************************
+* Function Name : LCD_Wait
+* Description : Inserts a delay.
+* Input : nTime: specifies the time-out value.
+* Output : LCDDelay: incremented each 125 \xB5s in TB1 interrupt handler
+* routine and used to define the time-out value.
+* Return : None
+*******************************************************************************/
+void LCD_Wait(u32 nTime)
+{
+ LCDDelay = 0;
+
+ while(LCDDelay < nTime)
+ {
+ LCDDelay++;
+ }
+}
+
+
+/******************* (C) COPYRIGHT 2005 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/fourbits730/73x_lcd.h
===================================================================
--- trunk/firmware/arm/str/fourbits730/73x_lcd.h (rev 0)
+++ trunk/firmware/arm/str/fourbits730/73x_lcd.h 2008-02-06 11:16:23 UTC (rev 823)
@@ -0,0 +1,93 @@
+/******************** (C) COPYRIGHT 2005 STMicroelectronics ********************
+* File Name : 73x_lcd.h
+* Author : MCD Application Team
+* Date First Issued : 09/27/2005 : V1.0
+* Description : This file contains all the functions prototypes for the
+* LCD software library.
+**********************************************************************************
+* History:
+* 09/27/2005 : V1.0
+**********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH
+* CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT
+* OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT
+* OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION
+* CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*********************************************************************************/
+
+/* Define to prevent recursive inclusion ---------------------------------------*/
+#ifndef __73x_LCD_H
+#define __73x_LCD_H
+
+/* Includes ----------------------------------------------------------------- */
+#include "73x_lib.h"
+#include "string.h"
+
+/* Exported types ----------------------------------------------------------- */
+
+#define LCD_LENGTH 32
+#define LCD_HALF_LENGTH (LCD_LENGTH/2)
+
+#define LCD_PORT_COMMAND GPIO6
+#define LCD_PORT_DATA GPIO6
+
+#define LCD_PIN_E GPIO_PIN_0
+#define LCD_PIN_RS GPIO_PIN_1
+#define LCD_PIN_RW GPIO_PIN_10
+
+#define LCD_CMD_4BIT 0x20
+
+#define LCD_CMD_CLR_DISP 0x01
+#define LCD_CMD_CRS_HOME 0x02
+#define LCD_CMD_DECREM_NOSHIFT 0x04
+#define LCD_CMD_DECREM_SHIFT 0x05
+#define LCD_CMD_INCREM_NOSHIFT 0x06
+#define LCD_CMD_INCREM_SHIFT 0x07
+
+#define LCD_CMD_DISPOFF_CURSOFF_BLKOFF 0x08
+#define LCD_CMD_DISPOFF_CURSOFF_BLKON 0x09
+#define LCD_CMD_DISPOFF_CURSON_BLKOFF 0x0A
+#define LCD_CMD_DISPOFF_CURSON_BLKON 0x0B
+#define LCD_CMD_DISPON_CURSOFF_BLKOFF 0x0C
+#define LCD_CMD_DISPON_CURSOFF_BLKON 0x0D
+#define LCD_CMD_DISPON_CURSON_BLKOFF 0x0E
+#define LCD_CMD_DISPON_CURSON_BLKON 0x0F
+
+#define LCD_CMD_CURSMOVE_SHIFTL 0x10
+#define LCD_CMD_CURSMOVE_SHIFTR 0x14
+#define LCD_CMD_DISPSHIFT_SHIFTL 0x18
+#define LCD_CMD_DISPSHIFT_SHIFTR 0x1C
+
+#define LCD_CMD_4BIT_1LINE_8DOT 0x20
+#define LCD_CMD_4BIT_1LINE_10DOT 0x24
+#define LCD_CMD_4BIT_2LINE_8DOT 0x28
+#define LCD_CMD_4BIT_2LINE_10DOT 0x2C
+
+
+/* Module private variables ----------------------------------------------------*/
+
+/* Exported macro --------------------------------------------------------------*/
+
+/* Private functions -----------------------------------------------------------*/
+
+/* Exported functions ----------------------------------------------------------*/
+void LCD_Init(void);
+void LCD_E_High(void);
+void LCD_E_Low(void);
+void LCD_Send_Command_4bit(u8 Cmd);
+void LCD_SendData_4bits(u8 Data);
+void LCD_SendString(u8 *pBuffer, u8 Line, u8 Column);
+void LCD_SendStringByStep(u8 *pBuffer, u8 Line, u8 Column);
+void LCD_SendStringPinPong(u8 *pBuffer, u8 Line, u32 nTime);
+void LCD_SetPosCur(u8 Line, u8 Column);
+void LCD_Clear(void);
+void LCD_LineClear(u8 Line);
+void LCD_DigitDisplay(u8 Digit, u8 Line, u8 Column);
+void LCD_Wait(u32 nTime);
+
+#endif /*__73x_LCD_H */
+
+/******************* (C) COPYRIGHT 2005 STMicroelectronics *****END OF FILE******/
+
+
Added: trunk/firmware/arm/str/fourbits730/Makefile
===================================================================
--- trunk/firmware/arm/str/fourbits730/Makefile (rev 0)
+++ trunk/firmware/arm/str/fourbits730/Makefile 2008-02-06 11:16:23 UTC (rev 823)
@@ -0,0 +1,497 @@
+# Hey Emacs, this is a -*- makefile -*-
+#
+# WinARM template makefile
+# by Giacomo Fazio and Antonio Nasca, Catania, Italy
+# <gia...@gm...>
+# <ant...@ho...>
+#
+# based on the WinARM template makefile written by Martin Thomas
+# Released to the Public Domain
+# Please read the make user manual!
+#
+#
+# On command line:
+#
+# make all = Make software.
+#
+# make clean = Clean out built project files.
+#
+# make program = Download the hex file to the device
+#
+# (TODO: make filename.s = Just compile filename.c into the assembler code only)
+#
+# To rebuild project do "make clean" then "make all".
+# Toolchain prefix (i.e arm-elf -> arm-elf-gcc.exe)
+TCHAIN = arm-elf
+#TCHAIN = arm-none-eabi
+
+#USE_THUMB_MODE = YES
+USE_THUMB_MODE = NO
+
+# MCU name and submodel
+MCU = arm7tdmi
+SUBMDL = STR73x
+
+## Create ROM-Image
+RUN_MODE=ROM_RUN
+## Create RAM-Image
+#RUN_MODE=RAM_RUN
+
+## not supported in this example:
+## Exception-Vector placement only supported for "ROM_RUN"
+## (placement settings ignored when using "RAM_RUN")
+## - Exception vectors in ROM:
+#VECTOR_LOCATION=VECTORS_IN_ROM
+## - Exception vectors in RAM:
+#VECTOR_LOCATION=VECTORS_IN_RAM
+
+
+# Target file name (without extension).
+TARGET = main
+
+# List C source files here. (C dependencies are automatically generated.)
+# use file-extension c for "c-only"-files
+SRC = $(TARGET).c 73x_lcd.c
+
+# List C source files here which must be compiled in ARM-Mode.
+# use file-extension c for "c-only"-files
+SRCARM = vectors.c
+# thumb is possible too for vectors.c - keep ARM, TODO: profile
+
+# List C++ source files here.
+# use file-extension cpp for C++-files (use extension .cpp)
+CPPSRC =
+
+# List C++ source files here which must be compiled in ARM-Mode.
+# use file-extension cpp for C++-files (use extension .cpp)
+#CPPSRCARM = $(TARGET).cpp
+CPPSRCARM =
+
+# List Assembler source files here.
+# Make them always end in a capital .S. Files ending in a lowercase .s
+# will not be considered source files but generated files (assembler
+# output from the compiler), and will be deleted upon "make clean"!
+# Even though the DOS/Win* filesystem matches both .s and .S the same,
+# it will preserve the spelling of the filenames, and gcc itself does
+# care about how the name is spelled on its command-line.
+ASRC =
+
+# List Assembler source files here which must be assembled in ARM-Mode..
+ASRCARM = vector.S startup.S
+
+# Path to Linker-Scripts
+LINKERSCRIPTPATH = .
+
+## Output format. (can be ihex or binary or both)
+## (binary i.e. for openocd and SAM-BA, hex i.e. for lpc21isp and uVision)
+#FORMAT = ihex
+#FORMAT = binary
+FORMAT = both
+
+# Optimization level, can be [0, 1, 2, 3, s].
+# 0 = turn off optimization. s = optimize for size.
+# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
+#OPT = s
+OPT = 0
+
+## Using the Atmel AT91_lib produces warning with
+## the default warning-levels.
+## yes - disable these warnings; no - keep default settings
+#AT91LIBNOWARN = yes
+AT91LIBNOWARN = no
+
+# Debugging format.
+# Native formats for AVR-GCC's -g are stabs [default], or dwarf-2.
+# AVR (extended) COFF requires stabs, plus an avr-objcopy run.
+#DEBUG = stabs
+DEBUG = dwarf-2
+
+# List any extra directories to look for include files here.
+# Each directory must be seperated by a space.
+EXTRAINCDIRS = "K:/include" ../common/str73x_lib/include
+
+# List any extra directories to look for library files here.
+# Each directory must be seperated by a space.
+#EXTRA_LIBDIRS = ../arm7_efsl_0_2_4
+EXTRA_LIBDIRS = K:/lib ../common/str73x_lib
+
+
+# Compiler flag to set the C Standard level.
+# c89 - "ANSI" C
+# gnu89 - c89 plus GCC extensions
+# c99 - ISO C99 standard (not yet fully implemented)
+# gnu99 - c99 plus GCC extensions
+CSTANDARD = -std=gnu99
+
+# Place -D or -U options for C here
+CDEFS = -D$(RUN_MODE)
+
+# Place -I options here
+CINCS =
+
+# Place -D or -U options for ASM here
+ADEFS = -D$(RUN_MODE)
+
+ifdef VECTOR_LOCATION
+CDEFS += -D$(VECTOR_LOCATION)
+ADEFS += -D$(VECTOR_LOCATION)
+endif
+
+CDEFS += -D__WinARM__ -D__WINARMSUBMDL_$(SUBMDL)__
+ADEFS += -D__WinARM__ -D__WINARMSUBMDL_$(SUBMDL)__
+
+# Compiler flags.
+
+ifeq ($(USE_THUMB_MODE),YES)
+THUMB = -mthumb
+THUMB_IW = -mthumb-interwork
+else
+THUMB =
+THUMB_IW =
+endif
+
+# -g*: generate debugging information
+# -O*: optimization level
+# -f...: tuning, see GCC manual and avr-libc documentation
+# -Wall...: warning level
+# -Wa,...: tell GCC to pass this to the assembler.
+# -adhlns...: create assembler listing
+#
+# Flags for C and C++ (arm-elf-gcc/arm-elf-g++)
+CFLAGS = -g$(DEBUG)
+CFLAGS += $(CDEFS) $(CINCS)
+CFLAGS += -O$(OPT)
+CFLAGS += -Wall -Wcast-align -Wimplicit
+CFLAGS += -Wpointer-arith -Wswitch
+CFLAGS += -ffunction-sections -fdata-sections
+CFLAGS += -Wredundant-decls -Wreturn-type -Wshadow -Wunused
+CFLAGS += -Wa,-adhlns=$(subst $(suffix $<),.lst,$<)
+CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
+
+# flags only for C
+CONLYFLAGS += -Wnested-externs
+CONLYFLAGS += $(CSTANDARD)
+
+ifneq ($(AT91LIBNOWARN),yes)
+#AT91-lib warnings with:
+CFLAGS += -Wcast-qual
+CONLYFLAGS += -Wmissing-prototypes
+CONLYFLAGS += -Wstrict-prototypes
+CONLYFLAGS += -Wmissing-declarations
+endif
+
+# flags only for C++ (arm-elf-g++)
+# CPPFLAGS = -fno-rtti -fno-exceptions
+CPPFLAGS =
+
+# Assembler flags.
+# -Wa,...: tell GCC to pass this to the assembler.
+# -ahlns: create listing
+# -g$(DEBUG): have the assembler create line number information
+ASFLAGS = $(ADEFS) -Wa,-adhlns=$(<:.S=.lst),-g$(DEBUG)
+
+
+#Additional libraries.
+
+# Extra libraries
+# Each library-name must be seperated by a space.
+# To add libxyz.a, libabc.a and libefsl.a:
+# EXTRA_LIBS = xyz abc efsl
+#EXTRA_LIBS = efsl
+EXTRA_LIBS = STR73x_lib
+
+#Support for newlibc-lpc (file: libnewlibc-lpc.a)
+#NEWLIBLPC = -lnewlib-lpc
+
+MATH_LIB = -lm
+
+# CPLUSPLUS_LIB = -lstdc++
+
+
+# Linker flags.
+# -Wl,...: tell GCC to pass this to linker.
+# -Map: create map file
+# --cref: add cross reference to map file
+LDFLAGS = -nostartfiles -Wl,-Map=$(TARGET).map,--cref,--gc-sections
+LDFLAGS += -lc
+LDFLAGS += $(NEWLIBLPC) $(MATH_LIB)
+LDFLAGS += -lc -lgcc
+LDFLAGS += $(CPLUSPLUS_LIB)
+LDFLAGS += $(patsubst %,-L%,$(EXTRA_LIBDIRS))
+LDFLAGS += $(patsubst %,-l%,$(EXTRA_LIBS))
+
+# Set Linker-Script Depending On Selected Memory and Controller
+ifeq ($(RUN_MODE),RAM_RUN)
+LDFLAGS +=-T$(LINKERSCRIPTPATH)/$(SUBMDL)-RAM.ld
+else
+LDFLAGS +=-T$(LINKERSCRIPTPATH)/$(SUBMDL)-ROM.ld
+endif
+
+
+# Define directories, if needed.
+## DIRARM = c:/WinARM/
+## DIRARMBIN = $(DIRAVR)/bin/
+## DIRAVRUTILS = $(DIRAVR)/utils/bin/
+
+# Define programs and commands.
+SHELL = sh
+CC = $(TCHAIN)-gcc
+CPP = $(TCHAIN)-g++
+AR = $(TCHAIN)-ar
+OBJCOPY = $(TCHAIN)-objcopy
+OBJDUMP = $(TCHAIN)-objdump
+SIZE = $(TCHAIN)-size
+NM = $(TCHAIN)-nm
+REMOVE = rm -f
+REMOVEDIR = rm -f -r
+COPY = cp
+
+# Define Messages
+# English
+MSG_ERRORS_NONE = Errors: none
+MSG_BEGIN = "-------- begin (mode: $(RUN_MODE)) --------"
+MSG_END = -------- end --------
+MSG_SIZE_BEFORE = Size before:
+MSG_SIZE_AFTER = Size after:
+MSG_FLASH = Creating load file for Flash:
+MSG_EXTENDED_LISTING = Creating Extended Listing:
+MSG_SYMBOL_TABLE = Creating Symbol Table:
+MSG_LINKING = Linking:
+MSG_COMPILING = Compiling C:
+MSG_COMPILING_ARM = "Compiling C (ARM-only):"
+MSG_COMPILINGCPP = Compiling C++:
+MSG_COMPILINGCPP_ARM = "Compiling C++ (ARM-only):"
+MSG_ASSEMBLING = Assembling:
+MSG_ASSEMBLING_ARM = "Assembling (ARM-only):"
+MSG_CLEANING = Cleaning project:
+MSG_FORMATERROR = Can not handle output-format
+MSG_LPC21_RESETREMINDER = You may have to bring the target in bootloader-mode now.
+
+# Define all object files.
+COBJ = $(SRC:.c=.o)
+AOBJ = $(ASRC:.S=.o)
+COBJARM = $(SRCARM:.c=.o)
+AOBJARM = $(ASRCARM:.S=.o)
+CPPOBJ = $(CPPSRC:.cpp=.o)
+CPPOBJARM = $(CPPSRCARM:.cpp=.o)
+
+# Define all listing files.
+LST = $(ASRC:.S=.lst) $(ASRCARM:.S=.lst) $(SRC:.c=.lst) $(SRCARM:.c=.lst)
+LST += $(CPPSRC:.cpp=.lst) $(CPPSRCARM:.cpp=.lst)
+
+# Compiler flags to generate dependency files.
+### GENDEPFLAGS = -Wp,-M,-MP,-MT,$(*F).o,-MF,.dep/$(@F).d
+GENDEPFLAGS = -MD -MP -MF .dep/$(@F).d
+
+# Combine all necessary flags and optional flags.
+# Add target processor to flags.
+ALL_CFLAGS = -mcpu=$(MCU) $(THUMB_IW) -I. $(CFLAGS) $(GENDEPFLAGS)
+ALL_ASFLAGS = -mcpu=$(MCU) $(THUMB_IW) -I. -x assembler-with-cpp $(ASFLAGS)
+
+
+# Default target.
+all: begin gccversion sizebefore build sizeafter finished end
+
+ifeq ($(FORMAT),ihex)
+build: elf hex lss sym
+hex: $(TARGET).hex
+IMGEXT=hex
+else
+ifeq ($(FORMAT),binary)
+build: elf bin lss sym
+bin: $(TARGET).bin
+IMGEXT=bin
+else
+ifeq ($(FORMAT),both)
+build: elf hex bin lss sym
+hex: $(TARGET).hex
+bin: $(TARGET).bin
+else
+$(error "$(MSG_FORMATERROR) $(FORMAT)")
+endif
+endif
+endif
+
+elf: $(TARGET).elf
+lss: $(TARGET).lss
+sym: $(TARGET).sym
+
+# Eye candy.
+begin:
+ @echo
+ @echo $(MSG_BEGIN)
+
+finished:
+ @echo $(MSG_ERRORS_NONE)
+
+end:
+ @echo $(MSG_END)
+ @echo
+
+
+# Display size of file.
+HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
+ELFSIZE = $(SIZE) -A $(TARGET).elf
+sizebefore:
+ @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); echo; fi
+
+sizeafter:
+ @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi
+
+
+# Display compiler version information.
+gccversion :
+ @$(CC) --version
+
+# FLASH Programming with OPENOCD
+
+# specify the directory where openocd executable resides (openocd-ftd2xx.exe or openocd-pp.exe)
+# Note: you may have to adjust this if a newer version of YAGARTO has be...
[truncated message content] |
|
From: <ak...@us...> - 2008-02-06 11:20:37
|
Revision: 824
http://can.svn.sourceforge.net/can/?rev=824&view=rev
Author: akhe
Date: 2008-02-06 03:20:30 -0800 (Wed, 06 Feb 2008)
Log Message:
-----------
Added Paths:
-----------
trunk/firmware/arm/str/template73x/
trunk/firmware/arm/str/template73x/Makefile
trunk/firmware/arm/str/template73x/STR73x-RAM.ld
trunk/firmware/arm/str/template73x/STR73x-ROM.ld
trunk/firmware/arm/str/template73x/main.c
trunk/firmware/arm/str/template73x/startup.s
trunk/firmware/arm/str/template73x/vector.s
trunk/firmware/arm/str/template73x/vectors.c
trunk/firmware/arm/str/template73x/vectors.h
Added: trunk/firmware/arm/str/template73x/Makefile
===================================================================
--- trunk/firmware/arm/str/template73x/Makefile (rev 0)
+++ trunk/firmware/arm/str/template73x/Makefile 2008-02-06 11:20:30 UTC (rev 824)
@@ -0,0 +1,495 @@
+# Hey Emacs, this is a -*- makefile -*-
+#
+# WinARM template makefile
+# by Giacomo Fazio and Antonio Nasca, Catania, Italy
+# <gia...@gm...>
+# <ant...@ho...>
+#
+# based on the WinARM template makefile written by Martin Thomas
+# Released to the Public Domain
+# Please read the make user manual!
+#
+#
+# On command line:
+#
+# make all = Make software.
+#
+# make clean = Clean out built project files.
+#
+# make program = Download the hex file to the device
+#
+# (TODO: make filename.s = Just compile filename.c into the assembler code only)
+#
+# To rebuild project do "make clean" then "make all".
+# Toolchain prefix (i.e arm-elf -> arm-elf-gcc.exe)
+TCHAIN = arm-elf
+#TCHAIN = arm-none-eabi
+
+#USE_THUMB_MODE = YES
+USE_THUMB_MODE = NO
+
+# MCU name and submodel
+MCU = arm7tdmi
+SUBMDL = STR73x
+
+## Create ROM-Image
+#RUN_MODE=ROM_RUN
+## Create RAM-Image
+RUN_MODE=RAM_RUN
+
+## not supported in this example:
+## Exception-Vector placement only supported for "ROM_RUN"
+## (placement settings ignored when using "RAM_RUN")
+## - Exception vectors in ROM:
+#VECTOR_LOCATION=VECTORS_IN_ROM
+## - Exception vectors in RAM:
+#VECTOR_LOCATION=VECTORS_IN_RAM
+
+
+# Target file name (without extension).
+TARGET = main
+
+# List C source files here. (C dependencies are automatically generated.)
+# use file-extension c for "c-only"-files
+SRC = $(TARGET).c
+
+# List C source files here which must be compiled in ARM-Mode.
+# use file-extension c for "c-only"-files
+SRCARM = vectors.c
+# thumb is possible too for vectors.c - keep ARM, TODO: profile
+
+# List C++ source files here.
+# use file-extension cpp for C++-files (use extension .cpp)
+CPPSRC =
+
+# List C++ source files here which must be compiled in ARM-Mode.
+# use file-extension cpp for C++-files (use extension .cpp)
+#CPPSRCARM = $(TARGET).cpp
+CPPSRCARM =
+
+# List Assembler source files here.
+# Make them always end in a capital .S. Files ending in a lowercase .s
+# will not be considered source files but generated files (assembler
+# output from the compiler), and will be deleted upon "make clean"!
+# Even though the DOS/Win* filesystem matches both .s and .S the same,
+# it will preserve the spelling of the filenames, and gcc itself does
+# care about how the name is spelled on its command-line.
+ASRC =
+
+# List Assembler source files here which must be assembled in ARM-Mode..
+ASRCARM = vector.S startup.S
+
+# Path to Linker-Scripts
+LINKERSCRIPTPATH = .
+
+## Output format. (can be ihex or binary or both)
+## (binary i.e. for openocd and SAM-BA, hex i.e. for lpc21isp and uVision)
+#FORMAT = ihex
+#FORMAT = binary
+FORMAT = both
+
+# Optimization level, can be [0, 1, 2, 3, s].
+# 0 = turn off optimization. s = optimize for size.
+# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
+#OPT = s
+OPT = 0
+
+## Using the Atmel AT91_lib produces warning with
+## the default warning-levels.
+## yes - disable these warnings; no - keep default settings
+#AT91LIBNOWARN = yes
+AT91LIBNOWARN = no
+
+# Debugging format.
+# Native formats for AVR-GCC's -g are stabs [default], or dwarf-2.
+# AVR (extended) COFF requires stabs, plus an avr-objcopy run.
+#DEBUG = stabs
+DEBUG = dwarf-2
+
+# List any extra directories to look for include files here.
+# Each directory must be seperated by a space.
+EXTRAINCDIRS = K:/include ../common/str73x_lib/include
+
+# List any extra directories to look for library files here.
+# Each directory must be seperated by a space.
+#EXTRA_LIBDIRS = ../arm7_efsl_0_2_4
+EXTRA_LIBDIRS = K:/lib ../common/str73x_lib
+
+
+# Compiler flag to set the C Standard level.
+# c89 - "ANSI" C
+# gnu89 - c89 plus GCC extensions
+# c99 - ISO C99 standard (not yet fully implemented)
+# gnu99 - c99 plus GCC extensions
+CSTANDARD = -std=gnu99
+
+# Place -D or -U options for C here
+CDEFS = -D$(RUN_MODE)
+
+# Place -I options here
+CINCS =
+
+# Place -D or -U options for ASM here
+ADEFS = -D$(RUN_MODE)
+
+ifdef VECTOR_LOCATION
+CDEFS += -D$(VECTOR_LOCATION)
+ADEFS += -D$(VECTOR_LOCATION)
+endif
+
+CDEFS += -D__WinARM__ -D__WINARMSUBMDL_$(SUBMDL)__
+ADEFS += -D__WinARM__ -D__WINARMSUBMDL_$(SUBMDL)__
+
+# Compiler flags.
+
+ifeq ($(USE_THUMB_MODE),YES)
+THUMB = -mthumb
+THUMB_IW = -mthumb-interwork
+else
+THUMB =
+THUMB_IW =
+endif
+
+# -g*: generate debugging information
+# -O*: optimization level
+# -f...: tuning, see GCC manual and avr-libc documentation
+# -Wall...: warning level
+# -Wa,...: tell GCC to pass this to the assembler.
+# -adhlns...: create assembler listing
+#
+# Flags for C and C++ (arm-elf-gcc/arm-elf-g++)
+CFLAGS = -g$(DEBUG)
+CFLAGS += $(CDEFS) $(CINCS)
+CFLAGS += -O$(OPT)
+CFLAGS += -Wall -Wcast-align -Wimplicit
+CFLAGS += -Wpointer-arith -Wswitch
+CFLAGS += -ffunction-sections -fdata-sections
+CFLAGS += -Wredundant-decls -Wreturn-type -Wshadow -Wunused
+CFLAGS += -Wa,-adhlns=$(subst $(suffix $<),.lst,$<)
+CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
+
+# flags only for C
+CONLYFLAGS += -Wnested-externs
+CONLYFLAGS += $(CSTANDARD)
+
+ifneq ($(AT91LIBNOWARN),yes)
+#AT91-lib warnings with:
+CFLAGS += -Wcast-qual
+CONLYFLAGS += -Wmissing-prototypes
+CONLYFLAGS += -Wstrict-prototypes
+CONLYFLAGS += -Wmissing-declarations
+endif
+
+# flags only for C++ (arm-elf-g++)
+# CPPFLAGS = -fno-rtti -fno-exceptions
+CPPFLAGS =
+
+# Assembler flags.
+# -Wa,...: tell GCC to pass this to the assembler.
+# -ahlns: create listing
+# -g$(DEBUG): have the assembler create line number information
+ASFLAGS = $(ADEFS) -Wa,-adhlns=$(<:.S=.lst),-g$(DEBUG)
+
+
+#Additional libraries.
+
+# Extra libraries
+# Each library-name must be seperated by a space.
+# To add libxyz.a, libabc.a and libefsl.a:
+# EXTRA_LIBS = xyz abc efsl
+#EXTRA_LIBS = efsl
+EXTRA_LIBS = STR73x_lib
+
+#Support for newlibc-lpc (file: libnewlibc-lpc.a)
+#NEWLIBLPC = -lnewlib-lpc
+
+MATH_LIB = -lm
+
+# CPLUSPLUS_LIB = -lstdc++
+
+
+# Linker flags.
+# -Wl,...: tell GCC to pass this to linker.
+# -Map: create map file
+# --cref: add cross reference to map file
+LDFLAGS = -nostartfiles -Wl,-Map=$(TARGET).map,--cref,--gc-sections
+LDFLAGS += -lc
+LDFLAGS += $(NEWLIBLPC) $(MATH_LIB)
+LDFLAGS += -lc -lgcc
+LDFLAGS += $(CPLUSPLUS_LIB)
+LDFLAGS += $(patsubst %,-L%,$(EXTRA_LIBDIRS))
+LDFLAGS += $(patsubst %,-l%,$(EXTRA_LIBS))
+
+# Set Linker-Script Depending On Selected Memory and Controller
+ifeq ($(RUN_MODE),RAM_RUN)
+LDFLAGS +=-T$(LINKERSCRIPTPATH)/$(SUBMDL)-RAM.ld
+else
+LDFLAGS +=-T$(LINKERSCRIPTPATH)/$(SUBMDL)-ROM.ld
+endif
+
+
+# Define directories, if needed.
+## DIRARM = c:/WinARM/
+## DIRARMBIN = $(DIRAVR)/bin/
+## DIRAVRUTILS = $(DIRAVR)/utils/bin/
+
+# Define programs and commands.
+SHELL = sh
+CC = $(TCHAIN)-gcc
+CPP = $(TCHAIN)-g++
+AR = $(TCHAIN)-ar
+OBJCOPY = $(TCHAIN)-objcopy
+OBJDUMP = $(TCHAIN)-objdump
+SIZE = $(TCHAIN)-size
+NM = $(TCHAIN)-nm
+REMOVE = rm -f
+REMOVEDIR = rm -f -r
+COPY = cp
+
+# Define Messages
+# English
+MSG_ERRORS_NONE = Errors: none
+MSG_BEGIN = "-------- begin (mode: $(RUN_MODE)) --------"
+MSG_END = -------- end --------
+MSG_SIZE_BEFORE = Size before:
+MSG_SIZE_AFTER = Size after:
+MSG_FLASH = Creating load file for Flash:
+MSG_EXTENDED_LISTING = Creating Extended Listing:
+MSG_SYMBOL_TABLE = Creating Symbol Table:
+MSG_LINKING = Linking:
+MSG_COMPILING = Compiling C:
+MSG_COMPILING_ARM = "Compiling C (ARM-only):"
+MSG_COMPILINGCPP = Compiling C++:
+MSG_COMPILINGCPP_ARM = "Compiling C++ (ARM-only):"
+MSG_ASSEMBLING = Assembling:
+MSG_ASSEMBLING_ARM = "Assembling (ARM-only):"
+MSG_CLEANING = Cleaning project:
+MSG_FORMATERROR = Can not handle output-format
+MSG_LPC21_RESETREMINDER = You may have to bring the target in bootloader-mode now.
+
+# Define all object files.
+COBJ = $(SRC:.c=.o)
+AOBJ = $(ASRC:.S=.o)
+COBJARM = $(SRCARM:.c=.o)
+AOBJARM = $(ASRCARM:.S=.o)
+CPPOBJ = $(CPPSRC:.cpp=.o)
+CPPOBJARM = $(CPPSRCARM:.cpp=.o)
+
+# Define all listing files.
+LST = $(ASRC:.S=.lst) $(ASRCARM:.S=.lst) $(SRC:.c=.lst) $(SRCARM:.c=.lst)
+LST += $(CPPSRC:.cpp=.lst) $(CPPSRCARM:.cpp=.lst)
+
+# Compiler flags to generate dependency files.
+### GENDEPFLAGS = -Wp,-M,-MP,-MT,$(*F).o,-MF,.dep/$(@F).d
+GENDEPFLAGS = -MD -MP -MF .dep/$(@F).d
+
+# Combine all necessary flags and optional flags.
+# Add target processor to flags.
+ALL_CFLAGS = -mcpu=$(MCU) $(THUMB_IW) -I. $(CFLAGS) $(GENDEPFLAGS)
+ALL_ASFLAGS = -mcpu=$(MCU) $(THUMB_IW) -I. -x assembler-with-cpp $(ASFLAGS)
+
+
+# Default target.
+all: begin gccversion sizebefore build sizeafter finished end
+
+ifeq ($(FORMAT),ihex)
+build: elf hex lss sym
+hex: $(TARGET).hex
+IMGEXT=hex
+else
+ifeq ($(FORMAT),binary)
+build: elf bin lss sym
+bin: $(TARGET).bin
+IMGEXT=bin
+else
+ifeq ($(FORMAT),both)
+build: elf hex bin lss sym
+hex: $(TARGET).hex
+bin: $(TARGET).bin
+else
+$(error "$(MSG_FORMATERROR) $(FORMAT)")
+endif
+endif
+endif
+
+elf: $(TARGET).elf
+lss: $(TARGET).lss
+sym: $(TARGET).sym
+
+# Eye candy.
+begin:
+ @echo
+ @echo $(MSG_BEGIN)
+
+finished:
+ @echo $(MSG_ERRORS_NONE)
+
+end:
+ @echo $(MSG_END)
+ @echo
+
+
+# Display size of file.
+HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
+ELFSIZE = $(SIZE) -A $(TARGET).elf
+sizebefore:
+ @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); echo; fi
+
+sizeafter:
+ @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi
+
+
+# Display compiler version information.
+gccversion :
+ @$(CC) --version
+
+# FLASH Programming with OPENOCD
+
+# specify the directory where openocd executable resides (openocd-ftd2xx.exe or openocd-pp.exe)
+# Note: you may have to adjust this if a newer version of YAGARTO has been downloaded
+OPENOCD_DIR = 'c:\Programmi\openocd\bin\'
+
+# specify OpenOCD executable (pp is for the wiggler, ftd2xx is for the USB debugger)
+OPENOCD = $(OPENOCD_DIR)openocd-pp.exe
+#OPENOCD = $(OPENOCD_DIR)openocd-ftd2xx.exe
+
+# specify OpenOCD configuration file (pick the one for your device)
+#OPENOCD_CFG = C:\openocd-configs\str73x-configs\str73x_signalyzer-flash-program.cfg
+#OPENOCD_CFG = C:\openocd-configs\str73x-configs\str73x_jtagkey-flash-program.cfg
+#OPENOCD_CFG = C:\openocd-configs\str73x-configs\str73x_armusbocd-flash-program.cfg
+OPENOCD_CFG = C:\openocd-configs\str73x-configs\str73x_pp-flash-program.cfg
+
+program:
+ @echo
+ @echo "Flash Programming with OpenOCD..."
+ $(OPENOCD) -f $(OPENOCD_CFG)
+ @echo
+ @echo
+ @echo "Flash Programming Finished."
+
+
+# Create final output file (.hex) from ELF output file.
+%.hex: %.elf
+ @echo
+ @echo $(MSG_FLASH) $@
+ $(OBJCOPY) -O ihex $< $@
+
+# Create final output file (.bin) from ELF output file.
+%.bin: %.elf
+ @echo
+ @echo $(MSG_FLASH) $@
+ $(OBJCOPY) -O binary $< $@
+
+
+# Create extended listing file from ELF output file.
+# testing: option -C
+%.lss: %.elf
+ @echo
+ @echo $(MSG_EXTENDED_LISTING) $@
+ $(OBJDUMP) -h -S -C $< > $@
+
+
+# Create a symbol table from ELF output file.
+%.sym: %.elf
+ @echo
+ @echo $(MSG_SYMBOL_TABLE) $@
+ $(NM) -n $< > $@
+
+
+# Link: create ELF output file from object files.
+.SECONDARY : $(TARGET).elf
+.PRECIOUS : $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM)
+%.elf: $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM)
+ @echo
+ @echo $(MSG_LINKING) $@
+ $(CC) $(THUMB) $(ALL_CFLAGS) $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM) --output $@ $(LDFLAGS)
+# $(CPP) $(THUMB) $(ALL_CFLAGS) $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM) --output $@ $(LDFLAGS)
+
+# Compile: create object files from C source files. ARM/Thumb
+$(COBJ) : %.o : %.c
+ @echo
+ @echo $(MSG_COMPILING) $<
+ $(CC) -c $(THUMB) $(ALL_CFLAGS) $(CONLYFLAGS) $< -o $@
+
+# Compile: create object files from C source files. ARM-only
+$(COBJARM) : %.o : %.c
+ @echo
+ @echo $(MSG_COMPILING_ARM) $<
+ $(CC) -c $(ALL_CFLAGS) $(CONLYFLAGS) $< -o $@
+
+# Compile: create object files from C++ source files. ARM/Thumb
+$(CPPOBJ) : %.o : %.cpp
+ @echo
+ @echo $(MSG_COMPILINGCPP) $<
+ $(CPP) -c $(THUMB) $(ALL_CFLAGS) $(CPPFLAGS) $< -o $@
+
+# Compile: create object files from C++ source files. ARM-only
+$(CPPOBJARM) : %.o : %.cpp
+ @echo
+ @echo $(MSG_COMPILINGCPP_ARM) $<
+ $(CPP) -c $(ALL_CFLAGS) $(CPPFLAGS) $< -o $@
+
+
+# Compile: create assembler files from C source files. ARM/Thumb
+## does not work - TODO - hints welcome
+##$(COBJ) : %.s : %.c
+## $(CC) $(THUMB) -S $(ALL_CFLAGS) $< -o $@
+
+
+# Assemble: create object files from assembler source files. ARM/Thumb
+$(AOBJ) : %.o : %.S
+ @echo
+ @echo $(MSG_ASSEMBLING) $<
+ $(CC) -c $(THUMB) $(ALL_ASFLAGS) $< -o $@
+
+
+# Assemble: create object files from assembler source files. ARM-only
+$(AOBJARM) : %.o : %.S
+ @echo
+ @echo $(MSG_ASSEMBLING_ARM) $<
+ $(CC) -c $(ALL_ASFLAGS) $< -o $@
+
+
+# Target: clean project.
+clean: begin clean_list finished end
+
+
+clean_list :
+ @echo
+ @echo $(MSG_CLEANING)
+ $(REMOVE) $(TARGET).hex
+ $(REMOVE) $(TARGET).bin
+ $(REMOVE) $(TARGET).obj
+ $(REMOVE) $(TARGET).elf
+ $(REMOVE) $(TARGET).map
+ $(REMOVE) $(TARGET).obj
+ $(REMOVE) $(TARGET).a90
+ $(REMOVE) $(TARGET).sym
+ $(REMOVE) $(TARGET).lnk
+ $(REMOVE) $(TARGET).lss
+ $(REMOVE) $(COBJ)
+ $(REMOVE) $(CPPOBJ)
+ $(REMOVE) $(AOBJ)
+ $(REMOVE) $(COBJARM)
+ $(REMOVE) $(CPPOBJARM)
+ $(REMOVE) $(AOBJARM)
+ $(REMOVE) $(LST)
+ $(REMOVE) $(SRC:.c=.s)
+ $(REMOVE) $(SRC:.c=.d)
+ $(REMOVE) $(SRCARM:.c=.s)
+ $(REMOVE) $(SRCARM:.c=.d)
+ $(REMOVE) $(CPPSRC:.cpp=.s)
+ $(REMOVE) $(CPPSRC:.cpp=.d)
+ $(REMOVE) $(CPPSRCARM:.cpp=.s)
+ $(REMOVE) $(CPPSRCARM:.cpp=.d)
+ $(REMOVEDIR) .dep | exit 0
+
+
+# Include the dependency files.
+-include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)
+
+
+# Listing of phony targets.
+.PHONY : all begin finish end sizebefore sizeafter gccversion \
+build elf hex bin lss sym clean clean_list program
+
Added: trunk/firmware/arm/str/template73x/STR73x-RAM.ld
===================================================================
--- trunk/firmware/arm/str/template73x/STR73x-RAM.ld (rev 0)
+++ trunk/firmware/arm/str/template73x/STR73x-RAM.ld 2008-02-06 11:20:30 UTC (rev 824)
@@ -0,0 +1,228 @@
+/***********************************************************************************
+* Copyright 2005 Anglia Design
+* This demo code and associated components are provided as is and has no warranty,
+* implied or otherwise. You are free to use/modify any of the provided
+* code at your own risk in your applications with the expressed limitation
+* of liability (see below)
+*
+* LIMITATION OF LIABILITY: ANGLIA OR ANGLIA DESIGNS SHALL NOT BE LIABLE FOR ANY
+* LOSS OF PROFITS, LOSS OF USE, LOSS OF DATA, INTERRUPTION OF BUSINESS, NOR FOR
+* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND WHETHER UNDER
+* THIS AGREEMENT OR OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+*
+* Author : Spencer Oliver
+* Web : www.anglia-designs.com
+*
+***********************************************************************************/
+
+/* Stack Sizes */
+
+ _STACKSIZE = 1024;
+ _STACKSIZE_IRQ = 256;
+ _STACKSIZE_FIQ = 256;
+ _STACKSIZE_SVC = 0;
+ _STACKSIZE_ABT = 0;
+ _STACKSIZE_UND = 0;
+ _HEAPSIZE = 1024;
+
+/* Memory Definitions */
+
+MEMORY
+{
+ DATA (rw) : ORIGIN = 0xA0000000, LENGTH = 0x00004000
+}
+
+/* Section Definitions */
+
+SECTIONS
+{
+ /* first section is .text which is used for code */
+
+ .text :
+ {
+ KEEP(*(.vectrom))
+ KEEP(*(.init))
+ *(.text .text.*)
+ *(.gnu.linkonce.t.*)
+ *(.glue_7t .glue_7)
+ KEEP(*(.fini))
+ *(.gcc_except_table)
+ } >DATA =0
+ . = ALIGN(4);
+
+ /* .ctors .dtors are used for c++ constructors/destructors */
+
+ .ctors :
+ {
+ PROVIDE(__ctors_start__ = .);
+ KEEP(*(SORT(.ctors.*)))
+ KEEP(*(.ctors))
+ PROVIDE(__ctors_end__ = .);
+ } >DATA
+
+ .dtors :
+ {
+ PROVIDE(__dtors_start__ = .);
+ KEEP(*(SORT(.dtors.*)))
+ KEEP(*(.dtors))
+ PROVIDE(__dtors_end__ = .);
+ } >DATA
+
+ /* .rodata section which is used for read-only data (constants) */
+
+ .rodata :
+ {
+ *(.rodata .rodata.*)
+ *(.gnu.linkonce.r.*)
+ } >DATA
+ . = ALIGN(4);
+
+ _vectext = .;
+ PROVIDE (vectext = .);
+
+ .vect : AT (_vectext)
+ {
+ _vecstart = .;
+ KEEP(*(.vectram))
+ _vecend = .;
+ } >DATA
+
+ _etext = _vectext + SIZEOF(.vect);
+ PROVIDE (etext = .);
+
+ /* .data section which is used for initialized data */
+
+ .data : AT (_etext)
+ {
+ *(.data .data.*)
+ *(.gnu.linkonce.d.*)
+ SORT(CONSTRUCTORS)
+ } >DATA
+ . = ALIGN(4);
+
+ __data_start = .;
+ _edata = .;
+ PROVIDE (edata = .);
+
+ /* .bss section which is used for uninitialized data */
+
+ .bss :
+ {
+ __bss_start = .;
+ __bss_start__ = .;
+ *(.bss .bss.*)
+ *(.gnu.linkonce.b.*)
+ *(COMMON)
+ . = ALIGN(4);
+ } >DATA
+ . = ALIGN(4);
+ __bss_end__ = .;
+
+ _end = .;
+ PROVIDE(end = .);
+
+ /* .heap section which is used for memory allocation */
+
+ .heap (NOLOAD) :
+ {
+ __heap_start__ = .;
+ *(.heap)
+ . = MAX(__heap_start__ + _HEAPSIZE , .);
+ } >DATA
+ __heap_end__ = __heap_start__ + SIZEOF(.heap);
+
+ /* .stack section - user mode stack */
+
+ .stack (__heap_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_start__ = .;
+ *(.stack)
+ . = MAX(__stack_start__ + _STACKSIZE , .);
+ } >DATA
+ __stack_end__ = __stack_start__ + SIZEOF(.stack);
+
+ /* .stack_irq section */
+
+ .stack_irq (__stack_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_irq_start__ = .;
+ *(.stack_irq)
+ . = MAX(__stack_irq_start__ + _STACKSIZE_IRQ , .);
+ } >DATA
+ __stack_irq_end__ = __stack_irq_start__ + SIZEOF(.stack_irq);
+
+ /* .stack_fiq section */
+
+ .stack_fiq (__stack_irq_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_fiq_start__ = .;
+ *(.stack_fiq)
+ . = MAX(__stack_fiq_start__ + _STACKSIZE_FIQ , .);
+ } >DATA
+ __stack_fiq_end__ = __stack_fiq_start__ + SIZEOF(.stack_fiq);
+
+ /* .stack_svc section */
+
+ .stack_svc (__stack_fiq_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_svc_start__ = .;
+ *(.stack_svc)
+ . = MAX(__stack_svc_start__ + _STACKSIZE_SVC , .);
+ } >DATA
+ __stack_svc_end__ = __stack_svc_start__ + SIZEOF(.stack_svc);
+
+ /* .stack_abt section */
+
+ .stack_abt (__stack_svc_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_abt_start__ = .;
+ *(.stack_abt)
+ . = MAX(__stack_abt_start__ + _STACKSIZE_ABT , .);
+ } >DATA
+ __stack_abt_end__ = __stack_abt_start__ + SIZEOF(.stack_abt);
+
+ /* .stack_und section */
+
+ .stack_und (__stack_abt_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_und_start__ = .;
+ *(.stack_und)
+ . = MAX(__stack_und_start__ + _STACKSIZE_UND , .);
+ } >DATA
+ __stack_und_end__ = __stack_und_start__ + SIZEOF(.stack_und);
+
+ /* Stabs debugging sections. */
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+ .stab.excl 0 : { *(.stab.excl) }
+ .stab.exclstr 0 : { *(.stab.exclstr) }
+ .stab.index 0 : { *(.stab.index) }
+ .stab.indexstr 0 : { *(.stab.indexstr) }
+ .comment 0 : { *(.comment) }
+ /* DWARF debug sections.
+ Symbols in the DWARF debugging sections are relative to the beginning
+ of the section so we begin them at 0. */
+ /* DWARF 1 */
+ .debug 0 : { *(.debug) }
+ .line 0 : { *(.line) }
+ /* GNU DWARF 1 extensions */
+ .debug_srcinfo 0 : { *(.debug_srcinfo) }
+ .debug_sfnames 0 : { *(.debug_sfnames) }
+ /* DWARF 1.1 and DWARF 2 */
+ .debug_aranges 0 : { *(.debug_aranges) }
+ .debug_pubnames 0 : { *(.debug_pubnames) }
+ /* DWARF 2 */
+ .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
+ .debug_abbrev 0 : { *(.debug_abbrev) }
+ .debug_line 0 : { *(.debug_line) }
+ .debug_frame 0 : { *(.debug_frame) }
+ .debug_str 0 : { *(.debug_str) }
+ .debug_loc 0 : { *(.debug_loc) }
+ .debug_macinfo 0 : { *(.debug_macinfo) }
+ /* SGI/MIPS DWARF 2 extensions */
+ .debug_weaknames 0 : { *(.debug_weaknames) }
+ .debug_funcnames 0 : { *(.debug_funcnames) }
+ .debug_typenames 0 : { *(.debug_typenames) }
+ .debug_varnames 0 : { *(.debug_varnames) }
+}
+
Added: trunk/firmware/arm/str/template73x/STR73x-ROM.ld
===================================================================
--- trunk/firmware/arm/str/template73x/STR73x-ROM.ld (rev 0)
+++ trunk/firmware/arm/str/template73x/STR73x-ROM.ld 2008-02-06 11:20:30 UTC (rev 824)
@@ -0,0 +1,231 @@
+/***********************************************************************************
+* Copyright 2005 Anglia Design
+* This demo code and associated components are provided as is and has no warranty,
+* implied or otherwise. You are free to use/modify any of the provided
+* code at your own risk in your applications with the expressed limitation
+* of liability (see below)
+*
+* LIMITATION OF LIABILITY: ANGLIA OR ANGLIA DESIGNS SHALL NOT BE LIABLE FOR ANY
+* LOSS OF PROFITS, LOSS OF USE, LOSS OF DATA, INTERRUPTION OF BUSINESS, NOR FOR
+* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND WHETHER UNDER
+* THIS AGREEMENT OR OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+*
+* Author : Spencer Oliver
+* Web : www.anglia-designs.com
+*
+***********************************************************************************/
+
+/* Stack Sizes */
+
+ _STACKSIZE = 1024;
+ _STACKSIZE_IRQ = 256;
+ _STACKSIZE_FIQ = 256;
+ _STACKSIZE_SVC = 0;
+ _STACKSIZE_ABT = 0;
+ _STACKSIZE_UND = 0;
+ _HEAPSIZE = 1024;
+
+/* Memory Definitions */
+
+MEMORY
+{
+ CODE (rx) : ORIGIN = 0x80000000, LENGTH = 0x00040000
+ DATA (rw) : ORIGIN = 0xA0000000, LENGTH = 0x00004000
+}
+
+/* Section Definitions */
+
+SECTIONS
+{
+ /* first section is .text which is used for code */
+
+ .text :
+ {
+ KEEP(*(.vectrom))
+ KEEP(*(.init))
+ *(.text .text.*)
+ *(.gnu.linkonce.t.*)
+ *(.glue_7t .glue_7)
+ KEEP(*(.fini))
+ *(.gcc_except_table)
+ } >CODE =0
+ . = ALIGN(4);
+
+ /* .ctors .dtors are used for c++ constructors/destructors */
+
+ .ctors :
+ {
+ PROVIDE(__ctors_start__ = .);
+ KEEP(*(SORT(.ctors.*)))
+ KEEP(*(.ctors))
+ PROVIDE(__ctors_end__ = .);
+ } >CODE
+
+ .dtors :
+ {
+ PROVIDE(__dtors_start__ = .);
+ KEEP(*(SORT(.dtors.*)))
+ KEEP(*(.dtors))
+ PROVIDE(__dtors_end__ = .);
+ } >CODE
+
+ /* .rodata section which is used for read-only data (constants) */
+
+ .rodata :
+ {
+ *(.rodata .rodata.*)
+ *(.gnu.linkonce.r.*)
+ } >CODE
+ . = ALIGN(4);
+
+ _vectext = .;
+ PROVIDE (vectext = .);
+
+ .vect : AT (_vectext)
+ {
+ _vecstart = .;
+ KEEP(*(.vectram))
+ _vecend = .;
+ } >DATA
+
+ _etext = _vectext + SIZEOF(.vect);
+ PROVIDE (etext = .);
+
+ /* .data section which is used for initialized data */
+
+ .data : AT (_etext)
+ {
+ __data_start = .;
+ *(.data .data.*)
+ *(.gnu.linkonce.d.*)
+ SORT(CONSTRUCTORS)
+ . = ALIGN(4);
+ *(.fastrun .fastrun.*)
+ } >DATA
+ . = ALIGN(4);
+
+ _edata = .;
+ PROVIDE (edata = .);
+
+ /* .bss section which is used for uninitialized data */
+
+ .bss :
+ {
+ __bss_start = .;
+ __bss_start__ = .;
+ *(.bss .bss.*)
+ *(.gnu.linkonce.b.*)
+ *(COMMON)
+ . = ALIGN(4);
+ } >DATA
+ . = ALIGN(4);
+ __bss_end__ = .;
+
+ _end = .;
+ PROVIDE(end = .);
+
+ /* .heap section which is used for memory allocation */
+
+ .heap (NOLOAD) :
+ {
+ __heap_start__ = .;
+ *(.heap)
+ . = MAX(__heap_start__ + _HEAPSIZE , .);
+ } >DATA
+ __heap_end__ = __heap_start__ + SIZEOF(.heap);
+
+ /* .stack section - user mode stack */
+
+ .stack (__heap_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_start__ = .;
+ *(.stack)
+ . = MAX(__stack_start__ + _STACKSIZE , .);
+ } >DATA
+ __stack_end__ = __stack_start__ + SIZEOF(.stack);
+
+ /* .stack_irq section */
+
+ .stack_irq (__stack_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_irq_start__ = .;
+ *(.stack_irq)
+ . = MAX(__stack_irq_start__ + _STACKSIZE_IRQ , .);
+ } >DATA
+ __stack_irq_end__ = __stack_irq_start__ + SIZEOF(.stack_irq);
+
+ /* .stack_fiq section */
+
+ .stack_fiq (__stack_irq_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_fiq_start__ = .;
+ *(.stack_fiq)
+ . = MAX(__stack_fiq_start__ + _STACKSIZE_FIQ , .);
+ } >DATA
+ __stack_fiq_end__ = __stack_fiq_start__ + SIZEOF(.stack_fiq);
+
+ /* .stack_svc section */
+
+ .stack_svc (__stack_fiq_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_svc_start__ = .;
+ *(.stack_svc)
+ . = MAX(__stack_svc_start__ + _STACKSIZE_SVC , .);
+ } >DATA
+ __stack_svc_end__ = __stack_svc_start__ + SIZEOF(.stack_svc);
+
+ /* .stack_abt section */
+
+ .stack_abt (__stack_svc_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_abt_start__ = .;
+ *(.stack_abt)
+ . = MAX(__stack_abt_start__ + _STACKSIZE_ABT , .);
+ } >DATA
+ __stack_abt_end__ = __stack_abt_start__ + SIZEOF(.stack_abt);
+
+ /* .stack_und section */
+
+ .stack_und (__stack_abt_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_und_start__ = .;
+ *(.stack_und)
+ . = MAX(__stack_und_start__ + _STACKSIZE_UND , .);
+ } >DATA
+ __stack_und_end__ = __stack_und_start__ + SIZEOF(.stack_und);
+
+ /* Stabs debugging sections. */
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+ .stab.excl 0 : { *(.stab.excl) }
+ .stab.exclstr 0 : { *(.stab.exclstr) }
+ .stab.index 0 : { *(.stab.index) }
+ .stab.indexstr 0 : { *(.stab.indexstr) }
+ .comment 0 : { *(.comment) }
+ /* DWARF debug sections.
+ Symbols in the DWARF debugging sections are relative to the beginning
+ of the section so we begin them at 0. */
+ /* DWARF 1 */
+ .debug 0 : { *(.debug) }
+ .line 0 : { *(.line) }
+ /* GNU DWARF 1 extensions */
+ .debug_srcinfo 0 : { *(.debug_srcinfo) }
+ .debug_sfnames 0 : { *(.debug_sfnames) }
+ /* DWARF 1.1 and DWARF 2 */
+ .debug_aranges 0 : { *(.debug_aranges) }
+ .debug_pubnames 0 : { *(.debug_pubnames) }
+ /* DWARF 2 */
+ .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
+ .debug_abbrev 0 : { *(.debug_abbrev) }
+ .debug_line 0 : { *(.debug_line) }
+ .debug_frame 0 : { *(.debug_frame) }
+ .debug_str 0 : { *(.debug_str) }
+ .debug_loc 0 : { *(.debug_loc) }
+ .debug_macinfo 0 : { *(.debug_macinfo) }
+ /* SGI/MIPS DWARF 2 extensions */
+ .debug_weaknames 0 : { *(.debug_weaknames) }
+ .debug_funcnames 0 : { *(.debug_funcnames) }
+ .debug_typenames 0 : { *(.debug_typenames) }
+ .debug_varnames 0 : { *(.debug_varnames) }
+}
+
Added: trunk/firmware/arm/str/template73x/main.c
===================================================================
--- trunk/firmware/arm/str/template73x/main.c (rev 0)
+++ trunk/firmware/arm/str/template73x/main.c 2008-02-06 11:20:30 UTC (rev 824)
@@ -0,0 +1,43 @@
+/******************** (C) COPYRIGHT 2005 STMicroelectronics ********************
+* File Name : main.c
+* Author : MCD Application Team
+* Date First Issued : 09/27/2005 : V1.0
+* Description : Main program body
+**********************************************************************************
+* History:
+* 09/27/2005 : V1.0
+**********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH
+* CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT
+* OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT
+* OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION
+* CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*********************************************************************************/
+
+/* Standard include ------------------------------------------------------------*/
+#include "73x_lib.h"
+
+/* Include of other module interface headers -----------------------------------*/
+/* Local includes --------------------------------------------------------------*/
+/* Private typedef -------------------------------------------------------------*/
+/* Private define --------------------------------------------------------------*/
+/* Private macro ---------------------------------------------------------------*/
+/* Private variables -----------------------------------------------------------*/
+
+
+/*---------------------------------main---------------------------------------*/
+
+void main()
+{
+ #ifdef LIBDEBUG
+ libdebug();
+ #endif
+ int a=4;
+ int b=5;
+ int c;
+ c=a+b;
+}
+
+
+/******************* (C) COPYRIGHT 2005 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/template73x/startup.s
===================================================================
--- trunk/firmware/arm/str/template73x/startup.s (rev 0)
+++ trunk/firmware/arm/str/template73x/startup.s 2008-02-06 11:20:30 UTC (rev 824)
@@ -0,0 +1,361 @@
+/***********************************************************************************
+* Copyright 2005 Anglia Design
+* This demo code and associated components are provided as is and has no warranty,
+* implied or otherwise. You are free to use/modify any of the provided
+* code at your own risk in your applications with the expressed limitation
+* of liability (see below)
+*
+* LIMITATION OF LIABILITY: ANGLIA OR ANGLIA DESIGNS SHALL NOT BE LIABLE FOR ANY
+* LOSS OF PROFITS, LOSS OF USE, LOSS OF DATA, INTERRUPTION OF BUSINESS, NOR FOR
+* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND WHETHER UNDER
+* THIS AGREEMENT OR OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+*
+* Author : Spencer O...
[truncated message content] |
|
From: <ak...@us...> - 2008-02-06 11:24:36
|
Revision: 825
http://can.svn.sourceforge.net/can/?rev=825&view=rev
Author: akhe
Date: 2008-02-06 03:24:34 -0800 (Wed, 06 Feb 2008)
Log Message:
-----------
Added uart730 str sample
Added Paths:
-----------
trunk/firmware/arm/str/uart730/
trunk/firmware/arm/str/uart730/Makefile
trunk/firmware/arm/str/uart730/Readme.txt
trunk/firmware/arm/str/uart730/STR73x-RAM.ld
trunk/firmware/arm/str/uart730/STR73x-ROM.ld
trunk/firmware/arm/str/uart730/main.c
trunk/firmware/arm/str/uart730/startup.s
trunk/firmware/arm/str/uart730/vector.s
trunk/firmware/arm/str/uart730/vectors.c
trunk/firmware/arm/str/uart730/vectors.h
Added: trunk/firmware/arm/str/uart730/Makefile
===================================================================
--- trunk/firmware/arm/str/uart730/Makefile (rev 0)
+++ trunk/firmware/arm/str/uart730/Makefile 2008-02-06 11:24:34 UTC (rev 825)
@@ -0,0 +1,495 @@
+# Hey Emacs, this is a -*- makefile -*-
+#
+# WinARM template makefile
+# by Giacomo Fazio and Antonio Nasca, Catania, Italy
+# <gia...@gm...>
+# <ant...@ho...>
+#
+# based on the WinARM template makefile written by Martin Thomas
+# Released to the Public Domain
+# Please read the make user manual!
+#
+#
+# On command line:
+#
+# make all = Make software.
+#
+# make clean = Clean out built project files.
+#
+# make program = Download the hex file to the device
+#
+# (TODO: make filename.s = Just compile filename.c into the assembler code only)
+#
+# To rebuild project do "make clean" then "make all".
+# Toolchain prefix (i.e arm-elf -> arm-elf-gcc.exe)
+TCHAIN = arm-elf
+#TCHAIN = arm-none-eabi
+
+#USE_THUMB_MODE = YES
+USE_THUMB_MODE = NO
+
+# MCU name and submodel
+MCU = arm7tdmi
+SUBMDL = STR73x
+
+## Create ROM-Image
+#RUN_MODE=ROM_RUN
+## Create RAM-Image
+RUN_MODE=RAM_RUN
+
+## not supported in this example:
+## Exception-Vector placement only supported for "ROM_RUN"
+## (placement settings ignored when using "RAM_RUN")
+## - Exception vectors in ROM:
+#VECTOR_LOCATION=VECTORS_IN_ROM
+## - Exception vectors in RAM:
+#VECTOR_LOCATION=VECTORS_IN_RAM
+
+
+# Target file name (without extension).
+TARGET = main
+
+# List C source files here. (C dependencies are automatically generated.)
+# use file-extension c for "c-only"-files
+SRC = $(TARGET).c
+
+# List C source files here which must be compiled in ARM-Mode.
+# use file-extension c for "c-only"-files
+SRCARM = vectors.c
+# thumb is possible too for vectors.c - keep ARM, TODO: profile
+
+# List C++ source files here.
+# use file-extension cpp for C++-files (use extension .cpp)
+CPPSRC =
+
+# List C++ source files here which must be compiled in ARM-Mode.
+# use file-extension cpp for C++-files (use extension .cpp)
+#CPPSRCARM = $(TARGET).cpp
+CPPSRCARM =
+
+# List Assembler source files here.
+# Make them always end in a capital .S. Files ending in a lowercase .s
+# will not be considered source files but generated files (assembler
+# output from the compiler), and will be deleted upon "make clean"!
+# Even though the DOS/Win* filesystem matches both .s and .S the same,
+# it will preserve the spelling of the filenames, and gcc itself does
+# care about how the name is spelled on its command-line.
+ASRC =
+
+# List Assembler source files here which must be assembled in ARM-Mode..
+ASRCARM = vector.S startup.S
+
+# Path to Linker-Scripts
+LINKERSCRIPTPATH = .
+
+## Output format. (can be ihex or binary or both)
+## (binary i.e. for openocd and SAM-BA, hex i.e. for lpc21isp and uVision)
+#FORMAT = ihex
+#FORMAT = binary
+FORMAT = both
+
+# Optimization level, can be [0, 1, 2, 3, s].
+# 0 = turn off optimization. s = optimize for size.
+# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
+#OPT = s
+OPT = 0
+
+## Using the Atmel AT91_lib produces warning with
+## the default warning-levels.
+## yes - disable these warnings; no - keep default settings
+#AT91LIBNOWARN = yes
+AT91LIBNOWARN = no
+
+# Debugging format.
+# Native formats for AVR-GCC's -g are stabs [default], or dwarf-2.
+# AVR (extended) COFF requires stabs, plus an avr-objcopy run.
+#DEBUG = stabs
+DEBUG = dwarf-2
+
+# List any extra directories to look for include files here.
+# Each directory must be seperated by a space.
+EXTRAINCDIRS = K:/include ../common/str73x_lib/include
+
+# List any extra directories to look for library files here.
+# Each directory must be seperated by a space.
+#EXTRA_LIBDIRS = ../arm7_efsl_0_2_4
+EXTRA_LIBDIRS = K:/lib ../common/str73x_lib
+
+
+# Compiler flag to set the C Standard level.
+# c89 - "ANSI" C
+# gnu89 - c89 plus GCC extensions
+# c99 - ISO C99 standard (not yet fully implemented)
+# gnu99 - c99 plus GCC extensions
+CSTANDARD = -std=gnu99
+
+# Place -D or -U options for C here
+CDEFS = -D$(RUN_MODE)
+
+# Place -I options here
+CINCS =
+
+# Place -D or -U options for ASM here
+ADEFS = -D$(RUN_MODE)
+
+ifdef VECTOR_LOCATION
+CDEFS += -D$(VECTOR_LOCATION)
+ADEFS += -D$(VECTOR_LOCATION)
+endif
+
+CDEFS += -D__WinARM__ -D__WINARMSUBMDL_$(SUBMDL)__
+ADEFS += -D__WinARM__ -D__WINARMSUBMDL_$(SUBMDL)__
+
+# Compiler flags.
+
+ifeq ($(USE_THUMB_MODE),YES)
+THUMB = -mthumb
+THUMB_IW = -mthumb-interwork
+else
+THUMB =
+THUMB_IW =
+endif
+
+# -g*: generate debugging information
+# -O*: optimization level
+# -f...: tuning, see GCC manual and avr-libc documentation
+# -Wall...: warning level
+# -Wa,...: tell GCC to pass this to the assembler.
+# -adhlns...: create assembler listing
+#
+# Flags for C and C++ (arm-elf-gcc/arm-elf-g++)
+CFLAGS = -g$(DEBUG)
+CFLAGS += $(CDEFS) $(CINCS)
+CFLAGS += -O$(OPT)
+CFLAGS += -Wall -Wcast-align -Wimplicit
+CFLAGS += -Wpointer-arith -Wswitch
+CFLAGS += -ffunction-sections -fdata-sections
+CFLAGS += -Wredundant-decls -Wreturn-type -Wshadow -Wunused
+CFLAGS += -Wa,-adhlns=$(subst $(suffix $<),.lst,$<)
+CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
+
+# flags only for C
+CONLYFLAGS += -Wnested-externs
+CONLYFLAGS += $(CSTANDARD)
+
+ifneq ($(AT91LIBNOWARN),yes)
+#AT91-lib warnings with:
+CFLAGS += -Wcast-qual
+CONLYFLAGS += -Wmissing-prototypes
+CONLYFLAGS += -Wstrict-prototypes
+CONLYFLAGS += -Wmissing-declarations
+endif
+
+# flags only for C++ (arm-elf-g++)
+# CPPFLAGS = -fno-rtti -fno-exceptions
+CPPFLAGS =
+
+# Assembler flags.
+# -Wa,...: tell GCC to pass this to the assembler.
+# -ahlns: create listing
+# -g$(DEBUG): have the assembler create line number information
+ASFLAGS = $(ADEFS) -Wa,-adhlns=$(<:.S=.lst),-g$(DEBUG)
+
+
+#Additional libraries.
+
+# Extra libraries
+# Each library-name must be seperated by a space.
+# To add libxyz.a, libabc.a and libefsl.a:
+# EXTRA_LIBS = xyz abc efsl
+#EXTRA_LIBS = efsl
+EXTRA_LIBS = STR73x_lib
+
+#Support for newlibc-lpc (file: libnewlibc-lpc.a)
+#NEWLIBLPC = -lnewlib-lpc
+
+MATH_LIB = -lm
+
+# CPLUSPLUS_LIB = -lstdc++
+
+
+# Linker flags.
+# -Wl,...: tell GCC to pass this to linker.
+# -Map: create map file
+# --cref: add cross reference to map file
+LDFLAGS = -nostartfiles -Wl,-Map=$(TARGET).map,--cref,--gc-sections
+LDFLAGS += -lc
+LDFLAGS += $(NEWLIBLPC) $(MATH_LIB)
+LDFLAGS += -lc -lgcc
+LDFLAGS += $(CPLUSPLUS_LIB)
+LDFLAGS += $(patsubst %,-L%,$(EXTRA_LIBDIRS))
+LDFLAGS += $(patsubst %,-l%,$(EXTRA_LIBS))
+
+# Set Linker-Script Depending On Selected Memory and Controller
+ifeq ($(RUN_MODE),RAM_RUN)
+LDFLAGS +=-T$(LINKERSCRIPTPATH)/$(SUBMDL)-RAM.ld
+else
+LDFLAGS +=-T$(LINKERSCRIPTPATH)/$(SUBMDL)-ROM.ld
+endif
+
+
+# Define directories, if needed.
+## DIRARM = c:/WinARM/
+## DIRARMBIN = $(DIRAVR)/bin/
+## DIRAVRUTILS = $(DIRAVR)/utils/bin/
+
+# Define programs and commands.
+SHELL = sh
+CC = $(TCHAIN)-gcc
+CPP = $(TCHAIN)-g++
+AR = $(TCHAIN)-ar
+OBJCOPY = $(TCHAIN)-objcopy
+OBJDUMP = $(TCHAIN)-objdump
+SIZE = $(TCHAIN)-size
+NM = $(TCHAIN)-nm
+REMOVE = rm -f
+REMOVEDIR = rm -f -r
+COPY = cp
+
+# Define Messages
+# English
+MSG_ERRORS_NONE = Errors: none
+MSG_BEGIN = "-------- begin (mode: $(RUN_MODE)) --------"
+MSG_END = -------- end --------
+MSG_SIZE_BEFORE = Size before:
+MSG_SIZE_AFTER = Size after:
+MSG_FLASH = Creating load file for Flash:
+MSG_EXTENDED_LISTING = Creating Extended Listing:
+MSG_SYMBOL_TABLE = Creating Symbol Table:
+MSG_LINKING = Linking:
+MSG_COMPILING = Compiling C:
+MSG_COMPILING_ARM = "Compiling C (ARM-only):"
+MSG_COMPILINGCPP = Compiling C++:
+MSG_COMPILINGCPP_ARM = "Compiling C++ (ARM-only):"
+MSG_ASSEMBLING = Assembling:
+MSG_ASSEMBLING_ARM = "Assembling (ARM-only):"
+MSG_CLEANING = Cleaning project:
+MSG_FORMATERROR = Can not handle output-format
+MSG_LPC21_RESETREMINDER = You may have to bring the target in bootloader-mode now.
+
+# Define all object files.
+COBJ = $(SRC:.c=.o)
+AOBJ = $(ASRC:.S=.o)
+COBJARM = $(SRCARM:.c=.o)
+AOBJARM = $(ASRCARM:.S=.o)
+CPPOBJ = $(CPPSRC:.cpp=.o)
+CPPOBJARM = $(CPPSRCARM:.cpp=.o)
+
+# Define all listing files.
+LST = $(ASRC:.S=.lst) $(ASRCARM:.S=.lst) $(SRC:.c=.lst) $(SRCARM:.c=.lst)
+LST += $(CPPSRC:.cpp=.lst) $(CPPSRCARM:.cpp=.lst)
+
+# Compiler flags to generate dependency files.
+### GENDEPFLAGS = -Wp,-M,-MP,-MT,$(*F).o,-MF,.dep/$(@F).d
+GENDEPFLAGS = -MD -MP -MF .dep/$(@F).d
+
+# Combine all necessary flags and optional flags.
+# Add target processor to flags.
+ALL_CFLAGS = -mcpu=$(MCU) $(THUMB_IW) -I. $(CFLAGS) $(GENDEPFLAGS)
+ALL_ASFLAGS = -mcpu=$(MCU) $(THUMB_IW) -I. -x assembler-with-cpp $(ASFLAGS)
+
+
+# Default target.
+all: begin gccversion sizebefore build sizeafter finished end
+
+ifeq ($(FORMAT),ihex)
+build: elf hex lss sym
+hex: $(TARGET).hex
+IMGEXT=hex
+else
+ifeq ($(FORMAT),binary)
+build: elf bin lss sym
+bin: $(TARGET).bin
+IMGEXT=bin
+else
+ifeq ($(FORMAT),both)
+build: elf hex bin lss sym
+hex: $(TARGET).hex
+bin: $(TARGET).bin
+else
+$(error "$(MSG_FORMATERROR) $(FORMAT)")
+endif
+endif
+endif
+
+elf: $(TARGET).elf
+lss: $(TARGET).lss
+sym: $(TARGET).sym
+
+# Eye candy.
+begin:
+ @echo
+ @echo $(MSG_BEGIN)
+
+finished:
+ @echo $(MSG_ERRORS_NONE)
+
+end:
+ @echo $(MSG_END)
+ @echo
+
+
+# Display size of file.
+HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
+ELFSIZE = $(SIZE) -A $(TARGET).elf
+sizebefore:
+ @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); echo; fi
+
+sizeafter:
+ @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi
+
+
+# Display compiler version information.
+gccversion :
+ @$(CC) --version
+
+# FLASH Programming with OPENOCD
+
+# specify the directory where openocd executable resides (openocd-ftd2xx.exe or openocd-pp.exe)
+# Note: you may have to adjust this if a newer version of YAGARTO has been downloaded
+OPENOCD_DIR = 'c:\Programmi\openocd\bin\'
+
+# specify OpenOCD executable (pp is for the wiggler, ftd2xx is for the USB debugger)
+OPENOCD = $(OPENOCD_DIR)openocd-pp.exe
+#OPENOCD = $(OPENOCD_DIR)openocd-ftd2xx.exe
+
+# specify OpenOCD configuration file (pick the one for your device)
+#OPENOCD_CFG = C:\openocd-configs\str73x-configs\str73x_signalyzer-flash-program.cfg
+#OPENOCD_CFG = C:\openocd-configs\str73x-configs\str73x_jtagkey-flash-program.cfg
+#OPENOCD_CFG = C:\openocd-configs\str73x-configs\str73x_armusbocd-flash-program.cfg
+OPENOCD_CFG = C:\openocd-configs\str73x-configs\str73x_pp-flash-program.cfg
+
+program:
+ @echo
+ @echo "Flash Programming with OpenOCD..."
+ $(OPENOCD) -f $(OPENOCD_CFG)
+ @echo
+ @echo
+ @echo "Flash Programming Finished."
+
+
+# Create final output file (.hex) from ELF output file.
+%.hex: %.elf
+ @echo
+ @echo $(MSG_FLASH) $@
+ $(OBJCOPY) -O ihex $< $@
+
+# Create final output file (.bin) from ELF output file.
+%.bin: %.elf
+ @echo
+ @echo $(MSG_FLASH) $@
+ $(OBJCOPY) -O binary $< $@
+
+
+# Create extended listing file from ELF output file.
+# testing: option -C
+%.lss: %.elf
+ @echo
+ @echo $(MSG_EXTENDED_LISTING) $@
+ $(OBJDUMP) -h -S -C $< > $@
+
+
+# Create a symbol table from ELF output file.
+%.sym: %.elf
+ @echo
+ @echo $(MSG_SYMBOL_TABLE) $@
+ $(NM) -n $< > $@
+
+
+# Link: create ELF output file from object files.
+.SECONDARY : $(TARGET).elf
+.PRECIOUS : $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM)
+%.elf: $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM)
+ @echo
+ @echo $(MSG_LINKING) $@
+ $(CC) $(THUMB) $(ALL_CFLAGS) $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM) --output $@ $(LDFLAGS)
+# $(CPP) $(THUMB) $(ALL_CFLAGS) $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM) --output $@ $(LDFLAGS)
+
+# Compile: create object files from C source files. ARM/Thumb
+$(COBJ) : %.o : %.c
+ @echo
+ @echo $(MSG_COMPILING) $<
+ $(CC) -c $(THUMB) $(ALL_CFLAGS) $(CONLYFLAGS) $< -o $@
+
+# Compile: create object files from C source files. ARM-only
+$(COBJARM) : %.o : %.c
+ @echo
+ @echo $(MSG_COMPILING_ARM) $<
+ $(CC) -c $(ALL_CFLAGS) $(CONLYFLAGS) $< -o $@
+
+# Compile: create object files from C++ source files. ARM/Thumb
+$(CPPOBJ) : %.o : %.cpp
+ @echo
+ @echo $(MSG_COMPILINGCPP) $<
+ $(CPP) -c $(THUMB) $(ALL_CFLAGS) $(CPPFLAGS) $< -o $@
+
+# Compile: create object files from C++ source files. ARM-only
+$(CPPOBJARM) : %.o : %.cpp
+ @echo
+ @echo $(MSG_COMPILINGCPP_ARM) $<
+ $(CPP) -c $(ALL_CFLAGS) $(CPPFLAGS) $< -o $@
+
+
+# Compile: create assembler files from C source files. ARM/Thumb
+## does not work - TODO - hints welcome
+##$(COBJ) : %.s : %.c
+## $(CC) $(THUMB) -S $(ALL_CFLAGS) $< -o $@
+
+
+# Assemble: create object files from assembler source files. ARM/Thumb
+$(AOBJ) : %.o : %.S
+ @echo
+ @echo $(MSG_ASSEMBLING) $<
+ $(CC) -c $(THUMB) $(ALL_ASFLAGS) $< -o $@
+
+
+# Assemble: create object files from assembler source files. ARM-only
+$(AOBJARM) : %.o : %.S
+ @echo
+ @echo $(MSG_ASSEMBLING_ARM) $<
+ $(CC) -c $(ALL_ASFLAGS) $< -o $@
+
+
+# Target: clean project.
+clean: begin clean_list finished end
+
+
+clean_list :
+ @echo
+ @echo $(MSG_CLEANING)
+ $(REMOVE) $(TARGET).hex
+ $(REMOVE) $(TARGET).bin
+ $(REMOVE) $(TARGET).obj
+ $(REMOVE) $(TARGET).elf
+ $(REMOVE) $(TARGET).map
+ $(REMOVE) $(TARGET).obj
+ $(REMOVE) $(TARGET).a90
+ $(REMOVE) $(TARGET).sym
+ $(REMOVE) $(TARGET).lnk
+ $(REMOVE) $(TARGET).lss
+ $(REMOVE) $(COBJ)
+ $(REMOVE) $(CPPOBJ)
+ $(REMOVE) $(AOBJ)
+ $(REMOVE) $(COBJARM)
+ $(REMOVE) $(CPPOBJARM)
+ $(REMOVE) $(AOBJARM)
+ $(REMOVE) $(LST)
+ $(REMOVE) $(SRC:.c=.s)
+ $(REMOVE) $(SRC:.c=.d)
+ $(REMOVE) $(SRCARM:.c=.s)
+ $(REMOVE) $(SRCARM:.c=.d)
+ $(REMOVE) $(CPPSRC:.cpp=.s)
+ $(REMOVE) $(CPPSRC:.cpp=.d)
+ $(REMOVE) $(CPPSRCARM:.cpp=.s)
+ $(REMOVE) $(CPPSRCARM:.cpp=.d)
+ $(REMOVEDIR) .dep | exit 0
+
+
+# Include the dependency files.
+-include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)
+
+
+# Listing of phony targets.
+.PHONY : all begin finish end sizebefore sizeafter gccversion \
+build elf hex bin lss sym clean clean_list program
+
Added: trunk/firmware/arm/str/uart730/Readme.txt
===================================================================
--- trunk/firmware/arm/str/uart730/Readme.txt (rev 0)
+++ trunk/firmware/arm/str/uart730/Readme.txt 2008-02-06 11:24:34 UTC (rev 825)
@@ -0,0 +1,49 @@
+/******************** (C) COPYRIGHT 2005 STMicroelectronics **********************
+* File Name : Readme.txt
+* Author : MCD Application Team
+* Date First Issued : 09/27/2005 : V1.0
+* Description : Description of the UART example
+**********************************************************************************
+* History:
+* 09/27/2005 : V1.0
+*********************************************************************************
+ THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH
+ CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+ AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT
+ OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT
+ OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION
+ CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+**********************************************************************************
+
+Example description
+===================
+This example gives an example of the UART peripheral use :
+
+Send 'A' character from UART0 to a Windows PC Hyperterminal.
+
+
+Directory contents
+==================
+73x_conf.h Library Configuration file
+73x_it.c Interrupt handlers
+main.c Main program
+
+How to use it
+=============
+In order to make the program work, you must do the following :
+
+- Connect UART0 to your Windows PC via a RS232 cable
+- Configure Windows Hyperterminal application : 4800bps,8 data, Parity even, stop bits 1
+- Create a project and setup all your toolchain's start-up files
+- Compile the directory content files and required Library files :
+ + 73x_lib.c
+ + 73x_cfg.c
+ + 73x_cmu.c
+ + 73x_prccu.c
+ + 73x_gpio.c
+ + 73x_uart.c
+- Link all compiled files & load program into either RAM or Flash
+- Run the example
+
+
+******************* (C) COPYRIGHT 2005 STMicroelectronics *****END OF FILE****
Added: trunk/firmware/arm/str/uart730/STR73x-RAM.ld
===================================================================
--- trunk/firmware/arm/str/uart730/STR73x-RAM.ld (rev 0)
+++ trunk/firmware/arm/str/uart730/STR73x-RAM.ld 2008-02-06 11:24:34 UTC (rev 825)
@@ -0,0 +1,228 @@
+/***********************************************************************************
+* Copyright 2005 Anglia Design
+* This demo code and associated components are provided as is and has no warranty,
+* implied or otherwise. You are free to use/modify any of the provided
+* code at your own risk in your applications with the expressed limitation
+* of liability (see below)
+*
+* LIMITATION OF LIABILITY: ANGLIA OR ANGLIA DESIGNS SHALL NOT BE LIABLE FOR ANY
+* LOSS OF PROFITS, LOSS OF USE, LOSS OF DATA, INTERRUPTION OF BUSINESS, NOR FOR
+* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND WHETHER UNDER
+* THIS AGREEMENT OR OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+*
+* Author : Spencer Oliver
+* Web : www.anglia-designs.com
+*
+***********************************************************************************/
+
+/* Stack Sizes */
+
+ _STACKSIZE = 1024;
+ _STACKSIZE_IRQ = 256;
+ _STACKSIZE_FIQ = 256;
+ _STACKSIZE_SVC = 0;
+ _STACKSIZE_ABT = 0;
+ _STACKSIZE_UND = 0;
+ _HEAPSIZE = 1024;
+
+/* Memory Definitions */
+
+MEMORY
+{
+ DATA (rw) : ORIGIN = 0xA0000000, LENGTH = 0x00004000
+}
+
+/* Section Definitions */
+
+SECTIONS
+{
+ /* first section is .text which is used for code */
+
+ .text :
+ {
+ KEEP(*(.vectrom))
+ KEEP(*(.init))
+ *(.text .text.*)
+ *(.gnu.linkonce.t.*)
+ *(.glue_7t .glue_7)
+ KEEP(*(.fini))
+ *(.gcc_except_table)
+ } >DATA =0
+ . = ALIGN(4);
+
+ /* .ctors .dtors are used for c++ constructors/destructors */
+
+ .ctors :
+ {
+ PROVIDE(__ctors_start__ = .);
+ KEEP(*(SORT(.ctors.*)))
+ KEEP(*(.ctors))
+ PROVIDE(__ctors_end__ = .);
+ } >DATA
+
+ .dtors :
+ {
+ PROVIDE(__dtors_start__ = .);
+ KEEP(*(SORT(.dtors.*)))
+ KEEP(*(.dtors))
+ PROVIDE(__dtors_end__ = .);
+ } >DATA
+
+ /* .rodata section which is used for read-only data (constants) */
+
+ .rodata :
+ {
+ *(.rodata .rodata.*)
+ *(.gnu.linkonce.r.*)
+ } >DATA
+ . = ALIGN(4);
+
+ _vectext = .;
+ PROVIDE (vectext = .);
+
+ .vect : AT (_vectext)
+ {
+ _vecstart = .;
+ KEEP(*(.vectram))
+ _vecend = .;
+ } >DATA
+
+ _etext = _vectext + SIZEOF(.vect);
+ PROVIDE (etext = .);
+
+ /* .data section which is used for initialized data */
+
+ .data : AT (_etext)
+ {
+ *(.data .data.*)
+ *(.gnu.linkonce.d.*)
+ SORT(CONSTRUCTORS)
+ } >DATA
+ . = ALIGN(4);
+
+ __data_start = .;
+ _edata = .;
+ PROVIDE (edata = .);
+
+ /* .bss section which is used for uninitialized data */
+
+ .bss :
+ {
+ __bss_start = .;
+ __bss_start__ = .;
+ *(.bss .bss.*)
+ *(.gnu.linkonce.b.*)
+ *(COMMON)
+ . = ALIGN(4);
+ } >DATA
+ . = ALIGN(4);
+ __bss_end__ = .;
+
+ _end = .;
+ PROVIDE(end = .);
+
+ /* .heap section which is used for memory allocation */
+
+ .heap (NOLOAD) :
+ {
+ __heap_start__ = .;
+ *(.heap)
+ . = MAX(__heap_start__ + _HEAPSIZE , .);
+ } >DATA
+ __heap_end__ = __heap_start__ + SIZEOF(.heap);
+
+ /* .stack section - user mode stack */
+
+ .stack (__heap_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_start__ = .;
+ *(.stack)
+ . = MAX(__stack_start__ + _STACKSIZE , .);
+ } >DATA
+ __stack_end__ = __stack_start__ + SIZEOF(.stack);
+
+ /* .stack_irq section */
+
+ .stack_irq (__stack_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_irq_start__ = .;
+ *(.stack_irq)
+ . = MAX(__stack_irq_start__ + _STACKSIZE_IRQ , .);
+ } >DATA
+ __stack_irq_end__ = __stack_irq_start__ + SIZEOF(.stack_irq);
+
+ /* .stack_fiq section */
+
+ .stack_fiq (__stack_irq_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_fiq_start__ = .;
+ *(.stack_fiq)
+ . = MAX(__stack_fiq_start__ + _STACKSIZE_FIQ , .);
+ } >DATA
+ __stack_fiq_end__ = __stack_fiq_start__ + SIZEOF(.stack_fiq);
+
+ /* .stack_svc section */
+
+ .stack_svc (__stack_fiq_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_svc_start__ = .;
+ *(.stack_svc)
+ . = MAX(__stack_svc_start__ + _STACKSIZE_SVC , .);
+ } >DATA
+ __stack_svc_end__ = __stack_svc_start__ + SIZEOF(.stack_svc);
+
+ /* .stack_abt section */
+
+ .stack_abt (__stack_svc_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_abt_start__ = .;
+ *(.stack_abt)
+ . = MAX(__stack_abt_start__ + _STACKSIZE_ABT , .);
+ } >DATA
+ __stack_abt_end__ = __stack_abt_start__ + SIZEOF(.stack_abt);
+
+ /* .stack_und section */
+
+ .stack_und (__stack_abt_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_und_start__ = .;
+ *(.stack_und)
+ . = MAX(__stack_und_start__ + _STACKSIZE_UND , .);
+ } >DATA
+ __stack_und_end__ = __stack_und_start__ + SIZEOF(.stack_und);
+
+ /* Stabs debugging sections. */
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+ .stab.excl 0 : { *(.stab.excl) }
+ .stab.exclstr 0 : { *(.stab.exclstr) }
+ .stab.index 0 : { *(.stab.index) }
+ .stab.indexstr 0 : { *(.stab.indexstr) }
+ .comment 0 : { *(.comment) }
+ /* DWARF debug sections.
+ Symbols in the DWARF debugging sections are relative to the beginning
+ of the section so we begin them at 0. */
+ /* DWARF 1 */
+ .debug 0 : { *(.debug) }
+ .line 0 : { *(.line) }
+ /* GNU DWARF 1 extensions */
+ .debug_srcinfo 0 : { *(.debug_srcinfo) }
+ .debug_sfnames 0 : { *(.debug_sfnames) }
+ /* DWARF 1.1 and DWARF 2 */
+ .debug_aranges 0 : { *(.debug_aranges) }
+ .debug_pubnames 0 : { *(.debug_pubnames) }
+ /* DWARF 2 */
+ .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
+ .debug_abbrev 0 : { *(.debug_abbrev) }
+ .debug_line 0 : { *(.debug_line) }
+ .debug_frame 0 : { *(.debug_frame) }
+ .debug_str 0 : { *(.debug_str) }
+ .debug_loc 0 : { *(.debug_loc) }
+ .debug_macinfo 0 : { *(.debug_macinfo) }
+ /* SGI/MIPS DWARF 2 extensions */
+ .debug_weaknames 0 : { *(.debug_weaknames) }
+ .debug_funcnames 0 : { *(.debug_funcnames) }
+ .debug_typenames 0 : { *(.debug_typenames) }
+ .debug_varnames 0 : { *(.debug_varnames) }
+}
+
Added: trunk/firmware/arm/str/uart730/STR73x-ROM.ld
===================================================================
--- trunk/firmware/arm/str/uart730/STR73x-ROM.ld (rev 0)
+++ trunk/firmware/arm/str/uart730/STR73x-ROM.ld 2008-02-06 11:24:34 UTC (rev 825)
@@ -0,0 +1,231 @@
+/***********************************************************************************
+* Copyright 2005 Anglia Design
+* This demo code and associated components are provided as is and has no warranty,
+* implied or otherwise. You are free to use/modify any of the provided
+* code at your own risk in your applications with the expressed limitation
+* of liability (see below)
+*
+* LIMITATION OF LIABILITY: ANGLIA OR ANGLIA DESIGNS SHALL NOT BE LIABLE FOR ANY
+* LOSS OF PROFITS, LOSS OF USE, LOSS OF DATA, INTERRUPTION OF BUSINESS, NOR FOR
+* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND WHETHER UNDER
+* THIS AGREEMENT OR OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+*
+* Author : Spencer Oliver
+* Web : www.anglia-designs.com
+*
+***********************************************************************************/
+
+/* Stack Sizes */
+
+ _STACKSIZE = 1024;
+ _STACKSIZE_IRQ = 256;
+ _STACKSIZE_FIQ = 256;
+ _STACKSIZE_SVC = 0;
+ _STACKSIZE_ABT = 0;
+ _STACKSIZE_UND = 0;
+ _HEAPSIZE = 1024;
+
+/* Memory Definitions */
+
+MEMORY
+{
+ CODE (rx) : ORIGIN = 0x80000000, LENGTH = 0x00040000
+ DATA (rw) : ORIGIN = 0xA0000000, LENGTH = 0x00004000
+}
+
+/* Section Definitions */
+
+SECTIONS
+{
+ /* first section is .text which is used for code */
+
+ .text :
+ {
+ KEEP(*(.vectrom))
+ KEEP(*(.init))
+ *(.text .text.*)
+ *(.gnu.linkonce.t.*)
+ *(.glue_7t .glue_7)
+ KEEP(*(.fini))
+ *(.gcc_except_table)
+ } >CODE =0
+ . = ALIGN(4);
+
+ /* .ctors .dtors are used for c++ constructors/destructors */
+
+ .ctors :
+ {
+ PROVIDE(__ctors_start__ = .);
+ KEEP(*(SORT(.ctors.*)))
+ KEEP(*(.ctors))
+ PROVIDE(__ctors_end__ = .);
+ } >CODE
+
+ .dtors :
+ {
+ PROVIDE(__dtors_start__ = .);
+ KEEP(*(SORT(.dtors.*)))
+ KEEP(*(.dtors))
+ PROVIDE(__dtors_end__ = .);
+ } >CODE
+
+ /* .rodata section which is used for read-only data (constants) */
+
+ .rodata :
+ {
+ *(.rodata .rodata.*)
+ *(.gnu.linkonce.r.*)
+ } >CODE
+ . = ALIGN(4);
+
+ _vectext = .;
+ PROVIDE (vectext = .);
+
+ .vect : AT (_vectext)
+ {
+ _vecstart = .;
+ KEEP(*(.vectram))
+ _vecend = .;
+ } >DATA
+
+ _etext = _vectext + SIZEOF(.vect);
+ PROVIDE (etext = .);
+
+ /* .data section which is used for initialized data */
+
+ .data : AT (_etext)
+ {
+ __data_start = .;
+ *(.data .data.*)
+ *(.gnu.linkonce.d.*)
+ SORT(CONSTRUCTORS)
+ . = ALIGN(4);
+ *(.fastrun .fastrun.*)
+ } >DATA
+ . = ALIGN(4);
+
+ _edata = .;
+ PROVIDE (edata = .);
+
+ /* .bss section which is used for uninitialized data */
+
+ .bss :
+ {
+ __bss_start = .;
+ __bss_start__ = .;
+ *(.bss .bss.*)
+ *(.gnu.linkonce.b.*)
+ *(COMMON)
+ . = ALIGN(4);
+ } >DATA
+ . = ALIGN(4);
+ __bss_end__ = .;
+
+ _end = .;
+ PROVIDE(end = .);
+
+ /* .heap section which is used for memory allocation */
+
+ .heap (NOLOAD) :
+ {
+ __heap_start__ = .;
+ *(.heap)
+ . = MAX(__heap_start__ + _HEAPSIZE , .);
+ } >DATA
+ __heap_end__ = __heap_start__ + SIZEOF(.heap);
+
+ /* .stack section - user mode stack */
+
+ .stack (__heap_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_start__ = .;
+ *(.stack)
+ . = MAX(__stack_start__ + _STACKSIZE , .);
+ } >DATA
+ __stack_end__ = __stack_start__ + SIZEOF(.stack);
+
+ /* .stack_irq section */
+
+ .stack_irq (__stack_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_irq_start__ = .;
+ *(.stack_irq)
+ . = MAX(__stack_irq_start__ + _STACKSIZE_IRQ , .);
+ } >DATA
+ __stack_irq_end__ = __stack_irq_start__ + SIZEOF(.stack_irq);
+
+ /* .stack_fiq section */
+
+ .stack_fiq (__stack_irq_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_fiq_start__ = .;
+ *(.stack_fiq)
+ . = MAX(__stack_fiq_start__ + _STACKSIZE_FIQ , .);
+ } >DATA
+ __stack_fiq_end__ = __stack_fiq_start__ + SIZEOF(.stack_fiq);
+
+ /* .stack_svc section */
+
+ .stack_svc (__stack_fiq_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_svc_start__ = .;
+ *(.stack_svc)
+ . = MAX(__stack_svc_start__ + _STACKSIZE_SVC , .);
+ } >DATA
+ __stack_svc_end__ = __stack_svc_start__ + SIZEOF(.stack_svc);
+
+ /* .stack_abt section */
+
+ .stack_abt (__stack_svc_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_abt_start__ = .;
+ *(.stack_abt)
+ . = MAX(__stack_abt_start__ + _STACKSIZE_ABT , .);
+ } >DATA
+ __stack_abt_end__ = __stack_abt_start__ + SIZEOF(.stack_abt);
+
+ /* .stack_und section */
+
+ .stack_und (__stack_abt_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_und_start__ = .;
+ *(.stack_und)
+ . = MAX(__stack_und_start__ + _STACKSIZE_UND , .);
+ } >DATA
+ __stack_und_end__ = __stack_und_start__ + SIZEOF(.stack_und);
+
+ /* Stabs debugging sections. */
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+ .stab.excl 0 : { *(.stab.excl) }
+ .stab.exclstr 0 : { *(.stab.exclstr) }
+ .stab.index 0 : { *(.stab.index) }
+ .stab.indexstr 0 : { *(.stab.indexstr) }
+ .comment 0 : { *(.comment) }
+ /* DWARF debug sections.
+ Symbols in the DWARF debugging sections are relative to the beginning
+ of the section so we begin them at 0. */
+ /* DWARF 1 */
+ .debug 0 : { *(.debug) }
+ .line 0 : { *(.line) }
+ /* GNU DWARF 1 extensions */
+ .debug_srcinfo 0 : { *(.debug_srcinfo) }
+ .debug_sfnames 0 : { *(.debug_sfnames) }
+ /* DWARF 1.1 and DWARF 2 */
+ .debug_aranges 0 : { *(.debug_aranges) }
+ .debug_pubnames 0 : { *(.debug_pubnames) }
+ /* DWARF 2 */
+ .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
+ .debug_abbrev 0 : { *(.debug_abbrev) }
+ .debug_line 0 : { *(.debug_line) }
+ .debug_frame 0 : { *(.debug_frame) }
+ .debug_str 0 : { *(.debug_str) }
+ .debug_loc 0 : { *(.debug_loc) }
+ .debug_macinfo 0 : { *(.debug_macinfo) }
+ /* SGI/MIPS DWARF 2 extensions */
+ .debug_weaknames 0 : { *(.debug_weaknames) }
+ .debug_funcnames 0 : { *(.debug_funcnames) }
+ .debug_typenames 0 : { *(.debug_typenames) }
+ .debug_varnames 0 : { *(.debug_varnames) }
+}
+
Added: trunk/firmware/arm/str/uart730/main.c
===================================================================
--- trunk/firmware/arm/str/uart730/main.c (rev 0)
+++ trunk/firmware/arm/str/uart730/main.c 2008-02-06 11:24:34 UTC (rev 825)
@@ -0,0 +1,70 @@
+/******************** (C) COPYRIGHT 2005 STMicroelectronics ********************
+* File Name : main.c
+* Author : MCD Application Team
+* Date First Issued : 09/27/2005 : V1.0
+* Description : Main program body
+**********************************************************************************
+* History:
+* 09/27/2005 : V1.0
+**********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH
+* CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIR...
[truncated message content] |
|
From: <ak...@us...> - 2008-02-06 12:46:09
|
Revision: 826
http://can.svn.sourceforge.net/can/?rev=826&view=rev
Author: akhe
Date: 2008-02-06 04:46:05 -0800 (Wed, 06 Feb 2008)
Log Message:
-----------
Added templates for all STR7 uP's
Added Paths:
-----------
trunk/firmware/arm/str/template75x/
trunk/firmware/arm/str/template75x/Makefile
trunk/firmware/arm/str/template75x/STR75x-RAM.ld
trunk/firmware/arm/str/template75x/STR75x-ROM.ld
trunk/firmware/arm/str/template75x/main.c
trunk/firmware/arm/str/template75x/startup.s
trunk/firmware/arm/str/template75x/vector.s
trunk/firmware/arm/str/template75x/vectors.c
trunk/firmware/arm/str/template75x/vectors.h
Added: trunk/firmware/arm/str/template75x/Makefile
===================================================================
--- trunk/firmware/arm/str/template75x/Makefile (rev 0)
+++ trunk/firmware/arm/str/template75x/Makefile 2008-02-06 12:46:05 UTC (rev 826)
@@ -0,0 +1,495 @@
+# Hey Emacs, this is a -*- makefile -*-
+#
+# WinARM template makefile
+# by Giacomo Fazio and Antonio Nasca, Catania, Italy
+# <gia...@gm...>
+# <ant...@ho...>
+#
+# based on the WinARM template makefile written by Martin Thomas
+# Released to the Public Domain
+# Please read the make user manual!
+#
+#
+# On command line:
+#
+# make all = Make software.
+#
+# make clean = Clean out built project files.
+#
+# make program = Download the hex file to the device
+#
+# (TODO: make filename.s = Just compile filename.c into the assembler code only)
+#
+# To rebuild project do "make clean" then "make all".
+# Toolchain prefix (i.e arm-elf -> arm-elf-gcc.exe)
+TCHAIN = arm-elf
+#TCHAIN = arm-none-eabi
+
+#USE_THUMB_MODE = YES
+USE_THUMB_MODE = NO
+
+# MCU name and submodel
+MCU = arm7tdmi
+SUBMDL = STR75x
+
+## Create ROM-Image
+#RUN_MODE=ROM_RUN
+## Create RAM-Image
+RUN_MODE=RAM_RUN
+
+## not supported in this example:
+## Exception-Vector placement only supported for "ROM_RUN"
+## (placement settings ignored when using "RAM_RUN")
+## - Exception vectors in ROM:
+#VECTOR_LOCATION=VECTORS_IN_ROM
+## - Exception vectors in RAM:
+#VECTOR_LOCATION=VECTORS_IN_RAM
+
+
+# Target file name (without extension).
+TARGET = main
+
+# List C source files here. (C dependencies are automatically generated.)
+# use file-extension c for "c-only"-files
+SRC = $(TARGET).c
+
+# List C source files here which must be compiled in ARM-Mode.
+# use file-extension c for "c-only"-files
+SRCARM = vectors.c
+# thumb is possible too for vectors.c - keep ARM, TODO: profile
+
+# List C++ source files here.
+# use file-extension cpp for C++-files (use extension .cpp)
+CPPSRC =
+
+# List C++ source files here which must be compiled in ARM-Mode.
+# use file-extension cpp for C++-files (use extension .cpp)
+#CPPSRCARM = $(TARGET).cpp
+CPPSRCARM =
+
+# List Assembler source files here.
+# Make them always end in a capital .S. Files ending in a lowercase .s
+# will not be considered source files but generated files (assembler
+# output from the compiler), and will be deleted upon "make clean"!
+# Even though the DOS/Win* filesystem matches both .s and .S the same,
+# it will preserve the spelling of the filenames, and gcc itself does
+# care about how the name is spelled on its command-line.
+ASRC =
+
+# List Assembler source files here which must be assembled in ARM-Mode..
+ASRCARM = vector.S startup.S
+
+# Path to Linker-Scripts
+LINKERSCRIPTPATH = .
+
+## Output format. (can be ihex or binary or both)
+## (binary i.e. for openocd and SAM-BA, hex i.e. for lpc21isp and uVision)
+#FORMAT = ihex
+#FORMAT = binary
+FORMAT = both
+
+# Optimization level, can be [0, 1, 2, 3, s].
+# 0 = turn off optimization. s = optimize for size.
+# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
+#OPT = s
+OPT = 0
+
+## Using the Atmel AT91_lib produces warning with
+## the default warning-levels.
+## yes - disable these warnings; no - keep default settings
+#AT91LIBNOWARN = yes
+AT91LIBNOWARN = no
+
+# Debugging format.
+# Native formats for AVR-GCC's -g are stabs [default], or dwarf-2.
+# AVR (extended) COFF requires stabs, plus an avr-objcopy run.
+#DEBUG = stabs
+DEBUG = dwarf-2
+
+# List any extra directories to look for include files here.
+# Each directory must be seperated by a space.
+EXTRAINCDIRS = K:/include ../common/str75x_lib/include
+
+# List any extra directories to look for library files here.
+# Each directory must be seperated by a space.
+#EXTRA_LIBDIRS = ../arm7_efsl_0_2_4
+EXTRA_LIBDIRS = K:/lib ../common/str75x_lib
+
+
+# Compiler flag to set the C Standard level.
+# c89 - "ANSI" C
+# gnu89 - c89 plus GCC extensions
+# c99 - ISO C99 standard (not yet fully implemented)
+# gnu99 - c99 plus GCC extensions
+CSTANDARD = -std=gnu99
+
+# Place -D or -U options for C here
+CDEFS = -D$(RUN_MODE)
+
+# Place -I options here
+CINCS =
+
+# Place -D or -U options for ASM here
+ADEFS = -D$(RUN_MODE)
+
+ifdef VECTOR_LOCATION
+CDEFS += -D$(VECTOR_LOCATION)
+ADEFS += -D$(VECTOR_LOCATION)
+endif
+
+CDEFS += -D__WinARM__ -D__WINARMSUBMDL_$(SUBMDL)__
+ADEFS += -D__WinARM__ -D__WINARMSUBMDL_$(SUBMDL)__
+
+# Compiler flags.
+
+ifeq ($(USE_THUMB_MODE),YES)
+THUMB = -mthumb
+THUMB_IW = -mthumb-interwork
+else
+THUMB =
+THUMB_IW =
+endif
+
+# -g*: generate debugging information
+# -O*: optimization level
+# -f...: tuning, see GCC manual and avr-libc documentation
+# -Wall...: warning level
+# -Wa,...: tell GCC to pass this to the assembler.
+# -adhlns...: create assembler listing
+#
+# Flags for C and C++ (arm-elf-gcc/arm-elf-g++)
+CFLAGS = -g$(DEBUG)
+CFLAGS += $(CDEFS) $(CINCS)
+CFLAGS += -O$(OPT)
+CFLAGS += -Wall -Wcast-align -Wimplicit
+CFLAGS += -Wpointer-arith -Wswitch
+CFLAGS += -ffunction-sections -fdata-sections
+CFLAGS += -Wredundant-decls -Wreturn-type -Wshadow -Wunused
+CFLAGS += -Wa,-adhlns=$(subst $(suffix $<),.lst,$<)
+CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
+
+# flags only for C
+CONLYFLAGS += -Wnested-externs
+CONLYFLAGS += $(CSTANDARD)
+
+ifneq ($(AT91LIBNOWARN),yes)
+#AT91-lib warnings with:
+CFLAGS += -Wcast-qual
+CONLYFLAGS += -Wmissing-prototypes
+CONLYFLAGS += -Wstrict-prototypes
+CONLYFLAGS += -Wmissing-declarations
+endif
+
+# flags only for C++ (arm-elf-g++)
+# CPPFLAGS = -fno-rtti -fno-exceptions
+CPPFLAGS =
+
+# Assembler flags.
+# -Wa,...: tell GCC to pass this to the assembler.
+# -ahlns: create listing
+# -g$(DEBUG): have the assembler create line number information
+ASFLAGS = $(ADEFS) -Wa,-adhlns=$(<:.S=.lst),-g$(DEBUG)
+
+
+#Additional libraries.
+
+# Extra libraries
+# Each library-name must be seperated by a space.
+# To add libxyz.a, libabc.a and libefsl.a:
+# EXTRA_LIBS = xyz abc efsl
+#EXTRA_LIBS = efsl
+EXTRA_LIBS = STR75x_lib
+
+#Support for newlibc-lpc (file: libnewlibc-lpc.a)
+#NEWLIBLPC = -lnewlib-lpc
+
+MATH_LIB = -lm
+
+# CPLUSPLUS_LIB = -lstdc++
+
+
+# Linker flags.
+# -Wl,...: tell GCC to pass this to linker.
+# -Map: create map file
+# --cref: add cross reference to map file
+LDFLAGS = -nostartfiles -Wl,-Map=$(TARGET).map,--cref,--gc-sections
+LDFLAGS += -lc
+LDFLAGS += $(NEWLIBLPC) $(MATH_LIB)
+LDFLAGS += -lc -lgcc
+LDFLAGS += $(CPLUSPLUS_LIB)
+LDFLAGS += $(patsubst %,-L%,$(EXTRA_LIBDIRS))
+LDFLAGS += $(patsubst %,-l%,$(EXTRA_LIBS))
+
+# Set Linker-Script Depending On Selected Memory and Controller
+ifeq ($(RUN_MODE),RAM_RUN)
+LDFLAGS +=-T$(LINKERSCRIPTPATH)/$(SUBMDL)-RAM.ld
+else
+LDFLAGS +=-T$(LINKERSCRIPTPATH)/$(SUBMDL)-ROM.ld
+endif
+
+
+# Define directories, if needed.
+## DIRARM = c:/WinARM/
+## DIRARMBIN = $(DIRAVR)/bin/
+## DIRAVRUTILS = $(DIRAVR)/utils/bin/
+
+# Define programs and commands.
+SHELL = sh
+CC = $(TCHAIN)-gcc
+CPP = $(TCHAIN)-g++
+AR = $(TCHAIN)-ar
+OBJCOPY = $(TCHAIN)-objcopy
+OBJDUMP = $(TCHAIN)-objdump
+SIZE = $(TCHAIN)-size
+NM = $(TCHAIN)-nm
+REMOVE = rm -f
+REMOVEDIR = rm -f -r
+COPY = cp
+
+# Define Messages
+# English
+MSG_ERRORS_NONE = Errors: none
+MSG_BEGIN = "-------- begin (mode: $(RUN_MODE)) --------"
+MSG_END = -------- end --------
+MSG_SIZE_BEFORE = Size before:
+MSG_SIZE_AFTER = Size after:
+MSG_FLASH = Creating load file for Flash:
+MSG_EXTENDED_LISTING = Creating Extended Listing:
+MSG_SYMBOL_TABLE = Creating Symbol Table:
+MSG_LINKING = Linking:
+MSG_COMPILING = Compiling C:
+MSG_COMPILING_ARM = "Compiling C (ARM-only):"
+MSG_COMPILINGCPP = Compiling C++:
+MSG_COMPILINGCPP_ARM = "Compiling C++ (ARM-only):"
+MSG_ASSEMBLING = Assembling:
+MSG_ASSEMBLING_ARM = "Assembling (ARM-only):"
+MSG_CLEANING = Cleaning project:
+MSG_FORMATERROR = Can not handle output-format
+MSG_LPC21_RESETREMINDER = You may have to bring the target in bootloader-mode now.
+
+# Define all object files.
+COBJ = $(SRC:.c=.o)
+AOBJ = $(ASRC:.S=.o)
+COBJARM = $(SRCARM:.c=.o)
+AOBJARM = $(ASRCARM:.S=.o)
+CPPOBJ = $(CPPSRC:.cpp=.o)
+CPPOBJARM = $(CPPSRCARM:.cpp=.o)
+
+# Define all listing files.
+LST = $(ASRC:.S=.lst) $(ASRCARM:.S=.lst) $(SRC:.c=.lst) $(SRCARM:.c=.lst)
+LST += $(CPPSRC:.cpp=.lst) $(CPPSRCARM:.cpp=.lst)
+
+# Compiler flags to generate dependency files.
+### GENDEPFLAGS = -Wp,-M,-MP,-MT,$(*F).o,-MF,.dep/$(@F).d
+GENDEPFLAGS = -MD -MP -MF .dep/$(@F).d
+
+# Combine all necessary flags and optional flags.
+# Add target processor to flags.
+ALL_CFLAGS = -mcpu=$(MCU) $(THUMB_IW) -I. $(CFLAGS) $(GENDEPFLAGS)
+ALL_ASFLAGS = -mcpu=$(MCU) $(THUMB_IW) -I. -x assembler-with-cpp $(ASFLAGS)
+
+
+# Default target.
+all: begin gccversion sizebefore build sizeafter finished end
+
+ifeq ($(FORMAT),ihex)
+build: elf hex lss sym
+hex: $(TARGET).hex
+IMGEXT=hex
+else
+ifeq ($(FORMAT),binary)
+build: elf bin lss sym
+bin: $(TARGET).bin
+IMGEXT=bin
+else
+ifeq ($(FORMAT),both)
+build: elf hex bin lss sym
+hex: $(TARGET).hex
+bin: $(TARGET).bin
+else
+$(error "$(MSG_FORMATERROR) $(FORMAT)")
+endif
+endif
+endif
+
+elf: $(TARGET).elf
+lss: $(TARGET).lss
+sym: $(TARGET).sym
+
+# Eye candy.
+begin:
+ @echo
+ @echo $(MSG_BEGIN)
+
+finished:
+ @echo $(MSG_ERRORS_NONE)
+
+end:
+ @echo $(MSG_END)
+ @echo
+
+
+# Display size of file.
+HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
+ELFSIZE = $(SIZE) -A $(TARGET).elf
+sizebefore:
+ @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); echo; fi
+
+sizeafter:
+ @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi
+
+
+# Display compiler version information.
+gccversion :
+ @$(CC) --version
+
+# FLASH Programming with OPENOCD
+
+# specify the directory where openocd executable resides (openocd-ftd2xx.exe or openocd-pp.exe)
+# Note: you may have to adjust this if a newer version of YAGARTO has been downloaded
+OPENOCD_DIR = 'c:\Programmi\openocd\bin\'
+
+# specify OpenOCD executable (pp is for the wiggler, ftd2xx is for the USB debugger)
+OPENOCD = $(OPENOCD_DIR)openocd-pp.exe
+#OPENOCD = $(OPENOCD_DIR)openocd-ftd2xx.exe
+
+# specify OpenOCD configuration file (pick the one for your device)
+#OPENOCD_CFG = C:\openocd-configs\str75x-configs\str75x_signalyzer-flash-program.cfg
+#OPENOCD_CFG = C:\openocd-configs\str75x-configs\str75x_jtagkey-flash-program.cfg
+#OPENOCD_CFG = C:\openocd-configs\str75x-configs\str75x_armusbocd-flash-program.cfg
+OPENOCD_CFG = C:\openocd-configs\str75x-configs\str75x_pp-flash-program.cfg
+
+program:
+ @echo
+ @echo "Flash Programming with OpenOCD..."
+ $(OPENOCD) -f $(OPENOCD_CFG)
+ @echo
+ @echo
+ @echo "Flash Programming Finished."
+
+
+# Create final output file (.hex) from ELF output file.
+%.hex: %.elf
+ @echo
+ @echo $(MSG_FLASH) $@
+ $(OBJCOPY) -O ihex $< $@
+
+# Create final output file (.bin) from ELF output file.
+%.bin: %.elf
+ @echo
+ @echo $(MSG_FLASH) $@
+ $(OBJCOPY) -O binary $< $@
+
+
+# Create extended listing file from ELF output file.
+# testing: option -C
+%.lss: %.elf
+ @echo
+ @echo $(MSG_EXTENDED_LISTING) $@
+ $(OBJDUMP) -h -S -C $< > $@
+
+
+# Create a symbol table from ELF output file.
+%.sym: %.elf
+ @echo
+ @echo $(MSG_SYMBOL_TABLE) $@
+ $(NM) -n $< > $@
+
+
+# Link: create ELF output file from object files.
+.SECONDARY : $(TARGET).elf
+.PRECIOUS : $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM)
+%.elf: $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM)
+ @echo
+ @echo $(MSG_LINKING) $@
+ $(CC) $(THUMB) $(ALL_CFLAGS) $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM) --output $@ $(LDFLAGS)
+# $(CPP) $(THUMB) $(ALL_CFLAGS) $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM) --output $@ $(LDFLAGS)
+
+# Compile: create object files from C source files. ARM/Thumb
+$(COBJ) : %.o : %.c
+ @echo
+ @echo $(MSG_COMPILING) $<
+ $(CC) -c $(THUMB) $(ALL_CFLAGS) $(CONLYFLAGS) $< -o $@
+
+# Compile: create object files from C source files. ARM-only
+$(COBJARM) : %.o : %.c
+ @echo
+ @echo $(MSG_COMPILING_ARM) $<
+ $(CC) -c $(ALL_CFLAGS) $(CONLYFLAGS) $< -o $@
+
+# Compile: create object files from C++ source files. ARM/Thumb
+$(CPPOBJ) : %.o : %.cpp
+ @echo
+ @echo $(MSG_COMPILINGCPP) $<
+ $(CPP) -c $(THUMB) $(ALL_CFLAGS) $(CPPFLAGS) $< -o $@
+
+# Compile: create object files from C++ source files. ARM-only
+$(CPPOBJARM) : %.o : %.cpp
+ @echo
+ @echo $(MSG_COMPILINGCPP_ARM) $<
+ $(CPP) -c $(ALL_CFLAGS) $(CPPFLAGS) $< -o $@
+
+
+# Compile: create assembler files from C source files. ARM/Thumb
+## does not work - TODO - hints welcome
+##$(COBJ) : %.s : %.c
+## $(CC) $(THUMB) -S $(ALL_CFLAGS) $< -o $@
+
+
+# Assemble: create object files from assembler source files. ARM/Thumb
+$(AOBJ) : %.o : %.S
+ @echo
+ @echo $(MSG_ASSEMBLING) $<
+ $(CC) -c $(THUMB) $(ALL_ASFLAGS) $< -o $@
+
+
+# Assemble: create object files from assembler source files. ARM-only
+$(AOBJARM) : %.o : %.S
+ @echo
+ @echo $(MSG_ASSEMBLING_ARM) $<
+ $(CC) -c $(ALL_ASFLAGS) $< -o $@
+
+
+# Target: clean project.
+clean: begin clean_list finished end
+
+
+clean_list :
+ @echo
+ @echo $(MSG_CLEANING)
+ $(REMOVE) $(TARGET).hex
+ $(REMOVE) $(TARGET).bin
+ $(REMOVE) $(TARGET).obj
+ $(REMOVE) $(TARGET).elf
+ $(REMOVE) $(TARGET).map
+ $(REMOVE) $(TARGET).obj
+ $(REMOVE) $(TARGET).a90
+ $(REMOVE) $(TARGET).sym
+ $(REMOVE) $(TARGET).lnk
+ $(REMOVE) $(TARGET).lss
+ $(REMOVE) $(COBJ)
+ $(REMOVE) $(CPPOBJ)
+ $(REMOVE) $(AOBJ)
+ $(REMOVE) $(COBJARM)
+ $(REMOVE) $(CPPOBJARM)
+ $(REMOVE) $(AOBJARM)
+ $(REMOVE) $(LST)
+ $(REMOVE) $(SRC:.c=.s)
+ $(REMOVE) $(SRC:.c=.d)
+ $(REMOVE) $(SRCARM:.c=.s)
+ $(REMOVE) $(SRCARM:.c=.d)
+ $(REMOVE) $(CPPSRC:.cpp=.s)
+ $(REMOVE) $(CPPSRC:.cpp=.d)
+ $(REMOVE) $(CPPSRCARM:.cpp=.s)
+ $(REMOVE) $(CPPSRCARM:.cpp=.d)
+ $(REMOVEDIR) .dep | exit 0
+
+
+# Include the dependency files.
+-include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)
+
+
+# Listing of phony targets.
+.PHONY : all begin finish end sizebefore sizeafter gccversion \
+build elf hex bin lss sym clean clean_list program
+
Added: trunk/firmware/arm/str/template75x/STR75x-RAM.ld
===================================================================
--- trunk/firmware/arm/str/template75x/STR75x-RAM.ld (rev 0)
+++ trunk/firmware/arm/str/template75x/STR75x-RAM.ld 2008-02-06 12:46:05 UTC (rev 826)
@@ -0,0 +1,228 @@
+/***********************************************************************************
+* Copyright 2005 Anglia Design
+* This demo code and associated components are provided as is and has no warranty,
+* implied or otherwise. You are free to use/modify any of the provided
+* code at your own risk in your applications with the expressed limitation
+* of liability (see below)
+*
+* LIMITATION OF LIABILITY: ANGLIA OR ANGLIA DESIGNS SHALL NOT BE LIABLE FOR ANY
+* LOSS OF PROFITS, LOSS OF USE, LOSS OF DATA, INTERRUPTION OF BUSINESS, NOR FOR
+* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND WHETHER UNDER
+* THIS AGREEMENT OR OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+*
+* Author : Spencer Oliver
+* Web : www.anglia-designs.com
+*
+***********************************************************************************/
+
+/* Stack Sizes */
+
+ _STACKSIZE = 1024;
+ _STACKSIZE_IRQ = 256;
+ _STACKSIZE_FIQ = 256;
+ _STACKSIZE_SVC = 0;
+ _STACKSIZE_ABT = 0;
+ _STACKSIZE_UND = 0;
+ _HEAPSIZE = 1024;
+
+/* Memory Definitions */
+
+MEMORY
+{
+ DATA (rw) : ORIGIN = 0x40000000, LENGTH = 0x00004000
+}
+
+/* Section Definitions */
+
+SECTIONS
+{
+ /* first section is .text which is used for code */
+
+ .text :
+ {
+ KEEP(*(.vectrom))
+ KEEP(*(.init))
+ *(.text .text.*)
+ *(.gnu.linkonce.t.*)
+ *(.glue_7t .glue_7)
+ KEEP(*(.fini))
+ *(.gcc_except_table)
+ } >DATA =0
+ . = ALIGN(4);
+
+ /* .ctors .dtors are used for c++ constructors/destructors */
+
+ .ctors :
+ {
+ PROVIDE(__ctors_start__ = .);
+ KEEP(*(SORT(.ctors.*)))
+ KEEP(*(.ctors))
+ PROVIDE(__ctors_end__ = .);
+ } >DATA
+
+ .dtors :
+ {
+ PROVIDE(__dtors_start__ = .);
+ KEEP(*(SORT(.dtors.*)))
+ KEEP(*(.dtors))
+ PROVIDE(__dtors_end__ = .);
+ } >DATA
+
+ /* .rodata section which is used for read-only data (constants) */
+
+ .rodata :
+ {
+ *(.rodata .rodata.*)
+ *(.gnu.linkonce.r.*)
+ } >DATA
+ . = ALIGN(4);
+
+ _vectext = .;
+ PROVIDE (vectext = .);
+
+ .vect : AT (_vectext)
+ {
+ _vecstart = .;
+ KEEP(*(.vectram))
+ _vecend = .;
+ } >DATA
+
+ _etext = _vectext + SIZEOF(.vect);
+ PROVIDE (etext = .);
+
+ /* .data section which is used for initialized data */
+
+ .data : AT (_etext)
+ {
+ *(.data .data.*)
+ *(.gnu.linkonce.d.*)
+ SORT(CONSTRUCTORS)
+ } >DATA
+ . = ALIGN(4);
+
+ __data_start = .;
+ _edata = .;
+ PROVIDE (edata = .);
+
+ /* .bss section which is used for uninitialized data */
+
+ .bss :
+ {
+ __bss_start = .;
+ __bss_start__ = .;
+ *(.bss .bss.*)
+ *(.gnu.linkonce.b.*)
+ *(COMMON)
+ . = ALIGN(4);
+ } >DATA
+ . = ALIGN(4);
+ __bss_end__ = .;
+
+ _end = .;
+ PROVIDE(end = .);
+
+ /* .heap section which is used for memory allocation */
+
+ .heap (NOLOAD) :
+ {
+ __heap_start__ = .;
+ *(.heap)
+ . = MAX(__heap_start__ + _HEAPSIZE , .);
+ } >DATA
+ __heap_end__ = __heap_start__ + SIZEOF(.heap);
+
+ /* .stack section - user mode stack */
+
+ .stack (__heap_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_start__ = .;
+ *(.stack)
+ . = MAX(__stack_start__ + _STACKSIZE , .);
+ } >DATA
+ __stack_end__ = __stack_start__ + SIZEOF(.stack);
+
+ /* .stack_irq section */
+
+ .stack_irq (__stack_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_irq_start__ = .;
+ *(.stack_irq)
+ . = MAX(__stack_irq_start__ + _STACKSIZE_IRQ , .);
+ } >DATA
+ __stack_irq_end__ = __stack_irq_start__ + SIZEOF(.stack_irq);
+
+ /* .stack_fiq section */
+
+ .stack_fiq (__stack_irq_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_fiq_start__ = .;
+ *(.stack_fiq)
+ . = MAX(__stack_fiq_start__ + _STACKSIZE_FIQ , .);
+ } >DATA
+ __stack_fiq_end__ = __stack_fiq_start__ + SIZEOF(.stack_fiq);
+
+ /* .stack_svc section */
+
+ .stack_svc (__stack_fiq_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_svc_start__ = .;
+ *(.stack_svc)
+ . = MAX(__stack_svc_start__ + _STACKSIZE_SVC , .);
+ } >DATA
+ __stack_svc_end__ = __stack_svc_start__ + SIZEOF(.stack_svc);
+
+ /* .stack_abt section */
+
+ .stack_abt (__stack_svc_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_abt_start__ = .;
+ *(.stack_abt)
+ . = MAX(__stack_abt_start__ + _STACKSIZE_ABT , .);
+ } >DATA
+ __stack_abt_end__ = __stack_abt_start__ + SIZEOF(.stack_abt);
+
+ /* .stack_und section */
+
+ .stack_und (__stack_abt_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_und_start__ = .;
+ *(.stack_und)
+ . = MAX(__stack_und_start__ + _STACKSIZE_UND , .);
+ } >DATA
+ __stack_und_end__ = __stack_und_start__ + SIZEOF(.stack_und);
+
+ /* Stabs debugging sections. */
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+ .stab.excl 0 : { *(.stab.excl) }
+ .stab.exclstr 0 : { *(.stab.exclstr) }
+ .stab.index 0 : { *(.stab.index) }
+ .stab.indexstr 0 : { *(.stab.indexstr) }
+ .comment 0 : { *(.comment) }
+ /* DWARF debug sections.
+ Symbols in the DWARF debugging sections are relative to the beginning
+ of the section so we begin them at 0. */
+ /* DWARF 1 */
+ .debug 0 : { *(.debug) }
+ .line 0 : { *(.line) }
+ /* GNU DWARF 1 extensions */
+ .debug_srcinfo 0 : { *(.debug_srcinfo) }
+ .debug_sfnames 0 : { *(.debug_sfnames) }
+ /* DWARF 1.1 and DWARF 2 */
+ .debug_aranges 0 : { *(.debug_aranges) }
+ .debug_pubnames 0 : { *(.debug_pubnames) }
+ /* DWARF 2 */
+ .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
+ .debug_abbrev 0 : { *(.debug_abbrev) }
+ .debug_line 0 : { *(.debug_line) }
+ .debug_frame 0 : { *(.debug_frame) }
+ .debug_str 0 : { *(.debug_str) }
+ .debug_loc 0 : { *(.debug_loc) }
+ .debug_macinfo 0 : { *(.debug_macinfo) }
+ /* SGI/MIPS DWARF 2 extensions */
+ .debug_weaknames 0 : { *(.debug_weaknames) }
+ .debug_funcnames 0 : { *(.debug_funcnames) }
+ .debug_typenames 0 : { *(.debug_typenames) }
+ .debug_varnames 0 : { *(.debug_varnames) }
+}
+
Added: trunk/firmware/arm/str/template75x/STR75x-ROM.ld
===================================================================
--- trunk/firmware/arm/str/template75x/STR75x-ROM.ld (rev 0)
+++ trunk/firmware/arm/str/template75x/STR75x-ROM.ld 2008-02-06 12:46:05 UTC (rev 826)
@@ -0,0 +1,231 @@
+/***********************************************************************************
+* Copyright 2005 Anglia Design
+* This demo code and associated components are provided as is and has no warranty,
+* implied or otherwise. You are free to use/modify any of the provided
+* code at your own risk in your applications with the expressed limitation
+* of liability (see below)
+*
+* LIMITATION OF LIABILITY: ANGLIA OR ANGLIA DESIGNS SHALL NOT BE LIABLE FOR ANY
+* LOSS OF PROFITS, LOSS OF USE, LOSS OF DATA, INTERRUPTION OF BUSINESS, NOR FOR
+* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND WHETHER UNDER
+* THIS AGREEMENT OR OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+*
+* Author : Spencer Oliver
+* Web : www.anglia-designs.com
+*
+***********************************************************************************/
+
+/* Stack Sizes */
+
+ _STACKSIZE = 1024;
+ _STACKSIZE_IRQ = 256;
+ _STACKSIZE_FIQ = 256;
+ _STACKSIZE_SVC = 0;
+ _STACKSIZE_ABT = 0;
+ _STACKSIZE_UND = 0;
+ _HEAPSIZE = 1024;
+
+/* Memory Definitions */
+
+MEMORY
+{
+ CODE (rx) : ORIGIN = 0x20000000, LENGTH = 0x00040000
+ DATA (rw) : ORIGIN = 0x40000000, LENGTH = 0x00004000
+}
+
+/* Section Definitions */
+
+SECTIONS
+{
+ /* first section is .text which is used for code */
+
+ .text :
+ {
+ KEEP(*(.vectrom))
+ KEEP(*(.init))
+ *(.text .text.*)
+ *(.gnu.linkonce.t.*)
+ *(.glue_7t .glue_7)
+ KEEP(*(.fini))
+ *(.gcc_except_table)
+ } >CODE =0
+ . = ALIGN(4);
+
+ /* .ctors .dtors are used for c++ constructors/destructors */
+
+ .ctors :
+ {
+ PROVIDE(__ctors_start__ = .);
+ KEEP(*(SORT(.ctors.*)))
+ KEEP(*(.ctors))
+ PROVIDE(__ctors_end__ = .);
+ } >CODE
+
+ .dtors :
+ {
+ PROVIDE(__dtors_start__ = .);
+ KEEP(*(SORT(.dtors.*)))
+ KEEP(*(.dtors))
+ PROVIDE(__dtors_end__ = .);
+ } >CODE
+
+ /* .rodata section which is used for read-only data (constants) */
+
+ .rodata :
+ {
+ *(.rodata .rodata.*)
+ *(.gnu.linkonce.r.*)
+ } >CODE
+ . = ALIGN(4);
+
+ _vectext = .;
+ PROVIDE (vectext = .);
+
+ .vect : AT (_vectext)
+ {
+ _vecstart = .;
+ KEEP(*(.vectram))
+ _vecend = .;
+ } >DATA
+
+ _etext = _vectext + SIZEOF(.vect);
+ PROVIDE (etext = .);
+
+ /* .data section which is used for initialized data */
+
+ .data : AT (_etext)
+ {
+ __data_start = .;
+ *(.data .data.*)
+ *(.gnu.linkonce.d.*)
+ SORT(CONSTRUCTORS)
+ . = ALIGN(4);
+ *(.fastrun .fastrun.*)
+ } >DATA
+ . = ALIGN(4);
+
+ _edata = .;
+ PROVIDE (edata = .);
+
+ /* .bss section which is used for uninitialized data */
+
+ .bss :
+ {
+ __bss_start = .;
+ __bss_start__ = .;
+ *(.bss .bss.*)
+ *(.gnu.linkonce.b.*)
+ *(COMMON)
+ . = ALIGN(4);
+ } >DATA
+ . = ALIGN(4);
+ __bss_end__ = .;
+
+ _end = .;
+ PROVIDE(end = .);
+
+ /* .heap section which is used for memory allocation */
+
+ .heap (NOLOAD) :
+ {
+ __heap_start__ = .;
+ *(.heap)
+ . = MAX(__heap_start__ + _HEAPSIZE , .);
+ } >DATA
+ __heap_end__ = __heap_start__ + SIZEOF(.heap);
+
+ /* .stack section - user mode stack */
+
+ .stack (__heap_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_start__ = .;
+ *(.stack)
+ . = MAX(__stack_start__ + _STACKSIZE , .);
+ } >DATA
+ __stack_end__ = __stack_start__ + SIZEOF(.stack);
+
+ /* .stack_irq section */
+
+ .stack_irq (__stack_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_irq_start__ = .;
+ *(.stack_irq)
+ . = MAX(__stack_irq_start__ + _STACKSIZE_IRQ , .);
+ } >DATA
+ __stack_irq_end__ = __stack_irq_start__ + SIZEOF(.stack_irq);
+
+ /* .stack_fiq section */
+
+ .stack_fiq (__stack_irq_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_fiq_start__ = .;
+ *(.stack_fiq)
+ . = MAX(__stack_fiq_start__ + _STACKSIZE_FIQ , .);
+ } >DATA
+ __stack_fiq_end__ = __stack_fiq_start__ + SIZEOF(.stack_fiq);
+
+ /* .stack_svc section */
+
+ .stack_svc (__stack_fiq_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_svc_start__ = .;
+ *(.stack_svc)
+ . = MAX(__stack_svc_start__ + _STACKSIZE_SVC , .);
+ } >DATA
+ __stack_svc_end__ = __stack_svc_start__ + SIZEOF(.stack_svc);
+
+ /* .stack_abt section */
+
+ .stack_abt (__stack_svc_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_abt_start__ = .;
+ *(.stack_abt)
+ . = MAX(__stack_abt_start__ + _STACKSIZE_ABT , .);
+ } >DATA
+ __stack_abt_end__ = __stack_abt_start__ + SIZEOF(.stack_abt);
+
+ /* .stack_und section */
+
+ .stack_und (__stack_abt_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_und_start__ = .;
+ *(.stack_und)
+ . = MAX(__stack_und_start__ + _STACKSIZE_UND , .);
+ } >DATA
+ __stack_und_end__ = __stack_und_start__ + SIZEOF(.stack_und);
+
+ /* Stabs debugging sections. */
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+ .stab.excl 0 : { *(.stab.excl) }
+ .stab.exclstr 0 : { *(.stab.exclstr) }
+ .stab.index 0 : { *(.stab.index) }
+ .stab.indexstr 0 : { *(.stab.indexstr) }
+ .comment 0 : { *(.comment) }
+ /* DWARF debug sections.
+ Symbols in the DWARF debugging sections are relative to the beginning
+ of the section so we begin them at 0. */
+ /* DWARF 1 */
+ .debug 0 : { *(.debug) }
+ .line 0 : { *(.line) }
+ /* GNU DWARF 1 extensions */
+ .debug_srcinfo 0 : { *(.debug_srcinfo) }
+ .debug_sfnames 0 : { *(.debug_sfnames) }
+ /* DWARF 1.1 and DWARF 2 */
+ .debug_aranges 0 : { *(.debug_aranges) }
+ .debug_pubnames 0 : { *(.debug_pubnames) }
+ /* DWARF 2 */
+ .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
+ .debug_abbrev 0 : { *(.debug_abbrev) }
+ .debug_line 0 : { *(.debug_line) }
+ .debug_frame 0 : { *(.debug_frame) }
+ .debug_str 0 : { *(.debug_str) }
+ .debug_loc 0 : { *(.debug_loc) }
+ .debug_macinfo 0 : { *(.debug_macinfo) }
+ /* SGI/MIPS DWARF 2 extensions */
+ .debug_weaknames 0 : { *(.debug_weaknames) }
+ .debug_funcnames 0 : { *(.debug_funcnames) }
+ .debug_typenames 0 : { *(.debug_typenames) }
+ .debug_varnames 0 : { *(.debug_varnames) }
+}
+
Added: trunk/firmware/arm/str/template75x/main.c
===================================================================
--- trunk/firmware/arm/str/template75x/main.c (rev 0)
+++ trunk/firmware/arm/str/template75x/main.c 2008-02-06 12:46:05 UTC (rev 826)
@@ -0,0 +1,29 @@
+/***********************************************************************************
+* Copyright 2005 Anglia Design
+* This demo code and associated components are provided as is and has no warranty,
+* implied or otherwise. You are free to use/modify any of the provided
+* code at your own risk in your applications with the expressed limitation
+* of liability (see below)
+*
+* LIMITATION OF LIABILITY: ANGLIA OR ANGLIA DESIGNS SHALL NOT BE LIABLE FOR ANY
+* LOSS OF PROFITS, LOSS OF USE, LOSS OF DATA, INTERRUPTION OF BUSINESS, NOR FOR
+* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND WHETHER UNDER
+* THIS AGREEMENT OR OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+*
+* Author : Spencer Oliver
+* Web : www.anglia-designs.com
+*
+***********************************************************************************/
+
+#include "75x_lib.h"
+
+int main (void)
+{
+ #ifdef LIBDEBUG
+ libdebug();
+ #endif
+ int a=4;
+ int b=5;
+ int c;
+ c=a+b;
+}
Added: trunk/firmware/arm/str/template75x/startup.s
===================================================================
--- trunk/firmware/arm/str/template75x/startup.s (rev 0)
+++ trunk/firmware/arm/str/template75x/startup.s 2008-02-06 12:46:05 UTC (rev 826)
@@ -0,0 +1,297 @@
+/***********************************************************************************
+* Copyright 2005 Anglia Design
+* This demo code and associated components are provided as is and has no warranty,
+* implied or otherwise. You are free to use/modify any of the provided
+* code at your own risk in your applications with the expressed limitation
+* of liability (see below)
+*
+* LIMITATION OF LIABILITY: ANGLIA OR ANGLIA DESIGNS SHALL NOT BE LIABLE FOR ANY
+* LOSS OF PROFITS, LOSS OF USE, LOSS OF DATA, INTERRUPTION OF BUSINESS, NOR FOR
+* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND WHETHER UNDER
+* THIS AGREEMENT OR OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+*
+* Author : Spencer Oliver
+* Web : www.anglia-designs.com
+*
+***********************************************************************************/
+
+/**** Startup Code (executed after Reset) ****/
+
+/* Frequency values */
+/* set to suit target hardware */
+
+ .equ FOSC, 4000000
+
+/* Standard definitions of Mode bits and Interrupt (I & F) flags in PSRs */
+
+ .equ Mode_USR, 0x10
+ .equ Mode_FIQ, 0x11
+ .equ Mode_IRQ, 0x12
+ .equ Mode_SVC, 0x13
+ .equ Mode_ABT, 0x17
+ .equ Mode_UND, 0x1B
+ .equ Mode_SYS, 0x1F /* available on ARM Arch 4 and later */
+
+ .equ I_Bit, 0x80 /* when I bit is set, IRQ is disabled */
+ .equ F_Bit, 0x40 /* when F bit is set, FIQ is disabled */
+
+/* --- System memory locations */
+
+ .equ EIC_Base_addr, 0xFFFFF800 /* EI...
[truncated message content] |
|
From: <ak...@us...> - 2008-02-06 12:47:42
|
Revision: 827
http://can.svn.sourceforge.net/can/?rev=827&view=rev
Author: akhe
Date: 2008-02-06 04:47:40 -0800 (Wed, 06 Feb 2008)
Log Message:
-----------
Added templates for all STR7 uP's
Added Paths:
-----------
trunk/firmware/arm/str/template71x/
trunk/firmware/arm/str/template71x/Makefile
trunk/firmware/arm/str/template71x/STR71x-RAM.ld
trunk/firmware/arm/str/template71x/STR71x-ROM.ld
trunk/firmware/arm/str/template71x/main.c
trunk/firmware/arm/str/template71x/startup.s
trunk/firmware/arm/str/template71x/vector.s
trunk/firmware/arm/str/template71x/vectors.c
trunk/firmware/arm/str/template71x/vectors.h
Added: trunk/firmware/arm/str/template71x/Makefile
===================================================================
--- trunk/firmware/arm/str/template71x/Makefile (rev 0)
+++ trunk/firmware/arm/str/template71x/Makefile 2008-02-06 12:47:40 UTC (rev 827)
@@ -0,0 +1,495 @@
+# Hey Emacs, this is a -*- makefile -*-
+#
+# WinARM template makefile
+# by Giacomo Fazio and Antonio Nasca, Catania, Italy
+# <gia...@gm...>
+# <ant...@ho...>
+#
+# based on the WinARM template makefile written by Martin Thomas
+# Released to the Public Domain
+# Please read the make user manual!
+#
+#
+# On command line:
+#
+# make all = Make software.
+#
+# make clean = Clean out built project files.
+#
+# make program = Download the hex file to the device
+#
+# (TODO: make filename.s = Just compile filename.c into the assembler code only)
+#
+# To rebuild project do "make clean" then "make all".
+# Toolchain prefix (i.e arm-elf -> arm-elf-gcc.exe)
+TCHAIN = arm-elf
+#TCHAIN = arm-none-eabi
+
+#USE_THUMB_MODE = YES
+USE_THUMB_MODE = NO
+
+# MCU name and submodel
+MCU = arm7tdmi
+SUBMDL = STR71x
+
+## Create ROM-Image
+#RUN_MODE=ROM_RUN
+## Create RAM-Image
+RUN_MODE=RAM_RUN
+
+## not supported in this example:
+## Exception-Vector placement only supported for "ROM_RUN"
+## (placement settings ignored when using "RAM_RUN")
+## - Exception vectors in ROM:
+#VECTOR_LOCATION=VECTORS_IN_ROM
+## - Exception vectors in RAM:
+#VECTOR_LOCATION=VECTORS_IN_RAM
+
+
+# Target file name (without extension).
+TARGET = main
+
+# List C source files here. (C dependencies are automatically generated.)
+# use file-extension c for "c-only"-files
+SRC = $(TARGET).c
+
+# List C source files here which must be compiled in ARM-Mode.
+# use file-extension c for "c-only"-files
+SRCARM = vectors.c
+# thumb is possible too for vectors.c - keep ARM, TODO: profile
+
+# List C++ source files here.
+# use file-extension cpp for C++-files (use extension .cpp)
+CPPSRC =
+
+# List C++ source files here which must be compiled in ARM-Mode.
+# use file-extension cpp for C++-files (use extension .cpp)
+#CPPSRCARM = $(TARGET).cpp
+CPPSRCARM =
+
+# List Assembler source files here.
+# Make them always end in a capital .S. Files ending in a lowercase .s
+# will not be considered source files but generated files (assembler
+# output from the compiler), and will be deleted upon "make clean"!
+# Even though the DOS/Win* filesystem matches both .s and .S the same,
+# it will preserve the spelling of the filenames, and gcc itself does
+# care about how the name is spelled on its command-line.
+ASRC =
+
+# List Assembler source files here which must be assembled in ARM-Mode..
+ASRCARM = vector.S startup.S
+
+# Path to Linker-Scripts
+LINKERSCRIPTPATH = .
+
+## Output format. (can be ihex or binary or both)
+## (binary i.e. for openocd and SAM-BA, hex i.e. for lpc21isp and uVision)
+#FORMAT = ihex
+#FORMAT = binary
+FORMAT = both
+
+# Optimization level, can be [0, 1, 2, 3, s].
+# 0 = turn off optimization. s = optimize for size.
+# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
+#OPT = s
+OPT = 0
+
+## Using the Atmel AT91_lib produces warning with
+## the default warning-levels.
+## yes - disable these warnings; no - keep default settings
+#AT91LIBNOWARN = yes
+AT91LIBNOWARN = no
+
+# Debugging format.
+# Native formats for AVR-GCC's -g are stabs [default], or dwarf-2.
+# AVR (extended) COFF requires stabs, plus an avr-objcopy run.
+#DEBUG = stabs
+DEBUG = dwarf-2
+
+# List any extra directories to look for include files here.
+# Each directory must be seperated by a space.
+EXTRAINCDIRS = "K:/include" ../common/str71x_lib/include
+
+# List any extra directories to look for library files here.
+# Each directory must be seperated by a space.
+#EXTRA_LIBDIRS = ../arm7_efsl_0_2_4
+EXTRA_LIBDIRS = K:/lib ../common/str71x_lib
+
+
+# Compiler flag to set the C Standard level.
+# c89 - "ANSI" C
+# gnu89 - c89 plus GCC extensions
+# c99 - ISO C99 standard (not yet fully implemented)
+# gnu99 - c99 plus GCC extensions
+CSTANDARD = -std=gnu99
+
+# Place -D or -U options for C here
+CDEFS = -D$(RUN_MODE)
+
+# Place -I options here
+CINCS =
+
+# Place -D or -U options for ASM here
+ADEFS = -D$(RUN_MODE)
+
+ifdef VECTOR_LOCATION
+CDEFS += -D$(VECTOR_LOCATION)
+ADEFS += -D$(VECTOR_LOCATION)
+endif
+
+CDEFS += -D__WinARM__ -D__WINARMSUBMDL_$(SUBMDL)__
+ADEFS += -D__WinARM__ -D__WINARMSUBMDL_$(SUBMDL)__
+
+# Compiler flags.
+
+ifeq ($(USE_THUMB_MODE),YES)
+THUMB = -mthumb
+THUMB_IW = -mthumb-interwork
+else
+THUMB =
+THUMB_IW =
+endif
+
+# -g*: generate debugging information
+# -O*: optimization level
+# -f...: tuning, see GCC manual and avr-libc documentation
+# -Wall...: warning level
+# -Wa,...: tell GCC to pass this to the assembler.
+# -adhlns...: create assembler listing
+#
+# Flags for C and C++ (arm-elf-gcc/arm-elf-g++)
+CFLAGS = -g$(DEBUG)
+CFLAGS += $(CDEFS) $(CINCS)
+CFLAGS += -O$(OPT)
+CFLAGS += -Wall -Wcast-align -Wimplicit
+CFLAGS += -Wpointer-arith -Wswitch
+CFLAGS += -ffunction-sections -fdata-sections
+CFLAGS += -Wredundant-decls -Wreturn-type -Wshadow -Wunused
+CFLAGS += -Wa,-adhlns=$(subst $(suffix $<),.lst,$<)
+CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
+
+# flags only for C
+CONLYFLAGS += -Wnested-externs
+CONLYFLAGS += $(CSTANDARD)
+
+ifneq ($(AT91LIBNOWARN),yes)
+#AT91-lib warnings with:
+CFLAGS += -Wcast-qual
+CONLYFLAGS += -Wmissing-prototypes
+CONLYFLAGS += -Wstrict-prototypes
+CONLYFLAGS += -Wmissing-declarations
+endif
+
+# flags only for C++ (arm-elf-g++)
+# CPPFLAGS = -fno-rtti -fno-exceptions
+CPPFLAGS =
+
+# Assembler flags.
+# -Wa,...: tell GCC to pass this to the assembler.
+# -ahlns: create listing
+# -g$(DEBUG): have the assembler create line number information
+ASFLAGS = $(ADEFS) -Wa,-adhlns=$(<:.S=.lst),-g$(DEBUG)
+
+
+#Additional libraries.
+
+# Extra libraries
+# Each library-name must be seperated by a space.
+# To add libxyz.a, libabc.a and libefsl.a:
+# EXTRA_LIBS = xyz abc efsl
+#EXTRA_LIBS = efsl
+EXTRA_LIBS = STR71x_lib
+
+#Support for newlibc-lpc (file: libnewlibc-lpc.a)
+#NEWLIBLPC = -lnewlib-lpc
+
+MATH_LIB = -lm
+
+# CPLUSPLUS_LIB = -lstdc++
+
+
+# Linker flags.
+# -Wl,...: tell GCC to pass this to linker.
+# -Map: create map file
+# --cref: add cross reference to map file
+LDFLAGS = -nostartfiles -Wl,-Map=$(TARGET).map,--cref,--gc-sections
+LDFLAGS += -lc
+LDFLAGS += $(NEWLIBLPC) $(MATH_LIB)
+LDFLAGS += -lc -lgcc
+LDFLAGS += $(CPLUSPLUS_LIB)
+LDFLAGS += $(patsubst %,-L%,$(EXTRA_LIBDIRS))
+LDFLAGS += $(patsubst %,-l%,$(EXTRA_LIBS))
+
+# Set Linker-Script Depending On Selected Memory and Controller
+ifeq ($(RUN_MODE),RAM_RUN)
+LDFLAGS +=-T$(LINKERSCRIPTPATH)/$(SUBMDL)-RAM.ld
+else
+LDFLAGS +=-T$(LINKERSCRIPTPATH)/$(SUBMDL)-ROM.ld
+endif
+
+
+# Define directories, if needed.
+## DIRARM = c:/WinARM/
+## DIRARMBIN = $(DIRAVR)/bin/
+## DIRAVRUTILS = $(DIRAVR)/utils/bin/
+
+# Define programs and commands.
+SHELL = sh
+CC = $(TCHAIN)-gcc
+CPP = $(TCHAIN)-g++
+AR = $(TCHAIN)-ar
+OBJCOPY = $(TCHAIN)-objcopy
+OBJDUMP = $(TCHAIN)-objdump
+SIZE = $(TCHAIN)-size
+NM = $(TCHAIN)-nm
+REMOVE = rm -f
+REMOVEDIR = rm -f -r
+COPY = cp
+
+# Define Messages
+# English
+MSG_ERRORS_NONE = Errors: none
+MSG_BEGIN = "-------- begin (mode: $(RUN_MODE)) --------"
+MSG_END = -------- end --------
+MSG_SIZE_BEFORE = Size before:
+MSG_SIZE_AFTER = Size after:
+MSG_FLASH = Creating load file for Flash:
+MSG_EXTENDED_LISTING = Creating Extended Listing:
+MSG_SYMBOL_TABLE = Creating Symbol Table:
+MSG_LINKING = Linking:
+MSG_COMPILING = Compiling C:
+MSG_COMPILING_ARM = "Compiling C (ARM-only):"
+MSG_COMPILINGCPP = Compiling C++:
+MSG_COMPILINGCPP_ARM = "Compiling C++ (ARM-only):"
+MSG_ASSEMBLING = Assembling:
+MSG_ASSEMBLING_ARM = "Assembling (ARM-only):"
+MSG_CLEANING = Cleaning project:
+MSG_FORMATERROR = Can not handle output-format
+MSG_LPC21_RESETREMINDER = You may have to bring the target in bootloader-mode now.
+
+# Define all object files.
+COBJ = $(SRC:.c=.o)
+AOBJ = $(ASRC:.S=.o)
+COBJARM = $(SRCARM:.c=.o)
+AOBJARM = $(ASRCARM:.S=.o)
+CPPOBJ = $(CPPSRC:.cpp=.o)
+CPPOBJARM = $(CPPSRCARM:.cpp=.o)
+
+# Define all listing files.
+LST = $(ASRC:.S=.lst) $(ASRCARM:.S=.lst) $(SRC:.c=.lst) $(SRCARM:.c=.lst)
+LST += $(CPPSRC:.cpp=.lst) $(CPPSRCARM:.cpp=.lst)
+
+# Compiler flags to generate dependency files.
+### GENDEPFLAGS = -Wp,-M,-MP,-MT,$(*F).o,-MF,.dep/$(@F).d
+GENDEPFLAGS = -MD -MP -MF .dep/$(@F).d
+
+# Combine all necessary flags and optional flags.
+# Add target processor to flags.
+ALL_CFLAGS = -mcpu=$(MCU) $(THUMB_IW) -I. $(CFLAGS) $(GENDEPFLAGS)
+ALL_ASFLAGS = -mcpu=$(MCU) $(THUMB_IW) -I. -x assembler-with-cpp $(ASFLAGS)
+
+
+# Default target.
+all: begin gccversion sizebefore build sizeafter finished end
+
+ifeq ($(FORMAT),ihex)
+build: elf hex lss sym
+hex: $(TARGET).hex
+IMGEXT=hex
+else
+ifeq ($(FORMAT),binary)
+build: elf bin lss sym
+bin: $(TARGET).bin
+IMGEXT=bin
+else
+ifeq ($(FORMAT),both)
+build: elf hex bin lss sym
+hex: $(TARGET).hex
+bin: $(TARGET).bin
+else
+$(error "$(MSG_FORMATERROR) $(FORMAT)")
+endif
+endif
+endif
+
+elf: $(TARGET).elf
+lss: $(TARGET).lss
+sym: $(TARGET).sym
+
+# Eye candy.
+begin:
+ @echo
+ @echo $(MSG_BEGIN)
+
+finished:
+ @echo $(MSG_ERRORS_NONE)
+
+end:
+ @echo $(MSG_END)
+ @echo
+
+
+# Display size of file.
+HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
+ELFSIZE = $(SIZE) -A $(TARGET).elf
+sizebefore:
+ @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); echo; fi
+
+sizeafter:
+ @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi
+
+
+# Display compiler version information.
+gccversion :
+ @$(CC) --version
+
+# FLASH Programming with OPENOCD
+
+# specify the directory where openocd executable resides (openocd-ftd2xx.exe or openocd-pp.exe)
+# Note: you may have to adjust this if a newer version of YAGARTO has been downloaded
+OPENOCD_DIR = 'c:\Programmi\openocd\bin\'
+
+# specify OpenOCD executable (pp is for the wiggler, ftd2xx is for the USB debugger)
+OPENOCD = $(OPENOCD_DIR)openocd-pp.exe
+#OPENOCD = $(OPENOCD_DIR)openocd-ftd2xx.exe
+
+# specify OpenOCD configuration file (pick the one for your device)
+#OPENOCD_CFG =C:\openocd-configs\str71x-configs\str71x_signalyzer-flash-program.cfg
+#OPENOCD_CFG = C:\openocd-configs\str71x-configs\str71x_jtagkey-flash-program.cfg
+#OPENOCD_CFG = C:\openocd-configs\str71x-configs\str71x_armusbocd-flash-program.cfg
+OPENOCD_CFG = C:\openocd-configs\str71x-configs\str71x_pp-flash-program.cfg
+
+program:
+ @echo
+ @echo "Flash Programming with OpenOCD..."
+ $(OPENOCD) -f $(OPENOCD_CFG)
+ @echo
+ @echo
+ @echo "Flash Programming Finished."
+
+
+# Create final output file (.hex) from ELF output file.
+%.hex: %.elf
+ @echo
+ @echo $(MSG_FLASH) $@
+ $(OBJCOPY) -O ihex $< $@
+
+# Create final output file (.bin) from ELF output file.
+%.bin: %.elf
+ @echo
+ @echo $(MSG_FLASH) $@
+ $(OBJCOPY) -O binary $< $@
+
+
+# Create extended listing file from ELF output file.
+# testing: option -C
+%.lss: %.elf
+ @echo
+ @echo $(MSG_EXTENDED_LISTING) $@
+ $(OBJDUMP) -h -S -C $< > $@
+
+
+# Create a symbol table from ELF output file.
+%.sym: %.elf
+ @echo
+ @echo $(MSG_SYMBOL_TABLE) $@
+ $(NM) -n $< > $@
+
+
+# Link: create ELF output file from object files.
+.SECONDARY : $(TARGET).elf
+.PRECIOUS : $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM)
+%.elf: $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM)
+ @echo
+ @echo $(MSG_LINKING) $@
+ $(CC) $(THUMB) $(ALL_CFLAGS) $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM) --output $@ $(LDFLAGS)
+# $(CPP) $(THUMB) $(ALL_CFLAGS) $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM) --output $@ $(LDFLAGS)
+
+# Compile: create object files from C source files. ARM/Thumb
+$(COBJ) : %.o : %.c
+ @echo
+ @echo $(MSG_COMPILING) $<
+ $(CC) -c $(THUMB) $(ALL_CFLAGS) $(CONLYFLAGS) $< -o $@
+
+# Compile: create object files from C source files. ARM-only
+$(COBJARM) : %.o : %.c
+ @echo
+ @echo $(MSG_COMPILING_ARM) $<
+ $(CC) -c $(ALL_CFLAGS) $(CONLYFLAGS) $< -o $@
+
+# Compile: create object files from C++ source files. ARM/Thumb
+$(CPPOBJ) : %.o : %.cpp
+ @echo
+ @echo $(MSG_COMPILINGCPP) $<
+ $(CPP) -c $(THUMB) $(ALL_CFLAGS) $(CPPFLAGS) $< -o $@
+
+# Compile: create object files from C++ source files. ARM-only
+$(CPPOBJARM) : %.o : %.cpp
+ @echo
+ @echo $(MSG_COMPILINGCPP_ARM) $<
+ $(CPP) -c $(ALL_CFLAGS) $(CPPFLAGS) $< -o $@
+
+
+# Compile: create assembler files from C source files. ARM/Thumb
+## does not work - TODO - hints welcome
+##$(COBJ) : %.s : %.c
+## $(CC) $(THUMB) -S $(ALL_CFLAGS) $< -o $@
+
+
+# Assemble: create object files from assembler source files. ARM/Thumb
+$(AOBJ) : %.o : %.S
+ @echo
+ @echo $(MSG_ASSEMBLING) $<
+ $(CC) -c $(THUMB) $(ALL_ASFLAGS) $< -o $@
+
+
+# Assemble: create object files from assembler source files. ARM-only
+$(AOBJARM) : %.o : %.S
+ @echo
+ @echo $(MSG_ASSEMBLING_ARM) $<
+ $(CC) -c $(ALL_ASFLAGS) $< -o $@
+
+
+# Target: clean project.
+clean: begin clean_list finished end
+
+
+clean_list :
+ @echo
+ @echo $(MSG_CLEANING)
+ $(REMOVE) $(TARGET).hex
+ $(REMOVE) $(TARGET).bin
+ $(REMOVE) $(TARGET).obj
+ $(REMOVE) $(TARGET).elf
+ $(REMOVE) $(TARGET).map
+ $(REMOVE) $(TARGET).obj
+ $(REMOVE) $(TARGET).a90
+ $(REMOVE) $(TARGET).sym
+ $(REMOVE) $(TARGET).lnk
+ $(REMOVE) $(TARGET).lss
+ $(REMOVE) $(COBJ)
+ $(REMOVE) $(CPPOBJ)
+ $(REMOVE) $(AOBJ)
+ $(REMOVE) $(COBJARM)
+ $(REMOVE) $(CPPOBJARM)
+ $(REMOVE) $(AOBJARM)
+ $(REMOVE) $(LST)
+ $(REMOVE) $(SRC:.c=.s)
+ $(REMOVE) $(SRC:.c=.d)
+ $(REMOVE) $(SRCARM:.c=.s)
+ $(REMOVE) $(SRCARM:.c=.d)
+ $(REMOVE) $(CPPSRC:.cpp=.s)
+ $(REMOVE) $(CPPSRC:.cpp=.d)
+ $(REMOVE) $(CPPSRCARM:.cpp=.s)
+ $(REMOVE) $(CPPSRCARM:.cpp=.d)
+ $(REMOVEDIR) .dep | exit 0
+
+
+# Include the dependency files.
+-include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)
+
+
+# Listing of phony targets.
+.PHONY : all begin finish end sizebefore sizeafter gccversion \
+build elf hex bin lss sym clean clean_list program
+
Added: trunk/firmware/arm/str/template71x/STR71x-RAM.ld
===================================================================
--- trunk/firmware/arm/str/template71x/STR71x-RAM.ld (rev 0)
+++ trunk/firmware/arm/str/template71x/STR71x-RAM.ld 2008-02-06 12:47:40 UTC (rev 827)
@@ -0,0 +1,229 @@
+/***********************************************************************************
+* Copyright 2005 Anglia Design
+* This demo code and associated components are provided as is and has no warranty,
+* implied or otherwise. You are free to use/modify any of the provided
+* code at your own risk in your applications with the expressed limitation
+* of liability (see below)
+*
+* LIMITATION OF LIABILITY: ANGLIA OR ANGLIA DESIGNS SHALL NOT BE LIABLE FOR ANY
+* LOSS OF PROFITS, LOSS OF USE, LOSS OF DATA, INTERRUPTION OF BUSINESS, NOR FOR
+* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND WHETHER UNDER
+* THIS AGREEMENT OR OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+*
+* Author : Spencer Oliver
+* Web : www.anglia-designs.com
+*
+***********************************************************************************/
+
+/* Stack Sizes */
+
+ _STACKSIZE = 1024;
+ _STACKSIZE_IRQ = 256;
+ _STACKSIZE_FIQ = 256;
+ _STACKSIZE_SVC = 0;
+ _STACKSIZE_ABT = 0;
+ _STACKSIZE_UND = 0;
+ _HEAPSIZE = 1024;
+
+/* Memory Definitions */
+
+MEMORY
+{
+ DATA (rw) : ORIGIN = 0x20000000, LENGTH = 0x00010000
+ XDATA (rw) : ORIGIN = 0x62000000, LENGTH = 0x00400000
+}
+
+/* Section Definitions */
+
+SECTIONS
+{
+ /* first section is .text which is used for code */
+
+ .text :
+ {
+ KEEP(*(.vectrom))
+ KEEP(*(.init))
+ *(.text .text.*)
+ *(.gnu.linkonce.t.*)
+ *(.glue_7t .glue_7)
+ KEEP(*(.fini))
+ *(.gcc_except_table)
+ } >XDATA =0
+ . = ALIGN(4);
+
+ /* .ctors .dtors are used for c++ constructors/destructors */
+
+ .ctors :
+ {
+ PROVIDE(__ctors_start__ = .);
+ KEEP(*(SORT(.ctors.*)))
+ KEEP(*(.ctors))
+ PROVIDE(__ctors_end__ = .);
+ } >XDATA
+
+ .dtors :
+ {
+ PROVIDE(__dtors_start__ = .);
+ KEEP(*(SORT(.dtors.*)))
+ KEEP(*(.dtors))
+ PROVIDE(__dtors_end__ = .);
+ } >XDATA
+
+ /* .rodata section which is used for read-only data (constants) */
+
+ .rodata :
+ {
+ *(.rodata .rodata.*)
+ *(.gnu.linkonce.r.*)
+ } >XDATA
+ . = ALIGN(4);
+
+ _vectext = .;
+ PROVIDE (vtext = .);
+
+ .vect : AT (_vectext)
+ {
+ _vecstart = .;
+ KEEP(*(.vectram))
+ _vecend = .;
+ } >DATA
+
+ _etext = _vectext + SIZEOF(.vect);
+ PROVIDE (etext = .);
+
+ /* .data section which is used for initialized data */
+
+ .data : AT (_etext)
+ {
+ *(.data .data.*)
+ *(.gnu.linkonce.d.*)
+ SORT(CONSTRUCTORS)
+ } >XDATA
+ . = ALIGN(4);
+
+ __data_start = .;
+ _edata = .;
+ PROVIDE (edata = .);
+
+ /* .bss section which is used for uninitialized data */
+
+ .bss :
+ {
+ __bss_start = .;
+ __bss_start__ = .;
+ *(.bss .bss.*)
+ *(.gnu.linkonce.b.*)
+ *(COMMON)
+ . = ALIGN(4);
+ } >XDATA
+ . = ALIGN(4);
+ __bss_end__ = .;
+
+ _end = .;
+ PROVIDE(end = .);
+
+ /* .heap section which is used for memory allocation */
+
+ .heap (NOLOAD) :
+ {
+ __heap_start__ = .;
+ *(.heap)
+ . = MAX(__heap_start__ + _HEAPSIZE , .);
+ } >DATA
+ __heap_end__ = __heap_start__ + SIZEOF(.heap);
+
+ /* .stack section - user mode stack */
+
+ .stack (__heap_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_start__ = .;
+ *(.stack)
+ . = MAX(__stack_start__ + _STACKSIZE , .);
+ } >DATA
+ __stack_end__ = __stack_start__ + SIZEOF(.stack);
+
+ /* .stack_irq section */
+
+ .stack_irq (__stack_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_irq_start__ = .;
+ *(.stack_irq)
+ . = MAX(__stack_irq_start__ + _STACKSIZE_IRQ , .);
+ } >DATA
+ __stack_irq_end__ = __stack_irq_start__ + SIZEOF(.stack_irq);
+
+ /* .stack_fiq section */
+
+ .stack_fiq (__stack_irq_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_fiq_start__ = .;
+ *(.stack_fiq)
+ . = MAX(__stack_fiq_start__ + _STACKSIZE_FIQ , .);
+ } >DATA
+ __stack_fiq_end__ = __stack_fiq_start__ + SIZEOF(.stack_fiq);
+
+ /* .stack_svc section */
+
+ .stack_svc (__stack_fiq_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_svc_start__ = .;
+ *(.stack_svc)
+ . = MAX(__stack_svc_start__ + _STACKSIZE_SVC , .);
+ } >DATA
+ __stack_svc_end__ = __stack_svc_start__ + SIZEOF(.stack_svc);
+
+ /* .stack_abt section */
+
+ .stack_abt (__stack_svc_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_abt_start__ = .;
+ *(.stack_abt)
+ . = MAX(__stack_abt_start__ + _STACKSIZE_ABT , .);
+ } >DATA
+ __stack_abt_end__ = __stack_abt_start__ + SIZEOF(.stack_abt);
+
+ /* .stack_und section */
+
+ .stack_und (__stack_abt_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_und_start__ = .;
+ *(.stack_und)
+ . = MAX(__stack_und_start__ + _STACKSIZE_UND , .);
+ } >DATA
+ __stack_und_end__ = __stack_und_start__ + SIZEOF(.stack_und);
+
+ /* Stabs debugging sections. */
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+ .stab.excl 0 : { *(.stab.excl) }
+ .stab.exclstr 0 : { *(.stab.exclstr) }
+ .stab.index 0 : { *(.stab.index) }
+ .stab.indexstr 0 : { *(.stab.indexstr) }
+ .comment 0 : { *(.comment) }
+ /* DWARF debug sections.
+ Symbols in the DWARF debugging sections are relative to the beginning
+ of the section so we begin them at 0. */
+ /* DWARF 1 */
+ .debug 0 : { *(.debug) }
+ .line 0 : { *(.line) }
+ /* GNU DWARF 1 extensions */
+ .debug_srcinfo 0 : { *(.debug_srcinfo) }
+ .debug_sfnames 0 : { *(.debug_sfnames) }
+ /* DWARF 1.1 and DWARF 2 */
+ .debug_aranges 0 : { *(.debug_aranges) }
+ .debug_pubnames 0 : { *(.debug_pubnames) }
+ /* DWARF 2 */
+ .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
+ .debug_abbrev 0 : { *(.debug_abbrev) }
+ .debug_line 0 : { *(.debug_line) }
+ .debug_frame 0 : { *(.debug_frame) }
+ .debug_str 0 : { *(.debug_str) }
+ .debug_loc 0 : { *(.debug_loc) }
+ .debug_macinfo 0 : { *(.debug_macinfo) }
+ /* SGI/MIPS DWARF 2 extensions */
+ .debug_weaknames 0 : { *(.debug_weaknames) }
+ .debug_funcnames 0 : { *(.debug_funcnames) }
+ .debug_typenames 0 : { *(.debug_typenames) }
+ .debug_varnames 0 : { *(.debug_varnames) }
+}
+
Added: trunk/firmware/arm/str/template71x/STR71x-ROM.ld
===================================================================
--- trunk/firmware/arm/str/template71x/STR71x-ROM.ld (rev 0)
+++ trunk/firmware/arm/str/template71x/STR71x-ROM.ld 2008-02-06 12:47:40 UTC (rev 827)
@@ -0,0 +1,258 @@
+/***********************************************************************************
+* Copyright 2005 Anglia Design
+* This demo code and associated components are provided as is and has no warranty,
+* implied or otherwise. You are free to use/modify any of the provided
+* code at your own risk in your applications with the expressed limitation
+* of liability (see below)
+*
+* LIMITATION OF LIABILITY: ANGLIA OR ANGLIA DESIGNS SHALL NOT BE LIABLE FOR ANY
+* LOSS OF PROFITS, LOSS OF USE, LOSS OF DATA, INTERRUPTION OF BUSINESS, NOR FOR
+* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND WHETHER UNDER
+* THIS AGREEMENT OR OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+*
+* Author : Spencer Oliver
+* Web : www.anglia-designs.com
+*
+***********************************************************************************/
+
+/* Stack Sizes */
+
+ _STACKSIZE = 1024;
+ _STACKSIZE_IRQ = 256;
+ _STACKSIZE_FIQ = 256;
+ _STACKSIZE_SVC = 0;
+ _STACKSIZE_ABT = 0;
+ _STACKSIZE_UND = 0;
+ _HEAPSIZE = 1024;
+
+/* Memory Definitions */
+
+MEMORY
+{
+ XCODE (rx) : ORIGIN = 0x60000000, LENGTH = 0x00400000
+ CODE (rx) : ORIGIN = 0x40000000, LENGTH = 0x00040000
+ XDATA (rw) : ORIGIN = 0x62000000, LENGTH = 0x00400000
+ DATA (rw) : ORIGIN = 0x20000000, LENGTH = 0x00010000
+}
+
+/* Section Definitions */
+
+SECTIONS
+{
+ /* first section is .text which is used for code */
+
+ .xtext :
+ {
+ *(.xtext .xtext.*)
+ /**lfunc.o (.text*)*/
+ } >XCODE =0
+ . = ALIGN(4);
+
+ _xtext = . + SIZEOF(.xtext);
+ PROVIDE (xtext = .);
+
+ .xdata : AT (_xtext)
+ {
+ *(.xdata .xdata.*)
+ /**lfunc.o (.data*)*/
+ } >XDATA
+ . = ALIGN(4);
+
+ .xbss :
+ {
+ *(.xbss .xbss.*)
+ /**lfunc.o (.bss COMMON)*/
+ . = ALIGN(4);
+ } >XDATA
+ . = ALIGN(4);
+
+ .text :
+ {
+ KEEP(*(.vectrom))
+ KEEP(*(.init))
+ *(.text .text.*)
+ *(.gnu.linkonce.t.*)
+ *(.glue_7t .glue_7)
+ KEEP(*(.fini))
+ *(.gcc_except_table)
+ } >CODE =0
+ . = ALIGN(4);
+
+ /* .ctors .dtors are used for c++ constructors/destructors */
+
+ .ctors :
+ {
+ PROVIDE(__ctors_start__ = .);
+ KEEP(*(SORT(.ctors.*)))
+ KEEP(*(.ctors))
+ PROVIDE(__ctors_end__ = .);
+ } >CODE
+
+ .dtors :
+ {
+ PROVIDE(__dtors_start__ = .);
+ KEEP(*(SORT(.dtors.*)))
+ KEEP(*(.dtors))
+ PROVIDE(__dtors_end__ = .);
+ } >CODE
+
+ /* .rodata section which is used for read-only data (constants) */
+
+ .rodata :
+ {
+ *(.rodata .rodata.*)
+ *(.gnu.linkonce.r.*)
+ } >CODE
+ . = ALIGN(4);
+
+ _vectext = .;
+ PROVIDE (vtext = .);
+
+ .vect : AT (_vectext)
+ {
+ _vecstart = .;
+ KEEP(*(.vectram))
+ _vecend = .;
+ } >DATA
+
+ _etext = _vectext + SIZEOF(.vect);
+ PROVIDE (etext = .);
+
+ /* .data section which is used for initialized data */
+
+ .data : AT (_etext)
+ {
+ __data_start = .;
+ *(.data .data.*)
+ *(.gnu.linkonce.d.*)
+ SORT(CONSTRUCTORS)
+ . = ALIGN(4);
+ *(.fastrun .fastrun.*)
+ } >XDATA
+ . = ALIGN(4);
+
+ _edata = .;
+ PROVIDE (edata = .);
+
+ /* .bss section which is used for uninitialized data */
+
+ .bss :
+ {
+ __bss_start = .;
+ __bss_start__ = .;
+ *(.bss .bss.*)
+ *(.gnu.linkonce.b.*)
+ *(COMMON)
+ . = ALIGN(4);
+ } >XDATA
+ . = ALIGN(4);
+ __bss_end__ = .;
+
+ _end = .;
+ PROVIDE(end = .);
+
+ /* .heap section which is used for memory allocation */
+
+ .heap (NOLOAD) :
+ {
+ __heap_start__ = .;
+ *(.heap)
+ . = MAX(__heap_start__ + _HEAPSIZE , .);
+ } >DATA
+ __heap_end__ = __heap_start__ + SIZEOF(.heap);
+
+ /* .stack section - user mode stack */
+
+ .stack (__heap_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_start__ = .;
+ *(.stack)
+ . = MAX(__stack_start__ + _STACKSIZE , .);
+ } >DATA
+ __stack_end__ = __stack_start__ + SIZEOF(.stack);
+
+ /* .stack_irq section */
+
+ .stack_irq (__stack_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_irq_start__ = .;
+ *(.stack_irq)
+ . = MAX(__stack_irq_start__ + _STACKSIZE_IRQ , .);
+ } >DATA
+ __stack_irq_end__ = __stack_irq_start__ + SIZEOF(.stack_irq);
+
+ /* .stack_fiq section */
+
+ .stack_fiq (__stack_irq_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_fiq_start__ = .;
+ *(.stack_fiq)
+ . = MAX(__stack_fiq_start__ + _STACKSIZE_FIQ , .);
+ } >DATA
+ __stack_fiq_end__ = __stack_fiq_start__ + SIZEOF(.stack_fiq);
+
+ /* .stack_svc section */
+
+ .stack_svc (__stack_fiq_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_svc_start__ = .;
+ *(.stack_svc)
+ . = MAX(__stack_svc_start__ + _STACKSIZE_SVC , .);
+ } >DATA
+ __stack_svc_end__ = __stack_svc_start__ + SIZEOF(.stack_svc);
+
+ /* .stack_abt section */
+
+ .stack_abt (__stack_svc_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_abt_start__ = .;
+ *(.stack_abt)
+ . = MAX(__stack_abt_start__ + _STACKSIZE_ABT , .);
+ } >DATA
+ __stack_abt_end__ = __stack_abt_start__ + SIZEOF(.stack_abt);
+
+ /* .stack_und section */
+
+ .stack_und (__stack_abt_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_und_start__ = .;
+ *(.stack_und)
+ . = MAX(__stack_und_start__ + _STACKSIZE_UND , .);
+ } >DATA
+ __stack_und_end__ = __stack_und_start__ + SIZEOF(.stack_und);
+
+ /* Stabs debugging sections. */
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+ .stab.excl 0 : { *(.stab.excl) }
+ .stab.exclstr 0 : { *(.stab.exclstr) }
+ .stab.index 0 : { *(.stab.index) }
+ .stab.indexstr 0 : { *(.stab.indexstr) }
+ .comment 0 : { *(.comment) }
+ /* DWARF debug sections.
+ Symbols in the DWARF debugging sections are relative to the beginning
+ of the section so we begin them at 0. */
+ /* DWARF 1 */
+ .debug 0 : { *(.debug) }
+ .line 0 : { *(.line) }
+ /* GNU DWARF 1 extensions */
+ .debug_srcinfo 0 : { *(.debug_srcinfo) }
+ .debug_sfnames 0 : { *(.debug_sfnames) }
+ /* DWARF 1.1 and DWARF 2 */
+ .debug_aranges 0 : { *(.debug_aranges) }
+ .debug_pubnames 0 : { *(.debug_pubnames) }
+ /* DWARF 2 */
+ .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
+ .debug_abbrev 0 : { *(.debug_abbrev) }
+ .debug_line 0 : { *(.debug_line) }
+ .debug_frame 0 : { *(.debug_frame) }
+ .debug_str 0 : { *(.debug_str) }
+ .debug_loc 0 : { *(.debug_loc) }
+ .debug_macinfo 0 : { *(.debug_macinfo) }
+ /* SGI/MIPS DWARF 2 extensions */
+ .debug_weaknames 0 : { *(.debug_weaknames) }
+ .debug_funcnames 0 : { *(.debug_funcnames) }
+ .debug_typenames 0 : { *(.debug_typenames) }
+ .debug_varnames 0 : { *(.debug_varnames) }
+}
+
Added: trunk/firmware/arm/str/template71x/main.c
===================================================================
--- trunk/firmware/arm/str/template71x/main.c (rev 0)
+++ trunk/firmware/arm/str/template71x/main.c 2008-02-06 12:47:40 UTC (rev 827)
@@ -0,0 +1,29 @@
+/***********************************************************************************
+* Copyright 2005 Anglia Design
+* This demo code and associated components are provided as is and has no warranty,
+* implied or otherwise. You are free to use/modify any of the provided
+* code at your own risk in your applications with the expressed limitation
+* of liability (see below)
+*
+* LIMITATION OF LIABILITY: ANGLIA OR ANGLIA DESIGNS SHALL NOT BE LIABLE FOR ANY
+* LOSS OF PROFITS, LOSS OF USE, LOSS OF DATA, INTERRUPTION OF BUSINESS, NOR FOR
+* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND WHETHER UNDER
+* THIS AGREEMENT OR OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+*
+* Author : Spencer Oliver
+* Web : www.anglia-designs.com
+*
+***********************************************************************************/
+
+#include "71x_lib.h"
+
+int main (void)
+{
+ #ifdef DEBUG
+ libdebug();
+ #endif
+ int a=4;
+ int b=5;
+ int c;
+ c=a+b;
+}
Added: trunk/firmware/arm/str/template71x/startup.s
===================================================================
--- trunk/firmware/arm/str/template71x/startup.s (rev 0)
+++ trunk/firmware/arm/str/template71x/startup.s 2008-02-06 12:47:40 UTC (rev 827)
@@ -0,0 +1,338 @@
+/***********************************************************************************
+* Copyright 2005 Anglia Design
+* This demo code and associated components are provided as is and has no warranty,
+* implied or otherwise. You are free to use/modify any of the provided
+* code at your own risk in your applications with the expressed limitation
+* of liability (see below)
+*
+* LIMITATION OF LIABILITY: ANGLIA OR ANGLIA DESIGNS SHALL NOT BE LIABLE FOR ANY
+* LOSS OF PROFITS, LOSS OF USE, LOSS OF DATA, INTERRUPTION OF BUSINESS, NOR FOR
+* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND WHETHER UNDER
+* THIS AGREEMENT OR OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+*
+* Author : Spencer Oliver
+* Web : www.anglia-designs.com
+*
+***********************************************************************************/
+
+/**** Startup Code (executed after Reset) ****/
+
+/* Frequency values */
+/* set to suit target hardware */
+
+ .equ FOSC, 16000000
+ .equ FRTC, 32768
+
+/* Standard ...
[truncated message content] |
|
From: <ak...@us...> - 2008-02-06 13:07:09
|
Revision: 829
http://can.svn.sourceforge.net/can/?rev=829&view=rev
Author: akhe
Date: 2008-02-06 05:07:08 -0800 (Wed, 06 Feb 2008)
Log Message:
-----------
Added templates for all STR7 uP's
Added Paths:
-----------
trunk/firmware/arm/str/template72x/
trunk/firmware/arm/str/template72x/Makefile
trunk/firmware/arm/str/template72x/STR72x-RAM.ld
trunk/firmware/arm/str/template72x/STR72x-ROM.ld
trunk/firmware/arm/str/template72x/main.c
trunk/firmware/arm/str/template72x/startup.s
trunk/firmware/arm/str/template72x/vector.s
trunk/firmware/arm/str/template72x/vectors.c
trunk/firmware/arm/str/template72x/vectors.h
Added: trunk/firmware/arm/str/template72x/Makefile
===================================================================
--- trunk/firmware/arm/str/template72x/Makefile (rev 0)
+++ trunk/firmware/arm/str/template72x/Makefile 2008-02-06 13:07:08 UTC (rev 829)
@@ -0,0 +1,495 @@
+# Hey Emacs, this is a -*- makefile -*-
+#
+# WinARM template makefile
+# by Giacomo Fazio and Antonio Nasca, Catania, Italy
+# <gia...@gm...>
+# <ant...@ho...>
+#
+# based on the WinARM template makefile written by Martin Thomas
+# Released to the Public Domain
+# Please read the make user manual!
+#
+#
+# On command line:
+#
+# make all = Make software.
+#
+# make clean = Clean out built project files.
+#
+# make program = Download the hex file to the device
+#
+# (TODO: make filename.s = Just compile filename.c into the assembler code only)
+#
+# To rebuild project do "make clean" then "make all".
+# Toolchain prefix (i.e arm-elf -> arm-elf-gcc.exe)
+TCHAIN = arm-elf
+#TCHAIN = arm-none-eabi
+
+#USE_THUMB_MODE = YES
+USE_THUMB_MODE = NO
+
+# MCU name and submodel
+MCU = arm7tdmi
+SUBMDL = STR72x
+
+## Create ROM-Image
+#RUN_MODE=ROM_RUN
+## Create RAM-Image
+RUN_MODE=RAM_RUN
+
+## not supported in this example:
+## Exception-Vector placement only supported for "ROM_RUN"
+## (placement settings ignored when using "RAM_RUN")
+## - Exception vectors in ROM:
+#VECTOR_LOCATION=VECTORS_IN_ROM
+## - Exception vectors in RAM:
+#VECTOR_LOCATION=VECTORS_IN_RAM
+
+
+# Target file name (without extension).
+TARGET = main
+
+# List C source files here. (C dependencies are automatically generated.)
+# use file-extension c for "c-only"-files
+SRC = src/$(TARGET).c
+
+# List C source files here which must be compiled in ARM-Mode.
+# use file-extension c for "c-only"-files
+SRCARM = src/vectors.c
+# thumb is possible too for vectors.c - keep ARM, TODO: profile
+
+# List C++ source files here.
+# use file-extension cpp for C++-files (use extension .cpp)
+CPPSRC =
+
+# List C++ source files here which must be compiled in ARM-Mode.
+# use file-extension cpp for C++-files (use extension .cpp)
+#CPPSRCARM = $(TARGET).cpp
+CPPSRCARM =
+
+# List Assembler source files here.
+# Make them always end in a capital .S. Files ending in a lowercase .s
+# will not be considered source files but generated files (assembler
+# output from the compiler), and will be deleted upon "make clean"!
+# Even though the DOS/Win* filesystem matches both .s and .S the same,
+# it will preserve the spelling of the filenames, and gcc itself does
+# care about how the name is spelled on its command-line.
+ASRC =
+
+# List Assembler source files here which must be assembled in ARM-Mode..
+ASRCARM = src/vector.S src/startup.S
+
+# Path to Linker-Scripts
+LINKERSCRIPTPATH = .
+
+## Output format. (can be ihex or binary or both)
+## (binary i.e. for openocd and SAM-BA, hex i.e. for lpc21isp and uVision)
+#FORMAT = ihex
+#FORMAT = binary
+FORMAT = both
+
+# Optimization level, can be [0, 1, 2, 3, s].
+# 0 = turn off optimization. s = optimize for size.
+# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
+#OPT = s
+OPT = 0
+
+## Using the Atmel AT91_lib produces warning with
+## the default warning-levels.
+## yes - disable these warnings; no - keep default settings
+#AT91LIBNOWARN = yes
+AT91LIBNOWARN = no
+
+# Debugging format.
+# Native formats for AVR-GCC's -g are stabs [default], or dwarf-2.
+# AVR (extended) COFF requires stabs, plus an avr-objcopy run.
+#DEBUG = stabs
+DEBUG = dwarf-2
+
+# List any extra directories to look for include files here.
+# Each directory must be seperated by a space.
+EXTRAINCDIRS = ./include ./str72x_lib/include
+
+# List any extra directories to look for library files here.
+# Each directory must be seperated by a space.
+#EXTRA_LIBDIRS = ../arm7_efsl_0_2_4
+EXTRA_LIBDIRS = ./str72x_lib
+
+
+# Compiler flag to set the C Standard level.
+# c89 - "ANSI" C
+# gnu89 - c89 plus GCC extensions
+# c99 - ISO C99 standard (not yet fully implemented)
+# gnu99 - c99 plus GCC extensions
+CSTANDARD = -std=gnu99
+
+# Place -D or -U options for C here
+CDEFS = -D$(RUN_MODE)
+
+# Place -I options here
+CINCS =
+
+# Place -D or -U options for ASM here
+ADEFS = -D$(RUN_MODE)
+
+ifdef VECTOR_LOCATION
+CDEFS += -D$(VECTOR_LOCATION)
+ADEFS += -D$(VECTOR_LOCATION)
+endif
+
+CDEFS += -D__WinARM__ -D__WINARMSUBMDL_$(SUBMDL)__
+ADEFS += -D__WinARM__ -D__WINARMSUBMDL_$(SUBMDL)__
+
+# Compiler flags.
+
+ifeq ($(USE_THUMB_MODE),YES)
+THUMB = -mthumb
+THUMB_IW = -mthumb-interwork
+else
+THUMB =
+THUMB_IW =
+endif
+
+# -g*: generate debugging information
+# -O*: optimization level
+# -f...: tuning, see GCC manual and avr-libc documentation
+# -Wall...: warning level
+# -Wa,...: tell GCC to pass this to the assembler.
+# -adhlns...: create assembler listing
+#
+# Flags for C and C++ (arm-elf-gcc/arm-elf-g++)
+CFLAGS = -g$(DEBUG)
+CFLAGS += $(CDEFS) $(CINCS)
+CFLAGS += -O$(OPT)
+CFLAGS += -Wall -Wcast-align -Wimplicit
+CFLAGS += -Wpointer-arith -Wswitch
+CFLAGS += -ffunction-sections -fdata-sections
+CFLAGS += -Wredundant-decls -Wreturn-type -Wshadow -Wunused
+CFLAGS += -Wa,-adhlns=$(subst $(suffix $<),.lst,$<)
+CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
+
+# flags only for C
+CONLYFLAGS += -Wnested-externs
+CONLYFLAGS += $(CSTANDARD)
+
+ifneq ($(AT91LIBNOWARN),yes)
+#AT91-lib warnings with:
+CFLAGS += -Wcast-qual
+CONLYFLAGS += -Wmissing-prototypes
+CONLYFLAGS += -Wstrict-prototypes
+CONLYFLAGS += -Wmissing-declarations
+endif
+
+# flags only for C++ (arm-elf-g++)
+# CPPFLAGS = -fno-rtti -fno-exceptions
+CPPFLAGS =
+
+# Assembler flags.
+# -Wa,...: tell GCC to pass this to the assembler.
+# -ahlns: create listing
+# -g$(DEBUG): have the assembler create line number information
+ASFLAGS = $(ADEFS) -Wa,-adhlns=$(<:.S=.lst),-g$(DEBUG)
+
+
+#Additional libraries.
+
+# Extra libraries
+# Each library-name must be seperated by a space.
+# To add libxyz.a, libabc.a and libefsl.a:
+# EXTRA_LIBS = xyz abc efsl
+#EXTRA_LIBS = efsl
+EXTRA_LIBS = STR72x_lib
+
+#Support for newlibc-lpc (file: libnewlibc-lpc.a)
+#NEWLIBLPC = -lnewlib-lpc
+
+MATH_LIB = -lm
+
+# CPLUSPLUS_LIB = -lstdc++
+
+
+# Linker flags.
+# -Wl,...: tell GCC to pass this to linker.
+# -Map: create map file
+# --cref: add cross reference to map file
+LDFLAGS = -nostartfiles -Wl,-Map=$(TARGET).map,--cref,--gc-sections
+LDFLAGS += -lc
+LDFLAGS += $(NEWLIBLPC) $(MATH_LIB)
+LDFLAGS += -lc -lgcc
+LDFLAGS += $(CPLUSPLUS_LIB)
+LDFLAGS += $(patsubst %,-L%,$(EXTRA_LIBDIRS))
+LDFLAGS += $(patsubst %,-l%,$(EXTRA_LIBS))
+
+# Set Linker-Script Depending On Selected Memory and Controller
+ifeq ($(RUN_MODE),RAM_RUN)
+LDFLAGS +=-T$(LINKERSCRIPTPATH)/$(SUBMDL)-RAM.ld
+else
+LDFLAGS +=-T$(LINKERSCRIPTPATH)/$(SUBMDL)-ROM.ld
+endif
+
+
+# Define directories, if needed.
+## DIRARM = c:/WinARM/
+## DIRARMBIN = $(DIRAVR)/bin/
+## DIRAVRUTILS = $(DIRAVR)/utils/bin/
+
+# Define programs and commands.
+SHELL = sh
+CC = $(TCHAIN)-gcc
+CPP = $(TCHAIN)-g++
+AR = $(TCHAIN)-ar
+OBJCOPY = $(TCHAIN)-objcopy
+OBJDUMP = $(TCHAIN)-objdump
+SIZE = $(TCHAIN)-size
+NM = $(TCHAIN)-nm
+REMOVE = rm -f
+REMOVEDIR = rm -f -r
+COPY = cp
+
+# Define Messages
+# English
+MSG_ERRORS_NONE = Errors: none
+MSG_BEGIN = "-------- begin (mode: $(RUN_MODE)) --------"
+MSG_END = -------- end --------
+MSG_SIZE_BEFORE = Size before:
+MSG_SIZE_AFTER = Size after:
+MSG_FLASH = Creating load file for Flash:
+MSG_EXTENDED_LISTING = Creating Extended Listing:
+MSG_SYMBOL_TABLE = Creating Symbol Table:
+MSG_LINKING = Linking:
+MSG_COMPILING = Compiling C:
+MSG_COMPILING_ARM = "Compiling C (ARM-only):"
+MSG_COMPILINGCPP = Compiling C++:
+MSG_COMPILINGCPP_ARM = "Compiling C++ (ARM-only):"
+MSG_ASSEMBLING = Assembling:
+MSG_ASSEMBLING_ARM = "Assembling (ARM-only):"
+MSG_CLEANING = Cleaning project:
+MSG_FORMATERROR = Can not handle output-format
+MSG_LPC21_RESETREMINDER = You may have to bring the target in bootloader-mode now.
+
+# Define all object files.
+COBJ = $(SRC:.c=.o)
+AOBJ = $(ASRC:.S=.o)
+COBJARM = $(SRCARM:.c=.o)
+AOBJARM = $(ASRCARM:.S=.o)
+CPPOBJ = $(CPPSRC:.cpp=.o)
+CPPOBJARM = $(CPPSRCARM:.cpp=.o)
+
+# Define all listing files.
+LST = $(ASRC:.S=.lst) $(ASRCARM:.S=.lst) $(SRC:.c=.lst) $(SRCARM:.c=.lst)
+LST += $(CPPSRC:.cpp=.lst) $(CPPSRCARM:.cpp=.lst)
+
+# Compiler flags to generate dependency files.
+### GENDEPFLAGS = -Wp,-M,-MP,-MT,$(*F).o,-MF,.dep/$(@F).d
+GENDEPFLAGS = -MD -MP -MF .dep/$(@F).d
+
+# Combine all necessary flags and optional flags.
+# Add target processor to flags.
+ALL_CFLAGS = -mcpu=$(MCU) $(THUMB_IW) -I. $(CFLAGS) $(GENDEPFLAGS)
+ALL_ASFLAGS = -mcpu=$(MCU) $(THUMB_IW) -I. -x assembler-with-cpp $(ASFLAGS)
+
+
+# Default target.
+all: begin gccversion sizebefore build sizeafter finished end
+
+ifeq ($(FORMAT),ihex)
+build: elf hex lss sym
+hex: $(TARGET).hex
+IMGEXT=hex
+else
+ifeq ($(FORMAT),binary)
+build: elf bin lss sym
+bin: $(TARGET).bin
+IMGEXT=bin
+else
+ifeq ($(FORMAT),both)
+build: elf hex bin lss sym
+hex: $(TARGET).hex
+bin: $(TARGET).bin
+else
+$(error "$(MSG_FORMATERROR) $(FORMAT)")
+endif
+endif
+endif
+
+elf: $(TARGET).elf
+lss: $(TARGET).lss
+sym: $(TARGET).sym
+
+# Eye candy.
+begin:
+ @echo
+ @echo $(MSG_BEGIN)
+
+finished:
+ @echo $(MSG_ERRORS_NONE)
+
+end:
+ @echo $(MSG_END)
+ @echo
+
+
+# Display size of file.
+HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
+ELFSIZE = $(SIZE) -A $(TARGET).elf
+sizebefore:
+ @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); echo; fi
+
+sizeafter:
+ @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi
+
+
+# Display compiler version information.
+gccversion :
+ @$(CC) --version
+
+# FLASH Programming with OPENOCD
+
+# specify the directory where openocd executable resides (openocd-ftd2xx.exe or openocd-pp.exe)
+# Note: you may have to adjust this if a newer version of YAGARTO has been downloaded
+OPENOCD_DIR = 'c:\Programmi\openocd\bin\'
+
+# specify OpenOCD executable (pp is for the wiggler, ftd2xx is for the USB debugger)
+OPENOCD = $(OPENOCD_DIR)openocd-pp.exe
+#OPENOCD = $(OPENOCD_DIR)openocd-ftd2xx.exe
+
+# specify OpenOCD configuration file (pick the one for your device)
+#OPENOCD_CFG = C:\openocd-configs\str72x-configs\str72x_signalyzer-flash-program.cfg
+#OPENOCD_CFG = C:\openocd-configs\str72x-configs\str72x_jtagkey-flash-program.cfg
+#OPENOCD_CFG = C:\openocd-configs\str72x-configs\str72x_armusbocd-flash-program.cfg
+OPENOCD_CFG = C:\openocd-configs\str72x-configs\str72x_pp-flash-program.cfg
+
+program:
+ @echo
+ @echo "Flash Programming with OpenOCD..."
+ $(OPENOCD) -f $(OPENOCD_CFG)
+ @echo
+ @echo
+ @echo "Flash Programming Finished."
+
+
+# Create final output file (.hex) from ELF output file.
+%.hex: %.elf
+ @echo
+ @echo $(MSG_FLASH) $@
+ $(OBJCOPY) -O ihex $< $@
+
+# Create final output file (.bin) from ELF output file.
+%.bin: %.elf
+ @echo
+ @echo $(MSG_FLASH) $@
+ $(OBJCOPY) -O binary $< $@
+
+
+# Create extended listing file from ELF output file.
+# testing: option -C
+%.lss: %.elf
+ @echo
+ @echo $(MSG_EXTENDED_LISTING) $@
+ $(OBJDUMP) -h -S -C $< > $@
+
+
+# Create a symbol table from ELF output file.
+%.sym: %.elf
+ @echo
+ @echo $(MSG_SYMBOL_TABLE) $@
+ $(NM) -n $< > $@
+
+
+# Link: create ELF output file from object files.
+.SECONDARY : $(TARGET).elf
+.PRECIOUS : $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM)
+%.elf: $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM)
+ @echo
+ @echo $(MSG_LINKING) $@
+ $(CC) $(THUMB) $(ALL_CFLAGS) $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM) --output $@ $(LDFLAGS)
+# $(CPP) $(THUMB) $(ALL_CFLAGS) $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM) --output $@ $(LDFLAGS)
+
+# Compile: create object files from C source files. ARM/Thumb
+$(COBJ) : %.o : %.c
+ @echo
+ @echo $(MSG_COMPILING) $<
+ $(CC) -c $(THUMB) $(ALL_CFLAGS) $(CONLYFLAGS) $< -o $@
+
+# Compile: create object files from C source files. ARM-only
+$(COBJARM) : %.o : %.c
+ @echo
+ @echo $(MSG_COMPILING_ARM) $<
+ $(CC) -c $(ALL_CFLAGS) $(CONLYFLAGS) $< -o $@
+
+# Compile: create object files from C++ source files. ARM/Thumb
+$(CPPOBJ) : %.o : %.cpp
+ @echo
+ @echo $(MSG_COMPILINGCPP) $<
+ $(CPP) -c $(THUMB) $(ALL_CFLAGS) $(CPPFLAGS) $< -o $@
+
+# Compile: create object files from C++ source files. ARM-only
+$(CPPOBJARM) : %.o : %.cpp
+ @echo
+ @echo $(MSG_COMPILINGCPP_ARM) $<
+ $(CPP) -c $(ALL_CFLAGS) $(CPPFLAGS) $< -o $@
+
+
+# Compile: create assembler files from C source files. ARM/Thumb
+## does not work - TODO - hints welcome
+##$(COBJ) : %.s : %.c
+## $(CC) $(THUMB) -S $(ALL_CFLAGS) $< -o $@
+
+
+# Assemble: create object files from assembler source files. ARM/Thumb
+$(AOBJ) : %.o : %.S
+ @echo
+ @echo $(MSG_ASSEMBLING) $<
+ $(CC) -c $(THUMB) $(ALL_ASFLAGS) $< -o $@
+
+
+# Assemble: create object files from assembler source files. ARM-only
+$(AOBJARM) : %.o : %.S
+ @echo
+ @echo $(MSG_ASSEMBLING_ARM) $<
+ $(CC) -c $(ALL_ASFLAGS) $< -o $@
+
+
+# Target: clean project.
+clean: begin clean_list finished end
+
+
+clean_list :
+ @echo
+ @echo $(MSG_CLEANING)
+ $(REMOVE) $(TARGET).hex
+ $(REMOVE) $(TARGET).bin
+ $(REMOVE) $(TARGET).obj
+ $(REMOVE) $(TARGET).elf
+ $(REMOVE) $(TARGET).map
+ $(REMOVE) $(TARGET).obj
+ $(REMOVE) $(TARGET).a90
+ $(REMOVE) $(TARGET).sym
+ $(REMOVE) $(TARGET).lnk
+ $(REMOVE) $(TARGET).lss
+ $(REMOVE) $(COBJ)
+ $(REMOVE) $(CPPOBJ)
+ $(REMOVE) $(AOBJ)
+ $(REMOVE) $(COBJARM)
+ $(REMOVE) $(CPPOBJARM)
+ $(REMOVE) $(AOBJARM)
+ $(REMOVE) $(LST)
+ $(REMOVE) $(SRC:.c=.s)
+ $(REMOVE) $(SRC:.c=.d)
+ $(REMOVE) $(SRCARM:.c=.s)
+ $(REMOVE) $(SRCARM:.c=.d)
+ $(REMOVE) $(CPPSRC:.cpp=.s)
+ $(REMOVE) $(CPPSRC:.cpp=.d)
+ $(REMOVE) $(CPPSRCARM:.cpp=.s)
+ $(REMOVE) $(CPPSRCARM:.cpp=.d)
+ $(REMOVEDIR) .dep | exit 0
+
+
+# Include the dependency files.
+-include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)
+
+
+# Listing of phony targets.
+.PHONY : all begin finish end sizebefore sizeafter gccversion \
+build elf hex bin lss sym clean clean_list program
+
Added: trunk/firmware/arm/str/template72x/STR72x-RAM.ld
===================================================================
--- trunk/firmware/arm/str/template72x/STR72x-RAM.ld (rev 0)
+++ trunk/firmware/arm/str/template72x/STR72x-RAM.ld 2008-02-06 13:07:08 UTC (rev 829)
@@ -0,0 +1,219 @@
+/***********************************************************************************
+* Copyright 2005 Anglia Design
+* This demo code and associated components are provided as is and has no warranty,
+* implied or otherwise. You are free to use/modify any of the provided
+* code at your own risk in your applications with the expressed limitation
+* of liability (see below)
+*
+* LIMITATION OF LIABILITY: ANGLIA OR ANGLIA DESIGNS SHALL NOT BE LIABLE FOR ANY
+* LOSS OF PROFITS, LOSS OF USE, LOSS OF DATA, INTERRUPTION OF BUSINESS, NOR FOR
+* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND WHETHER UNDER
+* THIS AGREEMENT OR OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+*
+* Author : Spencer Oliver
+* Web : www.anglia-designs.com
+*
+***********************************************************************************/
+
+/* Memory Definitions */
+
+MEMORY
+{
+ DATA (rw) : ORIGIN = 0x60000000, LENGTH = 0x00004000
+ SDRAM (rw) : ORIGIN = 0xA0000000, LENGTH = 0x00100000
+}
+
+/* Section Definitions */
+
+SECTIONS
+{
+ /* first section is .text which is used for code */
+
+ .text :
+ {
+ KEEP(*(.vectrom))
+ KEEP(*(.init))
+ *(.text .text.*)
+ *(.gnu.linkonce.t.*)
+ *(.glue_7t .glue_7)
+ KEEP(*(.fini))
+ *(.gcc_except_table)
+ } >SDRAM =0
+ . = ALIGN(4);
+
+ /* .ctors .dtors are used for c++ constructors/destructors */
+
+ .ctors :
+ {
+ PROVIDE(__ctors_start__ = .);
+ KEEP(*(SORT(.ctors.*)))
+ KEEP(*(.ctors))
+ PROVIDE(__ctors_end__ = .);
+ } >SDRAM
+
+ .dtors :
+ {
+ PROVIDE(__dtors_start__ = .);
+ KEEP(*(SORT(.dtors.*)))
+ KEEP(*(.dtors))
+ PROVIDE(__dtors_end__ = .);
+ } >SDRAM
+
+ /* .rodata section which is used for read-only data (constants) */
+
+ .rodata :
+ {
+ *(.rodata .rodata.*)
+ *(.gnu.linkonce.r.*)
+ } >SDRAM
+ . = ALIGN(4);
+
+ _vectext = .;
+ PROVIDE (vectext = .);
+
+ .vect : AT (_vectext)
+ {
+ _vecstart = .;
+ KEEP(*(.vectram))
+ _vecend = .;
+ } >DATA
+
+ _etext = _vectext + SIZEOF(.vect);
+ PROVIDE (etext = .);
+
+ /* .data section which is used for initialized data */
+
+ .data : AT (_etext)
+ {
+ *(.data .data.*)
+ *(.gnu.linkonce.d.*)
+ SORT(CONSTRUCTORS)
+ } >DATA
+ . = ALIGN(4);
+
+ __data_start = .;
+ _edata = .;
+ PROVIDE (edata = .);
+
+ /* .bss section which is used for uninitialized data */
+
+ .bss :
+ {
+ __bss_start = .;
+ __bss_start__ = .;
+ *(.bss .bss.*)
+ *(.gnu.linkonce.b.*)
+ *(COMMON)
+ . = ALIGN(4);
+ } >DATA
+ . = ALIGN(4);
+ __bss_end__ = .;
+
+ _end = .;
+ PROVIDE(end = .);
+
+ /* .heap section (2048 bytes) which is used for memory allocation */
+
+ .heap (NOLOAD) :
+ {
+ __heap_start__ = .;
+ *(.heap)
+ . = MAX(__heap_start__ + 2048, .);
+ } >DATA
+ __heap_end__ = __heap_start__ + SIZEOF(.heap);
+
+ /* .stack section (2048 bytes) - user mode stack */
+
+ .stack (__heap_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_start__ = .;
+ *(.stack)
+ . = MAX(__stack_start__ + 2048, .);
+ } >DATA
+ __stack_end__ = __stack_start__ + SIZEOF(.stack);
+
+ /* .stack_irq section (1024 bytes) */
+
+ .stack_irq (__stack_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_irq_start__ = .;
+ *(.stack_irq)
+ . = MAX(__stack_irq_start__ + 1024, .);
+ } >DATA
+ __stack_irq_end__ = __stack_irq_start__ + SIZEOF(.stack_irq);
+
+ /* .stack_fiq section (256 bytes) */
+
+ .stack_fiq (__stack_irq_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_fiq_start__ = .;
+ *(.stack_fiq)
+ . = MAX(__stack_fiq_start__ + 256, .);
+ } >DATA
+ __stack_fiq_end__ = __stack_fiq_start__ + SIZEOF(.stack_fiq);
+
+ /* .stack_svc section (256 bytes) */
+
+ .stack_svc (__stack_fiq_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_svc_start__ = .;
+ *(.stack_svc)
+ . = MAX(__stack_svc_start__ + 256, .);
+ } >DATA
+ __stack_svc_end__ = __stack_svc_start__ + SIZEOF(.stack_svc);
+
+ /* .stack_abt section (256 bytes) */
+
+ .stack_abt (__stack_svc_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_abt_start__ = .;
+ *(.stack_abt)
+ . = MAX(__stack_abt_start__ + 256, .);
+ } >DATA
+ __stack_abt_end__ = __stack_abt_start__ + SIZEOF(.stack_abt);
+
+ /* .stack_und section (256 bytes) */
+
+ .stack_und (__stack_abt_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_und_start__ = .;
+ *(.stack_und)
+ . = MAX(__stack_und_start__ + 256, .);
+ } >DATA
+ __stack_und_end__ = __stack_und_start__ + SIZEOF(.stack_und);
+
+ /* Stabs debugging sections. */
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+ .stab.excl 0 : { *(.stab.excl) }
+ .stab.exclstr 0 : { *(.stab.exclstr) }
+ .stab.index 0 : { *(.stab.index) }
+ .stab.indexstr 0 : { *(.stab.indexstr) }
+ .comment 0 : { *(.comment) }
+ /* DWARF debug sections.
+ Symbols in the DWARF debugging sections are relative to the beginning
+ of the section so we begin them at 0. */
+ /* DWARF 1 */
+ .debug 0 : { *(.debug) }
+ .line 0 : { *(.line) }
+ /* GNU DWARF 1 extensions */
+ .debug_srcinfo 0 : { *(.debug_srcinfo) }
+ .debug_sfnames 0 : { *(.debug_sfnames) }
+ /* DWARF 1.1 and DWARF 2 */
+ .debug_aranges 0 : { *(.debug_aranges) }
+ .debug_pubnames 0 : { *(.debug_pubnames) }
+ /* DWARF 2 */
+ .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
+ .debug_abbrev 0 : { *(.debug_abbrev) }
+ .debug_line 0 : { *(.debug_line) }
+ .debug_frame 0 : { *(.debug_frame) }
+ .debug_str 0 : { *(.debug_str) }
+ .debug_loc 0 : { *(.debug_loc) }
+ .debug_macinfo 0 : { *(.debug_macinfo) }
+ /* SGI/MIPS DWARF 2 extensions */
+ .debug_weaknames 0 : { *(.debug_weaknames) }
+ .debug_funcnames 0 : { *(.debug_funcnames) }
+ .debug_typenames 0 : { *(.debug_typenames) }
+ .debug_varnames 0 : { *(.debug_varnames) }
+}
+
Added: trunk/firmware/arm/str/template72x/STR72x-ROM.ld
===================================================================
--- trunk/firmware/arm/str/template72x/STR72x-ROM.ld (rev 0)
+++ trunk/firmware/arm/str/template72x/STR72x-ROM.ld 2008-02-06 13:07:08 UTC (rev 829)
@@ -0,0 +1,221 @@
+/***********************************************************************************
+* Copyright 2005 Anglia Design
+* This demo code and associated components are provided as is and has no warranty,
+* implied or otherwise. You are free to use/modify any of the provided
+* code at your own risk in your applications with the expressed limitation
+* of liability (see below)
+*
+* LIMITATION OF LIABILITY: ANGLIA OR ANGLIA DESIGNS SHALL NOT BE LIABLE FOR ANY
+* LOSS OF PROFITS, LOSS OF USE, LOSS OF DATA, INTERRUPTION OF BUSINESS, NOR FOR
+* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND WHETHER UNDER
+* THIS AGREEMENT OR OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+*
+* Author : Spencer Oliver
+* Web : www.anglia-designs.com
+*
+***********************************************************************************/
+
+/* Memory Definitions */
+
+MEMORY
+{
+ BOOT (rx) : ORIGIN = 0x20000000, LENGTH = 0x00001000
+ CODE (rx) : ORIGIN = 0x40000000, LENGTH = 0x00400000
+ DATA (rw) : ORIGIN = 0x60000000, LENGTH = 0x00004000
+ SDRAM (rw) : ORIGIN = 0xA0000000, LENGTH = 0x00100000
+}
+
+/* Section Definitions */
+
+SECTIONS
+{
+ /* first section is .text which is used for code */
+
+ .text :
+ {
+ KEEP(*(.vectrom))
+ KEEP(*(.init))
+ *(.text .text.*)
+ *(.gnu.linkonce.t.*)
+ *(.glue_7t .glue_7)
+ KEEP(*(.fini))
+ *(.gcc_except_table)
+ } >CODE =0
+ . = ALIGN(4);
+
+ /* .ctors .dtors are used for c++ constructors/destructors */
+
+ .ctors :
+ {
+ PROVIDE(__ctors_start__ = .);
+ KEEP(*(SORT(.ctors.*)))
+ KEEP(*(.ctors))
+ PROVIDE(__ctors_end__ = .);
+ } >CODE
+
+ .dtors :
+ {
+ PROVIDE(__dtors_start__ = .);
+ KEEP(*(SORT(.dtors.*)))
+ KEEP(*(.dtors))
+ PROVIDE(__dtors_end__ = .);
+ } >CODE
+
+ /* .rodata section which is used for read-only data (constants) */
+
+ .rodata :
+ {
+ *(.rodata .rodata.*)
+ *(.gnu.linkonce.r.*)
+ } >CODE
+ . = ALIGN(4);
+
+ _vectext = .;
+ PROVIDE (vectext = .);
+
+ .vect : AT (_vectext)
+ {
+ _vecstart = .;
+ KEEP(*(.vectram))
+ _vecend = .;
+ } >DATA
+
+ _etext = _vectext + SIZEOF(.vect);
+ PROVIDE (etext = .);
+
+ /* .data section which is used for initialized data */
+
+ .data : AT (_etext)
+ {
+ __data_start = .;
+ *(.data .data.*)
+ *(.gnu.linkonce.d.*)
+ SORT(CONSTRUCTORS)
+ } >DATA
+ . = ALIGN(4);
+
+ _edata = .;
+ PROVIDE (edata = .);
+
+ /* .bss section which is used for uninitialized data */
+
+ .bss :
+ {
+ __bss_start = .;
+ __bss_start__ = .;
+ *(.bss .bss.*)
+ *(.gnu.linkonce.b.*)
+ *(COMMON)
+ . = ALIGN(4);
+ } >DATA
+ . = ALIGN(4);
+ __bss_end__ = .;
+
+ _end = .;
+ PROVIDE(end = .);
+
+ /* .heap section (2048 bytes) which is used for memory allocation */
+
+ .heap (NOLOAD) :
+ {
+ __heap_start__ = .;
+ *(.heap)
+ . = MAX(__heap_start__ + 2048, .);
+ } >DATA
+ __heap_end__ = __heap_start__ + SIZEOF(.heap);
+
+ /* .stack section (2048 bytes) - user mode stack */
+
+ .stack (__heap_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_start__ = .;
+ *(.stack)
+ . = MAX(__stack_start__ + 2048, .);
+ } >DATA
+ __stack_end__ = __stack_start__ + SIZEOF(.stack);
+
+ /* .stack_irq section (1024 bytes) */
+
+ .stack_irq (__stack_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_irq_start__ = .;
+ *(.stack_irq)
+ . = MAX(__stack_irq_start__ + 1024, .);
+ } >DATA
+ __stack_irq_end__ = __stack_irq_start__ + SIZEOF(.stack_irq);
+
+ /* .stack_fiq section (256 bytes) */
+
+ .stack_fiq (__stack_irq_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_fiq_start__ = .;
+ *(.stack_fiq)
+ . = MAX(__stack_fiq_start__ + 256, .);
+ } >DATA
+ __stack_fiq_end__ = __stack_fiq_start__ + SIZEOF(.stack_fiq);
+
+ /* .stack_svc section (256 bytes) */
+
+ .stack_svc (__stack_fiq_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_svc_start__ = .;
+ *(.stack_svc)
+ . = MAX(__stack_svc_start__ + 256, .);
+ } >DATA
+ __stack_svc_end__ = __stack_svc_start__ + SIZEOF(.stack_svc);
+
+ /* .stack_abt section (32 bytes) */
+
+ .stack_abt (__stack_svc_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_abt_start__ = .;
+ *(.stack_abt)
+ . = MAX(__stack_abt_start__ + 32, .);
+ } >DATA
+ __stack_abt_end__ = __stack_abt_start__ + SIZEOF(.stack_abt);
+
+ /* .stack_und section (32 bytes) */
+
+ .stack_und (__stack_abt_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_und_start__ = .;
+ *(.stack_und)
+ . = MAX(__stack_und_start__ + 32, .);
+ } >DATA
+ __stack_und_end__ = __stack_und_start__ + SIZEOF(.stack_und);
+
+ /* Stabs debugging sections. */
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+ .stab.excl 0 : { *(.stab.excl) }
+ .stab.exclstr 0 : { *(.stab.exclstr) }
+ .stab.index 0 : { *(.stab.index) }
+ .stab.indexstr 0 : { *(.stab.indexstr) }
+ .comment 0 : { *(.comment) }
+ /* DWARF debug sections.
+ Symbols in the DWARF debugging sections are relative to the beginning
+ of the section so we begin them at 0. */
+ /* DWARF 1 */
+ .debug 0 : { *(.debug) }
+ .line 0 : { *(.line) }
+ /* GNU DWARF 1 extensions */
+ .debug_srcinfo 0 : { *(.debug_srcinfo) }
+ .debug_sfnames 0 : { *(.debug_sfnames) }
+ /* DWARF 1.1 and DWARF 2 */
+ .debug_aranges 0 : { *(.debug_aranges) }
+ .debug_pubnames 0 : { *(.debug_pubnames) }
+ /* DWARF 2 */
+ .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
+ .debug_abbrev 0 : { *(.debug_abbrev) }
+ .debug_line 0 : { *(.debug_line) }
+ .debug_frame 0 : { *(.debug_frame) }
+ .debug_str 0 : { *(.debug_str) }
+ .debug_loc 0 : { *(.debug_loc) }
+ .debug_macinfo 0 : { *(.debug_macinfo) }
+ /* SGI/MIPS DWARF 2 extensions */
+ .debug_weaknames 0 : { *(.debug_weaknames) }
+ .debug_funcnames 0 : { *(.debug_funcnames) }
+ .debug_typenames 0 : { *(.debug_typenames) }
+ .debug_varnames 0 : { *(.debug_varnames) }
+}
+
Added: trunk/firmware/arm/str/template72x/main.c
===================================================================
--- trunk/firmware/arm/str/template72x/main.c (rev 0)
+++ trunk/firmware/arm/str/template72x/main.c 2008-02-06 13:07:08 UTC (rev 829)
@@ -0,0 +1,43 @@
+/******************** (C) COPYRIGHT 2005 STMicroelectronics ********************
+* File Name : main.c
+* Author : MCD Application Team
+* Date First Issued : 09/27/2005 : V1.0
+* Description : Main program body
+**********************************************************************************
+* History:
+* 09/27/2005 : V1.0
+**********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH
+* CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT
+* OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT
+* OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION
+* CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*********************************************************************************/
+
+/* Standard include ------------------------------------------------------------*/
+#include "720_lib.h"
+
+/* Include of other module interface headers -----------------------------------*/
+/* Local includes --------------------------------------------------------------*/
+/* Private typedef -------------------------------------------------------------*/
+/* Private define --------------------------------------------------------------*/
+/* Private macro ---------------------------------------------------------------*/
+/* Private variables -----------------------------------------------------------*/
+
+
+/*---------------------------------main---------------------------------------*/
+
+void main()
+{
+ #ifdef LIBDEBUG
+ libdebug();
+ #endif
+ int a=4;
+ int b=5;
+ int c;
+ c=a+b;
+}
+
+
+/******************* (C) COPYRIGHT 2005 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/template72x/startup.s
===================================================================
--- trunk/firmware/arm/str/template72x/startup.s (rev 0)
+++ trunk/firmware/arm/str/template72x/startup.s 2008-02-06 13:07:08 UTC (rev 829)
@@ -0,0 +1,464 @@
+/***********************************************************************************
+* Copyright 2005 Anglia Design
+* This demo code and associated components are provided as is and has no warranty,
+* implied or otherwise. You are free to use/modify any of the provided
+* code at your own risk in your applications with the expressed limitation
+* of liability (see below)
+*
+* LIMITATION OF LIABILITY: ANGLIA OR ANGLIA DESIGNS SHALL NOT BE LIABLE FOR ANY
+* LOSS OF PROFITS, LOSS OF USE, LOSS OF DATA, INTERRUPTION OF BUSINESS, NOR FOR
+* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND WHETHER UNDER
+* THIS AGREEMENT OR OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+*
+* Author : Spencer Oliver
+* Web : www.anglia-designs.com
+*
+***********************************************************************************/
+
+/*********************************...
[truncated message content] |
|
From: <ak...@us...> - 2008-02-06 13:13:59
|
Revision: 830
http://can.svn.sourceforge.net/can/?rev=830&view=rev
Author: akhe
Date: 2008-02-06 05:13:57 -0800 (Wed, 06 Feb 2008)
Log Message:
-----------
Added uart str samples
Added Paths:
-----------
trunk/firmware/arm/str/uart750-1/
trunk/firmware/arm/str/uart750-1/Makefile
trunk/firmware/arm/str/uart750-1/Readme.txt
trunk/firmware/arm/str/uart750-1/STR75x-RAM.ld
trunk/firmware/arm/str/uart750-1/STR75x-ROM.ld
trunk/firmware/arm/str/uart750-1/main.c
trunk/firmware/arm/str/uart750-1/startup.s
trunk/firmware/arm/str/uart750-1/vector.s
trunk/firmware/arm/str/uart750-1/vectors.c
trunk/firmware/arm/str/uart750-1/vectors.h
trunk/firmware/arm/str/uart750-2/
trunk/firmware/arm/str/uart750-2/Makefile
trunk/firmware/arm/str/uart750-2/Readme.txt
trunk/firmware/arm/str/uart750-2/STR75x-RAM.ld
trunk/firmware/arm/str/uart750-2/STR75x-ROM.ld
trunk/firmware/arm/str/uart750-2/main.c
trunk/firmware/arm/str/uart750-2/startup.s
trunk/firmware/arm/str/uart750-2/vector.s
trunk/firmware/arm/str/uart750-2/vectors.c
trunk/firmware/arm/str/uart750-2/vectors.h
Added: trunk/firmware/arm/str/uart750-1/Makefile
===================================================================
--- trunk/firmware/arm/str/uart750-1/Makefile (rev 0)
+++ trunk/firmware/arm/str/uart750-1/Makefile 2008-02-06 13:13:57 UTC (rev 830)
@@ -0,0 +1,495 @@
+# Hey Emacs, this is a -*- makefile -*-
+#
+# WinARM template makefile
+# by Giacomo Fazio and Antonio Nasca, Catania, Italy
+# <gia...@gm...>
+# <ant...@ho...>
+#
+# based on the WinARM template makefile written by Martin Thomas
+# Released to the Public Domain
+# Please read the make user manual!
+#
+#
+# On command line:
+#
+# make all = Make software.
+#
+# make clean = Clean out built project files.
+#
+# make program = Download the hex file to the device
+#
+# (TODO: make filename.s = Just compile filename.c into the assembler code only)
+#
+# To rebuild project do "make clean" then "make all".
+# Toolchain prefix (i.e arm-elf -> arm-elf-gcc.exe)
+TCHAIN = arm-elf
+#TCHAIN = arm-none-eabi
+
+#USE_THUMB_MODE = YES
+USE_THUMB_MODE = NO
+
+# MCU name and submodel
+MCU = arm7tdmi
+SUBMDL = STR75x
+
+## Create ROM-Image
+#RUN_MODE=ROM_RUN
+## Create RAM-Image
+RUN_MODE=RAM_RUN
+
+## not supported in this example:
+## Exception-Vector placement only supported for "ROM_RUN"
+## (placement settings ignored when using "RAM_RUN")
+## - Exception vectors in ROM:
+#VECTOR_LOCATION=VECTORS_IN_ROM
+## - Exception vectors in RAM:
+#VECTOR_LOCATION=VECTORS_IN_RAM
+
+
+# Target file name (without extension).
+TARGET = main
+
+# List C source files here. (C dependencies are automatically generated.)
+# use file-extension c for "c-only"-files
+SRC = $(TARGET).c
+
+# List C source files here which must be compiled in ARM-Mode.
+# use file-extension c for "c-only"-files
+SRCARM = vectors.c
+# thumb is possible too for vectors.c - keep ARM, TODO: profile
+
+# List C++ source files here.
+# use file-extension cpp for C++-files (use extension .cpp)
+CPPSRC =
+
+# List C++ source files here which must be compiled in ARM-Mode.
+# use file-extension cpp for C++-files (use extension .cpp)
+#CPPSRCARM = $(TARGET).cpp
+CPPSRCARM =
+
+# List Assembler source files here.
+# Make them always end in a capital .S. Files ending in a lowercase .s
+# will not be considered source files but generated files (assembler
+# output from the compiler), and will be deleted upon "make clean"!
+# Even though the DOS/Win* filesystem matches both .s and .S the same,
+# it will preserve the spelling of the filenames, and gcc itself does
+# care about how the name is spelled on its command-line.
+ASRC =
+
+# List Assembler source files here which must be assembled in ARM-Mode..
+ASRCARM = vector.S startup.S
+
+# Path to Linker-Scripts
+LINKERSCRIPTPATH = .
+
+## Output format. (can be ihex or binary or both)
+## (binary i.e. for openocd and SAM-BA, hex i.e. for lpc21isp and uVision)
+#FORMAT = ihex
+#FORMAT = binary
+FORMAT = both
+
+# Optimization level, can be [0, 1, 2, 3, s].
+# 0 = turn off optimization. s = optimize for size.
+# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
+#OPT = s
+OPT = 0
+
+## Using the Atmel AT91_lib produces warning with
+## the default warning-levels.
+## yes - disable these warnings; no - keep default settings
+#AT91LIBNOWARN = yes
+AT91LIBNOWARN = no
+
+# Debugging format.
+# Native formats for AVR-GCC's -g are stabs [default], or dwarf-2.
+# AVR (extended) COFF requires stabs, plus an avr-objcopy run.
+#DEBUG = stabs
+DEBUG = dwarf-2
+
+# List any extra directories to look for include files here.
+# Each directory must be seperated by a space.
+EXTRAINCDIRS = K:/include ../common/str75x_lib/include
+
+# List any extra directories to look for library files here.
+# Each directory must be seperated by a space.
+#EXTRA_LIBDIRS = ../arm7_efsl_0_2_4
+EXTRA_LIBDIRS = K:/lib ../common/str75x_lib
+
+
+# Compiler flag to set the C Standard level.
+# c89 - "ANSI" C
+# gnu89 - c89 plus GCC extensions
+# c99 - ISO C99 standard (not yet fully implemented)
+# gnu99 - c99 plus GCC extensions
+CSTANDARD = -std=gnu99
+
+# Place -D or -U options for C here
+CDEFS = -D$(RUN_MODE)
+
+# Place -I options here
+CINCS =
+
+# Place -D or -U options for ASM here
+ADEFS = -D$(RUN_MODE)
+
+ifdef VECTOR_LOCATION
+CDEFS += -D$(VECTOR_LOCATION)
+ADEFS += -D$(VECTOR_LOCATION)
+endif
+
+CDEFS += -D__WinARM__ -D__WINARMSUBMDL_$(SUBMDL)__
+ADEFS += -D__WinARM__ -D__WINARMSUBMDL_$(SUBMDL)__
+
+# Compiler flags.
+
+ifeq ($(USE_THUMB_MODE),YES)
+THUMB = -mthumb
+THUMB_IW = -mthumb-interwork
+else
+THUMB =
+THUMB_IW =
+endif
+
+# -g*: generate debugging information
+# -O*: optimization level
+# -f...: tuning, see GCC manual and avr-libc documentation
+# -Wall...: warning level
+# -Wa,...: tell GCC to pass this to the assembler.
+# -adhlns...: create assembler listing
+#
+# Flags for C and C++ (arm-elf-gcc/arm-elf-g++)
+CFLAGS = -g$(DEBUG)
+CFLAGS += $(CDEFS) $(CINCS)
+CFLAGS += -O$(OPT)
+CFLAGS += -Wall -Wcast-align -Wimplicit
+CFLAGS += -Wpointer-arith -Wswitch
+CFLAGS += -ffunction-sections -fdata-sections
+CFLAGS += -Wredundant-decls -Wreturn-type -Wshadow -Wunused
+CFLAGS += -Wa,-adhlns=$(subst $(suffix $<),.lst,$<)
+CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
+
+# flags only for C
+CONLYFLAGS += -Wnested-externs
+CONLYFLAGS += $(CSTANDARD)
+
+ifneq ($(AT91LIBNOWARN),yes)
+#AT91-lib warnings with:
+CFLAGS += -Wcast-qual
+CONLYFLAGS += -Wmissing-prototypes
+CONLYFLAGS += -Wstrict-prototypes
+CONLYFLAGS += -Wmissing-declarations
+endif
+
+# flags only for C++ (arm-elf-g++)
+# CPPFLAGS = -fno-rtti -fno-exceptions
+CPPFLAGS =
+
+# Assembler flags.
+# -Wa,...: tell GCC to pass this to the assembler.
+# -ahlns: create listing
+# -g$(DEBUG): have the assembler create line number information
+ASFLAGS = $(ADEFS) -Wa,-adhlns=$(<:.S=.lst),-g$(DEBUG)
+
+
+#Additional libraries.
+
+# Extra libraries
+# Each library-name must be seperated by a space.
+# To add libxyz.a, libabc.a and libefsl.a:
+# EXTRA_LIBS = xyz abc efsl
+#EXTRA_LIBS = efsl
+EXTRA_LIBS = STR75x_lib
+
+#Support for newlibc-lpc (file: libnewlibc-lpc.a)
+#NEWLIBLPC = -lnewlib-lpc
+
+MATH_LIB = -lm
+
+# CPLUSPLUS_LIB = -lstdc++
+
+
+# Linker flags.
+# -Wl,...: tell GCC to pass this to linker.
+# -Map: create map file
+# --cref: add cross reference to map file
+LDFLAGS = -nostartfiles -Wl,-Map=$(TARGET).map,--cref,--gc-sections
+LDFLAGS += -lc
+LDFLAGS += $(NEWLIBLPC) $(MATH_LIB)
+LDFLAGS += -lc -lgcc
+LDFLAGS += $(CPLUSPLUS_LIB)
+LDFLAGS += $(patsubst %,-L%,$(EXTRA_LIBDIRS))
+LDFLAGS += $(patsubst %,-l%,$(EXTRA_LIBS))
+
+# Set Linker-Script Depending On Selected Memory and Controller
+ifeq ($(RUN_MODE),RAM_RUN)
+LDFLAGS +=-T$(LINKERSCRIPTPATH)/$(SUBMDL)-RAM.ld
+else
+LDFLAGS +=-T$(LINKERSCRIPTPATH)/$(SUBMDL)-ROM.ld
+endif
+
+
+# Define directories, if needed.
+## DIRARM = c:/WinARM/
+## DIRARMBIN = $(DIRAVR)/bin/
+## DIRAVRUTILS = $(DIRAVR)/utils/bin/
+
+# Define programs and commands.
+SHELL = sh
+CC = $(TCHAIN)-gcc
+CPP = $(TCHAIN)-g++
+AR = $(TCHAIN)-ar
+OBJCOPY = $(TCHAIN)-objcopy
+OBJDUMP = $(TCHAIN)-objdump
+SIZE = $(TCHAIN)-size
+NM = $(TCHAIN)-nm
+REMOVE = rm -f
+REMOVEDIR = rm -f -r
+COPY = cp
+
+# Define Messages
+# English
+MSG_ERRORS_NONE = Errors: none
+MSG_BEGIN = "-------- begin (mode: $(RUN_MODE)) --------"
+MSG_END = -------- end --------
+MSG_SIZE_BEFORE = Size before:
+MSG_SIZE_AFTER = Size after:
+MSG_FLASH = Creating load file for Flash:
+MSG_EXTENDED_LISTING = Creating Extended Listing:
+MSG_SYMBOL_TABLE = Creating Symbol Table:
+MSG_LINKING = Linking:
+MSG_COMPILING = Compiling C:
+MSG_COMPILING_ARM = "Compiling C (ARM-only):"
+MSG_COMPILINGCPP = Compiling C++:
+MSG_COMPILINGCPP_ARM = "Compiling C++ (ARM-only):"
+MSG_ASSEMBLING = Assembling:
+MSG_ASSEMBLING_ARM = "Assembling (ARM-only):"
+MSG_CLEANING = Cleaning project:
+MSG_FORMATERROR = Can not handle output-format
+MSG_LPC21_RESETREMINDER = You may have to bring the target in bootloader-mode now.
+
+# Define all object files.
+COBJ = $(SRC:.c=.o)
+AOBJ = $(ASRC:.S=.o)
+COBJARM = $(SRCARM:.c=.o)
+AOBJARM = $(ASRCARM:.S=.o)
+CPPOBJ = $(CPPSRC:.cpp=.o)
+CPPOBJARM = $(CPPSRCARM:.cpp=.o)
+
+# Define all listing files.
+LST = $(ASRC:.S=.lst) $(ASRCARM:.S=.lst) $(SRC:.c=.lst) $(SRCARM:.c=.lst)
+LST += $(CPPSRC:.cpp=.lst) $(CPPSRCARM:.cpp=.lst)
+
+# Compiler flags to generate dependency files.
+### GENDEPFLAGS = -Wp,-M,-MP,-MT,$(*F).o,-MF,.dep/$(@F).d
+GENDEPFLAGS = -MD -MP -MF .dep/$(@F).d
+
+# Combine all necessary flags and optional flags.
+# Add target processor to flags.
+ALL_CFLAGS = -mcpu=$(MCU) $(THUMB_IW) -I. $(CFLAGS) $(GENDEPFLAGS)
+ALL_ASFLAGS = -mcpu=$(MCU) $(THUMB_IW) -I. -x assembler-with-cpp $(ASFLAGS)
+
+
+# Default target.
+all: begin gccversion sizebefore build sizeafter finished end
+
+ifeq ($(FORMAT),ihex)
+build: elf hex lss sym
+hex: $(TARGET).hex
+IMGEXT=hex
+else
+ifeq ($(FORMAT),binary)
+build: elf bin lss sym
+bin: $(TARGET).bin
+IMGEXT=bin
+else
+ifeq ($(FORMAT),both)
+build: elf hex bin lss sym
+hex: $(TARGET).hex
+bin: $(TARGET).bin
+else
+$(error "$(MSG_FORMATERROR) $(FORMAT)")
+endif
+endif
+endif
+
+elf: $(TARGET).elf
+lss: $(TARGET).lss
+sym: $(TARGET).sym
+
+# Eye candy.
+begin:
+ @echo
+ @echo $(MSG_BEGIN)
+
+finished:
+ @echo $(MSG_ERRORS_NONE)
+
+end:
+ @echo $(MSG_END)
+ @echo
+
+
+# Display size of file.
+HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
+ELFSIZE = $(SIZE) -A $(TARGET).elf
+sizebefore:
+ @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); echo; fi
+
+sizeafter:
+ @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi
+
+
+# Display compiler version information.
+gccversion :
+ @$(CC) --version
+
+# FLASH Programming with OPENOCD
+
+# specify the directory where openocd executable resides (openocd-ftd2xx.exe or openocd-pp.exe)
+# Note: you may have to adjust this if a newer version of YAGARTO has been downloaded
+OPENOCD_DIR = 'c:\Programmi\openocd\bin\'
+
+# specify OpenOCD executable (pp is for the wiggler, ftd2xx is for the USB debugger)
+OPENOCD = $(OPENOCD_DIR)openocd-pp.exe
+#OPENOCD = $(OPENOCD_DIR)openocd-ftd2xx.exe
+
+# specify OpenOCD configuration file (pick the one for your device)
+#OPENOCD_CFG = C:\openocd-configs\str75x-configs\str75x_signalyzer-flash-program.cfg
+#OPENOCD_CFG = C:\openocd-configs\str75x-configs\str75x_jtagkey-flash-program.cfg
+#OPENOCD_CFG = C:\openocd-configs\str75x-configs\str75x_armusbocd-flash-program.cfg
+OPENOCD_CFG = C:\openocd-configs\str75x-configs\str75x_pp-flash-program.cfg
+
+program:
+ @echo
+ @echo "Flash Programming with OpenOCD..."
+ $(OPENOCD) -f $(OPENOCD_CFG)
+ @echo
+ @echo
+ @echo "Flash Programming Finished."
+
+
+# Create final output file (.hex) from ELF output file.
+%.hex: %.elf
+ @echo
+ @echo $(MSG_FLASH) $@
+ $(OBJCOPY) -O ihex $< $@
+
+# Create final output file (.bin) from ELF output file.
+%.bin: %.elf
+ @echo
+ @echo $(MSG_FLASH) $@
+ $(OBJCOPY) -O binary $< $@
+
+
+# Create extended listing file from ELF output file.
+# testing: option -C
+%.lss: %.elf
+ @echo
+ @echo $(MSG_EXTENDED_LISTING) $@
+ $(OBJDUMP) -h -S -C $< > $@
+
+
+# Create a symbol table from ELF output file.
+%.sym: %.elf
+ @echo
+ @echo $(MSG_SYMBOL_TABLE) $@
+ $(NM) -n $< > $@
+
+
+# Link: create ELF output file from object files.
+.SECONDARY : $(TARGET).elf
+.PRECIOUS : $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM)
+%.elf: $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM)
+ @echo
+ @echo $(MSG_LINKING) $@
+ $(CC) $(THUMB) $(ALL_CFLAGS) $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM) --output $@ $(LDFLAGS)
+# $(CPP) $(THUMB) $(ALL_CFLAGS) $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM) --output $@ $(LDFLAGS)
+
+# Compile: create object files from C source files. ARM/Thumb
+$(COBJ) : %.o : %.c
+ @echo
+ @echo $(MSG_COMPILING) $<
+ $(CC) -c $(THUMB) $(ALL_CFLAGS) $(CONLYFLAGS) $< -o $@
+
+# Compile: create object files from C source files. ARM-only
+$(COBJARM) : %.o : %.c
+ @echo
+ @echo $(MSG_COMPILING_ARM) $<
+ $(CC) -c $(ALL_CFLAGS) $(CONLYFLAGS) $< -o $@
+
+# Compile: create object files from C++ source files. ARM/Thumb
+$(CPPOBJ) : %.o : %.cpp
+ @echo
+ @echo $(MSG_COMPILINGCPP) $<
+ $(CPP) -c $(THUMB) $(ALL_CFLAGS) $(CPPFLAGS) $< -o $@
+
+# Compile: create object files from C++ source files. ARM-only
+$(CPPOBJARM) : %.o : %.cpp
+ @echo
+ @echo $(MSG_COMPILINGCPP_ARM) $<
+ $(CPP) -c $(ALL_CFLAGS) $(CPPFLAGS) $< -o $@
+
+
+# Compile: create assembler files from C source files. ARM/Thumb
+## does not work - TODO - hints welcome
+##$(COBJ) : %.s : %.c
+## $(CC) $(THUMB) -S $(ALL_CFLAGS) $< -o $@
+
+
+# Assemble: create object files from assembler source files. ARM/Thumb
+$(AOBJ) : %.o : %.S
+ @echo
+ @echo $(MSG_ASSEMBLING) $<
+ $(CC) -c $(THUMB) $(ALL_ASFLAGS) $< -o $@
+
+
+# Assemble: create object files from assembler source files. ARM-only
+$(AOBJARM) : %.o : %.S
+ @echo
+ @echo $(MSG_ASSEMBLING_ARM) $<
+ $(CC) -c $(ALL_ASFLAGS) $< -o $@
+
+
+# Target: clean project.
+clean: begin clean_list finished end
+
+
+clean_list :
+ @echo
+ @echo $(MSG_CLEANING)
+ $(REMOVE) $(TARGET).hex
+ $(REMOVE) $(TARGET).bin
+ $(REMOVE) $(TARGET).obj
+ $(REMOVE) $(TARGET).elf
+ $(REMOVE) $(TARGET).map
+ $(REMOVE) $(TARGET).obj
+ $(REMOVE) $(TARGET).a90
+ $(REMOVE) $(TARGET).sym
+ $(REMOVE) $(TARGET).lnk
+ $(REMOVE) $(TARGET).lss
+ $(REMOVE) $(COBJ)
+ $(REMOVE) $(CPPOBJ)
+ $(REMOVE) $(AOBJ)
+ $(REMOVE) $(COBJARM)
+ $(REMOVE) $(CPPOBJARM)
+ $(REMOVE) $(AOBJARM)
+ $(REMOVE) $(LST)
+ $(REMOVE) $(SRC:.c=.s)
+ $(REMOVE) $(SRC:.c=.d)
+ $(REMOVE) $(SRCARM:.c=.s)
+ $(REMOVE) $(SRCARM:.c=.d)
+ $(REMOVE) $(CPPSRC:.cpp=.s)
+ $(REMOVE) $(CPPSRC:.cpp=.d)
+ $(REMOVE) $(CPPSRCARM:.cpp=.s)
+ $(REMOVE) $(CPPSRCARM:.cpp=.d)
+ $(REMOVEDIR) .dep | exit 0
+
+
+# Include the dependency files.
+-include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)
+
+
+# Listing of phony targets.
+.PHONY : all begin finish end sizebefore sizeafter gccversion \
+build elf hex bin lss sym clean clean_list program
+
Added: trunk/firmware/arm/str/uart750-1/Readme.txt
===================================================================
--- trunk/firmware/arm/str/uart750-1/Readme.txt (rev 0)
+++ trunk/firmware/arm/str/uart750-1/Readme.txt 2008-02-06 13:13:57 UTC (rev 830)
@@ -0,0 +1,78 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : Readme.txt
+* Author : MCD Application Team
+* Date First Issued : 03/10/2006
+* Description : Description of the UART Example1.
+********************************************************************************
+* History:
+* 07/17/2006 : V1.0
+* 03/10/2006 : V0.1
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+
+Example description
+===================
+This example provides a description of how to use the UART with hardware flow
+control and communicate with the Hyperterminal.
+First, the UART0 sends the TxBuffer to the hyperterminal and still waiting for
+a string from the hyperterminal that you must enter which must end by '\r'
+character (keypad ENTER button). Each byte received is retransmitted to the
+Hyperterminal.
+The string that you have entered is stored in the RxBuffer array. The receive
+buffer have a RxBufferSize bytes as maximum.
+
+The UART0 is configured as follow:
+ - Word Length = 7 Bits
+ - Two Stop Bit
+ - No parity
+ - BaudRate = 115200 baud
+ - Hardware flow control enabled (RTS and CTS signals)
+ - Receive and transmit enabled
+ - Receive and transmit FIFOs are enabled
+ - Transmit and Receive FIFOs levels have 8 bytes depth
+
+
+Directory contents
+==================
+75x_conf.h Library Configuration file
+75x_it.c Interrupt handlers
+main.c Main program
+
+
+Hardware environment
+====================
+ - All the UART0 signals (Rx, Tx, RTS and CTS) must be connected to a DB9
+ connector using a RS232 transceiver.
+
+ - Connect a null-modem female/female RS232 cable between the DB9 connector
+ (CN4 on STR75x-EVAL board) and PC serial port.
+
+ - Hyperterminal configuration:
+ - Word Length = 7 Bits
+ - Two Stop Bit
+ - No parity
+ - BaudRate = 115200 baud
+ - flow control: Hardware
+
+
+How to use it
+=============
+In order to make the program work, you must do the following :
+- Create a project and setup all your toolchain's start-up files
+- Compile the directory content files and required Library files :
+ + 75x_lib.c
+ + 75x_uart.c
+ + 75x_gpio.c
+ + 75x_mrcc.c
+
+- Link all compiled files and load your image into either RAM or Flash
+- Run the example
+
+
+******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE******
Added: trunk/firmware/arm/str/uart750-1/STR75x-RAM.ld
===================================================================
--- trunk/firmware/arm/str/uart750-1/STR75x-RAM.ld (rev 0)
+++ trunk/firmware/arm/str/uart750-1/STR75x-RAM.ld 2008-02-06 13:13:57 UTC (rev 830)
@@ -0,0 +1,228 @@
+/***********************************************************************************
+* Copyright 2005 Anglia Design
+* This demo code and associated components are provided as is and has no warranty,
+* implied or otherwise. You are free to use/modify any of the provided
+* code at your own risk in your applications with the expressed limitation
+* of liability (see below)
+*
+* LIMITATION OF LIABILITY: ANGLIA OR ANGLIA DESIGNS SHALL NOT BE LIABLE FOR ANY
+* LOSS OF PROFITS, LOSS OF USE, LOSS OF DATA, INTERRUPTION OF BUSINESS, NOR FOR
+* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND WHETHER UNDER
+* THIS AGREEMENT OR OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+*
+* Author : Spencer Oliver
+* Web : www.anglia-designs.com
+*
+***********************************************************************************/
+
+/* Stack Sizes */
+
+ _STACKSIZE = 1024;
+ _STACKSIZE_IRQ = 256;
+ _STACKSIZE_FIQ = 256;
+ _STACKSIZE_SVC = 0;
+ _STACKSIZE_ABT = 0;
+ _STACKSIZE_UND = 0;
+ _HEAPSIZE = 1024;
+
+/* Memory Definitions */
+
+MEMORY
+{
+ DATA (rw) : ORIGIN = 0x40000000, LENGTH = 0x00004000
+}
+
+/* Section Definitions */
+
+SECTIONS
+{
+ /* first section is .text which is used for code */
+
+ .text :
+ {
+ KEEP(*(.vectrom))
+ KEEP(*(.init))
+ *(.text .text.*)
+ *(.gnu.linkonce.t.*)
+ *(.glue_7t .glue_7)
+ KEEP(*(.fini))
+ *(.gcc_except_table)
+ } >DATA =0
+ . = ALIGN(4);
+
+ /* .ctors .dtors are used for c++ constructors/destructors */
+
+ .ctors :
+ {
+ PROVIDE(__ctors_start__ = .);
+ KEEP(*(SORT(.ctors.*)))
+ KEEP(*(.ctors))
+ PROVIDE(__ctors_end__ = .);
+ } >DATA
+
+ .dtors :
+ {
+ PROVIDE(__dtors_start__ = .);
+ KEEP(*(SORT(.dtors.*)))
+ KEEP(*(.dtors))
+ PROVIDE(__dtors_end__ = .);
+ } >DATA
+
+ /* .rodata section which is used for read-only data (constants) */
+
+ .rodata :
+ {
+ *(.rodata .rodata.*)
+ *(.gnu.linkonce.r.*)
+ } >DATA
+ . = ALIGN(4);
+
+ _vectext = .;
+ PROVIDE (vectext = .);
+
+ .vect : AT (_vectext)
+ {
+ _vecstart = .;
+ KEEP(*(.vectram))
+ _vecend = .;
+ } >DATA
+
+ _etext = _vectext + SIZEOF(.vect);
+ PROVIDE (etext = .);
+
+ /* .data section which is used for initialized data */
+
+ .data : AT (_etext)
+ {
+ *(.data .data.*)
+ *(.gnu.linkonce.d.*)
+ SORT(CONSTRUCTORS)
+ } >DATA
+ . = ALIGN(4);
+
+ __data_start = .;
+ _edata = .;
+ PROVIDE (edata = .);
+
+ /* .bss section which is used for uninitialized data */
+
+ .bss :
+ {
+ __bss_start = .;
+ __bss_start__ = .;
+ *(.bss .bss.*)
+ *(.gnu.linkonce.b.*)
+ *(COMMON)
+ . = ALIGN(4);
+ } >DATA
+ . = ALIGN(4);
+ __bss_end__ = .;
+
+ _end = .;
+ PROVIDE(end = .);
+
+ /* .heap section which is used for memory allocation */
+
+ .heap (NOLOAD) :
+ {
+ __heap_start__ = .;
+ *(.heap)
+ . = MAX(__heap_start__ + _HEAPSIZE , .);
+ } >DATA
+ __heap_end__ = __heap_start__ + SIZEOF(.heap);
+
+ /* .stack section - user mode stack */
+
+ .stack (__heap_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_start__ = .;
+ *(.stack)
+ . = MAX(__stack_start__ + _STACKSIZE , .);
+ } >DATA
+ __stack_end__ = __stack_start__ + SIZEOF(.stack);
+
+ /* .stack_irq section */
+
+ .stack_irq (__stack_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_irq_start__ = .;
+ *(.stack_irq)
+ . = MAX(__stack_irq_start__ + _STACKSIZE_IRQ , .);
+ } >DATA
+ __stack_irq_end__ = __stack_irq_start__ + SIZEOF(.stack_irq);
+
+ /* .stack_fiq section */
+
+ .stack_fiq (__stack_irq_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_fiq_start__ = .;
+ *(.stack_fiq)
+ . = MAX(__stack_fiq_start__ + _STACKSIZE_FIQ , .);
+ } >DATA
+ __stack_fiq_end__ = __stack_fiq_start__ + SIZEOF(.stack_fiq);
+
+ /* .stack_svc section */
+
+ .stack_svc (__stack_fiq_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_svc_start__ = .;
+ *(.stack_svc)
+ . = MAX(__stack_svc_start__ + _STACKSIZE_SVC , .);
+ } >DATA
+ __stack_svc_end__ = __stack_svc_start__ + SIZEOF(.stack_svc);
+
+ /* .stack_abt section */
+
+ .stack_abt (__stack_svc_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_abt_start__ = .;
+ *(.stack_abt)
+ . = MAX(__stack_abt_start__ + _STACKSIZE_ABT , .);
+ } >DATA
+ __stack_abt_end__ = __stack_abt_start__ + SIZEOF(.stack_abt);
+
+ /* .stack_und section */
+
+ .stack_und (__stack_abt_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_und_start__ = .;
+ *(.stack_und)
+ . = MAX(__stack_und_start__ + _STACKSIZE_UND , .);
+ } >DATA
+ __stack_und_end__ = __stack_und_start__ + SIZEOF(.stack_und);
+
+ /* Stabs debugging sections. */
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+ .stab.excl 0 : { *(.stab.excl) }
+ .stab.exclstr 0 : { *(.stab.exclstr) }
+ .stab.index 0 : { *(.stab.index) }
+ .stab.indexstr 0 : { *(.stab.indexstr) }
+ .comment 0 : { *(.comment) }
+ /* DWARF debug sections.
+ Symbols in the DWARF debugging sections are relative to the beginning
+ of the section so we begin them at 0. */
+ /* DWARF 1 */
+ .debug 0 : { *(.debug) }
+ .line 0 : { *(.line) }
+ /* GNU DWARF 1 extensions */
+ .debug_srcinfo 0 : { *(.debug_srcinfo) }
+ .debug_sfnames 0 : { *(.debug_sfnames) }
+ /* DWARF 1.1 and DWARF 2 */
+ .debug_aranges 0 : { *(.debug_aranges) }
+ .debug_pubnames 0 : { *(.debug_pubnames) }
+ /* DWARF 2 */
+ .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
+ .debug_abbrev 0 : { *(.debug_abbrev) }
+ .debug_line 0 : { *(.debug_line) }
+ .debug_frame 0 : { *(.debug_frame) }
+ .debug_str 0 : { *(.debug_str) }
+ .debug_loc 0 : { *(.debug_loc) }
+ .debug_macinfo 0 : { *(.debug_macinfo) }
+ /* SGI/MIPS DWARF 2 extensions */
+ .debug_weaknames 0 : { *(.debug_weaknames) }
+ .debug_funcnames 0 : { *(.debug_funcnames) }
+ .debug_typenames 0 : { *(.debug_typenames) }
+ .debug_varnames 0 : { *(.debug_varnames) }
+}
+
Added: trunk/firmware/arm/str/uart750-1/STR75x-ROM.ld
===================================================================
--- trunk/firmware/arm/str/uart750-1/STR75x-ROM.ld (rev 0)
+++ trunk/firmware/arm/str/uart750-1/STR75x-ROM.ld 2008-02-06 13:13:57 UTC (rev 830)
@@ -0,0 +1,231 @@
+/***********************************************************************************
+* Copyright 2005 Anglia Design
+* This demo code and associated components are provided as is and has no warranty,
+* implied or otherwise. You are free to use/modify any of the provided
+* code at your own risk in your applications with the expressed limitation
+* of liability (see below)
+*
+* LIMITATION OF LIABILITY: ANGLIA OR ANGLIA DESIGNS SHALL NOT BE LIABLE FOR ANY
+* LOSS OF PROFITS, LOSS OF USE, LOSS OF DATA, INTERRUPTION OF BUSINESS, NOR FOR
+* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND WHETHER UNDER
+* THIS AGREEMENT OR OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+*
+* Author : Spencer Oliver
+* Web : www.anglia-designs.com
+*
+***********************************************************************************/
+
+/* Stack Sizes */
+
+ _STACKSIZE = 1024;
+ _STACKSIZE_IRQ = 256;
+ _STACKSIZE_FIQ = 256;
+ _STACKSIZE_SVC = 0;
+ _STACKSIZE_ABT = 0;
+ _STACKSIZE_UND = 0;
+ _HEAPSIZE = 1024;
+
+/* Memory Definitions */
+
+MEMORY
+{
+ CODE (rx) : ORIGIN = 0x20000000, LENGTH = 0x00040000
+ DATA (rw) : ORIGIN = 0x40000000, LENGTH = 0x00004000
+}
+
+/* Section Definitions */
+
+SECTIONS
+{
+ /* first section is .text which is used for code */
+
+ .text :
+ {
+ KEEP(*(.vectrom))
+ KEEP(*(.init))
+ *(.text .text.*)
+ *(.gnu.linkonce.t.*)
+ *(.glue_7t .glue_7)
+ KEEP(*(.fini))
+ *(.gcc_except_table)
+ } >CODE =0
+ . = ALIGN(4);
+
+ /* .ctors .dtors are used for c++ constructors/destructors */
+
+ .ctors :
+ {
+ PROVIDE(__ctors_start__ = .);
+ KEEP(*(SORT(.ctors.*)))
+ KEEP(*(.ctors))
+ PROVIDE(__ctors_end__ = .);
+ } >CODE
+
+ .dtors :
+ {
+ PROVIDE(__dtors_start__ = .);
+ KEEP(*(SORT(.dtors.*)))
+ KEEP(*(.dtors))
+ PROVIDE(__dtors_end__ = .);
+ } >CODE
+
+ /* .rodata section which is used for read-only data (constants) */
+
+ .rodata :
+ {
+ *(.rodata .rodata.*)
+ *(.gnu.linkonce.r.*)
+ } >CODE
+ . = ALIGN(4);
+
+ _vectext = .;
+ PROVIDE (vectext = .);
+
+ .vect : AT (_vectext)
+ {
+ _vecstart = .;
+ KEEP(*(.vectram))
+ _vecend = .;
+ } >DATA
+
+ _etext = _vectext + SIZEOF(.vect);
+ PROVIDE (etext = .);
+
+ /* .data section which is used for initialized data */
+
+ .data : AT (_etext)
+ {
+ __data_start = .;
+ *(.data .data.*)
+ *(.gnu.linkonce.d.*)
+ SORT(CONSTRUCTORS)
+ . = ALIGN(4);
+ *(.fastrun .fastrun.*)
+ } >DATA
+ . = ALIGN(4);
+
+ _edata = .;
+ PROVIDE (edata = .);
+
+ /* .bss section which is used for uninitialized data */
+
+ .bss :
+ {
+ __bss_start = .;
+ __bss_start__ = .;
+ *(.bss .bss.*)
+ *(.gnu.linkonce.b.*)
+ *(COMMON)
+ . = ALIGN(4);
+ } >DATA
+ . = ALIGN(4);
+ __bss_end__ = .;
+
+ _end = .;
+ PROVIDE(end = .);
+
+ /* .heap section which is used for memory allocation */
+
+ .heap (NOLOAD) :
+ {
+ __heap_start__ = .;
+ *(.heap)
+ . = MAX(__heap_start__ + _HEAPSIZE , .);
+ } >DATA
+ __heap_end__ = __heap_start__ + SIZEOF(.heap);
+
+ /* .stack section - user mode stack */
+
+ .stack (__heap_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_start__ = .;
+ *(.stack)
+ . = MAX(__stack_start__ + _STACKSIZE , .);
+ } >DATA
+ __stack_end__ = __stack_start__ + SIZEOF(.stack);
+
+ /* .stack_irq section */
+
+ .stack_irq (__stack_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_irq_start__ = .;
+ *(.stack_irq)
+ . = MAX(__stack_irq_start__ + _STACKSIZE_IRQ , .);
+ } >DATA
+ __stack_irq_end__ = __stack_irq_start__ + SIZEOF(.stack_irq);
+
+ /* .stack_fiq section */
+
+ .stack_fiq (__stack_irq_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_fiq_start__ = .;
+ *(.stack_fiq)
+ . = MAX(__stack_fiq_start__ + _STACKSIZE_FIQ , .);
+ } >DATA
+ __stack_fiq_end__ = __stack_fiq_start__ + SIZEOF(.stack_fiq);
+
+ /* .stack_svc section */
+
+ .stack_svc (__stack_fiq_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_svc_start__ = .;
+ *(.stack_svc)
+ . = MAX(__stack_svc_start__ + _STACKSIZE_SVC , .);
+ } >DATA
+ __stack_svc_end__ = __stack_svc_start__ + SIZEOF(.stack_svc);
+
+ /* .stack_abt section */
+
+ .stack_abt (__stack_svc_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_abt_start__ = .;
+ *(.stack_abt)
+ . = MAX(__stack_abt_start__ + _STACKSIZE_ABT , .);
+ } >DATA
+ __stack_abt_end__ = __stack_abt_start__ + SIZEOF(.stack_abt);
+
+ /* .stack_und section */
+
+ .stack_und (__stack_abt_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_und_start__ = .;
+ *(.stack_und)
+ . = MAX(__stack_und_start__ + _STACKSIZE_UND , .);
+ } >DATA
+ __stack_und_end__ = __stack_und_start__ + SIZEOF(.stack_und);
+
+ /* Stabs debugging sections. */
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+ .stab.excl 0 : { *(.stab.excl) }
+ .stab.exclstr 0 : { *(.stab.exclstr) }
+ .stab.index 0 : { *(.stab.index) }
+ .stab.indexstr 0 : { *(.stab.indexstr) }
+ .comment 0 : { *(.comment) }
+ /* DWARF debug sections.
+ Symbols in the DWARF debugging sections are relative to the beginning
+ of the section so we begin them at 0. */
+ /* DWARF 1 */
+ .debug 0 : { *(.debug) }
+ .line 0 : { *(.line) }
+ /* GNU DWARF 1 extensions */
+ .debug_srcinfo 0 : { *(.debug_srcinfo) }
+ .debug_sfnames 0 : { *(.debug_sfnames) }
+ /* DWARF 1.1 and DWARF 2 */
+ .debug_aranges 0 : { *(.debug_aranges) }
+ .debug_pubnames 0 : { *(.debug_pubnames) }
+ /* DWARF...
[truncated message content] |
|
From: <ak...@us...> - 2008-02-06 13:23:22
|
Revision: 831
http://can.svn.sourceforge.net/can/?rev=831&view=rev
Author: akhe
Date: 2008-02-06 05:23:20 -0800 (Wed, 06 Feb 2008)
Log Message:
-----------
Added even more str samples
Added Paths:
-----------
trunk/firmware/arm/str/led710/
trunk/firmware/arm/str/led710/Makefile
trunk/firmware/arm/str/led710/STR71x-RAM.ld
trunk/firmware/arm/str/led710/STR71x-ROM.ld
trunk/firmware/arm/str/led710/main.c
trunk/firmware/arm/str/led710/startup.s
trunk/firmware/arm/str/led710/vector.s
trunk/firmware/arm/str/led710/vectors.c
trunk/firmware/arm/str/led710/vectors.h
trunk/firmware/arm/str/led750/
trunk/firmware/arm/str/led750/Makefile
trunk/firmware/arm/str/led750/STR75x-RAM.ld
trunk/firmware/arm/str/led750/STR75x-ROM.ld
trunk/firmware/arm/str/led750/main.c
trunk/firmware/arm/str/led750/startup.s
trunk/firmware/arm/str/led750/vector.s
trunk/firmware/arm/str/led750/vectors.c
trunk/firmware/arm/str/led750/vectors.h
trunk/firmware/arm/str/mthomasuart710/
trunk/firmware/arm/str/mthomasuart710/Makefile
trunk/firmware/arm/str/mthomasuart710/STR71x-RAM.ld
trunk/firmware/arm/str/mthomasuart710/STR71x-ROM.ld
trunk/firmware/arm/str/mthomasuart710/lcd.c
trunk/firmware/arm/str/mthomasuart710/lcd.h
trunk/firmware/arm/str/mthomasuart710/main.c
trunk/firmware/arm/str/mthomasuart710/startup.s
trunk/firmware/arm/str/mthomasuart710/syscalls.c
trunk/firmware/arm/str/mthomasuart710/vector.s
trunk/firmware/arm/str/mthomasuart710/vectors.c
trunk/firmware/arm/str/mthomasuart710/vectors.h
Added: trunk/firmware/arm/str/led710/Makefile
===================================================================
--- trunk/firmware/arm/str/led710/Makefile (rev 0)
+++ trunk/firmware/arm/str/led710/Makefile 2008-02-06 13:23:20 UTC (rev 831)
@@ -0,0 +1,495 @@
+# Hey Emacs, this is a -*- makefile -*-
+#
+# WinARM template makefile
+# by Giacomo Fazio and Antonio Nasca, Catania, Italy
+# <gia...@gm...>
+# <ant...@ho...>
+#
+# based on the WinARM template makefile written by Martin Thomas
+# Released to the Public Domain
+# Please read the make user manual!
+#
+#
+# On command line:
+#
+# make all = Make software.
+#
+# make clean = Clean out built project files.
+#
+# make program = Download the hex file to the device
+#
+# (TODO: make filename.s = Just compile filename.c into the assembler code only)
+#
+# To rebuild project do "make clean" then "make all".
+# Toolchain prefix (i.e arm-elf -> arm-elf-gcc.exe)
+TCHAIN = arm-elf
+#TCHAIN = arm-none-eabi
+
+#USE_THUMB_MODE = YES
+USE_THUMB_MODE = NO
+
+# MCU name and submodel
+MCU = arm7tdmi
+SUBMDL = STR71x
+
+## Create ROM-Image
+RUN_MODE=ROM_RUN
+## Create RAM-Image
+#RUN_MODE=RAM_RUN
+
+## not supported in this example:
+## Exception-Vector placement only supported for "ROM_RUN"
+## (placement settings ignored when using "RAM_RUN")
+## - Exception vectors in ROM:
+#VECTOR_LOCATION=VECTORS_IN_ROM
+## - Exception vectors in RAM:
+#VECTOR_LOCATION=VECTORS_IN_RAM
+
+
+# Target file name (without extension).
+TARGET = main
+
+# List C source files here. (C dependencies are automatically generated.)
+# use file-extension c for "c-only"-files
+SRC = $(TARGET).c
+
+# List C source files here which must be compiled in ARM-Mode.
+# use file-extension c for "c-only"-files
+SRCARM = vectors.c
+# thumb is possible too for vectors.c - keep ARM, TODO: profile
+
+# List C++ source files here.
+# use file-extension cpp for C++-files (use extension .cpp)
+CPPSRC =
+
+# List C++ source files here which must be compiled in ARM-Mode.
+# use file-extension cpp for C++-files (use extension .cpp)
+#CPPSRCARM = $(TARGET).cpp
+CPPSRCARM =
+
+# List Assembler source files here.
+# Make them always end in a capital .S. Files ending in a lowercase .s
+# will not be considered source files but generated files (assembler
+# output from the compiler), and will be deleted upon "make clean"!
+# Even though the DOS/Win* filesystem matches both .s and .S the same,
+# it will preserve the spelling of the filenames, and gcc itself does
+# care about how the name is spelled on its command-line.
+ASRC =
+
+# List Assembler source files here which must be assembled in ARM-Mode..
+ASRCARM = vector.S startup.S
+
+# Path to Linker-Scripts
+LINKERSCRIPTPATH = .
+
+## Output format. (can be ihex or binary or both)
+## (binary i.e. for openocd and SAM-BA, hex i.e. for lpc21isp and uVision)
+#FORMAT = ihex
+#FORMAT = binary
+FORMAT = both
+
+# Optimization level, can be [0, 1, 2, 3, s].
+# 0 = turn off optimization. s = optimize for size.
+# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
+#OPT = s
+OPT = 0
+
+## Using the Atmel AT91_lib produces warning with
+## the default warning-levels.
+## yes - disable these warnings; no - keep default settings
+#AT91LIBNOWARN = yes
+AT91LIBNOWARN = no
+
+# Debugging format.
+# Native formats for AVR-GCC's -g are stabs [default], or dwarf-2.
+# AVR (extended) COFF requires stabs, plus an avr-objcopy run.
+#DEBUG = stabs
+DEBUG = dwarf-2
+
+# List any extra directories to look for include files here.
+# Each directory must be seperated by a space.
+EXTRAINCDIRS = K:/include ../common/str71x_lib/include
+
+# List any extra directories to look for library files here.
+# Each directory must be seperated by a space.
+#EXTRA_LIBDIRS = ../arm7_efsl_0_2_4
+EXTRA_LIBDIRS = K:/lib ../common/str71x_lib
+
+
+# Compiler flag to set the C Standard level.
+# c89 - "ANSI" C
+# gnu89 - c89 plus GCC extensions
+# c99 - ISO C99 standard (not yet fully implemented)
+# gnu99 - c99 plus GCC extensions
+CSTANDARD = -std=gnu99
+
+# Place -D or -U options for C here
+CDEFS = -D$(RUN_MODE)
+
+# Place -I options here
+CINCS =
+
+# Place -D or -U options for ASM here
+ADEFS = -D$(RUN_MODE)
+
+ifdef VECTOR_LOCATION
+CDEFS += -D$(VECTOR_LOCATION)
+ADEFS += -D$(VECTOR_LOCATION)
+endif
+
+CDEFS += -D__WinARM__ -D__WINARMSUBMDL_$(SUBMDL)__
+ADEFS += -D__WinARM__ -D__WINARMSUBMDL_$(SUBMDL)__
+
+# Compiler flags.
+
+ifeq ($(USE_THUMB_MODE),YES)
+THUMB = -mthumb
+THUMB_IW = -mthumb-interwork
+else
+THUMB =
+THUMB_IW =
+endif
+
+# -g*: generate debugging information
+# -O*: optimization level
+# -f...: tuning, see GCC manual and avr-libc documentation
+# -Wall...: warning level
+# -Wa,...: tell GCC to pass this to the assembler.
+# -adhlns...: create assembler listing
+#
+# Flags for C and C++ (arm-elf-gcc/arm-elf-g++)
+CFLAGS = -g$(DEBUG)
+CFLAGS += $(CDEFS) $(CINCS)
+CFLAGS += -O$(OPT)
+CFLAGS += -Wall -Wcast-align -Wimplicit
+CFLAGS += -Wpointer-arith -Wswitch
+CFLAGS += -ffunction-sections -fdata-sections
+CFLAGS += -Wredundant-decls -Wreturn-type -Wshadow -Wunused
+CFLAGS += -Wa,-adhlns=$(subst $(suffix $<),.lst,$<)
+CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
+
+# flags only for C
+CONLYFLAGS += -Wnested-externs
+CONLYFLAGS += $(CSTANDARD)
+
+ifneq ($(AT91LIBNOWARN),yes)
+#AT91-lib warnings with:
+CFLAGS += -Wcast-qual
+CONLYFLAGS += -Wmissing-prototypes
+CONLYFLAGS += -Wstrict-prototypes
+CONLYFLAGS += -Wmissing-declarations
+endif
+
+# flags only for C++ (arm-elf-g++)
+# CPPFLAGS = -fno-rtti -fno-exceptions
+CPPFLAGS =
+
+# Assembler flags.
+# -Wa,...: tell GCC to pass this to the assembler.
+# -ahlns: create listing
+# -g$(DEBUG): have the assembler create line number information
+ASFLAGS = $(ADEFS) -Wa,-adhlns=$(<:.S=.lst),-g$(DEBUG)
+
+
+#Additional libraries.
+
+# Extra libraries
+# Each library-name must be seperated by a space.
+# To add libxyz.a, libabc.a and libefsl.a:
+# EXTRA_LIBS = xyz abc efsl
+#EXTRA_LIBS = efsl
+EXTRA_LIBS = STR71x_lib
+
+#Support for newlibc-lpc (file: libnewlibc-lpc.a)
+#NEWLIBLPC = -lnewlib-lpc
+
+MATH_LIB = -lm
+
+# CPLUSPLUS_LIB = -lstdc++
+
+
+# Linker flags.
+# -Wl,...: tell GCC to pass this to linker.
+# -Map: create map file
+# --cref: add cross reference to map file
+LDFLAGS = -nostartfiles -Wl,-Map=$(TARGET).map,--cref,--gc-sections
+LDFLAGS += -lc
+LDFLAGS += $(NEWLIBLPC) $(MATH_LIB)
+LDFLAGS += -lc -lgcc
+LDFLAGS += $(CPLUSPLUS_LIB)
+LDFLAGS += $(patsubst %,-L%,$(EXTRA_LIBDIRS))
+LDFLAGS += $(patsubst %,-l%,$(EXTRA_LIBS))
+
+# Set Linker-Script Depending On Selected Memory and Controller
+ifeq ($(RUN_MODE),RAM_RUN)
+LDFLAGS +=-T$(LINKERSCRIPTPATH)/$(SUBMDL)-RAM.ld
+else
+LDFLAGS +=-T$(LINKERSCRIPTPATH)/$(SUBMDL)-ROM.ld
+endif
+
+
+# Define directories, if needed.
+## DIRARM = c:/WinARM/
+## DIRARMBIN = $(DIRAVR)/bin/
+## DIRAVRUTILS = $(DIRAVR)/utils/bin/
+
+# Define programs and commands.
+SHELL = sh
+CC = $(TCHAIN)-gcc
+CPP = $(TCHAIN)-g++
+AR = $(TCHAIN)-ar
+OBJCOPY = $(TCHAIN)-objcopy
+OBJDUMP = $(TCHAIN)-objdump
+SIZE = $(TCHAIN)-size
+NM = $(TCHAIN)-nm
+REMOVE = rm -f
+REMOVEDIR = rm -f -r
+COPY = cp
+
+# Define Messages
+# English
+MSG_ERRORS_NONE = Errors: none
+MSG_BEGIN = "-------- begin (mode: $(RUN_MODE)) --------"
+MSG_END = -------- end --------
+MSG_SIZE_BEFORE = Size before:
+MSG_SIZE_AFTER = Size after:
+MSG_FLASH = Creating load file for Flash:
+MSG_EXTENDED_LISTING = Creating Extended Listing:
+MSG_SYMBOL_TABLE = Creating Symbol Table:
+MSG_LINKING = Linking:
+MSG_COMPILING = Compiling C:
+MSG_COMPILING_ARM = "Compiling C (ARM-only):"
+MSG_COMPILINGCPP = Compiling C++:
+MSG_COMPILINGCPP_ARM = "Compiling C++ (ARM-only):"
+MSG_ASSEMBLING = Assembling:
+MSG_ASSEMBLING_ARM = "Assembling (ARM-only):"
+MSG_CLEANING = Cleaning project:
+MSG_FORMATERROR = Can not handle output-format
+MSG_LPC21_RESETREMINDER = You may have to bring the target in bootloader-mode now.
+
+# Define all object files.
+COBJ = $(SRC:.c=.o)
+AOBJ = $(ASRC:.S=.o)
+COBJARM = $(SRCARM:.c=.o)
+AOBJARM = $(ASRCARM:.S=.o)
+CPPOBJ = $(CPPSRC:.cpp=.o)
+CPPOBJARM = $(CPPSRCARM:.cpp=.o)
+
+# Define all listing files.
+LST = $(ASRC:.S=.lst) $(ASRCARM:.S=.lst) $(SRC:.c=.lst) $(SRCARM:.c=.lst)
+LST += $(CPPSRC:.cpp=.lst) $(CPPSRCARM:.cpp=.lst)
+
+# Compiler flags to generate dependency files.
+### GENDEPFLAGS = -Wp,-M,-MP,-MT,$(*F).o,-MF,.dep/$(@F).d
+GENDEPFLAGS = -MD -MP -MF .dep/$(@F).d
+
+# Combine all necessary flags and optional flags.
+# Add target processor to flags.
+ALL_CFLAGS = -mcpu=$(MCU) $(THUMB_IW) -I. $(CFLAGS) $(GENDEPFLAGS)
+ALL_ASFLAGS = -mcpu=$(MCU) $(THUMB_IW) -I. -x assembler-with-cpp $(ASFLAGS)
+
+
+# Default target.
+all: begin gccversion sizebefore build sizeafter finished end
+
+ifeq ($(FORMAT),ihex)
+build: elf hex lss sym
+hex: $(TARGET).hex
+IMGEXT=hex
+else
+ifeq ($(FORMAT),binary)
+build: elf bin lss sym
+bin: $(TARGET).bin
+IMGEXT=bin
+else
+ifeq ($(FORMAT),both)
+build: elf hex bin lss sym
+hex: $(TARGET).hex
+bin: $(TARGET).bin
+else
+$(error "$(MSG_FORMATERROR) $(FORMAT)")
+endif
+endif
+endif
+
+elf: $(TARGET).elf
+lss: $(TARGET).lss
+sym: $(TARGET).sym
+
+# Eye candy.
+begin:
+ @echo
+ @echo $(MSG_BEGIN)
+
+finished:
+ @echo $(MSG_ERRORS_NONE)
+
+end:
+ @echo $(MSG_END)
+ @echo
+
+
+# Display size of file.
+HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
+ELFSIZE = $(SIZE) -A $(TARGET).elf
+sizebefore:
+ @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); echo; fi
+
+sizeafter:
+ @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi
+
+
+# Display compiler version information.
+gccversion :
+ @$(CC) --version
+
+# FLASH Programming with OPENOCD
+
+# specify the directory where openocd executable resides (openocd-ftd2xx.exe or openocd-pp.exe)
+# Note: you may have to adjust this if a newer version of YAGARTO has been downloaded
+OPENOCD_DIR = 'c:\Programmi\openocd\bin\'
+
+# specify OpenOCD executable (pp is for the wiggler, ftd2xx is for the USB debugger)
+OPENOCD = $(OPENOCD_DIR)openocd-pp.exe
+#OPENOCD = $(OPENOCD_DIR)openocd-ftd2xx.exe
+
+# specify OpenOCD configuration file (pick the one for your device)
+#OPENOCD_CFG = C:\openocd-configs\str71x-configs\str71x_signalyzer-flash-program.cfg
+#OPENOCD_CFG = C:\openocd-configs\str71x-configs\str71x_jtagkey-flash-program.cfg
+#OPENOCD_CFG = C:\openocd-configs\str71x-configs\str71x_armusbocd-flash-program.cfg
+OPENOCD_CFG = C:\openocd-configs\str71x-configs\str71x_pp-flash-program.cfg
+
+program:
+ @echo
+ @echo "Flash Programming with OpenOCD..."
+ $(OPENOCD) -f $(OPENOCD_CFG)
+ @echo
+ @echo
+ @echo "Flash Programming Finished."
+
+
+# Create final output file (.hex) from ELF output file.
+%.hex: %.elf
+ @echo
+ @echo $(MSG_FLASH) $@
+ $(OBJCOPY) -O ihex $< $@
+
+# Create final output file (.bin) from ELF output file.
+%.bin: %.elf
+ @echo
+ @echo $(MSG_FLASH) $@
+ $(OBJCOPY) -O binary $< $@
+
+
+# Create extended listing file from ELF output file.
+# testing: option -C
+%.lss: %.elf
+ @echo
+ @echo $(MSG_EXTENDED_LISTING) $@
+ $(OBJDUMP) -h -S -C $< > $@
+
+
+# Create a symbol table from ELF output file.
+%.sym: %.elf
+ @echo
+ @echo $(MSG_SYMBOL_TABLE) $@
+ $(NM) -n $< > $@
+
+
+# Link: create ELF output file from object files.
+.SECONDARY : $(TARGET).elf
+.PRECIOUS : $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM)
+%.elf: $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM)
+ @echo
+ @echo $(MSG_LINKING) $@
+ $(CC) $(THUMB) $(ALL_CFLAGS) $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM) --output $@ $(LDFLAGS)
+# $(CPP) $(THUMB) $(ALL_CFLAGS) $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM) --output $@ $(LDFLAGS)
+
+# Compile: create object files from C source files. ARM/Thumb
+$(COBJ) : %.o : %.c
+ @echo
+ @echo $(MSG_COMPILING) $<
+ $(CC) -c $(THUMB) $(ALL_CFLAGS) $(CONLYFLAGS) $< -o $@
+
+# Compile: create object files from C source files. ARM-only
+$(COBJARM) : %.o : %.c
+ @echo
+ @echo $(MSG_COMPILING_ARM) $<
+ $(CC) -c $(ALL_CFLAGS) $(CONLYFLAGS) $< -o $@
+
+# Compile: create object files from C++ source files. ARM/Thumb
+$(CPPOBJ) : %.o : %.cpp
+ @echo
+ @echo $(MSG_COMPILINGCPP) $<
+ $(CPP) -c $(THUMB) $(ALL_CFLAGS) $(CPPFLAGS) $< -o $@
+
+# Compile: create object files from C++ source files. ARM-only
+$(CPPOBJARM) : %.o : %.cpp
+ @echo
+ @echo $(MSG_COMPILINGCPP_ARM) $<
+ $(CPP) -c $(ALL_CFLAGS) $(CPPFLAGS) $< -o $@
+
+
+# Compile: create assembler files from C source files. ARM/Thumb
+## does not work - TODO - hints welcome
+##$(COBJ) : %.s : %.c
+## $(CC) $(THUMB) -S $(ALL_CFLAGS) $< -o $@
+
+
+# Assemble: create object files from assembler source files. ARM/Thumb
+$(AOBJ) : %.o : %.S
+ @echo
+ @echo $(MSG_ASSEMBLING) $<
+ $(CC) -c $(THUMB) $(ALL_ASFLAGS) $< -o $@
+
+
+# Assemble: create object files from assembler source files. ARM-only
+$(AOBJARM) : %.o : %.S
+ @echo
+ @echo $(MSG_ASSEMBLING_ARM) $<
+ $(CC) -c $(ALL_ASFLAGS) $< -o $@
+
+
+# Target: clean project.
+clean: begin clean_list finished end
+
+
+clean_list :
+ @echo
+ @echo $(MSG_CLEANING)
+ $(REMOVE) $(TARGET).hex
+ $(REMOVE) $(TARGET).bin
+ $(REMOVE) $(TARGET).obj
+ $(REMOVE) $(TARGET).elf
+ $(REMOVE) $(TARGET).map
+ $(REMOVE) $(TARGET).obj
+ $(REMOVE) $(TARGET).a90
+ $(REMOVE) $(TARGET).sym
+ $(REMOVE) $(TARGET).lnk
+ $(REMOVE) $(TARGET).lss
+ $(REMOVE) $(COBJ)
+ $(REMOVE) $(CPPOBJ)
+ $(REMOVE) $(AOBJ)
+ $(REMOVE) $(COBJARM)
+ $(REMOVE) $(CPPOBJARM)
+ $(REMOVE) $(AOBJARM)
+ $(REMOVE) $(LST)
+ $(REMOVE) $(SRC:.c=.s)
+ $(REMOVE) $(SRC:.c=.d)
+ $(REMOVE) $(SRCARM:.c=.s)
+ $(REMOVE) $(SRCARM:.c=.d)
+ $(REMOVE) $(CPPSRC:.cpp=.s)
+ $(REMOVE) $(CPPSRC:.cpp=.d)
+ $(REMOVE) $(CPPSRCARM:.cpp=.s)
+ $(REMOVE) $(CPPSRCARM:.cpp=.d)
+ $(REMOVEDIR) .dep | exit 0
+
+
+# Include the dependency files.
+-include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)
+
+
+# Listing of phony targets.
+.PHONY : all begin finish end sizebefore sizeafter gccversion \
+build elf hex bin lss sym clean clean_list program
+
Added: trunk/firmware/arm/str/led710/STR71x-RAM.ld
===================================================================
--- trunk/firmware/arm/str/led710/STR71x-RAM.ld (rev 0)
+++ trunk/firmware/arm/str/led710/STR71x-RAM.ld 2008-02-06 13:23:20 UTC (rev 831)
@@ -0,0 +1,229 @@
+/***********************************************************************************
+* Copyright 2005 Anglia Design
+* This demo code and associated components are provided as is and has no warranty,
+* implied or otherwise. You are free to use/modify any of the provided
+* code at your own risk in your applications with the expressed limitation
+* of liability (see below)
+*
+* LIMITATION OF LIABILITY: ANGLIA OR ANGLIA DESIGNS SHALL NOT BE LIABLE FOR ANY
+* LOSS OF PROFITS, LOSS OF USE, LOSS OF DATA, INTERRUPTION OF BUSINESS, NOR FOR
+* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND WHETHER UNDER
+* THIS AGREEMENT OR OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+*
+* Author : Spencer Oliver
+* Web : www.anglia-designs.com
+*
+***********************************************************************************/
+
+/* Stack Sizes */
+
+ _STACKSIZE = 1024;
+ _STACKSIZE_IRQ = 256;
+ _STACKSIZE_FIQ = 256;
+ _STACKSIZE_SVC = 0;
+ _STACKSIZE_ABT = 0;
+ _STACKSIZE_UND = 0;
+ _HEAPSIZE = 1024;
+
+/* Memory Definitions */
+
+MEMORY
+{
+ DATA (rw) : ORIGIN = 0x20000000, LENGTH = 0x00010000
+ XDATA (rw) : ORIGIN = 0x62000000, LENGTH = 0x00400000
+}
+
+/* Section Definitions */
+
+SECTIONS
+{
+ /* first section is .text which is used for code */
+
+ .text :
+ {
+ KEEP(*(.vectrom))
+ KEEP(*(.init))
+ *(.text .text.*)
+ *(.gnu.linkonce.t.*)
+ *(.glue_7t .glue_7)
+ KEEP(*(.fini))
+ *(.gcc_except_table)
+ } >XDATA =0
+ . = ALIGN(4);
+
+ /* .ctors .dtors are used for c++ constructors/destructors */
+
+ .ctors :
+ {
+ PROVIDE(__ctors_start__ = .);
+ KEEP(*(SORT(.ctors.*)))
+ KEEP(*(.ctors))
+ PROVIDE(__ctors_end__ = .);
+ } >XDATA
+
+ .dtors :
+ {
+ PROVIDE(__dtors_start__ = .);
+ KEEP(*(SORT(.dtors.*)))
+ KEEP(*(.dtors))
+ PROVIDE(__dtors_end__ = .);
+ } >XDATA
+
+ /* .rodata section which is used for read-only data (constants) */
+
+ .rodata :
+ {
+ *(.rodata .rodata.*)
+ *(.gnu.linkonce.r.*)
+ } >XDATA
+ . = ALIGN(4);
+
+ _vectext = .;
+ PROVIDE (vtext = .);
+
+ .vect : AT (_vectext)
+ {
+ _vecstart = .;
+ KEEP(*(.vectram))
+ _vecend = .;
+ } >DATA
+
+ _etext = _vectext + SIZEOF(.vect);
+ PROVIDE (etext = .);
+
+ /* .data section which is used for initialized data */
+
+ .data : AT (_etext)
+ {
+ *(.data .data.*)
+ *(.gnu.linkonce.d.*)
+ SORT(CONSTRUCTORS)
+ } >XDATA
+ . = ALIGN(4);
+
+ __data_start = .;
+ _edata = .;
+ PROVIDE (edata = .);
+
+ /* .bss section which is used for uninitialized data */
+
+ .bss :
+ {
+ __bss_start = .;
+ __bss_start__ = .;
+ *(.bss .bss.*)
+ *(.gnu.linkonce.b.*)
+ *(COMMON)
+ . = ALIGN(4);
+ } >XDATA
+ . = ALIGN(4);
+ __bss_end__ = .;
+
+ _end = .;
+ PROVIDE(end = .);
+
+ /* .heap section which is used for memory allocation */
+
+ .heap (NOLOAD) :
+ {
+ __heap_start__ = .;
+ *(.heap)
+ . = MAX(__heap_start__ + _HEAPSIZE , .);
+ } >DATA
+ __heap_end__ = __heap_start__ + SIZEOF(.heap);
+
+ /* .stack section - user mode stack */
+
+ .stack (__heap_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_start__ = .;
+ *(.stack)
+ . = MAX(__stack_start__ + _STACKSIZE , .);
+ } >DATA
+ __stack_end__ = __stack_start__ + SIZEOF(.stack);
+
+ /* .stack_irq section */
+
+ .stack_irq (__stack_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_irq_start__ = .;
+ *(.stack_irq)
+ . = MAX(__stack_irq_start__ + _STACKSIZE_IRQ , .);
+ } >DATA
+ __stack_irq_end__ = __stack_irq_start__ + SIZEOF(.stack_irq);
+
+ /* .stack_fiq section */
+
+ .stack_fiq (__stack_irq_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_fiq_start__ = .;
+ *(.stack_fiq)
+ . = MAX(__stack_fiq_start__ + _STACKSIZE_FIQ , .);
+ } >DATA
+ __stack_fiq_end__ = __stack_fiq_start__ + SIZEOF(.stack_fiq);
+
+ /* .stack_svc section */
+
+ .stack_svc (__stack_fiq_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_svc_start__ = .;
+ *(.stack_svc)
+ . = MAX(__stack_svc_start__ + _STACKSIZE_SVC , .);
+ } >DATA
+ __stack_svc_end__ = __stack_svc_start__ + SIZEOF(.stack_svc);
+
+ /* .stack_abt section */
+
+ .stack_abt (__stack_svc_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_abt_start__ = .;
+ *(.stack_abt)
+ . = MAX(__stack_abt_start__ + _STACKSIZE_ABT , .);
+ } >DATA
+ __stack_abt_end__ = __stack_abt_start__ + SIZEOF(.stack_abt);
+
+ /* .stack_und section */
+
+ .stack_und (__stack_abt_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_und_start__ = .;
+ *(.stack_und)
+ . = MAX(__stack_und_start__ + _STACKSIZE_UND , .);
+ } >DATA
+ __stack_und_end__ = __stack_und_start__ + SIZEOF(.stack_und);
+
+ /* Stabs debugging sections. */
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+ .stab.excl 0 : { *(.stab.excl) }
+ .stab.exclstr 0 : { *(.stab.exclstr) }
+ .stab.index 0 : { *(.stab.index) }
+ .stab.indexstr 0 : { *(.stab.indexstr) }
+ .comment 0 : { *(.comment) }
+ /* DWARF debug sections.
+ Symbols in the DWARF debugging sections are relative to the beginning
+ of the section so we begin them at 0. */
+ /* DWARF 1 */
+ .debug 0 : { *(.debug) }
+ .line 0 : { *(.line) }
+ /* GNU DWARF 1 extensions */
+ .debug_srcinfo 0 : { *(.debug_srcinfo) }
+ .debug_sfnames 0 : { *(.debug_sfnames) }
+ /* DWARF 1.1 and DWARF 2 */
+ .debug_aranges 0 : { *(.debug_aranges) }
+ .debug_pubnames 0 : { *(.debug_pubnames) }
+ /* DWARF 2 */
+ .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
+ .debug_abbrev 0 : { *(.debug_abbrev) }
+ .debug_line 0 : { *(.debug_line) }
+ .debug_frame 0 : { *(.debug_frame) }
+ .debug_str 0 : { *(.debug_str) }
+ .debug_loc 0 : { *(.debug_loc) }
+ .debug_macinfo 0 : { *(.debug_macinfo) }
+ /* SGI/MIPS DWARF 2 extensions */
+ .debug_weaknames 0 : { *(.debug_weaknames) }
+ .debug_funcnames 0 : { *(.debug_funcnames) }
+ .debug_typenames 0 : { *(.debug_typenames) }
+ .debug_varnames 0 : { *(.debug_varnames) }
+}
+
Added: trunk/firmware/arm/str/led710/STR71x-ROM.ld
===================================================================
--- trunk/firmware/arm/str/led710/STR71x-ROM.ld (rev 0)
+++ trunk/firmware/arm/str/led710/STR71x-ROM.ld 2008-02-06 13:23:20 UTC (rev 831)
@@ -0,0 +1,258 @@
+/***********************************************************************************
+* Copyright 2005 Anglia Design
+* This demo code and associated components are provided as is and has no warranty,
+* implied or otherwise. You are free to use/modify any of the provided
+* code at your own risk in your applications with the expressed limitation
+* of liability (see below)
+*
+* LIMITATION OF LIABILITY: ANGLIA OR ANGLIA DESIGNS SHALL NOT BE LIABLE FOR ANY
+* LOSS OF PROFITS, LOSS OF USE, LOSS OF DATA, INTERRUPTION OF BUSINESS, NOR FOR
+* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND WHETHER UNDER
+* THIS AGREEMENT OR OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+*
+* Author : Spencer Oliver
+* Web : www.anglia-designs.com
+*
+***********************************************************************************/
+
+/* Stack Sizes */
+
+ _STACKSIZE = 1024;
+ _STACKSIZE_IRQ = 256;
+ _STACKSIZE_FIQ = 256;
+ _STACKSIZE_SVC = 0;
+ _STACKSIZE_ABT = 0;
+ _STACKSIZE_UND = 0;
+ _HEAPSIZE = 1024;
+
+/* Memory Definitions */
+
+MEMORY
+{
+ XCODE (rx) : ORIGIN = 0x60000000, LENGTH = 0x00400000
+ CODE (rx) : ORIGIN = 0x40000000, LENGTH = 0x00040000
+ XDATA (rw) : ORIGIN = 0x62000000, LENGTH = 0x00400000
+ DATA (rw) : ORIGIN = 0x20000000, LENGTH = 0x00010000
+}
+
+/* Section Definitions */
+
+SECTIONS
+{
+ /* first section is .text which is used for code */
+
+ .xtext :
+ {
+ *(.xtext .xtext.*)
+ /**lfunc.o (.text*)*/
+ } >XCODE =0
+ . = ALIGN(4);
+
+ _xtext = . + SIZEOF(.xtext);
+ PROVIDE (xtext = .);
+
+ .xdata : AT (_xtext)
+ {
+ *(.xdata .xdata.*)
+ /**lfunc.o (.data*)*/
+ } >XDATA
+ . = ALIGN(4);
+
+ .xbss :
+ {
+ *(.xbss .xbss.*)
+ /**lfunc.o (.bss COMMON)*/
+ . = ALIGN(4);
+ } >XDATA
+ . = ALIGN(4);
+
+ .text :
+ {
+ KEEP(*(.vectrom))
+ KEEP(*(.init))
+ *(.text .text.*)
+ *(.gnu.linkonce.t.*)
+ *(.glue_7t .glue_7)
+ KEEP(*(.fini))
+ *(.gcc_except_table)
+ } >CODE =0
+ . = ALIGN(4);
+
+ /* .ctors .dtors are used for c++ constructors/destructors */
+
+ .ctors :
+ {
+ PROVIDE(__ctors_start__ = .);
+ KEEP(*(SORT(.ctors.*)))
+ KEEP(*(.ctors))
+ PROVIDE(__ctors_end__ = .);
+ } >CODE
+
+ .dtors :
+ {
+ PROVIDE(__dtors_start__ = .);
+ KEEP(*(SORT(.dtors.*)))
+ KEEP(*(.dtors))
+ PROVIDE(__dtors_end__ = .);
+ } >CODE
+
+ /* .rodata section which is used for read-only data (constants) */
+
+ .rodata :
+ {
+ *(.rodata .rodata.*)
+ *(.gnu.linkonce.r.*)
+ } >CODE
+ . = ALIGN(4);
+
+ _vectext = .;
+ PROVIDE (vtext = .);
+
+ .vect : AT (_vectext)
+ {
+ _vecstart = .;
+ KEEP(*(.vectram))
+ _vecend = .;
+ } >DATA
+
+ _etext = _vectext + SIZEOF(.vect);
+ PROVIDE (etext = .);
+
+ /* .data section which is used for initialized data */
+
+ .data : AT (_etext)
+ {
+ __data_start = .;
+ *(.data .data.*)
+ *(.gnu.linkonce.d.*)
+ SORT(CONSTRUCTORS)
+ . = ALIGN(4);
+ *(.fastrun .fastrun.*)
+ } >XDATA
+ . = ALIGN(4);
+
+ _edata = .;
+ PROVIDE (edata = .);
+
+ /* .bss section which is used for uninitialized data */
+
+ .bss :
+ {
+ __bss_start = .;
+ __bss_start__ = .;
+ *(.bss .bss.*)
+ *(.gnu.linkonce.b.*)
+ *(COMMON)
+ . = ALIGN(4);
+ } >XDATA
+ . = ALIGN(4);
+ __bss_end__ = .;
+
+ _end = .;
+ PROVIDE(end = .);
+
+ /* .heap section which is used for memory allocation */
+
+ .heap (NOLOAD) :
+ {
+ __heap_start__ = .;
+ *(.heap)
+ . = MAX(__heap_start__ + _HEAPSIZE , .);
+ } >DATA
+ __heap_end__ = __heap_start__ + SIZEOF(.heap);
+
+ /* .stack section - user mode stack */
+
+ .stack (__heap_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_start__ = .;
+ *(.stack)
+ . = MAX(__stack_start__ + _STACKSIZE , .);
+ } >DATA
+ __stack_end__ = __stack_start__ + SIZEOF(.stack);
+
+ /* .stack_irq section */
+
+ .stack_irq (__stack_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_irq_start__ = .;
+ *(.stack_irq)
+ . = MAX(__stack_irq_start__ + _STACKSIZE_IRQ , .);
+ } >DATA
+ __stack_irq_end__ = __stack_irq_start__ + SIZEOF(.stack_irq);
+
+ /* .stack_fiq section */
+
+ .stack_fiq (__stack_irq_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_fiq_start__ = .;
+ *(.stack_fiq)
+ . = MAX(__stack_fiq_start__ + _STACKSIZE_FIQ , .);
+ } >DATA
+ __stack_fiq_end__ = __stack_fiq_start__ + SIZEOF(.stack_fiq);
+
+ /* .stack_svc section */
+
+ .stack_svc (__stack_fiq_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_svc_start__ = .;
+ *(.stack_svc)
+ . = MAX(__stack_svc_start__ + _STACKSIZE_SVC , .);
+ } >DATA
+ __stack_svc_end__ = __stack_svc_start__ + SIZEOF(.stack_svc);
+
+ /* .stack_abt section */
+
+ .stack_abt (__stack_svc_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_abt_start__ = .;
+ *(.stack_abt)
+ . = MAX(__stack_abt_start__ + _STACKSIZE_ABT , .);
+ } >DATA
+ __stack_abt_end__ = __stack_abt_start__ + SIZEOF(.stack_abt);
+
+ /* .stack_und section */
+
+ .stack_und (__stack_abt_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_und_start__ = .;
+ *(.stack_und)
+ . = MAX(__stack_und_start__ + _STACKSIZE_UND , .);
+ } >DATA
+ __stack_und_end__ = __stack_und_start__ + SIZEOF(.stack_und);
+
+ /* Stabs debugging sections. */
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+ .stab.excl 0 : { *(.stab.excl) }
+ .stab.exclstr 0 : { *(.stab.exclstr) }
+ .stab.index 0 : { *(.stab.index) }
+ .stab.indexstr 0 : { *(.stab.indexstr) }
+ .comment 0 : { *(.comment) }
+ /* DWARF debug sections.
+ Symbols in the DWARF debugging sections are relative to the beginning
+ of the section so we begin them at 0. */
+ /* DWARF 1 */
+ .debug 0 : { *(.debug) }
+ .line 0 : { *(.line) }
+ /* GNU DWARF 1 extensions */
+ .debug_srcinfo 0 : { *(.debug_srcinfo) }
+ .debug_sfnames 0 : { *(.debug_sfnames) }
+ /* DWARF 1.1 and DWARF 2 */
+ .debug_aranges 0 : { *(.debug_aranges) }
+ .debug_pubnames 0 : { *(.debug_pubnames) }
+ /* DWARF 2 */
+ .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
+ .debug_abbrev 0 : { *(.debug_abbrev) }
+ .debug_line 0 : { *(.debug_line) }
+ .debug_frame 0 : { *(.debug_frame) }
+ .debug_str 0 : { *(.debug_str) }
+ .debug_loc 0 : { *(.debug_loc) }
+ .debug_macinfo 0 : { *(.debug_macinfo) }
+ /* SGI/MIPS DWARF 2 extensions */
+ .debug_weaknames 0 : { *(.debug_weaknames) }
+ .debug_funcnames 0 : { *(.debug_funcnames) }
+ .debug_typenames 0 : { *(.debug_typenames) }
+ .debug_varnames 0 : { *(.debug_varnames) }
+}
+
Added: trunk/firmware/arm/str/led710/main.c
===================================================================
--- trunk/firmware/arm/str/led710/main.c (rev 0)
+++ trunk/firmware/arm/str/led710/main.c 2008-02-06 13:23:20 UTC (rev 831)
@@ -0,0 +1,51 @@
+/******************** (C) COPYRIGHT 2003 STMicroelectronics ********************
+* File Name : main.c
+* Author : MCD Application Team
+* Date First Issued : 18/06/2003
+* Description : GPIO library example
+********************************************************************************
+* History:
+* 18/06/2003 : creation
+*******************************************************************************/
+
+#include "71x_lib.h"
+
+void Delay(u32 Xtime);
+
+int main(void)
+{
+#ifdef DEBUG
+ libdebug();
+#endif
+u16 var;
+GPIO_Config( GPIO1, 0xFFFF, GPIO_OUT_PP );
+GPIO_BitWrite(GPIO1, 15, 0x00);
+GPIO_BitWrite(GPIO1, 6, 0x00);
+GPIO_BitWrite(GPIO1, 5, 0x00);
+GPIO_BitWrite(GPIO1, 4, 0x00);
+ // infinite loop
+ while (1)
+ {
+ GPIO_BitWrite(GPIO1, 6, 0x01);
+ Delay(0x2FFFF);
+ GPIO_BitWrite(GPIO1, 5, 0x01);
+ Delay(0x2FFFF);
+ GPIO_BitWrite(GPIO1, 4, 0x01);
+ Delay(0x2FFFF);
+ GPIO_BitWrite(GPIO1, 4, 0x00);
+ Delay(0x2FFFF);
+ GPIO_BitWrite(GPIO1, 5, 0x00);
+ Delay(0x2FFFF);
+ GPIO_BitWrite(GPIO1, 6, 0x00);
+ Delay(0x2FFFF);
+ }
+}
+
+void Delay(u32 Xtime)
+{
+ u32 j;
+
+ for(j=Xtime;j!=0;j--);
+}
+
+/******************* (C) COPYRIGHT 2003 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/led710/startup.s
===================================================================
--- trunk/firmware/arm/str/led710/startup.s (rev 0)
+++ trunk/firmware/arm/str/led71...
[truncated message content] |
|
From: <ak...@us...> - 2008-02-06 16:33:51
|
Revision: 833
http://can.svn.sourceforge.net/can/?rev=833&view=rev
Author: akhe
Date: 2008-02-06 08:33:43 -0800 (Wed, 06 Feb 2008)
Log Message:
-----------
Port of IAR CAN test to GCC
Added Paths:
-----------
trunk/firmware/arm/str/cantest_str73x_gcc/
trunk/firmware/arm/str/cantest_str73x_gcc/73x_lcd.c
trunk/firmware/arm/str/cantest_str73x_gcc/73x_lcd.h
trunk/firmware/arm/str/cantest_str73x_gcc/Makefile
trunk/firmware/arm/str/cantest_str73x_gcc/Readme.txt
trunk/firmware/arm/str/cantest_str73x_gcc/STR73x-RAM.ld
trunk/firmware/arm/str/cantest_str73x_gcc/STR73x-ROM.ld
trunk/firmware/arm/str/cantest_str73x_gcc/main.c
trunk/firmware/arm/str/cantest_str73x_gcc/startup.s
trunk/firmware/arm/str/cantest_str73x_gcc/vector.s
trunk/firmware/arm/str/cantest_str73x_gcc/vectors.c
trunk/firmware/arm/str/cantest_str73x_gcc/vectors.h
Added: trunk/firmware/arm/str/cantest_str73x_gcc/73x_lcd.c
===================================================================
--- trunk/firmware/arm/str/cantest_str73x_gcc/73x_lcd.c (rev 0)
+++ trunk/firmware/arm/str/cantest_str73x_gcc/73x_lcd.c 2008-02-06 16:33:43 UTC (rev 833)
@@ -0,0 +1,474 @@
+/******************** (C) COPYRIGHT 2005 STMicroelectronics **********************
+* File Name : 73x_lcd.c
+* Author : MCD Application Team
+* Date First Issued : 09/27/2005 : V1.0
+* Description : This file provides all the LCD software functions.
+**********************************************************************************
+* History:
+* 09/27/2005 : V1.0
+**********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH
+* CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT
+* OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT
+* OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION
+* CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*********************************************************************************/
+/* Standard includes -----------------------------------------------------------*/
+#include "73x_lcd.h"
+#include "73x_lib.h"
+/* Include of other module interface headers -----------------------------------*/
+/* Local includes --------------------------------------------------------------*/
+/* Private typedef -------------------------------------------------------------*/
+/* Private define --------------------------------------------------------------*/
+/* Private macro ---------------------------------------------------------------*/
+/* Private variables -----------------------------------------------------------*/
+vu16 LCDDelay = 0;
+/* Private function prototypes -------------------------------------------------*/
+// Define GPIO Init Structure */
+GPIO_InitTypeDef GPIO_InitStructure0;
+/* Interface functions ---------------------------------------------------------*/
+/* Private functions -----------------------------------------------------------*/
+
+
+/*******************************************************************************
+* Function Name : LCD_Init
+* Description : Initializes the LCD driver.
+* Input : None
+* Output : None
+* Return : None
+*******************************************************************************/
+void LCD_Init(void)
+{
+ /* GPIO6 Clock Enable */
+ CFG_PeripheralClockConfig(CFG_CLK_GPIO6 , ENABLE);
+
+ /* GPIO6 Configuration */
+ GPIO_InitStructure0.GPIO_Mode = GPIO_Mode_OUT_PP;
+ GPIO_InitStructure0.GPIO_Pins = GPIO_PIN_0 | GPIO_PIN_1 |GPIO_PIN_10;
+ GPIO_Init(GPIO6, &GPIO_InitStructure0);
+
+ /* GPIO5 Clock Enable */
+ CFG_PeripheralClockConfig(CFG_CLK_GPIO5 , ENABLE);
+
+ /* GPIO5 Configuration */
+ GPIO_InitStructure0.GPIO_Mode = GPIO_Mode_OUT_PP;
+ GPIO_InitStructure0.GPIO_Pins = GPIO_PIN_12 | GPIO_PIN_13 |GPIO_PIN_14 |GPIO_PIN_15;
+ GPIO_Init(GPIO5, &GPIO_InitStructure0);
+
+ /* GPIO2 Clock Enable */
+ CFG_PeripheralClockConfig(CFG_CLK_GPIO2 , ENABLE);
+
+ /* GPIO2 Configuration */
+ GPIO_InitStructure0.GPIO_Mode = GPIO_Mode_OUT_PP;
+ GPIO_InitStructure0.GPIO_Pins = GPIO_PIN_0;
+ GPIO_Init(GPIO2, &GPIO_InitStructure0);
+ GPIO_BitWrite(GPIO2, GPIO_PIN_0, Bit_SET);
+
+ // Wait 40 ms
+ LCD_Wait(4000);
+ LCD_Send_Command_4bit(0x30);
+
+ // Wait 6 ms
+ LCD_Wait(600);
+ LCD_Send_Command_4bit(0x30);
+
+ // Wait 6 ms
+ LCD_Wait(600);
+ LCD_Send_Command_4bit(0x30);
+
+ // Wait 6 ms
+ LCD_Wait(600);
+ LCD_Send_Command_4bit(0x20);
+
+ // Wait 6 ms
+ LCD_Wait(600);
+ LCD_Send_Command_4bit(0x20);
+
+ // Wait 6 ms
+ LCD_Wait(600);
+ LCD_Send_Command_4bit(0xF0);
+
+ // Wait 6 ms
+ LCD_Wait(600);
+ LCD_Send_Command_4bit(0x00);
+
+ // Wait 6 ms
+ LCD_Wait(600);
+ LCD_Send_Command_4bit(0x80);
+
+ // Wait 6 ms
+ LCD_Wait(600);
+ LCD_Send_Command_4bit(0x00);
+
+ // Wait 6 ms
+ LCD_Wait(600);
+ LCD_Send_Command_4bit(0x10);
+
+ // Wait 6 ms
+ LCD_Wait(600);
+ LCD_Send_Command_4bit(0x00);
+
+ // Wait 6 ms
+ LCD_Wait(600);
+ LCD_Send_Command_4bit(0x60);
+
+ // Wait 6 ms
+ LCD_Wait(600);
+}
+
+/*******************************************************************************
+* Function Name : LCD_E_High
+* Description : Puts the LCD Enable line (E) high.
+* Input : None
+* Output : None
+* Return : None
+*******************************************************************************/
+void LCD_E_High(void)
+{
+ GPIO_BitWrite(GPIO6, LCD_PIN_E, Bit_SET);
+}
+
+/*******************************************************************************
+* Function Name : LCD_E_Low
+* Description : Puts the LCD Enable line (E) low.
+* Input : None
+* Output : None
+* Return : None
+*******************************************************************************/
+void LCD_E_Low(void)
+{
+ GPIO_BitWrite(GPIO6, LCD_PIN_E, Bit_RESET);
+}
+
+/*******************************************************************************
+* Function name : LCD_Send_Command_4bit
+* Description : Sends a command to the LCD.
+* Input param : Cmd: command to be sent.
+* Output param : None
+* Return : None
+*******************************************************************************/
+void LCD_Send_Command_4bit(u8 Cmd)
+{
+ // Reset RW bit
+ GPIO_BitWrite(GPIO6, LCD_PIN_RW, Bit_RESET);
+
+ // Reset RS bit
+ GPIO_BitWrite(GPIO6, LCD_PIN_RS, Bit_RESET);
+
+ // Set E bit
+ GPIO_BitWrite(GPIO6, LCD_PIN_E, Bit_SET);
+
+ // Send the command
+ GPIO_ByteWrite(GPIO5, GPIO_MSB, Cmd & 0xF0);
+
+ // Reset E bit
+ GPIO_BitWrite(GPIO6, LCD_PIN_E, Bit_RESET);
+
+ // Cmd Shift
+ Cmd = Cmd << 4;
+
+ // Set E bit
+ GPIO_BitWrite(GPIO6, LCD_PIN_E, Bit_SET);
+
+ // Send the command
+ GPIO_ByteWrite(GPIO5, GPIO_MSB, Cmd & 0xF0);
+
+ // Reset E bit
+ GPIO_BitWrite(GPIO6, LCD_PIN_E, Bit_RESET);
+
+ // Set RS bit
+ GPIO_BitWrite(GPIO6, LCD_PIN_RS, Bit_SET);
+
+ // Set RW bit
+ GPIO_BitWrite(GPIO6, LCD_PIN_RW, Bit_SET);
+}
+
+/*******************************************************************************
+* Function Name : LCD_SendData_4bit
+* Description : Sends data to the LCD.
+* Input : Data: data to be displayed.
+* Output : None
+* Return : None
+*******************************************************************************/
+void LCD_SendData_4bit(u8 Data)
+{
+
+ // Set RS bit
+ GPIO_BitWrite(GPIO6, LCD_PIN_RS, Bit_SET);
+
+ // Reset RW bit
+ GPIO_BitWrite(GPIO6, LCD_PIN_RW, Bit_RESET);
+
+ // Set E bit
+ GPIO_BitWrite(GPIO6, LCD_PIN_E, Bit_SET);
+
+ // Data on GPIO_MSB
+ GPIO_ByteWrite(GPIO5, GPIO_MSB, Data & 0xF0);
+
+
+ // Reset E bit
+ GPIO_BitWrite(GPIO6, LCD_PIN_E, Bit_RESET);
+
+ // Data Shift
+ Data = Data << 4;
+
+ // Set E bit
+ GPIO_BitWrite(GPIO6, LCD_PIN_E, Bit_SET);
+
+ // Data on GPIO_MSB
+ GPIO_ByteWrite(GPIO5, GPIO_MSB, Data);
+
+
+ // Reset E bit
+ GPIO_BitWrite(GPIO6, LCD_PIN_E, Bit_RESET);
+
+ // Reset RS bit
+ GPIO_BitWrite(GPIO6, LCD_PIN_RS, Bit_RESET);
+
+ // Reset RW bit
+ GPIO_BitWrite(GPIO6, LCD_PIN_RW, Bit_SET);
+}
+
+/*******************************************************************************
+* Function Name : LCD_SendString
+* Description : Displays a string on the LCD.
+* Input : - pBuffer: pointer to the buffer containing the data to be
+* displayed on the LCD.
+* - Line: specifies the line where the string will be displayed.
+* - Column: specifies the start column from where the string will
+* be displayed.
+* Output : None
+* Return : None
+*******************************************************************************/
+void LCD_SendString(u8 *pBuffer, u8 Line, u8 Column)
+{
+ u8 len = 0, count = 0;
+
+ len = strlen(( const char *)pBuffer);
+
+ if((len < (LCD_HALF_LENGTH + 2 - Column)))
+ {
+ LCD_SetPosCur(Line, Column);
+
+ for(count =0; count < len; count++)
+ {
+ LCD_SendData_4bit(pBuffer[count]);
+ }
+ }
+ else
+ {
+ LCD_SetPosCur(Line, Column);
+
+ for(count = 0; count <= (LCD_HALF_LENGTH-Column); count++)
+ {
+ LCD_SendData_4bit(pBuffer[count]);
+ }
+
+ LCD_SetPosCur(2, 1);
+
+ for(count = (LCD_HALF_LENGTH-Column+1); count < len; count++)
+ {
+ LCD_SendData_4bit(pBuffer[count]);
+ }
+ }
+}
+
+/*******************************************************************************
+* Function Name : LCD_SendStringByStep
+* Description : Displays a string on the LCD by step.
+* Input : - pBuffer: pointer to the buffer containing the data to be
+* displayed on the LCD.
+* - Line: specifies the line where the string will be displayed.
+* - Column: specifies the start column from where the string will
+* be displayed.
+* Output : None
+* Return : None
+*******************************************************************************/
+void LCD_SendStringByStep(u8 *pBuffer, u8 Line, u8 Column)
+{
+ u8 len = 0, count = 0;
+
+ len = strlen(( const char *)pBuffer);
+
+ if(len < (LCD_HALF_LENGTH + 2 - Column))
+ {
+ LCD_SetPosCur(Line, Column);
+
+ for(count =0; count < len; count++)
+ {
+ // wait 200 ms
+ LCD_Wait(20000);
+ LCD_SendData_4bit(pBuffer[count]);
+ }
+ }
+ else
+ {
+ LCD_SetPosCur(Line, Column);
+
+ for(count = 0; count <= (LCD_HALF_LENGTH-Column); count++)
+ {
+ // wait 200 ms
+ LCD_Wait(20000);
+ LCD_SendData_4bit(pBuffer[count]);
+ }
+
+ LCD_SetPosCur(2, 1);
+
+ for(count = (LCD_HALF_LENGTH-Column+1); count < len; count++)
+ {
+ // wait 200 ms
+ LCD_Wait(20000);
+ LCD_SendData_4bit(pBuffer[count]);
+ }
+ }
+}
+
+/*******************************************************************************
+* Function Name : LCD_SendStringPinPong
+* Description : Displays a string on the LCD as ping pong.
+* Input : - pBuffer: pointer to the buffer containing the data to be
+* displayed on the LCD.
+* - Line: specifies the line where the string will be displayed.
+* - nTime: number of ping pong.
+* Output :
+* Return : None
+*******************************************************************************/
+void LCD_SendStringPinPong(u8 *pBuffer, u8 Line, u32 nTime)
+{
+ u8 len = 0, index = 1;
+ bool Direction = TRUE;
+
+ len = strlen(( const char *)pBuffer);
+
+ while(nTime--)
+ {
+ if(Direction)
+ {
+ LCD_SendString(pBuffer, Line, index);
+ // wait 200 ms
+ LCD_Wait(20000);
+ index++;
+ LCD_LineClear(Line);
+ if(index == (LCD_HALF_LENGTH - len) + 1)
+ {
+ Direction = FALSE;
+ }
+ }
+ else
+ {
+ LCD_SendString(pBuffer, Line, index);
+ // wait 200 ms
+ LCD_Wait(20000);
+ index--;
+ LCD_LineClear(Line);
+ if(index == 1)
+ {
+ Direction = TRUE;
+ }
+ }
+ }
+}
+
+/*******************************************************************************
+* Function Name : LCD_SetPosCur
+* Description : Sets the line and column position of the LCD cursor.
+* Input : - Line: specifies the cursor's line position.
+* - Column: specifies cursor's column position.
+* Output : None
+* Return : None
+*******************************************************************************/
+void LCD_SetPosCur(u8 Line, u8 Column)
+{
+ if(Line == 1)
+ {
+ Column = Column - 1;
+ }
+ else
+ {
+ Column = Column -1 + 64;
+ }
+
+ LCD_Send_Command_4bit(Column | 0x80);
+}
+
+/*******************************************************************************
+* Function Name : LCD_Clear
+* Description : Clears the LCD display.
+* Input : None
+* Output : None
+* Return : None
+*******************************************************************************/
+void LCD_Clear(void)
+{
+ /* reset RS bit */
+ GPIO_BitWrite(GPIO6, LCD_PIN_RS, Bit_RESET);
+
+ /* send "DISPLAY CLEAR COMMAND" command */
+ LCD_Send_Command_4bit(LCD_CMD_CLR_DISP);
+
+}
+
+/*******************************************************************************
+* Function Name : LCD_LineClear
+* Description : Clears the LCD specified line.
+* Input : Line: line to be cleared.
+* Output : None
+* Return : None
+*******************************************************************************/
+void LCD_LineClear(u8 Line)
+{
+ u8 j = 0;
+
+ /* reset RS bit */
+ GPIO_BitWrite(GPIO6, LCD_PIN_RS, Bit_RESET);
+
+ LCD_SetPosCur(Line, 1);
+
+ /* set RS bit */
+ GPIO_BitWrite(GPIO6, LCD_PIN_RS, Bit_SET);
+
+ /* write LCD_HALF_LENGTH spaces to clear the line */
+ for(j = LCD_HALF_LENGTH; j != 0; j--)
+ {
+ LCD_SendData_4bit(' ');
+ }
+}
+
+/*******************************************************************************
+* Function Name : LCD_DigitDisplay
+* Description : Displays a digit on the LCD.
+* Input : - Digit: digit to be displayed.
+* - Line: specifies the line where the digit will be displayed.
+* - Column: specifies the start column from where the digit will
+* be displayed.
+* Output : None
+* Return : None
+*******************************************************************************/
+void LCD_DigitDisplay(u8 Digit, u8 Line, u8 Column)
+{
+ LCD_SetPosCur(Line, Column);
+
+ LCD_SendData_4bit(Digit + 48);
+}
+
+/*******************************************************************************
+* Function Name : LCD_Wait
+* Description : Inserts a delay.
+* Input : nTime: specifies the time-out value.
+* Output : LCDDelay: incremented each 125 \xB5s in TB1 interrupt handler
+* routine and used to define the time-out value.
+* Return : None
+*******************************************************************************/
+void LCD_Wait(u32 nTime)
+{
+ LCDDelay = 0;
+
+ while(LCDDelay < nTime)
+ {
+ LCDDelay++;
+ }
+}
+
+
+/******************* (C) COPYRIGHT 2005 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/cantest_str73x_gcc/73x_lcd.h
===================================================================
--- trunk/firmware/arm/str/cantest_str73x_gcc/73x_lcd.h (rev 0)
+++ trunk/firmware/arm/str/cantest_str73x_gcc/73x_lcd.h 2008-02-06 16:33:43 UTC (rev 833)
@@ -0,0 +1,93 @@
+/******************** (C) COPYRIGHT 2005 STMicroelectronics ********************
+* File Name : 73x_lcd.h
+* Author : MCD Application Team
+* Date First Issued : 09/27/2005 : V1.0
+* Description : This file contains all the functions prototypes for the
+* LCD software library.
+**********************************************************************************
+* History:
+* 09/27/2005 : V1.0
+**********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH
+* CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT
+* OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT
+* OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION
+* CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*********************************************************************************/
+
+/* Define to prevent recursive inclusion ---------------------------------------*/
+#ifndef __73x_LCD_H
+#define __73x_LCD_H
+
+/* Includes ----------------------------------------------------------------- */
+#include "73x_lib.h"
+#include "string.h"
+
+/* Exported types ----------------------------------------------------------- */
+
+#define LCD_LENGTH 32
+#define LCD_HALF_LENGTH (LCD_LENGTH/2)
+
+#define LCD_PORT_COMMAND GPIO6
+#define LCD_PORT_DATA GPIO6
+
+#define LCD_PIN_E GPIO_PIN_0
+#define LCD_PIN_RS GPIO_PIN_1
+#define LCD_PIN_RW GPIO_PIN_10
+
+#define LCD_CMD_4BIT 0x20
+
+#define LCD_CMD_CLR_DISP 0x01
+#define LCD_CMD_CRS_HOME 0x02
+#define LCD_CMD_DECREM_NOSHIFT 0x04
+#define LCD_CMD_DECREM_SHIFT 0x05
+#define LCD_CMD_INCREM_NOSHIFT 0x06
+#define LCD_CMD_INCREM_SHIFT 0x07
+
+#define LCD_CMD_DISPOFF_CURSOFF_BLKOFF 0x08
+#define LCD_CMD_DISPOFF_CURSOFF_BLKON 0x09
+#define LCD_CMD_DISPOFF_CURSON_BLKOFF 0x0A
+#define LCD_CMD_DISPOFF_CURSON_BLKON 0x0B
+#define LCD_CMD_DISPON_CURSOFF_BLKOFF 0x0C
+#define LCD_CMD_DISPON_CURSOFF_BLKON 0x0D
+#define LCD_CMD_DISPON_CURSON_BLKOFF 0x0E
+#define LCD_CMD_DISPON_CURSON_BLKON 0x0F
+
+#define LCD_CMD_CURSMOVE_SHIFTL 0x10
+#define LCD_CMD_CURSMOVE_SHIFTR 0x14
+#define LCD_CMD_DISPSHIFT_SHIFTL 0x18
+#define LCD_CMD_DISPSHIFT_SHIFTR 0x1C
+
+#define LCD_CMD_4BIT_1LINE_8DOT 0x20
+#define LCD_CMD_4BIT_1LINE_10DOT 0x24
+#define LCD_CMD_4BIT_2LINE_8DOT 0x28
+#define LCD_CMD_4BIT_2LINE_10DOT 0x2C
+
+
+/* Module private variables ----------------------------------------------------*/
+
+/* Exported macro --------------------------------------------------------------*/
+
+/* Private functions -----------------------------------------------------------*/
+
+/* Exported functions ----------------------------------------------------------*/
+void LCD_Init(void);
+void LCD_E_High(void);
+void LCD_E_Low(void);
+void LCD_Send_Command_4bit(u8 Cmd);
+void LCD_SendData_4bits(u8 Data);
+void LCD_SendString(u8 *pBuffer, u8 Line, u8 Column);
+void LCD_SendStringByStep(u8 *pBuffer, u8 Line, u8 Column);
+void LCD_SendStringPinPong(u8 *pBuffer, u8 Line, u32 nTime);
+void LCD_SetPosCur(u8 Line, u8 Column);
+void LCD_Clear(void);
+void LCD_LineClear(u8 Line);
+void LCD_DigitDisplay(u8 Digit, u8 Line, u8 Column);
+void LCD_Wait(u32 nTime);
+
+#endif /*__73x_LCD_H */
+
+/******************* (C) COPYRIGHT 2005 STMicroelectronics *****END OF FILE******/
+
+
Added: trunk/firmware/arm/str/cantest_str73x_gcc/Makefile
===================================================================
--- trunk/firmware/arm/str/cantest_str73x_gcc/Makefile (rev 0)
+++ trunk/firmware/arm/str/cantest_str73x_gcc/Makefile 2008-02-06 16:33:43 UTC (rev 833)
@@ -0,0 +1,497 @@
+# Hey Emacs, this is a -*- makefile -*-
+#
+# WinARM template makefile
+# by Giacomo Fazio and Antonio Nasca, Catania, Italy
+# <gia...@gm...>
+# <ant...@ho...>
+#
+# based on the WinARM template makefile written by Martin Thomas
+# Released to the Public Domain
+# Please read the make user manual!
+#
+#
+# On command line:
+#
+# make all = Make software.
+#
+# make clean = Clean out built project files.
+#
+# make program = Download the hex file to the device
+#
+# (TODO: make filename.s = Just compile filename.c into the assembler code only)
+#
+# To rebuild project do "make clean" then "make all".
+# Toolchain prefix (i.e arm-elf -> arm-elf-gcc.exe)
+TCHAIN = arm-elf
+#TCHAIN = arm-none-eabi
+
+#USE_THUMB_MODE = YES
+USE_THUMB_MODE = NO
+
+# MCU name and submodel
+MCU = arm7tdmi
+SUBMDL = STR73x
+
+## Create ROM-Image
+RUN_MODE=ROM_RUN
+## Create RAM-Image
+#RUN_MODE=RAM_RUN
+
+## not supported in this example:
+## Exception-Vector placement only supported for "ROM_RUN"
+## (placement settings ignored when using "RAM_RUN")
+## - Exception vectors in ROM:
+#VECTOR_LOCATION=VECTORS_IN_ROM
+## - Exception vectors in RAM:
+#VECTOR_LOCATION=VECTORS_IN_RAM
+
+
+# Target file name (without extension).
+TARGET = main
+
+# List C source files here. (C dependencies are automatically generated.)
+# use file-extension c for "c-only"-files
+SRC = $(TARGET).c ../common/73x_lcd.c ../common/sysTime.c ../common/delay.c
+
+# List C source files here which must be compiled in ARM-Mode.
+# use file-extension c for "c-only"-files
+SRCARM = vectors.c
+# thumb is possible too for vectors.c - keep ARM, TODO: profile
+
+# List C++ source files here.
+# use file-extension cpp for C++-files (use extension .cpp)
+CPPSRC =
+
+# List C++ source files here which must be compiled in ARM-Mode.
+# use file-extension cpp for C++-files (use extension .cpp)
+#CPPSRCARM = $(TARGET).cpp
+CPPSRCARM =
+
+# List Assembler source files here.
+# Make them always end in a capital .S. Files ending in a lowercase .s
+# will not be considered source files but generated files (assembler
+# output from the compiler), and will be deleted upon "make clean"!
+# Even though the DOS/Win* filesystem matches both .s and .S the same,
+# it will preserve the spelling of the filenames, and gcc itself does
+# care about how the name is spelled on its command-line.
+ASRC =
+
+# List Assembler source files here which must be assembled in ARM-Mode..
+ASRCARM = vector.S startup.S
+
+# Path to Linker-Scripts
+LINKERSCRIPTPATH = .
+
+## Output format. (can be ihex or binary or both)
+## (binary i.e. for openocd and SAM-BA, hex i.e. for lpc21isp and uVision)
+#FORMAT = ihex
+#FORMAT = binary
+FORMAT = both
+
+# Optimization level, can be [0, 1, 2, 3, s].
+# 0 = turn off optimization. s = optimize for size.
+# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
+#OPT = s
+OPT = 0
+
+## Using the Atmel AT91_lib produces warning with
+## the default warning-levels.
+## yes - disable these warnings; no - keep default settings
+#AT91LIBNOWARN = yes
+AT91LIBNOWARN = no
+
+# Debugging format.
+# Native formats for AVR-GCC's -g are stabs [default], or dwarf-2.
+# AVR (extended) COFF requires stabs, plus an avr-objcopy run.
+#DEBUG = stabs
+DEBUG = dwarf-2
+
+# List any extra directories to look for include files here.
+# Each directory must be seperated by a space.
+EXTRAINCDIRS = "K:/include" ../common/str73x_lib/include
+
+# List any extra directories to look for library files here.
+# Each directory must be seperated by a space.
+#EXTRA_LIBDIRS = ../arm7_efsl_0_2_4
+EXTRA_LIBDIRS = K:/lib ../common/str73x_lib
+
+
+# Compiler flag to set the C Standard level.
+# c89 - "ANSI" C
+# gnu89 - c89 plus GCC extensions
+# c99 - ISO C99 standard (not yet fully implemented)
+# gnu99 - c99 plus GCC extensions
+CSTANDARD = -std=gnu99
+
+# Place -D or -U options for C here
+CDEFS = -D$(RUN_MODE)
+
+# Place -I options here
+CINCS =
+
+# Place -D or -U options for ASM here
+ADEFS = -D$(RUN_MODE)
+
+ifdef VECTOR_LOCATION
+CDEFS += -D$(VECTOR_LOCATION)
+ADEFS += -D$(VECTOR_LOCATION)
+endif
+
+CDEFS += -D__WinARM__ -D__WINARMSUBMDL_$(SUBMDL)__
+ADEFS += -D__WinARM__ -D__WINARMSUBMDL_$(SUBMDL)__
+
+# Compiler flags.
+
+ifeq ($(USE_THUMB_MODE),YES)
+THUMB = -mthumb
+THUMB_IW = -mthumb-interwork
+else
+THUMB =
+THUMB_IW =
+endif
+
+# -g*: generate debugging information
+# -O*: optimization level
+# -f...: tuning, see GCC manual and avr-libc documentation
+# -Wall...: warning level
+# -Wa,...: tell GCC to pass this to the assembler.
+# -adhlns...: create assembler listing
+#
+# Flags for C and C++ (arm-elf-gcc/arm-elf-g++)
+CFLAGS = -g$(DEBUG)
+CFLAGS += $(CDEFS) $(CINCS)
+CFLAGS += -O$(OPT)
+CFLAGS += -Wall -Wcast-align -Wimplicit
+CFLAGS += -Wpointer-arith -Wswitch
+CFLAGS += -ffunction-sections -fdata-sections
+CFLAGS += -Wredundant-decls -Wreturn-type -Wshadow -Wunused
+CFLAGS += -Wa,-adhlns=$(subst $(suffix $<),.lst,$<)
+CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
+
+# flags only for C
+CONLYFLAGS += -Wnested-externs
+CONLYFLAGS += $(CSTANDARD)
+
+ifneq ($(AT91LIBNOWARN),yes)
+#AT91-lib warnings with:
+CFLAGS += -Wcast-qual
+CONLYFLAGS += -Wmissing-prototypes
+CONLYFLAGS += -Wstrict-prototypes
+CONLYFLAGS += -Wmissing-declarations
+endif
+
+# flags only for C++ (arm-elf-g++)
+# CPPFLAGS = -fno-rtti -fno-exceptions
+CPPFLAGS =
+
+# Assembler flags.
+# -Wa,...: tell GCC to pass this to the assembler.
+# -ahlns: create listing
+# -g$(DEBUG): have the assembler create line number information
+ASFLAGS = $(ADEFS) -Wa,-adhlns=$(<:.S=.lst),-g$(DEBUG)
+
+
+#Additional libraries.
+
+# Extra libraries
+# Each library-name must be seperated by a space.
+# To add libxyz.a, libabc.a and libefsl.a:
+# EXTRA_LIBS = xyz abc efsl
+#EXTRA_LIBS = efsl
+EXTRA_LIBS = STR73x_lib
+
+#Support for newlibc-lpc (file: libnewlibc-lpc.a)
+#NEWLIBLPC = -lnewlib-lpc
+
+MATH_LIB = -lm
+
+# CPLUSPLUS_LIB = -lstdc++
+
+
+# Linker flags.
+# -Wl,...: tell GCC to pass this to linker.
+# -Map: create map file
+# --cref: add cross reference to map file
+LDFLAGS = -nostartfiles -Wl,-Map=$(TARGET).map,--cref,--gc-sections
+LDFLAGS += -lc
+LDFLAGS += $(NEWLIBLPC) $(MATH_LIB)
+LDFLAGS += -lc -lgcc
+LDFLAGS += $(CPLUSPLUS_LIB)
+LDFLAGS += $(patsubst %,-L%,$(EXTRA_LIBDIRS))
+LDFLAGS += $(patsubst %,-l%,$(EXTRA_LIBS))
+
+# Set Linker-Script Depending On Selected Memory and Controller
+ifeq ($(RUN_MODE),RAM_RUN)
+LDFLAGS +=-T$(LINKERSCRIPTPATH)/$(SUBMDL)-RAM.ld
+else
+LDFLAGS +=-T$(LINKERSCRIPTPATH)/$(SUBMDL)-ROM.ld
+endif
+
+
+# Define directories, if needed.
+## DIRARM = c:/WinARM/
+## DIRARMBIN = $(DIRAVR)/bin/
+## DIRAVRUTILS = $(DIRAVR)/utils/bin/
+
+# Define programs and commands.
+SHELL = sh
+CC = $(TCHAIN)-gcc
+CPP = $(TCHAIN)-g++
+AR = $(TCHAIN)-ar
+OBJCOPY = $(TCHAIN)-objcopy
+OBJDUMP = $(TCHAIN)-objdump
+SIZE = $(TCHAIN)-size
+NM = $(TCHAIN)-nm
+REMOVE = rm -f
+REMOVEDIR = rm -f -r
+COPY = cp
+
+# Define Messages
+# English
+MSG_ERRORS_NONE = Errors: none
+MSG_BEGIN = "-------- begin (mode: $(RUN_MODE)) --------"
+MSG_END = -------- end --------
+MSG_SIZE_BEFORE = Size before:
+MSG_SIZE_AFTER = Size after:
+MSG_FLASH = Creating load file for Flash:
+MSG_EXTENDED_LISTING = Creating Extended Listing:
+MSG_SYMBOL_TABLE = Creating Symbol Table:
+MSG_LINKING = Linking:
+MSG_COMPILING = Compiling C:
+MSG_COMPILING_ARM = "Compiling C (ARM-only):"
+MSG_COMPILINGCPP = Compiling C++:
+MSG_COMPILINGCPP_ARM = "Compiling C++ (ARM-only):"
+MSG_ASSEMBLING = Assembling:
+MSG_ASSEMBLING_ARM = "Assembling (ARM-only):"
+MSG_CLEANING = Cleaning project:
+MSG_FORMATERROR = Can not handle output-format
+MSG_LPC21_RESETREMINDER = You may have to bring the target in bootloader-mode now.
+
+# Define all object files.
+COBJ = $(SRC:.c=.o)
+AOBJ = $(ASRC:.S=.o)
+COBJARM = $(SRCARM:.c=.o)
+AOBJARM = $(ASRCARM:.S=.o)
+CPPOBJ = $(CPPSRC:.cpp=.o)
+CPPOBJARM = $(CPPSRCARM:.cpp=.o)
+
+# Define all listing files.
+LST = $(ASRC:.S=.lst) $(ASRCARM:.S=.lst) $(SRC:.c=.lst) $(SRCARM:.c=.lst)
+LST += $(CPPSRC:.cpp=.lst) $(CPPSRCARM:.cpp=.lst)
+
+# Compiler flags to generate dependency files.
+### GENDEPFLAGS = -Wp,-M,-MP,-MT,$(*F).o,-MF,.dep/$(@F).d
+GENDEPFLAGS = -MD -MP -MF .dep/$(@F).d
+
+# Combine all necessary flags and optional flags.
+# Add target processor to flags.
+ALL_CFLAGS = -mcpu=$(MCU) $(THUMB_IW) -I. $(CFLAGS) $(GENDEPFLAGS)
+ALL_ASFLAGS = -mcpu=$(MCU) $(THUMB_IW) -I. -x assembler-with-cpp $(ASFLAGS)
+
+
+# Default target.
+all: begin gccversion sizebefore build sizeafter finished end
+
+ifeq ($(FORMAT),ihex)
+build: elf hex lss sym
+hex: $(TARGET).hex
+IMGEXT=hex
+else
+ifeq ($(FORMAT),binary)
+build: elf bin lss sym
+bin: $(TARGET).bin
+IMGEXT=bin
+else
+ifeq ($(FORMAT),both)
+build: elf hex bin lss sym
+hex: $(TARGET).hex
+bin: $(TARGET).bin
+else
+$(error "$(MSG_FORMATERROR) $(FORMAT)")
+endif
+endif
+endif
+
+elf: $(TARGET).elf
+lss: $(TARGET).lss
+sym: $(TARGET).sym
+
+# Eye candy.
+begin:
+ @echo
+ @echo $(MSG_BEGIN)
+
+finished:
+ @echo $(MSG_ERRORS_NONE)
+
+end:
+ @echo $(MSG_END)
+ @echo
+
+
+# Display size of file.
+HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
+ELFSIZE = $(SIZE) -A $(TARGET).elf
+sizebefore:
+ @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); echo; fi
+
+sizeafter:
+ @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi
+
+
+# Display compiler version information.
+gccversion :
+ @$(CC) --version
+
+# FLASH Programming with OPENOCD
+
+# specify the directory where openocd executable resides (openocd-ftd2xx.exe or openocd-pp.exe)
+# Note: you may have to adjust this if a newer version of YAGARTO has been downloaded
+OPENOCD_DIR = 'C:\Program Files\openocd-r247\bin\'
+
+# specify OpenOCD executable (pp is for the wiggler, ftd2xx is for the USB debugger)
+#OPENOCD = $(OPENOCD_DIR)openocd-pp.exe
+OPENOCD = $(OPENOCD_DIR)openocd-ftd2xx.exe
+
+# specify OpenOCD configuration file (pick the one for your device)
+#OPENOCD_CFG = C:\openocd-configs\str73x-configs\str73x_signalyzer-flash-program.cfg
+#OPENOCD_CFG = C:\openocd-configs\str73x-configs\str73x_jtagkey-flash-program.cfg
+#OPENOCD_CFG = C:\openocd-configs\str73x-configs\str73x_armusbocd-flash-program.cfg
+#OPENOCD_CFG = C:\openocd-configs\str73x-configs\str73x_pp-flash-program.cfg
+#OPENOCD_CFG = "D:\develop...
[truncated message content] |
|
From: <ak...@us...> - 2008-02-11 17:33:31
|
Revision: 837
http://can.svn.sourceforge.net/can/?rev=837&view=rev
Author: akhe
Date: 2008-02-11 09:33:26 -0800 (Mon, 11 Feb 2008)
Log Message:
-----------
Added starter code for VSCP demo node for str73x
Modified Paths:
--------------
trunk/firmware/arm/str/cantest_str73x_gcc/main.c
trunk/firmware/arm/str/cantest_str73x_gcc/vectors.c
trunk/firmware/arm/str/common/sysTime.c
Added Paths:
-----------
trunk/firmware/arm/str/vscp_node_str73x_gcc/
trunk/firmware/arm/str/vscp_node_str73x_gcc/Makefile
trunk/firmware/arm/str/vscp_node_str73x_gcc/Readme.txt
trunk/firmware/arm/str/vscp_node_str73x_gcc/STR73x-RAM.ld
trunk/firmware/arm/str/vscp_node_str73x_gcc/STR73x-ROM.ld
trunk/firmware/arm/str/vscp_node_str73x_gcc/main.c
trunk/firmware/arm/str/vscp_node_str73x_gcc/startup.s
trunk/firmware/arm/str/vscp_node_str73x_gcc/vector.s
trunk/firmware/arm/str/vscp_node_str73x_gcc/vectors.c
trunk/firmware/arm/str/vscp_node_str73x_gcc/vectors.h
trunk/firmware/arm/str/vscp_node_str73x_gcc/vscpnode.pnproj
trunk/firmware/arm/str/vscp_node_str73x_gcc/vscpnode.pnps
Modified: trunk/firmware/arm/str/cantest_str73x_gcc/main.c
===================================================================
--- trunk/firmware/arm/str/cantest_str73x_gcc/main.c 2008-02-11 17:19:34 UTC (rev 836)
+++ trunk/firmware/arm/str/cantest_str73x_gcc/main.c 2008-02-11 17:33:26 UTC (rev 837)
@@ -289,12 +289,9 @@
// wait until end of transmission
CAN_WaitEndOfTx( CAN0 );
- GPIO_BitWrite( GPIO0, LD16, Bit_SET ); // LED16;
-
// release the TX message object
CAN_ReleaseTxMessage( CAN0, CAN0_TX_MSGOBJ );
-
// Check for a data frame
if ( CAN_ReceiveMessage( CAN0, CAN0_RX_MSGOBJ, FALSE, &RxCan0Msg ) ) {
@@ -327,10 +324,7 @@
} // Received frame
-
- delay_ms( 500 );
-
-/*
+
// Start ADC conversion
ADC_ConversionCmd( ADC_ConversionStart );
buffer[8] = get1Digit( Conversion_Value );
@@ -349,9 +343,11 @@
}
GPIO_WordWrite( GPIO0, CPIO_Value );
-*/
- }
+ // Wait for 500 ms
+ delay_ms( 500 );
+
+ } // while
}
Modified: trunk/firmware/arm/str/cantest_str73x_gcc/vectors.c
===================================================================
--- trunk/firmware/arm/str/cantest_str73x_gcc/vectors.c 2008-02-11 17:19:34 UTC (rev 836)
+++ trunk/firmware/arm/str/cantest_str73x_gcc/vectors.c 2008-02-11 17:33:26 UTC (rev 837)
@@ -765,10 +765,13 @@
*******************************************************************************/
void ADC_IRQHandler (void)
{
- Conversion_Value = ADC_GetConversionValue(ADC_CHANNEL0);
- /* Clear EOC Interrupt pending bit */
+ // Get ADC value
+ Conversion_Value = ADC_GetConversionValue( ADC_CHANNEL0 );
+
+ // Clear EOC Interrupt pending bit
ADC_FlagClear( ADC_FLAG_EOC );
- /* Clear the last Analog Watchdog0 comparison result */
+
+ // Clear the last Analog Watchdog0 comparison result */
ADC_FlagClear( ADC_FLAG_AnalogWatchdog0_HighThresold | ADC_FLAG_AnalogWatchdog0_LowThresold );
ADC_ConversionCmd (ADC_ConversionStop);
Modified: trunk/firmware/arm/str/common/sysTime.c
===================================================================
--- trunk/firmware/arm/str/common/sysTime.c 2008-02-11 17:19:34 UTC (rev 836)
+++ trunk/firmware/arm/str/common/sysTime.c 2008-02-11 17:33:26 UTC (rev 837)
@@ -54,9 +54,10 @@
TB_Init( TB2, &TB_InitStructure );
TB_ITConfig( TB2, ENABLE );
- TB_Cmd( TB2, ENABLE ); // Start the timer
EIC_IRQChannelConfig( TB2_IRQChannel, ENABLE ); // Enable IRQ
+
+ TB_Cmd( TB2, ENABLE ); // Enable the timer
}
/******************************************************************************
Added: trunk/firmware/arm/str/vscp_node_str73x_gcc/Makefile
===================================================================
--- trunk/firmware/arm/str/vscp_node_str73x_gcc/Makefile (rev 0)
+++ trunk/firmware/arm/str/vscp_node_str73x_gcc/Makefile 2008-02-11 17:33:26 UTC (rev 837)
@@ -0,0 +1,497 @@
+# Hey Emacs, this is a -*- makefile -*-
+#
+# WinARM template makefile
+# by Giacomo Fazio and Antonio Nasca, Catania, Italy
+# <gia...@gm...>
+# <ant...@ho...>
+#
+# based on the WinARM template makefile written by Martin Thomas
+# Released to the Public Domain
+# Please read the make user manual!
+#
+#
+# On command line:
+#
+# make all = Make software.
+#
+# make clean = Clean out built project files.
+#
+# make program = Download the hex file to the device
+#
+# (TODO: make filename.s = Just compile filename.c into the assembler code only)
+#
+# To rebuild project do "make clean" then "make all".
+# Toolchain prefix (i.e arm-elf -> arm-elf-gcc.exe)
+TCHAIN = arm-elf
+#TCHAIN = arm-none-eabi
+
+#USE_THUMB_MODE = YES
+USE_THUMB_MODE = NO
+
+# MCU name and submodel
+MCU = arm7tdmi
+SUBMDL = STR73x
+
+## Create ROM-Image
+RUN_MODE=ROM_RUN
+## Create RAM-Image
+#RUN_MODE=RAM_RUN
+
+## not supported in this example:
+## Exception-Vector placement only supported for "ROM_RUN"
+## (placement settings ignored when using "RAM_RUN")
+## - Exception vectors in ROM:
+#VECTOR_LOCATION=VECTORS_IN_ROM
+## - Exception vectors in RAM:
+#VECTOR_LOCATION=VECTORS_IN_RAM
+
+
+# Target file name (without extension).
+TARGET = main
+
+# List C source files here. (C dependencies are automatically generated.)
+# use file-extension c for "c-only"-files
+SRC = $(TARGET).c ../common/73x_lcd.c ../common/sysTime.c ../common/delay.c
+
+# List C source files here which must be compiled in ARM-Mode.
+# use file-extension c for "c-only"-files
+SRCARM = vectors.c
+# thumb is possible too for vectors.c - keep ARM, TODO: profile
+
+# List C++ source files here.
+# use file-extension cpp for C++-files (use extension .cpp)
+CPPSRC =
+
+# List C++ source files here which must be compiled in ARM-Mode.
+# use file-extension cpp for C++-files (use extension .cpp)
+#CPPSRCARM = $(TARGET).cpp
+CPPSRCARM =
+
+# List Assembler source files here.
+# Make them always end in a capital .S. Files ending in a lowercase .s
+# will not be considered source files but generated files (assembler
+# output from the compiler), and will be deleted upon "make clean"!
+# Even though the DOS/Win* filesystem matches both .s and .S the same,
+# it will preserve the spelling of the filenames, and gcc itself does
+# care about how the name is spelled on its command-line.
+ASRC =
+
+# List Assembler source files here which must be assembled in ARM-Mode..
+ASRCARM = vector.S startup.S
+
+# Path to Linker-Scripts
+LINKERSCRIPTPATH = .
+
+## Output format. (can be ihex or binary or both)
+## (binary i.e. for openocd and SAM-BA, hex i.e. for lpc21isp and uVision)
+#FORMAT = ihex
+#FORMAT = binary
+FORMAT = both
+
+# Optimization level, can be [0, 1, 2, 3, s].
+# 0 = turn off optimization. s = optimize for size.
+# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
+#OPT = s
+OPT = 0
+
+## Using the Atmel AT91_lib produces warning with
+## the default warning-levels.
+## yes - disable these warnings; no - keep default settings
+#AT91LIBNOWARN = yes
+AT91LIBNOWARN = no
+
+# Debugging format.
+# Native formats for AVR-GCC's -g are stabs [default], or dwarf-2.
+# AVR (extended) COFF requires stabs, plus an avr-objcopy run.
+#DEBUG = stabs
+DEBUG = dwarf-2
+
+# List any extra directories to look for include files here.
+# Each directory must be seperated by a space.
+EXTRAINCDIRS = "K:/include" ../common/str73x_lib/include
+
+# List any extra directories to look for library files here.
+# Each directory must be seperated by a space.
+#EXTRA_LIBDIRS = ../arm7_efsl_0_2_4
+EXTRA_LIBDIRS = K:/lib ../common/str73x_lib
+
+
+# Compiler flag to set the C Standard level.
+# c89 - "ANSI" C
+# gnu89 - c89 plus GCC extensions
+# c99 - ISO C99 standard (not yet fully implemented)
+# gnu99 - c99 plus GCC extensions
+CSTANDARD = -std=gnu99
+
+# Place -D or -U options for C here
+CDEFS = -D$(RUN_MODE)
+
+# Place -I options here
+CINCS =
+
+# Place -D or -U options for ASM here
+ADEFS = -D$(RUN_MODE)
+
+ifdef VECTOR_LOCATION
+CDEFS += -D$(VECTOR_LOCATION)
+ADEFS += -D$(VECTOR_LOCATION)
+endif
+
+CDEFS += -D__WinARM__ -D__WINARMSUBMDL_$(SUBMDL)__
+ADEFS += -D__WinARM__ -D__WINARMSUBMDL_$(SUBMDL)__
+
+# Compiler flags.
+
+ifeq ($(USE_THUMB_MODE),YES)
+THUMB = -mthumb
+THUMB_IW = -mthumb-interwork
+else
+THUMB =
+THUMB_IW =
+endif
+
+# -g*: generate debugging information
+# -O*: optimization level
+# -f...: tuning, see GCC manual and avr-libc documentation
+# -Wall...: warning level
+# -Wa,...: tell GCC to pass this to the assembler.
+# -adhlns...: create assembler listing
+#
+# Flags for C and C++ (arm-elf-gcc/arm-elf-g++)
+CFLAGS = -g$(DEBUG)
+CFLAGS += $(CDEFS) $(CINCS)
+CFLAGS += -O$(OPT)
+CFLAGS += -Wall -Wcast-align -Wimplicit
+CFLAGS += -Wpointer-arith -Wswitch
+CFLAGS += -ffunction-sections -fdata-sections
+CFLAGS += -Wredundant-decls -Wreturn-type -Wshadow -Wunused
+CFLAGS += -Wa,-adhlns=$(subst $(suffix $<),.lst,$<)
+CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
+
+# flags only for C
+CONLYFLAGS += -Wnested-externs
+CONLYFLAGS += $(CSTANDARD)
+
+ifneq ($(AT91LIBNOWARN),yes)
+#AT91-lib warnings with:
+CFLAGS += -Wcast-qual
+CONLYFLAGS += -Wmissing-prototypes
+CONLYFLAGS += -Wstrict-prototypes
+CONLYFLAGS += -Wmissing-declarations
+endif
+
+# flags only for C++ (arm-elf-g++)
+# CPPFLAGS = -fno-rtti -fno-exceptions
+CPPFLAGS =
+
+# Assembler flags.
+# -Wa,...: tell GCC to pass this to the assembler.
+# -ahlns: create listing
+# -g$(DEBUG): have the assembler create line number information
+ASFLAGS = $(ADEFS) -Wa,-adhlns=$(<:.S=.lst),-g$(DEBUG)
+
+
+#Additional libraries.
+
+# Extra libraries
+# Each library-name must be seperated by a space.
+# To add libxyz.a, libabc.a and libefsl.a:
+# EXTRA_LIBS = xyz abc efsl
+#EXTRA_LIBS = efsl
+EXTRA_LIBS = STR73x_lib
+
+#Support for newlibc-lpc (file: libnewlibc-lpc.a)
+#NEWLIBLPC = -lnewlib-lpc
+
+MATH_LIB = -lm
+
+# CPLUSPLUS_LIB = -lstdc++
+
+
+# Linker flags.
+# -Wl,...: tell GCC to pass this to linker.
+# -Map: create map file
+# --cref: add cross reference to map file
+LDFLAGS = -nostartfiles -Wl,-Map=$(TARGET).map,--cref,--gc-sections
+LDFLAGS += -lc
+LDFLAGS += $(NEWLIBLPC) $(MATH_LIB)
+LDFLAGS += -lc -lgcc
+LDFLAGS += $(CPLUSPLUS_LIB)
+LDFLAGS += $(patsubst %,-L%,$(EXTRA_LIBDIRS))
+LDFLAGS += $(patsubst %,-l%,$(EXTRA_LIBS))
+
+# Set Linker-Script Depending On Selected Memory and Controller
+ifeq ($(RUN_MODE),RAM_RUN)
+LDFLAGS +=-T$(LINKERSCRIPTPATH)/$(SUBMDL)-RAM.ld
+else
+LDFLAGS +=-T$(LINKERSCRIPTPATH)/$(SUBMDL)-ROM.ld
+endif
+
+
+# Define directories, if needed.
+## DIRARM = c:/WinARM/
+## DIRARMBIN = $(DIRAVR)/bin/
+## DIRAVRUTILS = $(DIRAVR)/utils/bin/
+
+# Define programs and commands.
+SHELL = sh
+CC = $(TCHAIN)-gcc
+CPP = $(TCHAIN)-g++
+AR = $(TCHAIN)-ar
+OBJCOPY = $(TCHAIN)-objcopy
+OBJDUMP = $(TCHAIN)-objdump
+SIZE = $(TCHAIN)-size
+NM = $(TCHAIN)-nm
+REMOVE = rm -f
+REMOVEDIR = rm -f -r
+COPY = cp
+
+# Define Messages
+# English
+MSG_ERRORS_NONE = Errors: none
+MSG_BEGIN = "-------- begin (mode: $(RUN_MODE)) --------"
+MSG_END = -------- end --------
+MSG_SIZE_BEFORE = Size before:
+MSG_SIZE_AFTER = Size after:
+MSG_FLASH = Creating load file for Flash:
+MSG_EXTENDED_LISTING = Creating Extended Listing:
+MSG_SYMBOL_TABLE = Creating Symbol Table:
+MSG_LINKING = Linking:
+MSG_COMPILING = Compiling C:
+MSG_COMPILING_ARM = "Compiling C (ARM-only):"
+MSG_COMPILINGCPP = Compiling C++:
+MSG_COMPILINGCPP_ARM = "Compiling C++ (ARM-only):"
+MSG_ASSEMBLING = Assembling:
+MSG_ASSEMBLING_ARM = "Assembling (ARM-only):"
+MSG_CLEANING = Cleaning project:
+MSG_FORMATERROR = Can not handle output-format
+MSG_LPC21_RESETREMINDER = You may have to bring the target in bootloader-mode now.
+
+# Define all object files.
+COBJ = $(SRC:.c=.o)
+AOBJ = $(ASRC:.S=.o)
+COBJARM = $(SRCARM:.c=.o)
+AOBJARM = $(ASRCARM:.S=.o)
+CPPOBJ = $(CPPSRC:.cpp=.o)
+CPPOBJARM = $(CPPSRCARM:.cpp=.o)
+
+# Define all listing files.
+LST = $(ASRC:.S=.lst) $(ASRCARM:.S=.lst) $(SRC:.c=.lst) $(SRCARM:.c=.lst)
+LST += $(CPPSRC:.cpp=.lst) $(CPPSRCARM:.cpp=.lst)
+
+# Compiler flags to generate dependency files.
+### GENDEPFLAGS = -Wp,-M,-MP,-MT,$(*F).o,-MF,.dep/$(@F).d
+GENDEPFLAGS = -MD -MP -MF .dep/$(@F).d
+
+# Combine all necessary flags and optional flags.
+# Add target processor to flags.
+ALL_CFLAGS = -mcpu=$(MCU) $(THUMB_IW) -I. $(CFLAGS) $(GENDEPFLAGS)
+ALL_ASFLAGS = -mcpu=$(MCU) $(THUMB_IW) -I. -x assembler-with-cpp $(ASFLAGS)
+
+
+# Default target.
+all: begin gccversion sizebefore build sizeafter finished end
+
+ifeq ($(FORMAT),ihex)
+build: elf hex lss sym
+hex: $(TARGET).hex
+IMGEXT=hex
+else
+ifeq ($(FORMAT),binary)
+build: elf bin lss sym
+bin: $(TARGET).bin
+IMGEXT=bin
+else
+ifeq ($(FORMAT),both)
+build: elf hex bin lss sym
+hex: $(TARGET).hex
+bin: $(TARGET).bin
+else
+$(error "$(MSG_FORMATERROR) $(FORMAT)")
+endif
+endif
+endif
+
+elf: $(TARGET).elf
+lss: $(TARGET).lss
+sym: $(TARGET).sym
+
+# Eye candy.
+begin:
+ @echo
+ @echo $(MSG_BEGIN)
+
+finished:
+ @echo $(MSG_ERRORS_NONE)
+
+end:
+ @echo $(MSG_END)
+ @echo
+
+
+# Display size of file.
+HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
+ELFSIZE = $(SIZE) -A $(TARGET).elf
+sizebefore:
+ @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); echo; fi
+
+sizeafter:
+ @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi
+
+
+# Display compiler version information.
+gccversion :
+ @$(CC) --version
+
+# FLASH Programming with OPENOCD
+
+# specify the directory where openocd executable resides (openocd-ftd2xx.exe or openocd-pp.exe)
+# Note: you may have to adjust this if a newer version of YAGARTO has been downloaded
+OPENOCD_DIR = 'C:\Program Files\openocd-r247\bin\'
+
+# specify OpenOCD executable (pp is for the wiggler, ftd2xx is for the USB debugger)
+#OPENOCD = $(OPENOCD_DIR)openocd-pp.exe
+OPENOCD = $(OPENOCD_DIR)openocd-ftd2xx.exe
+
+# specify OpenOCD configuration file (pick the one for your device)
+#OPENOCD_CFG = C:\openocd-configs\str73x-configs\str73x_signalyzer-flash-program.cfg
+#OPENOCD_CFG = C:\openocd-configs\str73x-configs\str73x_jtagkey-flash-program.cfg
+#OPENOCD_CFG = C:\openocd-configs\str73x-configs\str73x_armusbocd-flash-program.cfg
+#OPENOCD_CFG = C:\openocd-configs\str73x-configs\str73x_pp-flash-program.cfg
+#OPENOCD_CFG = "D:\development\armdev\str73x open source development\Code\Windows\openocd-configs\str73x-configs\str73x_jtagkey-flash-program.cfg"
+OPENOCD_CFG = "c:\str73x_jtagkey-flash-program.cfg"
+
+program:
+ @echo
+ @echo "Flash Programming with OpenOCD..."
+ $(OPENOCD) -f $(OPENOCD_CFG)
+ @echo
+ @echo
+ @echo "Flash Programming Finished."
+
+
+# Create final output file (.hex) from ELF output file.
+%.hex: %.elf
+ @echo
+ @echo $(MSG_FLASH) $@
+ $(OBJCOPY) -O ihex $< $@
+
+# Create final output file (.bin) from ELF output file.
+%.bin: %.elf
+ @echo
+ @echo $(MSG_FLASH) $@
+ $(OBJCOPY) -O binary $< $@
+
+
+# Create extended listing file from ELF output file.
+# testing: option -C
+%.lss: %.elf
+ @echo
+ @echo $(MSG_EXTENDED_LISTING) $@
+ $(OBJDUMP) -h -S -C $< > $@
+
+
+# Create a symbol table from ELF output file.
+%.sym: %.elf
+ @echo
+ @echo $(MSG_SYMBOL_TABLE) $@
+ $(NM) -n $< > $@
+
+
+# Link: create ELF output file from object files.
+.SECONDARY : $(TARGET).elf
+.PRECIOUS : $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM)
+%.elf: $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM)
+ @echo
+ @echo $(MSG_LINKING) $@
+ $(CC) $(THUMB) $(ALL_CFLAGS) $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM) --output $@ $(LDFLAGS)
+# $(CPP) $(THUMB) $(ALL_CFLAGS) $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM) --output $@ $(LDFLAGS)
+
+# Compile: create object files from C source files. ARM/Thumb
+$(COBJ) : %.o : %.c
+ @echo
+ @echo $(MSG_COMPILING) $<
+ $(CC) -c $(THUMB) $(ALL_CFLAGS) $(CONLYFLAGS) $< -o $@
+
+# Compile: create object files from C source files. ARM-only
+$(COBJARM) : %.o : %.c
+ @echo
+ @echo $(MSG_COMPILING_ARM) $<
+ $(CC) -c $(ALL_CFLAGS) $(CONLYFLAGS) $< -o $@
+
+# Compile: create object files from C++ source files. ARM/Thumb
+$(CPPOBJ) : %.o : %.cpp
+ @echo
+ @echo $(MSG_COMPILINGCPP) $<
+ $(CPP) -c $(THUMB) $(ALL_CFLAGS) $(CPPFLAGS) $< -o $@
+
+# Compile: create object files from C++ source files. ARM-only
+$(CPPOBJARM) : %.o : %.cpp
+ @echo
+ @echo $(MSG_COMPILINGCPP_ARM) $<
+ $(CPP) -c $(ALL_CFLAGS) $(CPPFLAGS) $< -o $@
+
+
+# Compile: create assembler files from C source files. ARM/Thumb
+## does not work - TODO - hints welcome
+##$(COBJ) : %.s : %.c
+## $(CC) $(THUMB) -S $(ALL_CFLAGS) $< -o $@
+
+
+# Assemble: create object files from assembler source files. ARM/Thumb
+$(AOBJ) : %.o : %.S
+ @echo
+ @echo $(MSG_ASSEMBLING) $<
+ $(CC) -c $(THUMB) $(ALL_ASFLAGS) $< -o $@
+
+
+# Assemble: create object files from assembler source files. ARM-only
+$(AOBJARM) : %.o : %.S
+ @echo
+ @echo $(MSG_ASSEMBLING_ARM) $<
+ $(CC) -c $(ALL_ASFLAGS) $< -o $@
+
+
+# Target: clean project.
+clean: begin clean_list finished end
+
+
+clean_list :
+ @echo
+ @echo $(MSG_CLEANING)
+ $(REMOVE) $(TARGET).hex
+ $(REMOVE) $(TARGET).bin
+ $(REMOVE) $(TARGET).obj
+ $(REMOVE) $(TARGET).elf
+ $(REMOVE) $(TARGET).map
+ $(REMOVE) $(TARGET).obj
+ $(REMOVE) $(TARGET).a90
+ $(REMOVE) $(TARGET).sym
+ $(REMOVE) $(TARGET).lnk
+ $(REMOVE) $(TARGET).lss
+ $(REMOVE) $(COBJ)
+ $(REMOVE) $(CPPOBJ)
+ $(REMOVE) $(AOBJ)
+ $(REMOVE) $(COBJARM)
+ $(REMOVE) $(CPPOBJARM)
+ $(REMOVE) $(AOBJARM)
+ $(REMOVE) $(LST)
+ $(REMOVE) $(SRC:.c=.s)
+ $(REMOVE) $(SRC:.c=.d)
+ $(REMOVE) $(SRCARM:.c=.s)
+ $(REMOVE) $(SRCARM:.c=.d)
+ $(REMOVE) $(CPPSRC:.cpp=.s)
+ $(REMOVE) $(CPPSRC:.cpp=.d)
+ $(REMOVE) $(CPPSRCARM:.cpp=.s)
+ $(REMOVE) $(CPPSRCARM:.cpp=.d)
+ $(REMOVEDIR) .dep | exit 0
+
+
+# Include the dependency files.
+-include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)
+
+
+# Listing of phony targets.
+.PHONY : all begin finish end sizebefore sizeafter gccversion \
+build elf hex bin lss sym clean clean_list program
+
Added: trunk/firmware/arm/str/vscp_node_str73x_gcc/Readme.txt
===================================================================
--- trunk/firmware/arm/str/vscp_node_str73x_gcc/Readme.txt (rev 0)
+++ trunk/firmware/arm/str/vscp_node_str73x_gcc/Readme.txt 2008-02-11 17:33:26 UTC (rev 837)
@@ -0,0 +1,14 @@
+Simple CAN test sample
+====================
+
+Ake Hedman, D of Scandinavia ak...@do..., http://www.dofscandinavia.com
+
+This file is built for the IAR str73x test board.
+
+The sample code send a CAN frame every 500 ms and display a "RECEIVE CAN MESSAGE"
+on the second line of the LCD if a CAN message with id 0x123, length=4 and
+data=1,2,4,8 is received. If another msg is received the line is cleared.
+
+CAN bitrate is 500 kbps.
+
+Based on a sample from ST
Added: trunk/firmware/arm/str/vscp_node_str73x_gcc/STR73x-RAM.ld
===================================================================
--- trunk/firmware/arm/str/vscp_node_str73x_gcc/STR73x-RAM.ld (rev 0)
+++ trunk/firmware/arm/str/vscp_node_str73x_gcc/STR73x-RAM.ld 2008-02-11 17:33:26 UTC (rev 837)
@@ -0,0 +1,228 @@
+/***********************************************************************************
+* Copyright 2005 Anglia Design
+* This demo code and associated components are provided as is and has no warranty,
+* implied or otherwise. You are free to use/modify any of the provided
+* code at your own risk in your applications with the expressed limitation
+* of liability (see below)
+*
+* LIMITATION OF LIABILITY: ANGLIA OR ANGLIA DESIGNS SHALL NOT BE LIABLE FOR ANY
+* LOSS OF PROFITS, LOSS OF USE, LOSS OF DATA, INTERRUPTION OF BUSINESS, NOR FOR
+* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND WHETHER UNDER
+* THIS AGREEMENT OR OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+*
+* Author : Spencer Oliver
+* Web : www.anglia-designs.com
+*
+***********************************************************************************/
+
+/* Stack Sizes */
+
+ _STACKSIZE = 1024;
+ _STACKSIZE_IRQ = 256;
+ _STACKSIZE_FIQ = 256;
+ _STACKSIZE_SVC = 0;
+ _STACKSIZE_ABT = 0;
+ _STACKSIZE_UND = 0;
+ _HEAPSIZE = 1024;
+
+/* Memory Definitions */
+
+MEMORY
+{
+ DATA (rw) : ORIGIN = 0xA0000000, LENGTH = 0x00004000
+}
+
+/* Section Definitions */
+
+SECTIONS
+{
+ /* first section is .text which is used for code */
+
+ .text :
+ {
+ KEEP(*(.vectrom))
+ KEEP(*(.init))
+ *(.text .text.*)
+ *(.gnu.linkonce.t.*)
+ *(.glue_7t .glue_7)
+ KEEP(*(.fini))
+ *(.gcc_except_table)
+ } >DATA =0
+ . = ALIGN(4);
+
+ /* .ctors .dtors are used for c++ constructors/destructors */
+
+ .ctors :
+ {
+ PROVIDE(__ctors_start__ = .);
+ KEEP(*(SORT(.ctors.*)))
+ KEEP(*(.ctors))
+ PROVIDE(__ctors_end__ = .);
+ } >DATA
+
+ .dtors :
+ {
+ PROVIDE(__dtors_start__ = .);
+ KEEP(*(SORT(.dtors.*)))
+ KEEP(*(.dtors))
+ PROVIDE(__dtors_end__ = .);
+ } >DATA
+
+ /* .rodata section which is used for read-only data (constants) */
+
+ .rodata :
+ {
+ *(.rodata .rodata.*)
+ *(.gnu.linkonce.r.*)
+ } >DATA
+ . = ALIGN(4);
+
+ _vectext = .;
+ PROVIDE (vectext = .);
+
+ .vect : AT (_vectext)
+ {
+ _vecstart = .;
+ KEEP(*(.vectram))
+ _vecend = .;
+ } >DATA
+
+ _etext = _vectext + SIZEOF(.vect);
+ PROVIDE (etext = .);
+
+ /* .data section which is used for initialized data */
+
+ .data : AT (_etext)
+ {
+ *(.data .data.*)
+ *(.gnu.linkonce.d.*)
+ SORT(CONSTRUCTORS)
+ } >DATA
+ . = ALIGN(4);
+
+ __data_start = .;
+ _edata = .;
+ PROVIDE (edata = .);
+
+ /* .bss section which is used for uninitialized data */
+
+ .bss :
+ {
+ __bss_start = .;
+ __bss_start__ = .;
+ *(.bss .bss.*)
+ *(.gnu.linkonce.b.*)
+ *(COMMON)
+ . = ALIGN(4);
+ } >DATA
+ . = ALIGN(4);
+ __bss_end__ = .;
+
+ _end = .;
+ PROVIDE(end = .);
+
+ /* .heap section which is used for memory allocation */
+
+ .heap (NOLOAD) :
+ {
+ __heap_start__ = .;
+ *(.heap)
+ . = MAX(__heap_start__ + _HEAPSIZE , .);
+ } >DATA
+ __heap_end__ = __heap_start__ + SIZEOF(.heap);
+
+ /* .stack section - user mode stack */
+
+ .stack (__heap_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_start__ = .;
+ *(.stack)
+ . = MAX(__stack_start__ + _STACKSIZE , .);
+ } >DATA
+ __stack_end__ = __stack_start__ + SIZEOF(.stack);
+
+ /* .stack_irq section */
+
+ .stack_irq (__stack_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_irq_start__ = .;
+ *(.stack_irq)
+ . = MAX(__stack_irq_start__ + _STACKSIZE_IRQ , .);
+ } >DATA
+ __stack_irq_end__ = __stack_irq_start__ + SIZEOF(.stack_irq);
+
+ /* .stack_fiq section */
+
+ .stack_fiq (__stack_irq_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_fiq_start__ = .;
+ *(.stack_fiq)
+ . = MAX(__stack_fiq_start__ + _STACKSIZE_FIQ , .);
+ } >DATA
+ __stack_fiq_end__ = __stack_fiq_start__ + SIZEOF(.stack_fiq);
+
+ /* .stack_svc section */
+
+ .stack_svc (__stack_fiq_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_svc_start__ = .;
+ *(.stack_svc)
+ . = MAX(__stack_svc_start__ + _STACKSIZE_SVC , .);
+ } >DATA
+ __stack_svc_end__ = __stack_svc_start__ + SIZEOF(.stack_svc);
+
+ /* .stack_abt section */
+
+ .stack_abt (__stack_svc_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_abt_start__ = .;
+ *(.stack_abt)
+ . = MAX(__stack_abt_start__ + _STACKSIZE_ABT , .);
+ } >DATA
+ __stack_abt_end__ = __stack_abt_start__ + SIZEOF(.stack_abt);
+
+ /* .stack_und section */
+
+ .stack_und (__stack_abt_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_und_start__ = .;
+ *(.stack_und)
+ . = MAX(__stack_und_start__ + _STACKSIZE_UND , .);
+ } >DATA
+ __stack_und_end__ = __stack_und_start__ + SIZEOF(.stack_und);
+
+ /* Stabs debugging sections. */
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+ .stab.excl 0 : { *(.stab.excl) }
+ .stab.exclstr 0 : { *(.stab.exclstr) }
+ .stab.index 0 : { *(.stab.index) }
+ .stab.indexstr 0 : { *(.stab.indexstr) }
+ .comment 0 : { *(.comment) }
+ /* DWARF debug sections.
+ Symbols in the DWARF debugging sections are relative to the beginning
+ of the section so we begin them at 0. */
+ /* DWARF 1 */
+ .debug 0 : { *(.debug) }
+ .line 0 : { *(.line) }
+ /* GNU DWARF 1 extensions */
+ .debug_srcinfo 0 : { *(.debug_srcinfo) }
+ .debug_sfnames 0 : { *(.debug_sfnames) }
+ /* DWARF 1.1 and DWARF 2 */
+ .debug_aranges 0 : { *(.debug_aranges) }
+ .debug_pubnames 0 : { *(.debug_pubnames) }
+ /* DWARF 2 */
+ .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
+ .debug_abbrev 0 : { *(.debug_abbrev) }
+ .debug_line 0 : { *(.debug_line) }
+ .debug_frame 0 : { *(.debug_frame) }
+ .debug_str 0 : { *(.debug_str) }
+ .debug_loc 0 : { *(.debug_loc) }
+ .debug_macinfo 0 : { *(.debug_macinfo) }
+ /* SGI/MIPS DWARF 2 extensions */
+ .debug_weaknames 0 : { *(.debug_weaknames) }
+ .debug_funcnames 0 : { *(.debug_funcnames) }
+ .debug_typenames 0 : { *(.debug_typenames) }
+ .debug_varnames 0 : { *(.debug_varnames) }
+}
+
Added: trunk/firmware/arm/str/vscp_node_str73x_gcc/STR73x-ROM.ld
===================================================================
--- trunk/firmware/arm/str/vscp_node_str73x_gcc/STR73x-ROM.ld (rev 0)
+++ trunk/firmware/arm/str/vscp_node_str73x_gcc/STR73x-ROM.ld 2008-02-11 17:33:26 UTC (rev 837)
@@ -0,0 +1,231 @@
+/***********************************************************************************
+* Copyright 2005 Anglia Design
+* This demo code and associated components are provided as is and has no warranty,
+* implied or otherwise. You are free to use/modify any of the provided
+* code at your own risk in your applications with the expressed limitation
+* of liability (see below)
+*
+* LIMITATION OF LIABILITY: ANGLIA OR ANGLIA DESIGNS SHALL NOT BE LIABLE FOR ANY
+* LOSS OF PROFITS, LOSS OF USE, LOSS OF DATA, INTERRUPTION OF BUSINESS, NOR FOR
+* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND WHETHER UNDER
+* THIS AGREEMENT OR OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+*
+* Author : Spencer Oliver
+* Web : www.anglia-designs.com
+*
+***********************************************************************************/
+
+/* Stack Sizes */
+
+ _STACKSIZE = 1024;
+ _STACKSIZE_IRQ = 256;
+ _STACKSIZE_FIQ = 256;
+ _STACKSIZE_SVC = 0;
+ _STACKSIZE_ABT = 0;
+ _STACKSIZE_UND = 0;
+ _HEAPSIZE = 1024;
+
+/* Memory Definitions */
+
+MEMORY
+{
+ CODE (rx) : ORIGIN = 0x80000000, LENGTH = 0x00040000
+ DATA (rw) : ORIGIN = 0xA0000000, LENGTH = 0x00004000
+}
+
+/* Section Definitions */
+
+SECTIONS
+{
+ /* first section is .text which is used for code */
+
+ .text :
+ {
+ KEEP(*(.vectrom))
+ KEEP(*(.init))
+ *(.text .text.*)
+ *(.gnu.linkonce.t.*)
+ *(.glue_7t .glue_7)
+ KEEP(*(.fini))
+ *(.gcc_except_table)
+ } >CODE =0
+ . = ALIGN(4);
+
+ /* .ctors .dtors are used for c++ constructors/destructors */
+
+ .ctors :
+ {
+ PROVIDE(__ctors_start__ = .);
+ KEEP(*(SORT(.ctors.*)))
+ KEEP(*(.ctors))
+ PROVIDE(__ctors_end__ = .);
+ } >CODE
+
+ .dtors :
+ {
+ PROVIDE(__dtors_start__ = .);
+ KEEP(*(SORT(.dtors.*)))
+ KEEP(*(.dtors))
+ PROVIDE(__dtors_end__ = .);
+ } >CODE
+
+ /* .rodata section which is used for read-only data (constants) */
+
+ .rodata :
+ {
+ *(.rodata .rodata.*)
+ *(.gnu.linkonce.r.*)
+ } >CODE
+ . = ALIGN(4);
+
+ _vectext = .;
+ PROVIDE (vectext = .);
+
+ .vect : AT (_vectext)
+ {
+ _vecstart = .;
+ KEEP(*(.vectram))
+ _vecend = .;
+ } >DATA
+
+ _etext = _vectext + SIZEOF(.vect);
+ PROVIDE (etext = .);
+
+ /* .data section which is used for initialized data */
+
+ .data : AT (_etext)
+ {
+ __data_start = .;
+ *(.data .data.*)
+ *(.gnu.linkonce.d.*)
+ SORT(CONSTRUCTORS)
+ . = ALIGN(4);
+ *(.fastrun .fastrun.*)
+ } >DATA
+ . = ALIGN(4);
+
+ _edata = .;
+ PROVIDE (edata = .);
+
+ /* .bss section which is used for uninitialized data */
+
+ .bss :
+ {
+ __bss_start = .;
+ __bss_start__ = .;
+ *(.bss .bss.*)
+ *(.gnu.linkonce.b.*)
+ *(COMMON)
+ . = ALIGN(4);
+ } >DATA
+ . = ALIGN(4);
+ __bss_end__ = .;
+
+ _end = .;
+ PROVIDE(end = .);
+
+ /* .heap section which is used for memory allocation */
+
+ .heap (NOLOAD) :
+ {
+ __heap_start__ = .;
+ *(.heap)
+ . = MAX(__heap_start__ + _HEAPSIZE , .);
+ } >DATA
+ __heap_end__ = __heap_start__ + SIZEOF(.heap);
+
+ /* .stack section - user mode stack */
+
+ .stack (__heap_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_start__ = .;
+ *(.stack)
+ . = MAX(__stack_start__ + _STACKSIZE , .);
+ } >DATA
+ __stack_end__ = __stack_start__ + SIZEOF(.stack);
+
+ /* .stack_irq section */
+
+ .stack_irq (__stack_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_irq_start__ = .;
+ *(.stack_irq)
+ . = MAX(__stack_irq_start__ + _STACKSIZE_IRQ , .);
+ } >DATA
+ __stack_irq_end__ = __stack_irq_start__ + SIZEOF(.stack_irq);
+
+ /* .stack_fiq section */
+
+ .stack_fiq (__stack_irq_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_fiq_start__ = .;
+ *(.stack_fiq)
+ . = MAX(__stack_fiq_start__ + _STACKSIZE_FIQ , .);
+ } >DATA
+ __stack_fiq_end__ = __stack_fiq_start__ + SIZEOF(.stack_fiq);
+
+ /* .stack_svc section */
+
+ .stack_svc (__stack_fiq_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_svc_start__ = .;
+ *(.stack_svc)
+ . = MAX(__stack_svc_start__ + _STACKSIZE_SVC , .);
+ } >DATA
+ __stack_svc_end__ = __stack_svc_start__ + SIZEOF(.stack_svc);
+
+ /* .stack_abt section */
+
+ .stack_abt (__stack_svc_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_abt_start__ = .;
+ *(.stack_abt)
+ . = MAX(__stack_abt_start__ + _STACKSIZE_ABT , .);
+ } >DATA
+ __stack_abt_end__ = __stack_abt_start__ + SIZEOF(.stack_abt);
+
+ /* .stack_und section */
+
+ .stack_und (__stack_abt_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_und_start__ = .;
+ *(.stack_und)
+ . = MAX(__stack_und_start__ + _STACKSIZE_UND , .);
+ } >DATA
+ __stack_und_end__ = __stack_und_start__ + SIZEOF(.stack_und);
+
+ /* Stabs debugging sections. */
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+ .stab.excl 0 : { *(.stab.excl) }
+ .stab.exclstr 0 : { *(.stab.exclstr) }
+ .stab.index 0 : { *(.stab.index) }
+ .stab.indexstr 0 : { *(.stab.indexstr) }
+ .commen...
[truncated message content] |
|
From: <ak...@us...> - 2008-02-17 11:51:51
|
Revision: 843
http://can.svn.sourceforge.net/can/?rev=843&view=rev
Author: akhe
Date: 2008-02-17 03:51:48 -0800 (Sun, 17 Feb 2008)
Log Message:
-----------
Added CAN sample for str75x
Added Paths:
-----------
trunk/firmware/arm/str/cantest_str75x_gcc/
trunk/firmware/arm/str/cantest_str75x_gcc/docs/
trunk/firmware/arm/str/cantest_str75x_gcc/project/
trunk/firmware/arm/str/cantest_str75x_gcc/project/Makefile
trunk/firmware/arm/str/cantest_str75x_gcc/project/Readme.txt
trunk/firmware/arm/str/cantest_str75x_gcc/project/STR75x-RAM.ld
trunk/firmware/arm/str/cantest_str75x_gcc/project/STR75x-ROM.ld
trunk/firmware/arm/str/cantest_str75x_gcc/project/cantest.pnproj
trunk/firmware/arm/str/cantest_str75x_gcc/project/cantest.pnps
trunk/firmware/arm/str/cantest_str75x_gcc/project/main.c
trunk/firmware/arm/str/cantest_str75x_gcc/project/startup.s
trunk/firmware/arm/str/cantest_str75x_gcc/project/vector.s
trunk/firmware/arm/str/cantest_str75x_gcc/project/vectors.c
trunk/firmware/arm/str/cantest_str75x_gcc/project/vectors.h
Added: trunk/firmware/arm/str/cantest_str75x_gcc/project/Makefile
===================================================================
--- trunk/firmware/arm/str/cantest_str75x_gcc/project/Makefile (rev 0)
+++ trunk/firmware/arm/str/cantest_str75x_gcc/project/Makefile 2008-02-17 11:51:48 UTC (rev 843)
@@ -0,0 +1,497 @@
+# Hey Emacs, this is a -*- makefile -*-
+#
+# WinARM template makefile
+# by Giacomo Fazio and Antonio Nasca, Catania, Italy
+# <gia...@gm...>
+# <ant...@ho...>
+#
+# based on the WinARM template makefile written by Martin Thomas
+# Released to the Public Domain
+# Please read the make user manual!
+#
+#
+# On command line:
+#
+# make all = Make software.
+#
+# make clean = Clean out built project files.
+#
+# make program = Download the hex file to the device
+#
+# (TODO: make filename.s = Just compile filename.c into the assembler code only)
+#
+# To rebuild project do "make clean" then "make all".
+# Toolchain prefix (i.e arm-elf -> arm-elf-gcc.exe)
+TCHAIN = arm-elf
+#TCHAIN = arm-none-eabi
+
+#USE_THUMB_MODE = YES
+USE_THUMB_MODE = NO
+
+# MCU name and submodel
+MCU = arm7tdmi
+SUBMDL = STR75x
+
+## Create ROM-Image
+RUN_MODE=ROM_RUN
+## Create RAM-Image
+#RUN_MODE=RAM_RUN
+
+## not supported in this example:
+## Exception-Vector placement only supported for "ROM_RUN"
+## (placement settings ignored when using "RAM_RUN")
+## - Exception vectors in ROM:
+#VECTOR_LOCATION=VECTORS_IN_ROM
+## - Exception vectors in RAM:
+#VECTOR_LOCATION=VECTORS_IN_RAM
+
+
+# Target file name (without extension).
+TARGET = main
+
+# List C source files here. (C dependencies are automatically generated.)
+# use file-extension c for "c-only"-files
+SRC = $(TARGET).c ../../common/75x_lcd.c ../../common/sysTime.c ../../common/delay.c
+
+# List C source files here which must be compiled in ARM-Mode.
+# use file-extension c for "c-only"-files
+SRCARM = vectors.c
+# thumb is possible too for vectors.c - keep ARM, TODO: profile
+
+# List C++ source files here.
+# use file-extension cpp for C++-files (use extension .cpp)
+CPPSRC =
+
+# List C++ source files here which must be compiled in ARM-Mode.
+# use file-extension cpp for C++-files (use extension .cpp)
+#CPPSRCARM = $(TARGET).cpp
+CPPSRCARM =
+
+# List Assembler source files here.
+# Make them always end in a capital .S. Files ending in a lowercase .s
+# will not be considered source files but generated files (assembler
+# output from the compiler), and will be deleted upon "make clean"!
+# Even though the DOS/Win* filesystem matches both .s and .S the same,
+# it will preserve the spelling of the filenames, and gcc itself does
+# care about how the name is spelled on its command-line.
+ASRC =
+
+# List Assembler source files here which must be assembled in ARM-Mode..
+ASRCARM = vector.S startup.S
+
+# Path to Linker-Scripts
+LINKERSCRIPTPATH = .
+
+## Output format. (can be ihex or binary or both)
+## (binary i.e. for openocd and SAM-BA, hex i.e. for lpc21isp and uVision)
+#FORMAT = ihex
+#FORMAT = binary
+FORMAT = both
+
+# Optimization level, can be [0, 1, 2, 3, s].
+# 0 = turn off optimization. s = optimize for size.
+# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
+#OPT = s
+OPT = 0
+
+## Using the Atmel AT91_lib produces warning with
+## the default warning-levels.
+## yes - disable these warnings; no - keep default settings
+#AT91LIBNOWARN = yes
+AT91LIBNOWARN = no
+
+# Debugging format.
+# Native formats for AVR-GCC's -g are stabs [default], or dwarf-2.
+# AVR (extended) COFF requires stabs, plus an avr-objcopy run.
+#DEBUG = stabs
+DEBUG = dwarf-2
+
+# List any extra directories to look for include files here.
+# Each directory must be seperated by a space.
+EXTRAINCDIRS = "K:/include" ../../common/str75x_lib/include
+
+# List any extra directories to look for library files here.
+# Each directory must be seperated by a space.
+#EXTRA_LIBDIRS = ../arm7_efsl_0_2_4
+EXTRA_LIBDIRS = K:/lib ../../common/str75x_lib
+
+
+# Compiler flag to set the C Standard level.
+# c89 - "ANSI" C
+# gnu89 - c89 plus GCC extensions
+# c99 - ISO C99 standard (not yet fully implemented)
+# gnu99 - c99 plus GCC extensions
+CSTANDARD = -std=gnu99
+
+# Place -D or -U options for C here
+CDEFS = -D$(RUN_MODE)
+
+# Place -I options here
+CINCS =
+
+# Place -D or -U options for ASM here
+ADEFS = -D$(RUN_MODE)
+
+ifdef VECTOR_LOCATION
+CDEFS += -D$(VECTOR_LOCATION)
+ADEFS += -D$(VECTOR_LOCATION)
+endif
+
+CDEFS += -D__WinARM__ -D__WINARMSUBMDL_$(SUBMDL)__
+ADEFS += -D__WinARM__ -D__WINARMSUBMDL_$(SUBMDL)__
+
+# Compiler flags.
+
+ifeq ($(USE_THUMB_MODE),YES)
+THUMB = -mthumb
+THUMB_IW = -mthumb-interwork
+else
+THUMB =
+THUMB_IW =
+endif
+
+# -g*: generate debugging information
+# -O*: optimization level
+# -f...: tuning, see GCC manual and avr-libc documentation
+# -Wall...: warning level
+# -Wa,...: tell GCC to pass this to the assembler.
+# -adhlns...: create assembler listing
+#
+# Flags for C and C++ (arm-elf-gcc/arm-elf-g++)
+CFLAGS = -g$(DEBUG)
+CFLAGS += $(CDEFS) $(CINCS)
+CFLAGS += -O$(OPT)
+CFLAGS += -Wall -Wcast-align -Wimplicit
+CFLAGS += -Wpointer-arith -Wswitch
+CFLAGS += -ffunction-sections -fdata-sections
+CFLAGS += -Wredundant-decls -Wreturn-type -Wshadow -Wunused
+CFLAGS += -Wa,-adhlns=$(subst $(suffix $<),.lst,$<)
+CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
+
+# flags only for C
+CONLYFLAGS += -Wnested-externs
+CONLYFLAGS += $(CSTANDARD)
+
+ifneq ($(AT91LIBNOWARN),yes)
+#AT91-lib warnings with:
+CFLAGS += -Wcast-qual
+CONLYFLAGS += -Wmissing-prototypes
+CONLYFLAGS += -Wstrict-prototypes
+CONLYFLAGS += -Wmissing-declarations
+endif
+
+# flags only for C++ (arm-elf-g++)
+# CPPFLAGS = -fno-rtti -fno-exceptions
+CPPFLAGS =
+
+# Assembler flags.
+# -Wa,...: tell GCC to pass this to the assembler.
+# -ahlns: create listing
+# -g$(DEBUG): have the assembler create line number information
+ASFLAGS = $(ADEFS) -Wa,-adhlns=$(<:.S=.lst),-g$(DEBUG)
+
+
+#Additional libraries.
+
+# Extra libraries
+# Each library-name must be seperated by a space.
+# To add libxyz.a, libabc.a and libefsl.a:
+# EXTRA_LIBS = xyz abc efsl
+#EXTRA_LIBS = efsl
+EXTRA_LIBS = STR75x_lib
+
+#Support for newlibc-lpc (file: libnewlibc-lpc.a)
+#NEWLIBLPC = -lnewlib-lpc
+
+MATH_LIB = -lm
+
+# CPLUSPLUS_LIB = -lstdc++
+
+
+# Linker flags.
+# -Wl,...: tell GCC to pass this to linker.
+# -Map: create map file
+# --cref: add cross reference to map file
+LDFLAGS = -nostartfiles -Wl,-Map=$(TARGET).map,--cref,--gc-sections
+LDFLAGS += -lc
+LDFLAGS += $(NEWLIBLPC) $(MATH_LIB)
+LDFLAGS += -lc -lgcc
+LDFLAGS += $(CPLUSPLUS_LIB)
+LDFLAGS += $(patsubst %,-L%,$(EXTRA_LIBDIRS))
+LDFLAGS += $(patsubst %,-l%,$(EXTRA_LIBS))
+
+# Set Linker-Script Depending On Selected Memory and Controller
+ifeq ($(RUN_MODE),RAM_RUN)
+LDFLAGS +=-T$(LINKERSCRIPTPATH)/$(SUBMDL)-RAM.ld
+else
+LDFLAGS +=-T$(LINKERSCRIPTPATH)/$(SUBMDL)-ROM.ld
+endif
+
+
+# Define directories, if needed.
+## DIRARM = c:/WinARM/
+## DIRARMBIN = $(DIRAVR)/bin/
+## DIRAVRUTILS = $(DIRAVR)/utils/bin/
+
+# Define programs and commands.
+SHELL = sh
+CC = $(TCHAIN)-gcc
+CPP = $(TCHAIN)-g++
+AR = $(TCHAIN)-ar
+OBJCOPY = $(TCHAIN)-objcopy
+OBJDUMP = $(TCHAIN)-objdump
+SIZE = $(TCHAIN)-size
+NM = $(TCHAIN)-nm
+REMOVE = rm -f
+REMOVEDIR = rm -f -r
+COPY = cp
+
+# Define Messages
+# English
+MSG_ERRORS_NONE = Errors: none
+MSG_BEGIN = "-------- begin (mode: $(RUN_MODE)) --------"
+MSG_END = -------- end --------
+MSG_SIZE_BEFORE = Size before:
+MSG_SIZE_AFTER = Size after:
+MSG_FLASH = Creating load file for Flash:
+MSG_EXTENDED_LISTING = Creating Extended Listing:
+MSG_SYMBOL_TABLE = Creating Symbol Table:
+MSG_LINKING = Linking:
+MSG_COMPILING = Compiling C:
+MSG_COMPILING_ARM = "Compiling C (ARM-only):"
+MSG_COMPILINGCPP = Compiling C++:
+MSG_COMPILINGCPP_ARM = "Compiling C++ (ARM-only):"
+MSG_ASSEMBLING = Assembling:
+MSG_ASSEMBLING_ARM = "Assembling (ARM-only):"
+MSG_CLEANING = Cleaning project:
+MSG_FORMATERROR = Can not handle output-format
+MSG_LPC21_RESETREMINDER = You may have to bring the target in bootloader-mode now.
+
+# Define all object files.
+COBJ = $(SRC:.c=.o)
+AOBJ = $(ASRC:.S=.o)
+COBJARM = $(SRCARM:.c=.o)
+AOBJARM = $(ASRCARM:.S=.o)
+CPPOBJ = $(CPPSRC:.cpp=.o)
+CPPOBJARM = $(CPPSRCARM:.cpp=.o)
+
+# Define all listing files.
+LST = $(ASRC:.S=.lst) $(ASRCARM:.S=.lst) $(SRC:.c=.lst) $(SRCARM:.c=.lst)
+LST += $(CPPSRC:.cpp=.lst) $(CPPSRCARM:.cpp=.lst)
+
+# Compiler flags to generate dependency files.
+### GENDEPFLAGS = -Wp,-M,-MP,-MT,$(*F).o,-MF,.dep/$(@F).d
+GENDEPFLAGS = -MD -MP -MF .dep/$(@F).d
+
+# Combine all necessary flags and optional flags.
+# Add target processor to flags.
+ALL_CFLAGS = -mcpu=$(MCU) $(THUMB_IW) -I. $(CFLAGS) $(GENDEPFLAGS)
+ALL_ASFLAGS = -mcpu=$(MCU) $(THUMB_IW) -I. -x assembler-with-cpp $(ASFLAGS)
+
+
+# Default target.
+all: begin gccversion sizebefore build sizeafter finished end
+
+ifeq ($(FORMAT),ihex)
+build: elf hex lss sym
+hex: $(TARGET).hex
+IMGEXT=hex
+else
+ifeq ($(FORMAT),binary)
+build: elf bin lss sym
+bin: $(TARGET).bin
+IMGEXT=bin
+else
+ifeq ($(FORMAT),both)
+build: elf hex bin lss sym
+hex: $(TARGET).hex
+bin: $(TARGET).bin
+else
+$(error "$(MSG_FORMATERROR) $(FORMAT)")
+endif
+endif
+endif
+
+elf: $(TARGET).elf
+lss: $(TARGET).lss
+sym: $(TARGET).sym
+
+# Eye candy.
+begin:
+ @echo
+ @echo $(MSG_BEGIN)
+
+finished:
+ @echo $(MSG_ERRORS_NONE)
+
+end:
+ @echo $(MSG_END)
+ @echo
+
+
+# Display size of file.
+HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
+ELFSIZE = $(SIZE) -A $(TARGET).elf
+sizebefore:
+ @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); echo; fi
+
+sizeafter:
+ @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi
+
+
+# Display compiler version information.
+gccversion :
+ @$(CC) --version
+
+# FLASH Programming with OPENOCD
+
+# specify the directory where openocd executable resides (openocd-ftd2xx.exe or openocd-pp.exe)
+# Note: you may have to adjust this if a newer version of YAGARTO has been downloaded
+OPENOCD_DIR = 'C:\Program Files\openocd-r247\bin\'
+
+# specify OpenOCD executable (pp is for the wiggler, ftd2xx is for the USB debugger)
+#OPENOCD = $(OPENOCD_DIR)openocd-pp.exe
+OPENOCD = $(OPENOCD_DIR)openocd-ftd2xx.exe
+
+# specify OpenOCD configuration file (pick the one for your device)
+#OPENOCD_CFG = C:\openocd-configs\str75x-configs\str75x_signalyzer-flash-program.cfg
+#OPENOCD_CFG = C:\openocd-configs\str75x-configs\str75x_jtagkey-flash-program.cfg
+#OPENOCD_CFG = C:\openocd-configs\str75x-configs\str75x_armusbocd-flash-program.cfg
+#OPENOCD_CFG = C:\openocd-configs\str75x-configs\str75x_pp-flash-program.cfg
+#OPENOCD_CFG = "D:\development\armdev\str75x open source development\Code\Windows\openocd-configs\str75x-configs\str75x_jtagkey-flash-program.cfg"
+OPENOCD_CFG = "c:\str73x_jtagkey-flash-program.cfg"
+
+program:
+ @echo
+ @echo "Flash Programming with OpenOCD..."
+ $(OPENOCD) -f $(OPENOCD_CFG)
+ @echo
+ @echo
+ @echo "Flash Programming Finished."
+
+
+# Create final output file (.hex) from ELF output file.
+%.hex: %.elf
+ @echo
+ @echo $(MSG_FLASH) $@
+ $(OBJCOPY) -O ihex $< $@
+
+# Create final output file (.bin) from ELF output file.
+%.bin: %.elf
+ @echo
+ @echo $(MSG_FLASH) $@
+ $(OBJCOPY) -O binary $< $@
+
+
+# Create extended listing file from ELF output file.
+# testing: option -C
+%.lss: %.elf
+ @echo
+ @echo $(MSG_EXTENDED_LISTING) $@
+ $(OBJDUMP) -h -S -C $< > $@
+
+
+# Create a symbol table from ELF output file.
+%.sym: %.elf
+ @echo
+ @echo $(MSG_SYMBOL_TABLE) $@
+ $(NM) -n $< > $@
+
+
+# Link: create ELF output file from object files.
+.SECONDARY : $(TARGET).elf
+.PRECIOUS : $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM)
+%.elf: $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM)
+ @echo
+ @echo $(MSG_LINKING) $@
+ $(CC) $(THUMB) $(ALL_CFLAGS) $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM) --output $@ $(LDFLAGS)
+# $(CPP) $(THUMB) $(ALL_CFLAGS) $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM) --output $@ $(LDFLAGS)
+
+# Compile: create object files from C source files. ARM/Thumb
+$(COBJ) : %.o : %.c
+ @echo
+ @echo $(MSG_COMPILING) $<
+ $(CC) -c $(THUMB) $(ALL_CFLAGS) $(CONLYFLAGS) $< -o $@
+
+# Compile: create object files from C source files. ARM-only
+$(COBJARM) : %.o : %.c
+ @echo
+ @echo $(MSG_COMPILING_ARM) $<
+ $(CC) -c $(ALL_CFLAGS) $(CONLYFLAGS) $< -o $@
+
+# Compile: create object files from C++ source files. ARM/Thumb
+$(CPPOBJ) : %.o : %.cpp
+ @echo
+ @echo $(MSG_COMPILINGCPP) $<
+ $(CPP) -c $(THUMB) $(ALL_CFLAGS) $(CPPFLAGS) $< -o $@
+
+# Compile: create object files from C++ source files. ARM-only
+$(CPPOBJARM) : %.o : %.cpp
+ @echo
+ @echo $(MSG_COMPILINGCPP_ARM) $<
+ $(CPP) -c $(ALL_CFLAGS) $(CPPFLAGS) $< -o $@
+
+
+# Compile: create assembler files from C source files. ARM/Thumb
+## does not work - TODO - hints welcome
+##$(COBJ) : %.s : %.c
+## $(CC) $(THUMB) -S $(ALL_CFLAGS) $< -o $@
+
+
+# Assemble: create object files from assembler source files. ARM/Thumb
+$(AOBJ) : %.o : %.S
+ @echo
+ @echo $(MSG_ASSEMBLING) $<
+ $(CC) -c $(THUMB) $(ALL_ASFLAGS) $< -o $@
+
+
+# Assemble: create object files from assembler source files. ARM-only
+$(AOBJARM) : %.o : %.S
+ @echo
+ @echo $(MSG_ASSEMBLING_ARM) $<
+ $(CC) -c $(ALL_ASFLAGS) $< -o $@
+
+
+# Target: clean project.
+clean: begin clean_list finished end
+
+
+clean_list :
+ @echo
+ @echo $(MSG_CLEANING)
+ $(REMOVE) $(TARGET).hex
+ $(REMOVE) $(TARGET).bin
+ $(REMOVE) $(TARGET).obj
+ $(REMOVE) $(TARGET).elf
+ $(REMOVE) $(TARGET).map
+ $(REMOVE) $(TARGET).obj
+ $(REMOVE) $(TARGET).a90
+ $(REMOVE) $(TARGET).sym
+ $(REMOVE) $(TARGET).lnk
+ $(REMOVE) $(TARGET).lss
+ $(REMOVE) $(COBJ)
+ $(REMOVE) $(CPPOBJ)
+ $(REMOVE) $(AOBJ)
+ $(REMOVE) $(COBJARM)
+ $(REMOVE) $(CPPOBJARM)
+ $(REMOVE) $(AOBJARM)
+ $(REMOVE) $(LST)
+ $(REMOVE) $(SRC:.c=.s)
+ $(REMOVE) $(SRC:.c=.d)
+ $(REMOVE) $(SRCARM:.c=.s)
+ $(REMOVE) $(SRCARM:.c=.d)
+ $(REMOVE) $(CPPSRC:.cpp=.s)
+ $(REMOVE) $(CPPSRC:.cpp=.d)
+ $(REMOVE) $(CPPSRCARM:.cpp=.s)
+ $(REMOVE) $(CPPSRCARM:.cpp=.d)
+ $(REMOVEDIR) .dep | exit 0
+
+
+# Include the dependency files.
+-include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)
+
+
+# Listing of phony targets.
+.PHONY : all begin finish end sizebefore sizeafter gccversion \
+build elf hex bin lss sym clean clean_list program
+
Added: trunk/firmware/arm/str/cantest_str75x_gcc/project/Readme.txt
===================================================================
--- trunk/firmware/arm/str/cantest_str75x_gcc/project/Readme.txt (rev 0)
+++ trunk/firmware/arm/str/cantest_str75x_gcc/project/Readme.txt 2008-02-17 11:51:48 UTC (rev 843)
@@ -0,0 +1,12 @@
+Simple CAN test sample
+======================
+
+Ake Hedman, D of Scandinavia ak...@do..., http://www.dofscandinavia.com
+
+The sample code send a CAN frame every 500 ms and display a "RECEIVE CAN MESSAGE"
+on the second line of the LCD if a CAN message with id 0x123, length=4 and
+data=1,2,4,8 is received. If another msg is received the line is cleared.
+
+CAN bitrate is 500 kbps.
+
+Based on a sample from ST
Added: trunk/firmware/arm/str/cantest_str75x_gcc/project/STR75x-RAM.ld
===================================================================
--- trunk/firmware/arm/str/cantest_str75x_gcc/project/STR75x-RAM.ld (rev 0)
+++ trunk/firmware/arm/str/cantest_str75x_gcc/project/STR75x-RAM.ld 2008-02-17 11:51:48 UTC (rev 843)
@@ -0,0 +1,228 @@
+/***********************************************************************************
+* Copyright 2005 Anglia Design
+* This demo code and associated components are provided as is and has no warranty,
+* implied or otherwise. You are free to use/modify any of the provided
+* code at your own risk in your applications with the expressed limitation
+* of liability (see below)
+*
+* LIMITATION OF LIABILITY: ANGLIA OR ANGLIA DESIGNS SHALL NOT BE LIABLE FOR ANY
+* LOSS OF PROFITS, LOSS OF USE, LOSS OF DATA, INTERRUPTION OF BUSINESS, NOR FOR
+* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND WHETHER UNDER
+* THIS AGREEMENT OR OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+*
+* Author : Spencer Oliver
+* Web : www.anglia-designs.com
+*
+***********************************************************************************/
+
+/* Stack Sizes */
+
+ _STACKSIZE = 1024;
+ _STACKSIZE_IRQ = 256;
+ _STACKSIZE_FIQ = 256;
+ _STACKSIZE_SVC = 0;
+ _STACKSIZE_ABT = 0;
+ _STACKSIZE_UND = 0;
+ _HEAPSIZE = 1024;
+
+/* Memory Definitions */
+
+MEMORY
+{
+ DATA (rw) : ORIGIN = 0x40000000, LENGTH = 0x00004000
+}
+
+/* Section Definitions */
+
+SECTIONS
+{
+ /* first section is .text which is used for code */
+
+ .text :
+ {
+ KEEP(*(.vectrom))
+ KEEP(*(.init))
+ *(.text .text.*)
+ *(.gnu.linkonce.t.*)
+ *(.glue_7t .glue_7)
+ KEEP(*(.fini))
+ *(.gcc_except_table)
+ } >DATA =0
+ . = ALIGN(4);
+
+ /* .ctors .dtors are used for c++ constructors/destructors */
+
+ .ctors :
+ {
+ PROVIDE(__ctors_start__ = .);
+ KEEP(*(SORT(.ctors.*)))
+ KEEP(*(.ctors))
+ PROVIDE(__ctors_end__ = .);
+ } >DATA
+
+ .dtors :
+ {
+ PROVIDE(__dtors_start__ = .);
+ KEEP(*(SORT(.dtors.*)))
+ KEEP(*(.dtors))
+ PROVIDE(__dtors_end__ = .);
+ } >DATA
+
+ /* .rodata section which is used for read-only data (constants) */
+
+ .rodata :
+ {
+ *(.rodata .rodata.*)
+ *(.gnu.linkonce.r.*)
+ } >DATA
+ . = ALIGN(4);
+
+ _vectext = .;
+ PROVIDE (vectext = .);
+
+ .vect : AT (_vectext)
+ {
+ _vecstart = .;
+ KEEP(*(.vectram))
+ _vecend = .;
+ } >DATA
+
+ _etext = _vectext + SIZEOF(.vect);
+ PROVIDE (etext = .);
+
+ /* .data section which is used for initialized data */
+
+ .data : AT (_etext)
+ {
+ *(.data .data.*)
+ *(.gnu.linkonce.d.*)
+ SORT(CONSTRUCTORS)
+ } >DATA
+ . = ALIGN(4);
+
+ __data_start = .;
+ _edata = .;
+ PROVIDE (edata = .);
+
+ /* .bss section which is used for uninitialized data */
+
+ .bss :
+ {
+ __bss_start = .;
+ __bss_start__ = .;
+ *(.bss .bss.*)
+ *(.gnu.linkonce.b.*)
+ *(COMMON)
+ . = ALIGN(4);
+ } >DATA
+ . = ALIGN(4);
+ __bss_end__ = .;
+
+ _end = .;
+ PROVIDE(end = .);
+
+ /* .heap section which is used for memory allocation */
+
+ .heap (NOLOAD) :
+ {
+ __heap_start__ = .;
+ *(.heap)
+ . = MAX(__heap_start__ + _HEAPSIZE , .);
+ } >DATA
+ __heap_end__ = __heap_start__ + SIZEOF(.heap);
+
+ /* .stack section - user mode stack */
+
+ .stack (__heap_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_start__ = .;
+ *(.stack)
+ . = MAX(__stack_start__ + _STACKSIZE , .);
+ } >DATA
+ __stack_end__ = __stack_start__ + SIZEOF(.stack);
+
+ /* .stack_irq section */
+
+ .stack_irq (__stack_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_irq_start__ = .;
+ *(.stack_irq)
+ . = MAX(__stack_irq_start__ + _STACKSIZE_IRQ , .);
+ } >DATA
+ __stack_irq_end__ = __stack_irq_start__ + SIZEOF(.stack_irq);
+
+ /* .stack_fiq section */
+
+ .stack_fiq (__stack_irq_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_fiq_start__ = .;
+ *(.stack_fiq)
+ . = MAX(__stack_fiq_start__ + _STACKSIZE_FIQ , .);
+ } >DATA
+ __stack_fiq_end__ = __stack_fiq_start__ + SIZEOF(.stack_fiq);
+
+ /* .stack_svc section */
+
+ .stack_svc (__stack_fiq_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_svc_start__ = .;
+ *(.stack_svc)
+ . = MAX(__stack_svc_start__ + _STACKSIZE_SVC , .);
+ } >DATA
+ __stack_svc_end__ = __stack_svc_start__ + SIZEOF(.stack_svc);
+
+ /* .stack_abt section */
+
+ .stack_abt (__stack_svc_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_abt_start__ = .;
+ *(.stack_abt)
+ . = MAX(__stack_abt_start__ + _STACKSIZE_ABT , .);
+ } >DATA
+ __stack_abt_end__ = __stack_abt_start__ + SIZEOF(.stack_abt);
+
+ /* .stack_und section */
+
+ .stack_und (__stack_abt_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_und_start__ = .;
+ *(.stack_und)
+ . = MAX(__stack_und_start__ + _STACKSIZE_UND , .);
+ } >DATA
+ __stack_und_end__ = __stack_und_start__ + SIZEOF(.stack_und);
+
+ /* Stabs debugging sections. */
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+ .stab.excl 0 : { *(.stab.excl) }
+ .stab.exclstr 0 : { *(.stab.exclstr) }
+ .stab.index 0 : { *(.stab.index) }
+ .stab.indexstr 0 : { *(.stab.indexstr) }
+ .comment 0 : { *(.comment) }
+ /* DWARF debug sections.
+ Symbols in the DWARF debugging sections are relative to the beginning
+ of the section so we begin them at 0. */
+ /* DWARF 1 */
+ .debug 0 : { *(.debug) }
+ .line 0 : { *(.line) }
+ /* GNU DWARF 1 extensions */
+ .debug_srcinfo 0 : { *(.debug_srcinfo) }
+ .debug_sfnames 0 : { *(.debug_sfnames) }
+ /* DWARF 1.1 and DWARF 2 */
+ .debug_aranges 0 : { *(.debug_aranges) }
+ .debug_pubnames 0 : { *(.debug_pubnames) }
+ /* DWARF 2 */
+ .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
+ .debug_abbrev 0 : { *(.debug_abbrev) }
+ .debug_line 0 : { *(.debug_line) }
+ .debug_frame 0 : { *(.debug_frame) }
+ .debug_str 0 : { *(.debug_str) }
+ .debug_loc 0 : { *(.debug_loc) }
+ .debug_macinfo 0 : { *(.debug_macinfo) }
+ /* SGI/MIPS DWARF 2 extensions */
+ .debug_weaknames 0 : { *(.debug_weaknames) }
+ .debug_funcnames 0 : { *(.debug_funcnames) }
+ .debug_typenames 0 : { *(.debug_typenames) }
+ .debug_varnames 0 : { *(.debug_varnames) }
+}
+
Added: trunk/firmware/arm/str/cantest_str75x_gcc/project/STR75x-ROM.ld
===================================================================
--- trunk/firmware/arm/str/cantest_str75x_gcc/project/STR75x-ROM.ld (rev 0)
+++ trunk/firmware/arm/str/cantest_str75x_gcc/project/STR75x-ROM.ld 2008-02-17 11:51:48 UTC (rev 843)
@@ -0,0 +1,231 @@
+/***********************************************************************************
+* Copyright 2005 Anglia Design
+* This demo code and associated components are provided as is and has no warranty,
+* implied or otherwise. You are free to use/modify any of the provided
+* code at your own risk in your applications with the expressed limitation
+* of liability (see below)
+*
+* LIMITATION OF LIABILITY: ANGLIA OR ANGLIA DESIGNS SHALL NOT BE LIABLE FOR ANY
+* LOSS OF PROFITS, LOSS OF USE, LOSS OF DATA, INTERRUPTION OF BUSINESS, NOR FOR
+* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND WHETHER UNDER
+* THIS AGREEMENT OR OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+*
+* Author : Spencer Oliver
+* Web : www.anglia-designs.com
+*
+***********************************************************************************/
+
+/* Stack Sizes */
+
+ _STACKSIZE = 1024;
+ _STACKSIZE_IRQ = 256;
+ _STACKSIZE_FIQ = 256;
+ _STACKSIZE_SVC = 0;
+ _STACKSIZE_ABT = 0;
+ _STACKSIZE_UND = 0;
+ _HEAPSIZE = 1024;
+
+/* Memory Definitions */
+
+MEMORY
+{
+ CODE (rx) : ORIGIN = 0x20000000, LENGTH = 0x00040000
+ DATA (rw) : ORIGIN = 0x40000000, LENGTH = 0x00004000
+}
+
+/* Section Definitions */
+
+SECTIONS
+{
+ /* first section is .text which is used for code */
+
+ .text :
+ {
+ KEEP(*(.vectrom))
+ KEEP(*(.init))
+ *(.text .text.*)
+ *(.gnu.linkonce.t.*)
+ *(.glue_7t .glue_7)
+ KEEP(*(.fini))
+ *(.gcc_except_table)
+ } >CODE =0
+ . = ALIGN(4);
+
+ /* .ctors .dtors are used for c++ constructors/destructors */
+
+ .ctors :
+ {
+ PROVIDE(__ctors_start__ = .);
+ KEEP(*(SORT(.ctors.*)))
+ KEEP(*(.ctors))
+ PROVIDE(__ctors_end__ = .);
+ } >CODE
+
+ .dtors :
+ {
+ PROVIDE(__dtors_start__ = .);
+ KEEP(*(SORT(.dtors.*)))
+ KEEP(*(.dtors))
+ PROVIDE(__dtors_end__ = .);
+ } >CODE
+
+ /* .rodata section which is used for read-only data (constants) */
+
+ .rodata :
+ {
+ *(.rodata .rodata.*)
+ *(.gnu.linkonce.r.*)
+ } >CODE
+ . = ALIGN(4);
+
+ _vectext = .;
+ PROVIDE (vectext = .);
+
+ .vect : AT (_vectext)
+ {
+ _vecstart = .;
+ KEEP(*(.vectram))
+ _vecend = .;
+ } >DATA
+
+ _etext = _vectext + SIZEOF(.vect);
+ PROVIDE (etext = .);
+
+ /* .data section which is used for initialized data */
+
+ .data : AT (_etext)
+ {
+ __data_start = .;
+ *(.data .data.*)
+ *(.gnu.linkonce.d.*)
+ SORT(CONSTRUCTORS)
+ . = ALIGN(4);
+ *(.fastrun .fastrun.*)
+ } >DATA
+ . = ALIGN(4);
+
+ _edata = .;
+ PROVIDE (edata = .);
+
+ /* .bss section which is used for uninitialized data */
+
+ .bss :
+ {
+ __bss_start = .;
+ __bss_start__ = .;
+ *(.bss .bss.*)
+ *(.gnu.linkonce.b.*)
+ *(COMMON)
+ . = ALIGN(4);
+ } >DATA
+ . = ALIGN(4);
+ __bss_end__ = .;
+
+ _end = .;
+ PROVIDE(end = .);
+
+ /* .heap section which is used for memory allocation */
+
+ .heap (NOLOAD) :
+ {
+ __heap_start__ = .;
+ *(.heap)
+ . = MAX(__heap_start__ + _HEAPSIZE , .);
+ } >DATA
+ __heap_end__ = __heap_start__ + SIZEOF(.heap);
+
+ /* .stack section - user mode stack */
+
+ .stack (__heap_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_start__ = .;
+ *(.stack)
+ . = MAX(__stack_start__ + _STACKSIZE , .);
+ } >DATA
+ __stack_end__ = __stack_start__ + SIZEOF(.stack);
+
+ /* .stack_irq section */
+
+ .stack_irq (__stack_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_irq_start__ = .;
+ *(.stack_irq)
+ . = MAX(__stack_irq_start__ + _STACKSIZE_IRQ , .);
+ } >DATA
+ __stack_irq_end__ = __stack_irq_start__ + SIZEOF(.stack_irq);
+
+ /* .stack_fiq section */
+
+ .stack_fiq (__stack_irq_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_fiq_start__ = .;
+ *(.stack_fiq)
+ . = MAX(__stack_fiq_start__ + _STACKSIZE_FIQ , .);
+ } >DATA
+ __stack_fiq_end__ = __stack_fiq_start__ + SIZEOF(.stack_fiq);
+
+ /* .stack_svc section */
+
+ .stack_svc (__stack_fiq_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_svc_start__ = .;
+ *(.stack_svc)
+ . = MAX(__stack_svc_start__ + _STACKSIZE_SVC , .);
+ } >DATA
+ __stack_svc_end__ = __stack_svc_start__ + SIZEOF(.stack_svc);
+
+ /* .stack_abt section */
+
+ .stack_abt (__stack_svc_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_abt_start__ = .;
+ *(.stack_abt)
+ . = MAX(__stack_abt_start__ + _STACKSIZE_ABT , .);
+ } >DATA
+ __stack_abt_end__ = __stack_abt_start__ + SIZEOF(.stack_abt);
+
+ /* .stack_und section */
+
+ .stack_und (__stack_abt_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_und_start__ = .;
+ *(.stack_und)
+ . = MAX(__stack_und_start__ + _STACKSIZE_UND , .);
+ } >DATA
+ __stack_und_end__ = __stack_und_start__ + SIZEOF(.stack_und);
+
+ /* Stabs debugging sections. */
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+ .stab.excl 0 : { *(.stab.excl) }
+ .stab.exclstr 0 : { *(.stab.exclstr) }
+ .stab.index 0 : { *(.stab.index) }
+ .stab.indexstr 0 : { *(.stab.indexstr) }
+ .comment 0 : { *(.comment) }
+ /* DWARF debug sections.
+ Symbols in the DWARF debugging sections are relative to the beginning
+ of the section so we begin them at 0. */
+ /* DWARF 1 */
+ .debug 0 : { *(.debug) }
+ .line 0 : { *(.line) }
+ /* GNU DWARF 1 extensions */
+ .debug_srcinfo 0 : { *(.debug_srcinfo) }
+ .debug_sfnames 0 : { *(.debug_sfnames) }
+ /* DWARF 1.1 and DWARF 2 */
+ .debug_aranges 0 : { *(.debug_aranges) }
+ .debug_pubnames 0 : { *(.debug_pubnames) }
+ /* DWARF 2 */
+ .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
+ .debug_abbrev 0 : { *(.debug_abbrev) }
+ .debug_line 0 : { *(.debug_line) }
+ .debug_frame 0 : { *(.debug_frame) }
+ .debug_str 0 : { *(.debug_str) }
+ .debug_loc 0 : { *(.debug_loc) }
+ .debug_macinfo 0 : { *(.debug_macinfo) }
+ /* SGI/MIPS DWARF 2 extensions */
+ .debug_weaknames 0 : { *(.debug_weaknames) }
+ .debug_funcnames 0 : { *(.debug_funcnames) }
+ .debug_typenames 0 : { *(.debug_typenames) }
+ .debug_varnames 0 : { *(.debug_varnames) }
+}
+
Added: trunk/firmware/arm/str/cantest_str75x_gcc/project/cantest.pnproj
===================================================================
--- trunk/firmware/arm/str/cantest_str75x_gcc/project/cantest.pnproj (rev 0)
+++ trunk/firmware/arm/str/cantest_str75x_gcc/project/cantest.pnproj 2008-02-17 11:51:48 UTC (rev 843)
@@ -0,0 +1 @@
+<Project name="cantest"><File path="Readme.txt"></File><File path="startup.s"></File><File path="STR75x-RAM.ld"></File><File path="STR75x-ROM.ld"></File><File path="vectors.c"></File><File path="vectors.h"></File><File path="main.c"></File><File path="Makefile"></File><File path="D:\development\vscp\firmware\arm\str\common\sysTime.c"></File><File path="D:\development\vscp\firmware\arm\str\common\sysTime.h"></File><File path="D:\development\vscp\firmware\arm\str\common\delay.c"></File><File path="D:\development\vscp\firmware\arm\str\common\delay.h"></File><File path="startup.s"></File><File path="vector.s"></File></Project>
\ No newline at end of file
Added: trunk/firmware/arm/str/cantest_str75x_gcc/project/cantest.pnps
===================================================================
--- trunk/firmware/arm/str/cantest_str75x_gcc/project/cantest.pnps (rev 0)
+++ trunk/firmware/arm/str/cantest_str75x_gcc/project/cantest.pnps 2008-02-17 11:51:48 UTC (rev 843)
@@ -0,0 +1 @@
+<pd><ViewState><e p="cantest" x="true"></e></ViewState></pd>
\ No newline at end of file
Added: trunk/firmware/arm/str/cantest_str75x_gcc/project/main.c
=============================...
[truncated message content] |
|
From: <ak...@us...> - 2008-02-17 21:32:12
|
Revision: 855
http://can.svn.sourceforge.net/can/?rev=855&view=rev
Author: akhe
Date: 2008-02-17 13:32:01 -0800 (Sun, 17 Feb 2008)
Log Message:
-----------
Added IAR USB Virtual Com Port code for the str75x
Added Paths:
-----------
trunk/firmware/arm/str/vcp_str75x_iar/
trunk/firmware/arm/str/vcp_str75x_iar/Software Driver/
trunk/firmware/arm/str/vcp_str75x_iar/Software Driver/stmcdc.inf
trunk/firmware/arm/str/vcp_str75x_iar/include/
trunk/firmware/arm/str/vcp_str75x_iar/include/75x_conf.h
trunk/firmware/arm/str/vcp_str75x_iar/include/hw_config.h
trunk/firmware/arm/str/vcp_str75x_iar/include/usb_conf.h
trunk/firmware/arm/str/vcp_str75x_iar/include/usb_desc.h
trunk/firmware/arm/str/vcp_str75x_iar/include/usb_prop.h
trunk/firmware/arm/str/vcp_str75x_iar/include/usb_pwr.h
trunk/firmware/arm/str/vcp_str75x_iar/project/
trunk/firmware/arm/str/vcp_str75x_iar/project/75x_init.s
trunk/firmware/arm/str/vcp_str75x_iar/project/75x_vect.s
trunk/firmware/arm/str/vcp_str75x_iar/project/Backup (2) of Virtual Com Port.ewd
trunk/firmware/arm/str/vcp_str75x_iar/project/Backup (2) of Virtual Com Port.ewp
trunk/firmware/arm/str/vcp_str75x_iar/project/Backup (3) of Virtual Com Port.ewd
trunk/firmware/arm/str/vcp_str75x_iar/project/Backup (3) of Virtual Com Port.ewp
trunk/firmware/arm/str/vcp_str75x_iar/project/Backup (4) of Virtual Com Port.ewd
trunk/firmware/arm/str/vcp_str75x_iar/project/Backup (4) of Virtual Com Port.ewp
trunk/firmware/arm/str/vcp_str75x_iar/project/Backup of Virtual Com Port.ewd
trunk/firmware/arm/str/vcp_str75x_iar/project/Backup of Virtual Com Port.ewp
trunk/firmware/arm/str/vcp_str75x_iar/project/Virtual Com Port.dep
trunk/firmware/arm/str/vcp_str75x_iar/project/Virtual Com Port.ewd
trunk/firmware/arm/str/vcp_str75x_iar/project/Virtual Com Port.ewp
trunk/firmware/arm/str/vcp_str75x_iar/project/Virtual Com Port.eww
trunk/firmware/arm/str/vcp_str75x_iar/project/lnkarm_flash.xcl
trunk/firmware/arm/str/vcp_str75x_iar/project/settings/
trunk/firmware/arm/str/vcp_str75x_iar/project/settings/Virtual Com Port.cspy.bat
trunk/firmware/arm/str/vcp_str75x_iar/project/settings/Virtual Com Port.dbgdt
trunk/firmware/arm/str/vcp_str75x_iar/project/settings/Virtual Com Port.dni
trunk/firmware/arm/str/vcp_str75x_iar/project/settings/Virtual Com Port.wsdt
trunk/firmware/arm/str/vcp_str75x_iar/source/
trunk/firmware/arm/str/vcp_str75x_iar/source/75x_it.c
trunk/firmware/arm/str/vcp_str75x_iar/source/hw_config.c
trunk/firmware/arm/str/vcp_str75x_iar/source/main.c
trunk/firmware/arm/str/vcp_str75x_iar/source/usb_desc.c
trunk/firmware/arm/str/vcp_str75x_iar/source/usb_endp.c
trunk/firmware/arm/str/vcp_str75x_iar/source/usb_istr.c
trunk/firmware/arm/str/vcp_str75x_iar/source/usb_prop.c
trunk/firmware/arm/str/vcp_str75x_iar/source/usb_pwr.c
Added: trunk/firmware/arm/str/vcp_str75x_iar/Software Driver/stmcdc.inf
===================================================================
--- trunk/firmware/arm/str/vcp_str75x_iar/Software Driver/stmcdc.inf (rev 0)
+++ trunk/firmware/arm/str/vcp_str75x_iar/Software Driver/stmcdc.inf 2008-02-17 21:32:01 UTC (rev 855)
@@ -0,0 +1,64 @@
+;
+; STMicroelectronics Comunication Device Class driver instalation file
+; (C)2006 Copyright STMicroelectronics
+;
+
+[Version]
+Signature="$Windows NT$"
+Class=Ports
+ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
+Provider=%STM%
+LayoutFile=layout.inf
+DriverVer=10/02/06
+
+[Manufacturer]
+%STM%=DeviceList
+
+[DestinationDirs]
+DefaultDestDir=12
+
+[SourceDisksFiles]
+
+[SourceDisksNames]
+
+[DeviceList]
+%DESCRIPTION%=STMUSB, USB\VID_0483&PID_5740
+
+;------------------------------------------------------------------------------
+; Windows 2000/XP Sections
+;------------------------------------------------------------------------------
+
+[STMUSB.nt]
+include=mdmcpq.inf
+CopyFiles=DriverCopyFiles
+AddReg=STMUSB.nt.AddReg
+
+[DriverCopyFiles]
+usbser.sys,,,0x20
+
+[STMUSB.nt.AddReg]
+HKR,,DevLoader,,*ntkern
+HKR,,NTMPDriver,,usbser.sys
+HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
+
+[STMUSB.nt.Services]
+AddService=usbser, 0x00000002, DriverService
+
+
+[STMUSB.nt.HW]
+include=mdmcpq.inf
+
+[DriverService]
+DisplayName=%DESCRIPTION%
+ServiceType=1
+StartType=3
+ErrorControl=1
+ServiceBinary=%12%\usbser.sys
+
+;------------------------------------------------------------------------------
+; String Definitions
+;------------------------------------------------------------------------------
+
+[Strings]
+STM="STMicroelectronics"
+DESCRIPTION="STR75x CDC Communication Port"
Added: trunk/firmware/arm/str/vcp_str75x_iar/include/75x_conf.h
===================================================================
--- trunk/firmware/arm/str/vcp_str75x_iar/include/75x_conf.h (rev 0)
+++ trunk/firmware/arm/str/vcp_str75x_iar/include/75x_conf.h 2008-02-17 21:32:01 UTC (rev 855)
@@ -0,0 +1,117 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : 75x_conf.h
+* Author : MCD Application Team
+* Date First Issued : 10/01/2006 : V1.0
+* Description : Library configuration file.
+********************************************************************************
+* History:
+* 10/01/2006 : V1.0
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __75x_CONF_H
+#define __75x_CONF_H
+
+/* Includes ------------------------------------------------------------------*/
+/* Exported types ------------------------------------------------------------*/
+/* Exported constants --------------------------------------------------------*/
+/* Comment the line below to compile the library in release mode */
+
+#ifdef __IAR_SYSTEMS_ICC__ /* IAR Compiler */
+#define inline inline
+#define RAM_exe __ramfunc
+#endif
+
+
+#ifdef __CC_ARM /* ARM Compiler */
+#define RAM_exe
+#define inline __inline
+#endif
+
+
+/************************************* SMI ************************************/
+//#define _SMI
+
+/************************************* CFG ************************************/
+#define _CFG
+
+/************************************* MRCC ************************************/
+#define _MRCC
+
+/************************************* ADC ************************************/
+//#define _ADC
+
+/************************************* TB *************************************/
+//#define _TB
+
+/************************************* TIM ************************************/
+//#define _TIM
+//#define _TIM0
+//#define _TIM1
+//#define _TIM2
+
+/************************************* PWM ************************************/
+//#define _PWM
+
+/************************************* WDG ************************************/
+#define _WDG
+
+/************************************* SSP ************************************/
+//#define _SSP
+//#define _SSP0
+//#define _SSP1
+
+/************************************* CAN ************************************/
+//#define _CAN
+
+/************************************* I2C ************************************/
+//#define _I2C
+
+/************************************* UART ***********************************/
+#define _UART
+#define _UART0
+//#define _UART1
+//#define _UART2
+
+/************************************* GPIO ***********************************/
+#define _GPIO
+#define _GPIO0
+#define _GPIO1
+//#define _GPIO2
+//#define _GPIOREMAP
+
+/************************************* DMA ************************************/
+//#define _DMA
+//#define _DMA_Stream0
+//#define _DMA_Stream1
+//#define _DMA_Stream2
+//#define _DMA_Stream3
+
+/************************************* RTC ************************************/
+//#define _RTC
+
+/************************************* EXTIT **********************************/
+#define _EXTIT
+
+/************************************* EIC ************************************/
+#define _EIC
+
+/* Comment the following line, depending on the external Quartz oscillator used
+ in your application */
+#define Main_Oscillator 4000000 /* 4 MHz Quartz oscillator used */
+//#define Main_Oscillator 8000000 /* 8 MHz Quartz oscillator used */
+
+/* Exported macro ------------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+
+#endif /* __75x_CONF_H */
+
+/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
+
Added: trunk/firmware/arm/str/vcp_str75x_iar/include/hw_config.h
===================================================================
--- trunk/firmware/arm/str/vcp_str75x_iar/include/hw_config.h (rev 0)
+++ trunk/firmware/arm/str/vcp_str75x_iar/include/hw_config.h 2008-02-17 21:32:01 UTC (rev 855)
@@ -0,0 +1,38 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : hw_config.h
+* Author : MCD Application Team
+* Date First Issued : 10/01/2006 : V1.0
+* Description : Hardware Configuration & Setup
+********************************************************************************
+* History:
+* 10/01/2006 : V1.0
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __HW_Config_H
+#define __HW_Config_H
+/* Includes ------------------------------------------------------------------*/
+/* Exported types ------------------------------------------------------------*/
+/* Exported constants --------------------------------------------------------*/
+/* Exported macro ------------------------------------------------------------*/
+/* Exported define -----------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+void Set_System(void);
+void Set_USBClock(void);
+void Enter_LowPowerMode(void);
+void Leave_LowPowerMode(void);
+void USB_Interrupts_Config(void);
+void USB_Cable_Config (FunctionalState NewState);
+void UART0_Config_Default(void);
+bool UART0_Config(void);
+void USB_To_UART_Send_Data(u8* data_buffer, u8 Nb_bytes);
+void UART_To_USB_Send_Data(void);
+#endif /* __HW_CONFIG_H */
+/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
+
Added: trunk/firmware/arm/str/vcp_str75x_iar/include/usb_conf.h
===================================================================
--- trunk/firmware/arm/str/vcp_str75x_iar/include/usb_conf.h (rev 0)
+++ trunk/firmware/arm/str/vcp_str75x_iar/include/usb_conf.h 2008-02-17 21:32:01 UTC (rev 855)
@@ -0,0 +1,101 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : usb_conf.h
+* Author : MCD Application Team
+* Date First Issued : 10/01/2006 : V1.0
+* Description : Voice Speaker configuration file
+********************************************************************************
+* History:
+* 10/01/2006 : V1.0
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+#ifndef __USB_CONF_H
+#define __USB_CONF_H
+/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
+
+/*-------------------------------------------------------------*/
+/* define the \xB5C and the Bufferd Mode */
+/*-------------------------------------------------------------*/
+#define STR7xx /*STR7 family*/
+//#define STR71x /* STR71x \xB5Cs*/
+#define STR75x /* STR75x \xB5Cs*/
+//#define STR91x /*STR91x Family*/
+//#define STR91x_USB_BUFFERED /* Buffered Mode*/
+//#define STR91x_USB_NON_BUFFERED /*Non buffered mode*/
+/*-------------------------------------------------------------*/
+/* EP_NUM */
+/* defines how many endpoints are used by the device */
+/*-------------------------------------------------------------*/
+
+#define EP_NUM (4)
+
+/*-------------------------------------------------------------*/
+/* -------------- Buffer Description Table -----------------*/
+/*-------------------------------------------------------------*/
+/* buffer table base address */
+/* buffer table base address */
+#define BTABLE_ADDRESS (0x00)
+
+/* EP0 */
+/* rx/tx buffer base address */
+#define ENDP0_RXADDR (0x40)
+#define ENDP0_TXADDR (0x80)
+
+/* EP1 */
+/* tx buffer base address */
+#define ENDP1_TXADDR (0xC0)
+#define ENDP2_TXADDR (0x100)
+#define ENDP3_RXADDR (0x110)
+
+
+/*-------------------------------------------------------------*/
+/* ------------------- ISTR events -------------------------*/
+/*-------------------------------------------------------------*/
+/* IMR_MSK */
+/* mask defining which events has to be handled */
+/* by the device application software */
+#define IMR_MSK (CNTR_CTRM | CNTR_SOFM | CNTR_RESETM )
+
+/* CTR service routines */
+/* associated to defined endpoints */
+//#define EP1_IN_Callback NOP_Process
+#define EP2_IN_Callback NOP_Process
+#define EP3_IN_Callback NOP_Process
+#define EP4_IN_Callback NOP_Process
+#define EP5_IN_Callback NOP_Process
+#define EP6_IN_Callback NOP_Process
+#define EP7_IN_Callback NOP_Process
+#define EP8_IN_Callback NOP_Process
+#define EP9_IN_Callback NOP_Process
+#define EP10_IN_Callback NOP_Process
+#define EP11_IN_Callback NOP_Process
+#define EP12_IN_Callback NOP_Process
+#define EP13_IN_Callback NOP_Process
+#define EP14_IN_Callback NOP_Process
+#define EP15_IN_Callback NOP_Process
+
+
+#define EP1_OUT_Callback NOP_Process
+#define EP2_OUT_Callback NOP_Process
+//#define EP3_OUT_Callback NOP_Process
+#define EP4_OUT_Callback NOP_Process
+#define EP5_OUT_Callback NOP_Process
+#define EP6_OUT_Callback NOP_Process
+#define EP7_OUT_Callback NOP_Process
+#define EP8_OUT_Callback NOP_Process
+#define EP9_OUT_Callback NOP_Process
+#define EP10_OUT_Callback NOP_Process
+#define EP11_OUT_Callback NOP_Process
+#define EP12_OUT_Callback NOP_Process
+#define EP13_OUT_Callback NOP_Process
+#define EP14_OUT_Callback NOP_Process
+#define EP15_OUT_Callback NOP_Process
+
+
+#endif /* __USB_CONF_H */
+/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/vcp_str75x_iar/include/usb_desc.h
===================================================================
--- trunk/firmware/arm/str/vcp_str75x_iar/include/usb_desc.h (rev 0)
+++ trunk/firmware/arm/str/vcp_str75x_iar/include/usb_desc.h 2008-02-17 21:32:01 UTC (rev 855)
@@ -0,0 +1,55 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : usb_desc.h
+* Author : MCD Application Team
+* Date First Issued : 10/01/2006 : V1.0
+* Description : Descriptor Header for Virtual Com Port Demo
+********************************************************************************
+* History:
+* 10/01/2006 : V1.0
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __USB_DESC_H
+#define __USB_DESC_H
+/* Includes ------------------------------------------------------------------*/
+/* Exported types ------------------------------------------------------------*/
+/* Exported constants --------------------------------------------------------*/
+/* Exported macro ------------------------------------------------------------*/
+/* Exported define -----------------------------------------------------------*/
+#define USB_DEVICE_DESCRIPTOR_TYPE 0x01
+#define USB_CONFIGURATION_DESCRIPTOR_TYPE 0x02
+#define USB_STRING_DESCRIPTOR_TYPE 0x03
+#define USB_INTERFACE_DESCRIPTOR_TYPE 0x04
+#define USB_ENDPOINT_DESCRIPTOR_TYPE 0x05
+
+#define VIRTUAL_COM_PORT_DATA_SIZE 64
+#define VIRTUAL_COM_PORT_INT_SIZE 8
+
+#define VIRTUAL_COM_PORT_SIZ_DEVICE_DESC 18
+#define VIRTUAL_COM_PORT_SIZ_CONFIG_DESC 67
+#define VIRTUAL_COM_PORT_SIZ_STRING_LANGID 4
+#define VIRTUAL_COM_PORT_SIZ_STRING_VENDOR 38
+#define VIRTUAL_COM_PORT_SIZ_STRING_PRODUCT 52
+#define VIRTUAL_COM_PORT_SIZ_STRING_SERIAL 22
+
+
+#define STANDARD_ENDPOINT_DESC_SIZE 0x09
+
+/* Exported functions ------------------------------------------------------- */
+extern const u8 Virtual_Com_Port_DeviceDescriptor[VIRTUAL_COM_PORT_SIZ_DEVICE_DESC];
+extern const u8 Virtual_Com_Port_ConfigDescriptor[VIRTUAL_COM_PORT_SIZ_CONFIG_DESC];
+
+extern const u8 Virtual_Com_Port_StringLangID[VIRTUAL_COM_PORT_SIZ_STRING_LANGID];
+extern const u8 Virtual_Com_Port_StringVendor[VIRTUAL_COM_PORT_SIZ_STRING_VENDOR];
+extern const u8 Virtual_Com_Port_StringProduct[VIRTUAL_COM_PORT_SIZ_STRING_PRODUCT];
+extern const u8 Virtual_Com_Port_StringSerial[VIRTUAL_COM_PORT_SIZ_STRING_SERIAL];
+
+#endif /* __USB_DESC_H */
+/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/vcp_str75x_iar/include/usb_prop.h
===================================================================
--- trunk/firmware/arm/str/vcp_str75x_iar/include/usb_prop.h (rev 0)
+++ trunk/firmware/arm/str/vcp_str75x_iar/include/usb_prop.h 2008-02-17 21:32:01 UTC (rev 855)
@@ -0,0 +1,72 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : usb_prop.h
+* Author : MCD Application Team
+* Date First Issued : 10/01/2006 : V1.0
+* Description : All processing related to Virtual Com Port Demo (Endp=0)
+********************************************************************************
+* History:
+* 10/01/2006 : V1.0
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __USB_PROP_H
+#define __USB_PROP_H
+/* Includes ------------------------------------------------------------------*/
+/* Exported types ------------------------------------------------------------*/
+/* Exported constants --------------------------------------------------------*/
+/* Exported macro ------------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+void Virtual_Com_Port_init(void);
+void Virtual_Com_Port_Reset(void);
+void Virtual_Com_Port_Status_In (void);
+void Virtual_Com_Port_Status_Out (void);
+RESULT Virtual_Com_Port_Data_Setup(u8);
+RESULT Virtual_Com_Port_NoData_Setup(u8);
+RESULT Virtual_Com_Port_Get_Interface_Setting(u8 Interface,u8 AlternateSetting);
+u8 *Virtual_Com_Port_GetDeviceDescriptor(u16 );
+u8 *Virtual_Com_Port_GetConfigDescriptor(u16);
+u8 *Virtual_Com_Port_GetStringDescriptor(u16);
+
+u8 *Virtual_Com_Port_GetLineCoding(u16 Length);
+u8 *Virtual_Com_Port_SetLineCoding(u16 Length);
+
+/* Exported define -----------------------------------------------------------*/
+typedef struct
+{
+ u32 bitrate;
+ u8 format;
+ u8 paritytype;
+ u8 datatype;
+} LINE_CODING;
+
+#define Virtual_Com_Port_GetConfiguration NOP_Process
+#define Virtual_Com_Port_SetConfiguration NOP_Process
+#define Virtual_Com_Port_GetInterface NOP_Process
+#define Virtual_Com_Port_SetInterface NOP_Process
+#define Virtual_Com_Port_GetStatus NOP_Process
+#define Virtual_Com_Port_ClearFeature NOP_Process
+#define Virtual_Com_Port_SetEndPointFeature NOP_Process
+#define Virtual_Com_Port_SetDeviceFeature NOP_Process
+#define Virtual_Com_Port_SetDeviceAddress NOP_Process
+
+#define SEND_ENCAPSULATED_COMMAND 0x00
+#define GET_ENCAPSULATED_RESPONSE 0x01
+#define SET_COMM_FEATURE 0x02
+#define GET_COMM_FEATURE 0x03
+#define CLEAR_COMM_FEATURE 0x04
+#define SET_LINE_CODING 0x20
+#define GET_LINE_CODING 0x21
+#define SET_CONTROL_LINE_STATE 0x22
+#define SEND_BREAK 0x23
+
+#endif /* __USB_PROP_H */
+/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
+
+
Added: trunk/firmware/arm/str/vcp_str75x_iar/include/usb_pwr.h
===================================================================
--- trunk/firmware/arm/str/vcp_str75x_iar/include/usb_pwr.h (rev 0)
+++ trunk/firmware/arm/str/vcp_str75x_iar/include/usb_pwr.h 2008-02-17 21:32:01 UTC (rev 855)
@@ -0,0 +1,55 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : usb_pwr.h
+* Author : MCD Application Team
+* Date First Issued : 10/01/2006 : V1.0
+* Description : Connection/disconnection & power management header
+********************************************************************************
+* History:
+* 10/01/2006 : V1.0
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __USB_PWR_H
+#define __USB_PWR_H
+/* Includes ------------------------------------------------------------------*/
+/* Exported types ------------------------------------------------------------*/
+typedef enum _RESUME_STATE{
+ RESUME_EXTERNAL,
+ RESUME_INTERNAL,
+ RESUME_LATER,
+ RESUME_WAIT,
+ RESUME_START,
+ RESUME_ON,
+ RESUME_OFF,
+ RESUME_ESOF
+} RESUME_STATE;
+
+typedef enum _DEVICE_STATE{
+ UNCONNECTED,
+ ATTACHED,
+ POWERED,
+ DEFAULT,
+ ADDRESSED,
+ CONFIGURED
+} DEVICE_STATE;
+/* Exported constants --------------------------------------------------------*/
+/* Exported macro ------------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+void Suspend(void);
+void Resume_Init(void);
+void Resume(RESUME_STATE eResumeSetVal);
+RESULT PowerOn(void);
+RESULT PowerOff(void);
+/* External variables --------------------------------------------------------*/
+extern vu8 bDeviceState; /* USB device status */
+extern volatile bool fSuspendEnabled; /* true when suspend is possible */
+
+#endif /*__USB_PWR_H*/
+
+/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/vcp_str75x_iar/project/75x_init.s
===================================================================
--- trunk/firmware/arm/str/vcp_str75x_iar/project/75x_init.s (rev 0)
+++ trunk/firmware/arm/str/vcp_str75x_iar/project/75x_init.s 2008-02-17 21:32:01 UTC (rev 855)
@@ -0,0 +1,254 @@
+;******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+;* File Name : 75x_init.s
+;* Author : MCD Application Team
+;* Date First Issued : 03/10/2006
+;* Description : This module performs:
+;* - Memory remapping (if required),
+;* - Stack pointer initialisation for each mode ,
+;* - Interrupt Controller Initialisation
+;* - Branches to ?main in the C library (which eventually
+;* calls main()).
+;* On reset, the ARM core starts up in Supervisor (SVC) mode,
+;* in ARM state,with IRQ and FIQ disabled.
+;*******************************************************************************
+; History:
+; 07/17/2006 : V1.0
+; 03/10/2006 : V0.1
+;*******************************************************************************
+; THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+; WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+; AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+; INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+; CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+; INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+;*******************************************************************************
+
+ IMPORT WAKUP_Addr ; imported from 75x_vect.s
+
+
+
+
+ ; Depending on Your Application, Disable or Enable the following Defines
+ ; ----------------------------------------------------------------------------
+ ; SMI Bank0 configuration
+ ; ----------------------------------------------------------------------------
+ ; If you need to accees the SMI Bank0
+ ; uncomment next line
+ ; #define SMI_Bank0_EN
+
+ ; ----------------------------------------------------------------------------
+ ; Memory remapping
+ ; ----------------------------------------------------------------------------
+ ; #define Remap_SRAM ; remap SRAM at address 0x00
+
+ ; ----------------------------------------------------------------------------
+ ; EIC initialization
+ ; ----------------------------------------------------------------------------
+ #define EIC_INIT ; Configure and Initialize EIC
+
+; Standard definitions of mode bits and interrupt (I & F) flags in PSRs
+Mode_USR EQU 0x10
+Mode_FIQ EQU 0x11
+Mode_IRQ EQU 0x12
+Mode_SVC EQU 0x13
+Mode_ABT EQU 0x17
+Mode_UND EQU 0x1B
+Mode_SYS EQU 0x1F
+
+I_Bit EQU 0x80 ; when I bit is set, IRQ is disabled
+F_Bit EQU 0x40 ; when F bit is set, FIQ is disabled
+
+
+; MRCC Register
+MRCC_PCLKEN_Addr EQU 0x60000030 ; Peripheral Clock Enable register base address
+
+; CFG Register
+CFG_GLCONF_Addr EQU 0x60000010 ; Global Configuration register base address
+SRAM_mask EQU 0x0002 ; to remap RAM at 0x0
+
+; GPIO Register
+GPIOREMAP0R_Addr EQU 0xFFFFE420
+SMI_EN_Mask EQU 0x00000001
+
+; SMI Register
+SMI_CR1_Addr EQU 0x90000000
+
+; EIC Registers offsets
+EIC_Base_addr EQU 0xFFFFF800 ; EIC base address
+ICR_off_addr EQU 0x00 ; Interrupt Control register offset
+CIPR_off_addr EQU 0x08 ; Current Interrupt Priority Register offset
+IVR_off_addr EQU 0x18 ; Interrupt Vector Register offset
+FIR_off_addr EQU 0x1C ; Fast Interrupt Register offset
+IER_off_addr EQU 0x20 ; Interrupt Enable Register offset
+IPR_off_addr EQU 0x40 ; Interrupt Pending Bit Register offset
+SIR0_off_addr EQU 0x60 ; Source Interrupt Register 0
+
+;---------------------------------------------------------------
+; ?program_start
+;---------------------------------------------------------------
+ MODULE ?program_start
+ SECTION IRQ_STACK:DATA:NOROOT(3)...
[truncated message content] |
|
From: <ak...@us...> - 2008-02-17 21:39:31
|
Revision: 857
http://can.svn.sourceforge.net/can/?rev=857&view=rev
Author: akhe
Date: 2008-02-17 13:39:29 -0800 (Sun, 17 Feb 2008)
Log Message:
-----------
Added USB Bootloader firmware for str75x
Added Paths:
-----------
trunk/firmware/arm/str/bootloader_str75x/
trunk/firmware/arm/str/bootloader_str75x/Software Applet/
trunk/firmware/arm/str/bootloader_str75x/Software Applet/Readme.txt
trunk/firmware/arm/str/bootloader_str75x/Software Applet/images/
trunk/firmware/arm/str/bootloader_str75x/Software Applet/images/STR750-Eval_Audio Speaker.dfu
trunk/firmware/arm/str/bootloader_str75x/Software Applet/images/STR750-Eval_Joystick Mouse.dfu
trunk/firmware/arm/str/bootloader_str75x/Software Applet/images/STR750-Eval_Microphone.dfu
trunk/firmware/arm/str/bootloader_str75x/Software Applet/images/STR750-Eval_Virtual Com Port.dfu
trunk/firmware/arm/str/bootloader_str75x/Software Applet/setup.exe
trunk/firmware/arm/str/bootloader_str75x/include/
trunk/firmware/arm/str/bootloader_str75x/include/75x_conf.h
trunk/firmware/arm/str/bootloader_str75x/include/hw_config.h
trunk/firmware/arm/str/bootloader_str75x/include/usb_conf.h
trunk/firmware/arm/str/bootloader_str75x/include/usb_desc.h
trunk/firmware/arm/str/bootloader_str75x/include/usb_prop.h
trunk/firmware/arm/str/bootloader_str75x/include/usb_pwr.h
trunk/firmware/arm/str/bootloader_str75x/project/
trunk/firmware/arm/str/bootloader_str75x/project/EWARM/
trunk/firmware/arm/str/bootloader_str75x/project/EWARM/75x_init.s
trunk/firmware/arm/str/bootloader_str75x/project/EWARM/75x_vect.s
trunk/firmware/arm/str/bootloader_str75x/project/EWARM/DFU.ewd
trunk/firmware/arm/str/bootloader_str75x/project/EWARM/DFU.ewp
trunk/firmware/arm/str/bootloader_str75x/project/EWARM/DFU.eww
trunk/firmware/arm/str/bootloader_str75x/project/EWARM/init_tab.s
trunk/firmware/arm/str/bootloader_str75x/project/EWARM/lnkarm_flash.xcl
trunk/firmware/arm/str/bootloader_str75x/source/
trunk/firmware/arm/str/bootloader_str75x/source/75x_it.c
trunk/firmware/arm/str/bootloader_str75x/source/hw_config.c
trunk/firmware/arm/str/bootloader_str75x/source/main.c
trunk/firmware/arm/str/bootloader_str75x/source/usb_desc.c
trunk/firmware/arm/str/bootloader_str75x/source/usb_istr.c
trunk/firmware/arm/str/bootloader_str75x/source/usb_prop.c
trunk/firmware/arm/str/bootloader_str75x/source/usb_pwr.c
Added: trunk/firmware/arm/str/bootloader_str75x/Software Applet/Readme.txt
===================================================================
--- trunk/firmware/arm/str/bootloader_str75x/Software Applet/Readme.txt (rev 0)
+++ trunk/firmware/arm/str/bootloader_str75x/Software Applet/Readme.txt 2008-02-17 21:39:29 UTC (rev 857)
@@ -0,0 +1,57 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : Readme.txt
+* Author : MCD Application Team
+* Date First Issued : 10/01/2006
+* Description : Description of the PC APPLI DfuSe -
+ : DFU STMicroelectronics Extension.
+********************************************************************************
+* History:
+* 10/01/2006 : V1.0
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+
+Directory contents
+==================
+
+ - Setup.exe Install file PC DFU application
+ + images Directory containing STR7/9 demos images
+
+How to use it
+=============
+
+ 1- Run "Setup.exe" to install the PC APPLI DfuSe program to the folder of your choice
+ (default path: C:\Program Files\STMicroelectronics\DfuSe)
+ The directory contents the following files :
+
+ - DfuSeDemo.exe Sample GUI for DFU demonstration
+ - DfuFileMgr.exe GUI helping people to make DFU files from S19, Hex, bin
+ - STDFU.dll Dll that issues basic DFU and HID for DFU requests
+ - STDFUPRT.dll Dll that implements Protocol for upload and download.
+ - STDFUFiles.dll Dll that implements .dfu files.
+ - STTub203.sys Driver to be loaded for demoboard
+ - STTubeDevice203.dll Dll layer for easier driver access
+ - STDFU.inf Configuration file for driver
+
+ 2- Load your firmware project using your prefered Toolchain and load the DFU image
+ using JTAG for the first time.
+
+ For STR91x , you can use also CAPS Software and download the DFU CAPS image included
+ in the "images" directory using the flashlink ( BANK1 Must be remapped at 0 at
+ boot time).
+
+ 3- Run the Board and then Connect your USB cable, The first time you have to
+ Install your device with the driver and the inf file already included in the install
+ directory.
+
+ Please note this inf file and the GUI sample are configured only
+ for devices in DFU mode (VID 0x0483, PID 0xDF11)
+
+ 4- Use it ! : Upgrade your board using the included images and then "Leave DFU Mode"
+
+******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE******
\ No newline at end of file
Added: trunk/firmware/arm/str/bootloader_str75x/Software Applet/images/STR750-Eval_Audio Speaker.dfu
===================================================================
(Binary files differ)
Property changes on: trunk/firmware/arm/str/bootloader_str75x/Software Applet/images/STR750-Eval_Audio Speaker.dfu
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/firmware/arm/str/bootloader_str75x/Software Applet/images/STR750-Eval_Joystick Mouse.dfu
===================================================================
(Binary files differ)
Property changes on: trunk/firmware/arm/str/bootloader_str75x/Software Applet/images/STR750-Eval_Joystick Mouse.dfu
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/firmware/arm/str/bootloader_str75x/Software Applet/images/STR750-Eval_Microphone.dfu
===================================================================
(Binary files differ)
Property changes on: trunk/firmware/arm/str/bootloader_str75x/Software Applet/images/STR750-Eval_Microphone.dfu
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/firmware/arm/str/bootloader_str75x/Software Applet/images/STR750-Eval_Virtual Com Port.dfu
===================================================================
(Binary files differ)
Property changes on: trunk/firmware/arm/str/bootloader_str75x/Software Applet/images/STR750-Eval_Virtual Com Port.dfu
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/firmware/arm/str/bootloader_str75x/Software Applet/setup.exe
===================================================================
(Binary files differ)
Property changes on: trunk/firmware/arm/str/bootloader_str75x/Software Applet/setup.exe
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/firmware/arm/str/bootloader_str75x/include/75x_conf.h
===================================================================
--- trunk/firmware/arm/str/bootloader_str75x/include/75x_conf.h (rev 0)
+++ trunk/firmware/arm/str/bootloader_str75x/include/75x_conf.h 2008-02-17 21:39:29 UTC (rev 857)
@@ -0,0 +1,118 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : 75x_conf.h
+* Author : MCD Application Team
+* Date First Issued : 10/01/2006 : V1.0
+* Description : Library configuration file.
+********************************************************************************
+* History:
+* 10/01/2006 : V1.0
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __75x_CONF_H
+#define __75x_CONF_H
+
+/* Includes ------------------------------------------------------------------*/
+/* Exported types ------------------------------------------------------------*/
+/* Exported constants --------------------------------------------------------*/
+/* Comment the line below to compile the library in release mode */
+
+#ifdef __IAR_SYSTEMS_ICC__ /* IAR Compiler */
+#define RAM_exe __ramfunc
+#define ARM_exe __arm
+#define inline inline
+#endif
+
+#ifdef __CC_ARM /* ARM Compiler */
+#define RAM_exe
+#define ARM_exe
+#define inline __inline
+#endif
+
+
+/************************************* SMI ************************************/
+#define _SMI
+
+/************************************* CFG ************************************/
+#define _CFG
+
+/************************************* MRCC ************************************/
+#define _MRCC
+
+/************************************* ADC ************************************/
+//#define _ADC
+
+/************************************* TB *************************************/
+//#define _TB
+
+/************************************* TIM ************************************/
+//#define _TIM
+//#define _TIM0
+//#define _TIM1
+//#define _TIM2
+
+/************************************* PWM ************************************/
+//#define _PWM
+
+/************************************* WDG ************************************/
+#define _WDG
+
+/************************************* SSP ************************************/
+//#define _SSP
+//#define _SSP0
+//#define _SSP1
+
+/************************************* CAN ************************************/
+//#define _CAN
+
+/************************************* I2C ************************************/
+//#define _I2C
+
+/************************************* UART ***********************************/
+//#define _UART
+//#define _UART0
+//#define _UART1
+//#define _UART2
+
+/************************************* GPIO ***********************************/
+#define _GPIO
+//#define _GPIO0
+//#define _GPIO1
+#define _GPIO2
+//#define _GPIOREMAP
+
+/************************************* DMA ************************************/
+//#define _DMA
+//#define _DMA_Stream0
+//#define _DMA_Stream1
+//#define _DMA_Stream2
+//#define _DMA_Stream3
+
+/************************************* RTC ************************************/
+//#define _RTC
+
+/************************************* EXTIT **********************************/
+#define _EXTIT
+
+/************************************* EIC ************************************/
+#define _EIC
+
+/* Comment the following line, depending on the external Quartz oscillator used
+ in your application */
+#define Main_Oscillator 4000000 /* 4 MHz Quartz oscillator used */
+//#define Main_Oscillator 8000000 /* 8 MHz Quartz oscillator used */
+
+/* Exported macro ------------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+
+#endif /* __75x_CONF_H */
+
+/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
+
Added: trunk/firmware/arm/str/bootloader_str75x/include/hw_config.h
===================================================================
--- trunk/firmware/arm/str/bootloader_str75x/include/hw_config.h (rev 0)
+++ trunk/firmware/arm/str/bootloader_str75x/include/hw_config.h 2008-02-17 21:39:29 UTC (rev 857)
@@ -0,0 +1,73 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : hw_config.h
+* Author : MCD Application Team
+* Date First Issued : 10/01/2006 : V1.0
+* Description : Hardware Configuration & Setup
+********************************************************************************
+* History:
+* 10/01/2006 : V1.0
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __HW_CONFIG_H
+#define __HW_CONFIG_H
+/* Includes ------------------------------------------------------------------*/
+/* Exported types ------------------------------------------------------------*/
+typedef struct
+{
+ vu32 CR0;
+ vu32 CR1;
+ vu32 DR0;
+ vu32 DR1;
+ vu32 AR;
+ vu32 ER;
+} FLASHR_TypeDef;
+
+typedef struct
+{
+ vu32 NVWPAR;
+ vu32 EMPTY;
+ vu32 NVAPR0;
+ vu32 NVAPR1;
+} FLASHPR_TypeDef;
+
+/* Exported constants --------------------------------------------------------*/
+#define FLASHR_BASE 0x20100000
+#define FLASHPR_BASE 0x2010DFB0
+#define ApplicationAddress 0x20004000
+
+
+/* Exported macro ------------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+void Set_System(void);
+void Set_USBClock(void);
+void Enter_LowPowerMode(void);
+void Leave_LowPowerMode(void);
+void USB_Cable_Config (FunctionalState NewState);
+void USB_Interrupts_Config(void);
+
+void DFU_Button_Config(void);
+u8 DFU_Button_Read(void);
+
+void Reset_Device(void);
+
+void Internal_FLASH_SectorErase(u32 Sectors);
+void Internal_FLASH_WordWrite(u32 Address, u32 Data);
+void Internal_FLASH_WritePrConfig(u32 Xsectors, FunctionalState NewState);
+u32 Internal_FLASH_SectorMask(u32 Address);
+
+void SMI_FLASH_Init(void);
+void SMI_FLASH_SectorErase(u32 Address);
+void SMI_FLASH_WordWrite(u32 Address,u32 Data);
+void SMI_FLASH_PageWrite(u32 Address,u32* wBuffer);
+/* External variables --------------------------------------------------------*/
+
+#endif /*__HW_CONFIG_H*/
+
+/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/bootloader_str75x/include/usb_conf.h
===================================================================
--- trunk/firmware/arm/str/bootloader_str75x/include/usb_conf.h (rev 0)
+++ trunk/firmware/arm/str/bootloader_str75x/include/usb_conf.h 2008-02-17 21:39:29 UTC (rev 857)
@@ -0,0 +1,104 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : usb_conf.h
+* Author : MCD Application Team
+* Date First Issued : 10/01/2006 : V1.0
+* Description : Device Firmware Upgrade (DFU) configuration file
+********************************************************************************
+* History:
+* 10/01/2006 : V1.0
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __USB_CONF_H
+#define __USB_CONF_H
+/* Includes ------------------------------------------------------------------*/
+/* Exported types ------------------------------------------------------------*/
+/* Exported constants --------------------------------------------------------*/
+/* Exported macro ------------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+/* External variables --------------------------------------------------------*/
+
+#define STR7xx
+#define STR75x
+/*-------------------------------------------------------------*/
+/* EP_NUM */
+/* defines how many endpoints are used by the device */
+/*-------------------------------------------------------------*/
+#define EP_NUM (1)
+
+/*-------------------------------------------------------------*/
+/* -------------- Buffer Description Table -----------------*/
+/*-------------------------------------------------------------*/
+/* buffer table base address */
+/* buffer table base address */
+#define BTABLE_ADDRESS (0x00)
+
+/* EP0 */
+/* rx/tx buffer base address */
+#define ENDP0_RXADDR (0x10)
+#define ENDP0_TXADDR (0x50)
+
+
+/*-------------------------------------------------------------*/
+/* ------------------- ISTR events -------------------------*/
+/*-------------------------------------------------------------*/
+/* IMR_MSK */
+/* mask defining which events has to be handled */
+/* by the device application software */
+#define IMR_MSK (CNTR_CTRM | \
+ CNTR_WKUPM | \
+ CNTR_SUSPM | \
+ CNTR_ERRM | \
+ CNTR_SOFM | \
+ CNTR_ESOFM | \
+ CNTR_RESETM \
+ )
+
+/* CTR service routines */
+/* associated to defined endpoints */
+#define EP1_IN_Callback NOP_Process
+#define EP2_IN_Callback NOP_Process
+#define EP3_IN_Callback NOP_Process
+#define EP4_IN_Callback NOP_Process
+#define EP5_IN_Callback NOP_Process
+#define EP6_IN_Callback NOP_Process
+#define EP7_IN_Callback NOP_Process
+#define EP8_IN_Callback NOP_Process
+#define EP9_IN_Callback NOP_Process
+#define EP10_IN_Callback NOP_Process
+#define EP11_IN_Callback NOP_Process
+#define EP12_IN_Callback NOP_Process
+#define EP13_IN_Callback NOP_Process
+#define EP14_IN_Callback NOP_Process
+#define EP15_IN_Callback NOP_Process
+
+
+#define EP1_OUT_Callback NOP_Process
+#define EP2_OUT_Callback NOP_Process
+#define EP3_OUT_Callback NOP_Process
+#define EP4_OUT_Callback NOP_Process
+#define EP5_OUT_Callback NOP_Process
+#define EP6_OUT_Callback NOP_Process
+#define EP7_OUT_Callback NOP_Process
+#define EP8_OUT_Callback NOP_Process
+#define EP9_OUT_Callback NOP_Process
+#define EP10_OUT_Callback NOP_Process
+#define EP11_OUT_Callback NOP_Process
+#define EP12_OUT_Callback NOP_Process
+#define EP13_OUT_Callback NOP_Process
+#define EP14_OUT_Callback NOP_Process
+#define EP15_OUT_Callback NOP_Process
+
+#endif /*__USB_CONF_H*/
+
+/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
+
+
+
+
Added: trunk/firmware/arm/str/bootloader_str75x/include/usb_desc.h
===================================================================
--- trunk/firmware/arm/str/bootloader_str75x/include/usb_desc.h (rev 0)
+++ trunk/firmware/arm/str/bootloader_str75x/include/usb_desc.h 2008-02-17 21:39:29 UTC (rev 857)
@@ -0,0 +1,86 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : usb_desc.h
+* Author : MCD Application Team
+* Date First Issued : 10/01/2006 : V1.0
+* Description : Descriptor Header for Device Firmware Upgrade (DFU)
+********************************************************************************
+* History:
+* 10/01/2006 : V1.0
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __USB_DESC_H
+#define __USB_DESC_H
+/* Includes ------------------------------------------------------------------*/
+/* Exported types ------------------------------------------------------------*/
+/* Exported constants --------------------------------------------------------*/
+/* Exported macro ------------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+/* External variables --------------------------------------------------------*/
+
+//#define _STR710_EVAL /* Comment this line if STR710-Eval board is not used */
+#define _STR75x_EVAL
+
+#define DFU_SIZ_DEVICE_DESC 18
+
+#ifdef _STR710_EVAL
+#define DFU_SIZ_CONFIG_DESC 45
+#elif defined _STR75x_EVAL
+#define DFU_SIZ_CONFIG_DESC 45
+#else
+#define DFU_SIZ_CONFIG_DESC 36
+#endif
+
+
+#define DFU_SIZ_STRING_LANGID 4
+#define DFU_SIZ_STRING_VENDOR 38
+#define DFU_SIZ_STRING_PRODUCT 22
+#define DFU_SIZ_STRING_SERIAL 8
+#define DFU_SIZ_STRING_INTERFACE0 122 /* Flash Bank 0 */
+#define DFU_SIZ_STRING_INTERFACE1 74 /* Flash Bank 1 */
+#ifdef _STR710_EVAL
+#define DFU_SIZ_STRING_INTERFACE2 92 /* External Flash M28W320CB */
+#endif
+#ifdef _STR75x_EVAL
+#define DFU_SIZ_STRING_INTERFACE2 98 /* SPI Flash : M25P64*/
+#endif
+
+
+
+extern const u8 DFU_DeviceDescriptor[DFU_SIZ_DEVICE_DESC];
+extern const u8 DFU_ConfigDescriptor[DFU_SIZ_CONFIG_DESC];
+
+
+extern const u8 DFU_StringLangId [DFU_SIZ_STRING_LANGID];
+extern const u8 DFU_StringVendor [DFU_SIZ_STRING_VENDOR];
+extern const u8 DFU_StringProduct [DFU_SIZ_STRING_PRODUCT];
+extern const u8 DFU_StringSerial [DFU_SIZ_STRING_SERIAL];
+extern const u8 DFU_StringInterface0 [DFU_SIZ_STRING_INTERFACE0];
+extern const u8 DFU_StringInterface1 [DFU_SIZ_STRING_INTERFACE1];
+#ifdef _STR710_EVAL
+extern const u8 DFU_StringInterface2 [DFU_SIZ_STRING_INTERFACE2];
+#endif
+#ifdef _STR75x_EVAL
+extern const u8 DFU_StringInterface2 [DFU_SIZ_STRING_INTERFACE2];
+#endif
+
+#define bMaxPacketSize0 0x40 /* bMaxPacketSize0 = 64 bytes */
+#define wTransferSize 0x0400 /* wTransferSize = 1024 bytes */
+ /* bMaxPacketSize0 <= wTransferSize <= 32kbytes */
+#define wTransferSizeB0 0x00
+#define wTransferSizeB1 0x04
+
+
+#endif /* __USB_DESC_H */
+
+/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
+
+
+
+
Added: trunk/firmware/arm/str/bootloader_str75x/include/usb_prop.h
===================================================================
--- trunk/firmware/arm/str/bootloader_str75x/include/usb_prop.h (rev 0)
+++ trunk/firmware/arm/str/bootloader_str75x/include/usb_prop.h 2008-02-17 21:39:29 UTC (rev 857)
@@ -0,0 +1,128 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : usb_prop.h
+* Author : MCD Application Team
+* Date First Issued : 10/01/2006 : V1.0
+* Description : All processings related to DFU demo
+********************************************************************************
+* History:
+* 10/01/2006 : V1.0
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __USB_PROP_H
+#define __USB_PROP_H
+/* Includes ------------------------------------------------------------------*/
+/* Exported types ------------------------------------------------------------*/
+/* Exported constants --------------------------------------------------------*/
+/* Exported macro ------------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+void DFU_init(void);
+void DFU_Reset(void);
+void DFU_Status_In (void);
+void DFU_Status_Out (void);
+RESULT DFU_Data_Setup(u8);
+RESULT DFU_NoData_Setup(u8);
+RESULT DFU_Get_Interface_Setting(u8 Interface,u8 AlternateSetting);
+u8 *DFU_GetDeviceDescriptor(u16 );
+u8 *DFU_GetConfigDescriptor(u16);
+u8 *DFU_GetStringDescriptor(u16);
+
+u8 *UPLOAD(u16 Length);
+u8 *DNLOAD(u16 Length);
+u8 *GETSTATE(u16 Length);
+u8 *GETSTATUS(u16 Length);
+void DFU_write_crc (void);
+
+/* External variables --------------------------------------------------------*/
+
+
+#define DFU_GetConfiguration NOP_Process
+#define DFU_SetConfiguration NOP_Process
+#define DFU_GetInterface NOP_Process
+#define DFU_SetInterface NOP_Process
+#define DFU_GetStatus NOP_Process
+#define DFU_ClearFeature NOP_Process
+#define DFU_SetEndPointFeature NOP_Process
+#define DFU_SetDeviceFeature NOP_Process
+#define DFU_SetDeviceAddress NOP_Process
+
+/*---------------------------------------------------------------------*/
+/* DFU definitions */
+/*---------------------------------------------------------------------*/
+
+/**************************************************/
+/* DFU Requests */
+/**************************************************/
+
+typedef enum _DFU_REQUESTS {
+ DFU_DNLOAD=1,
+ DFU_UPLOAD,
+ DFU_GETSTATUS,
+ DFU_CLRSTATUS,
+ DFU_GETSTATE,
+ DFU_ABORT
+} DFU_REQUESTS;
+
+/**************************************************/
+/* DFU Requests DFU states */
+/**************************************************/
+
+
+#define STATE_appIDLE 0
+#define STATE_appDETACH 1
+#define STATE_dfuIDLE 2
+#define STATE_dfuDNLOAD_SYNC 3
+#define STATE_dfuDNBUSY 4
+#define STATE_dfuDNLOAD_IDLE 5
+#define STATE_dfuMANIFEST_SYNC 6
+#define STATE_dfuMANIFEST 7
+#define STATE_dfuMANIFEST_WAIT_RESET 8
+#define STATE_dfuUPLOAD_IDLE 9
+#define STATE_dfuERROR 10
+
+/**************************************************/
+/* DFU Requests DFU status */
+/**************************************************/
+
+#define STATUS_OK 0x00
+#define STATUS_ERRTARGET 0x01
+#define STATUS_ERRFILE 0x02
+#define STATUS_ERRWRITE 0x03
+#define STATUS_ERRERASE 0x04
+#define STATUS_ERRCHECK_ERASED 0x05
+#define STATUS_ERRPROG 0x06
+#define STATUS_ERRVERIFY 0x07
+#define STATUS_ERRADDRESS 0x08
+#define STATUS_ERRNOTDONE 0x09
+#define STATUS_ERRFIRMWARE 0x0A
+#define STATUS_ERRVENDOR 0x0B
+#define STATUS_ERRUSBR 0x0C
+#define STATUS_ERRPOR 0x0D
+#define STATUS_ERRUNKNOWN 0x0E
+#define STATUS_ERRSTALLEDPKT 0x0F
+
+/**************************************************/
+/* DFU Requests DFU states Manifestation State */
+/**************************************************/
+
+#define Manifest_complete 0x00
+#define Manifest_In_Progress 0x01
+
+
+/**************************************************/
+/* Special Commands with Download Request */
+/**************************************************/
+
+#define CMD_GETCOMMANDS 0x00
+#define CMD_SETADDRESSPOINTER 0x21
+#define CMD_ERASE 0x41
+
+#endif /* __USB_PROP_H */
+
+/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/bootloader_str75x/include/usb_pwr.h
===================================================================
--- trunk/firmware/arm/str/bootloader_str75x/include/usb_pwr.h (rev 0)
+++ trunk/firmware/arm/str/bootloader_str75x/include/usb_pwr.h 2008-02-17 21:39:29 UTC (rev 857)
@@ -0,0 +1,55 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : usb_pwr.h
+* Author : MCD Application Team
+* Date First Issued : 10/01/2006 : V1.0
+* Description : Connection/disconnection & power management header
+****************************************...
[truncated message content] |
|
From: <ak...@us...> - 2008-02-24 22:07:21
|
Revision: 858
http://can.svn.sourceforge.net/can/?rev=858&view=rev
Author: akhe
Date: 2008-02-24 14:07:18 -0800 (Sun, 24 Feb 2008)
Log Message:
-----------
Fixed IAR CAN sample for STR 73x
Modified Paths:
--------------
trunk/firmware/arm/str/cantest_str73x_iar/73x_conf.h
trunk/firmware/arm/str/cantest_str73x_iar/73x_it.c
trunk/firmware/arm/str/cantest_str73x_iar/cantest.dep
trunk/firmware/arm/str/cantest_str73x_iar/cantest.ewd
trunk/firmware/arm/str/cantest_str73x_iar/cantest.ewp
trunk/firmware/arm/str/cantest_str73x_iar/main.c
trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/source/73x_can.c
trunk/firmware/arm/str/vcp_str75x_iar/project/Virtual Com Port.dep
trunk/firmware/arm/str/vcp_str75x_iar/project/settings/Virtual Com Port.wsdt
Added Paths:
-----------
trunk/firmware/arm/str/cantest_str73x_iar/Kopia av main.c
trunk/firmware/arm/str/cantest_str73x_iar/settings/GettingStarted.cspy.bat
trunk/firmware/arm/str/cantest_str73x_iar/settings/GettingStarted.dbgdt
trunk/firmware/arm/str/cantest_str73x_iar/settings/GettingStarted.dni
trunk/firmware/arm/str/cantest_str73x_iar/settings/GettingStarted.wsdt
trunk/firmware/arm/str/cantest_str73x_iar/settings/cantest..wsdt
trunk/firmware/arm/str/cantest_str73x_iar/settings/cantest.cspy.bat
trunk/firmware/arm/str/cantest_str73x_iar/settings/cantest.dbgdt
trunk/firmware/arm/str/cantest_str73x_iar/settings/cantest.dni
trunk/firmware/arm/str/cantest_str73x_iar/settings/cantest.wsdt
trunk/firmware/arm/str/cantest_str75x_iar/
trunk/firmware/arm/str/cantest_str75x_iar/73x_conf.h
trunk/firmware/arm/str/cantest_str75x_iar/73x_it.c
trunk/firmware/arm/str/cantest_str75x_iar/73x_lcd.c
trunk/firmware/arm/str/cantest_str75x_iar/73x_lcd.h
trunk/firmware/arm/str/cantest_str75x_iar/Readme.txt
trunk/firmware/arm/str/cantest_str75x_iar/Startup/
trunk/firmware/arm/str/cantest_str75x_iar/Startup/73x_init.s
trunk/firmware/arm/str/cantest_str75x_iar/Startup/73x_vect.s
trunk/firmware/arm/str/cantest_str75x_iar/Startup/75x_init.s
trunk/firmware/arm/str/cantest_str75x_iar/Startup/75x_vect.s
trunk/firmware/arm/str/cantest_str75x_iar/cantest.dep
trunk/firmware/arm/str/cantest_str75x_iar/cantest.ewd
trunk/firmware/arm/str/cantest_str75x_iar/cantest.ewp
trunk/firmware/arm/str/cantest_str75x_iar/cantest.eww
trunk/firmware/arm/str/cantest_str75x_iar/linker/
trunk/firmware/arm/str/cantest_str75x_iar/linker/STR73x_FLASH.icf
trunk/firmware/arm/str/cantest_str75x_iar/linker/STR73x_RAM.icf
trunk/firmware/arm/str/cantest_str75x_iar/linker/STR75x_FLASH.icf
trunk/firmware/arm/str/cantest_str75x_iar/linker/STR75x_RAM.icf
trunk/firmware/arm/str/cantest_str75x_iar/linker/STR75x_SMI.icf
trunk/firmware/arm/str/cantest_str75x_iar/main.c
trunk/firmware/arm/str/cantest_str75x_iar/settings/
trunk/firmware/arm/str/cantest_str75x_iar/settings/GettingStarted.cspy.bat
trunk/firmware/arm/str/cantest_str75x_iar/settings/GettingStarted.dbgdt
trunk/firmware/arm/str/cantest_str75x_iar/settings/GettingStarted.dni
trunk/firmware/arm/str/cantest_str75x_iar/settings/GettingStarted.wsdt
trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest..wsdt
trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.cspy.bat
trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.dbgdt
trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.dni
trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.wsdt
trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/
trunk/firmware/arm/str/vcp_str75x_iar/Software Driver/alternativ.inf
Modified: trunk/firmware/arm/str/cantest_str73x_iar/73x_conf.h
===================================================================
--- trunk/firmware/arm/str/cantest_str73x_iar/73x_conf.h 2008-02-17 21:39:29 UTC (rev 857)
+++ trunk/firmware/arm/str/cantest_str73x_iar/73x_conf.h 2008-02-24 22:07:18 UTC (rev 858)
@@ -1,9 +1,9 @@
-/******************** (C) COPYRIGHT 2005 STMicroelectronics **********************
+/******************** (C) COPYRIGHT 2005 STMicroelectronics ********************
* File Name : 73x_conf.h
* Author : MCD Application Team
* Date First Issued : 09/27/2005 : V1.0
* Description : Library configuration file
-**********************************************************************************
+********************************************************************************
* History:
* 09/27/2005 : V1.0
**********************************************************************************
@@ -23,12 +23,12 @@
#define DEBUG
-/*************************FLASHR************************/
+/*************************FLASHR*************************/
//#define _FLASHR
-/*************************FLASHPR***********************/
+/*************************FLASHPR************************/
//#define _FLASHPR
/*************************PRCCU*************************/
-//#define _PRCCU
+#define _PRCCU
/*************************ARB***************************/
//#define _ARB
/*************************CFG*************************/
@@ -67,10 +67,10 @@
/*************************WIU*************************/
//#define _WIU
/*************************CAN*************************/
-//#define _CAN
-//#define _CAN0
-//#define _CAN1
-//#define _CAN2
+#define _CAN
+#define _CAN0
+#define _CAN1
+#define _CAN2
/*************************PWM*************************/
//#define _PWM
//#define _PWM0
@@ -104,18 +104,14 @@
/*************************CMU*************************/
#define _CMU
/*************************ADC*************************/
-#define _ADC
+//#define _ADC
/*************************EIC*************************/
#define _EIC
-
-
#define Main_Oscillator 4000000 /* Value of the Main Quartz in Hz*/
#define RC_oscillator 2340000 /* Typical Reset Value of the Internal RC in Hz */
-
#endif /* __73x_CONF_H */
/******************* (C) COPYRIGHT 2005 STMicroelectronics *****END OF FILE****/
-
Modified: trunk/firmware/arm/str/cantest_str73x_iar/73x_it.c
===================================================================
--- trunk/firmware/arm/str/cantest_str73x_iar/73x_it.c 2008-02-17 21:39:29 UTC (rev 857)
+++ trunk/firmware/arm/str/cantest_str73x_iar/73x_it.c 2008-02-24 22:07:18 UTC (rev 858)
@@ -24,18 +24,31 @@
*********************************************************************************/
/* Standard include ------------------------------------------------------------*/
#include "73x_lib.h"
-
-extern u16 Conversion_Value;
-u16 AnalogWatchdog_Result;
-
-
-
/* Include of other module interface headers -----------------------------------*/
/* Local includes --------------------------------------------------------------*/
/* Private typedef -------------------------------------------------------------*/
/* Private define --------------------------------------------------------------*/
+enum {
+ CAN0_TX_MSGOBJ = 0,
+ CAN0_RX_MSGOBJ = 1
+};
+
+enum {
+ CAN1_TX_MSGOBJ = 0,
+ CAN1_RX_MSGOBJ = 1
+};
+
+enum {
+ CAN2_TX_MSGOBJ = 0,
+ CAN2_RX_MSGOBJ = 1
+};
+
/* Private macro ---------------------------------------------------------------*/
/* Private variables -----------------------------------------------------------*/
+extern canmsg RxCan0Msg;
+extern canmsg RxCan1Msg;
+extern canmsg RxCan2Msg;
+
/* Private function prototypes -------------------------------------------------*/
/* Interface functions ---------------------------------------------------------*/
/* Private functions -----------------------------------------------------------*/
@@ -44,9 +57,9 @@
/*******************************************************************************
* Function Name : Undefined_Handler
* Description : This function Undefined instruction exception.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void Undefined_Handler(void)
{
@@ -54,9 +67,9 @@
/*******************************************************************************
* Function Name : FIQ_Handler
* Description : This function handles FIQ exception.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void FIQ_Handler(void)
{
@@ -64,9 +77,9 @@
/*******************************************************************************
* Function Name : SWI_Handler
* Description : This function handles SW exception.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void SWI_Handler(void)
{
@@ -74,9 +87,9 @@
/*******************************************************************************
* Function Name : Prefetch_Handler
* Description : This function handles preftetch abort exception.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void Prefetch_Handler(void)
{
@@ -84,9 +97,9 @@
/*******************************************************************************
* Function Name : Abort_Handler
* Description : This function handles data abort exception.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void Abort_Handler(void)
{
@@ -94,9 +107,9 @@
/*******************************************************************************
* Function Name : PRCCUCMU_IRQHandler
* Description : This function handlesthe PRCCU and the CMU interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void PRCCUCMU_IRQHandler(void)
{
@@ -105,9 +118,9 @@
/*******************************************************************************
* Function Name : EXTIT01_IRQHandler
* Description : This function handles External line1 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void EXTIT01_IRQHandler (void)
{
@@ -116,9 +129,9 @@
/*******************************************************************************
* Function Name : EXTIT02_IRQHandler
* Description : This function handles External line2 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void EXTIT02_IRQHandler (void)
{
@@ -127,9 +140,9 @@
/*******************************************************************************
* Function Name : EXTIT03_IRQHandler
* Description : This function handles External line3 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void EXTIT03_IRQHandler (void)
{
@@ -138,9 +151,9 @@
/*******************************************************************************
* Function Name : EXTIT04_IRQHandler
* Description : This function handles External line 4 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void EXTIT04_IRQHandler (void)
{
@@ -149,9 +162,9 @@
/*******************************************************************************
* Function Name : EXTIT05_IRQHandler
* Description : This function handles External line 5 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void EXTIT05_IRQHandler (void)
{
@@ -160,9 +173,9 @@
/*******************************************************************************
* Function Name : EXTIT06_IRQHandler
* Description : This function handles External line 6 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void EXTIT06_IRQHandler (void)
{
@@ -171,9 +184,9 @@
/*******************************************************************************
* Function Name : EXTIT07_IRQHandler
* Description : This function handles External line7 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void EXTIT07_IRQHandler (void)
{
@@ -182,9 +195,9 @@
/*******************************************************************************
* Function Name : EXTIT08_IRQHandler
* Description : This function handles External line8 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void EXTIT08_IRQHandler (void)
{
@@ -193,9 +206,9 @@
/*******************************************************************************
* Function Name : EXTIT09_IRQHandler
* Description : This function handles External line9 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void EXTIT09_IRQHandler (void)
{
@@ -204,9 +217,9 @@
/*******************************************************************************
* Function Name : EXTIT10_IRQHandler
* Description : This function handles External line10 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void EXTIT10_IRQHandler (void)
{
@@ -215,9 +228,9 @@
/*******************************************************************************
* Function Name : EXTIT11_IRQHandler
* Description : This function handles External line11 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void EXTIT11_IRQHandler (void)
{
@@ -226,9 +239,9 @@
/*******************************************************************************
* Function Name : EXTIT12_IRQHandler
* Description : This function handles External line12 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void EXTIT12_IRQHandler (void)
{
@@ -237,9 +250,9 @@
/*******************************************************************************
* Function Name : EXTIT13_IRQHandler
* Description : This function handles External line13 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void EXTIT13_IRQHandler (void)
{
@@ -248,9 +261,9 @@
/*******************************************************************************
* Function Name : EXTIT14_IRQHandler
* Description : This function handles External line14 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void EXTIT14_IRQHandler (void)
{
@@ -259,9 +272,9 @@
/*******************************************************************************
* Function Name : EXTIT15_IRQHandler
* Description : This function handles External line15 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void EXTIT15_IRQHandler (void)
{
@@ -270,9 +283,9 @@
/*******************************************************************************
* Function Name : DMATRERR_IRQHandler
* Description : This function handles the DMA transfer error interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void DMATRERR_IRQHandler (void)
{
@@ -281,9 +294,9 @@
/*******************************************************************************
* Function Name : TIM1_IRQHandler
* Description : This function handles the TIM1 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void TIM1_IRQHandler (void)
{
@@ -292,9 +305,9 @@
/*******************************************************************************
* Function Name : TIM2_IRQHandler
* Description : This function handles the TIM2 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void TIM2_IRQHandler (void)
{
@@ -303,9 +316,9 @@
/*******************************************************************************
* Function Name : TIM3_IRQHandler
* Description : This function handles the TIM3 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void TIM3_IRQHandler (void)
{
@@ -314,9 +327,9 @@
/*******************************************************************************
* Function Name : TIM4_IRQHandler
* Description : This function handles the TIM4 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void TIM4_IRQHandler (void)
{
@@ -325,9 +338,9 @@
/*******************************************************************************
* Function Name : TB0_IRQHandler
* Description : This function handles the TB0 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void TB0_IRQHandler (void)
{
@@ -336,9 +349,9 @@
/*******************************************************************************
* Function Name : TB1_IRQHandler
* Description : This function handles the TB1 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void TB1_IRQHandler (void)
{
@@ -347,9 +360,9 @@
/*******************************************************************************
* Function Name : TB2_IRQHandler
* Description : This function handles the TB2 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void TB2_IRQHandler (void)
{
@@ -358,9 +371,9 @@
/*******************************************************************************
* Function Name : TIM5_IRQHandler
* Description : This function handles the TIM5 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void TIM5_IRQHandler (void)
{
@@ -369,9 +382,9 @@
/*******************************************************************************
* Function Name : TIM6_IRQHandler
* Description : This function handles the TIM6 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void TIM6_IRQHandler (void)
{
@@ -380,9 +393,9 @@
/*******************************************************************************
* Function Name : TIM7_IRQHandler
* Description : This function handles the TIM7 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void TIM7_IRQHandler (void)
{
@@ -391,9 +404,9 @@
/*******************************************************************************
* Function Name : TIM8_IRQHandler
* Description : This function handles the TIM8 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void TIM8_IRQHandler (void)
{
@@ -402,9 +415,9 @@
/*******************************************************************************
* Function Name : TIM9_IRQHandler
* Description : This function handles the TIM9 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void TIM9_IRQHandler (void)
{
@@ -414,9 +427,9 @@
/*******************************************************************************
* Function Name : UART2_IRQHandler
* Description : This function handles the UART2 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void UART2_IRQHandler (void)
{
@@ -425,9 +438,9 @@
/*******************************************************************************
* Function Name : UART3_IRQHandler
* Description : This function handles the UART3 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void UART3_IRQHandler (void)
{
@@ -437,9 +450,9 @@
/*******************************************************************************
* Function Name : FlashEOP_IRQHandler
* Description : This function handles the FLASH end of program interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void FLASHEOP_IRQHandler (void)
{
@@ -448,9 +461,9 @@
/*******************************************************************************
* Function Name : PWM0_IRQHandler
* Description : This function handles the PWM0 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void PWM0_IRQHandler (void)
{
@@ -459,9 +472,9 @@
/*******************************************************************************
* Function Name : PWM1_IRQHandler
* Description : This function handles the PWM1 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void PWM1_IRQHandler (void)
{
@@ -470,9 +483,9 @@
/*******************************************************************************
* Function Name : PWM2_IRQHandler
* Description : This function handles the PWM2 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void PWM2_IRQHandler (void)
{
@@ -481,9 +494,9 @@
/*******************************************************************************
* Function Name : PWM3_IRQHandler
* Description : This function handles the PWM3 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void PWM3_IRQHandler (void)
{
@@ -492,9 +505,9 @@
/*******************************************************************************
* Function Name : PWM4_IRQHandler
* Description : This function handles the PWM4 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void PWM4_IRQHandler (void)
{
@@ -503,9 +516,9 @@
/*******************************************************************************
* Function Name : PWM5_IRQHandler
* Description : This function handles the PWM5 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Retu...
[truncated message content] |
|
From: <ak...@us...> - 2008-03-01 13:09:19
|
Revision: 866
http://can.svn.sourceforge.net/can/?rev=866&view=rev
Author: akhe
Date: 2008-03-01 05:09:07 -0800 (Sat, 01 Mar 2008)
Log Message:
-----------
Added bug fixes to CAN libraries and to USB libraries
Modified Paths:
--------------
trunk/firmware/arm/str/cantest_str75x_iar/cantest.dep
trunk/firmware/arm/str/cantest_str75x_iar/main.c
trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.dbgdt
trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.wsdt
trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/src/75x_can.c
trunk/firmware/arm/str/common/str73x_lib/src/73x_can.c
trunk/firmware/arm/str/common/str75x_lib/include/75x_can.h
trunk/firmware/arm/str/common/str75x_lib/src/75x_can.c
trunk/firmware/arm/str/common/usblib/library/src/usb_core.c
Modified: trunk/firmware/arm/str/cantest_str75x_iar/cantest.dep
===================================================================
--- trunk/firmware/arm/str/cantest_str75x_iar/cantest.dep 2008-02-29 14:23:25 UTC (rev 865)
+++ trunk/firmware/arm/str/cantest_str75x_iar/cantest.dep 2008-03-01 13:09:07 UTC (rev 866)
@@ -6,106 +6,109 @@
<configuration>
<name>Debug</name>
<outputs>
- <file>$PROJ_DIR$\str75x_lib\inc\75x_gpio.h</file>
- <file>$PROJ_DIR$\Debug\Obj\75x_can.pbi</file>
+ <file>$PROJ_DIR$\str75x_lib\inc\75x_can.h</file>
<file>$TOOLKIT_DIR$\lib\dl4t_tl_in.a</file>
- <file>$PROJ_DIR$\linker\STR75x_FLASH.icf</file>
- <file>$PROJ_DIR$\Debug\Obj\75x_eic.o</file>
+ <file>$PROJ_DIR$\Debug\Obj\main.o</file>
+ <file>$PROJ_DIR$\Debug\Exe\cantest.hex</file>
+ <file>$PROJ_DIR$\Debug\Obj\main.pbi</file>
<file>$PROJ_DIR$\str75x_lib\inc\75x_type.h</file>
- <file>$PROJ_DIR$\str75x_lib\inc\75x_map.h</file>
- <file>$PROJ_DIR$\Debug\Obj\75x_gpio.pbi</file>
<file>$PROJ_DIR$\Debug\Obj\75x_mrcc.pbi</file>
- <file>$PROJ_DIR$\Debug\Obj\75x_vect.o</file>
- <file>$PROJ_DIR$\str75x_lib\src\75x_gpio.c</file>
- <file>$PROJ_DIR$\str75x_lib\src\75x_eic.c</file>
- <file>$PROJ_DIR$\Debug\Obj\75x_eic.pbi</file>
- <file>$PROJ_DIR$\Debug\Obj\75x_mrcc.o</file>
- <file>$TOOLKIT_DIR$\lib\rt4t_al.a</file>
<file>$TOOLKIT_DIR$\lib\shs_l.a</file>
- <file>$PROJ_DIR$\Debug\Exe\cantest.hex</file>
- <file>$PROJ_DIR$\str75x_lib\inc\75x_eic.h</file>
- <file>$PROJ_DIR$\Debug\Obj\75x_can.o</file>
- <file>$PROJ_DIR$\Debug\Obj\75x_it.o</file>
- <file>$PROJ_DIR$\Debug\Obj\main.o</file>
+ <file>$PROJ_DIR$\Debug\Obj\75x_init.o</file>
<file>$PROJ_DIR$\Debug\Obj\75x_it.pbi</file>
- <file>$PROJ_DIR$\str75x_lib\inc\75x_mrcc.h</file>
- <file>$PROJ_DIR$\Debug\Exe\cantest.out</file>
<file>$PROJ_DIR$\Debug\Obj\cantest.pbd</file>
- <file>$PROJ_DIR$\str75x_lib\inc\75x_lib.h</file>
- <file>$PROJ_DIR$\Debug\Obj\75x_gpio.o</file>
+ <file>$PROJ_DIR$\Debug\Obj\75x_mrcc.o</file>
<file>$PROJ_DIR$\Debug\Obj\75x_lib.o</file>
+ <file>$PROJ_DIR$\Debug\Obj\75x_gpio.pbi</file>
+ <file>$PROJ_DIR$\linker\STR75x_FLASH.icf</file>
+ <file>$PROJ_DIR$\Debug\Obj\75x_can.pbi</file>
+ <file>$PROJ_DIR$\str75x_lib\src\75x_can.c</file>
+ <file>$PROJ_DIR$\Debug\Obj\75x_can.o</file>
<file>$PROJ_DIR$\Debug\Obj\75x_lib.pbi</file>
- <file>$PROJ_DIR$\Startup\75x_init.s</file>
- <file>$PROJ_DIR$\75x_it.c</file>
- <file>$PROJ_DIR$\Startup\75x_vect.s</file>
- <file>$PROJ_DIR$\75x_conf.h</file>
+ <file>$PROJ_DIR$\Debug\Obj\75x_eic.pbi</file>
+ <file>$PROJ_DIR$\str75x_lib\src\75x_gpio.c</file>
+ <file>$PROJ_DIR$\Debug\Exe\cantest.out</file>
+ <file>$PROJ_DIR$\str75x_lib\inc\75x_eic.h</file>
+ <file>$PROJ_DIR$\Debug\Obj\75x_eic.o</file>
+ <file>$PROJ_DIR$\str75x_lib\inc\75x_lib.h</file>
+ <file>$PROJ_DIR$\str75x_lib\inc\75x_gpio.h</file>
+ <file>$PROJ_DIR$\str75x_lib\inc\75x_map.h</file>
+ <file>$PROJ_DIR$\str75x_lib\inc\75x_mrcc.h</file>
+ <file>$TOOLKIT_DIR$\lib\rt4t_al.a</file>
+ <file>$PROJ_DIR$\Debug\Obj\75x_it.o</file>
+ <file>$PROJ_DIR$\str75x_lib\src\75x_eic.c</file>
<file>$PROJ_DIR$\main.c</file>
- <file>$PROJ_DIR$\Debug\Obj\75x_init.o</file>
- <file>$PROJ_DIR$\Debug\Obj\main.pbi</file>
- <file>$PROJ_DIR$\str75x_lib\inc\75x_can.h</file>
- <file>$PROJ_DIR$\str75x_lib\src\75x_can.c</file>
+ <file>$PROJ_DIR$\Debug\Obj\75x_vect.o</file>
+ <file>$PROJ_DIR$\75x_conf.h</file>
+ <file>$PROJ_DIR$\Startup\75x_vect.s</file>
<file>$PROJ_DIR$\str75x_lib\src\75x_lib.c</file>
+ <file>$PROJ_DIR$\Startup\75x_init.s</file>
<file>$PROJ_DIR$\str75x_lib\src\75x_mrcc.c</file>
- <file>$PROJ_DIR$\..\..\..\common\vscp_serial.h</file>
+ <file>$PROJ_DIR$\75x_it.c</file>
<file>$PROJ_DIR$\..\..\..\common\vscp_serial.c</file>
- <file>$PROJ_DIR$\..\..\..\common\vscp_class.h</file>
- <file>$PROJ_DIR$\..\..\..\common\crc.c</file>
- <file>$PROJ_DIR$\..\..\..\pic\can4vscp_232\project\main.c</file>
- <file>$PROJ_DIR$\..\..\..\pic\can4vscp_232\project\serint.c</file>
- <file>$PROJ_DIR$\..\..\..\common\crc.h</file>
+ <file>$PROJ_DIR$\Debug\Obj\75x_gpio.o</file>
</outputs>
<file>
<name>[ROOT_NODE]</name>
<outputs>
<tool>
<name>ILINK</name>
- <file> 23</file>
+ <file> 21</file>
</tool>
</outputs>
</file>
<file>
- <name>$PROJ_DIR$\str75x_lib\src\75x_gpio.c</name>
+ <name>$PROJ_DIR$\Debug\Obj\cantest.pbd</name>
+ <inputs>
+ <tool>
+ <name>BILINK</name>
+ <file> 15 19 13 9 18 6 4</file>
+ </tool>
+ </inputs>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\str75x_lib\src\75x_can.c</name>
<outputs>
<tool>
<name>BICOMP</name>
- <file> 7</file>
+ <file> 15</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 26</file>
+ <file> 17</file>
</tool>
</outputs>
<inputs>
<tool>
<name>BICOMP</name>
- <file> 0 6 32 5 22</file>
+ <file> 0 26 33 5 27</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 0 6 32 5 22</file>
+ <file> 0 26 33 5 27</file>
</tool>
</inputs>
</file>
<file>
- <name>$PROJ_DIR$\str75x_lib\src\75x_eic.c</name>
+ <name>$PROJ_DIR$\str75x_lib\src\75x_gpio.c</name>
<outputs>
<tool>
<name>BICOMP</name>
- <file> 12</file>
+ <file> 13</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 4</file>
+ <file> 40</file>
</tool>
</outputs>
<inputs>
<tool>
<name>BICOMP</name>
- <file> 17 6 32 5</file>
+ <file> 25 26 33 5 27</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 17 6 32 5</file>
+ <file> 25 26 33 5 27</file>
</tool>
</inputs>
</file>
@@ -114,54 +117,59 @@
<outputs>
<tool>
<name>OBJCOPY</name>
- <file> 16</file>
+ <file> 3</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ILINK</name>
- <file> 3 18 4 26 34 19 27 13 9 20 15 14 2</file>
+ <file> 14 17 23 40 8 29 12 11 32 2 7 28 1</file>
</tool>
</inputs>
</file>
<file>
- <name>$PROJ_DIR$\Debug\Obj\cantest.pbd</name>
- <inputs>
+ <name>$PROJ_DIR$\str75x_lib\src\75x_eic.c</name>
+ <outputs>
<tool>
- <name>BILINK</name>
- <file> 1 12 7 21 28 8 35</file>
+ <name>BICOMP</name>
+ <file> 19</file>
</tool>
- </inputs>
- </file>
- <file>
- <name>$PROJ_DIR$\Startup\75x_init.s</name>
- <outputs>
<tool>
- <name>AARM</name>
- <file> 34</file>
+ <name>ICCARM</name>
+ <file> 23</file>
</tool>
</outputs>
+ <inputs>
+ <tool>
+ <name>BICOMP</name>
+ <file> 22 26 33 5</file>
+ </tool>
+ <tool>
+ <name>ICCARM</name>
+ <file> 22 26 33 5</file>
+ </tool>
+ </inputs>
</file>
<file>
- <name>$PROJ_DIR$\75x_it.c</name>
+ <name>$PROJ_DIR$\main.c</name>
<outputs>
<tool>
<name>BICOMP</name>
- <file> 21</file>
+ <file> 4</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 19</file>
+ <file> 2</file>
</tool>
</outputs>
<inputs>
<tool>
<name>BICOMP</name>
- <file> 25 6 32 5 22 36 0 17</file>
+ <file> 24 26 33 5 27 0 25 22</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 25 6 32 5 22 36 0 17</file>
+ <file> 24 26 33 5 27 0 25 22</file>
</tool>
</inputs>
</file>
@@ -170,99 +178,85 @@
<outputs>
<tool>
<name>AARM</name>
- <file> 9</file>
+ <file> 32</file>
</tool>
</outputs>
</file>
<file>
- <name>$PROJ_DIR$\main.c</name>
+ <name>$PROJ_DIR$\str75x_lib\src\75x_lib.c</name>
<outputs>
<tool>
<name>BICOMP</name>
- <file> 35</file>
+ <file> 18</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 20</file>
+ <file> 12</file>
</tool>
</outputs>
<inputs>
<tool>
<name>BICOMP</name>
- <file> 25 6 32 5 22 36 0 17</file>
+ <file> 24 26 33 5 27 0 25 22</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 25 6 32 5 22 36 0 17</file>
+ <file> 24 26 33 5 27 0 25 22</file>
</tool>
</inputs>
</file>
<file>
- <name>$PROJ_DIR$\str75x_lib\src\75x_can.c</name>
+ <name>$PROJ_DIR$\Startup\75x_init.s</name>
<outputs>
<tool>
- <name>BICOMP</name>
- <file> 1</file>
+ <name>AARM</name>
+ <file> 8</file>
</tool>
- <tool>
- <name>ICCARM</name>
- <file> 18</file>
- </tool>
</outputs>
- <inputs>
- <tool>
- <name>BICOMP</name>
- <file> 36 6 32 5 22</file>
- </tool>
- <tool>
- <name>ICCARM</name>
- <file> 36 6 32 5 22</file>
- </tool>
- </inputs>
</file>
<file>
- <name>$PROJ_DIR$\str75x_lib\src\75x_lib.c</name>
+ <name>$PROJ_DIR$\str75x_lib\src\75x_mrcc.c</name>
<outputs>
<tool>
<name>BICOMP</name>
- <file> 28</file>
+ <file> 6</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 27</file>
+ <file> 11</file>
</tool>
</outputs>
<inputs>
<tool>
<name>BICOMP</name>
- <file> 25 6 32 5 22 36 0 17</file>
+ <file> 27 26 33 5</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 25 6 32 5 22 36 0 17</file>
+ <file> 27 26 33 5</file>
</tool>
</inputs>
</file>
<file>
- <name>$PROJ_DIR$\str75x_lib\src\75x_mrcc.c</name>
+ <name>$PROJ_DIR$\75x_it.c</name>
<outputs>
<tool>
<name>BICOMP</name>
- <file> 8</file>
+ <file> 9</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 13</file>
+ <file> 29</file>
</tool>
</outputs>
<inputs>
<tool>
<name>BICOMP</name>
- <file> 22 6 32 5</file>
+ <file> 24 26 33 5 27 0 25 22</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 22 6 32 5</file>
+ <file> 24 26 33 5 27 0 25 22</file>
</tool>
</inputs>
</file>
Modified: trunk/firmware/arm/str/cantest_str75x_iar/main.c
===================================================================
--- trunk/firmware/arm/str/cantest_str75x_iar/main.c 2008-02-29 14:23:25 UTC (rev 865)
+++ trunk/firmware/arm/str/cantest_str75x_iar/main.c 2008-03-01 13:09:07 UTC (rev 866)
@@ -113,7 +113,7 @@
MRCC_PCLKConfig( MRCC_CKTIM_Div2 );
// Set CKSYS to 64 MHz
- MRCC_CKSYSConfig( MRCC_CKSYS_OSC4MPLL, MRCC_PLL_Mul_16 );
+ MRCC_CKSYSConfig( MRCC_CKSYS_OSC4MPLL, MRCC_PLL_Mul_16 ); // 64 MHz
}
Modified: trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.dbgdt
===================================================================
--- trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.dbgdt 2008-02-29 14:23:25 UTC (rev 865)
+++ trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.dbgdt 2008-03-01 13:09:07 UTC (rev 866)
@@ -27,7 +27,7 @@
- <Wnd0>
+ <Wnd3>
<Tabs>
<Tab>
<Identity>TabID-14394-3889</Identity>
@@ -43,7 +43,7 @@
</Tab>
</Tabs>
- <SelectedTab>0</SelectedTab></Wnd0><Wnd1>
+ <SelectedTab>0</SelectedTab></Wnd3><Wnd4>
<Tabs>
<Tab>
<Identity>TabID-25142-3892</Identity>
@@ -55,7 +55,7 @@
</Tab>
</Tabs>
- <SelectedTab>0</SelectedTab></Wnd1><Wnd2>
+ <SelectedTab>0</SelectedTab></Wnd4><Wnd5>
<Tabs>
<Tab>
<Identity>TabID-3123-3895</Identity>
@@ -65,20 +65,20 @@
</Tab>
</Tabs>
- <SelectedTab>0</SelectedTab></Wnd2></Windows>
+ <SelectedTab>0</SelectedTab></Wnd5></Windows>
<Editor>
- <Pane><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str75x_iar\main.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>2173</SelStart><SelEnd>2173</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str73x_iar\main.c</Filename><XPos>0</XPos><YPos>116</YPos><SelStart>1620</SelStart><SelEnd>1620</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str75x_iar\str75x_lib\src\75x_can.c</Filename><XPos>0</XPos><YPos>443</YPos><SelStart>21143</SelStart><SelEnd>21143</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str75x_iar\Startup\75x_init.s</Filename><XPos>0</XPos><YPos>91</YPos><SelStart>4272</SelStart><SelEnd>4272</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\common\vscp_serial.h</Filename><XPos>0</XPos><YPos>139</YPos><SelStart>3033</SelStart><SelEnd>3033</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\common\vscp_serial.c</Filename><XPos>0</XPos><YPos>302</YPos><SelStart>9128</SelStart><SelEnd>9128</SelEnd></Tab><ActiveTab>5</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\pic\can4vscp_232\project\main.c</Filename><XPos>0</XPos><YPos>449</YPos><SelStart>10491</SelStart><SelEnd>10727</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\pic\can4vscp_232\project\serint.c</Filename><XPos>0</XPos><YPos>252</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd></Tab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
+ <Pane><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str75x_iar\main.c</Filename><XPos>0</XPos><YPos>287</YPos><SelStart>7812</SelStart><SelEnd>7812</SelEnd></Tab><ActiveTab>0</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str73x_iar\main.c</Filename><XPos>0</XPos><YPos>116</YPos><SelStart>1620</SelStart><SelEnd>1620</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str75x_iar\str75x_lib\src\75x_can.c</Filename><XPos>0</XPos><YPos>443</YPos><SelStart>21143</SelStart><SelEnd>21143</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str75x_iar\Startup\75x_init.s</Filename><XPos>0</XPos><YPos>91</YPos><SelStart>4272</SelStart><SelEnd>4272</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\common\vscp_serial.h</Filename><XPos>0</XPos><YPos>139</YPos><SelStart>3033</SelStart><SelEnd>3033</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\common\vscp_serial.c</Filename><XPos>0</XPos><YPos>110</YPos><SelStart>8871</SelStart><SelEnd>8871</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\pic\can4vscp_232\project\main.c</Filename><XPos>0</XPos><YPos>449</YPos><SelStart>10491</SelStart><SelEnd>10727</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\pic\can4vscp_232\project\serint.c</Filename><XPos>0</XPos><YPos>252</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd></Tab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
<Positions>
- <Top><Row0><Sizes><Toolbar-01353ab8><key>iaridepm.enu1</key></Toolbar-01353ab8></Sizes></Row0><Row1><Sizes><Toolbar-0761bb20><key>debuggergui.enu1</key></Toolbar-0761bb20></Sizes></Row1></Top><Left><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>498</Bottom><Right>198</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>195313</sizeHorzCX><sizeHorzCY>290698</sizeHorzCY><sizeVertCX>195313</sizeVertCX><sizeVertCY>726744</sizeVertCY></Rect></Wnd1></Sizes></Row0></Left><Right><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>498</Bottom><Right>198</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>195313</sizeHorzCX><sizeHorzCY>290698</sizeHorzCY><sizeVertCX>195313</sizeVertCX><sizeVertCY>726744</sizeVertCY></Rect></Wnd2></Sizes></Row0></Right><Bottom><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>122</Bottom><Right>1026</Right><x>-2</x><y>-2</y><xscreen>1028</xscreen><yscreen>124</yscreen><sizeHorzCX>1003906</sizeHorzCX><sizeHorzCY>180233</sizeHorzCY><sizeVertCX>195313</sizeVertCX><sizeVertCY>290698</sizeVertCY></Rect></Wnd0></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
+ <Top><Row0><Sizes><Toolbar-01353cd8><key>iaridepm.enu1</key></Toolbar-01353cd8></Sizes></Row0><Row1><Sizes><Toolbar-09daed18><key>debuggergui.enu1</key></Toolbar-09daed18></Sizes></Row1></Top><Left><Row0><Sizes><Wnd4><Rect><Top>-2</Top><Left>-2</Left><Bottom>498</Bottom><Right>198</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>195313</sizeHorzCX><sizeHorzCY>290698</sizeHorzCY><sizeVertCX>195313</sizeVertCX><sizeVertCY>726744</sizeVertCY></Rect></Wnd4></Sizes></Row0></Left><Right><Row0><Sizes><Wnd5><Rect><Top>-2</Top><Left>-2</Left><Bottom>498</Bottom><Right>198</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>195313</sizeHorzCX><sizeHorzCY>290698</sizeHorzCY><sizeVertCX>195313</sizeVertCX><sizeVertCY>726744</sizeVertCY></Rect></Wnd5></Sizes></Row0></Right><Bottom><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>122</Bottom><Right>1026</Right><x>-2</x><y>-2</y><xscreen>1028</xscreen><yscreen>124</yscreen><sizeHorzCX>1003906</sizeHorzCX><sizeHorzCY>180233</sizeHorzCY><sizeVertCX>195313</sizeVertCX><sizeVertCY>290698</sizeVertCY></Rect></Wnd3></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
</Desktop>
</Project>
Modified: trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.wsdt
===================================================================
--- trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.wsdt 2008-02-29 14:23:25 UTC (rev 865)
+++ trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.wsdt 2008-03-01 13:09:07 UTC (rev 866)
@@ -25,7 +25,7 @@
<Windows>
- <Wnd0>
+ <Wnd2>
<Tabs>
<Tab>
<Identity>TabID-32711-27921</Identity>
@@ -37,7 +37,7 @@
</Tab>
</Tabs>
- <SelectedTab>0</SelectedTab></Wnd0><Wnd1>
+ <SelectedTab>0</SelectedTab></Wnd2><Wnd3>
<Tabs>
<Tab>
<Identity>TabID-18303-27987</Identity>
@@ -47,20 +47,20 @@
</Tab>
<Tab><Identity>TabID-7248-23799</Identity><TabName>Debug Log</TabName><Factory>Debug-Log</Factory><Session/></Tab></Tabs>
- <SelectedTab>0</SelectedTab></Wnd1></Windows>
+ <SelectedTab>0</SelectedTab></Wnd3></Windows>
<Editor>
- <Pane><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str75x_iar\main.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>2173</SelStart><SelEnd>2173</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str73x_iar\main.c</Filename><XPos>0</XPos><YPos>116</YPos><SelStart>1620</SelStart><SelEnd>1620</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str75x_iar\str75x_lib\src\75x_can.c</Filename><XPos>0</XPos><YPos>443</YPos><SelStart>21143</SelStart><SelEnd>21143</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str75x_iar\Startup\75x_init.s</Filename><XPos>0</XPos><YPos>91</YPos><SelStart>4272</SelStart><SelEnd>4272</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\common\vscp_serial.h</Filename><XPos>0</XPos><YPos>139</YPos><SelStart>3033</SelStart><SelEnd>3033</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\common\vscp_serial.c</Filename><XPos>0</XPos><YPos>110</YPos><SelStart>8871</SelStart><SelEnd>8871</SelEnd></Tab><ActiveTab>5</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\pic\can4vscp_232\project\main.c</Filename><XPos>0</XPos><YPos>449</YPos><SelStart>10491</SelStart><SelEnd>10727</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\pic\can4vscp_232\project\serint.c</Filename><XPos>0</XPos><YPos>252</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd></Tab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
+ <Pane><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str75x_iar\main.c</Filename><XPos>0</XPos><YPos>287</YPos><SelStart>7812</SelStart><SelEnd>7812</SelEnd></Tab><ActiveTab>0</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str73x_iar\main.c</Filename><XPos>0</XPos><YPos>116</YPos><SelStart>1620</SelStart><SelEnd>1620</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str75x_iar\str75x_lib\src\75x_can.c</Filename><XPos>0</XPos><YPos>443</YPos><SelStart>21143</SelStart><SelEnd>21143</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str75x_iar\Startup\75x_init.s</Filename><XPos>0</XPos><YPos>91</YPos><SelStart>4272</SelStart><SelEnd>4272</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\common\vscp_serial.h</Filename><XPos>0</XPos><YPos>139</YPos><SelStart>3033</SelStart><SelEnd>3033</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\common\vscp_serial.c</Filename><XPos>0</XPos><YPos>110</YPos><SelStart>8871</SelStart><SelEnd>8871</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\pic\can4vscp_232\project\main.c</Filename><XPos>0</XPos><YPos>449</YPos><SelStart>10491</SelStart><SelEnd>10727</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\pic\can4vscp_232\project\serint.c</Filename><XPos>0</XPos><YPos>252</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd></Tab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
<Positions>
- <Top><Row0><Sizes><Toolbar-01353ab8><key>iaridepm.enu1</key></Toolbar-01353ab8></Sizes></Row0><Row1><Sizes/></Row1></Top><Left><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>446</Bottom><Right>282</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>195313</sizeHorzCX><sizeHorzCY>290698</sizeHorzCY><sizeVertCX>277344</sizeVertCX><sizeVertCY>651163</sizeVertCY></Rect></Wnd0></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>198</Bottom><Right>1026</Right><x>-2</x><y>-2</y><xscreen>1028</xscreen><yscreen>200</yscreen><sizeHorzCX>1003906</sizeHorzCX><sizeHorzCY>290698</sizeHorzCY><sizeVertCX>195313</sizeVertCX><sizeVertCY>290698</sizeVertCY></Rect></Wnd1></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
+ <Top><Row0><Sizes><Toolbar-01353cd8><key>iaridepm.enu1</key></Toolbar-01353cd8></Sizes></Row0><Row1><Sizes/></Row1></Top><Left><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>446</Bottom><Right>282</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>195313</sizeHorzCX><sizeHorzCY>290698</sizeHorzCY><sizeVertCX>277344</sizeVertCX><sizeVertCY>651163</sizeVertCY></Rect></Wnd2></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>198</Bottom><Right>1026</Right><x>-2</x><y>-2</y><xscreen>1028</xscreen><yscreen>200</yscreen><sizeHorzCX>1003906</sizeHorzCX><sizeHorzCY>290698</sizeHorzCY><sizeVertCX>195313</sizeVertCX><sizeVertCY>290698</sizeVertCY></Rect></Wnd3></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
</Desktop>
</Workspace>
Modified: trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/src/75x_can.c
===================================================================
--- trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/src/75x_can.c 2008-02-29 14:23:25 UTC (rev 865)
+++ trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/src/75x_can.c 2008-03-01 13:09:07 UTC (rev 866)
@@ -515,12 +515,16 @@
*******************************************************************************/
ErrorStatus CAN_WaitEndOfTx(void)
{
+ // Changed by AKHE
+ while ( 0 == ( CAN->SR & CAN_SR_TXOK ) );
+ CAN->SR &= ~CAN_SR_TXOK;
+/*
if ((CAN->SR & CAN_SR_TXOK) == 0)
{
return ERROR;
}
CAN->SR &= ~CAN_SR_TXOK;
-
+*/
return SUCCESS;
}
Modified: trunk/firmware/arm/str/common/str73x_lib/src/73x_can.c
===================================================================
--- trunk/firmware/arm/str/common/str73x_lib/src/73x_can.c 2008-02-29 14:23:25 UTC (rev 865)
+++ trunk/firmware/arm/str/common/str73x_lib/src/73x_can.c 2008-03-01 13:09:07 UTC (rev 866)
@@ -340,11 +340,11 @@
/*********************************************************************************/
void CAN_ReleaseMessage(CAN_TypeDef *CANx, u32 msgobj)
{
- u32 i;
+ u32 i;
while ((i = CAN_GetFreeIF(CANx)) == 2);
- CANx->sMsgObj[i].CMR = CAN_CMR_CLRINTPND | CAN_CMR_TXRQSTNEWDAT;
- CANx->sMsgObj[i].CRR = 1 + msgobj;
+ CANx->sMsgObj[i].CMR = CAN_CMR_CLRINTPND | CAN_CMR_TXRQSTNEWDAT;
+ CANx->sMsgObj[i].CRR = 1 + msgobj;
}
/**********************************************************************************/
@@ -387,8 +387,8 @@
/* extended ID AKHE Fixed bug */
//CANx->sMsgObj[0].A1R = EXT_FIXED_ID_ARB_L(pCanMsg->Id);
//CANx->sMsgObj[0].A2R = (CANx->sMsgObj[0].A2R & 0xE000) | EXT_FIXED_ID_ARB_H(pCanMsg->Id);
- CANx->sMsgObj[0].A1R = pCanMsg->Id & 0xffff;
- CANx->sMsgObj[0].A2R = (CANx->sMsgObj[0].A2R & 0xE000) | ( ( pCanMsg->Id >> 16 ) & 0xffff);
+ CANx->sMsgObj[0].A1R = pCanMsg->Id & 0xffff;
+ CANx->sMsgObj[0].A2R = (CANx->sMsgObj[0].A2R & 0xE000) | ( ( pCanMsg->Id >> 16 ) & 0xffff);
}
CANx->sMsgObj[0].MCR = (CANx->sMsgObj[0].MCR & 0xFEF0) | CAN_MCR_NEWDAT | CAN_MCR_TXRQST | pCanMsg->Dlc;
Modified: trunk/firmware/arm/str/common/str75x_lib/include/75x_can.h
===================================================================
--- trunk/firmware/arm/str/common/str75x_lib/include/75x_can.h 2008-02-29 14:23:25 UTC (rev 865)
+++ trunk/firmware/arm/str/common/str75x_lib/include/75x_can.h 2008-03-01 13:09:07 UTC (rev 866)
@@ -147,6 +147,7 @@
ErrorStatus CAN_SendMessage(u32 msgobj, canmsg* pCanMsg);
ErrorStatus CAN_ReceiveMessage(u32 msgobj, bool release, canmsg* pCanMsg);
ErrorStatus CAN_WaitEndOfTx(void);
+ErrorStatus CAN_CheckEndOfTx( void ); // AKHE
ErrorStatus CAN_BasicSendMessage(canmsg* pCanMsg);
ErrorStatus CAN_BasicReceiveMessage(canmsg* pCanMsg);
void CAN_EnterTestMode(u8 TestMask);
Modified: trunk/firmware/arm/str/common/str75x_lib/src/75x_can.c
===================================================================
--- trunk/firmware/arm/str/common/str75x_lib/src/75x_can.c 2008-02-29 14:23:25 UTC (rev 865)
+++ trunk/firmware/arm/str/common/str75x_lib/src/75x_can.c 2008-03-01 13:09:07 UTC (rev 866)
@@ -518,11 +518,35 @@
*******************************************************************************/
ErrorStatus CAN_WaitEndOfTx(void)
{
+ // Changed by AKHE
+ while ( 0 == ( CAN->SR & CAN_SR_TXOK ) );
+ CAN->SR &= ~CAN_SR_TXOK;
+/*
if ((CAN->SR & CAN_SR_TXOK) == 0)
{
return ERROR;
}
CAN->SR &= ~CAN_SR_TXOK;
+*/
+ return SUCCESS;
+}
+
+/*******************************************************************************
+* Function Name : CAN_CheckEndOfTx
+* Description : Check if the current transmission is finished.
+* Input : None
+* Output : None
+* Return : An ErrorStatus enumuration value:
+* - SUCCESS: Transmission ended
+* ...
[truncated message content] |