Topic : RIDE6: how to rename a .hex file?

Forum : Ride IDE

Original Post
Post Information Post
February 27, 2008 - 10:51pm
Guest

By default, RIDE6 produes a hex file with the same name as the project. How do you have the toolchain make a hex named differently?

I went into Options -> Tools -> -> Edit and tried changing the default selections for 'translate from' and 'translate to' (*.aof -> *.hex). There was no effect.

One other thing, the 'from' and 'to' edit boxes don't accept underscores. It's a minor point, but in projects I often use underscores to separate words in a filename. That because command line driven tools often have trouble with spaces.

regards Steven Pruzina

Replies
Post Information Post
+1
0
-1
February 28, 2008 - 10:17am
Raisonance Support Team

Hi,

The name of the hex file is the same as the name of the application, with extension 'aof' replaced by 'hex'. (See the RIDE documentation to know the difference between "project" and "application".) There is no "clean" way to change that.

The tool options you refer to are used for defining extensions, not specific file names. This is why it does not do what you expected and this is why we don't allow underscores there.

By the way, I wouldn't expect a project with a space in the name to work at all. Using underscores is a good idea.

For changing this file's name without using an external application, (which is what I would do) here are the three options I see: (simplest first)

1. Change the application's file name. (and eventually the project name too)

2. Create a RIDE script that launches the Make of the project and then copies the hex file. Use the script whenever you want to make the project. (eventually, write a second script for Build)

3. Create a tool for renaming the file, and register it in the project to be executed after each link.

Best Regards,

Vincent

+1
0
-1
February 29, 2008 - 7:34pm
Guest

Hello

Well, I'm trying to create a tool to rename the fle. Here's what runs from the command line:
c:\windows\system32\cmd.exe /c C:\SPJ1\SPO2MkII\Swr2\Tgt\rename_to_spo2tech.bat

When I enter this into the 'path' filed in the new tool dialog, and subsequently call that tool using Tool->RunTool, the 'Run Arguments' prompt appears with:

"c:\windows\system32\cmd.exe /c C:\SPJ1\SPO2MkII\Swr2\Tgt\rename_to_spo2tech.bat" c:\spj1\spo2mkii\swr2\firm\bldcfg.h

I wanted just
c:\windows\system32\cmd.exe /c C:\SPJ1\SPO2MkII\Swr2\Tgt\rename_to_spo2tech.bat

without the filename as an argument. How do I get that.

+1
0
-1
March 3, 2008 - 9:54am
Raisonance Support Team

Hi,

In the tools options, click "advanced", and you will see the "arguments" field. Remove the "[NODE]" and then the tool will be called without argument.

Note that you probably don't need the "cmd /c". I think RIDE adds it too.

Best Regards,

Vincent

+1
0
-1
March 3, 2008 - 3:25pm
Guest

Hello Vincent

OK. I removed [NODE] and the tool runs when called from Menus ->Tool -> Run Tool. Now, how do I register it to run after automatically after linking? I tried setting the 'Translate From' to '*.hex' in the Tool Option dialog. That didn't do it. Should I check the 'linker' option in that box? Or should I add an application to the project pane?

regards Steven

+1
0
-1
March 4, 2008 - 10:25am
Raisonance Support Team

Hi,

You just need to select the application, right-click on it and click "node properties".

Then, you will see the "Post Link" / "Run automatically after linking" option. Check the checkbox and select your tool in the list.

Best Regards,

Vincent

+1
0
-1
March 5, 2008 - 4:22am
Guest

Hi Vincent

I checked 'Post Link'. RIDE doesn't like that at all; it quits when the command is run, either after a link or standalone Tools -> Run Tool. Is this because the command renames a .hex file to another .hex file, leading to a loop?

regards Steven

+1
0
-1
March 6, 2008 - 5:40pm
Guest

I just tried, and it works.
For the tool, I defined a batch named copy_hex.bat. It contains a single line:
copy %1.hex %1.myhex

For the tool, I defined a tool named CopyHex:
1. I used the Browse command to select my batch file above (copy_hex.bat)
2. I specified '.aof' as 'From' extension (nothing for 'To' extension)
3. I didn't check neither 'register for..' nor 'linker'
4. In advanced, I defined in 'Arguments': {NODE1}

In the Project windows, select the application (.aof) then with the right click (popup menu), select 'node properties'
In 'PostLink" select the CopyHex tool.

When I launch a link, I get the 'promt' window, the everything is executed as expected.

Francis

+1
0
-1
March 6, 2008 - 7:54pm
Guest

Thanks. Works now. I hadn't named the tool for post-link in 'Node Properties'