cdk4nios
CDK4NIOS -- NIOS Cross Development Kit

CDK4NIOS stands for Cross Development Kit for Alteras soft core processor NIOS and should you support with a comprehensive Assembler and C/C++ development environment for even this processor familie under Linux. It will present only free of fee tools, so you can use it without risks. Further you will find some useful OS projects and related sample code all arround NIOS inside of the example packages.

CDK4NIOS collects all programms and development tools in one directory (/opt/cdk4nios) and will try to present an easy to admin installation. My intention for CDK4NIOS is / was to provide a full featurd tool chain distribution of all the free accessible resources, because often the most stuff is hidden or scattered to the wide of the whole Internet and only compilable and translatable by wizards or professions.

Basically CDK4NIOS is based on the GNUPro Tool Suite for NIOS maintained by Altera only. You can find a download instruction here (outdated, download latest release 3.2 here). Til now Altera has have support only Win32 systems, HP-UX, and Solaris as developer plattform. So, CDK4NIOS tried out to close this gap. In the near future CDK4NIOS could be become redundant, because Altera planes support for Linux development systems with its latest NIOS release version 3.1 (date: 2003/10/31). Even this was the intension of CDK4NIOS.




OTHER CDKs





NOTES & WARNINGS


The most packages are untested. Some few packages will be unstable or developer snapshot code. So I'm looking for (beta) test users. Please tell me your experience with CDK4NIOS. Further I try to be up to date with all the package versions, but CDK4NIOS is a leisure-time project and so I think my update cycle will be 5 or 7 months, sorry :-(

The base package cdk-nios-base will work only at Red Hat based distributions (Red Hat, Mandrake, and I believe SuSe). For other distributions you have to ensure the linked scripts cdk4nios.sh and cdk4nios.csh in /etc/profile.d are involved in your user environment build process at login time.

VERSION SCRAMBLE MADE BY ALTERA

Til now Altera has made two major and some minor releases of its NIOS GNUPro. Each release has got its own "major.minor" version number. This version number is absolutely independent of binary versions (assembler, C/C++ compiler, libraries, and debugger). For a better overview related to Altera's work CDK4NIOS uses the GNUPro version number as main counter. The list below should you give a more extensive overview of binary versions related to GNUPro version number:

NIOS GNUPro 3.1 (latest)


NIOS GNUPro 3.01


NIOS GNUPro 2.2





PROJECT LINKS





INSTALL


Each package will be provided as RPM only. It is not necessary to install all packages,but you have to install the base package cdk-nios-base every time you want to use another package. Here is an example for a typical GNU development environment:

        [user@host]$ rpm -hiv cdk-nios-base-0.3-20031111.i386.rpm

        [user@host]$ rpm -hiv cdk-nios-binutils-3.1-20031023.i386.rpm
        [user@host]$ rpm -hiv cdk-nios-gcc-3.1-20031023.i386.rpm
        [user@host]$ rpm -hiv cdk-nios-gcc-c++-3.1-20031023.i386.rpm
        [user@host]$ rpm -hiv cdk-nios-libgloss-3.1-20031023.noarch.rpm
        [user@host]$ rpm -hiv cdk-nios-newlib-3.1-20031023.noarch.rpm
        [user@host]$ rpm -hiv cdk-nios-libstdc++-3.1-20031023.noarch.rpm
        [user@host]$ rpm -hiv cdk-nios-gdb-3.1-20031023.i386.rpm

Note: Under Linux you don't need to install the package cdk-nios-related-tools. It includes development tools which in most of all case are already installed on a running Linux host system. This package is part of CDK4NIOS to present NIOS GNUPro Tool Suite completely.

Currently you will found all released files at SourceForge.Net

SourceForge.Net Logo

Securety: Each package will be signed by my own PGP key. You can donload my public key (GnuPG: pgp.asc) install it and check the RPM packages. Do this:

        [user@host]$ gpg --import pgp.asc
        [user@host]$ rpm --checksig *.rpm




RELATED LINKS





PACKAGES


0. Base System (you need it):
  0.1 cdk-nios-base Base package -- is needed every time you will use any CDK4NIOS package.

NOTE: Users of base packages with version 0.2 and prior have to update to latest version. There was a damaged (t)csh startup script. As a result of an buggy %preun script in previous packages you have to update in two cycles:
        [user@host]$ rpm -hUv cdk-nios-base-0.3-20031111.i386.rpm
        [user@host]$ rpm -hUv --force cdk-nios-base-0.3-20031111.i386.rpm
      


