- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It can be tedious to invoke a "Nios II Command Shell" in a specific folder having a long path, because if you invoke it from the start menu "start->altera->nios ii eds->nios ii command shell", the current path (PWD) will be in the NIOS examples folder and you may have a long cd: path to do to get to your projects folder.
But, if you add a few keys to the registry, you can invoke it from any folder by right-click'ing the folder in explorer: Copy the script code section below into a file with any name but its extension must be .reg and run it. It assumes that your installtion is the Altera default. If not, simply update the path to the "Nios II Command Shell.bat" in the code. Remember \ has to be escaped to \\. You'l have to have administrator priviliges and acknowledge the warning that the registry is about to be edited.
Windows Registry Editor Version 5.00
@="NIOS II command shell here"
@="\"C:\\Altera\\91\\nios2eds\\Nios II Command Shell.bat\" \"%l\""
Now you just right-click in your development folder and select the nios command shell here and the command window appears with the path set correctly to your project, ready to go. For some reason it only works as expected in Win7 if you select the folder in the right pane of explorer. In WinXP it works in both panes. To remove the function you can manually delete the keys listed in the script using regedit, or crate a .reg file with the lines:
Windows Registry Editor Version 5.00
and run it. When you some day update to another version of Quartus/NIOS, you will have to manually edit the path to the new installation either directly using regedit or by updating the script with the new path and running it again. No need to delete the old key value - it will be overwritten. I have posted this before, but been unable to find it again in the forum, but I thought it may still be of use. At least I needed it after changing computer recently. Enjoy.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For some reason the key and .reg script to invoking nios command shell no longer works on my Win7/64 machine. Chances are you would see the same problem so here is my fix:
to restore proper function remove the %1 parameter so the .reg script for creating now reads:Windows Registry Editor Version 5.00
@="NIOS II command shell here"
@="\"C:\\Altera\\10.1\\nios2eds\\Nios II Command Shell.bat\""
Assuming you use a default Nios2 path. If not just correct as needed. The remove script from above still works. All the \ and " are important! As before, it only works as expected in Win7 if invoked with right-click on a selected folder in the right pane of explorer. Enjoy.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This registry trick to enable invocation of the "Nios II command shell" seems to only work in Win7 explorer if invoked on a folder in the right file pane! Then the command prompt is started in the folder containg the folder you right-click on. I.e. the right pane's folder. If invoked in the left pane, it always has windows\system32 as current directory - not useful at all.
Wish someone could explain how all this right-click stuff really works. Anyway, here is a small update of the registry script, adding discriptive information on how to use it at click-time and the latest Quartus path - which will change on next release of quartus and you will find you have to update once again.Windows Registry Editor Version 5.00
@="NIOS II command shell here (Use in right pane only)"
@="\"C:\\Altera\\12.1\\nios2eds\\Nios II Command Shell.bat\""
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- This registry trick to enable invocation of the "Nios II command shell" seems to only work in Win7 explorer if invoked on a folder in the right file pane! Then the command prompt is started in the folder containg the folder you right-click on. I.e. the right pane's folder. If invoked in the left pane, it always has windows\system32 as current directory - not useful at all. Wish someone could explain how all this right-click stuff really works. Anyway, here is a small update of the registry script, adding discriptive information on how to use it at click-time and the latest Quartus path - which will change on next release of quartus and you will find you have to update once again.
Windows Registry Editor Version 5.00
@="NIOS II command shell here (Use in right pane only)"
@="\"C:\\Altera\\12.1\\nios2eds\\Nios II Command Shell.bat\""
--- Quote End --- Hello, Nice work and useful. In order not to change the path every time a Quartus version comes out you can use the environment variable: SOPC_KIT_NIOS2 So try this: Windows Registry Editor Version 5.00
@="NIOS II command shell here (Use in right pane only)"
@=hex(2):22,00,25,00,53,00,4f,00,50,00,43,00,5f,00,4b,00,49,00,54,00,
5f,00,4e,00,49,00,4f,00,53,00,32,00,25,00,5c,00,4e,00,69,00,6f,00,73,00,20,
00,49,00,49,00,20,00,43,00,6f,00,6d,00,6d,00,61,00,6e,00,64,00,20,00,53,00,
68,00,65,00,6c,00,6c,00,2e,00,62,00,61,00,74,00,22,00,00,00
It is the same as above, but uses an REG_EXPAND_SZ registry entry so it will know how to expand %SOPC_KIT_NIOS2% environment variable. There is no nicer way I know to write. Sorry.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page