cancel
Showing results for 
Search instead for 
Did you mean: 

Using STM32H7, IAR output bin file size is 2MB, however .map file reports a size of 61.8KB being used

YCHTI.1
Associate II

I'm working on a project using IAR (version 8.50.9)

when I build the project, no errors. The map file reports

```

 59'156 bytes of readonly code memory

  2'741 bytes of readonly data memory

 15'344 bytes of readwrite data memory

```

I can also see on the map file 6.18KB of program code and data is about right.

When I run from the debugger using an IJet Pod, it uses a .sim file as an output file, its size is about 61.8KB

However, when I build the project (after CleanAll), the output bin file size is 2MB

Any help will be appreciated

thanks

3 REPLIES 3
S.Ma
Principal

There is a similar fresh post.

Look at the memory map, the used areas by linker and map file, learn the differences between a bin ary file, hex and s19 files on wikipedia.

Inspect the .ELF and the sections there-in

If there is sparse data, like a tag/crc at the end of the FLASH this might account for it describing the entire region.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
YCHTI.1
Associate II

Thanks Tesla for your answer, very much.

I didn't see any similar fresh. First guy who responded, either you know and you answer, or just do yourself a favor and don't answer. Like you, are problems for these very useful forums. Respect is everything.

I fixed the issue.

In this case I didn't have any sparse data in the linker output file.

In IAR, project settings, linker property, the output file name I was putting in there didn't have any extension. Typically, .out extension. Once I put the output name with extension .out, I got 2 outputs files, .out (of size about 2MB which is what I had before) and .bin file (which is what I choose as output not hex, not Motorola S records) of size 61.8KB.

This looks more like a bug in IAR, if I omit library file extension, it should still default the library output file to some extension and still output a bin file as expected.