Date: Fri, 3 Mar 2017 09:29:07 +1100
Subject: [PATCH 129/163] Add "update in progress" reply to non-firmware
requests
---
ZodiacFX/src/http.c | 63 +++++++++++++++++++++++++++++++++++++++------
1 file changed, 55 insertions(+), 8 deletions(-)
diff --git a/ZodiacFX/src/http.c b/ZodiacFX/src/http.c
index 968d32a..91e7838 100644
--- a/ZodiacFX/src/http.c
+++ b/ZodiacFX/src/http.c
@@ -227,11 +227,53 @@ static err_t http_recv(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err
{
TRACE("http.c: incoming connection ignored - upload currently in progress");
- // Check 10-second timeout
- if(sys_get_ms() - upload_timer > UPLOAD_TIMEOUT)
+ /* Header request check */
+ memset(&http_msg, 0, sizeof(http_msg)); // Clear HTTP message array
+
+ // Specified resource directly follows GET
+ i = 0;
+ while(i < 63 && (http_payload[i+5] != ' '))
+ {
+ http_msg[i] = http_payload[i+5]; // Offset http_payload to isolate resource
+ i++;
+ }
+
+ // The "upload in progress" message does not need to show up in the header
+ if(strcmp(http_msg,"header.htm") != 0)
+ {
+ if(interfaceCreate_Upload_Status(4))
+ {
+ http_send(&shared_buffer, pcb, 1);
+ TRACE("http.c: Page sent successfully - %d bytes", strlen(shared_buffer));
+ }
+ else
+ {
+ TRACE("http.c: Unable to serve page - buffer at %d bytes", strlen(shared_buffer));
+ }
+ }
+
+ return ERR_OK;
+ }
+
+ // Check upload timeout
+ if(sys_get_ms() - upload_timer > UPLOAD_TIMEOUT)
+ {
+ TRACE("http.c: firmware upload has timed out");
+
+ /* Header request check */
+ memset(&http_msg, 0, sizeof(http_msg)); // Clear HTTP message array
+
+ // Specified resource directly follows GET
+ i = 0;
+ while(i < 63 && (http_payload[i+5] != ' '))
+ {
+ http_msg[i] = http_payload[i+5]; // Offset http_payload to isolate resource
+ i++;
+ }
+
+ // The "upload failed" message does not need to show up in the header
+ if(strcmp(http_msg,"header.htm") != 0)
{
- TRACE("http.c: firmware upload has timed out");
-
// Stop upload operation
upload_handler(NULL, 0); // Clean up upload operation
if(interfaceCreate_Upload_Status(2))
@@ -244,12 +286,11 @@ static err_t http_recv(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err
TRACE("http.c: Unable to serve page - buffer at %d bytes", strlen(shared_buffer));
}
}
-
- return ERR_OK;
}
- TRACE("http.c: %d seconds since last firmware packet received", (sys_get_ms() - upload_timer));
- // Set timer value
+ TRACE("http.c: %d ms since last firmware packet received", (sys_get_ms() - upload_timer));
+
+ // Update timer value
upload_timer = sys_get_ms();
int ret = 0;
@@ -2285,6 +2326,12 @@ static uint8_t interfaceCreate_Upload_Status(uint8_t sel)
"Firmware upload failed. Unable to verify firmware. Please try again, or check the integrity of the firmware. "\
);
}
+ else if(sel == 4)
+ {
+ snprintf(shared_buffer+strlen(shared_buffer), SHARED_BUFFER_LEN-strlen(shared_buffer),\
+ "
Firmware upload in progress. Please try again in 30 seconds. "\
+ );
+ }
else
{
snprintf(shared_buffer+strlen(shared_buffer), SHARED_BUFFER_LEN-strlen(shared_buffer),\
From 0e9cf6f5da030dac3af46a12d7341ca006384323 Mon Sep 17 00:00:00 2001
From: Kristopher Chen
Date: Mon, 6 Mar 2017 14:37:41 +1100
Subject: [PATCH 130/163] Remove legacy signature checks
---
ZodiacFX/src/flash.c | 60 --------------------------------------------
ZodiacFX/src/flash.h | 1 -
2 files changed, 61 deletions(-)
diff --git a/ZodiacFX/src/flash.c b/ZodiacFX/src/flash.c
index 39d1bd9..9c866a9 100644
--- a/ZodiacFX/src/flash.c
+++ b/ZodiacFX/src/flash.c
@@ -166,73 +166,13 @@ void cli_update(void)
return;
}
-/*
-* Check test verification value in flash
-*
-*/
-int get_verification(void)
-{
- char* pflash = (char*)(FLASH_BUFFER_END-1);
- char* buffer_start = (char*)FLASH_BUFFER;
-
- while(((*pflash) == '\xFF' || (*pflash) == '\0') && pflash > buffer_start)
- {
- pflash--;
- }
-
- if(pflash > buffer_start)
- {
- pflash-=7;
-
- //memcpy(value, pflash, 8);
- memcpy(&verify, pflash, 8);
-
- return 1;
- }
- else
- {
- return 0;
- }
-}
-
/*
* Verify firmware data
*
*/
int verification_check(void)
{
- // Populate integrity_check verify structure variable
- get_verification();
-
- if(!(verify.signature[0] == 'N' && verify.signature[1] == 'N'))
- {
- return 1;
- }
- else if(!(verify.device[0] == 'F' && verify.device[1] == 'X'))
- {
- return 2;
- }
- else
- {
- // Compare specified length and uploaded binary length
- char* pflash = (char*)(FLASH_BUFFER_END-1);
- char* buffer_start = (char*)FLASH_BUFFER;
-
- while(*(pflash-1) == '\xFF' || *(pflash-1) == '\0')
- {
- if(pflash == buffer_start)
- {
- return 3;
- }
- pflash--;
- }
- if((pflash-buffer_start) != (char*)verify.length)
- {
- return 4;
- }
-
- }
return 0;
diff --git a/ZodiacFX/src/flash.h b/ZodiacFX/src/flash.h
index 88fc010..7e2a06f 100644
--- a/ZodiacFX/src/flash.h
+++ b/ZodiacFX/src/flash.h
@@ -40,7 +40,6 @@ __no_inline RAMFUNC void firmware_update(void);
int xmodem_xfer(void);
void xmodem_clear_padding(uint8_t *buff);
-int get_verification(void);
int verification_check(void);
#define X_EOT 0x04
From 5157276a9e4389e8f7b46379022af2fa0dcc2e8d Mon Sep 17 00:00:00 2001
From: Kristopher Chen
Date: Mon, 6 Mar 2017 14:39:48 +1100
Subject: [PATCH 131/163] Update CRC check process
---
ZodiacFX/src/flash.c | 68 ++++++++++++++++++++++++++++++++++++++++++--
ZodiacFX/src/flash.h | 6 ++++
2 files changed, 71 insertions(+), 3 deletions(-)
diff --git a/ZodiacFX/src/flash.c b/ZodiacFX/src/flash.c
index 9c866a9..68061ba 100644
--- a/ZodiacFX/src/flash.c
+++ b/ZodiacFX/src/flash.c
@@ -39,7 +39,7 @@
// Global variables
extern uint8_t shared_buffer[SHARED_BUFFER_LEN];
-extern struct integrity_check verify;
+extern struct verification_data verify;
// Static variables
static uint32_t page_addr;
@@ -172,10 +172,72 @@ void cli_update(void)
*/
int verification_check(void)
{
-
+ char* fw_end_pmem = (char*)FLASH_BUFFER_END; // Buffer pointer to store the last address
+ char* fw_step_pmem = (char*)FLASH_BUFFER; // Buffer pointer to the starting address
+ uint32_t crc_sum = 0; // Store CRC sum
+ uint8_t pad_error = 0; // Set when padding is not found
- return 0;
+ /* Add all bytes of the uploaded firmware */
+ // Decrement the pointer until the previous address has data in it (not 0xFF)
+ while(*(fw_end_pmem-1) == '\xFF' && fw_end_pmem > FLASH_BUFFER)
+ {
+ fw_end_pmem--;
+ }
+ for(int sig=1; sig<=4; sig++)
+ {
+ if(*(fw_end_pmem-sig) != NULL)
+ {
+ TRACE("signature padding %d not found - last address: %08x\r\n", sig, fw_end_pmem);
+ pad_error = 1;
+ }
+ else
+ {
+ TRACE("signature padding %d found\r\n", sig);
+ }
+ }
+
+ // Start summing all bytes
+ if(pad_error)
+ {
+ // Calculate CRC for debug
+ while(fw_step_pmem < fw_end_pmem)
+ {
+ crc_sum += *fw_step_pmem;
+ fw_step_pmem++;
+ }
+ }
+ else
+ {
+ // Exclude CRC & padding from calculation
+ while(fw_step_pmem < (fw_end_pmem-8))
+ {
+ crc_sum += *fw_step_pmem;
+ fw_step_pmem++;
+ }
+ }
+
+ TRACE("fw_step_pmem %08x; fw_end_pmem %08x;\r\n", fw_step_pmem, fw_end_pmem);
+
+ // Update structure entry
+ TRACE("CRC sum: %04x\r\n", crc_sum);
+ verify.calculated = crc_sum;
+
+ /* Compare with last 4 bytes of firmware */
+ // Get last 4 bytes of firmware (4-byte CRC, 4-byte padding)
+ verify.found = *(uint32_t*)(fw_end_pmem - 8);
+
+ TRACE("CRC found: %04x\r\n", verify.found);
+
+ // Compare calculated and found CRC
+ if(verify.found == verify.calculated)
+ {
+ return SUCCESS;
+ }
+ else
+ {
+ return FAILURE;
+ }
}
/*
diff --git a/ZodiacFX/src/flash.h b/ZodiacFX/src/flash.h
index 7e2a06f..7c25a9e 100644
--- a/ZodiacFX/src/flash.h
+++ b/ZodiacFX/src/flash.h
@@ -42,6 +42,12 @@ void xmodem_clear_padding(uint8_t *buff);
int verification_check(void);
+struct verification_data
+{
+ uint32_t calculated; // Last 4 bytes from summed data
+ uint32_t found; // 4 bytes at the end of uploaded firmware
+};
+
#define X_EOT 0x04
#define X_ACK 0x06
#define X_NAK 0x15
From 17326506b9a398e47d0fca999bd8f45be8055e4a Mon Sep 17 00:00:00 2001
From: Kristopher Chen
Date: Mon, 6 Mar 2017 14:49:08 +1100
Subject: [PATCH 132/163] Adjust return value check
---
ZodiacFX/src/flash.c | 2 +-
ZodiacFX/src/http.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ZodiacFX/src/flash.c b/ZodiacFX/src/flash.c
index 68061ba..ce38e1d 100644
--- a/ZodiacFX/src/flash.c
+++ b/ZodiacFX/src/flash.c
@@ -149,7 +149,7 @@ void cli_update(void)
{
printf("Error: failed to write firmware to memory\r\n");
}
- if(verification_check() == 0)
+ if(verification_check() == SUCCESS)
{
printf("Firmware upload complete - Restarting the Zodiac FX.\r\n");
for(int x = 0;x<100000;x++); // Let the above message get send to the terminal before detaching
diff --git a/ZodiacFX/src/http.c b/ZodiacFX/src/http.c
index 91e7838..3aec620 100644
--- a/ZodiacFX/src/http.c
+++ b/ZodiacFX/src/http.c
@@ -302,7 +302,7 @@ static err_t http_recv(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err
boundary_start = 1;
//flash_clear_gpnvm(1);
// upload check
- if(verification_check() == 0)
+ if(verification_check() == SUCCESS)
{
upload_handler(NULL, 0); // Clean up upload operation
if(interfaceCreate_Upload_Status(1))
From 0aa7a6975c67269953e6cf53ce8027bb2511ea79 Mon Sep 17 00:00:00 2001
From: Kristopher Chen
Date: Mon, 6 Mar 2017 16:47:35 +1100
Subject: [PATCH 133/163] Remove newlines in debug output
---
ZodiacFX/src/flash.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/ZodiacFX/src/flash.c b/ZodiacFX/src/flash.c
index ce38e1d..d1bd633 100644
--- a/ZodiacFX/src/flash.c
+++ b/ZodiacFX/src/flash.c
@@ -188,12 +188,12 @@ int verification_check(void)
{
if(*(fw_end_pmem-sig) != NULL)
{
- TRACE("signature padding %d not found - last address: %08x\r\n", sig, fw_end_pmem);
+ TRACE("signature padding %d not found - last address: %08x", sig, fw_end_pmem);
pad_error = 1;
}
else
{
- TRACE("signature padding %d found\r\n", sig);
+ TRACE("signature padding %d found", sig);
}
}
@@ -217,17 +217,17 @@ int verification_check(void)
}
}
- TRACE("fw_step_pmem %08x; fw_end_pmem %08x;\r\n", fw_step_pmem, fw_end_pmem);
+ TRACE("fw_step_pmem %08x; fw_end_pmem %08x;", fw_step_pmem, fw_end_pmem);
// Update structure entry
- TRACE("CRC sum: %04x\r\n", crc_sum);
+ TRACE("CRC sum: %04x", crc_sum);
verify.calculated = crc_sum;
/* Compare with last 4 bytes of firmware */
// Get last 4 bytes of firmware (4-byte CRC, 4-byte padding)
verify.found = *(uint32_t*)(fw_end_pmem - 8);
- TRACE("CRC found: %04x\r\n", verify.found);
+ TRACE("CRC found: %04x", verify.found);
// Compare calculated and found CRC
if(verify.found == verify.calculated)
From 114f9799e7f90c259bf881563503aa1b684f3039 Mon Sep 17 00:00:00 2001
From: Kristopher Chen
Date: Mon, 6 Mar 2017 17:19:03 +1100
Subject: [PATCH 134/163] Clean up unused signature check code
---
ZodiacFX/src/command.c | 1 -
ZodiacFX/src/command.h | 9 ---------
ZodiacFX/src/flash.c | 2 +-
ZodiacFX/src/http.c | 1 -
ZodiacFX/src/main.c | 1 -
5 files changed, 1 insertion(+), 13 deletions(-)
diff --git a/ZodiacFX/src/command.c b/ZodiacFX/src/command.c
index 296d116..504448b 100644
--- a/ZodiacFX/src/command.c
+++ b/ZodiacFX/src/command.c
@@ -48,7 +48,6 @@
// Global variables
extern struct zodiac_config Zodiac_Config;
-extern struct integrity_check verify;
extern bool debug_output;
extern int charcount, charcount_last;
diff --git a/ZodiacFX/src/command.h b/ZodiacFX/src/command.h
index 9967d28..b2d0f36 100644
--- a/ZodiacFX/src/command.h
+++ b/ZodiacFX/src/command.h
@@ -75,15 +75,6 @@ struct zodiac_config {
} PACK_STRUCT_STRUCT;
PACK_STRUCT_END
-PACK_STRUCT_BEGIN
-struct integrity_check
-{
- uint8_t signature[2];
- uint32_t length;
- uint8_t device[2];
-} PACK_STRUCT_STRUCT;
-PACK_STRUCT_END
-
typedef struct arp_header {
uint8_t et_dest[6]; /**< Destination node */
uint8_t et_src[6]; /**< Source node */
diff --git a/ZodiacFX/src/flash.c b/ZodiacFX/src/flash.c
index d1bd633..84add07 100644
--- a/ZodiacFX/src/flash.c
+++ b/ZodiacFX/src/flash.c
@@ -39,7 +39,7 @@
// Global variables
extern uint8_t shared_buffer[SHARED_BUFFER_LEN];
-extern struct verification_data verify;
+struct verification_data verify;
// Static variables
static uint32_t page_addr;
diff --git a/ZodiacFX/src/http.c b/ZodiacFX/src/http.c
index 3aec620..5a399ca 100644
--- a/ZodiacFX/src/http.c
+++ b/ZodiacFX/src/http.c
@@ -53,7 +53,6 @@ extern uint32_t uid_buf[4]; // Unique identifier
extern struct tcp_pcb *tcp_pcb;
extern int OF_Version;
extern uint8_t shared_buffer[SHARED_BUFFER_LEN]; // SHARED_BUFFER_LEN must never be reduced below 2048
-extern struct integrity_check verify;
extern int tcp_con_state; // Check connection state
extern struct ofp_flow_mod *flow_match10[MAX_FLOWS_10];
diff --git a/ZodiacFX/src/main.c b/ZodiacFX/src/main.c
index 256291e..95494ae 100644
--- a/ZodiacFX/src/main.c
+++ b/ZodiacFX/src/main.c
@@ -50,7 +50,6 @@
// Global variables
struct netif gs_net_if;
struct zodiac_config Zodiac_Config;
-struct integrity_check verify;
int charcount, charcount_last;
bool masterselect;
bool stackenabled;
From a4feb6aae0bcf50e1559eea7ec1e453dc1b523a9 Mon Sep 17 00:00:00 2001
From: Kristopher Chen
Date: Mon, 6 Mar 2017 18:04:45 +1100
Subject: [PATCH 135/163] Add timeout to CLI firmware upload
---
ZodiacFX/src/flash.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/ZodiacFX/src/flash.c b/ZodiacFX/src/flash.c
index 84add07..25ac197 100644
--- a/ZodiacFX/src/flash.c
+++ b/ZodiacFX/src/flash.c
@@ -247,7 +247,8 @@ int verification_check(void)
int xmodem_xfer(void)
{
char ch;
- int timeout_clock = 0;
+ int timeout_clock = 0; // protocol (NAK) timeout counter
+ int timeout_upload = 0; // upload timeout counter
int buff_ctr = 1;
int byte_ctr = 1;
int block_ctr = 0;
@@ -325,10 +326,15 @@ int xmodem_xfer(void)
byte_ctr++;
}
timeout_clock++;
- if (timeout_clock > 1000000) // Timeout, send
+ if(timeout_upload > 6)
+ {
+ return;
+ }
+ else if (timeout_clock > 1000000) // Timeout, send
{
printf("%c", X_NAK);
timeout_clock = 0;
+ timeout_upload++;
}
}
}
From 97f690850b81044a1eed105455aad0d65c031e88 Mon Sep 17 00:00:00 2001
From: Kristopher Chen
Date: Mon, 6 Mar 2017 18:23:23 +1100
Subject: [PATCH 136/163] Add get crc command to CLI
Outputs the required CRC signature for a firmware update
---
ZodiacFX/src/command.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/ZodiacFX/src/command.c b/ZodiacFX/src/command.c
index 504448b..85af4f2 100644
--- a/ZodiacFX/src/command.c
+++ b/ZodiacFX/src/command.c
@@ -48,6 +48,7 @@
// Global variables
extern struct zodiac_config Zodiac_Config;
+extern struct verification_data verify;
extern bool debug_output;
extern int charcount, charcount_last;
@@ -442,6 +443,15 @@ void command_root(char *command, char *param1, char *param2, char *param3)
while (1);
}
+ // Get CRC
+ if (strcmp(command, "get")==0 && strcmp(param1, "crc")==0)
+ {
+ verification_check();
+ printf("Calculated verification: %08x\r\n", verify.calculated);
+ printf("Append [%08x 00000000] to the binary\r\n", ntohl(verify.calculated));
+ return;
+ }
+
// Unknown Command
printf("Unknown command\r\n");
return;
From 61eff480075af2578467163c4b9b50b1e7cfb4fa Mon Sep 17 00:00:00 2001
From: Kristopher Chen
Date: Tue, 7 Mar 2017 10:11:24 +1100
Subject: [PATCH 137/163] Tweak upload timeout handling
---
ZodiacFX/src/http.c | 43 +++++++++++++++++++------------------------
ZodiacFX/src/http.h | 2 +-
2 files changed, 20 insertions(+), 25 deletions(-)
diff --git a/ZodiacFX/src/http.c b/ZodiacFX/src/http.c
index 5a399ca..d987e20 100644
--- a/ZodiacFX/src/http.c
+++ b/ZodiacFX/src/http.c
@@ -81,6 +81,7 @@ static int boundary_start = 1; // Check for start of data
static uint8_t flowBase = 0; // Current set of flows to display
static uint8_t meterBase = 0; // Current set of meters to display
static struct tcp_pcb * upload_pcb; // Firmware upload connection check (pcb pointer)
+static int upload_port = 0;
static int upload_timer = 0; // Timer for firmware upload timeout
// Flag variables
@@ -213,18 +214,13 @@ static err_t http_recv(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err
TRACE("http.c: -> pcb @ addr: 0x%08x, remote port %d", pcb, pcb->remote_port);
if(file_upload == true)
- {
- // Check HTTP method
- i = 0;
- while(i < 63 && (http_payload[i] != ' '))
- {
- http_msg[i] = http_payload[i];
- i++;
- }
+ {
+ TRACE("http.c: %d ms since last firmware packet received", (sys_get_ms() - upload_timer));
- if(upload_pcb != pcb)
+ // Check upload timeout
+ if(upload_timer != 0 && sys_get_ms() - upload_timer > UPLOAD_TIMEOUT)
{
- TRACE("http.c: incoming connection ignored - upload currently in progress");
+ TRACE("http.c: firmware upload has timed out");
/* Header request check */
memset(&http_msg, 0, sizeof(http_msg)); // Clear HTTP message array
@@ -237,10 +233,12 @@ static err_t http_recv(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err
i++;
}
- // The "upload in progress" message does not need to show up in the header
+ // The "upload failed" message does not need to show up in the header
if(strcmp(http_msg,"header.htm") != 0)
{
- if(interfaceCreate_Upload_Status(4))
+ // Stop upload operation
+ upload_handler(NULL, 0); // Clean up upload operation
+ if(interfaceCreate_Upload_Status(2))
{
http_send(&shared_buffer, pcb, 1);
TRACE("http.c: Page sent successfully - %d bytes", strlen(shared_buffer));
@@ -250,14 +248,11 @@ static err_t http_recv(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err
TRACE("http.c: Unable to serve page - buffer at %d bytes", strlen(shared_buffer));
}
}
-
- return ERR_OK;
}
- // Check upload timeout
- if(sys_get_ms() - upload_timer > UPLOAD_TIMEOUT)
+ if(upload_pcb != pcb && upload_port != pcb->remote_port)
{
- TRACE("http.c: firmware upload has timed out");
+ TRACE("http.c: incoming connection ignored - upload currently in progress");
/* Header request check */
memset(&http_msg, 0, sizeof(http_msg)); // Clear HTTP message array
@@ -270,12 +265,10 @@ static err_t http_recv(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err
i++;
}
- // The "upload failed" message does not need to show up in the header
+ // The "upload in progress" message does not need to show up in the header
if(strcmp(http_msg,"header.htm") != 0)
{
- // Stop upload operation
- upload_handler(NULL, 0); // Clean up upload operation
- if(interfaceCreate_Upload_Status(2))
+ if(interfaceCreate_Upload_Status(4))
{
http_send(&shared_buffer, pcb, 1);
TRACE("http.c: Page sent successfully - %d bytes", strlen(shared_buffer));
@@ -285,11 +278,11 @@ static err_t http_recv(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err
TRACE("http.c: Unable to serve page - buffer at %d bytes", strlen(shared_buffer));
}
}
+
+ return ERR_OK;
}
- TRACE("http.c: %d ms since last firmware packet received", (sys_get_ms() - upload_timer));
-
- // Update timer value
+ // Update timer value (new firmware packet received)
upload_timer = sys_get_ms();
int ret = 0;
@@ -589,6 +582,8 @@ static err_t http_recv(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err
file_upload = true;
// Store pcb pointer value for this connection
upload_pcb = pcb;
+ // Store remote port
+ upload_port = pcb->remote_port;
// Initialise timeout value
upload_timer = sys_get_ms();
diff --git a/ZodiacFX/src/http.h b/ZodiacFX/src/http.h
index 2b8ef5a..945d856 100644
--- a/ZodiacFX/src/http.h
+++ b/ZodiacFX/src/http.h
@@ -34,7 +34,7 @@
#define FLOW_DISPLAY_LIMIT 4 // Displayable flows per page
#define METER_DISPLAY_LIMIT 3 // Displayable meters per page
#define BOUNDARY_MAX_LEN 70
-#define UPLOAD_TIMEOUT 12000 // (ms) timeout window between each firmware update packet
+#define UPLOAD_TIMEOUT 25000 // (ms) timeout window between each firmware update packet
void http_init(void);
From 8956a7947f487b5493a74131f2f68914dd0bd294 Mon Sep 17 00:00:00 2001
From: Kristopher Chen
Date: Fri, 10 Mar 2017 17:47:37 +1100
Subject: [PATCH 138/163] Adjust LwIP MSS
---
ZodiacFX/src/config/lwipopts.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/ZodiacFX/src/config/lwipopts.h b/ZodiacFX/src/config/lwipopts.h
index dbfc636..8c7d60b 100644
--- a/ZodiacFX/src/config/lwipopts.h
+++ b/ZodiacFX/src/config/lwipopts.h
@@ -126,7 +126,7 @@
* MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP segments.
* (requires the LWIP_TCP option)
*/
-#define MEMP_NUM_TCP_SEG 16
+#define MEMP_NUM_TCP_SEG 25
/**
* MEMP_NUM_REASSDATA: the number of IP packets simultaneously queued for
@@ -223,7 +223,7 @@
* when opening a connection. For the transmit size, this MSS sets
* an upper limit on the MSS advertised by the remote host.
*/
-#define TCP_MSS 1460
+#define TCP_MSS 536
/**
* TCP_WND: The size of a TCP window. This must be at least
@@ -235,7 +235,7 @@
* TCP_SND_BUF: TCP sender buffer space (bytes).
* To achieve good performance, this should be at least 2 * TCP_MSS.
*/
-#define TCP_SND_BUF (2 * TCP_MSS)
+#define TCP_SND_BUF (6 * TCP_MSS)
/**
* TCP_SND_QUEUELEN: TCP sender buffer space (pbufs). This must be at least
From c1119bb4974c123d07dfb57f0387ecda7da57cbe Mon Sep 17 00:00:00 2001
From: Kristopher Chen
Date: Fri, 10 Mar 2017 18:19:56 +1100
Subject: [PATCH 139/163] Modify debug messages
- pbuf length counters
- total uploaded byte counter
---
ZodiacFX/src/http.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/ZodiacFX/src/http.c b/ZodiacFX/src/http.c
index d987e20..d208048 100644
--- a/ZodiacFX/src/http.c
+++ b/ZodiacFX/src/http.c
@@ -210,7 +210,7 @@ static err_t http_recv(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err
http_payload = (char*)p->payload;
len = p->tot_len;
- TRACE("http.c: -- HTTP recv received %d payload bytes", len);
+ TRACE("http.c: -- HTTP recv received %d/%d payload bytes in this pbuf", p->len, p->tot_len);
TRACE("http.c: -> pcb @ addr: 0x%08x, remote port %d", pcb, pcb->remote_port);
if(file_upload == true)
@@ -1337,6 +1337,7 @@ static uint8_t upload_handler(char *payload, int len)
static char page[IFLASH_PAGE_SIZE] = {0}; // Storage for each page of data
static uint16_t saved_bytes = 0; // Persistent counter of unwritten data
uint16_t handled_bytes = 0; // Counter of handled data
+ static uint32_t total_handled_bytes = 0; // Counter of total handled data
static char boundary_ID[BOUNDARY_MAX_LEN] = {0}; // Storage for boundary ID
if(payload == NULL || len == 0)
@@ -1349,6 +1350,7 @@ static uint8_t upload_handler(char *payload, int len)
boundary_start = 1; // Set starting boundary required flag
upload_pcb = NULL; // Clear pcb connection pointer
upload_timer = 0; // Clear upload timeout
+ total_handled_bytes = 0;
return 1;
}
@@ -1594,6 +1596,8 @@ static uint8_t upload_handler(char *payload, int len)
// Handle edge-case
TRACE("http.c: unable to fill a complete page - skipping page write");
TRACE("http.c: %d bytes saved", saved_bytes);
+
+ total_handled_bytes += handled_bytes;
return 1;
}
else
@@ -1728,7 +1732,10 @@ static uint8_t upload_handler(char *payload, int len)
TRACE("http.c: handled_bytes: %04d, data_len: %04d", handled_bytes, data_len);
}
-
+
+ total_handled_bytes += handled_bytes;
+ TRACE("http.c: total_handled_bytes: %d", total_handled_bytes);
+
if(final)
{
return 2;
From 07dac6aaa403ceeb871fb93230c8d439faf2443d Mon Sep 17 00:00:00 2001
From: Paul Zanna
Date: Sun, 12 Mar 2017 14:41:04 +1100
Subject: [PATCH 140/163] Fixed POST methods
---
ZodiacFX/ZodiacFX.cproj | 4 +-
ZodiacFX/ZodiacFX_6_2.cproj | 1647 -----------------------------------
ZodiacFX_6_2.atsln | 20 -
3 files changed, 2 insertions(+), 1669 deletions(-)
delete mode 100644 ZodiacFX/ZodiacFX_6_2.cproj
delete mode 100644 ZodiacFX_6_2.atsln
diff --git a/ZodiacFX/ZodiacFX.cproj b/ZodiacFX/ZodiacFX.cproj
index e3e4036..2f76e38 100644
--- a/ZodiacFX/ZodiacFX.cproj
+++ b/ZodiacFX/ZodiacFX.cproj
@@ -274,11 +274,11 @@
JTAG
com.atmel.avrdbg.tool.atmelice
- J41800058832
+ J41800009874
Atmel-ICE
JTAG
- J41800058832
+ J41800009874
0xA3CC0CE0
7500000
diff --git a/ZodiacFX/ZodiacFX_6_2.cproj b/ZodiacFX/ZodiacFX_6_2.cproj
deleted file mode 100644
index 879842d..0000000
--- a/ZodiacFX/ZodiacFX_6_2.cproj
+++ /dev/null
@@ -1,1647 +0,0 @@
-
-
-
- 2.0
- 6.2
- com.Atmel.ARMGCC.C
- {d48aa523-b6fa-4608-b329-ef580ba58eba}
- ATSAM4E8C
- sam4e
- Executable
- C
- $(MSBuildProjectName)
- .elf
- $(MSBuildProjectDirectory)\$(Configuration)
- ZodiacFX
- ZodiacFX
- ZodiacFX
- Native
- true
- false
- true
- true
- 0x20000000
-
- true
- exception_table
- 2
- 0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- com.atmel.avrdbg.tool.atmelice
-
-
-
-
- JTAG
-
- com.atmel.avrdbg.tool.atmelice
- J41800009874
- Atmel-ICE
-
- JTAG
-
-
-
-
- True
- True
- True
- True
- True
-
-
- NDEBUG
- scanf=iscanf
- BOARD=USER_BOARD
- ARM_MATH_CM4=true
- printf=iprintf
- UDD_ENABLE
-
-
- False
-
-
- ../common/applications/user_application/user_board/config
- ../src/config
- ../src/ASF/thirdparty/CMSIS/Lib/GCC
- ../src/ASF/common/utils
- ../src
- ../src/ASF/sam/utils/fpu
- ../src/ASF/sam/utils
- ../src/ASF/sam/utils/preprocessor
- ../src/ASF/sam/utils/cmsis/sam4e/include
- ../src/ASF/common/boards
- ../src/ASF/sam/utils/header_files
- ../src/ASF/common/boards/user_board
- ../src/ASF/thirdparty/CMSIS/Include
- ../src/ASF/sam/utils/cmsis/sam4e/source/templates
- ../src/ASF/sam/drivers/pmc
- ../src/ASF/common/services/clock
- ../src/ASF/common/services/ioport
- ../src/ASF/common/services/spi/sam_usart_spi
- ../src/ASF/common/services/spi
- ../src/ASF/common/services/twi
- ../src/ASF/sam/drivers/twi
- ../src/ASF/sam/drivers/usart
- ../src/ASF/sam/drivers/gmac
- ../src/ASF/sam/drivers/matrix
- ../src/ASF/sam/drivers/pio
- ../src/ASF/sam/drivers/rtc
- ../src/ASF/common/services/sleepmgr
- ../src/ASF/common/services/usb
- ../src/ASF/common/services/usb/class/cdc
- ../src/ASF/common/services/usb/class/cdc/device
- ../src/ASF/common/services/usb/udc
- ../src/ASF/common/utils/stdio/stdio_usb
- ../src/ASF/sam/drivers/udp
- ../src/ASF/sam/drivers/tc
- ../src/ASF/common/services/spi/sam_spi
- ../src/ASF/sam/drivers/spi
- ../src/ASF/sam/drivers/rstc
- ../src/lwip/include
- ../src/lwip
- ../src/lwip/include/ipv4
- ../src/ASF/sam/drivers/afec
- ../src/ASF/common/utils/membag
-
-
- Optimize (-O1)
- -fdata-sections
- True
- True
- -pipe -fno-strict-aliasing -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror-implicit-function-declaration -Wpointer-arith -std=gnu99 -ffunction-sections -fdata-sections -Wchar-subscripts -Wcomment -Wformat=2 -Wimplicit-int -Wmain -Wparentheses -Wsequence-point -Wreturn-type -Wswitch -Wtrigraphs -Wunused -Wuninitialized -Wunknown-pragmas -Wfloat-equal -Wundef -Wshadow -Wbad-function-cast -Wwrite-strings -Wsign-compare -Waggregate-return -Wmissing-declarations -Wformat -Wmissing-format-attribute -Wno-deprecated-declarations -Wpacked -Wredundant-decls -Wnested-externs -Wlong-long -Wunreachable-code -Wcast-align --param max-inline-insns-single=500 -mfloat-abi=softfp -mfpu=fpv4-sp-d16
-
-
- libarm_cortexM4lf_math_softfp
- libm
-
-
-
-
- ../cmsis/linkerScripts
- ../src/ASF/thirdparty/CMSIS/Lib/GCC
-
-
- True
-
- -Wl,--entry=Reset_Handler -Wl,--cref -mthumb -T../src/ASF/sam/utils/linker_scripts/sam4e/sam4e8/gcc/flash.ld
- -DARM_MATH_CM4=true -DBOARD=USER_BOARD -Dprintf=iprintf -Dscanf=iscanf -DUDD_ENABLE
- False
-
-
- ../common/applications/user_application/user_board/config
- ../src/config
- ../src/ASF/thirdparty/CMSIS/Lib/GCC
- ../src/ASF/common/utils
- ../src
- ../src/ASF/sam/utils/fpu
- ../src/ASF/sam/utils
- ../src/ASF/sam/utils/preprocessor
- ../src/ASF/sam/utils/cmsis/sam4e/include
- ../src/ASF/common/boards
- ../src/ASF/sam/utils/header_files
- ../src/ASF/common/boards/user_board
- ../src/ASF/thirdparty/CMSIS/Include
- ../src/ASF/sam/utils/cmsis/sam4e/source/templates
- ../src/ASF/sam/drivers/pmc
- ../src/ASF/common/services/clock
- ../src/ASF/common/services/ioport
- ../src/ASF/common/services/spi/sam_usart_spi
- ../src/ASF/common/services/spi
- ../src/ASF/common/services/twi
- ../src/ASF/sam/drivers/twi
- ../src/ASF/sam/drivers/usart
- ../src/ASF/sam/drivers/gmac
- ../src/ASF/sam/drivers/matrix
- ../src/ASF/sam/drivers/pio
- ../src/ASF/sam/drivers/rtc
- ../src/ASF/common/services/sleepmgr
- ../src/ASF/common/services/usb
- ../src/ASF/common/services/usb/class/cdc
- ../src/ASF/common/services/usb/class/cdc/device
- ../src/ASF/common/services/usb/udc
- ../src/ASF/common/utils/stdio/stdio_usb
- ../src/ASF/sam/drivers/udp
- ../src/ASF/sam/drivers/tc
- ../src/ASF/common/services/spi/sam_spi
- ../src/ASF/sam/drivers/spi
- ../src/ASF/sam/drivers/rstc
- ../src/ASF/sam/drivers/afec
- ../src/ASF/common/utils/membag
-
-
-
-
-
-
-
-
- True
- True
- True
- True
- True
-
-
- DEBUG
- scanf=iscanf
- BOARD=USER_BOARD
- ARM_MATH_CM4=true
- printf=iprintf
- UDD_ENABLE
-
-
- False
-
-
- ../common/applications/user_application/user_board/config
- ../src/config
- ../src/ASF/thirdparty/CMSIS/Lib/GCC
- ../src/ASF/common/utils
- ../src
- ../src/ASF/sam/utils/fpu
- ../src/ASF/sam/utils
- ../src/ASF/sam/utils/preprocessor
- ../src/ASF/sam/utils/cmsis/sam4e/include
- ../src/ASF/common/boards
- ../src/ASF/sam/utils/header_files
- ../src/ASF/common/boards/user_board
- ../src/ASF/thirdparty/CMSIS/Include
- ../src/ASF/sam/utils/cmsis/sam4e/source/templates
- ../src/ASF/sam/drivers/pmc
- ../src/ASF/common/services/clock
- ../src/ASF/common/services/ioport
- ../src/ASF/common/services/spi/sam_usart_spi
- ../src/ASF/common/services/spi
- ../src/ASF/common/services/twi
- ../src/ASF/sam/drivers/twi
- ../src/ASF/sam/drivers/usart
- ../src/ASF/sam/drivers/gmac
- ../src/ASF/sam/drivers/matrix
- ../src/ASF/sam/drivers/pio
- ../src/ASF/sam/drivers/rtc
- ../src/ASF/common/services/sleepmgr
- ../src/ASF/common/services/usb
- ../src/ASF/common/services/usb/class/cdc
- ../src/ASF/common/services/usb/class/cdc/device
- ../src/ASF/common/services/usb/udc
- ../src/ASF/common/utils/stdio/stdio_usb
- ../src/ASF/sam/drivers/udp
- ../src/lwip
- ../src/lwip/include
- ../src/lwip/include/ipv4
- ../src/ASF/sam/drivers/tc
- ../src/ASF/common/services/spi/sam_spi
- ../src/ASF/sam/drivers/spi
- ../src/ASF/sam/drivers/rstc
- ../src/ASF/sam/drivers/afec
- ../src/ASF/common/utils/membag
-
-
- -fdata-sections
- True
- Maximum (-g3)
- True
- -pipe -fno-strict-aliasing -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror-implicit-function-declaration -Wpointer-arith -std=gnu99 -ffunction-sections -fdata-sections -Wchar-subscripts -Wcomment -Wformat=2 -Wimplicit-int -Wmain -Wparentheses -Wsequence-point -Wreturn-type -Wswitch -Wtrigraphs -Wunused -Wuninitialized -Wunknown-pragmas -Wfloat-equal -Wundef -Wshadow -Wbad-function-cast -Wwrite-strings -Wsign-compare -Waggregate-return -Wmissing-declarations -Wformat -Wmissing-format-attribute -Wno-deprecated-declarations -Wpacked -Wredundant-decls -Wnested-externs -Wlong-long -Wunreachable-code -Wcast-align --param max-inline-insns-single=500 -mfloat-abi=softfp -mfpu=fpv4-sp-d16
-
-
- libarm_cortexM4lf_math_softfp
- libm
-
-
-
-
- ../cmsis/linkerScripts
- ../src/ASF/thirdparty/CMSIS/Lib/GCC
-
-
- True
-
- -Wl,--entry=Reset_Handler -Wl,--cref -mthumb -T../src/ASF/sam/utils/linker_scripts/sam4e/sam4e8/gcc/flash.ld
- Default (-g)
- -DARM_MATH_CM4=true -DBOARD=USER_BOARD -Dprintf=iprintf -Dscanf=iscanf -DUDD_ENABLE
- False
-
-
- ../common/applications/user_application/user_board/config
- ../src/config
- ../src/ASF/thirdparty/CMSIS/Lib/GCC
- ../src/ASF/common/utils
- ../src
- ../src/ASF/sam/utils/fpu
- ../src/ASF/sam/utils
- ../src/ASF/sam/utils/preprocessor
- ../src/ASF/sam/utils/cmsis/sam4e/include
- ../src/ASF/common/boards
- ../src/ASF/sam/utils/header_files
- ../src/ASF/common/boards/user_board
- ../src/ASF/thirdparty/CMSIS/Include
- ../src/ASF/sam/utils/cmsis/sam4e/source/templates
- ../src/ASF/sam/drivers/pmc
- ../src/ASF/common/services/clock
- ../src/ASF/common/services/ioport
- ../src/ASF/common/services/spi/sam_usart_spi
- ../src/ASF/common/services/spi
- ../src/ASF/common/services/twi
- ../src/ASF/sam/drivers/twi
- ../src/ASF/sam/drivers/usart
- ../src/ASF/sam/drivers/gmac
- ../src/ASF/sam/drivers/matrix
- ../src/ASF/sam/drivers/pio
- ../src/ASF/sam/drivers/rtc
- ../src/ASF/common/services/sleepmgr
- ../src/ASF/common/services/usb
- ../src/ASF/common/services/usb/class/cdc
- ../src/ASF/common/services/usb/class/cdc/device
- ../src/ASF/common/services/usb/udc
- ../src/ASF/common/utils/stdio/stdio_usb
- ../src/ASF/sam/drivers/udp
- ../src/ASF/sam/drivers/tc
- ../src/ASF/common/services/spi/sam_spi
- ../src/ASF/sam/drivers/spi
- ../src/ASF/sam/drivers/rstc
- ../src/ASF/sam/drivers/afec
- ../src/ASF/common/utils/membag
-
-
- Default (-Wa,-g)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
- compile
-
-
-
-
\ No newline at end of file
diff --git a/ZodiacFX_6_2.atsln b/ZodiacFX_6_2.atsln
deleted file mode 100644
index 09d4d81..0000000
--- a/ZodiacFX_6_2.atsln
+++ /dev/null
@@ -1,20 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Atmel Studio Solution File, Format Version 11.00
-Project("{54F91283-7BC4-4236-8FF9-10F437C3AD48}") = "ZodiacFX", "ZodiacFX\ZodiacFX_6_2.cproj", "{D48AA523-B6FA-4608-B329-EF580BA58EBA}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|ARM = Debug|ARM
- Release|ARM = Release|ARM
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {D48AA523-B6FA-4608-B329-EF580BA58EBA}.Debug|ARM.ActiveCfg = Debug|ARM
- {D48AA523-B6FA-4608-B329-EF580BA58EBA}.Debug|ARM.Build.0 = Debug|ARM
- {D48AA523-B6FA-4608-B329-EF580BA58EBA}.Release|ARM.ActiveCfg = Release|ARM
- {D48AA523-B6FA-4608-B329-EF580BA58EBA}.Release|ARM.Build.0 = Release|ARM
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
From 6eec8d845b5bd2c3b23c91c89f1bce8c5f4946be Mon Sep 17 00:00:00 2001
From: Paul Zanna
Date: Sun, 12 Mar 2017 14:42:13 +1100
Subject: [PATCH 141/163] Updated Config calls
---
ZodiacFX/src/http.c | 82 +++++++++++++++++++++++++++++++--------------
1 file changed, 56 insertions(+), 26 deletions(-)
diff --git a/ZodiacFX/src/http.c b/ZodiacFX/src/http.c
index d208048..f9a06b1 100644
--- a/ZodiacFX/src/http.c
+++ b/ZodiacFX/src/http.c
@@ -76,6 +76,7 @@ extern int flash_write_page(uint8_t *flash_page);
// Local Variables
struct tcp_pcb *http_pcb;
static char http_msg[64]; // Buffer for HTTP message filtering
+static char post_msg[64]; // Buffer for HTTP message filtering
static int page_ctr = 1;
static int boundary_start = 1; // Check for start of data
static uint8_t flowBase = 0; // Current set of flows to display
@@ -87,11 +88,15 @@ static int upload_timer = 0; // Timer for firmware upload timeout
// Flag variables
static bool restart_required = false; // Track if any configuration changes are pending a restart
static bool file_upload = false; // Multi-part firmware file upload flag
+static int http_waiting_ack = 0;
+static struct tcp_pcb *close_ready = NULL;
+static bool post_pending = false;
static err_t http_recv(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err);
static err_t http_accept(void *arg, struct tcp_pcb *pcb, err_t err);
void http_send(char *buffer, struct tcp_pcb *pcb, bool out);
static err_t http_sent(void *arg, struct tcp_pcb *tpcb, uint16_t len);
+void http_close(struct tcp_pcb *pcb);
static uint8_t upload_handler(char *payload, int len);
@@ -179,6 +184,8 @@ static err_t http_accept(void *arg, struct tcp_pcb *pcb, err_t err)
static err_t http_sent(void *arg, struct tcp_pcb *tpcb, uint16_t len)
{
TRACE("http.c: [http_sent] %d bytes sent", len);
+ http_waiting_ack -= len;
+ if (http_waiting_ack == 0 && close_ready != NULL) http_close(close_ready);
if(restart_required == true)
{
TRACE("http.c: restarting the Zodiac FX. Please reconnect.");
@@ -551,7 +558,8 @@ static err_t http_recv(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err
TRACE("http.c: resource doesn't exist:\"%s\"", http_msg);
}
}
- else if(strcmp(http_msg,"POST") == 0)
+
+ else if(strcmp(http_msg,"POST") == 0 && post_pending == false)
{
TRACE("http.c: POST method received");
memset(&http_msg, 0, sizeof(http_msg)); // Clear HTTP message array
@@ -563,12 +571,24 @@ static err_t http_recv(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err
http_msg[i] = http_payload[i+6]; // Offset http_payload to isolate resource
i++;
}
+ memcpy(post_msg, http_msg, 64);
+ TRACE("http.c: request for %s", post_msg);
+ post_pending = true;
+ pbuf_free(p);
+ return ERR_OK;
+ }
+ else
+ {
+ TRACE("http.c: unknown HTTP method received");
+ }
- TRACE("http.c: request for %s", http_msg);
-
- if(strcmp(http_msg,"upload") == 0)
+
+ if(post_pending == true)
+ {
+ post_pending = false;
+ if(strcmp(post_msg,"upload") == 0)
{
- // Initialise flash programming
+ // Initialize flash programming
if(firmware_update_init())
{
TRACE("http.c: firmware update initialisation successful");
@@ -584,14 +604,14 @@ static err_t http_recv(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err
upload_pcb = pcb;
// Store remote port
upload_port = pcb->remote_port;
- // Initialise timeout value
+ // Initialize timeout value
upload_timer = sys_get_ms();
upload_handler(http_payload, len);
}
- else if(strcmp(http_msg,"save_config") == 0)
+ else if(strcmp(post_msg,"save_config") == 0)
{
- if(Config_Network(&http_payload, len) == SUCCESS)
+ if(Config_Network(http_payload, len) == SUCCESS)
{
TRACE("http.c: network configuration successful");
@@ -613,7 +633,7 @@ static err_t http_recv(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err
TRACE("http.c: ERROR: network configuration failed");
}
}
- else if(strcmp(http_msg,"btn_restart") == 0)
+ else if(strcmp(post_msg,"btn_restart") == 0)
{
if(interfaceCreate_Restart())
{
@@ -626,7 +646,7 @@ static err_t http_recv(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err
}
restart_required = true;
}
- else if(strcmp(http_msg,"btn_default") == 0)
+ else if(strcmp(post_msg,"btn_default") == 0)
{
TRACE("http.c: restoring factory settings");
@@ -683,7 +703,7 @@ static err_t http_recv(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err
rstc_start_software_reset(RSTC); // Software reset
while (1);
}
- else if(strcmp(http_msg,"save_ports") == 0)
+ else if(strcmp(post_msg,"save_ports") == 0)
{
// Save VLAN port associations
@@ -793,7 +813,7 @@ static err_t http_recv(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err
TRACE("http.c: unable to serve updated page - buffer at %d bytes", strlen(shared_buffer));
}
}
- else if(strcmp(http_msg,"btn_ofPage") == 0)
+ else if(strcmp(post_msg,"btn_ofPage") == 0)
{
// Display: Flows, Previous and Next flow page buttons
@@ -843,7 +863,7 @@ static err_t http_recv(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err
TRACE("http.c: unable to serve updated page - buffer at %d bytes", strlen(shared_buffer));
}
}
- else if(strcmp(http_msg,"btn_ofClear") == 0)
+ else if(strcmp(post_msg,"btn_ofClear") == 0)
{
// Display: Flows
// Clear the flow table
@@ -861,7 +881,7 @@ static err_t http_recv(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err
TRACE("http.c: unable to serve updated page - buffer at %d bytes", strlen(shared_buffer));
}
}
- else if(strcmp(http_msg,"btn_meterPage") == 0)
+ else if(strcmp(post_msg,"btn_meterPage") == 0)
{
// Display: Meters, Previous and Next meter page buttons
@@ -911,7 +931,7 @@ static err_t http_recv(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err
TRACE("http.c: unable to serve updated page - buffer at %d bytes", strlen(shared_buffer));
}
}
- else if(strcmp(http_msg,"save_vlan") == 0)
+ else if(strcmp(post_msg,"save_vlan") == 0)
{
// Config: VLANs, Add and Delete buttons
@@ -1092,7 +1112,7 @@ static err_t http_recv(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err
TRACE("http.c: unable to serve updated page - buffer at %d bytes", strlen(shared_buffer));
}
}
- else if(strcmp(http_msg,"save_of") == 0)
+ else if(strcmp(post_msg,"save_of") == 0)
{
// Config: OpenFlow, Save OpenFlow configuration
@@ -1264,10 +1284,7 @@ static err_t http_recv(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err
TRACE("http.c: unknown request: \"%s\"", http_msg);
}
}
- else
- {
- TRACE("http.c: unknown HTTP method received");
- }
+
}
}
else
@@ -1285,7 +1302,6 @@ static err_t http_recv(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err
TRACE("http.c: Closing TCP connection.");
tcp_close(pcb);
}
-
return ERR_OK;
}
@@ -1310,18 +1326,31 @@ void http_send(char *buffer, struct tcp_pcb *pcb, bool out)
err = tcp_write(pcb, buffer, len, TCP_WRITE_FLAG_COPY + TCP_WRITE_FLAG_MORE);
TRACE("http.c: tcp buffer %d/%d", len, buf_size);
- // Check if more data needs to be written
- if(out == true)
+ // Set to be closed after all the data has been sent
+ if(out == true)
{
- if (err == ERR_OK) tcp_output(pcb);
- TRACE("http.c: calling tcp_output & closing connection");
- tcp_close(pcb);
+ http_waiting_ack = len;
+ close_ready = pcb;
}
}
return;
}
+/*
+* HTTP Close function
+*
+* Parameters:
+* pcb - pcb of the connection to close
+*/
+void http_close(struct tcp_pcb *pcb)
+{
+ tcp_output(pcb);
+ TRACE("http.c: calling tcp_output & closing connection");
+ tcp_close(pcb);
+ close_ready = NULL;
+ return;
+}
/*
* Upload handler function
*
@@ -1750,6 +1779,7 @@ static uint8_t Config_Network(char *payload, int len)
{
int i = 0;
char *pdat;
+ payload[len] = '&';
memset(&http_msg, 0, sizeof(http_msg)); // Clear HTTP message array
From ca7e548743d4df426d0beb58ab80fbd8911e70dd Mon Sep 17 00:00:00 2001
From: Paul Zanna
Date: Sun, 12 Mar 2017 14:42:56 +1100
Subject: [PATCH 142/163] Revert "Fixed POST methods"
This reverts commit 07dac6aaa403ceeb871fb93230c8d439faf2443d.
---
ZodiacFX/ZodiacFX.cproj | 4 +-
ZodiacFX/ZodiacFX_6_2.cproj | 1647 +++++++++++++++++++++++++++++++++++
ZodiacFX_6_2.atsln | 20 +
3 files changed, 1669 insertions(+), 2 deletions(-)
create mode 100644 ZodiacFX/ZodiacFX_6_2.cproj
create mode 100644 ZodiacFX_6_2.atsln
diff --git a/ZodiacFX/ZodiacFX.cproj b/ZodiacFX/ZodiacFX.cproj
index 2f76e38..e3e4036 100644
--- a/ZodiacFX/ZodiacFX.cproj
+++ b/ZodiacFX/ZodiacFX.cproj
@@ -274,11 +274,11 @@
JTAG
com.atmel.avrdbg.tool.atmelice
- J41800009874
+ J41800058832
Atmel-ICE
JTAG
- J41800009874
+ J41800058832
0xA3CC0CE0
7500000
diff --git a/ZodiacFX/ZodiacFX_6_2.cproj b/ZodiacFX/ZodiacFX_6_2.cproj
new file mode 100644
index 0000000..879842d
--- /dev/null
+++ b/ZodiacFX/ZodiacFX_6_2.cproj
@@ -0,0 +1,1647 @@
+
+
+
+ 2.0
+ 6.2
+ com.Atmel.ARMGCC.C
+ {d48aa523-b6fa-4608-b329-ef580ba58eba}
+ ATSAM4E8C
+ sam4e
+ Executable
+ C
+ $(MSBuildProjectName)
+ .elf
+ $(MSBuildProjectDirectory)\$(Configuration)
+ ZodiacFX
+ ZodiacFX
+ ZodiacFX
+ Native
+ true
+ false
+ true
+ true
+ 0x20000000
+
+ true
+ exception_table
+ 2
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ com.atmel.avrdbg.tool.atmelice
+
+
+
+
+ JTAG
+
+ com.atmel.avrdbg.tool.atmelice
+ J41800009874
+ Atmel-ICE
+
+ JTAG
+
+
+
+
+ True
+ True
+ True
+ True
+ True
+
+
+ NDEBUG
+ scanf=iscanf
+ BOARD=USER_BOARD
+ ARM_MATH_CM4=true
+ printf=iprintf
+ UDD_ENABLE
+
+
+ False
+
+
+ ../common/applications/user_application/user_board/config
+ ../src/config
+ ../src/ASF/thirdparty/CMSIS/Lib/GCC
+ ../src/ASF/common/utils
+ ../src
+ ../src/ASF/sam/utils/fpu
+ ../src/ASF/sam/utils
+ ../src/ASF/sam/utils/preprocessor
+ ../src/ASF/sam/utils/cmsis/sam4e/include
+ ../src/ASF/common/boards
+ ../src/ASF/sam/utils/header_files
+ ../src/ASF/common/boards/user_board
+ ../src/ASF/thirdparty/CMSIS/Include
+ ../src/ASF/sam/utils/cmsis/sam4e/source/templates
+ ../src/ASF/sam/drivers/pmc
+ ../src/ASF/common/services/clock
+ ../src/ASF/common/services/ioport
+ ../src/ASF/common/services/spi/sam_usart_spi
+ ../src/ASF/common/services/spi
+ ../src/ASF/common/services/twi
+ ../src/ASF/sam/drivers/twi
+ ../src/ASF/sam/drivers/usart
+ ../src/ASF/sam/drivers/gmac
+ ../src/ASF/sam/drivers/matrix
+ ../src/ASF/sam/drivers/pio
+ ../src/ASF/sam/drivers/rtc
+ ../src/ASF/common/services/sleepmgr
+ ../src/ASF/common/services/usb
+ ../src/ASF/common/services/usb/class/cdc
+ ../src/ASF/common/services/usb/class/cdc/device
+ ../src/ASF/common/services/usb/udc
+ ../src/ASF/common/utils/stdio/stdio_usb
+ ../src/ASF/sam/drivers/udp
+ ../src/ASF/sam/drivers/tc
+ ../src/ASF/common/services/spi/sam_spi
+ ../src/ASF/sam/drivers/spi
+ ../src/ASF/sam/drivers/rstc
+ ../src/lwip/include
+ ../src/lwip
+ ../src/lwip/include/ipv4
+ ../src/ASF/sam/drivers/afec
+ ../src/ASF/common/utils/membag
+
+
+ Optimize (-O1)
+ -fdata-sections
+ True
+ True
+ -pipe -fno-strict-aliasing -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror-implicit-function-declaration -Wpointer-arith -std=gnu99 -ffunction-sections -fdata-sections -Wchar-subscripts -Wcomment -Wformat=2 -Wimplicit-int -Wmain -Wparentheses -Wsequence-point -Wreturn-type -Wswitch -Wtrigraphs -Wunused -Wuninitialized -Wunknown-pragmas -Wfloat-equal -Wundef -Wshadow -Wbad-function-cast -Wwrite-strings -Wsign-compare -Waggregate-return -Wmissing-declarations -Wformat -Wmissing-format-attribute -Wno-deprecated-declarations -Wpacked -Wredundant-decls -Wnested-externs -Wlong-long -Wunreachable-code -Wcast-align --param max-inline-insns-single=500 -mfloat-abi=softfp -mfpu=fpv4-sp-d16
+
+
+ libarm_cortexM4lf_math_softfp
+ libm
+
+
+
+
+ ../cmsis/linkerScripts
+ ../src/ASF/thirdparty/CMSIS/Lib/GCC
+
+
+ True
+
+ -Wl,--entry=Reset_Handler -Wl,--cref -mthumb -T../src/ASF/sam/utils/linker_scripts/sam4e/sam4e8/gcc/flash.ld
+ -DARM_MATH_CM4=true -DBOARD=USER_BOARD -Dprintf=iprintf -Dscanf=iscanf -DUDD_ENABLE
+ False
+
+
+ ../common/applications/user_application/user_board/config
+ ../src/config
+ ../src/ASF/thirdparty/CMSIS/Lib/GCC
+ ../src/ASF/common/utils
+ ../src
+ ../src/ASF/sam/utils/fpu
+ ../src/ASF/sam/utils
+ ../src/ASF/sam/utils/preprocessor
+ ../src/ASF/sam/utils/cmsis/sam4e/include
+ ../src/ASF/common/boards
+ ../src/ASF/sam/utils/header_files
+ ../src/ASF/common/boards/user_board
+ ../src/ASF/thirdparty/CMSIS/Include
+ ../src/ASF/sam/utils/cmsis/sam4e/source/templates
+ ../src/ASF/sam/drivers/pmc
+ ../src/ASF/common/services/clock
+ ../src/ASF/common/services/ioport
+ ../src/ASF/common/services/spi/sam_usart_spi
+ ../src/ASF/common/services/spi
+ ../src/ASF/common/services/twi
+ ../src/ASF/sam/drivers/twi
+ ../src/ASF/sam/drivers/usart
+ ../src/ASF/sam/drivers/gmac
+ ../src/ASF/sam/drivers/matrix
+ ../src/ASF/sam/drivers/pio
+ ../src/ASF/sam/drivers/rtc
+ ../src/ASF/common/services/sleepmgr
+ ../src/ASF/common/services/usb
+ ../src/ASF/common/services/usb/class/cdc
+ ../src/ASF/common/services/usb/class/cdc/device
+ ../src/ASF/common/services/usb/udc
+ ../src/ASF/common/utils/stdio/stdio_usb
+ ../src/ASF/sam/drivers/udp
+ ../src/ASF/sam/drivers/tc
+ ../src/ASF/common/services/spi/sam_spi
+ ../src/ASF/sam/drivers/spi
+ ../src/ASF/sam/drivers/rstc
+ ../src/ASF/sam/drivers/afec
+ ../src/ASF/common/utils/membag
+
+
+
+
+
+
+
+
+ True
+ True
+ True
+ True
+ True
+
+
+ DEBUG
+ scanf=iscanf
+ BOARD=USER_BOARD
+ ARM_MATH_CM4=true
+ printf=iprintf
+ UDD_ENABLE
+
+
+ False
+
+
+ ../common/applications/user_application/user_board/config
+ ../src/config
+ ../src/ASF/thirdparty/CMSIS/Lib/GCC
+ ../src/ASF/common/utils
+ ../src
+ ../src/ASF/sam/utils/fpu
+ ../src/ASF/sam/utils
+ ../src/ASF/sam/utils/preprocessor
+ ../src/ASF/sam/utils/cmsis/sam4e/include
+ ../src/ASF/common/boards
+ ../src/ASF/sam/utils/header_files
+ ../src/ASF/common/boards/user_board
+ ../src/ASF/thirdparty/CMSIS/Include
+ ../src/ASF/sam/utils/cmsis/sam4e/source/templates
+ ../src/ASF/sam/drivers/pmc
+ ../src/ASF/common/services/clock
+ ../src/ASF/common/services/ioport
+ ../src/ASF/common/services/spi/sam_usart_spi
+ ../src/ASF/common/services/spi
+ ../src/ASF/common/services/twi
+ ../src/ASF/sam/drivers/twi
+ ../src/ASF/sam/drivers/usart
+ ../src/ASF/sam/drivers/gmac
+ ../src/ASF/sam/drivers/matrix
+ ../src/ASF/sam/drivers/pio
+ ../src/ASF/sam/drivers/rtc
+ ../src/ASF/common/services/sleepmgr
+ ../src/ASF/common/services/usb
+ ../src/ASF/common/services/usb/class/cdc
+ ../src/ASF/common/services/usb/class/cdc/device
+ ../src/ASF/common/services/usb/udc
+ ../src/ASF/common/utils/stdio/stdio_usb
+ ../src/ASF/sam/drivers/udp
+ ../src/lwip
+ ../src/lwip/include
+ ../src/lwip/include/ipv4
+ ../src/ASF/sam/drivers/tc
+ ../src/ASF/common/services/spi/sam_spi
+ ../src/ASF/sam/drivers/spi
+ ../src/ASF/sam/drivers/rstc
+ ../src/ASF/sam/drivers/afec
+ ../src/ASF/common/utils/membag
+
+
+ -fdata-sections
+ True
+ Maximum (-g3)
+ True
+ -pipe -fno-strict-aliasing -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror-implicit-function-declaration -Wpointer-arith -std=gnu99 -ffunction-sections -fdata-sections -Wchar-subscripts -Wcomment -Wformat=2 -Wimplicit-int -Wmain -Wparentheses -Wsequence-point -Wreturn-type -Wswitch -Wtrigraphs -Wunused -Wuninitialized -Wunknown-pragmas -Wfloat-equal -Wundef -Wshadow -Wbad-function-cast -Wwrite-strings -Wsign-compare -Waggregate-return -Wmissing-declarations -Wformat -Wmissing-format-attribute -Wno-deprecated-declarations -Wpacked -Wredundant-decls -Wnested-externs -Wlong-long -Wunreachable-code -Wcast-align --param max-inline-insns-single=500 -mfloat-abi=softfp -mfpu=fpv4-sp-d16
+
+
+ libarm_cortexM4lf_math_softfp
+ libm
+
+
+
+
+ ../cmsis/linkerScripts
+ ../src/ASF/thirdparty/CMSIS/Lib/GCC
+
+
+ True
+
+ -Wl,--entry=Reset_Handler -Wl,--cref -mthumb -T../src/ASF/sam/utils/linker_scripts/sam4e/sam4e8/gcc/flash.ld
+ Default (-g)
+ -DARM_MATH_CM4=true -DBOARD=USER_BOARD -Dprintf=iprintf -Dscanf=iscanf -DUDD_ENABLE
+ False
+
+
+ ../common/applications/user_application/user_board/config
+ ../src/config
+ ../src/ASF/thirdparty/CMSIS/Lib/GCC
+ ../src/ASF/common/utils
+ ../src
+ ../src/ASF/sam/utils/fpu
+ ../src/ASF/sam/utils
+ ../src/ASF/sam/utils/preprocessor
+ ../src/ASF/sam/utils/cmsis/sam4e/include
+ ../src/ASF/common/boards
+ ../src/ASF/sam/utils/header_files
+ ../src/ASF/common/boards/user_board
+ ../src/ASF/thirdparty/CMSIS/Include
+ ../src/ASF/sam/utils/cmsis/sam4e/source/templates
+ ../src/ASF/sam/drivers/pmc
+ ../src/ASF/common/services/clock
+ ../src/ASF/common/services/ioport
+ ../src/ASF/common/services/spi/sam_usart_spi
+ ../src/ASF/common/services/spi
+ ../src/ASF/common/services/twi
+ ../src/ASF/sam/drivers/twi
+ ../src/ASF/sam/drivers/usart
+ ../src/ASF/sam/drivers/gmac
+ ../src/ASF/sam/drivers/matrix
+ ../src/ASF/sam/drivers/pio
+ ../src/ASF/sam/drivers/rtc
+ ../src/ASF/common/services/sleepmgr
+ ../src/ASF/common/services/usb
+ ../src/ASF/common/services/usb/class/cdc
+ ../src/ASF/common/services/usb/class/cdc/device
+ ../src/ASF/common/services/usb/udc
+ ../src/ASF/common/utils/stdio/stdio_usb
+ ../src/ASF/sam/drivers/udp
+ ../src/ASF/sam/drivers/tc
+ ../src/ASF/common/services/spi/sam_spi
+ ../src/ASF/sam/drivers/spi
+ ../src/ASF/sam/drivers/rstc
+ ../src/ASF/sam/drivers/afec
+ ../src/ASF/common/utils/membag
+
+
+ Default (-Wa,-g)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+
+
\ No newline at end of file
diff --git a/ZodiacFX_6_2.atsln b/ZodiacFX_6_2.atsln
new file mode 100644
index 0000000..09d4d81
--- /dev/null
+++ b/ZodiacFX_6_2.atsln
@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Atmel Studio Solution File, Format Version 11.00
+Project("{54F91283-7BC4-4236-8FF9-10F437C3AD48}") = "ZodiacFX", "ZodiacFX\ZodiacFX_6_2.cproj", "{D48AA523-B6FA-4608-B329-EF580BA58EBA}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|ARM = Debug|ARM
+ Release|ARM = Release|ARM
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {D48AA523-B6FA-4608-B329-EF580BA58EBA}.Debug|ARM.ActiveCfg = Debug|ARM
+ {D48AA523-B6FA-4608-B329-EF580BA58EBA}.Debug|ARM.Build.0 = Debug|ARM
+ {D48AA523-B6FA-4608-B329-EF580BA58EBA}.Release|ARM.ActiveCfg = Release|ARM
+ {D48AA523-B6FA-4608-B329-EF580BA58EBA}.Release|ARM.Build.0 = Release|ARM
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
From daf026777d094fb0969ec4b7f2c6c58b1e4ad186 Mon Sep 17 00:00:00 2001
From: Kristopher Chen
Date: Tue, 14 Mar 2017 14:45:32 +1100
Subject: [PATCH 143/163] Add http connection handling
---
ZodiacFX/src/http.c | 41 +++++++++++++++++++++++++++++++++--------
ZodiacFX/src/http.h | 7 +++++++
2 files changed, 40 insertions(+), 8 deletions(-)
diff --git a/ZodiacFX/src/http.c b/ZodiacFX/src/http.c
index f9a06b1..a4e55dd 100644
--- a/ZodiacFX/src/http.c
+++ b/ZodiacFX/src/http.c
@@ -84,12 +84,11 @@ static uint8_t meterBase = 0; // Current set of meters to display
static struct tcp_pcb * upload_pcb; // Firmware upload connection check (pcb pointer)
static int upload_port = 0;
static int upload_timer = 0; // Timer for firmware upload timeout
+static struct http_conns http_conn[MAX_CONN]; // http connection status
// Flag variables
static bool restart_required = false; // Track if any configuration changes are pending a restart
static bool file_upload = false; // Multi-part firmware file upload flag
-static int http_waiting_ack = 0;
-static struct tcp_pcb *close_ready = NULL;
static bool post_pending = false;
static err_t http_recv(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err);
@@ -184,8 +183,16 @@ static err_t http_accept(void *arg, struct tcp_pcb *pcb, err_t err)
static err_t http_sent(void *arg, struct tcp_pcb *tpcb, uint16_t len)
{
TRACE("http.c: [http_sent] %d bytes sent", len);
- http_waiting_ack -= len;
- if (http_waiting_ack == 0 && close_ready != NULL) http_close(close_ready);
+ for(int i=0; i
Date: Tue, 14 Mar 2017 15:13:05 +1100
Subject: [PATCH 144/163] Adjust http connection management
---
ZodiacFX/src/http.c | 34 +++++++++++++++++++++++-----------
1 file changed, 23 insertions(+), 11 deletions(-)
diff --git a/ZodiacFX/src/http.c b/ZodiacFX/src/http.c
index a4e55dd..d9c2882 100644
--- a/ZodiacFX/src/http.c
+++ b/ZodiacFX/src/http.c
@@ -189,6 +189,11 @@ static err_t http_sent(void *arg, struct tcp_pcb *tpcb, uint16_t len)
{
TRACE("http.c: pcb 0x%08x waiting on (%d down to %d) bytes", http_conn[i].attached_pcb, http_conn[i].bytes_waiting, http_conn[i].bytes_waiting - len);
http_conn[i].bytes_waiting -= len;
+ if(http_conn[i].bytes_waiting < 0)
+ {
+ TRACE("http.c: ERROR - illegal bytes_waiting value. Connection will be closed.");
+ http_close(http_conn[i].attached_pcb);
+ }
if (http_conn[i].bytes_waiting == 0 && http_conn[i].attached_pcb != NULL) http_close(http_conn[i].attached_pcb);
break;
}
@@ -1333,19 +1338,26 @@ void http_send(char *buffer, struct tcp_pcb *pcb, bool out)
err = tcp_write(pcb, buffer, len, TCP_WRITE_FLAG_COPY + TCP_WRITE_FLAG_MORE);
TRACE("http.c: tcp buffer %d/%d", len, buf_size);
- // Set to be closed after all the data has been sent
- if(out == true)
+ // Check if data is a part of a larger write
+ for(int i=0; i
Date: Tue, 14 Mar 2017 16:02:51 +1100
Subject: [PATCH 145/163] Add outer restart flag
---
ZodiacFX/src/command.c | 10 ++++++++++
ZodiacFX/src/http.c | 12 +++++++-----
2 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/ZodiacFX/src/command.c b/ZodiacFX/src/command.c
index 85af4f2..29dccd1 100644
--- a/ZodiacFX/src/command.c
+++ b/ZodiacFX/src/command.c
@@ -74,6 +74,7 @@ extern int totaltime;
extern int32_t ul_temp;
extern int OF_Version;
extern uint32_t uid_buf[4];
+extern bool restart_required_outer;
// Local Variables
bool showintro = true;
@@ -138,6 +139,15 @@ void task_command(char *str, char *str_last)
char *param3;
char *pch;
+ if(restart_required_outer == true)
+ {
+ printf("Restarting the Zodiac FX, please reopen your terminal application.\r\n");
+ for(int x = 0;x<100000;x++); // Let the above message get sent to the terminal before detaching
+ udc_detach(); // Detach the USB device before restart
+ rstc_start_software_reset(RSTC); // Software reset
+ while (1);
+ }
+
while(udi_cdc_is_rx_ready()){
ch = udi_cdc_getc();
diff --git a/ZodiacFX/src/http.c b/ZodiacFX/src/http.c
index d9c2882..a6c354a 100644
--- a/ZodiacFX/src/http.c
+++ b/ZodiacFX/src/http.c
@@ -87,6 +87,7 @@ static int upload_timer = 0; // Timer for firmware upload timeout
static struct http_conns http_conn[MAX_CONN]; // http connection status
// Flag variables
+bool restart_required_outer = false;
static bool restart_required = false; // Track if any configuration changes are pending a restart
static bool file_upload = false; // Multi-part firmware file upload flag
static bool post_pending = false;
@@ -200,11 +201,12 @@ static err_t http_sent(void *arg, struct tcp_pcb *tpcb, uint16_t len)
}
if(restart_required == true)
{
- TRACE("http.c: restarting the Zodiac FX. Please reconnect.");
- for(int x = 0;x<100000;x++); // Let the above message get sent to the terminal before detaching
- udc_detach(); // Detach the USB device before restart
- rstc_start_software_reset(RSTC); // Software reset
- while (1);
+ restart_required_outer = true;
+ //TRACE("http.c: restarting the Zodiac FX. Please reconnect.");
+ //for(int x = 0;x<100000;x++); // Let the above message get sent to the terminal before detaching
+ //udc_detach(); // Detach the USB device before restart
+ //rstc_start_software_reset(RSTC); // Software reset
+ //while (1);
}
return ERR_OK;
From 95554a99d01588597c571236877fb25f6fc608c3 Mon Sep 17 00:00:00 2001
From: Kristopher Chen
Date: Tue, 14 Mar 2017 16:25:13 +1100
Subject: [PATCH 146/163] Add connection timeout
---
ZodiacFX/src/http.c | 10 ++++++++++
ZodiacFX/src/http.h | 1 +
2 files changed, 11 insertions(+)
diff --git a/ZodiacFX/src/http.c b/ZodiacFX/src/http.c
index a6c354a..a9cc389 100644
--- a/ZodiacFX/src/http.c
+++ b/ZodiacFX/src/http.c
@@ -195,9 +195,19 @@ static err_t http_sent(void *arg, struct tcp_pcb *tpcb, uint16_t len)
TRACE("http.c: ERROR - illegal bytes_waiting value. Connection will be closed.");
http_close(http_conn[i].attached_pcb);
}
+ http_conn[i].timeout = sys_get_ms(); // Update timeout timer
if (http_conn[i].bytes_waiting == 0 && http_conn[i].attached_pcb != NULL) http_close(http_conn[i].attached_pcb);
break;
}
+
+ if(http_conn[i].attached_pcb != NULL)
+ {
+ if(sys_get_ms() - http_conn[i].timeout > 3000) // 3s connection timeout
+ {
+ TRACE("http.c: pcb 0x%08x has timed out. Connection will be closed.", http_conn[i].attached_pcb);
+ http_close(http_conn[i].attached_pcb);
+ }
+ }
}
if(restart_required == true)
{
diff --git a/ZodiacFX/src/http.h b/ZodiacFX/src/http.h
index ed114ec..fac8f53 100644
--- a/ZodiacFX/src/http.h
+++ b/ZodiacFX/src/http.h
@@ -41,6 +41,7 @@ struct http_conns
{
int bytes_waiting;
struct tcp_pcb *attached_pcb;
+ uint32_t timeout;
};
void http_init(void);
From f61794a8687ea652c5654884e320534b37d5673f Mon Sep 17 00:00:00 2001
From: Kristopher Chen
Date: Fri, 17 Mar 2017 13:59:53 +1100
Subject: [PATCH 147/163] Update ZodiacFX Readme
---
README.md | 113 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 111 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 843da31..ad27095 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,111 @@
-# ZodiacFX
-Firmware for the Northbound Networks Zodiac FX OpenFlow Switch
+# Zodiac FX
+
+## Background
+
+The Zodiac FX began as a [Kickstarter campaign](https://www.kickstarter.com/projects/northboundnetworks/zodiac-fx-the-worlds-smallest-openflow-sdn-switch) in 2015, with the goal of providing affordable Software Defined Networking (SDN) tools for developers, researchers, and networking hobbyists. To learn more about SDN, visit the [Northbound Networks Blog](https://northboundnetworks.com/blogs/sdn).
+
+The device is an SDN switch that supports the [OpenFlow protocol](https://www.opennetworking.org/sdn-resources/openflow), an open standard for communication in an SDN architecture. OpenFlow allows communication between the SDN controller (where applications can be run) and OpenFlow switches in the network. These switches use application-generated "Flows" to determine how network data processed.
+
+This repository contains the open-source firmware for the Zodiac FX. The firmware is constantly being updated to add support for the features of the OpenFlow specification, and to improve support for the various SDN controllers. OpenFlow version 1.0 and version 1.3 are currently supported.
+
+## Flashing/Updating the Firmware
+
+The latest firmware is available in the [Northbound Networks Forums](http://forums.northboundnetworks.com/index.php?topic=52.0).
+
+Starting from version 0.80, Zodiac FX supports firmware updates via the CLI and web interface. In order to make this possible, major changes were made to the firmware flashing process. Follow the update process below, based on your current firmware version.
+
+##### For firmware versions BEFORE version 0.80
+
+To update to version 0.80 or later, a full upgrade firmware needs to be flashed.
+
+Download the latest full upgrade firmware from the [Northbound Networks Forums](http://forums.northboundnetworks.com/index.php?topic=52.0) - 'Full Upgrade Firmware (v0.xx) - ZodiacFX_v0_xx.bin'
+
+Follow the firmware update process detailed in Section 2. Updating Firmware in the [Zodiac FX User Guide](http://forums.northboundnetworks.com/downloads/zodiac_fx/guides/ZodiacFX_UserGuide_0216.pdf).
+
+##### For firmware versions AFTER version 0.80
+
+The update process has been simplified for the newer releases.
+
+Download the latest update firmware from the [Northbound Networks Forums](http://forums.northboundnetworks.com/index.php?topic=52.0) - 'Update Firmware (v0.xx) - ZodiacFX_v0_xx.bin'
+
+* To update via the CLI:
+ • In the root context, type the 'update' command
+ • When prompted, begin the firmware update via the XMODEM protocol
+ • Note: not all serial terminal applications support XMODEM
+ • If the firmware update is successful, Zodiac FX will automatically restart to complete the update
+
+* To update via the web interface:
+ • Go to the 'Update f/w' page in the Zodiac FX web interface
+ • Note: the web interface is available by going to the Zodiac FX IP address in a web browser on the controller
+ • This feature is currently fully supported in Google Chrome
+ • Browse and select the downloaded firmware
+ • Click 'Upload File' and wait for a confirmation page to appear
+ • Click 'Restart' in the web interface header to complete the update
+
+* [Advanced] To update via cURL:
+ • Run 'Zodiac_FX_update.sh ZodiacFX_v0_xx.bin'
+ • If the firmware upload fails, you may need to run 'Zodiac_FX_update_compatibility.sh ZodiacFX_v0_xx.bin' instead
+ • Note: on some platforms, a manual restart may be required after uploading the firmware
+
+## Building the Project
+
+If you want to modify the firmware for your own project, either download this project or fork the repository.
+
+[Atmel Studio 7](https://www.atmel.com/Microsite/atmel-studio/) is required to build the project.
+
+##### Debugging the project
+
+For full source-level debugging, a [Zodiac FX Hardware Debugger](https://northboundnetworks.com/products/zodiac-fx-hardware-debugger) is required.
+
+* Ensure that the hardware debugger appears in Project -> ZodiacFX Properties -> Tool -> Selected debugger/programmer
+ * Zodiac FX uses the JTAG interface
+* Select the 'Debug' Solution Configuration in the Atmel Studio Standard toolbar
+ * The 'Release' configuration is designed for building firmware updates, and will not run directly from Atmel Studio
+* Select the 'Start Debugging and Break' option in the Debug menu to begin stepping through the source
+
+The firmware will continue to run by cycling power to the Zodiac FX (after removing the hardware debugger). However, firmware updating will not function correctly until a full upgrade firmware is flashed. The modified firmware can be written to the Zodiac FX by following the steps outlined below - running the code without a hardware debugger.
+
+##### Running the code without a hardware debugger
+
+Modified firmware can be tested without the Zodiac FX Hardware Debugger, however source-level debugging is not possible.
+
+* Build the 'Release' configuration of the ZodiacFX solution
+* Navigate to the compiled binary
+ * \ZodiacFX\Release\ZodiacFX.bin
+* Follow the steps in Signing Binaries to allow the Zodiac FX to update to the modified firmware
+
+## Signing Binaries
+
+The Zodiac FX uses a simple additive checksum to verify the integrity of the uploaded firmware.
+
+To sign your own modified firmware, follow the steps below:
+ • Build a 'Release' binary of the modified firmware
+ • Update the Zodiac FX with the modified firmware
+ • Follow the instructions outlined in Flashing/Updating the Firmware - For firmware versions AFTER version 0.80
+ • The firmware will fail the verification check, but will still be stored inside the Zodiac FX flash memory
+ • In the root context of the CLI, type in the hidden command 'get crc'
+ • Open the ZodiacFX.bin file in a hex editor, and append the 8 bytes to the end of the firmware file
+ • For example, if 'get crc' provides [A05A1201 00000000], append 'A0 5A 12 01 00 00 00 00' to the end of the firmware file
+ • Update the Zodiac FX with the (now signed) modified firmware
+ • The firmware update should be successful, and the Zodiac FX will run the new firmware after restarting
+
+Reporting Bugs and Issues
+
+Any bugs and issues can be brought up in the [Northbound Networks Forums](http://forums.northboundnetworks.com/index.php?board=3.0).
+
+Issues can also be [raised](https://github.com/NorthboundNetworks/ZodiacFX/issues) in this repository.
+
+## Release Notes
+
+Version 0.80
+* Firmware upload via CLI and web interface added
+* Metering added to OpenFlow 1.3
+
+## Authors
+
+* Paul Zanna - creator
+* Kristopher Chen - firmware developer
+
+## License
+
+GPL 3.0
From a4d0c59fb08f4df2299091787dff3850bdd3a900 Mon Sep 17 00:00:00 2001
From: Kristopher Chen
Date: Fri, 17 Mar 2017 14:03:53 +1100
Subject: [PATCH 148/163] Update Readme
---
README.md | 54 ++++++++++++++++++++++++++++--------------------------
1 file changed, 28 insertions(+), 26 deletions(-)
diff --git a/README.md b/README.md
index ad27095..4ade71f 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,7 @@
# Zodiac FX
+Firmware for the Northbound Networks Zodiac FX OpenFlow Switch
+
## Background
The Zodiac FX began as a [Kickstarter campaign](https://www.kickstarter.com/projects/northboundnetworks/zodiac-fx-the-worlds-smallest-openflow-sdn-switch) in 2015, with the goal of providing affordable Software Defined Networking (SDN) tools for developers, researchers, and networking hobbyists. To learn more about SDN, visit the [Northbound Networks Blog](https://northboundnetworks.com/blogs/sdn).
@@ -14,7 +16,7 @@ The latest firmware is available in the [Northbound Networks Forums](http://foru
Starting from version 0.80, Zodiac FX supports firmware updates via the CLI and web interface. In order to make this possible, major changes were made to the firmware flashing process. Follow the update process below, based on your current firmware version.
-##### For firmware versions BEFORE version 0.80
+#### For firmware versions BEFORE version 0.80
To update to version 0.80 or later, a full upgrade firmware needs to be flashed.
@@ -22,30 +24,30 @@ Download the latest full upgrade firmware from the [Northbound Networks Forums](
Follow the firmware update process detailed in Section 2. Updating Firmware in the [Zodiac FX User Guide](http://forums.northboundnetworks.com/downloads/zodiac_fx/guides/ZodiacFX_UserGuide_0216.pdf).
-##### For firmware versions AFTER version 0.80
+#### For firmware versions AFTER version 0.80
The update process has been simplified for the newer releases.
Download the latest update firmware from the [Northbound Networks Forums](http://forums.northboundnetworks.com/index.php?topic=52.0) - 'Update Firmware (v0.xx) - ZodiacFX_v0_xx.bin'
* To update via the CLI:
- • In the root context, type the 'update' command
- • When prompted, begin the firmware update via the XMODEM protocol
- • Note: not all serial terminal applications support XMODEM
- • If the firmware update is successful, Zodiac FX will automatically restart to complete the update
+ * In the root context, type the 'update' command
+ * When prompted, begin the firmware update via the XMODEM protocol
+ * Note: not all serial terminal applications support XMODEM
+ * If the firmware update is successful, Zodiac FX will automatically restart to complete the update
* To update via the web interface:
- • Go to the 'Update f/w' page in the Zodiac FX web interface
- • Note: the web interface is available by going to the Zodiac FX IP address in a web browser on the controller
- • This feature is currently fully supported in Google Chrome
- • Browse and select the downloaded firmware
- • Click 'Upload File' and wait for a confirmation page to appear
- • Click 'Restart' in the web interface header to complete the update
+ * Go to the 'Update f/w' page in the Zodiac FX web interface
+ * Note: the web interface is available by going to the Zodiac FX IP address in a web browser on the controller
+ * This feature is currently fully supported in Google Chrome
+ * Browse and select the downloaded firmware
+ * Click 'Upload File' and wait for a confirmation page to appear
+ * Click 'Restart' in the web interface header to complete the update
* [Advanced] To update via cURL:
- • Run 'Zodiac_FX_update.sh ZodiacFX_v0_xx.bin'
- • If the firmware upload fails, you may need to run 'Zodiac_FX_update_compatibility.sh ZodiacFX_v0_xx.bin' instead
- • Note: on some platforms, a manual restart may be required after uploading the firmware
+ * Run 'Zodiac_FX_update.sh ZodiacFX_v0_xx.bin'
+ * If the firmware upload fails, you may need to run 'Zodiac_FX_update_compatibility.sh ZodiacFX_v0_xx.bin' instead
+ * Note: on some platforms, a manual restart may be required after uploading the firmware
## Building the Project
@@ -53,7 +55,7 @@ If you want to modify the firmware for your own project, either download this pr
[Atmel Studio 7](https://www.atmel.com/Microsite/atmel-studio/) is required to build the project.
-##### Debugging the project
+#### Debugging the project
For full source-level debugging, a [Zodiac FX Hardware Debugger](https://northboundnetworks.com/products/zodiac-fx-hardware-debugger) is required.
@@ -65,7 +67,7 @@ For full source-level debugging, a [Zodiac FX Hardware Debugger](https://northbo
The firmware will continue to run by cycling power to the Zodiac FX (after removing the hardware debugger). However, firmware updating will not function correctly until a full upgrade firmware is flashed. The modified firmware can be written to the Zodiac FX by following the steps outlined below - running the code without a hardware debugger.
-##### Running the code without a hardware debugger
+#### Running the code without a hardware debugger
Modified firmware can be tested without the Zodiac FX Hardware Debugger, however source-level debugging is not possible.
@@ -79,15 +81,15 @@ Modified firmware can be tested without the Zodiac FX Hardware Debugger, however
The Zodiac FX uses a simple additive checksum to verify the integrity of the uploaded firmware.
To sign your own modified firmware, follow the steps below:
- • Build a 'Release' binary of the modified firmware
- • Update the Zodiac FX with the modified firmware
- • Follow the instructions outlined in Flashing/Updating the Firmware - For firmware versions AFTER version 0.80
- • The firmware will fail the verification check, but will still be stored inside the Zodiac FX flash memory
- • In the root context of the CLI, type in the hidden command 'get crc'
- • Open the ZodiacFX.bin file in a hex editor, and append the 8 bytes to the end of the firmware file
- • For example, if 'get crc' provides [A05A1201 00000000], append 'A0 5A 12 01 00 00 00 00' to the end of the firmware file
- • Update the Zodiac FX with the (now signed) modified firmware
- • The firmware update should be successful, and the Zodiac FX will run the new firmware after restarting
+ * Build a 'Release' binary of the modified firmware
+ * Update the Zodiac FX with the modified firmware
+ * Follow the instructions outlined in Flashing/Updating the Firmware - For firmware versions AFTER version 0.80
+ * The firmware will fail the verification check, but will still be stored inside the Zodiac FX flash memory
+ * In the root context of the CLI, type in the hidden command 'get crc'
+ * Open the ZodiacFX.bin file in a hex editor, and append the 8 bytes to the end of the firmware file
+ * For example, if 'get crc' provides [A05A1201 00000000], append 'A0 5A 12 01 00 00 00 00' to the end of the firmware file
+ * Update the Zodiac FX with the (now signed) modified firmware
+ * The firmware update should be successful, and the Zodiac FX will run the new firmware after restarting
Reporting Bugs and Issues
From f949d036231607a8e982bbd3dbd0079c9d086ba7 Mon Sep 17 00:00:00 2001
From: Kristopher Chen
Date: Fri, 17 Mar 2017 14:18:08 +1100
Subject: [PATCH 149/163] Update README.md
---
README.md | 54 +++++++++++++++++++++++++++---------------------------
1 file changed, 27 insertions(+), 27 deletions(-)
diff --git a/README.md b/README.md
index 4ade71f..ee8554a 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@ Firmware for the Northbound Networks Zodiac FX OpenFlow Switch
The Zodiac FX began as a [Kickstarter campaign](https://www.kickstarter.com/projects/northboundnetworks/zodiac-fx-the-worlds-smallest-openflow-sdn-switch) in 2015, with the goal of providing affordable Software Defined Networking (SDN) tools for developers, researchers, and networking hobbyists. To learn more about SDN, visit the [Northbound Networks Blog](https://northboundnetworks.com/blogs/sdn).
-The device is an SDN switch that supports the [OpenFlow protocol](https://www.opennetworking.org/sdn-resources/openflow), an open standard for communication in an SDN architecture. OpenFlow allows communication between the SDN controller (where applications can be run) and OpenFlow switches in the network. These switches use application-generated "Flows" to determine how network data processed.
+The Zodiac FX is an SDN switch that supports the [OpenFlow protocol](https://www.opennetworking.org/sdn-resources/openflow), an open standard for communication in an SDN architecture. OpenFlow allows communication between the SDN controller (where applications can be run) and OpenFlow switches in the network. These switches use application-generated "Flows" to determine how network data is processed.
This repository contains the open-source firmware for the Zodiac FX. The firmware is constantly being updated to add support for the features of the OpenFlow specification, and to improve support for the various SDN controllers. OpenFlow version 1.0 and version 1.3 are currently supported.
@@ -18,25 +18,25 @@ Starting from version 0.80, Zodiac FX supports firmware updates via the CLI and
#### For firmware versions BEFORE version 0.80
-To update to version 0.80 or later, a full upgrade firmware needs to be flashed.
+To update to version 0.80 or later, a **full upgrade firmware** needs to be flashed.
-Download the latest full upgrade firmware from the [Northbound Networks Forums](http://forums.northboundnetworks.com/index.php?topic=52.0) - 'Full Upgrade Firmware (v0.xx) - ZodiacFX_v0_xx.bin'
+Download the latest **full upgrade firmware** from the [Northbound Networks Forums](http://forums.northboundnetworks.com/index.php?topic=52.0) - 'Full Upgrade Firmware (v0.xx) - ZodiacFX_v0_xx.bin'
-Follow the firmware update process detailed in Section 2. Updating Firmware in the [Zodiac FX User Guide](http://forums.northboundnetworks.com/downloads/zodiac_fx/guides/ZodiacFX_UserGuide_0216.pdf).
+Follow the firmware update process detailed in **Section 2. Updating Firmware** in the [Zodiac FX User Guide](http://forums.northboundnetworks.com/downloads/zodiac_fx/guides/ZodiacFX_UserGuide_0216.pdf).
#### For firmware versions AFTER version 0.80
The update process has been simplified for the newer releases.
-Download the latest update firmware from the [Northbound Networks Forums](http://forums.northboundnetworks.com/index.php?topic=52.0) - 'Update Firmware (v0.xx) - ZodiacFX_v0_xx.bin'
+Download the latest **update firmware** from the [Northbound Networks Forums](http://forums.northboundnetworks.com/index.php?topic=52.0) - 'Update Firmware (v0.xx) - ZodiacFX_v0_xx.bin'
-* To update via the CLI:
+* **To update via the CLI**:
* In the root context, type the 'update' command
* When prompted, begin the firmware update via the XMODEM protocol
* Note: not all serial terminal applications support XMODEM
* If the firmware update is successful, Zodiac FX will automatically restart to complete the update
-* To update via the web interface:
+* **To update via the web interface**:
* Go to the 'Update f/w' page in the Zodiac FX web interface
* Note: the web interface is available by going to the Zodiac FX IP address in a web browser on the controller
* This feature is currently fully supported in Google Chrome
@@ -44,14 +44,14 @@ Download the latest update firmware from the [Northbound Networks Forums](http:/
* Click 'Upload File' and wait for a confirmation page to appear
* Click 'Restart' in the web interface header to complete the update
-* [Advanced] To update via cURL:
- * Run 'Zodiac_FX_update.sh ZodiacFX_v0_xx.bin'
- * If the firmware upload fails, you may need to run 'Zodiac_FX_update_compatibility.sh ZodiacFX_v0_xx.bin' instead
+* **[Advanced] To update via cURL**:
+ * Run ['Zodiac_FX_update.sh ZodiacFX_v0_xx.bin'](http://forums.northboundnetworks.com/index.php?topic=52.0)
+ * If the firmware upload fails, you may need to run ['Zodiac_FX_update_compatibility.sh ZodiacFX_v0_xx.bin'](http://forums.northboundnetworks.com/index.php?topic=52.0) instead
* Note: on some platforms, a manual restart may be required after uploading the firmware
## Building the Project
-If you want to modify the firmware for your own project, either download this project or fork the repository.
+If you want to modify the firmware for your own project, either download this project or fork this repository.
[Atmel Studio 7](https://www.atmel.com/Microsite/atmel-studio/) is required to build the project.
@@ -62,10 +62,10 @@ For full source-level debugging, a [Zodiac FX Hardware Debugger](https://northbo
* Ensure that the hardware debugger appears in Project -> ZodiacFX Properties -> Tool -> Selected debugger/programmer
* Zodiac FX uses the JTAG interface
* Select the 'Debug' Solution Configuration in the Atmel Studio Standard toolbar
- * The 'Release' configuration is designed for building firmware updates, and will not run directly from Atmel Studio
+ * The 'Release' configuration has been modified to build firmware updates, and will not run directly in Atmel Studio
* Select the 'Start Debugging and Break' option in the Debug menu to begin stepping through the source
-The firmware will continue to run by cycling power to the Zodiac FX (after removing the hardware debugger). However, firmware updating will not function correctly until a full upgrade firmware is flashed. The modified firmware can be written to the Zodiac FX by following the steps outlined below - running the code without a hardware debugger.
+The firmware will continue to run by cycling power to the Zodiac FX (after removing the hardware debugger). However, firmware updating will not function until a **full upgrade firmware** is flashed. The modified firmware can be written to the Zodiac FX by following the steps outlined below: **running the code without a hardware debugger**.
#### Running the code without a hardware debugger
@@ -81,17 +81,17 @@ Modified firmware can be tested without the Zodiac FX Hardware Debugger, however
The Zodiac FX uses a simple additive checksum to verify the integrity of the uploaded firmware.
To sign your own modified firmware, follow the steps below:
- * Build a 'Release' binary of the modified firmware
- * Update the Zodiac FX with the modified firmware
- * Follow the instructions outlined in Flashing/Updating the Firmware - For firmware versions AFTER version 0.80
- * The firmware will fail the verification check, but will still be stored inside the Zodiac FX flash memory
- * In the root context of the CLI, type in the hidden command 'get crc'
- * Open the ZodiacFX.bin file in a hex editor, and append the 8 bytes to the end of the firmware file
- * For example, if 'get crc' provides [A05A1201 00000000], append 'A0 5A 12 01 00 00 00 00' to the end of the firmware file
- * Update the Zodiac FX with the (now signed) modified firmware
- * The firmware update should be successful, and the Zodiac FX will run the new firmware after restarting
-
-Reporting Bugs and Issues
+* Build a 'Release' binary of the modified firmware
+* Update the Zodiac FX with the modified firmware
+ * Follow the instructions outlined in Flashing/Updating the Firmware - For firmware versions AFTER version 0.80
+* The firmware will fail the verification check, but will still be stored inside the Zodiac FX flash memory
+* In the root context of the CLI, type in the hidden command 'get crc'
+* Open the ZodiacFX.bin file in a hex editor, and append the 8 bytes to the end of the firmware file
+ * For example, if 'get crc' provides [A05A1201 00000000], append 'A0 5A 12 01 00 00 00 00' to the end of the firmware file
+* Update the Zodiac FX again with the (now signed) modified firmware
+* The firmware update should be successful, and the Zodiac FX will run the new firmware after restarting
+
+## Reporting Bugs and Issues
Any bugs and issues can be brought up in the [Northbound Networks Forums](http://forums.northboundnetworks.com/index.php?board=3.0).
@@ -99,14 +99,14 @@ Issues can also be [raised](https://github.com/NorthboundNetworks/ZodiacFX/issue
## Release Notes
-Version 0.80
+**Version 0.80**
* Firmware upload via CLI and web interface added
* Metering added to OpenFlow 1.3
## Authors
-* Paul Zanna - creator
-* Kristopher Chen - firmware developer
+* **Paul Zanna** - creator
+* **Kristopher Chen** - firmware developer
## License
From 1c6a659a42fa401f89015e44b2fb39dfafadf86b Mon Sep 17 00:00:00 2001
From: Paul Zanna
Date: Sat, 18 Mar 2017 23:24:03 +1100
Subject: [PATCH 150/163] Update README.md
---
README.md | 115 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 113 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 843da31..e292b63 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,113 @@
-# ZodiacFX
-Firmware for the Northbound Networks Zodiac FX OpenFlow Switch
+# Zodiac FX
+
+Firmware for the [Northbound Networks](https://northboundnetworks.com/) Zodiac FX OpenFlow Switch
+
+## Background
+
+The Zodiac FX began as a [Kickstarter campaign](https://www.kickstarter.com/projects/northboundnetworks/zodiac-fx-the-worlds-smallest-openflow-sdn-switch) in 2015, with the goal of providing an affordable Software Defined Networking (SDN) platform for developers, researchers, and networking hobbyists. To learn more about SDN, visit the [Northbound Networks Blog](https://northboundnetworks.com/blogs/sdn).
+
+The Zodiac FX is an SDN switch that supports the [OpenFlow protocol](https://www.opennetworking.org/sdn-resources/openflow), an open standard for communication in an SDN architecture. OpenFlow allows communication between the SDN controller (where applications can be run) and OpenFlow switches in the network. These switches use application-generated "Flows" to determine how network data is processed.
+
+This repository contains the open-source firmware for the Zodiac FX. The firmware is constantly being updated to add support for the features of the OpenFlow specification, and to improve support for the various SDN controllers. OpenFlow version 1.0 and version 1.3 are currently supported.
+
+## Flashing/Updating the Firmware
+
+The latest firmware is available in the [Northbound Networks Forums](http://forums.northboundnetworks.com/index.php?topic=52.0).
+
+Starting from version 0.80, Zodiac FX supports firmware updates via the CLI and web interface. In order to make this possible, major changes were made to the firmware flashing process. Follow the update process below, based on your current firmware version.
+
+#### For firmware versions BEFORE version 0.80
+
+To update to version 0.80 or later, a **full upgrade firmware** needs to be flashed.
+
+Download the latest **full upgrade firmware** from the [Northbound Networks Forums](http://forums.northboundnetworks.com/index.php?topic=52.0) - 'Full Upgrade Firmware (v0.xx) - ZodiacFX_v0_xx.bin'
+
+Follow the firmware update process detailed in **Section 2. Updating Firmware** in the [Zodiac FX User Guide](http://forums.northboundnetworks.com/downloads/zodiac_fx/guides/ZodiacFX_UserGuide_0216.pdf).
+
+#### For firmware versions AFTER version 0.80
+
+The update process has been simplified for the newer releases.
+
+Download the latest **update firmware** from the [Northbound Networks Forums](http://forums.northboundnetworks.com/index.php?topic=52.0) - 'Update Firmware (v0.xx) - ZodiacFX_v0_xx.bin'
+
+* **To update via the CLI**:
+ * In the root context, type the 'update' command
+ * When prompted, begin the firmware update via the XMODEM protocol
+ * Note: not all serial terminal applications support XMODEM
+ * If the firmware update is successful, Zodiac FX will automatically restart to complete the update
+
+* **To update via the web interface**:
+ * Go to the 'Update f/w' page in the Zodiac FX web interface
+ * Note: the web interface is available by going to the Zodiac FX IP address in a web browser on the controller
+ * This feature is currently fully supported in Google Chrome
+ * Browse and select the downloaded firmware
+ * Click 'Upload File' and wait for a confirmation page to appear
+ * Click 'Restart' in the web interface header to complete the update
+
+* **[Advanced] To update via cURL**:
+ * Run ['Zodiac_FX_update.sh ZodiacFX_v0_xx.bin'](http://forums.northboundnetworks.com/index.php?topic=52.0)
+ * If the firmware upload fails, you may need to run ['Zodiac_FX_update_compatibility.sh ZodiacFX_v0_xx.bin'](http://forums.northboundnetworks.com/index.php?topic=52.0) instead
+ * Note: on some platforms, a manual restart may be required after uploading the firmware
+
+## Building the Project
+
+If you want to modify the firmware for your own project, either download this project or fork this repository.
+
+[Atmel Studio 7](https://www.atmel.com/Microsite/atmel-studio/) is required to build the project.
+
+#### Debugging the project
+
+For full source-level debugging, a [Zodiac FX Hardware Debugger](https://northboundnetworks.com/products/zodiac-fx-hardware-debugger) is required.
+
+* Ensure that the hardware debugger appears in Project -> ZodiacFX Properties -> Tool -> Selected debugger/programmer
+ * Zodiac FX uses the JTAG interface
+* Select the 'Debug' Solution Configuration in the Atmel Studio Standard toolbar
+ * The 'Release' configuration has been modified to build firmware updates, and will not run directly in Atmel Studio
+* Select the 'Start Debugging and Break' option in the Debug menu to begin stepping through the source
+
+The firmware will continue to run by cycling power to the Zodiac FX (after removing the hardware debugger). However, firmware updating will not function until a **full upgrade firmware** is flashed. The modified firmware can be written to the Zodiac FX by following the steps outlined below: **running the code without a hardware debugger**.
+
+#### Running the code without a hardware debugger
+
+Modified firmware can be tested without the Zodiac FX Hardware Debugger, however source-level debugging is not possible.
+
+* Build the 'Release' configuration of the ZodiacFX solution
+* Navigate to the compiled binary
+ * \ZodiacFX\Release\ZodiacFX.bin
+* Follow the steps in Signing Binaries to allow the Zodiac FX to update to the modified firmware
+
+## Signing Binaries
+
+The Zodiac FX uses a simple additive checksum to verify the integrity of the uploaded firmware.
+
+To sign your own modified firmware, follow the steps below:
+* Build a 'Release' binary of the modified firmware
+* Update the Zodiac FX with the modified firmware
+ * Follow the instructions outlined in Flashing/Updating the Firmware - For firmware versions AFTER version 0.80
+* The firmware will fail the verification check, but will still be stored inside the Zodiac FX flash memory
+* In the root context of the CLI, type in the hidden command 'get crc'
+* Open the ZodiacFX.bin file in a hex editor, and append the 8 bytes to the end of the firmware file
+ * For example, if 'get crc' provides [A05A1201 00000000], append 'A0 5A 12 01 00 00 00 00' to the end of the firmware file
+* Update the Zodiac FX again with the (now signed) modified firmware
+* The firmware update should be successful, and the Zodiac FX will run the new firmware after restarting
+
+## Reporting Bugs and Issues
+
+Any bugs and issues can be brought up in the [Northbound Networks Forums](http://forums.northboundnetworks.com/index.php?board=3.0).
+
+Issues can also be [raised](https://github.com/NorthboundNetworks/ZodiacFX/issues) in this repository.
+
+## Release Notes
+
+**Version 0.80**
+* Firmware upload via CLI and web interface added
+* Metering added to OpenFlow 1.3
+
+## Authors
+
+* **Paul Zanna** - creator
+* **Kristopher Chen** - firmware developer
+
+## License
+
+GPL 3.0
From d8b70ec0bf1e3b9148f6f2ac4dc7b7b18b48d681 Mon Sep 17 00:00:00 2001
From: Paul Zanna
Date: Sat, 18 Mar 2017 23:34:11 +1100
Subject: [PATCH 151/163] Update README.md
---
README.md | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/README.md b/README.md
index e292b63..1509fa1 100644
--- a/README.md
+++ b/README.md
@@ -1,14 +1,14 @@
-# Zodiac FX
+# Zodiac FX Firmware
-Firmware for the [Northbound Networks](https://northboundnetworks.com/) Zodiac FX OpenFlow Switch
+This is the firmware for the [Northbound Networks](https://northboundnetworks.com/) Zodiac FX OpenFlow Switch.
## Background
The Zodiac FX began as a [Kickstarter campaign](https://www.kickstarter.com/projects/northboundnetworks/zodiac-fx-the-worlds-smallest-openflow-sdn-switch) in 2015, with the goal of providing an affordable Software Defined Networking (SDN) platform for developers, researchers, and networking hobbyists. To learn more about SDN, visit the [Northbound Networks Blog](https://northboundnetworks.com/blogs/sdn).
-The Zodiac FX is an SDN switch that supports the [OpenFlow protocol](https://www.opennetworking.org/sdn-resources/openflow), an open standard for communication in an SDN architecture. OpenFlow allows communication between the SDN controller (where applications can be run) and OpenFlow switches in the network. These switches use application-generated "Flows" to determine how network data is processed.
+The Zodiac FX SDN switch uses the [OpenFlow protocol](https://www.opennetworking.org/sdn-resources/openflow), an open standard for communication in an SDN architecture. OpenFlow allows communication between the SDN controller (where applications can be run) and OpenFlow switches in the network. These switches use application-generated "Flows" to determine how network data is processed.
-This repository contains the open-source firmware for the Zodiac FX. The firmware is constantly being updated to add support for the features of the OpenFlow specification, and to improve support for the various SDN controllers. OpenFlow version 1.0 and version 1.3 are currently supported.
+This repository contains the entire open-source firmware for the Zodiac FX including OpenFlow libraries. The firmware is constantly being updated with support for features of the OpenFlow specification, and to improve compatability with the various SDN controllers. OpenFlow version 1.0 and version 1.3 are currently supported.
## Flashing/Updating the Firmware
@@ -105,9 +105,9 @@ Issues can also be [raised](https://github.com/NorthboundNetworks/ZodiacFX/issue
## Authors
-* **Paul Zanna** - creator
-* **Kristopher Chen** - firmware developer
+* **Paul Zanna** - Creator
+* **Kristopher Chen** - Firmware Developer
## License
-GPL 3.0
+[GPL 3.0](LICENSE)
From a41e950b8be10c4ab4ef0d8670be796b5888ae5c Mon Sep 17 00:00:00 2001
From: Kristopher Chen
Date: Mon, 20 Mar 2017 12:27:07 +1100
Subject: [PATCH 152/163] Fix CLI instruction list output
---
ZodiacFX/src/command.c | 45 ++++++++++++++++++------------------------
1 file changed, 19 insertions(+), 26 deletions(-)
diff --git a/ZodiacFX/src/command.c b/ZodiacFX/src/command.c
index 29dccd1..799eff5 100644
--- a/ZodiacFX/src/command.c
+++ b/ZodiacFX/src/command.c
@@ -1043,7 +1043,6 @@ void command_openflow(char *command, char *param1, char *param2, char *param3)
int match_size;
int inst_size;
int act_size;
- struct ofp13_instruction *inst_ptr;
struct ofp13_instruction_actions *inst_actions;
struct oxm_header13 oxm_header;
uint8_t oxm_value8;
@@ -1168,29 +1167,38 @@ void command_openflow(char *command, char *param1, char *param2, char *param3)
int min = t/60;
int sec = t%60;
printf(" Last Match: %02d:%02d:%02d\r\n", hr, min, sec);
+
// Print instruction list
if (ofp13_oxm_inst[i] != NULL)
{
+ // Get a list of all instructions for this flow
+ void *insts[8] = {0};
+ inst_size = 0;
+ while(inst_size < ofp13_oxm_inst_size[i]){
+ struct ofp13_instruction *inst_ptr = (struct ofp13_instruction *)(ofp13_oxm_inst[i] + inst_size);
+ insts[ntohs(inst_ptr->type)] = inst_ptr;
+ inst_size += ntohs(inst_ptr->len);
+ }
+
printf("\r Instructions:\r\n");
- inst_ptr = (struct ofp13_instruction *) ofp13_oxm_inst[i];
- inst_size = ntohs(inst_ptr->len);
// Check for optional metering instruction
- if(ntohs(inst_ptr->type) == OFPIT13_METER)
+ if(insts[OFPIT13_METER] != NULL)
{
- struct ofp13_instruction_meter *inst_meter = inst_ptr;
+ struct ofp13_instruction_meter *inst_meter = insts[OFPIT13_METER];
printf(" Meter: %d\r\n", ntohl(inst_meter->meter_id));
}
- if(ntohs(inst_ptr->type) == OFPIT13_APPLY_ACTIONS)
+ if(insts[OFPIT13_APPLY_ACTIONS] != NULL)
{
printf(" Apply Actions:\r\n");
struct ofp13_action_header *act_hdr;
act_size = 0;
- if (inst_size == sizeof(struct ofp13_instruction_actions)) printf(" DROP \r\n"); // No actions
- while (act_size < (inst_size - sizeof(struct ofp13_instruction_actions)))
+ inst_actions = insts[OFPIT13_APPLY_ACTIONS];
+ if (ntohs(inst_actions->len) == sizeof(struct ofp13_instruction_actions)) printf(" DROP \r\n"); // No actions
+ while (act_size < (ntohs(inst_actions->len) - sizeof(struct ofp13_instruction_actions)))
{
- inst_actions = ofp13_oxm_inst[i] + act_size;
+ inst_actions = insts[OFPIT13_APPLY_ACTIONS] + act_size;
act_hdr = &inst_actions->actions;
if (htons(act_hdr->type) == OFPAT13_OUTPUT)
{
@@ -1334,26 +1342,11 @@ void command_openflow(char *command, char *param1, char *param2, char *param3)
}
}
// Print goto table instruction
- if(ntohs(inst_ptr->type) == OFPIT13_GOTO_TABLE)
+ if(insts[OFPIT13_GOTO_TABLE] != NULL)
{
struct ofp13_instruction_goto_table *inst_goto_ptr;
- inst_goto_ptr = (struct ofp13_instruction_goto_table *) inst_ptr;
+ inst_goto_ptr = (struct ofp13_instruction_goto_table *) insts[OFPIT13_METER];
printf(" Goto Table: %d\r\n", inst_goto_ptr->table_id);
- continue;
- }
- // Is there more then one instruction?
- if (ofp13_oxm_inst_size[i] > inst_size)
- {
- uint8_t *nxt_inst;
- nxt_inst = ofp13_oxm_inst[i] + inst_size;
- inst_ptr = (struct ofp13_instruction *) nxt_inst;
- inst_size = ntohs(inst_ptr->len);
- if(ntohs(inst_ptr->type) == OFPIT13_GOTO_TABLE)
- {
- struct ofp13_instruction_goto_table *inst_goto_ptr;
- inst_goto_ptr = (struct ofp13_instruction_goto_table *) inst_ptr;
- printf(" Goto Table: %d\r\n", inst_goto_ptr->table_id);
- }
}
} else {
// No instructions
From 34efb5fcf7e011720530c5a25686ba0760f83973 Mon Sep 17 00:00:00 2001
From: Kristopher Chen
Date: Mon, 20 Mar 2017 12:38:27 +1100
Subject: [PATCH 153/163] Fix web interface instruction list output
---
ZodiacFX/src/http.c | 50 ++++++++++++++++++++-------------------------
1 file changed, 22 insertions(+), 28 deletions(-)
diff --git a/ZodiacFX/src/http.c b/ZodiacFX/src/http.c
index a9cc389..a2c7c33 100644
--- a/ZodiacFX/src/http.c
+++ b/ZodiacFX/src/http.c
@@ -3226,29 +3226,38 @@ if (iLastFlow > 0)
int min = t/60;
int sec = t%60;
snprintf(shared_buffer+strlen(shared_buffer), SHARED_BUFFER_LEN-strlen(shared_buffer)," Last Match: %02d:%02d:%02d\r\n", hr, min, sec);
+
// Print instruction list
if (ofp13_oxm_inst[i] != NULL)
{
+ // Get a list of all instructions for this flow
+ void *insts[8] = {0};
+ inst_size = 0;
+ while(inst_size < ofp13_oxm_inst_size[i]){
+ struct ofp13_instruction *inst_ptr = (struct ofp13_instruction *)(ofp13_oxm_inst[i] + inst_size);
+ insts[ntohs(inst_ptr->type)] = inst_ptr;
+ inst_size += ntohs(inst_ptr->len);
+ }
+
snprintf(shared_buffer+strlen(shared_buffer), SHARED_BUFFER_LEN-strlen(shared_buffer),"\r Instructions:\r\n");
- inst_ptr = (struct ofp13_instruction *) ofp13_oxm_inst[i];
- inst_size = ntohs(inst_ptr->len);
-
+
// Check for optional metering instruction
- if(ntohs(inst_ptr->type) == OFPIT13_METER)
+ if(insts[OFPIT13_METER] != NULL)
{
- struct ofp13_instruction_meter *inst_meter = inst_ptr;
- snprintf(shared_buffer+strlen(shared_buffer), SHARED_BUFFER_LEN-strlen(shared_buffer), " Meter: %d\r\n", ntohl(inst_meter->meter_id));
+ struct ofp13_instruction_meter *inst_meter = insts[OFPIT13_METER];
+ snprintf(shared_buffer+strlen(shared_buffer), SHARED_BUFFER_LEN-strlen(shared_buffer)," Meter: %d\r\n", ntohl(inst_meter->meter_id));
}
-
- if(ntohs(inst_ptr->type) == OFPIT13_APPLY_ACTIONS)
+
+ if(insts[OFPIT13_APPLY_ACTIONS] != NULL)
{
snprintf(shared_buffer+strlen(shared_buffer), SHARED_BUFFER_LEN-strlen(shared_buffer)," Apply Actions:\r\n");
struct ofp13_action_header *act_hdr;
act_size = 0;
- if (inst_size == sizeof(struct ofp13_instruction_actions)) snprintf(shared_buffer+strlen(shared_buffer), SHARED_BUFFER_LEN-strlen(shared_buffer)," DROP \r\n"); // No actions
- while (act_size < (inst_size - sizeof(struct ofp13_instruction_actions)))
+ inst_actions = insts[OFPIT13_APPLY_ACTIONS];
+ if (ntohs(inst_actions->len) == sizeof(struct ofp13_instruction_actions)) snprintf(shared_buffer+strlen(shared_buffer), SHARED_BUFFER_LEN-strlen(shared_buffer)," DROP \r\n"); // No actions
+ while (act_size < (ntohs(inst_actions->len) - sizeof(struct ofp13_instruction_actions)))
{
- inst_actions = ofp13_oxm_inst[i] + act_size;
+ inst_actions = insts[OFPIT13_APPLY_ACTIONS] + act_size;
act_hdr = &inst_actions->actions;
if (htons(act_hdr->type) == OFPAT13_OUTPUT)
{
@@ -3392,26 +3401,11 @@ if (iLastFlow > 0)
}
}
// Print goto table instruction
- if(ntohs(inst_ptr->type) == OFPIT13_GOTO_TABLE)
+ if(insts[OFPIT13_GOTO_TABLE] != NULL)
{
struct ofp13_instruction_goto_table *inst_goto_ptr;
- inst_goto_ptr = (struct ofp13_instruction_goto_table *) inst_ptr;
+ inst_goto_ptr = (struct ofp13_instruction_goto_table *) insts[OFPIT13_METER];
snprintf(shared_buffer+strlen(shared_buffer), SHARED_BUFFER_LEN-strlen(shared_buffer)," Goto Table: %d\r\n", inst_goto_ptr->table_id);
- continue;
- }
- // Is there more then one instruction?
- if (ofp13_oxm_inst_size[i] > inst_size)
- {
- uint8_t *nxt_inst;
- nxt_inst = ofp13_oxm_inst[i] + inst_size;
- inst_ptr = (struct ofp13_instruction *) nxt_inst;
- inst_size = ntohs(inst_ptr->len);
- if(ntohs(inst_ptr->type) == OFPIT13_GOTO_TABLE)
- {
- struct ofp13_instruction_goto_table *inst_goto_ptr;
- inst_goto_ptr = (struct ofp13_instruction_goto_table *) inst_ptr;
- snprintf(shared_buffer+strlen(shared_buffer), SHARED_BUFFER_LEN-strlen(shared_buffer)," Goto Table: %d\r\n", inst_goto_ptr->table_id);
- }
}
} else {
// No instructions
From 8bfe304c3b68e0600cb9504b3f8e4c4f319e659c Mon Sep 17 00:00:00 2001
From: Kristopher Chen
Date: Mon, 20 Mar 2017 12:38:58 +1100
Subject: [PATCH 154/163] Fix action instruction length check
---
ZodiacFX/src/openflow/openflow_13.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ZodiacFX/src/openflow/openflow_13.c b/ZodiacFX/src/openflow/openflow_13.c
index bf97447..7de7391 100644
--- a/ZodiacFX/src/openflow/openflow_13.c
+++ b/ZodiacFX/src/openflow/openflow_13.c
@@ -158,7 +158,7 @@ void nnOF13_tablelookup(uint8_t *p_uc_data, uint32_t *ul_size, int port)
bool recalculate_ip_checksum = false;
struct ofp13_instruction_actions *inst_actions = insts[OFPIT13_APPLY_ACTIONS];
int act_size = 0;
- while (act_size < (inst_size - sizeof(struct ofp13_instruction_actions)))
+ while (act_size < (ntohs(inst_actions->len) - sizeof(struct ofp13_instruction_actions)))
{
struct ofp13_action_header *act_hdr = (struct ofp13_action_header*)((uintptr_t)inst_actions->actions + act_size);
switch (htons(act_hdr->type))
From daf9bddec3ec1ae6873d8bd3771ac5554bed24a8 Mon Sep 17 00:00:00 2001
From: Kristopher Chen
Date: Mon, 20 Mar 2017 14:39:49 +1100
Subject: [PATCH 155/163] Fix goto table output
---
ZodiacFX/src/command.c | 2 +-
ZodiacFX/src/http.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ZodiacFX/src/command.c b/ZodiacFX/src/command.c
index 799eff5..8c83271 100644
--- a/ZodiacFX/src/command.c
+++ b/ZodiacFX/src/command.c
@@ -1345,7 +1345,7 @@ void command_openflow(char *command, char *param1, char *param2, char *param3)
if(insts[OFPIT13_GOTO_TABLE] != NULL)
{
struct ofp13_instruction_goto_table *inst_goto_ptr;
- inst_goto_ptr = (struct ofp13_instruction_goto_table *) insts[OFPIT13_METER];
+ inst_goto_ptr = (struct ofp13_instruction_goto_table *) insts[OFPIT13_GOTO_TABLE];
printf(" Goto Table: %d\r\n", inst_goto_ptr->table_id);
}
} else {
diff --git a/ZodiacFX/src/http.c b/ZodiacFX/src/http.c
index a2c7c33..299b6ef 100644
--- a/ZodiacFX/src/http.c
+++ b/ZodiacFX/src/http.c
@@ -3404,7 +3404,7 @@ if (iLastFlow > 0)
if(insts[OFPIT13_GOTO_TABLE] != NULL)
{
struct ofp13_instruction_goto_table *inst_goto_ptr;
- inst_goto_ptr = (struct ofp13_instruction_goto_table *) insts[OFPIT13_METER];
+ inst_goto_ptr = (struct ofp13_instruction_goto_table *) insts[OFPIT13_GOTO_TABLE];
snprintf(shared_buffer+strlen(shared_buffer), SHARED_BUFFER_LEN-strlen(shared_buffer)," Goto Table: %d\r\n", inst_goto_ptr->table_id);
}
} else {
From bd7e44345eb3f4105e0088b976832f6275630905 Mon Sep 17 00:00:00 2001
From: Kristopher Chen
Date: Mon, 20 Mar 2017 14:59:18 +1100
Subject: [PATCH 156/163] Fix multiple action output
---
ZodiacFX/src/command.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/ZodiacFX/src/command.c b/ZodiacFX/src/command.c
index 8c83271..864f33d 100644
--- a/ZodiacFX/src/command.c
+++ b/ZodiacFX/src/command.c
@@ -1198,8 +1198,7 @@ void command_openflow(char *command, char *param1, char *param2, char *param3)
if (ntohs(inst_actions->len) == sizeof(struct ofp13_instruction_actions)) printf(" DROP \r\n"); // No actions
while (act_size < (ntohs(inst_actions->len) - sizeof(struct ofp13_instruction_actions)))
{
- inst_actions = insts[OFPIT13_APPLY_ACTIONS] + act_size;
- act_hdr = &inst_actions->actions;
+ act_hdr = (struct ofp13_action_header*)((uintptr_t)inst_actions->actions + act_size);
if (htons(act_hdr->type) == OFPAT13_OUTPUT)
{
struct ofp13_action_output *act_output = act_hdr;
From 138a9376d934889a62d8c652d79b369550ab00f0 Mon Sep 17 00:00:00 2001
From: Kristopher Chen
Date: Mon, 20 Mar 2017 15:14:08 +1100
Subject: [PATCH 157/163] Fix multiple action output (web)
---
ZodiacFX/src/http.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/ZodiacFX/src/http.c b/ZodiacFX/src/http.c
index 299b6ef..fca726f 100644
--- a/ZodiacFX/src/http.c
+++ b/ZodiacFX/src/http.c
@@ -3257,8 +3257,7 @@ if (iLastFlow > 0)
if (ntohs(inst_actions->len) == sizeof(struct ofp13_instruction_actions)) snprintf(shared_buffer+strlen(shared_buffer), SHARED_BUFFER_LEN-strlen(shared_buffer)," DROP \r\n"); // No actions
while (act_size < (ntohs(inst_actions->len) - sizeof(struct ofp13_instruction_actions)))
{
- inst_actions = insts[OFPIT13_APPLY_ACTIONS] + act_size;
- act_hdr = &inst_actions->actions;
+ act_hdr = (struct ofp13_action_header*)((uintptr_t)inst_actions->actions + act_size);
if (htons(act_hdr->type) == OFPAT13_OUTPUT)
{
struct ofp13_action_output *act_output = act_hdr;
From 98e7780e7a02b516b0fbe125ddac1b1878c81a6a Mon Sep 17 00:00:00 2001
From: Paul Zanna
Date: Mon, 20 Mar 2017 15:28:45 +1100
Subject: [PATCH 158/163] Update README.md
---
README.md | 4 ----
1 file changed, 4 deletions(-)
diff --git a/README.md b/README.md
index f0b63bd..4b572c1 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,3 @@
-<<<<<<< HEAD
# Zodiac FX
Firmware for the Northbound Networks Zodiac FX OpenFlow Switch
@@ -22,7 +21,6 @@ The Zodiac FX began as a [Kickstarter campaign](https://www.kickstarter.com/proj
The Zodiac FX SDN switch uses the [OpenFlow protocol](https://www.opennetworking.org/sdn-resources/openflow), an open standard for communication in an SDN architecture. OpenFlow allows communication between the SDN controller (where applications can be run) and OpenFlow switches in the network. These switches use application-generated "Flows" to determine how network data is processed.
This repository contains the entire open-source firmware for the Zodiac FX including OpenFlow libraries. The firmware is constantly being updated with support for features of the OpenFlow specification, and to improve compatability with the various SDN controllers. OpenFlow version 1.0 and version 1.3 are currently supported.
->>>>>>> refs/remotes/pzanna/Dev_80
## Flashing/Updating the Firmware
@@ -119,7 +117,6 @@ Issues can also be [raised](https://github.com/NorthboundNetworks/ZodiacFX/issue
## Authors
-<<<<<<< HEAD
* **Paul Zanna** - creator
* **Kristopher Chen** - firmware developer
@@ -133,4 +130,3 @@ GPL 3.0
## License
[GPL 3.0](LICENSE)
->>>>>>> refs/remotes/pzanna/Dev_80
From 96f1bb2913d68e7ea71ecf91eec3301570e4d910 Mon Sep 17 00:00:00 2001
From: Paul Zanna
Date: Mon, 20 Mar 2017 15:30:52 +1100
Subject: [PATCH 159/163] Update README.md
---
README.md | 19 -------------------
1 file changed, 19 deletions(-)
diff --git a/README.md b/README.md
index 4b572c1..1509fa1 100644
--- a/README.md
+++ b/README.md
@@ -1,15 +1,3 @@
-# Zodiac FX
-
-Firmware for the Northbound Networks Zodiac FX OpenFlow Switch
-
-## Background
-
-The Zodiac FX began as a [Kickstarter campaign](https://www.kickstarter.com/projects/northboundnetworks/zodiac-fx-the-worlds-smallest-openflow-sdn-switch) in 2015, with the goal of providing affordable Software Defined Networking (SDN) tools for developers, researchers, and networking hobbyists. To learn more about SDN, visit the [Northbound Networks Blog](https://northboundnetworks.com/blogs/sdn).
-
-The Zodiac FX is an SDN switch that supports the [OpenFlow protocol](https://www.opennetworking.org/sdn-resources/openflow), an open standard for communication in an SDN architecture. OpenFlow allows communication between the SDN controller (where applications can be run) and OpenFlow switches in the network. These switches use application-generated "Flows" to determine how network data is processed.
-
-This repository contains the open-source firmware for the Zodiac FX. The firmware is constantly being updated to add support for the features of the OpenFlow specification, and to improve support for the various SDN controllers. OpenFlow version 1.0 and version 1.3 are currently supported.
-=======
# Zodiac FX Firmware
This is the firmware for the [Northbound Networks](https://northboundnetworks.com/) Zodiac FX OpenFlow Switch.
@@ -117,13 +105,6 @@ Issues can also be [raised](https://github.com/NorthboundNetworks/ZodiacFX/issue
## Authors
-* **Paul Zanna** - creator
-* **Kristopher Chen** - firmware developer
-
-## License
-
-GPL 3.0
-=======
* **Paul Zanna** - Creator
* **Kristopher Chen** - Firmware Developer
From 22dabb8832c83477c50366ec5aff6f81ba7328c6 Mon Sep 17 00:00:00 2001
From: Kristopher Chen
Date: Tue, 21 Mar 2017 09:50:40 +1100
Subject: [PATCH 160/163] Update README.md
Differentiate between _update binary and _base binary
---
README.md | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/README.md b/README.md
index 1509fa1..9c64b90 100644
--- a/README.md
+++ b/README.md
@@ -20,7 +20,7 @@ Starting from version 0.80, Zodiac FX supports firmware updates via the CLI and
To update to version 0.80 or later, a **full upgrade firmware** needs to be flashed.
-Download the latest **full upgrade firmware** from the [Northbound Networks Forums](http://forums.northboundnetworks.com/index.php?topic=52.0) - 'Full Upgrade Firmware (v0.xx) - ZodiacFX_v0_xx.bin'
+Download the latest **full upgrade firmware** from the [Northbound Networks Forums](http://forums.northboundnetworks.com/index.php?topic=52.0) - 'Full Upgrade Firmware (v0.xx) - ZodiacFX_v0_xx_base.bin'
Follow the firmware update process detailed in **Section 2. Updating Firmware** in the [Zodiac FX User Guide](http://forums.northboundnetworks.com/downloads/zodiac_fx/guides/ZodiacFX_UserGuide_0216.pdf).
@@ -28,7 +28,7 @@ Follow the firmware update process detailed in **Section 2. Updating Firmware**
The update process has been simplified for the newer releases.
-Download the latest **update firmware** from the [Northbound Networks Forums](http://forums.northboundnetworks.com/index.php?topic=52.0) - 'Update Firmware (v0.xx) - ZodiacFX_v0_xx.bin'
+Download the latest **update firmware** from the [Northbound Networks Forums](http://forums.northboundnetworks.com/index.php?topic=52.0) - 'Update Firmware (v0.xx) - ZodiacFX_v0_xx_update.bin'
* **To update via the CLI**:
* In the root context, type the 'update' command
@@ -45,8 +45,8 @@ Download the latest **update firmware** from the [Northbound Networks Forums](ht
* Click 'Restart' in the web interface header to complete the update
* **[Advanced] To update via cURL**:
- * Run ['Zodiac_FX_update.sh ZodiacFX_v0_xx.bin'](http://forums.northboundnetworks.com/index.php?topic=52.0)
- * If the firmware upload fails, you may need to run ['Zodiac_FX_update_compatibility.sh ZodiacFX_v0_xx.bin'](http://forums.northboundnetworks.com/index.php?topic=52.0) instead
+ * Run ['Zodiac_FX_update.sh ZodiacFX_v0_xx_update.bin'](http://forums.northboundnetworks.com/index.php?topic=52.0)
+ * If the firmware upload fails, you may need to run ['Zodiac_FX_update_compatibility.sh ZodiacFX_v0_xx_update.bin'](http://forums.northboundnetworks.com/index.php?topic=52.0) instead
* Note: on some platforms, a manual restart may be required after uploading the firmware
## Building the Project
From 5bad008a7e0b7b37a58030fdf00b04ed42fd5968 Mon Sep 17 00:00:00 2001
From: Kristopher Chen
Date: Tue, 21 Mar 2017 11:00:12 +1100
Subject: [PATCH 161/163] Update README.md
Update binary naming.
---
README.md | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/README.md b/README.md
index 9c64b90..a74f526 100644
--- a/README.md
+++ b/README.md
@@ -20,7 +20,7 @@ Starting from version 0.80, Zodiac FX supports firmware updates via the CLI and
To update to version 0.80 or later, a **full upgrade firmware** needs to be flashed.
-Download the latest **full upgrade firmware** from the [Northbound Networks Forums](http://forums.northboundnetworks.com/index.php?topic=52.0) - 'Full Upgrade Firmware (v0.xx) - ZodiacFX_v0_xx_base.bin'
+Download the latest **full upgrade firmware** from the [Northbound Networks Forums](http://forums.northboundnetworks.com/index.php?topic=52.0) - 'Full Upgrade Firmware (v0.xx) - ZodiacFX_vxx_full_install.bin'
Follow the firmware update process detailed in **Section 2. Updating Firmware** in the [Zodiac FX User Guide](http://forums.northboundnetworks.com/downloads/zodiac_fx/guides/ZodiacFX_UserGuide_0216.pdf).
@@ -28,7 +28,7 @@ Follow the firmware update process detailed in **Section 2. Updating Firmware**
The update process has been simplified for the newer releases.
-Download the latest **update firmware** from the [Northbound Networks Forums](http://forums.northboundnetworks.com/index.php?topic=52.0) - 'Update Firmware (v0.xx) - ZodiacFX_v0_xx_update.bin'
+Download the latest **update firmware** from the [Northbound Networks Forums](http://forums.northboundnetworks.com/index.php?topic=52.0) - 'Update Firmware (v0.xx) - ZodiacFX_vxx_update.bin'
* **To update via the CLI**:
* In the root context, type the 'update' command
@@ -45,8 +45,8 @@ Download the latest **update firmware** from the [Northbound Networks Forums](ht
* Click 'Restart' in the web interface header to complete the update
* **[Advanced] To update via cURL**:
- * Run ['Zodiac_FX_update.sh ZodiacFX_v0_xx_update.bin'](http://forums.northboundnetworks.com/index.php?topic=52.0)
- * If the firmware upload fails, you may need to run ['Zodiac_FX_update_compatibility.sh ZodiacFX_v0_xx_update.bin'](http://forums.northboundnetworks.com/index.php?topic=52.0) instead
+ * Run ['Zodiac_FX_update.sh ZodiacFX_vxx_update.bin'](http://forums.northboundnetworks.com/index.php?topic=52.0)
+ * If the firmware upload fails, you may need to run ['Zodiac_FX_update_compatibility.sh ZodiacFX_vxx_update.bin'](http://forums.northboundnetworks.com/index.php?topic=52.0) instead
* Note: on some platforms, a manual restart may be required after uploading the firmware
## Building the Project
From 36bf1c1567ecf218ed76205d6a8c4d9e843cb339 Mon Sep 17 00:00:00 2001
From: Paul Zanna
Date: Tue, 21 Mar 2017 11:21:46 +1100
Subject: [PATCH 162/163] Update README.md
---
README.md | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
index a74f526..eb3132d 100644
--- a/README.md
+++ b/README.md
@@ -20,15 +20,15 @@ Starting from version 0.80, Zodiac FX supports firmware updates via the CLI and
To update to version 0.80 or later, a **full upgrade firmware** needs to be flashed.
-Download the latest **full upgrade firmware** from the [Northbound Networks Forums](http://forums.northboundnetworks.com/index.php?topic=52.0) - 'Full Upgrade Firmware (v0.xx) - ZodiacFX_vxx_full_install.bin'
+Download the latest **full upgrade firmware** from the [Northbound Networks Forums](http://forums.northboundnetworks.com/index.php?topic=52.0) - 'Full Upgrade Firmware (v0.XX) - ZodiacFX_vXX_full_install.bin'
-Follow the firmware update process detailed in **Section 2. Updating Firmware** in the [Zodiac FX User Guide](http://forums.northboundnetworks.com/downloads/zodiac_fx/guides/ZodiacFX_UserGuide_0216.pdf).
+Follow the firmware update process detailed in **Section 2. Updating Firmware** in the [Zodiac FX User Guide](http://forums.northboundnetworks.com/downloads/zodiac_fx/guides/ZodiacFX_UserGuide_0317.pdf).
#### For firmware versions AFTER version 0.80
The update process has been simplified for the newer releases.
-Download the latest **update firmware** from the [Northbound Networks Forums](http://forums.northboundnetworks.com/index.php?topic=52.0) - 'Update Firmware (v0.xx) - ZodiacFX_vxx_update.bin'
+Download the latest **update firmware** from the [Northbound Networks Forums](http://forums.northboundnetworks.com/index.php?topic=52.0) - 'Update Firmware (v0.XX) - ZodiacFX_vXX_update.bin'
* **To update via the CLI**:
* In the root context, type the 'update' command
@@ -45,8 +45,8 @@ Download the latest **update firmware** from the [Northbound Networks Forums](ht
* Click 'Restart' in the web interface header to complete the update
* **[Advanced] To update via cURL**:
- * Run ['Zodiac_FX_update.sh ZodiacFX_vxx_update.bin'](http://forums.northboundnetworks.com/index.php?topic=52.0)
- * If the firmware upload fails, you may need to run ['Zodiac_FX_update_compatibility.sh ZodiacFX_vxx_update.bin'](http://forums.northboundnetworks.com/index.php?topic=52.0) instead
+ * Run the following command: #curl --verbose -0 --form "file=@ZodiacFX_vXX_update.bin"
+ * If the firmware upload fails, you may need to use the multipart/related content type like so: #curl -H "Content-Type: multipart/related" --verbose -0 --form "file=@ZodiacFX_vXX_update.bin"
* Note: on some platforms, a manual restart may be required after uploading the firmware
## Building the Project
From ca30f91c2b0914eb692cb6a33e39792f2a93aec1 Mon Sep 17 00:00:00 2001
From: Paul Zanna
Date: Tue, 21 Mar 2017 11:24:59 +1100
Subject: [PATCH 163/163] Update README.md
---
README.md | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
index eb3132d..6f35202 100644
--- a/README.md
+++ b/README.md
@@ -45,9 +45,9 @@ Download the latest **update firmware** from the [Northbound Networks Forums](ht
* Click 'Restart' in the web interface header to complete the update
* **[Advanced] To update via cURL**:
- * Run the following command: #curl --verbose -0 --form "file=@ZodiacFX_vXX_update.bin"
- * If the firmware upload fails, you may need to use the multipart/related content type like so: #curl -H "Content-Type: multipart/related" --verbose -0 --form "file=@ZodiacFX_vXX_update.bin"
- * Note: on some platforms, a manual restart may be required after uploading the firmware
+ * Run the following command: **curl --verbose -0 --form "file=@ZodiacFX_vXX_update.bin"**
+ * If the firmware upload fails, you may need to use the multipart/related content type like so: **curl -H "Content-Type: multipart/related" --verbose -0 --form "file=@ZodiacFX_vXX_update.bin"**
+ * Note: a restart is required after the update to load the new firmware.
## Building the Project