Altera_Forum
Honored Contributor
16 years agoUsing Nichestack (superloop mode) with custom board.
I'm looking for some help conceptually understanding what is required to convert a project that uses Nichestack with uC/OSII RTOS to a project that uses Nichestack in superloop mode.
Background: I have successully created a working version of the embedded web server demo that is modified to run on my custom board that uses minimal resources (EPCS Flash, SRAM only, no LCD). As required by Altera, I used the Nichestack with uC/OSII RTOS in the Nios IDE. Now we have a potential order from a customer for a small quantity job that will utilize a similar ethernet interface. Now I'm looking into the costs associated with designing this system: FPGA and peripherals = $100: No problem PCB = $100: No problem Nichestack + NIOSII bundle = $1000 (one time cost): No problem uC/OSII = $6,000 per end product license: Problem! Words cannot express how disappointed I am that Altera integrates and forces you to use uC/OSII if you intend on using the Nichestack in your design. This is especially troubling since it appears that Nichestack was designed to work without an RTOS. Anyway, sorry for the rant. I am also struggling with the fact that Altera is obsoleting the NIOS IDE in favor of the software build tools approach. So I am trying to learn the software build tools as well as trying to convert my web server demo to use the superloop approach. I am very aware of the superloop_simple_socket_server_plus example which is a nicely documented example for use with one on the evaluation boards. What I'm trying to figure out is what the difficulty level is of porting a stripped down version of this example to run on my custom board. It appears that, in the example, a bsp is built without using the uC/OSII and without automatically including the nichestack library. Instead two custom libraries are included in the software directory (superloop_iniche_lib and superloop_tse_lib). The create-this-app script located in the app folder links to these libraries and runs the create-this-lib script for each of the libraries. Now if I want to use the superloop mode in my custom board, is it a correct approach to do the following steps: 1.) Create design hardware design using SOPC builder. 2.) Create a new software design using the Software Build Tools. 3.) Copy the superloop_iniche_lib and superloop_tse_lib folders from the superlooop example and store them in my software project folder. 4.) Copy the linking commands from the create-this-app script that refer to these custom library folders. 5.) Add hardware timer interrupt as in the superloop example to replace the functionality of the Nichestack tick task. 6.) Remove hardware specific code that is not included on my custom boards (LCD screen, etc.). 7.) Compile and run the project. Thanks in advance for any help or insight that you can give me. Mike C.