Jump to content

BrownFrog

EstablishedMember
  • Content Count

    6
  • Joined

  • Last visited

Community Reputation

0 Neutral

About BrownFrog

  • Rank
    Newbrie

Contact Methods

  • Website URL
    http://
  • ICQ
    0

Profile Information

  • Location
    Canberra, Australia
  1. Using IDE version: 6.70 Compiler: BoostC for PIC18 Compiler version: 6.70 Target device: PIC18F25J10 OS: Windows XP SP2 The += statement at the end of this code segment compiles incorrectly: #include <system.h> typedef struct _SOCKET_INFO { unsigned char smState; unsigned char TxBuffer; unsigned int TxCount; unsigned int RxCount; unsigned long SND_SEQ; unsigned SND_ACK; } SOCKET_INFO; SOCKET_INFO TCB[4]; void main(void) { SOCKET_INFO *ps; ps = &TCB[1]; // This statement compiles incorrectly ps->SND_SEQ += (unsigned long)ps->TxCo
  2. OK, here is my third bug report on BoostC related to nested structures found in Microchip's TCP/IP code. The following code generates incorrect accesses to elements within the 'packet' object. #include <system.h> typedef unsigned char BYTE; typedef unsigned long DWORD; typedef union _IP_ADDR { BYTE v[4]; DWORD Val; } IP_ADDR; typedef struct _MAC_ADDR { BYTE v[6]; } MAC_ADDR; typedef struct _NODE_INFO { MAC_ADDR MACAddr; IP_ADDR IPAddr; } NODE_INFO; typedef struct _ARP_PACKET { MAC_ADDR TargetMACAddr; IP_ADDR TargetIPAddr; MA
  3. The following code crashes boostc.pic18 in versions 6.60 and 6.70: #include <system.h> #undef BYTE typedef unsigned char BYTE; // 8-bit typedef struct _MAC_ADDR { BYTE v[6]; } MAC_ADDR; typedef struct _NODE_INFO { MAC_ADDR MACAddr; } NODE_INFO; typedef enum _TCP_STATE { TCP_INVALID } TCP_STATE; typedef struct _SOCKET_INFO { TCP_STATE smState; NODE_INFO remote; } SOCKET_INFO; SOCKET_INFO test; void CrashMe(void) { SOCKET_INFO *ps; NODE_INFO *remote; ps = &test; remote = &ps->remote; return; } (This is a m
  4. I am pretty sure the ANSI C specification for preprocessor directives requires them to be lower case. I haven't been able to find a definitive statement that they are, but all examples and specifications show them as lower case, eg http://gcc.gnu.org/onlinedocs/gcc-2.95.3/cpp_1.html Your uppercase version #IF is an unrecognised preprocessor directive, just like #BLAH would be, so the error message of "Illegal directive" seems correct. Maybe expanding the message to "Illegal preprocessor directive" would be marginally more descriptive, but I don't think there is anything wrong here. It
  5. I think I've seen worse And I think I'm getting an understanding of the way the programmer thinks, and it is making sense to me now. I agree it could have been constructed more neatly. I'm making good progress, got DHCP and ARP working, now debugging ICMP ping before I move onto TCP sockets. My biggest worry is that once it is all working there will not be enough code space left for the application I have in mind. And I really could have done without compiler bugs (I've since found another that I'll report shortly), but SourceBoost is doing the job. I am planning on releasing the mo
  6. I've been trying to compile the Microchip TCP/IP stack for an Olimex PIC_MINI_WEB device, and after many syntax alterations to suit BoostC all the source files compile OK but I struck this error at link time: failure Error:Linking externs failed, mismatch of data types for variable:'AppConfig' I've traced the problem to a nested struct/union/struct (WORD_VAL). Here is code that triggers the problem: ----- test1.h ----- #include <system.h> typedef unsigned char BYTE; typedef unsigned short WORD; typedef union _WORD_VAL { WORD Val; struct {
×
×
  • Create New...