1. Assembler, Disassembler, Object File Operator:
  1.1 cdk-nios-binutils Binutils is a collection of binary utilities, including:
  • nios-elf-ar: creating modifying and extracting from archives
  • nios-elf-as: a family of GNU assemblers
  • nios-elf-ld: the GNU linker
  • nios-elf-nm: for listing symbols from object files
  • nios-elf-objcopy: for copying and translating object files
  • nios-elf-objdump: for displaying information from object files
  • nios-elf-ranlib: for generating an index for the contents of an archive
  • nios-elf-size: for listing the section sizes of an object or archive file
  • nios-elf-strings: for listing printable strings from files
  • nios-elf-strip: for discarding symbols
  • nios-elf-addr2line: for converting addresses to file and line
  • nios-elf-readelf: for displaying information about ELF files
Supported processor variants:
  • Nios-16 processor (16-bit)
  • Nios-32 processor (32-bit)
  • Nios-flat in all other variants
Install binutils if you need to perform any of these types of actions on NIOS assembler source files or binary files. Most programmers will want to install binutils.

2. Compiler, Interpreter:
  2.1 cdk-nios-gcc A compiler aimed at integrating all the optimizations and features necessary for a high-performance and stable NIOS development environment. You'll need this package in order to compile C/C++ code. It includes:
  • nios-elf-gcc: GNU project C compiler
  • nios-elf-g++: GNU project C++ compiler
  • nios-elf-cpp: GNU C compatible compiler preprocessor
Supported processor variants:
  • see package cdk-nios-binutils
Install gcc if you need to perform any of these types of actions on NIOS C/C++ source files. Most programmers will want to install gcc.

3. Debugger, Simulator, Emulator:
  3.1 cdk-nios-gdb GDB, the GNU debugger, allows you to debug programs written in C, C++, and other languages, by executing them in a controlled fashion and printing their data. In the case of NIOS processores you can use a integrated simulator to run programs. This collection includes:
  • nios-elf-gdb: GNU debugger for NIOS microcontrollers
  • nios-elf-run: simulator for NIOS microcontrollers
Supported targets:
  • simulator
  • remote gdb server
Install gdb if you need to perform any of these types of actions on NIOS binary files. Most programmers will want to install gdb.

4. Libraries, Operating Systems:
  4.1 cdk-nios-libgloss This is `libgloss', the library for GNU Low-level OS Support, contains the startup code, the I/O support for gcc and newlib (the C library), and the target board support packages which you need to port the GNU tools for an embedded execution target. You need to install NIOS libgloss to use NIOS newlib port.

  4.2 cdk-nios-newlib This is `newlib', a simple ANSI C library, math library, and collection of board support packages. You need to install NIOS newlib port to work with C source files or to use NIOS libstdc++ port.

  4.3 cdk-nios-libstdc++ This is the standard C++ library supported by GNU CC. You need to install NIOS libstdc++ port to work with C++ source files.

  4.4 cdk-nios-uclibc This is `uClibc', the microcontroller C library as an alternative to the common used GNU Lib C. The uClibc will be used together with uCLinux. Till now the uClibc-toolchain is completely untested so there is no way to install/use the uClibc library together with the other ones above (newlib & Co.).

Note: This library is in BETA stage for Nios (especialy CDK4NIOS). So there may be left some board/target specific dependencies. This binary package was only tested successful on Alteras Nios Development Kit DK1S10 Stratix Edition. If you want to rebuild the library in a special way with your own configuration you can install the package cdk-nios-uclibc-source and use the content of the source path /opt/cdk4nios/src/uClibc. To do this you need a full configured uCLinux source tree (see cdk-nios-os-uclinux-source below).

Quick Start: To rebuild the uClibc together with your own linux kernel - in this example with the kernel rebuild for DK1S10 (see below) - do this (you need the toolchain without standard libraries):
  1. > mkdir ~/uclibc
  2. > cp -a /opt/cdk4nios/src/uClibc/* ~/uclibc/
  3. > cd ~/uclibc
  4. > ln -s ./extra/Configs/Config.cdk4nios.uclinux Config
  5. > make distclean
  6. > make KERNEL_SOURCE=~/linux


Coming soon: ... collection of usable and workable userland applications ...
For more informartion see: http://www.uclibc.org

  4.5 cdk-nios-os-uclinux This is `uClinux', the microcontroller Linux kernel for MMU less CPUs as an special port to Alteras Nios Soft CPU. The Linux kernel is already ported to:
  • Altera DK20K200 -- "APEX Edition" and Microtronix LDK 2.0 CPU configuration
  • Altera DK1C20 -- "Cyclone Edition" and Microtronix LDK 2.0 CPU configuration
  • Altera DK1S10 -- "Stratix Edition" and Microtronix LDK 2.0 CPU configuration
  • Altera DK1S40 -- "Stratix Edition Pro" and Microtronix LDK 2.0 CPU configuration
  • Microtronix "Cyclone Kit" and Microtronix LDK 2.0 CPU configuration
  • Microtronix "Stratix Kit" and Microtronix LDK 2.0 CPU configuration


Note: The uCLinux kernel is in BETA stage for Nios (especialy CDK4NIOS). This binary package was only tested successful on Alteras Nios Development Kit DK1S10 Stratix Edition. If you want to rebuild the kernel in a special way with your own configuration/changes you can install the package cdk-nios-os-uclinux-source and use the content of the source path /opt/cdk4nios/src/linux.

