Change extension for hex files to .hex instead of .ihex

Sysprogs forums Forums VisualGDB Change extension for hex files to .hex instead of .ihex

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #9907
    CurtisHx
    Participant

    Is there a way to configure VisualGDB to set the file extension for hex files to .hex instead of .ihex?  Some of our programming tool won’t bother trying to open a file if the extension is not .hex.  They’ll just throw up an error saying something along the lines of the file is not a valid hex file because the extension is not correct.

    #9910
    support
    Keymaster

    Hi,

    You can try patching the <VisualGDB>\MSBuild\embedded.targets file (see the ChangeExtension part below):

      <Target Name="GenerateHexFile" DependsOnTargets="Link" Condition="'$(GenerateHexFile)' == 'true' and '$(GNUTargetType)' == 'Application'">
        <GenericGNUTool Sources = "$(TargetPath)"
                ToolPath="$(GNUToolchainBinaryDirectory)"
                ToolchainPrefix="$(GNUToolchainPrefix)"
                ExtraPath="$(GNUToolchainExtraPath)"
                VisualGDBSettingsFile="$(VisualGDBSettingsFile)"
                ToolExeNameBase="objcopy"
                ResponseFileTag="mkihex"
                RepeatForEachSource="true"
                PrimaryOutput="$([System.IO.Path]::ChangeExtension($(TargetPath),'ihex'))"
                FastUpToDateCheckDatabaseFile="$(FastUpToDateCheckDatabaseFile)"
                RemoteBuildMakefile="$(RemoteBuildMakefile)"
                CommandFormat="-O ihex $&lt; $@"/>
      </Target>
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.