1. This forum section is a read-only archive which contains old newsgroup posts. If you wish to post a query, please do so in one of our main forum sections (here). This way you will get a faster, better response from the members on Motherboard Point.

Writing flash-burnner program for my own board?

Discussion in 'Embedded' started by Lee, Nov 7, 2004.

  1. Lee

    Lee Guest

    Hello,

    I am writing the flash burnner program for my own board. I can debug
    it by using ARM SDT2.51, i.e. load my program to RAM (0x0c000000) and
    execute it. "Hello World" (LED-blinking) is working. Currently I try
    to burn the "hello world" to flash (0x00000000). My method is to load
    the flash burnner to RAM and run it and copy "hello world" to flash.

    But when I want writing the sequence to flash, like following, I
    always failed. The debugger told me "This instruction refer to memory
    "0x00000000" ... that memory is read only...". (This similiar error
    imformation is got when uninitialized pointer is refered. But I don't
    refer an uninitialized pointer)

    What could be the problem?

    /* Erase the whole chip SST39VF160*/
    WRITEREGW(0x5555, 0xaaaa);
    WRITEREGW(0x2aaa, 0x5555);
    WRITEREGW(0x5555, 0x8080);
    WRITEREGW(0x5555, 0xaaaa);
    WRITEREGW(0x2aaa, 0x5555);
    WRITEREGW(0x5555, 0x1010);

    Thanks,

    Adrian
     
    Lee, Nov 7, 2004
    #1
    1. Advertising

  2. Lee

    Lee Guest

    Nobody help me? //Cry

    (Lee) wrote in message news:<>...
    > Hello,
    >
    > I am writing the flash burnner program for my own board. I can debug
    > it by using ARM SDT2.51, i.e. load my program to RAM (0x0c000000) and
    > execute it. "Hello World" (LED-blinking) is working. Currently I try
    > to burn the "hello world" to flash (0x00000000). My method is to load
    > the flash burnner to RAM and run it and copy "hello world" to flash.
    >
    > But when I want writing the sequence to flash, like following, I
    > always failed. The debugger told me "This instruction refer to memory
    > "0x00000000" ... that memory is read only...". (This similiar error
    > imformation is got when uninitialized pointer is refered. But I don't
    > refer an uninitialized pointer)
    >
    > What could be the problem?
    >
    > /* Erase the whole chip SST39VF160*/
    > WRITEREGW(0x5555, 0xaaaa);
    > WRITEREGW(0x2aaa, 0x5555);
    > WRITEREGW(0x5555, 0x8080);
    > WRITEREGW(0x5555, 0xaaaa);
    > WRITEREGW(0x2aaa, 0x5555);
    > WRITEREGW(0x5555, 0x1010);
    >
    > Thanks,
    >
    > Adrian
     
    Lee, Nov 9, 2004
    #2
    1. Advertising

  3. Lee

    Tauno Voipio Guest

    > (Lee) wrote in message news:<>...
    >
    >>Hello,
    >>
    >>I am writing the flash burnner program for my own board. I can debug
    >>it by using ARM SDT2.51, i.e. load my program to RAM (0x0c000000) and
    >>execute it. "Hello World" (LED-blinking) is working. Currently I try
    >>to burn the "hello world" to flash (0x00000000). My method is to load
    >>the flash burnner to RAM and run it and copy "hello world" to flash.
    >>
    >>But when I want writing the sequence to flash, like following, I
    >>always failed. The debugger told me "This instruction refer to memory
    >>"0x00000000" ... that memory is read only...". (This similiar error
    >>imformation is got when uninitialized pointer is refered. But I don't
    >>refer an uninitialized pointer)
    >>
    >>What could be the problem?
    >>
    >> /* Erase the whole chip SST39VF160*/
    >> WRITEREGW(0x5555, 0xaaaa);
    >> WRITEREGW(0x2aaa, 0x5555);
    >> WRITEREGW(0x5555, 0x8080);
    >> WRITEREGW(0x5555, 0xaaaa);
    >> WRITEREGW(0x2aaa, 0x5555);
    >> WRITEREGW(0x5555, 0x1010);
    >>
    >>Thanks,
    >>
    >>Adrian


    Your problems may be missing startup code for the Flash start.

    When running from RAM, the Flash monitor has initialized
    certain parts of the hardware, but you do not show that
    the same is done for the burned-in code.

    Which ARM-based chip you're using?

    What kind of start-up code there is (Angel) ?

    How is the address space divided to different uses?

    Tauno Voipio
    tauno voipio (at) iki fi
     
    Tauno Voipio, Nov 9, 2004
    #3
  4. Lee

    Lee Guest

    Tauno Voipio <> wrote in message news:<mh_jd.26$>...
    > > (Lee) wrote in message news:<>...
    > >
    > >>Hello,
    > >>
    > >>I am writing the flash burnner program for my own board. I can debug
    > >>it by using ARM SDT2.51, i.e. load my program to RAM (0x0c000000) and
    > >>execute it. "Hello World" (LED-blinking) is working. Currently I try
    > >>to burn the "hello world" to flash (0x00000000). My method is to load
    > >>the flash burnner to RAM and run it and copy "hello world" to flash.
    > >>
    > >>But when I want writing the sequence to flash, like following, I
    > >>always failed. The debugger told me "This instruction refer to memory
    > >>"0x00000000" ... that memory is read only...". (This similiar error
    > >>imformation is got when uninitialized pointer is refered. But I don't
    > >>refer an uninitialized pointer)
    > >>
    > >>What could be the problem?
    > >>
    > >> /* Erase the whole chip SST39VF160*/
    > >> WRITEREGW(0x5555, 0xaaaa);
    > >> WRITEREGW(0x2aaa, 0x5555);
    > >> WRITEREGW(0x5555, 0x8080);
    > >> WRITEREGW(0x5555, 0xaaaa);
    > >> WRITEREGW(0x2aaa, 0x5555);
    > >> WRITEREGW(0x5555, 0x1010);
    > >>
    > >>Thanks,
    > >>
    > >>Adrian

    >
    > Your problems may be missing startup code for the Flash start.
    >
    > When running from RAM, the Flash monitor has initialized
    > certain parts of the hardware, but you do not show that
    > the same is done for the burned-in code.
    >
    > Which ARM-based chip you're using?
    >
    > What kind of start-up code there is (Angel) ?
    >
    > How is the address space divided to different uses?
    >
    > Tauno Voipio
    > tauno voipio (at) iki fi


    ARM (samsung S3C44B0X)
    Flash (SST39VF160Q)
    Debugger is ARM SDT2.51 or ARM ADS1.2

    The debugger is connected to Angel and Angel is connected to target
    board. I initialized the memory control register by using Angel. I
    didn't have any memory initialization code in my program. I thought it
    is done by Angel.

    Someone told me debugger cannot be used to burn flash, maybe this is
    due to debugger protect readonly memory. Is it true?

    Thank a lot.
     
    Lee, Nov 9, 2004
    #4
  5. Lee

    Tauno Voipio Guest

    Lee wrote:
    > Tauno Voipio <> wrote in message news:<mh_jd.26$>...
    >
    >>> (Lee) wrote in message news:<>...
    >>>
    >>>
    >>>>Hello,
    >>>>
    >>>>I am writing the flash burnner program for my own board. I can debug
    >>>>it by using ARM SDT2.51, i.e. load my program to RAM (0x0c000000) and
    >>>>execute it. "Hello World" (LED-blinking) is working. Currently I try
    >>>>to burn the "hello world" to flash (0x00000000). My method is to load
    >>>>the flash burnner to RAM and run it and copy "hello world" to flash.
    >>>>
    >>>>But when I want writing the sequence to flash, like following, I
    >>>>always failed. The debugger told me "This instruction refer to memory
    >>>>"0x00000000" ... that memory is read only...". (This similiar error
    >>>>imformation is got when uninitialized pointer is refered. But I don't
    >>>>refer an uninitialized pointer)
    >>>>
    >>>>What could be the problem?
    >>>>
    >>>> /* Erase the whole chip SST39VF160*/
    >>>> WRITEREGW(0x5555, 0xaaaa);
    >>>> WRITEREGW(0x2aaa, 0x5555);
    >>>> WRITEREGW(0x5555, 0x8080);
    >>>> WRITEREGW(0x5555, 0xaaaa);
    >>>> WRITEREGW(0x2aaa, 0x5555);
    >>>> WRITEREGW(0x5555, 0x1010);
    >>>>
    >>>>Thanks,
    >>>>
    >>>>Adrian

    >>
    >>Your problems may be missing startup code for the Flash start.
    >>
    >>When running from RAM, the Flash monitor has initialized
    >>certain parts of the hardware, but you do not show that
    >>the same is done for the burned-in code.
    >>
    >>Which ARM-based chip you're using?
    >>
    >>What kind of start-up code there is (Angel) ?
    >>
    >>How is the address space divided to different uses?
    >>
    >>Tauno Voipio
    >>tauno voipio (at) iki fi

    >
    >
    > ARM (samsung S3C44B0X)
    > Flash (SST39VF160Q)
    > Debugger is ARM SDT2.51 or ARM ADS1.2
    >
    > The debugger is connected to Angel and Angel is connected to target
    > board. I initialized the memory control register by using Angel. I
    > didn't have any memory initialization code in my program. I thought it
    > is done by Angel.
    >
    > Someone told me debugger cannot be used to burn flash, maybe this is
    > due to debugger protect readonly memory. Is it true?
    >
    > Thank a lot.


    OK.

    So is the Angel on a separate processor or on a Flash
    chip on the target board? You say that Angel is connected
    to the target board. Is it using the JTAG connection to
    the target board processor?

    In principle, the Flash write using JTAG goes:

    - initialize the memory control registers, both RAM and Flash,
    - load into RAM the code to be written,
    - load Flash writer code into free area of RAM
    - run the Flash writer to program the target code into Flash

    HTH

    Tauno Voipio
    tauno voipio (at) iki fi

    Tauno Voipio
    tauno voipio (at) iki fi
     
    Tauno Voipio, Nov 9, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steve Connet

    writing bank flash 8051

    Steve Connet, Jul 4, 2003, in forum: Embedded
    Replies:
    0
    Views:
    644
    Steve Connet
    Jul 4, 2003
  2. egp001
    Replies:
    2
    Views:
    339
    MW Ron
    May 12, 2004
  3. Dave

    Re: Program writing

    Dave, Oct 14, 2003, in forum: Hardware
    Replies:
    0
    Views:
    323
  4. Ron Cook

    Re: Program writing

    Ron Cook, Oct 16, 2003, in forum: Hardware
    Replies:
    0
    Views:
    307
    Ron Cook
    Oct 16, 2003
  5. wanwan
    Replies:
    8
    Views:
    414
Loading...

Share This Page