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  [ 4 posts ] 
Author Message
 Post subject: at91 sam9x25 board flashing with SAM-BA V 2.11
PostPosted: Mon Dec 05, 2011 7:23 am 
Offline

Joined: Mon Dec 05, 2011 7:13 am
Posts: 2
Hello,

I am trying to load the program into nand flash memory using sam-ba v 2.11 but I am not able to do so.:(

According to sam9x25 data sheet the flash memory address starts from 0x40000000, but when I try to access this memory using sam-ba tool it gives an error that the address is not a valid address.
Can anyone please help me in flashing the code into nand flash using a .bin file.


Top
 Profile  
 
 Post subject: Re: at91 sam9x25 board flashing with SAM-BA V 2.11
PostPosted: Mon Dec 05, 2011 2:50 pm 
Offline

Joined: Sat Oct 30, 2010 6:04 pm
Posts: 574
You should be able to go to the NAND tab, run the "Enable NandFlash" script, and then use ZERO based addresses WITHIN the NAND device.

To write AT91BootStrap type code at ZERO, use the "Send Boot File" script.


Top
 Profile  
 
 Post subject: Re: at91 sam9x25 board flashing with SAM-BA V 2.11
PostPosted: Tue Dec 06, 2011 6:51 am 
Offline

Joined: Mon Dec 05, 2011 7:13 am
Posts: 2
Hello,

Thanks for the reply. :-)
I managed to download the code(not the bootstrap code) at offset 0x00 using SAM-BA v 2.11.
Now when I do the power off and on again, and I tried to read the memory at offset 0x0, the code is still there.
But I am having two problems:
1) I am not able to watch the nand memory location using the SAM-BA tool. When I enter 0x00, it shows the content of ROM bootloader code I suppose which is mapped to 0x0 after the reset.
So how can I watch the nand memory contents?
2) How to execute the code now which is placed in NAND memory. I have added the bin file of the simple program and now I want to execute it using Hyper Terminal but whenever I connect my board to hyper terminal and do the power reset, it just displays ROMboot and then nothing happens.
How can I point it to trigger my code?

Any help in this regard would be highly appreciated.


Top
 Profile  
 
 Post subject: Re: at91 sam9x25 board flashing with SAM-BA V 2.11
PostPosted: Tue Dec 06, 2011 6:36 pm 
Offline

Joined: Sat Oct 30, 2010 6:04 pm
Posts: 574
I don't have a copy of the SAM9X25 ROM so can't pick you any break point locations.

But with a SAM-ICE/J-LINK you should be able to break the device at reset (RomBOOT), step into it, and then set it to break before it jumps into the SRAM code, or trap it as is re-mapped at zero. Then you can step into, or break point the code you have in SRAM.

To get bootable code into NAND you must build it for 0x300000 (or whatever your SRAM address is), it must contain a valid ARM9 vector table with E5/EA instructions, and the vector at 0x14 must contain a length descriptor which fits within the SRAM (32K limit).

While it gets remapped/shadowed at 0, it's probably better to assume it's at the usual SRAM address.

Note that the "Send Boot File" option sets up the size in the vector at 0x14 for you, other writes to zero will not achieve this. RomBOOT will only jump to code that it believes is valid.

To get a good example of booting code, you should look at the AT91BootStrap examples for your board. SAM-BA also permits you to place code in SRAM or SDRAM, and call it. You could also look at the "getting started" application ATMEL typically provides with the EK's.

That said, a much easier approach is to just get Keil to dump code into SRAM or SDRAM and debug it directly from the IDE.


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

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


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:  
cron