Skip to content

Commit

Permalink
Added in order to remove some unused functions
Browse files Browse the repository at this point in the history
Modified
 - the start ISR address from 0x1fd00 to 0x7d00
 - the flag of socket when socket function use(Non Block)
  • Loading branch information
irina committed Dec 13, 2019
1 parent 252bb4b commit 3124bbc
Show file tree
Hide file tree
Showing 23 changed files with 8,835 additions and 16,025 deletions.
2 changes: 1 addition & 1 deletion Projects/S2E_App/W7500x_S2E.uvopt
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@
<GroupNumber>6</GroupNumber>
<FileNumber>25</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\src\W7500x_board.c</PathWithFileName>
Expand Down
5 changes: 3 additions & 2 deletions Projects/S2E_App/W7500x_S2E.uvproj
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@
<v6WtE>0</v6WtE>
<v6Rtti>0</v6Rtti>
<VariousControls>
<MiscControls></MiscControls>
<MiscControls>--feedback=unused.txt</MiscControls>
<Define>CORTEX_M0 USE_STDPERIPH_DRIVER</Define>
<Undefine></Undefine>
<IncludePath>..\..\Libraries\CMSIS\Device\WIZnet\W7500\Include;..\..\Libraries\W7500x_stdPeriph_Driver\inc;..\..\Libraries\CMSIS\Include;..\..\Libraries\CMSIS\Device\WIZnet\W7500\Source\ARM;.\src;..\..\ioLibrary\Ethernet;..\..\ioLibrary\Internet\DHCP;..\..\ioLibrary\Internet\DNS;..\..\ioLibrary\MDIO;..\..\ioLibrary\Application\loopback;.\src\Configuration;.\src\PlatformHandler;.\src\Serial_to_Ethernet;.\src\Callback</IncludePath>
Expand Down Expand Up @@ -410,7 +410,8 @@
<ScatterFile>.\obj\W7500x_S2E_App.sct</ScatterFile>
<IncludeLibs></IncludeLibs>
<IncludeLibsPath></IncludeLibsPath>
<Misc></Misc>
<Misc>--feedback=unused.txt
--feedback_type=unused,iw</Misc>
<LinkerInputFile></LinkerInputFile>
<DisabledWarnings></DisabledWarnings>
</LDads>
Expand Down
Binary file modified Projects/S2E_App/bin/W7500x_S2E_App.bin
Binary file not shown.
8,811 changes: 2,446 additions & 6,365 deletions Projects/S2E_App/bin/W7500x_S2E_App.hex

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Projects/S2E_App/src/Configuration/segcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1245,7 +1245,7 @@ uint16_t proc_SEGCP_udp(uint8_t* segcp_req, uint8_t* segcp_rep)
}
break;
case SOCK_CLOSED:
if(socket(SEGCP_UDP_SOCK, Sn_MR_UDP, DEVICE_SEGCP_PORT, 0x00) == SEGCP_UDP_SOCK)
if(socket(SEGCP_UDP_SOCK, Sn_MR_UDP, DEVICE_SEGCP_PORT, SOCK_IO_NONBLOCK) == SEGCP_UDP_SOCK) //191213 irina add SOCK_IO_NONBLOCK
{
if(dev_config->serial_info[0].serial_debug_en) printf(" > SEGCP:UDP:STARTED\r\n");
}
Expand Down Expand Up @@ -1347,7 +1347,7 @@ uint16_t proc_SEGCP_tcp(uint8_t* segcp_req, uint8_t* segcp_rep)
case SOCK_FIN_WAIT:
close(SEGCP_TCP_SOCK);

if(socket(SEGCP_TCP_SOCK, Sn_MR_TCP, DEVICE_SEGCP_PORT, SF_TCP_NODELAY) == SEGCP_TCP_SOCK)
if(socket(SEGCP_TCP_SOCK, Sn_MR_TCP, DEVICE_SEGCP_PORT, SF_TCP_NODELAY|SOCK_IO_NONBLOCK) == SEGCP_TCP_SOCK)
{
//if(dev_config->serial_info[0].serial_debug_en) printf(" > SEGCP:TCP:STARTED\r\n");

Expand Down
4 changes: 2 additions & 2 deletions Projects/S2E_App/src/PlatformHandler/deviceHandler.c
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ uint16_t get_firmware_from_network(uint8_t sock, uint8_t * buf)

case SOCK_FIN_WAIT:
case SOCK_CLOSED:
if(socket(sock, Sn_MR_TCP, DEVICE_FWUP_PORT, SF_TCP_NODELAY) == sock)
if(socket(sock, Sn_MR_TCP, DEVICE_FWUP_PORT, SF_TCP_NODELAY|SOCK_IO_NONBLOCK) == sock)
{
recv_fwsize = 0;
listen(sock);
Expand Down Expand Up @@ -622,7 +622,7 @@ uint16_t get_firmware_from_server(uint8_t sock, uint8_t * server_ip, uint8_t * b
case SOCK_FIN_WAIT:
case SOCK_CLOSED:
src_port = get_any_port();
if(socket(sock, Sn_MR_TCP, src_port, SF_TCP_NODELAY) == sock)
if(socket(sock, Sn_MR_TCP, src_port, SF_TCP_NODELAY|SOCK_IO_NONBLOCK) == sock)
{
recv_fwsize = 0;
#ifdef _FWUP_DEBUG_
Expand Down
62 changes: 31 additions & 31 deletions Projects/S2E_App/src/PlatformHandler/isr_vector.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,37 @@

#include "W7500x_it.h"

void Remap_NMI_Handler(void) __attribute__((section (".ARM.__at_0x0001FD00")));
void Remap_HardFault_Handler(void) __attribute__((section (".ARM.__at_0x0001FD08)")));
void Remap_SVC_Handler(void) __attribute__((section (".ARM.__at_0x0001FD0C")));
void Remap_PendSV_Handler(void) __attribute__((section (".ARM.__at_0x0001FD14")));
void Remap_SysTick_Handler(void) __attribute__((section (".ARM.__at_0x0001FD1C")));
void Remap_SSP0_Handler(void) __attribute__((section (".ARM.__at_0x0001FD24")));
void Remap_SSP1_Handler(void) __attribute__((section (".ARM.__at_0x0001FD2C")));
void Remap_UART0_Handler(void) __attribute__((section (".ARM.__at_0x0001FD34")));
void Remap_UART1_Handler(void) __attribute__((section (".ARM.__at_0x0001FD3C")));
void Remap_UART2_Handler(void) __attribute__((section (".ARM.__at_0x0001FD44")));
void Remap_I2C0_Handler(void) __attribute__((section (".ARM.__at_0x0001FD4C")));
void Remap_I2C1_Handler(void) __attribute__((section (".ARM.__at_0x0001FD54")));
void Remap_PORT0_Handler(void) __attribute__((section (".ARM.__at_0x0001FD5C")));
void Remap_PORT1_Handler(void) __attribute__((section (".ARM.__at_0x0001FD64")));
void Remap_PORT2_Handler(void) __attribute__((section (".ARM.__at_0x0001FD6C")));
void Remap_PORT3_Handler(void) __attribute__((section (".ARM.__at_0x0001FD74")));
void Remap_DMA_Handler(void) __attribute__((section (".ARM.__at_0x0001FD7C")));
void Remap_DUALTIMER0_Handler(void) __attribute__((section (".ARM.__at_0x0001FD84")));
void Remap_DUALTIMER1_Handler(void) __attribute__((section (".ARM.__at_0x0001FD8C")));
void Remap_PWM0_Handler(void) __attribute__((section (".ARM.__at_0x0001FD94")));
void Remap_PWM1_Handler(void) __attribute__((section (".ARM.__at_0x0001FD9C")));
void Remap_PWM2_Handler(void) __attribute__((section (".ARM.__at_0x0001FDA4")));
void Remap_PWM3_Handler(void) __attribute__((section (".ARM.__at_0x0001FDAC")));
void Remap_PWM4_Handler(void) __attribute__((section (".ARM.__at_0x0001FDB4")));
void Remap_PWM5_Handler(void) __attribute__((section (".ARM.__at_0x0001FDBC")));
void Remap_PWM6_Handler(void) __attribute__((section (".ARM.__at_0x0001FDC4")));
void Remap_PWM7_Handler(void) __attribute__((section (".ARM.__at_0x0001FDCC")));
void Remap_RTC_Handler(void) __attribute__((section (".ARM.__at_0x0001FDD4")));
void Remap_ADC_Handler(void) __attribute__((section (".ARM.__at_0x0001FDDC")));
void Remap_WZTOE_Handler(void) __attribute__((section (".ARM.__at_0x0001FDE4")));
void Remap_EXTI_Handler(void) __attribute__((section (".ARM.__at_0x0001FDEC")));
void Remap_NMI_Handler(void) __attribute__((section (".ARM.__at_0x00007D00"))); //__attribute__((section (".ARM.__at_0x0001FD00")));
void Remap_HardFault_Handler(void) __attribute__((section (".ARM.__at_0x00007D08"))); //__attribute__((section (".ARM.__at_0x0001FD08)")));
void Remap_SVC_Handler(void) __attribute__((section (".ARM.__at_0x00007D0C"))); //__attribute__((section (".ARM.__at_0x0001FD0C")));
void Remap_PendSV_Handler(void) __attribute__((section (".ARM.__at_0x00007D14"))); //__attribute__((section (".ARM.__at_0x0001FD14")));
void Remap_SysTick_Handler(void) __attribute__((section (".ARM.__at_0x00007D1C"))); //__attribute__((section (".ARM.__at_0x0001FD1C")));
void Remap_SSP0_Handler(void) __attribute__((section (".ARM.__at_0x00007D24"))); //__attribute__((section (".ARM.__at_0x0001FD24")));
void Remap_SSP1_Handler(void) __attribute__((section (".ARM.__at_0x00007D2C"))); //__attribute__((section (".ARM.__at_0x0001FD2C")));
void Remap_UART0_Handler(void) __attribute__((section (".ARM.__at_0x00007D34"))); //__attribute__((section (".ARM.__at_0x0001FD34")));
void Remap_UART1_Handler(void) __attribute__((section (".ARM.__at_0x00007D3C"))); //__attribute__((section (".ARM.__at_0x0001FD3C")));
void Remap_UART2_Handler(void) __attribute__((section (".ARM.__at_0x00007D44"))); //__attribute__((section (".ARM.__at_0x0001FD44")));
void Remap_I2C0_Handler(void) __attribute__((section (".ARM.__at_0x00007D4C"))); //__attribute__((section (".ARM.__at_0x0001FD4C")));
void Remap_I2C1_Handler(void) __attribute__((section (".ARM.__at_0x00007D54"))); //__attribute__((section (".ARM.__at_0x0001FD54")));
void Remap_PORT0_Handler(void) __attribute__((section (".ARM.__at_0x00007D5C"))); //__attribute__((section (".ARM.__at_0x0001FD5C")));
void Remap_PORT1_Handler(void) __attribute__((section (".ARM.__at_0x00007D64"))); //__attribute__((section (".ARM.__at_0x0001FD64")));
void Remap_PORT2_Handler(void) __attribute__((section (".ARM.__at_0x00007D6C"))); //__attribute__((section (".ARM.__at_0x0001FD6C")));
void Remap_PORT3_Handler(void) __attribute__((section (".ARM.__at_0x00007D74"))); //__attribute__((section (".ARM.__at_0x0001FD74")));
void Remap_DMA_Handler(void) __attribute__((section (".ARM.__at_0x00007D7C"))); //__attribute__((section (".ARM.__at_0x0001FD7C")));
void Remap_DUALTIMER0_Handler(void) __attribute__((section (".ARM.__at_0x00007D84"))); //__attribute__((section (".ARM.__at_0x0001FD84")));
void Remap_DUALTIMER1_Handler(void) __attribute__((section (".ARM.__at_0x00007D8C"))); //__attribute__((section (".ARM.__at_0x0001FD8C")));
void Remap_PWM0_Handler(void) __attribute__((section (".ARM.__at_0x00007D94"))); //__attribute__((section (".ARM.__at_0x0001FD94")));
void Remap_PWM1_Handler(void) __attribute__((section (".ARM.__at_0x00007D9C"))); //__attribute__((section (".ARM.__at_0x0001FD9C")));
void Remap_PWM2_Handler(void) __attribute__((section (".ARM.__at_0x00007DA4"))); //__attribute__((section (".ARM.__at_0x0001FDA4")));
void Remap_PWM3_Handler(void) __attribute__((section (".ARM.__at_0x00007DAC"))); //__attribute__((section (".ARM.__at_0x0001FDAC")));
void Remap_PWM4_Handler(void) __attribute__((section (".ARM.__at_0x00007DB4"))); //__attribute__((section (".ARM.__at_0x0001FDB4")));
void Remap_PWM5_Handler(void) __attribute__((section (".ARM.__at_0x00007DBC"))); //__attribute__((section (".ARM.__at_0x0001FDBC")));
void Remap_PWM6_Handler(void) __attribute__((section (".ARM.__at_0x00007DC4"))); //__attribute__((section (".ARM.__at_0x0001FDC4")));
void Remap_PWM7_Handler(void) __attribute__((section (".ARM.__at_0x00007DCC"))); //__attribute__((section (".ARM.__at_0x0001FDCC")));
void Remap_RTC_Handler(void) __attribute__((section (".ARM.__at_0x00007DD4"))); //__attribute__((section (".ARM.__at_0x0001FDD4")));
void Remap_ADC_Handler(void) __attribute__((section (".ARM.__at_0x00007DDC"))); //__attribute__((section (".ARM.__at_0x0001FDDC")));
void Remap_WZTOE_Handler(void) __attribute__((section (".ARM.__at_0x00007DE4"))); //__attribute__((section (".ARM.__at_0x0001FDE4")));
void Remap_EXTI_Handler(void) __attribute__((section (".ARM.__at_0x00007DEC"))); //__attribute__((section (".ARM.__at_0x0001FDEC")));

void Remap_NMI_Handler(void)
{
Expand Down
6 changes: 3 additions & 3 deletions Projects/S2E_App/src/Serial_to_Ethernet/seg.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ void proc_SEG_udp(uint8_t sock)
setSn_DHAR(sock, multicast_mac);
flag|=SF_MULTI_ENABLE;
}

flag|=SOCK_IO_NONBLOCK;
if(socket(sock, Sn_MR_UDP, net->local_port, flag) == sock)
{
set_device_status(ST_UDP);
Expand Down Expand Up @@ -573,7 +573,7 @@ void proc_SEG_tcp_server(uint8_t sock)
u2e_size = 0;
e2u_size = 0;

if(socket(sock, Sn_MR_TCP, net->local_port, SF_TCP_NODELAY) == sock)
if(socket(sock, Sn_MR_TCP, net->local_port, SF_TCP_NODELAY|SOCK_IO_NONBLOCK) == sock)
{
// Replace the command mode switch code GAP time (default: 500ms)
if(net->packing_time) modeswitch_gap_time = net->packing_time;
Expand Down Expand Up @@ -819,7 +819,7 @@ void proc_SEG_tcp_mixed(uint8_t sock)
#ifdef _SEG_DEBUG_
printf(" > TCP CLIENT: any_port = %d\r\n", source_port);
#endif
if(socket(sock, Sn_MR_TCP, source_port, SF_TCP_NODELAY) == sock)
if(socket(sock, Sn_MR_TCP, source_port, SF_TCP_NODELAY|SOCK_IO_NONBLOCK) == sock)
{
// Replace the command mode switch code GAP time (default: 500ms)
if(net->packing_time) modeswitch_gap_time = net->packing_time;
Expand Down
4 changes: 2 additions & 2 deletions Projects/S2E_App/src/W7500x_board.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ void W7500x_Board_Init(void)
// STATUS #3 : Blink
LED_Init(LED1);
LED_Init(LED2);
#if (DEVICE_BOARD_NAME == WIZ750SR_1xx)
//#if (DEVICE_BOARD_NAME == WIZ750SR_1xx)
LED_Init(LED3);
#endif
//#endif
}

void Supervisory_IC_Init(void)
Expand Down
7 changes: 1 addition & 6 deletions Projects/S2E_App/src/W7500x_board.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
//#define DEVICE_BOARD_NAME W7500P_S2E
#define DEVICE_BOARD_NAME WIZ750SR
//#define DEVICE_BOARD_NAME WIZ750SR_1xx
//#define DEVICE_BOARD_NAME_SUB WIZ750SR_110 //IF you use the WIWIZ750SR_110, this option activate.
//#define DEVICE_BOARD_NAME W7500_S2E

#ifdef DEVICE_BOARD_NAME
Expand Down Expand Up @@ -151,11 +150,7 @@

// HW_TRIG - Command mode switch enable pin
// Direction: Input (Shared pin with TCP connection status pin)
#if (DEVICE_BOARD_NAME_SUB == WIZ750SR_110)
#define HW_TRIG_PIN GPIO_Pin_9
#else
#define HW_TRIG_PIN GPIO_Pin_7
#endif
#define HW_TRIG_PIN GPIO_Pin_9
#define HW_TRIG_PORT GPIOA
#define HW_TRIG_PAD_AF PAD_AF1

Expand Down
2 changes: 1 addition & 1 deletion Projects/S2E_App/src/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/* Application Firmware Version */
#define MAJOR_VER 1
#define MINOR_VER 3
#define MAINTENANCE_VER 2
#define MAINTENANCE_VER 3

//#define STR_VERSION_STATUS //"Final"//"Develop" // or "Stable"
#define STR_VERSION_STATUS "Stable"
Expand Down
Loading

0 comments on commit 3124bbc

Please sign in to comment.