Firstboot gets too big when compiling

This forum is for users of Atmel's SAM Series and who are interested in using WinCE OS.

Moderator: nferre

sjan
Posts: 7
Joined: Tue Aug 30, 2005 9:28 am

Firstboot gets too big when compiling

Fri May 14, 2010 1:05 pm

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.
tecnors
Posts: 6
Joined: Thu Apr 09, 2009 12:07 pm

Re: Firstboot gets too big when compiling

Tue May 25, 2010 10:33 am

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?
Adeneo
Contact:
Location: France - USA
Posts: 183
Joined: Fri May 14, 2004 9:58 am

Re: Firstboot gets too big when compiling

Mon Jun 21, 2010 1:35 pm

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
tecnors
Posts: 6
Joined: Thu Apr 09, 2009 12:07 pm

Re: Firstboot gets too big when compiling

Tue Jun 22, 2010 12:58 pm

@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.
Adeneo
Contact:
Location: France - USA
Posts: 183
Joined: Fri May 14, 2004 9:58 am

Re: Firstboot gets too big when compiling

Wed Jun 23, 2010 1:35 pm

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.

Return to “WinCE”

Who is online

Users browsing this forum: No registered users and 2 guests