lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] LwIP and ARM Compiler 6


From: Daniel Liquete García
Subject: Re: [lwip-users] LwIP and ARM Compiler 6
Date: Mon, 4 Feb 2019 07:59:37 +0000

Good moorning,

Thanks four your repply.

The same day that i saw your answer, i found the error (Compile Error), but i 
dont know the exactly sintaxis to fix it.

<pre>
#if defined ( __CC_ARM   )
ETH_DMADescTypeDef  DMARxDscrTab[ETH_RXBUFNB] 
__attribute__((at(0x2007C000)));/* Ethernet Rx DMA Descriptors */

ETH_DMADescTypeDef  DMATxDscrTab[ETH_TXBUFNB] 
__attribute__((at(0x2007C080)));/* Ethernet Tx DMA Descriptors */

uint8_t Rx_Buff[ETH_RXBUFNB][ETH_RX_BUF_SIZE] __attribute__((at(0x2007C100))); 
/* Ethernet Receive Buffers */

uint8_t Tx_Buff[ETH_TXBUFNB][ETH_TX_BUF_SIZE] __attribute__((at(0x2007D8D0))); 
/* Ethernet Transmit Buffers */

#elif defined ( __ICCARM__ ) /*!< IAR Compiler */
  #pragma data_alignment=4 

#pragma location=0x2007C000
__no_init ETH_DMADescTypeDef  DMARxDscrTab[ETH_RXBUFNB];/* Ethernet Rx DMA 
Descriptors */

#pragma location=0x2007C080
__no_init ETH_DMADescTypeDef  DMATxDscrTab[ETH_TXBUFNB];/* Ethernet Tx DMA 
Descriptors */

#pragma location=0x2007C100
__no_init uint8_t Rx_Buff[ETH_RXBUFNB][ETH_RX_BUF_SIZE]; /* Ethernet Receive 
Buffers */

#pragma location=0x2007D8D0
__no_init uint8_t Tx_Buff[ETH_TXBUFNB][ETH_TX_BUF_SIZE]; /* Ethernet Transmit 
Buffers */

#elif defined ( __GNUC__ ) /*!< GNU Compiler */

ETH_DMADescTypeDef  DMARxDscrTab[ETH_RXBUFNB] 
__attribute__((section(".RxDecripSection")));/* Ethernet Rx DMA Descriptors */

ETH_DMADescTypeDef  DMATxDscrTab[ETH_TXBUFNB] 
__attribute__((section(".TxDescripSection")));/* Ethernet Tx DMA Descriptors */

uint8_t Rx_Buff[ETH_RXBUFNB][ETH_RX_BUF_SIZE] 
__attribute__((section(".RxarraySection"))); /* Ethernet Receive Buffers */

uint8_t Tx_Buff[ETH_TXBUFNB][ETH_TX_BUF_SIZE] 
__attribute__((section(".TxarraySection"))); /* Ethernet Transmit Buffers */

#endif
</pre>

In this code fragment the buffers and the DMA descriptors are established, 
without them I can neither receive nor send packets.
The code compiled and gave no errors because for compiler 6, there is no option 
and all were disabled.

In order to make this part work I have to migrate it to compiler 6, according 
to the migration manual I should use this syntax:
__attribute__((section(".ARM.__at_address")))

//armlink in Arm Compiler 6 still supports the placement of sections in the 
form of .ARM.__at_address

But when i have tried to migrate the code, i get thesses errors of syntax:


1.- First Try
<pre>
ETH_DMADescTypeDef  DMARxDscrTab[ETH_RXBUFNB] 
__atribute__((section(".ARM.__at_0x2007C000")));  /* Ethernet Rx DMA 
Descriptors */
</pre>

ethernetif.c(80): error: expected ';' after top level declarator
ETH_DMADescTypeDef  DMARxDscrTab[ETH_RXBUFNB]   
__atribute__((section(".ARM.__at_0x2007C000")));        /* Ethernet Rx DMA 
Descriptors */

2.-Second Try
<pre>
ETH_DMADescTypeDef  DMARxDscrTab[ETH_RXBUFNB];
DMARxDscrTab[ETH_RXBUFNB] __atribute__((section(".ARM.__at_0x2007C000")));      
/* Ethernet Rx DMA Descriptors */
</pre>

ethernetif.c(81): warning: type specifier missing, defaults to 'int' 
[-Wimplicit-int]
DMARxDscrTab[ETH_RXBUFNB] __atribute__((section(".ARM.__at_0x2007C000")));      
/* Ethernet Rx DMA Descriptors */
^
ethernetif.c(81): error: redefinition of 'DMARxDscrTab' with a different type: 
'int [4]' vs 'ETH_DMADescTypeDef [4]'
ethernetif.c(80): note: previous definition is here
ETH_DMADescTypeDef  DMARxDscrTab[ETH_RXBUFNB];
                    ^
ethernetif.c(81): error: expected ';' after top level declarator
DMARxDscrTab[ETH_RXBUFNB] __atribute__((section(".ARM.__at_0x2007C000")));      
/* Ethernet Rx DMA Descriptors */

Thank you very much for your help.

I will try resolve it and i tell you.

Kind regards

-----Mensaje original-----
De: lwip-users <address@hidden> En nombre de Sergio R. Caprile
Enviado el: viernes, 1 de febrero de 2019 13:32
Para: address@hidden
Asunto: Re: [lwip-users] LwIP and ARM Compiler 6

Well, this is perhaps pretty obvious, maybe, but did you happen to try to 
lookup what those "errors" are ? Are they errors or _warnings_ ?
Do you known the engine in both compilers is different ?
Does your port use compiler extensions ? (You need to change those since the 
engines are different...) If so, did you happen to read page 4 here ? 
http://www.keil.com/appnotes/files/apnt_298.pdf


_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users



reply via email to

[Prev in Thread] Current Thread [Next in Thread]