Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: AT91SAM9261 EK Uboot / app code not detected
PostPosted: Sat Nov 05, 2011 11:38 pm 
Offline

Joined: Tue Oct 18, 2011 8:04 pm
Posts: 6
Hello,
I'm new to firmware n all, so my problem might sound naive, but i need help :)
I'm using a SAM9261 EK board, i've compiled one bootloader (just added some added debug msgs to AT91 bootstrap). I flashed it at 0X00 on dataflash & it boots fine, with all the debug messages.
But now when i put basic-lcd-project.bin (generated using sample examples in IAR) at 0X8400 , this app/code does not bootup.
At serial console all I can see is bootstrap being loaded.

I am able to run "DEMO_linux4sam-angstrom-at91sam9261ek" perfectly, so no hardware issues, i guess.

Is the offset which i am using correct?
Is the code compiled by IAR a valid code to be flashed?
While going thr docs / posts, i read abt some environment variables, is it relevant to this case.

This is a part of the bootloader that i'm using
/* ******************************************************************* */
/* BootStrap Settings */
/* */
/* ******************************************************************* */
#define AT91C_SPI_PCS_DATAFLASH AT91C_SPI_PCS0_DATAFLASH /* Boot on SPI NCS0 */

#define IMG_ADDRESS 0x8400 /* Image Address in DataFlash */
#define IMG_SIZE 0x33900 /* Image Size in DataFlash */

#define MACH_TYPE 0x350 /* AT91SAM9261-EK */
#define JUMP_ADDR 0x23F00000 /* Final Jump Address */



Thanks.


Top
 Profile  
 
 Post subject: Re: AT91SAM9261 EK Uboot / app code not detected
PostPosted: Sun Nov 06, 2011 12:35 am 
Offline

Joined: Sat Oct 30, 2010 6:04 pm
Posts: 574
You need to ensure that IAR is compiling code for the 0x23F00000 execution address.

You should be able to confirm this either through the GUI, or by looking at a map or scatter file for the code you have generated. If it isn't you need to point the "ROM/CODE" portion at 0x23F00000, and the RAM/DATA portions at the SRAM or 0x23E00000 in SDRAM for example.

Your SDRAM spans from 0x20000000 to 0x24000000-1, assuming 64MB.

Keil has example projects with SDRAM initialization that allows you to inject code directly into SDRAM with a SAM-ICE/J-LINK and execute/debug it. I suspect IAR has similar example, but you'll have to look.


Top
 Profile  
 
 Post subject: Re: AT91SAM9261 EK Uboot / app code not detected
PostPosted: Sun Jan 01, 2012 11:05 am 
Offline

Joined: Tue Oct 18, 2011 8:04 pm
Posts: 6
To add to the below mentioned problem...
I'm using SAM-ICE now, compiled the "Basic LCD Project", then used the "Download & Debug" option in the IAR tool.
The tool shows some error in the "board_cstartup_iar.s" file.. but when i press run again, the code is executed.
The line where error is flagged,


/* Set pc to actual code location (i.e. not in remap zone) */
LDR pc, =label

Thanks.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: