Hello all,
There's not much to describe about my experience. The Nios II IDE 6.0 (and 5.0, 5.1 for that matter) were leaving me longing for more. Constant lock ups, no help from MySupport, the indexer (need I say more with this one?), and the newest problem occurred with version 6.0. Tabbing (left or right) or commenting (Ctrl+/) a large block of text would mash the blocked lines into the left side of the window by about 4 or 5 (sometimes more) tab stops. Needless to say, I had enough with the IDE.
MySupport couldn't recreate the block tabbing/commenting issue (I couldn't reliably do it either though) so I asked them to provide me with the commands necessary to circumvent the IDE. The person I was talking to said to look at the HTML files included in the installation. They were no help. After my second post in this thread I did manage to figure out what the commands were and I've created a script file to help out. I am no scripting genius so it may look kind of raw for the more experienced people out there.
#! /bin/sh
BUILD_PATH="path/to/build/folder"
ELF_NAME=".elf"
SOF_PATH="path/to/sof/file"
SOF_NAME=".sof"
case "$1" in
sof)
nios2-configure-sof $SOF_PATH/$SOF_NAME
;;
clean)
make -C $BUILD_PATH clean
;;
build)
make -C $BUILD_PATH -s all
if ; then
echo " "
echo "Build complete"
echo " "
fi
;;
run)
nios2-download $BUILD_PATH/$ELF_NAME -g
;;
br)
echo "----------------------------------------------"
echo "Building..."
echo " "
make -C $BUILD_PATH -s all
if ; then
echo " "
echo "----------------------------------------------"
echo "Downloading..."
echo " "
nios2-download $BUILD_PATH/$ELF_NAME -g
fi
;;
brt)
echo "----------------------------------------------"
echo "Building..."
echo " "
make -C $BUILD_PATH -s all
if ; then
echo " "
echo "----------------------------------------------"
echo "Downloading..."
echo " "
nios2-download $BUILD_PATH/$ELF_NAME -g
if ; then
echo " "
echo "----------------------------------------------"
echo "Starting terminal..."
echo " "
nios2-terminal
echo " "
fi
fi
;;
*)
echo ""
echo "Usage: $0 sof|clean|build|run|br|brt"
echo ""
echo " sof Configure the target"
echo " clean Clear all object and executable files from the build"
echo " build Build the project"
echo " run Program the target and run"
echo " br Build the project, program the target and run"
echo " brt Build the project, program the target and run, open the terminal"
echo ""
;;
esac
My usage of the file consists of putting it in the project folder (not the workspace folder) and I have the BASH init script dump me into the folder which contains the above script. Technically it shouldn't matter where the script is located as long as the variables at the top of the script are set properly.
There are a few caveats that I've found with working with the command line and they're not pretty:
1) A project still has to be started in the IDE although I've seen commands that get around this. The script I have above does not do this.
2) Step debugging doesn't work (yet). I still have to use the IDE for this. I'm sure there are programs out there which play nicely with GDB but I haven't gone looking yet.
3) New files won't be included in a build--they have to be opened in the IDE to be registered. This one was a pain in the butt when I first came across it. What I do now is open the IDE and create the file where I need it using the IDE's build-in commands. I've seen a command that gets around this but I haven't looked into it yet since my project is nearing completion and I rarely need a new file to be created.
4) There is an occasional time where doing a clean and build doesn't work. For some reason the compiler doesn't recreate the necessary items after they were cleaned. I've only had this happen twice though. The solution is to open the IDE and have it build the project again. Sometimes it'll error out saying a folder is missing but if you keep hitting build it will go.
Overall I've been much happier using my preferred IDE. Compile times are noticeably quicker without having to wait for the indexer. Fixing compile issues aren't as simple as double clicking on the item in the Problems pane and editing the line but you still see the problem file and line number. If your IDE shows line numbers then it's pretty easy to find the problem.
My IDE allows for the outputted console text to be displayed in a pane so this is my next venture. My earlier attempts have failed but that's probably in part to my lack of knowledge of Cygwin.
Hopefully Altera will clean up their software and not force the level of IDE integration that they have now. If they cleaned up some of the bugs I brought up with them with version 5.1 that they said they were fixing with 6.0 then I would still be using the IDE.
Let me know if there is anything I missed or if there are some things I can add. If anyone reading this knows how to get Cygwin to run a command and use the provided environment variables from a Windows command line, please add it to the thread. I do plan on looking further into this later though and will post my results when I figure it all out.
Regards,
Philip