Jump to content
Sign in to follow this  
ryeg

Redirecting .hex File To Another Directory

Recommended Posts

There must be something I don't understand about batch file protocol.....

 

I would like to make the IDE write the .hex file to a different drive. Usually the files are written to the local directory as set up in the project. I thought that changing the drive designation in "customize workspace" would result in the .hex file showing up in the other directory -- but it doesn't

 

I have changed the customize workspace items from:

 

%name%.asm;%name%.lst;%name%.hex

to:

 

%name%.asm;%name%.lst;y:\%name%.hex

 

but the file doesn't show up in the Y directory but rather shows up the usual place.

 

 

What am I missing here?

 

Share this post


Link to post
Share on other sites

Changing options under "Customize workspace..." only changes what files appear under the output folder of your project in the IDE.

 

To redirect the output of the linker, go to Settings->Options... and under "Extra linker options" and this:

-d "F:\"

Replace "F:\" with your output directory, but you should probably keep the directory name in quotes.

 

This will put all the linker output into that directory (*.asm, *.casm, *.cof, *.hex, *.lst, *.stat, *.tree). *.obj file will remain where they are since that's a compiler option and not a linker option.

 

Another thing you can do if you want only the hex file and don't mind an extra step is to write a quick batch file:

if exist "OLDPATH\project.hex" move "OLDPATH\project.hex" "NEWPATH\project.hex"

 

Just run that after linking. Note that if you ever change the name of the project, you will have to edit the batch file as well.

 

- Bill

Share this post


Link to post
Share on other sites
...

Just run that after linking.

...

Create a file called postbuild.bat to do this and it will be invoked automatically after a build (see IDE users manual).

 

Regards

Dave

Share this post


Link to post
Share on other sites
...

Just run that after linking.

...

Create a file called postbuild.bat to do this and it will be invoked automatically after a build (see IDE users manual).

 

Regards

Dave

 

OH NO! Not the manual; anything but the manual !

Real Men don't read the manual -- they'd rather reinvent the wheel....

Thanks so much for your help. I figured that there was something like that built into the IDE.

 

I have found a better solution (perhaps) to my problem. I have two computers; one at my programming desk and the other at my hardware bench. They are connected by wireless. I run the IDE on both machines, but they are "pointed" at the same working directory on the hardware machine. I can program from either system and the other machine just notifies me that the file has been updated when I move. It works pretty well so far. Sometimes microsoft comes thru....

 

Best wishes for the new year

Ryeg

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...