I now use "arm-elf-objcopy -O binary bin\Release\test.elf bin\Release\test.bin" and I try "arm-elf-objcopy -O binary bin\$target\test.elf bin\$target\test.bin" but failed. or there is no way to use a macro just defined in both debug and release? thanks
$(TARGET_NAME) (http://wiki.codeblocks.org/index.php?title=Variable_expansion#Build_targets) (or instead, use the target output directory).