- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It depends on which compiler you are using.
If you are using GCC you need to replace line 450
$(ELF_TOOL) -O srec $(MODEL).elf $(MODEL).mot
with
$(ELF_TOOL) -O binary $(MODEL).elf $(MODEL).bin
For GCC you have the following options:
srec Save as Motorola S-records
$(ELF_TOOL) -O srec $(MODEL).elf $(MODEL).s19
binary Save as raw binary
$(ELF_TOOL) -O binary $(MODEL).elf $(MODEL).bin
ihex Save as Intel hex
$(ELF_TOOL) -O ihex $(MODEL).elf $(MODEL).hex
If you are using IAR you replace line 453
$(ELF_TOOL) $(MODEL).elf $(MODEL).mot --srec --silent
with
$(ELF_TOOL) $(MODEL).elf $(MODEL).bin --bin --silent
For IAR you have the following options:
--srec Save as Motorola S-records
$(ELF_TOOL) $(MODEL).elf $(MODEL).s19 --srec --silent
--ihex Save as Intel hex
$(ELF_TOOL) $(MODEL).elf $(MODEL).hex --ihex --silent
--bin Save as raw binary
$(ELF_TOOL) $(MODEL).elf $(MODEL).bin --bin --silent
ATTENTION: Lines 450 and 453 should start with a tab.
I see that you are using the old version of toolbox, MCToolbox for S32K, you can get for free the new version, MBDToolbox for S32K from NXP Motor Control Toolbox

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
powerpc-eabivle-objcopy
If you want to automate it put it in the _make_rtw_hook.m callback.
See also:
Converting S19 Files into Binary Files with GNU objcopy | MCU on Eclipse
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
用MBD工具箱生成的elf文件,然后下载到板子上。现在我想知道怎么设置,能够生成bin/hex/s19文件~~~


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
The easiest way to achieve your goal is to modify the default settings in the mbd_s32k14.tmf file within c:\MBDToolbox\mbdtbx_S32K\mbdtbx_s32k14\mbdtbx_s32k14\ folder
This file is responsible for generation the makefile used to build the model.
Inside the file, there is already a default example about how to generate a SREC from the elf. Therefore is a simple as changing the extension and the type of file you want to obtain: bin/hex/s19 etc since the toolchain is defined already.
Step1: search for any occurrences of ".mot" keyword
Step2. replace with the ".extension_you_want_to_obtain"
Step3: find the invocation of ELF_TOOL
Should look like this:
$(MODEL).mot: $(MODEL).elf
@echo Generating S-record...
ifeq ($(TARGET_COMPILER), GCC)
$(ELF_TOOL) -O srec $(MODEL).elf $(MODEL).mot
endif
ifeq ($(TARGET_COMPILER), IAR)
$(ELF_TOOL) $(MODEL).elf $(MODEL).mot --srec --silent
endif
ifeq ($(TARGET_COMPILER), GreenHills Multi)
$(GSREC_TOOL) -auto -o $(MODEL).mot $(MODEL).elf
endif
@echo Created S-record: $(MODEL).mot
And replace it with something like this:
$(ELF_TOOL) -O binary $(MODEL).elf $(MODEL).bin
Hope it helps!
Daniel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
只需要改如图的两行是把。只需要改后缀?中间的srec需要改吗?如果我想改成S19文件,应该怎么改?


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
We're making efforts to understand Chinese as much as we can with Google Translate but sometimes that fails. In this case using the translate function i can't understand what are you asking.
Can you please rephrase in English.
Thank you!
Daniel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
sorry,my English is very bad.Can you help me to creat .s19 file in IAR .thank you very much.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It depends on which compiler you are using.
If you are using GCC you need to replace line 450
$(ELF_TOOL) -O srec $(MODEL).elf $(MODEL).mot
with
$(ELF_TOOL) -O binary $(MODEL).elf $(MODEL).bin
For GCC you have the following options:
srec Save as Motorola S-records
$(ELF_TOOL) -O srec $(MODEL).elf $(MODEL).s19
binary Save as raw binary
$(ELF_TOOL) -O binary $(MODEL).elf $(MODEL).bin
ihex Save as Intel hex
$(ELF_TOOL) -O ihex $(MODEL).elf $(MODEL).hex
If you are using IAR you replace line 453
$(ELF_TOOL) $(MODEL).elf $(MODEL).mot --srec --silent
with
$(ELF_TOOL) $(MODEL).elf $(MODEL).bin --bin --silent
For IAR you have the following options:
--srec Save as Motorola S-records
$(ELF_TOOL) $(MODEL).elf $(MODEL).s19 --srec --silent
--ihex Save as Intel hex
$(ELF_TOOL) $(MODEL).elf $(MODEL).hex --ihex --silent
--bin Save as raw binary
$(ELF_TOOL) $(MODEL).elf $(MODEL).bin --bin --silent
ATTENTION: Lines 450 and 453 should start with a tab.
I see that you are using the old version of toolbox, MCToolbox for S32K, you can get for free the new version, MBDToolbox for S32K from NXP Motor Control Toolbox
