Initialising variables after scatter loading?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2006-07-09 10:54 PM
Posted on July 10, 2006 at 07:54
Initialising variables after scatter loading?
Labels:
- Labels:
-
Legacy products
This discussion is locked. Please start a new topic to ask your question.
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2006-05-09 7:57 PM
Posted on May 10, 2006 at 04:57
When I run program from ram, all the variables are initialised.
When I run program after scatter loading ie: from flash, what’s copied to ram is not initialised. How do I make the variables initialised? when I boot load from flash so what copied to ram looks like initialised data?Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2006-05-10 6:28 PM
Posted on May 11, 2006 at 03:28
I figured it out, rather than using B main, I had to use B __main. It works. All the variables are initialised now.
Can some one explain the difference?Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2006-07-07 3:47 AM
Posted on July 07, 2006 at 12:47
Hello, I have the same problem.
I load code in Bank1, but when I execute it the variables don't be initialised. Where must I write ''B __main'', in 71x_init.s file? Thanks Here is my scatter file: BANK0 0x40000000 { FLASH_B0 0x40000000 ; for bank0 of internal flash { 71x_vect.o (Vect, +First) 71x_init.o (Init) * (+RO) } FLASH_B1 0x400C0000 ; for bank1 of internal flash { flash_prog.o (+RO) ; code of flash_prog file flash.o (+RO) ; code of flash file serial_flash.o (+RO) ; code of serial_flash file } RAM_0 0x20000000 ; for internal RAM { flash_prog.o (+RW,+ZI) ; data of flash_prog file flash.o (+RW,+ZI) ; data of flash file serial_flash.o (+RW,+ZI) ; data of serial_flash file * (+RW) * (+ZI) } }