Pyxos™ FT EVK Evaluation Kit 1.0 Patch 1
ReadMe File
August 2009
Copyright
© 2009 Echelon Corporation
All Rights Reserved
This file contains important information about the patch 1 update to the Echelon Pyxos FT EVK Evaluation Kit 1.0. It describes the problem fixed, as well as how to install the patch files to update a Pyxos FT EVK Evaluation Kit 1.0 installation.
This package updates the example applications included with the Echelon’s Pyxos FT EVK Evaluation Kit 1.0. It describes the changes made to the example projects and applications, as well as how to install the updated example files. You must have previously installed the Echelon’s Pyxos FT EVK Evaluation Kit 1.0 in order to apply this patch.
For the latest information about updates to the Pyxos FT EVK Evaluation Kit product and examples that it contains, see the Pyxos Web page at www.echelon.com/pyxos.
6.3 CStartup.s79 and IRQ_Handler.s
6.5 flash.c and interrupts.s79
Echelon’s Pyxos FT EVK Evaluation Kit 1.0 includes example applications built using IAR Embedded Workbench for ARM 4.31a Kickstart. These examples cannot be built using IAR Embedded Workbench for ARM 5.0 Kickstart or later. This update addresses this issue by providing projects and source files that are compatible with IAR Embedded Workbench for ARM 5.40 Kickstart.
This zip-format patch includes the following files:
To install this patch, uncompress the zip file into your Pyxos FT EVK folder (typically, this will be at C:\Program Files\Echelon\Pyxos FT EVK). Because this will overwrite the existing IAR project files and some source files, you may wish to backup your Pyxos Network Example folder (typically at C:\Program Files\Echelon\Pyxos FT EVK\Pyxos Network Example) prior to unzipping the patch.
The sections below describe the changes included in this update.
The project files for both the Pyxos FT EV Pilot example and the Pyxos FT EV Actuator example applications were modified as follows:
In addition, the project files for the Pyxos FT EV Pilot example were modified to remove the obsolete source file Interrupts.s79 (under Source\Flash).
IAR 5.x requires a new linker configuration format. The file at91SAM7S64_NoRemap.icf replaces at91SAM7S64_NoRemap.xcl with equivalent linker configuration.
The previous examples included CStartup.s79. This file is now obsolete (as are all assembly source files). The updated project files use the standard CStartup.s file provided by, and automatically included by the IAR toolkit. However, there are some functional differences between the CStartup.s79 previously used by the examples the standard CStartup.s, as described below:
Changed to support new startup model as described in the previous section. Specifically:
#include "intrinsics.h"
AT91F_LowLevelInit();
__enable_interrupt();
void AT91F_Default_FIQ_handler(void)
{
while (1);
}
void AT91F_Default_IRQ_handler(void)
{
while (1);
}
The functions AT91F_disable_interrupt and AT91F_enable_interrupt were defined in the now obslete interrupts.s79. Calls to these functions have been changed to use the intrinsics __disable_interrupt and __enable_interrupt:
#include "intrinsics.h"
extern void AT91F_disable_interrupt(void);
extern void AT91F_enable_interrupt(void);
The Pilot used to store data in a page of flash allocated using “segments”. The IAR no longer supports “segments”, but instead support “sections”. The linker configuration file at91SAM7S64_NoRemap.icf defines a flash data section, and PilotFlash.c was modified to use this section as follows:
#define PERSISTENT_FLASH_PAGE (((unsigned int)&flashData)/FLASH_PAGE_SIZE_BYTE)
#define PERSISTENT_MEMORY(page) \
((unsigned int)(( unsigned int *) AT91C_IFLASH +
\
( page * FLASH_PAGE_SIZE_LONG)))
// Declare the flash data in a separate flash sector
__no_init NonVolatilePointInfo flashData @ "FLASH";
With:
#define FLASH_DATA_ADDR \
((NonVolatilePointInfo *)__section_begin("FLASH_DATA"))
#define PERSISTENT_FLASH_PAGE \
((((unsigned int)FLASH_DATA_ADDR) - \
(( unsigned int) AT91C_IFLASH))/FLASH_PAGE_SIZE_BYTE)
#define PERSISTENT_MEMORY(page) \
((unsigned int)(( unsigned int *) AT91C_IFLASH + \
( page * FLASH_PAGE_SIZE_LONG)))
/* Declare the flash data in a separate flash sector */
#pragma section = "FLASH_DATA"
NonVolatilePointInfo *pFlashData = FLASH_DATA_ADDR;
Due to improved compiler optimization, data that is modified by an interrupt routine and checked by another function must now be declared using the non-volatile keyword. The updated version of psImpl.c was modified to support these optimizations as follows:
LfsDriver driver;
to:
volatile LfsDriver driver;
unsigned char* const PS_PBUFFER = &driver.buff[2];
to:
unsigned char* const PS_PBUFFER = (unsigned char *)&driver.buff[2];
lfs_getOpCode(addr, 1, &driver.buff[0], &driver.buff[1]);
to:
lfs_getOpCode(addr, 1, (unsigned char
*)&driver.buff[0],
(unsigned char *)&driver.buff[1]);
lfs_getOpCode(addr, 0, &driver.buff[0], &driver.buff[1]);
to:
lfs_getOpCode(addr, 0, (unsigned char
*)&driver.buff[0],
(unsigned char *)&driver.buff[1]);