aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2008-05-27 09:30:20 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2008-05-27 09:30:20 +0000
commitd8e1d5a103aa5cd43e4d7e2437448327aa06ff08 (patch)
tree155d45d623093cdd96cd104b6fe25eb69f6981a0
parente13185058d7fdb390de10325a21730ab3b0d3ded (diff)
downloadChibiOS-d8e1d5a103aa5cd43e4d7e2437448327aa06ff08.tar.gz
ChibiOS-d8e1d5a103aa5cd43e4d7e2437448327aa06ff08.tar.bz2
ChibiOS-d8e1d5a103aa5cd43e4d7e2437448327aa06ff08.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@310 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r--demos/ARM7-AT91SAM7X-WEB-GCC/main.c2
-rw-r--r--demos/ARM7-AT91SAM7X-WEB-GCC/readme.txt8
-rw-r--r--demos/ARM7-AT91SAM7X-WEB-GCC/web/cc-arch.h9
-rw-r--r--demos/ARM7-AT91SAM7X-WEB-GCC/web/uip-conf.h9
-rw-r--r--demos/ARM7-AT91SAM7X-WEB-GCC/web/webthread.c8
-rw-r--r--ext/readme.txt10
-rw-r--r--ext/uip-1.0.patches.zipbin0 -> 21462 bytes
-rw-r--r--readme.txt5
8 files changed, 38 insertions, 13 deletions
diff --git a/demos/ARM7-AT91SAM7X-WEB-GCC/main.c b/demos/ARM7-AT91SAM7X-WEB-GCC/main.c
index 296ec7f67..bf23f3278 100644
--- a/demos/ARM7-AT91SAM7X-WEB-GCC/main.c
+++ b/demos/ARM7-AT91SAM7X-WEB-GCC/main.c
@@ -27,7 +27,7 @@
#include "web/webthread.h"
static WorkingArea(waWebThread, 512);
-static WorkingArea(waThread1, 128);
+static WorkingArea(waThread1, 64);
static msg_t Thread1(void *arg) {
diff --git a/demos/ARM7-AT91SAM7X-WEB-GCC/readme.txt b/demos/ARM7-AT91SAM7X-WEB-GCC/readme.txt
index fc561fa4d..4dedc0658 100644
--- a/demos/ARM7-AT91SAM7X-WEB-GCC/readme.txt
+++ b/demos/ARM7-AT91SAM7X-WEB-GCC/readme.txt
@@ -8,7 +8,10 @@ The demo runs on an Olimex SAM7-EX256 board.
** The Demo **
-Work in progress, not finished yet.
+The demo currently just flashes the LCD background using a thread and serves
+HTTP requests at address 192.168.1.20 on port 80.
+The button SW1 prints an "Hello World!" string on COM1, the button SW2
+activates che ChibiOS/RT test suite, output on COM1.
** Build Procedure **
@@ -24,3 +27,6 @@ Also note that not all the files present in the Atmel library are distribuited
with ChibiOS/RT, you can find the whole library on the Atmel web site:
http://www.atmel.com
+
+The uIP stack also has its own license, please read the info into the included
+uIP distribution files.
diff --git a/demos/ARM7-AT91SAM7X-WEB-GCC/web/cc-arch.h b/demos/ARM7-AT91SAM7X-WEB-GCC/web/cc-arch.h
new file mode 100644
index 000000000..744cf56ef
--- /dev/null
+++ b/demos/ARM7-AT91SAM7X-WEB-GCC/web/cc-arch.h
@@ -0,0 +1,9 @@
+#ifndef __CC_ARCH_H__
+#define __CC_ARCH_H__
+
+#define PACK_STRUCT_FIELD(x) x __attribute__((packed))
+#define PACK_STRUCT_STRUCT __attribute__((packed))
+#define PACK_STRUCT_BEGIN
+#define PACK_STRUCT_END
+
+#endif /* __CC_ARCH_H__ */
diff --git a/demos/ARM7-AT91SAM7X-WEB-GCC/web/uip-conf.h b/demos/ARM7-AT91SAM7X-WEB-GCC/web/uip-conf.h
index 273b7cb71..b6a17c970 100644
--- a/demos/ARM7-AT91SAM7X-WEB-GCC/web/uip-conf.h
+++ b/demos/ARM7-AT91SAM7X-WEB-GCC/web/uip-conf.h
@@ -57,6 +57,8 @@
#include <stdint.h>
+#include <cc-arch.h> /* patched */
+
/**
* 8 bit datatype
*
@@ -86,13 +88,6 @@ typedef uint16_t u16_t;
typedef unsigned short uip_stats_t;
/**
- * Modifier for packed structures.
- *
- * \hideinitializer
- */
-#define UIP_CONF_PACKED __attribute__((packed))
-
-/**
* Maximum number of TCP connections.
*
* \hideinitializer
diff --git a/demos/ARM7-AT91SAM7X-WEB-GCC/web/webthread.c b/demos/ARM7-AT91SAM7X-WEB-GCC/web/webthread.c
index 2a45309f5..425a6366d 100644
--- a/demos/ARM7-AT91SAM7X-WEB-GCC/web/webthread.c
+++ b/demos/ARM7-AT91SAM7X-WEB-GCC/web/webthread.c
@@ -29,6 +29,10 @@
#include <timer.h>
#include <clock-arch.h>
+//#define IPADDR0 192
+//#define IPADDR1 168
+//#define IPADDR2 1
+//#define IPADDR3 20
#define IPADDR0 10
#define IPADDR1 151
#define IPADDR2 218
@@ -130,7 +134,7 @@ msg_t WebThread(void *p) {
while (TRUE) {
uip_len = network_device_read();
if (uip_len > 0) {
- if (BUF->type == htons(UIP_ETHTYPE_IP)) {
+ if (BUF->type == HTONS(UIP_ETHTYPE_IP)) {
uip_arp_ipin();
uip_input();
if (uip_len > 0) {
@@ -138,7 +142,7 @@ msg_t WebThread(void *p) {
network_device_send();
}
}
- else if (BUF->type == htons(UIP_ETHTYPE_ARP)) {
+ else if (BUF->type == HTONS(UIP_ETHTYPE_ARP)) {
uip_arp_arpin();
if (uip_len > 0)
network_device_send();
diff --git a/ext/readme.txt b/ext/readme.txt
index d070be533..74c347878 100644
--- a/ext/readme.txt
+++ b/ext/readme.txt
@@ -10,7 +10,13 @@ instructions contained in the various distributions.
The currently included items are:
1. uip-1.0, a minimal TCP/IP implementation: http://www.sics.se/~adam/uip/
-
-The files are included packed as downloaded from the original repository
+
+The above files are included packed as downloaded from the original repository
and without any modification, in order to use the libraries unpack them
under ./ext.
+
+Some patches are also present:
+
+1. uip-1.0 patches, small fixes to the uIP required to make it work with
+ ChibiOS/RT, unpack the archive over the uIP distribution and replace the
+ files.
diff --git a/ext/uip-1.0.patches.zip b/ext/uip-1.0.patches.zip
new file mode 100644
index 000000000..bdff1db6b
--- /dev/null
+++ b/ext/uip-1.0.patches.zip
Binary files differ
diff --git a/readme.txt b/readme.txt
index 3e09a40a0..0566d3458 100644
--- a/readme.txt
+++ b/readme.txt
@@ -39,6 +39,8 @@ ARM7-LPC214x-G++ - Yet another LPC214X demo but this one is done using
ChibiOS/RT users.
ARM7-AT91SAM7X-GCC - Port for Atmel AT91SAM7X256. The demo program targets
the Olimex SAM7-EX256 board.
+ARM7-AT91SAM7X-WEB-GCC - Port for Atmel AT91SAM7X256. The web demo program
+ targets the Olimex SAM7-EX256 board.
ARMCM3-ST32F103-GCC - ARM Cortex-M3 port. The demo targets the Olimex
STM32-P103 board.
AVR-AVRmega128-GCC - Port on AVRmega128. A special thanks to Vladimir for
@@ -72,6 +74,9 @@ Win32-MinGW - ChibiOS/RT simulator and demo into a WIN32 process,
*****************************************************************************
*** 0.6.5 ***
+- NEW: Web server demo for the AT91SAM7X256, the demo integrates the uIP
+ stack and its demo applications.
+- NEW: EMAC driver added to the AT91SAM7X port.
- FIX: Small fix to the ARM7 startup files. It used a short jump in the reset
vector and that could fail in some memory configurations.