Contiki 2.6

memmap-fat.h

Go to the documentation of this file.
00001 /** @file hal/micro/cortexm3/memmap-fat.h
00002  * @brief STM32W108 series memory map fixed address table definition
00003  *
00004  * <!--(C) COPYRIGHT 2010 STMicroelectronics. All rights reserved.        -->
00005  */
00006 #ifndef __MEMMAP_FAT_H__
00007 #define __MEMMAP_FAT_H__
00008 
00009 #ifndef __MEMMAP_TABLES_H__
00010   // if we weren't included via memmap-tables.h, define a dummy type for the BAT
00011   typedef void HalBootloaderAddressTableType;
00012 #endif
00013 
00014 #include "hal/micro/cortexm3/bootloader/fib-bootloader.h"
00015 
00016 // ****************************************************************************
00017 // If any of these address table definitions ever need to change, it is highly
00018 // desirable to only add new entries, and only add them on to the end of an
00019 // existing address table... this will provide the best compatibility with
00020 // any existing code which may utilize the tables, and which may not be able to 
00021 // be updated to understand a new format (example: bootloader which reads the 
00022 // application address table)
00023 
00024 
00025 // Description of the Fixed Address Table (FAT)
00026 typedef struct {
00027   HalBaseAddressTableType baseTable;
00028   void *CustomerInformationBlock;
00029   HalBootloaderAddressTableType *bootloaderAddressTable;
00030   void *startOfUnusedRam;
00031   // ** pointers to shared functions **
00032   FibStatus (* fibFlashWrite)(int32u address, int8u *data,
00033                               int32u writeLength, int32u verifyLength);
00034   FibStatus (* fibFlashErase)(FibEraseType eraseType, int32u address);
00035 } HalFixedAddressTableType;
00036 
00037 extern const HalFixedAddressTableType halFixedAddressTable; 
00038 
00039 #define FIXED_ADDRESS_TABLE_TYPE        (0x0FA7)
00040 
00041 // The current versions of the address tables.
00042 // Note that the major version should be updated only when a non-backwards
00043 // compatible change is introduced (like removing or rearranging fields)
00044 // adding new fields is usually backwards compatible, and their presence can
00045 // be indicated by incrementing only the minor version
00046 #define FAT_VERSION                     (0x0003)
00047 #define FAT_MAJOR_VERSION               (0x0000)
00048 #define FAT_MAJOR_VERSION_MASK          (0xFF00)
00049 
00050 
00051 #endif //__MEMMAP_FAT_H__