How to convert .elf files to .Sxx or .Bin files

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How to convert .elf files to .Sxx or .Bin files

跳至解决方案
7,371 次查看
janhoogma
Contributor I

Hello,

 

I'm new with FreeScale but I managed to setup KDS and rebuild the 'hello_world' application for KL25Z.

Now I want to run it on a board.

But the target I created is in .elf format.

To be able to run it on the KL25Z I must convert it to BS.  (.Sxx or .bin)

According to information I found this can be achieved with the 'elftobs' converter.

But I cannot find this tool on NXP of any other site. I found github where it can be downloaded and build.

Can do that, but I like to use the original application first.

 

If someone knows where to find elftobs (or  elftobin) I like to hear.

Thanks,

 

Jan

标签 (1)
标记 (1)
1 解答
5,542 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi,

elftobs is included in NXP_Kinetis_Bootloader_2_0_0 package.

download link:

Kinetis Bootloader|NXP

folder: ..\Freescale\NXP_Kinetis_Bootloader_2_0_0\bin\Tools\elftosb

this tool is for generating "Secure Binary" file.  the "key file" is needed for using elftobs tool.

if you only need generate a project bin or srec file, KDS itself can do it well. elftobs is not needed. I just made a video of how the KDS generates bin and srec files. Hope this helps!


Have a great day,
Jennie Zhang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

在原帖中查看解决方案

5 回复数
5,542 次查看
janhoogma
Contributor I

Thanks, both of you.

The answer of Jennie Zhang best reflected my question and the video was very welcome either.

But from Erich I learned that there are other useful tools to explore.

Now I can make the next step.

Jan

0 项奖励
回复
5,542 次查看
BlackNight
NXP Employee
NXP Employee

Hi Jan,

KDS includes the 'objcopy' utility which can directly create s19, binary or intel hex files (see https://mcuoneclipse.com/2014/04/20/binary-files-for-the-mbed-bootloader-with-eclipse-and-gnu-arm-ec... ). For any other advanced binary file manipulation, I recommend the Srecord utility (see https://mcuoneclipse.com/2015/04/26/crc-checksum-generation-with-srecord-tools-for-gnu-and-eclipse/ ).

I hope this helps,

Erich

5,543 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi,

elftobs is included in NXP_Kinetis_Bootloader_2_0_0 package.

download link:

Kinetis Bootloader|NXP

folder: ..\Freescale\NXP_Kinetis_Bootloader_2_0_0\bin\Tools\elftosb

this tool is for generating "Secure Binary" file.  the "key file" is needed for using elftobs tool.

if you only need generate a project bin or srec file, KDS itself can do it well. elftobs is not needed. I just made a video of how the KDS generates bin and srec files. Hope this helps!


Have a great day,
Jennie Zhang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

5,542 次查看
dstraight
Contributor II

Nice video!  I have a newer version of KDS (ver. 3.2) - and I don't have a toolchain tab.   There's a toolchain editor - but I didn't know what do with it. 

I'd like to generate an sreg file for the MSD Flash Programmer on my FRDM-KE04Z board.    I'm not clear if KDS can still do this on its own or if I need to install something.   

kds_no_toolchain_button_tab.png

kds_tool_chain_editor.png

0 项奖励
回复
5,542 次查看
dstraight
Contributor II

Okay, KDS 3.2 has a toolchain tab.  I mistakenly had a file highlighted instead of the project name in the project tree highlighted - so when I right clicked and selected properties I got the dialog shown above in the screen capture.  Anyway, once I highlighted the project name at the top of the tree I was able to access the toolchain and adjust the settings as shown in the video.  Thanks! 

0 项奖励
回复