Quick Start: To rebuild the uCLinux kernel for DK1S10 do this (you need the toolchain without standard libraries):
  1. > mkdir ~/linux
  2. > cp -a /opt/cdk4nios/src/linux/* ~/linux/
  3. > cd ~/linux
  4. > make distclean
  5. > bzip2 -cd /opt/cdk4nios/src/uClinux-2.4.17-dk1s10_mldk20.tar.bz2 | tar xvf -
  6. > make oldconfig dep
  7. > make
  8. > make linux bin         (to get a raw binary image)
  9. > make linux.srec        (to get a raw SREC image)
  10. > make linux flash       (to get a GERMS flash image)

For more informartion see: http://www.uclinux.org

5. In System Programming (ISP):
  5.1 cdk-nios-jtag P L A N N E D

JTAG Tools is a software package which enables working with JTAG-aware (IEEE 1149.1) hardware devices (parts) and boards through JTAG adapter. This package has open and modular architecture with ability to writing miscellanous extensions (like board testers, flash memory programmers, and so on). Warning: This software may damage your hardware!

Supported JTAG adapters/cables:
  • ARCOM Arcom JTAG Cable
  • ByteBlaster Altera ByteBlaster, ByteBlaster II, ByteBlasterMV Parallel Port Cable
  • DLC5 Xilinx DLC5 JTAG Parallel Cable III
  • EA253 ETC EA253 JTAG Cable
  • EI012 ETC EI012 JTAG Cable
  • KeithKoep Keith & Koep JTAG cable
  • MPCBDM Mpcbdm JTAG cable
  • WIGGLER Macraigor Wiggler JTAG Cable

For more informartion see: http://openwince.sourceforge.net/jtag/

6. Misc:
  6.1 cdk-nios-related-tools This is a collection of some GNU development tools and utilities, which in normal case already installed on running Linux systems. It inludes:
  • bison
  • yacc
  • flex
  • make
  • diffutils
  • patch
  • texinfo
There is no reason to install this package on Linux. Each Linux host system presents its own GNU development tools and utilities.

  6.2 cdk-nios-tools P L A N N E D (licence unclarity)

This is a collection of all needed tools and utilities to complet Altera's NIOS SDK collection. It includes:
  • nios-build
  • nios-convert
  • nios-run
  • srec2dat
  • srec2flash
  • srec2mif
  • excalibur.ld
  • most important perl modules
  • most important setup shell scripts
Install this package if you need to perform any of these types of actions on any part of your NIOS development flow. I can't say who will want to install this package.


  6.3 cdk-nios-doc-general
cdk-nios-doc-gnupro
cdk-nios-doc-sdk
cdk-nios-doc-hdk
cdk-nios-doc-apex
cdk-nios-doc-stratix
cdk-nios-doc-cyclone
cdk-nios-doc-technotes
P L A N N E D (licence unclarity)

This is a collection of all important documentations made and distributed by Altera. I can't say who will want to install this package.

  6.4 cdk-nios-uclinux-tools This is a collection of some GNU development tools and utilities, which you will need to (re-)build a complete uCLinux distribution. It inludes:
  • nios-elf-elf2flt (a special Nios port)
  • nios-elf-flat_dump (a special Nios port)
  • genromfs
Install uclinux-tools if you need to perform any of these types of actions on your uCLinux application source files. Most uCLinux programmers will want to install uclinux-tools.

7. Examples, Tutorials:
  7.1 cdk-nios-examples P L A N N E D (licence unclarity)

This is a collection of SDK examples for different development kits like distributed by Altera. I can't say who will want to install this package.

  7.2 cdk-nios-example-u-boot This is a collection of precompiled U-Boot images for all known NIOS development kits (incl. sources :-). U-Boot is already ported to:
  • Altera DK1C20 -- "Cyclone Edition"
  • Altera DK1S10 -- "Stratix Edition"
  • SSV ADNP/ESC1 -- with or w/o DNP/EVA2 base board
Quick Start: To install and startup the linux kernel - in this example the kernel rebuild for DK1S10 (see above) - do this (you need a correct configured U-Boot environment and an already running tftp daemon to serve the raw binary image):
  1. > tftp 1010000 linux.bin
  2. > protect off 850000 9FFFFF
  3. > erase 850000 9FFFFF
  4. > cp.b 1010000 850000 $(filesize)
  5. > go 850000

For more informartion see: http://sourceforge.net/projects/u-boot

 
Meaning of colors:
  green
  • projects with most significant development work
  • in about all cases there are more than one core developer
  yellow
  • projects with sporadical release flow
  • about each project will be maintained by only one programmer
  red
  • obsoleted and/or non continued projects
  • initiators, authors, and core developer undiscoverable or without furthermore development work


contact