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  [ 5 posts ] 
Author Message
 Post subject: Firstboot gets too big when compiling
PostPosted: Fri May 14, 2010 1:05 pm 
Offline

Joined: Tue Aug 30, 2005 9:28 am
Posts: 7
When I compile Firstboot (AT91SAM9260EK) even without any modifications the resulting binary file are too big to fit into 4Kb. The Firstboot.bin are 4399 bytes and therefore I get two final binary files: Firstboot.nb0 and Firstboot.nb1.

How do you manage to compile Firstboot, so that it will fit into 4Kb ?

My reason for wanting to recompe Firstboot is that the Flash Recovery pin BP4 (PA31) conflicts with TXD4 - I need all the UARTS I can get.


Top
 Profile  
 
 Post subject: Re: Firstboot gets too big when compiling
PostPosted: Tue May 25, 2010 10:33 am 
Offline

Joined: Thu Apr 09, 2009 12:07 pm
Posts: 6
I have the same problem.

The size on disk of firstboot.bin is 4096byte but when I convert it into nb0 by cvrtbin, the size is 0x2070 .... why?


Top
 Profile  
 
 Post subject: Re: Firstboot gets too big when compiling
PostPosted: Mon Jun 21, 2010 1:35 pm 
Offline

Joined: Fri May 14, 2004 9:58 am
Posts: 183
Location: France - USA
Hi sjan & tecnors,

@sjan:
The size of Firstboot.bin can be a little more greater than 4kB because the end of this file is useless. So you can flash the Firstboot.nb0 file without problem.
On the other hand, if you add some code in the source of Firstboot, it may not work because you increase the size of this binary.

@tecnors:
Are you generating Firstboot in release mode, because you mustn't compile it in debug mode?

HTH


Top
 Profile  
 
 Post subject: Re: Firstboot gets too big when compiling
PostPosted: Tue Jun 22, 2010 12:58 pm 
Offline

Joined: Thu Apr 09, 2009 12:07 pm
Posts: 6
@Adeneo
I work in release mode but the file Firstboot.nb0 is too large.

To generate the file correctly I use this method:

1) Make the build of the whole BSP (Build Current BSP and Subproject) in release mode
2) Open release directory in build window
3) Display the characteristics of the file with the command "viewbin firstboot.bin"
4) Convert the file .bin in to .nb0 with "cvrtbin 0x2FF000-to-r-s-w 0x3000 32 FirstBoot. Bin"
6) Open the FIRSTBOOT.nb0 file with notepad++ in hex and cut everything that is before address 0x1000 and everything that's after the address 0x1FFFF so that the new file has dimension equal to 0x1000.
7) Downloading with SAM-BA file thus generated.


Top
 Profile  
 
 Post subject: Re: Firstboot gets too big when compiling
PostPosted: Wed Jun 23, 2010 1:35 pm 
Offline

Joined: Fri May 14, 2004 9:58 am
Posts: 183
Location: France - USA
Hi tecnors,

Only step 1) is necessary because the build process should generate automatically the '.nb0' files (Firstboot, eboot & nk).

HTH

If this answer solves your problem, please edit the subject of this post by adding [Solved] at the beginning of the subject.

_________________
Adeneo Embedded
http://www.adeneo-embedded.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 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: