[an error occurred while processing this directive]
Сам не работал. но работать с ней можно. Пример есть в директории "\kits\nios2\examples\software\ucfs_web_server"
(«Телесистемы»: Конференция «Программируемые логические схемы и их применение»)

миниатюрный аудио-видеорекордер mAVR

Отправлено Major 25 августа 2004 г. 12:28
В ответ на: Может кто-нибудь всетаки работал с Compact Flash под NIOS 2 Development Kit? Как ее запустить и есть ли там библиотеки для работы с ней? отправлено VB 25 августа 2004 г. 11:33

Readme - LWIP Web Server and Micrium uC/FS FAT file system Software Example

DESCRIPTION:
A standalone LWIP Web Server running from a FAT filesystem on CompactFlash.

REQUIREMENTS:
This example will run on the following Nios II design, targeting the Nios
Stratix & Cyclone development boards:
- linux

PERIPHERALS USED:
This example exercises the following peripherals:
- CompactFlash Interface (named "cf" in SOPC Builder)
- Ethernet MAC (named "lan91c111" in SOPC Builder)
- STDOUT device (UART or JTAG UART)
- system timer

PERIPHERAL UPDATE REQUIRED:
The following peripheral (component) needs to be updated:
- altera_avalon_lan91c111: Replace the HAL subdirectory with the one
included with this kit.

SOFTWARE SOURCE FILES:
This example includes the following software source files:

- ucfs_web_server.c: Contains main() which initializes the LWIP stack, the
uC/FS file system, and the http server. Polls the Ethernet device for input.
Also sets the default IP address and network.

- mac_addr.c: Contains MAC address routine to program the Ethernet address.
This is used by LWIP during initialization, but is implementation-specific
(you set your MAC address to whatever you want.. or read it from your own
special non-volatile memory).

- lwipopts.h: Default values and features for building the LWIP stack.
This set will work for most applications. Care must be taken to fully
understand the implications of changing any default value. Refer to
/lwip-0.7.1/src/include/lwip/opt.h for other features or values that can
have a default in lwipopts.h.

- fs_conf.h: Default values and features for building uC/FS FAT file system.
Modify this file to enable/disable features, etc.

- fs_port.h: uC/FS architecture (port) file for the Nios2. Do not modify.

- .cdtbuild: Eclipse plugin default build file. Normally generated, but
included here to provide the default compiler include PATHs. If the
example will not build with this file, remove it, and add the following
"Include Paths" to the nios-elf-gcc general configuration options (available
in the "Properties" of the sample project):
../lwip-0.7.1/src/include
../lwip-0.7.1/src/include/ipv4
../lwip4hal/include
../FS/API
../FS/DEVICE/IDE
../FS/DEVICE/IDE/hardware/nios2_cf
../FS/FSL/fat
../FS/LBL
../FS/OS

- httpd.c: Implementation of an HTTP server including all necessary LWIP
rawapi callbacks to handle multiple connections and parsing basic HTTP
commands to handle GET requests. Requests for files via HTTP GET requests
direct the server to fetch the file, if available, from the FAT file system
and send it to the client requesting it.

- httpd.h: Header information defining HTTP server implementation and
common HTTP server strings & constants.

- lwip-0.7.1/: Directory containing the standard LWIP source files (less the
socket API and the IP V6 subdirectories).

- lwip4hal/: Directory containing architecture (port) files for the Nios2 using
the HAL OS option.

- FS/: Directory containing Micrium's MicroC/FS FAT File System including the
architecture (port) files for the CompactFlash component.

BOARD/HOST REQUIREMENTS:
This example requires an Ethernet cable connected to the development board's
RJ-45 jack, and a JTAG connection with the development board. If the host
communication settings are changed from JTAG UART (default) to use a
conventional UART, a serial cable between board DB-9 connector and the host
is required.


ADDITIONAL INFORMATION:

This is an example HTTP server using LWIP and uC/FS in a single-threaded
environment. The server can process basic requests to serve HTML,
JPEG, and GIF files from the FAT file system. It is in no way a complete
implementation of a full-featured HTTP server.

LWIP has two API's, a callback interface and "standard" sockets. This example
uses the callback (rawapi) interface.
Refer to: lwip-0.7.1/doc/rawapi.txt.

uC/FS has a Posix-like API.
Refer to: FS/DOC/uC-FS-UserManualV1-30.pdf


CREATE WEB SERVER ON COMPACT FLASH:
1. Create the web pages on your workstation. Only 8.3 file names are
supported. An "index.htm" file is mandatory.
2. Connect a CompactFlash card to your workstation. It should be formatted
with FAT file system.
3. Copy the web pages with "index.htm" installed into the root directory.

CONFIGURE WEB SERVER IP ADDRESS:
1. Create a new project from the LWIP Web server example. The main program
will be opened.
2. Find and edit the IP address, network mask, and gateway address. You will
use this address from your web browser to test the application.

RUN WEB SERVER EXECUTABLE:
1. Program the full_featured design into the FPGA using the Quartus programmer.
2. Plug in the CompactFlash card that is pre-loaded with web pages
3. Build and run the application. The configured IP address will be displayed
in the console window.
4. Browse the server using this IP address in the address bar of your browser.

Составить ответ  |||  Конференция  |||  Архив

Ответы


Отправка ответа

Имя (обязательно): 
Пароль: 
E-mail: 

Тема (обязательно):
Сообщение:

Ссылка на URL: 
Название ссылки: 

URL изображения: 


Перейти к списку ответов  |||  Конференция  |||  Архив  |||  Главная страница  |||  Содержание  |||  Без кадра

E-mail: info@telesys.ru