SIMAVR: Using a bootloader AND a program?


To test a program I am using simavr (linux).

There a certain thing I dont understand:
To simulate a certain board/MCU correctly, the complete
firmware has to be used - that is the bootloader and the program

According some places on the internet I call simavr like this:
simavr -m atmega2560 -f 16000000 -t .ino.elf

which works of some sort (see previous posting on simavr).

But where can I place the bootloader? How to read it in beforehand?


You don't need the bootloader, it is not active anymore once the sketch got started. If you want to simulate the sketch upload use just the bootloader as the program.