Cypress DCT-1D Uživatelská příručka Strana 47

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 82
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 46
4.3. INTRODUCTION TO
µ
CLINUX
47
Laboration task 4
Design and implement the DCT accelerator with a WB interface.
Laboration task 5
Write a testbench for your DCT accelerator.
4.3 Introduction to µClinux
In the remaining labs we are going to run µClinux on the openrisc system. The
most important difference between µClinux and Linux is that µClinux works with-
out an MMU. This means that there is no memory protection for programs running
on µClinux. Therefore, extra care must be taken during development since a bug in a
program may cause the entire operating system to crash.
You can start µClinux on the openrisc system by using the u command in the
monitor. This will copy a µClinux image from the flash memory to the SDRAM and
boot µClinux. If everything worked you will get a pr ompt and you should also be able
to browse a web page on the µClinux machine. The IP address of the µClinux machine
is printed by the boot script.
On the µClinux machine, most directories are read only but /mnt and /var is
writable. /mnt is a good directory to download programs to. The base directory for
the web server documents is in /mnt/htdocs.
Laboration task 6
Boot
µ
Clinux and familiarize yourself with it.
4.3.1 Compiling an application to µClinux
In the hello directory of the lab s keleton there is a sample hello world application.
This has to be cross compiled on one of the Linux machines in the lab. The cross
compiler has access to a C library so you can use all standard functions like printf,
fopen, fread, etc. If you are interested in how the cross compiler is invoked, you can
take a look at the Makefile. Just type make in the hello directory to compile it.
4.3.2 Starting the TFTP server
In order to download applications via tftp we first need to start a TFTP server on one
of the Linux computers in the lab. In Linux, this can be started with the following
command:
/usr/sbin/in.tftpd --daemon --no-fork --port 5050 -r 1 ~/tftp
This will start a TFTP server listening on UDP port 5050
1
. Files will be served from
the tftp directory in your home directory. The options --daemon --no-fork are
used so that the tftp client can be interrupted with ctrl c. (We don’t want any TFTP
1
Port 69 is actually the standardized TFTP port but non privileged users in Linux are not permitted to
open ports below 1024 so we decided to use port 5050 instead.
Zobrazit stránku 46
1 2 ... 42 43 44 45 46 47 48 49 50 51 52 ... 81 82

Komentáře k této Příručce

Žádné komentáře