Skip to content

Instantly share code, notes, and snippets.

@en129
Last active August 29, 2015 14:24
Show Gist options
  • Save en129/a3b1f4dc5cd4c4d1c39e to your computer and use it in GitHub Desktop.
Save en129/a3b1f4dc5cd4c4d1c39e to your computer and use it in GitHub Desktop.
LPCXpresso内のobjcopyを利用してhex→bin変換
@echo off
REM ↓の1行を環境に合わせて変更してください
set LPCXPRESSO_DIR=C:\nxp\LPCXpresso_7.8.0_426\lpcxpresso
set TOOL_PATH=\tools\arm-none-eabi\bin\objcopy.exe -I binary -O ihex
set OBJCOPY_PATH=%LPCXPRESSO_DIR%%TOOL_PATH%
set OUTPUT_FILENAME=%~fn1.hex
REM example↓
REM "C:\nxp\LPCXpresso_7.8.0_426\lpcxpresso\tools\arm-none-eabi\bin\objcopy.exe" -I binary -O ihex "F:\UserLibrary\Desktop\mbed_blinky_LPC11U68.bin" "F:\UserLibrary\Desktop\mbed_blinky_LPC11U68.hex"
%OBJCOPY_PATH% %1 %OUTPUT_FILENAME%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment