I am a beginner in working with Eclipse.
Can someone tell me how can I generate an elf file or .img file in sdk
You can find the elf2img utility and the instructions at "..\EZ-USB FX3 SDK\1.2\util\elf2img" after installing FX3 SDK. elf2img utility will convert the ELF binary of the FX3 firmware into the boot image format that is used by the FX3 boot-loader.
The required arguements and paths are already stored in eclipse. You do not have to convert the elf to image separately.
When you 'build' a firmware in Eclipse, the eclipse itself creates an image file, which you can find inside Debug/Release folder created inside firmware folder.
As NIKL mentioned the paths are included in Eclipse itself, that comes with FX3 SDK. elf is binary output from Eclipse, and the eclipse in turn invokes elf2img utility to convert the same into img format, which will be recognized by FX3 bootloader.