This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Flash.ini or XRAM.ini with Big Endian Format ?

Hello,

When I compile a simple Hello World program in the Big Endian Format (with GNU tools) and test it on the flash, it does not print anything on my terminal.
If I launch the same program in Little Endian, it's OK.

To program the flash when I use the Big Endian Mode, I modified the file Flash.ini like this :

/***********************************************************************/
/*  This file is part of the ARM Compiler package                      */
/*  Copyright KEIL ELEKTRONIK GmbH 1992-2003                           */
/***********************************************************************/
/*                                                                     */
/*  FLASH.INI: Flash Initialization File                               */
/*                                                                     */
/***********************************************************************/


//*** <<< Use Configuration Wizard in Context Menu >>> ***


FUNC void Setup (void) {

// <h> External Bus Interface (EBI)

//   <e1.13> Enable Chip Select 0 (CSR0)
//     <o1.20..31> BA: Base Address <0x0-0xFFF00000:0x100000><#/0x100000>
//                  Start Address for Chip Select Signal
//     <o1.7..8>   PAGES: Page Size      <0=> 1M Byte    <1=> 4M Bytes
//                                       <2=> 16M Bytes  <3=> 64M Bytes
//                  Selects Active Bits in Base Address
//     <o1.0..1>   DBW: Data Bus Width   <1=> 16-bit     <2=> 8-bit
//     <o1.12>     BAT: Byte Access Type <0=> Byte-write
//                                       <1=> Byte-select
//     <e1.5>      WSE: Enable Wait State Generation
//       <o1.2..4>   NWS: Number of Standard Wait States <1-8><#-1>
//     </e>
//     <o1.9..11>  TDF: Data Float Output Time <0-7>
//                  Number of Cycles Added after the Transfer
//   </e>
//_WDWORD(0xFFE00000, 0x01002429);   // EBI_CSR0: Flash
  _WDWORD(0xFFE00000, 0x29240001);   // EBI_CSR0: Flash

//   <e1.13> Enable Chip Select 1 (CSR1)
//     <o1.20..31> BA: Base Address <0x0-0xFFF00000:0x100000><#/0x100000>
//                  Start Address for Chip Select Signal
//     <o1.7..8>   PAGES: Page Size      <0=> 1M Byte    <1=> 4M Bytes
//                                       <2=> 16M Bytes  <3=> 64M Bytes
//                  Selects Active Bits in Base Address
//     <o1.0..1>   DBW: Data Bus Width   <1=> 16-bit     <2=> 8-bit
//     <o1.12>     BAT: Byte Access Type <0=> Byte-write
//                                       <1=> Byte-select
//     <e1.5>      WSE: Enable Wait State Generation
//       <o1.2..4>   NWS: Number of Standard Wait States <1-8><#-1>
//     </e>
//     <o1.9..11>  TDF: Data Float Output Time <0-7>
//                  Number of Cycles Added after the Transfer
//   </e>
//  _WDWORD(0xFFE00004, 0x040034A5);   // EBI_CSR1: RAM
  _WDWORD(0xFFE00004, 0xA5340004);   // EBI_CSR1: RAM

//   <q1.4>        DRP: Data Read Protocol
//                      <0=> Standard Read
//                      <1=> Early Read
//_WDWORD(0xFFE00024, 0x00000010);   // EBI_MCR:  Data Read Protocol
_WDWORD(0xFFE00024, 0x10000000);   // EBI_MCR:  Data Read Protocol


//_WDWORD(0xFFE00020, 0x00000001);   // EBI_RCR:  Remap Command
  _WDWORD(0xFFE00020, 0x01000000);   // EBI_RCR:  Remap Command

// </h>

}


// Switching from Slow Clock to Main Oscillator for faster Download
//_WDWORD(0xFFFF4020, 0x002F0002);     // APMC_CGMR: Enable Main Oscillator
_WDWORD(0xFFFF4020, 0x02002F00);     // APMC_CGMR: Enable Main Oscillator
_sleep_(10);                         // Wait for stable Main Oscillator
//_WDWORD(0xFFFF4020, 0x002F4002);     // APMC_CGMR: Switch to Main Oscillator
_WDWORD(0xFFFF4020, 0x02402F00);     // APMC_CGMR: Switch to Main Oscillator

Setup();                             // Setup for Flash


We can note that it works in simulation mode but doesn't work too in XRAM mode.

Can you help me ? Is the problem due to my Flash.ini ?

0