Hi VisualGDB, I am working on STM32 TouchGFX project, the graphic project output file will be divided into .elf file, which is major C/C++ code, which will be saved on onchip Flash, and there also generate a .bin file, which contain picture and other font file, then will be flashed into qspi.
Here is their Makefile.
<div>
<div> @mkdir -p $(@D)</div>
<div> @$(linker) \</div>
<div> $(linker_options) -T $(makefile_path_relative)/application.ld -Wl,-Map=$(@D)/application.map $(linker_options_local) \</div>
<div> $(patsubst %,-L%,$(library_include_paths)) \</div>
<div> @$(build_root_path)/objects.tmp -o $@ \</div>
<div> -Wl,–start-group $(patsubst %,-l%,$(libraries)) -Wl,–end-group</div>
<div> @rm -f $(build_root_path)/objects.tmp</div>
<div> @echo “Producing additional output formats…”</div>
<div> @echo ” target.hex – Combined internal+external hex”</div>
<div> @$(objcopy) -O ihex $@ $(@D)/target.hex</div>
<div> @echo ” intflash.elf – Internal flash, elf debug”</div>
<div> @$(objcopy) –remove-section=ExtFlashSection $@ $(@D)/intflash.elf 2>/dev/null</div>
<div> @echo ” intflash.hex – Internal flash, hex”</div>
<div> @$(objcopy) -O ihex –remove-section=ExtFlashSection $@ $(@D)/intflash.hex</div>
<div> @echo ” extflash.bin – External flash, binary”</div>
<div> @$(objcopy) -O binary –only-section=ExtFlashSection $@ $(@D)/extflash.bin</div>
</div>
<div></div>
<div>How to set this under VisualGDB?</div>
<div></div>
<div>The visual GDB only contain</div>
<div>PRIMARY_OUTPUTS :=
ifeq ($(GENERATE_BIN_FILE),1)
PRIMARY_OUTPUTS += $(BINARYDIR)/$(basename $(TARGETNAME)).bin
endif
ifeq ($(GENERATE_IHEX_FILE),1)
PRIMARY_OUTPUTS += $(BINARYDIR)/$(basename $(TARGETNAME)).ihex
endif
ifeq ($(PRIMARY_OUTPUTS),)
PRIMARY_OUTPUTS := $(BINARYDIR)/$(TARGETNAME)
endif</div>
<div></div>
<div>This all the same but different format, who could set set something like @$(objcopy) -O binary –only-section=ExtFlashSection $@ $(@D)/extflash.bin ??</div>