Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob

How to change ModusToolbox™ output file format to BIN or MOT - KBA236138

How to change ModusToolbox™ output file format to BIN or MOT - KBA236138

Infineon_Team
Employee
Employee
50 replies posted 25 likes received 25 replies posted

Community Translation: ModusToolbox™出力ファイル形式をBINまたはMOTに変更する方法 - KBA236138

Version: **

By default, ModusToolbox™ exports the programming file as Executable and Linkable Format (ELF).
While you can change the file format to binary (BIN) or Motorola S format (MOT) you should keep the following in mind:

  • You cannot program the BIN file into a microcontroller.
  • You can use the MOT file to program the MCU, but it includes debug info in the ELF file. Therefore, you should use the ELF file when debugging.
  • You cannot change a MOT file to an ELF file.

To change the file format to MOT file, add the following lines into the Makefile of the target device. Note that the highlighted part (srec) indicates the MOT file.

CY_RECIPE_POSTBUILD?=$(CY_COMPILER_PATH)/bin/arm-none-eabi-objcopy -O srec
$(CY_CONFIG_DIR)/$(APPNAME).$(CY_TOOLCHAIN_SUFFIX_TARGET)
$(CY_CONFIG_DIR)/$(APPNAME).$(CY_TOOLCHAIN_SUFFIX_PROGRAM)

 

0 Likes
333 Views