/********************************************************************* * (c) 1995 - 2018 SEGGER Microcontroller GmbH * * The Embedded Experts * * www.segger.com * ********************************************************************** ---------------------------------------------------------------------- File : FlashDev.c Purpose : Flash device description Template -------- END-OF-HEADER --------------------------------------------- */ #include "FlashOS.h" struct FlashDevice const FlashDevice __attribute__ ((section ("DevDscr"))) = { ALGO_VERSION, // Algo version #if Z20K148M_2MB_MainFlash "Z20K148M 2MB Main Flash", // 148M Main Flash CODE Name #elif Z20K148M_128KB_DataFlash "Z20K148M 128KB Data Flash", // 148M Data Flash DATA Name #elif Z20K148M_32KB_IfrFlash "Z20K148M 32KB Ifr Flash", // 148M IFR Flash IFR Name #elif Z20K146M_1MB_MainFlash "Z20K146M 1MB Main Flash", // 146M Main Flash CODE Name #elif Z20K146M_128KB_DataFlash "Z20K146M 128KB Data Flash", // 146M Data Flash DATA Name #elif Z20K146M_32KB_IfrFlash "Z20K146M 32KB Ifr Flash", // 146M IFR Flash IFR Name #elif Z20K144M_512KB_MainFlash "Z20K144M 512KB Main Flash", // 144M Main Flash CODE Name #elif Z20K144M_128KB_DataFlash "Z20K144M 128KB Data Flash", // 144M Data Flash DATA Name #elif Z20K144M_32KB_IfrFlash "Z20K148M 32KB Ifr Flash", // 144M IFR Flash IFR Name #endif ONCHIP, // Flash device type #if Z20K148M_2MB_MainFlash 0x00000000, // 148M Main Flash Start Address #elif Z20K148M_128KB_DataFlash 0x01000000, // 148M Data Flash Start Address #elif Z20K148M_32KB_IfrFlash 0x02000000, // 148M IFR Flash Start Address #elif Z20K146M_1MB_MainFlash 0x00000000, // 146M Main Flash Start Address #elif Z20K146M_128KB_DataFlash 0x01000000, // 146M Data Flash Start Address #elif Z20K146M_32KB_IfrFlash 0x02000000, // 146M IFR Flash Start Address #elif Z20K144M_512KB_MainFlash 0x00000000, // 144M Main Flash Start Address #elif Z20K144M_128KB_DataFlash 0x01000000, // 144M Data Flash Start Address #elif Z20K144M_32KB_IfrFlash 0x02000000, // 144M IFR Flash Start Address #endif #if Z20K148M_2MB_MainFlash 0x00200000, // 148M Main Flash Size in Bytes (2M) #elif Z20K148M_128KB_DataFlash 0x00020000, // 148M Data Flash Size in Bytes (128kB) #elif Z20K148M_32KB_IfrFlash 0x00008000, // 148M Ifr Flash Size in Bytes (32kB) #elif Z20K146M_1MB_MainFlash 0x00100000, // 146M Main Flash Size in Bytes (1M) #elif Z20K146M_128KB_DataFlash 0x00020000, // 146M Data Flash Size in Bytes (128kB) #elif Z20K146M_32KB_IfrFlash 0x00008000, // 146M Ifr Flash Size in Bytes (32kB) #elif Z20K144M_512KB_MainFlash 0x00080000, // 144M Main Flash Size in Bytes (512KB) #elif Z20K144M_128KB_DataFlash 0x00020000, // 144M Data Flash Size in Bytes (128kB) #elif Z20K144M_32KB_IfrFlash 0x00008000, // 144M Ifr Flash Size in Bytes (32kB) #endif 16, // Page Size (number of bytes that will be passed to ProgramPage(). May be multiple of min alignment in order to reduce overhead for calling ProgramPage multiple times 0, // Reserved, should be 0 0xFF, // Flash erased value 300, // Program page timeout in ms 3000, // Erase sector timeout in ms // // Flash sector layout definition // 0x00002000, 0x00000000, // Sector Size 8kB (32 Sectors) 0xFFFFFFFF, 0xFFFFFFFF // Indicates the end of the flash sector layout. Must be present. };