![]() | |||||||||||||||
Developing with μT-Engine/Nios IIWritten by: Han Yidong, Neil (Centre for High Performance Embedded Systems [CHiPES], NTU Singapore) Edited by: Mohit Sindhwani (TE@Onghu) The μT-Engine/Nios II from PMC has a 32-bit Altera NIOS-II soft-core processor running the T-Kernel. Since it is a soft-core processor, it is instantiated on an Altera Cyclone FPGA in the system. This FPGA can also be used to accelerate other modules in hardware. However, since this is a μT-Engine and the NIOS-II processor does not support a Memory Management Unit (MMU), the system does not come with the T-Kernel/Standard Extension (TK/SE) and therefore does not support a file system like the regular T-Engine does. Due to this reason, there are some differences when developing software/ systems with the μT-Engine/Nios II. This article highlights some of these differences and explains how to develop software for the μT-Engine/Nios II. Primarily, this article is targeted at people who have experience with developing programs for the T-Engine but want to know how to develop on theμT-Engine/Nios II platform. Although we used the μT-Engine/Nios II for this work, the ideas presented here should be generally applicable to any μT-Engine. The original documents and guidelines for developing with the μT-Engine/Nios II are in Japanese. Therefore, this article is based on my working experience with the platform and on loose translations of the Japanese documents.
Introduction to μT-Engine/Nios II PlatformThe μT-Engine/Nios II is produced by Altima. Since the T-Kernel stack has been ported to the Nios II, it is now possible to use the soft-core processor together with the T-Kernel. The Nios soft core is a general-purpose 32-bit RISC CPU component of Altera's Excalibur embedded processor solutions and enables engineers to integrate systems on a single programmable logic device (PLD). The Nios 2.0 soft core can potentially provide system integration and customization advantages that may not available in other processors. The combination of the Nios soft core and the T-Kernel simplifies design processes and improves time-to-market for designers building applications in the areas of low-volume consumer products, digital entertainment, networking and telecommunications, etc.
Original Images are from: http://altimanet.com/altima/products/tengine_board.htm
The specifications of the board (compliant with the μT-Engine specification) are as follows:
The board runs T-Kernel v1.A0.00 and the development environment is very similar to the SH7727 T-Engine platform. This platform, however, does not have MMU and file system, which make the developing procedure a little different. This article highlights these differences - by paying attention to these differences, it is quite easy to develop for this board.
Installing the GNU Development EnvironmentSince this step is essentially the same as setting up the environment for any other T-Engine, we shall skip this step in this article. You could refer to our article about setting up the environment under Linux or to the article on the TEADEC website that discusses how to set up the environment under Cygwin.
Platform Boot ProcedureThe procedure below is used to start up the system.
Compile, Link and DownloadCompiling and linking are carried out making use of common makerules (etc/makerules). The directory used for a "make" operation must be named either nios2 or nios2.*. If not, you will need to alter the makefile. Here, we take the T-Kernel-based program as an example to describe how to compile and load it. There is a T-Kernel based sample program in the directory: $BD/kappl/sample/ We use this program to discuss the method of compiling and executing a program on this board. Move to the corresponding directory to execute make.
User@Local:/usr/local/te/$ cd /usr/local/te/kappl/sample/nios2 User@Local:/usr/local/te/kappl/sample/nios2/$ make Makefile:251: Dependencies: No such file or directory touch Dependencies /usr/local/te/etc/makedeps -r Dependencies main.o /usr/local/te/tool/Linux-i686/nios2-unknown-tkernel/bin/gccnios2 -O2 -mno-hw-mul -mno-hw-div -ffreestanding -Wall -Wno-format -Wno-strict-aliasing -Wno-main -I/usr/local/te/ include -D_NIOS2_ -c ../src/main.c -o main.o /usr/local/te/tool/Linux-i686/nios2-unknown-tkernel/bin/gccnios2 -L/usr/local/te/lib/nios2 -mno-hw-mul -mno-hw-div -T /usr/local/te/lib/nios2/static-rom.lnk -Wl,-Ttext,0x00480000, -Tdata,0x01800000 main.o -lg -ltk -lg -lsvc -o sample /usr/local/te/tool/Linux-i686/nios2-unknown-tkernel/bin/nm -C -n sample > sample.map User@Local :/usr/local/te/kappl/sample/nios2/$
Next, start TeraTerm to transfer the program to the memory of the target machine. Make sure that DIP-SW1 is OFF before you turn on the power of the target machine. The programis supposed to be stored in ROM. Therefore, the file is transferred by using the FLLO command of the T-Monitor.
[IMS]% # ※ Move to T-Monitor. TM> FLLO ※ TeraTerm will display a dialog to let you select file you want to transfer. We select sample.mot. Loaded: 00480000 -> 004855EF Writing Flash ROM at 480000 [1 blks] ... wait TM> g ※ Return to IMS [IMS]% lodspg @0x00480000 ※ T-Kernel based program is executed by IMS command “lodspg @ address”。 hello (ac=1) av[0] = '@0x480000' SYSPRG @00480000 [0] [IMS]% unlspg @0x00480000 ※It ends the program which is started by lodspg, IMS command “unlspg @ address” is executed. hello (ac=-1)
There are a couple of points to note:
That’s all there is in this article. As we continue to work more with the μT-Engine/Nios II board, we will publish more information to this website - so, stay tuned. Access Counter: hits.
| |||||||||||||||
Page URL: | |||||||||||||||