#define STACK_USE_UART
no arquivo TCPIPCONFIG.h. Aí resulta nesse erro:
Error [1105] symbol 'UMODE' has not been defined
Se procurarmos por "UMODE" em todos os arquivos de fazem parte do projeto, tem umas 3 ocorrências apenas, uma delas é a seguinte:
- Código: Selecionar todos
#if defined(__18CXX) // PIC18
// UART mapping functions for consistent API names across 8-bit and 16 or
// 32 bit compilers. For simplicity, everything will use "UART" instead
// of USART/EUSART/etc.
#define BusyUART() BusyUSART()
#define CloseUART() CloseUSART()
#define ConfigIntUART(a) ConfigIntUSART(a)
#define DataRdyUART() DataRdyUSART()
#define OpenUART(a,b,c) OpenUSART(a,b,c)
#define ReadUART() ReadUSART()
#define WriteUART(a) WriteUSART(a)
#define getsUART(a,b,c) getsUSART(b,a)
#define putsUART(a) putsUSART(a)
#define getcUART() ReadUSART()
#define putcUART(a) WriteUSART(a)
#define putrsUART(a) putrsUSART((far rom char*)a)
#else // PIC24F, PIC24H, dsPIC30, dsPIC33, PIC32
// Some A/D converter registers on dsPIC30s are named slightly differently
// on other procesors, so we need to rename them.
#if defined(__dsPIC30F__)
#define ADC1BUF0 ADCBUF0
#define AD1CHS ADCHS
#define AD1CON1 ADCON1
#define AD1CON2 ADCON2
#define AD1CON3 ADCON3
#define AD1PCFGbits ADPCFGbits
#define AD1CSSL ADCSSL
#define AD1IF ADIF
#define AD1IE ADIE
#define _ADC1Interrupt _ADCInterrupt
#endif
// Select which UART the STACK_USE_UART and STACK_USE_UART2TCP_BRIDGE
// options will use. You can change these to U1BRG, U1MODE, etc. if you
// want to use the UART1 module instead of UART2.
#define UBRG U2BRG
#define UMODE U2MODE
#define USTA U2STA
#define BusyUART() BusyUART2()
#define CloseUART() CloseUART2()
#define ConfigIntUART(a) ConfigIntUART2(a)
#define DataRdyUART() DataRdyUART2()
#define OpenUART(a,b,c) OpenUART2(a,b,c)
#define ReadUART() ReadUART2()
#define WriteUART(a) WriteUART2(a)
#define getsUART(a,b,c) getsUART2(a,b,c)
#if defined(__C32__)
#define putsUART(a) putsUART2(a)
#else
#define putsUART(a) putsUART2((unsigned int*)a)
#endif
#define getcUART() getcUART2()
#define putcUART(a) do{while(BusyUART()); WriteUART(a); while(BusyUART()); }while(0)
#define putrsUART(a) putrsUART2(a)
#endif
#endif
Então podemos ver que a definição para UMODE não é válida quando se usa o C18, no entanto tenho um projeto similar para o PIC18F87J60 onde esta mesma opção está habilitada
#define STACK_USE_UART
E compila normalmente!
Alguém poderia ajudar?