2022-12-20 02:45 PM
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
2022-12-20 06:19 PM
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.
2022-12-20 06:47 PM
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.
2022-12-20 08:06 PM
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.