industrialNETworXnetx

Rainer Versteeg

Rainer Versteeg

| 27.01.2010 | 15:36 | 4 replies

Error Message in Bootwizard V 1.0.401.0

Hi,

I have Hitex Hitop V 5.3 and create a *.elf file.

When I would create a *.bin file with the bootwizrad (Click on load elf/binay and select the file) following error is shown:

The extracted image is to large (1342167188 bytes)
Please check your linker

But the file is only 1604252 bytes great.

Can someone help me

Br,

Rainer

Chris Frickel

Chris Frickel

Hilscher

| 27.01.2010 | 18:41

Hi Rainer,

Rainer Versteeg wrote:
The extracted image is to large (1342167188 bytes)

The Bootwizard tries to convert an elf image to a binary file. So lets take a closer look at both file formats first:

  • An elf image can consist of several sections, one for each place in the netX memory where some data goes. The distance between these sections does not matter. They are saved separately in the elf file.[/*:m]
  • A binary image is just one continuous block. There is nothing like sections and there is no possibility to save multiple regions.[/*:m]

Converting an elf file to a binary file takes all the sections and fills the gaps between them. Depending on the sections addresses the result can get quite big. Just imagine one section in the internal ram at 0x00008000 and one section in SDRam at 0x80000000. The gap between both sections is almost 2 gigabyte! This means almost 2 gigabyte of fillup bytes will be written to the binary file. Whoa, that's a bit to much for a bootable image.

Sooo... your problem boils down to a huge gap between two sections in your elf file. Please check your project and especially your linker description file. There must be some data or code section which is far away from the rest. Do not worry, the linker can help you to find the problem. Add this to your linker options:

-Map=mapfile.txt

Rebuild your elf file and there will be a "mapfile.txt" with a lot of useful info about what goes where in the memory. The file will be not small, but with some digging you will get all the information you need to identify your problem.

Good luck!

[/]

Thyron

Thyron

| 10.08.2011 | 18:38

Hi,

we have a similar problem: For performance reasons we devided our application in SDRAM and TCM. Since both memory regions are far apart bootwizard tries to build an almost 2GB binary file.

How can we build a small binary that uses SDRAM and TCM at the same time?

Andreas Jacob

Andreas Jacob

Hilscher Gesellschaft fuer Systemautomation mbH

| 11.08.2011 | 06:41

Hello Thyron,

please read the previous post from Chris Frickel and follow his recommendations.

Regards
AJ

M T

M T

Hilscher Gesellschaft für Systemautomation mbH

| 11.08.2011 | 07:29

Thyron wrote:

For performance reasons we devided our application in SDRAM and TCM. Since both memory regions are far apart bootwizard tries to build an almost 2GB binary file.

How can we build a small binary that uses SDRAM and TCM at the same time?

First of all you should read and understand what Chris has written about the differences of .ELF and .bin files, as AJ proposed.

As the netX can only start special prepared .bin files (not .ELF files), you will need to relocate data and code yourself. This is done via the Linker Script (.ld) by telling the linker that this code / data has different load (LMA) and execution addresses (VMA).

See LD documentation http://sourceware.org/binutils/docs-2.21/ld/Output-Section-Attributes.html#Output-Section-Attributes for more information.

NOTE: If LMA and VMA is different, the application needs to copy this region from LMA to VMA at startup for correct execution, any may only call relocated functions after they have been copied to their destination adress.

Regards,

MT

Login