I have converted the elf generated in linux using the cyelftool and pushed into the processor successfully. It works perfectly. I need the entire build process to work on linux. So that I can take the final hex file from Jenkins and push it to hardware.

Great to know that you got it working on Linux, here's something i found about the cyelftool usage:

The CyElfTool tool is used to patch *.elf files. This is critical as many/most 3rd party tools use the *.elf file for programming devices and thus it needs to have all important information contained in it.

The cyelftool inserts or updates the following sections of the post-link .elf file:

.cychecksum - All devices, contains the checksum of the flash portion of the application

.cyloadermeta - All devices. The tool will update the section with the bootloader checksum and size information for a bootloader project.

.cymeta - All devices. The checksum field will already have the silicon ID so that the cyelftool only needs to read the value, update it with the checksum, and write it back to the .elf file

.cyloadablemeta (.cyloadable1meta/.cyloadable2meta) - All devices. The linker flow will populate all but the Application Checksum, Application Entry Address, and Application Length in these sections. The tool will need to compute these missing items and insert them into the post-link .elf file.

Maybe those sections are not updated by objcopy and therefore the hex file produced by objcopy wasn't correct.

What tool are you using to flash the device? Seems like soon OpenOCD will have support for KitProg and all the PCoC families :)

I have created hex files with objcopy and uploaded with J-Link program and debug probe successfully. Lately I have heard report that miniprog3 is unable to understand this file. I went through the file manually and encountered no issues against the standard. CyElfTool.exe can be run with wine on Linux nicely. It creates hex file where data line contains 64 bytes instead of 16. I saw no other major difference. Few sections of memory had littlebit different content, it may be the checksums or something like that minor to the application program. You need also the libelf.dll. BUT it is reported that miniprog3 is not accepting this either.

Some more updates on this topic: read http://www.cypress.com/forum/psoc-creator-software/error-cyeeprom-data-will-not-fit-eeprom#comment-422506 about the needed changes into linker script to avoid unneccessary EEPROM section in elf and hex files. Also I had to use CyElfTool.exe from PSoCCreator v 3.3SP2 to successfully create hex file from gcc produced elf file. I had issue with v 4.1 elf tool. It complained that "Failed to generate output.hex: Flash address outside hex file range". What this might mean: only the creators of this tool would decipher.

Following from all that has been said, I've been fiddling with several tools, and I believe I got the same result as cyelftool.exe in linux, although my current project might not be as complex as some others, but sure it willgive the relevant tips for other people to apply this to more complex projects.

The hex file from cyelftool is just an intel hex format, but formatted to have 64 bytes in the data records, instead of the usual 16.

Also, cyelftool seems to fill the gaps and pad with zeroes all the way up to 0x8000 (this was for a PSoC 4).

Then it calculates a checksum for the normal sections and puts it in 0x90300000.

Then it outputs three special sections... May be they also get checksumed in more complex projects.

One thing I noticed, but that might be because I am using a newer ARM toochain in linux or another thing about cyelftool, is that the third dword in .cymeta is zero for me and something else after building it all with the PSoc Creator 4.2... something to look into to see where it comes from.