pack_struct_end.h and Eclipse

Hi, I am using the FreeRTOS-Plus-UDP for a while now on a Renesas RX63N, an it works fine. The only thing is that the syntax checking of E2Studio (which is basically Eclipse) does not understand the #include “packstructend.h” mechanism. So while GCC builds this code perfectly well, I still get errors reported by the IDE. I can simply ignore those, but still. I understand that this is actually a problem from E2Studio, but it is very easy to fix in the code by adding a semicolon on a new line after each #include “packstructend.h”. So for instance /———————————————————–/

include “packstructstart.h”

struct xDNSMessage { uint16t usIdentifier; uint16t usFlags; uint16t usQuestions; uint16t usAnswers; uint16t usAuthorityRRs; uint16t usAdditionalRRs; }

include “packstructend.h”

typedef struct xDNSMessage xDNSMessage_t; /———————————————————–/ becomes /———————————————————–/

include “packstructstart.h”

struct xDNSMessage { uint16t usIdentifier; uint16t usFlags; uint16t usQuestions; uint16t usAnswers; uint16t usAuthorityRRs; uint16t usAdditionalRRs; }

include “packstructend.h”

; //Only needed for E2Studio/Eclipse syntax checking typedef struct xDNSMessage xDNSMessage_t; /———————————————————–/ So a minor change that saves for a whole lot of error messages(16, only for this instance) generated by E2Studio. Kind regards, Peter

pack_struct_end.h and Eclipse

Thanks for the feedback. This is a tricky one because adding the additional ‘;’ then generates MISRA compliance failures (null statement on a line on its own). The attempts by various Eclipse versions to parse C code, very badly, is regularly causing a problem. People complain of lots of errors and warnings, whereas in fact no errors and warnings are generated, what they are seeing is Eclipse not understanding the code it is displaying. I hope this is improved in Eclipse over time, no doubt it will be, but for now our preference is to turn off the code parsing in Eclipse (which can be done through the menus) so only the genuine errors and warnings output by the compiler need to be considered. I would really appreciate you uploading your project to the FreeRTOS Interactive site – you can strip out anything propitiatory related to your application, and just have a buidable project that includes the +UDP code and driver. http://interactive.freertos.org Regards.

pack_struct_end.h and Eclipse

This is a tricky one because adding the additional ‘;’ then generates MISRA compliance failures (null statement on a line on its own).
Ah, ok. That’s a choice I can understand.
I would really appreciate you uploading your project to the FreeRTOS Interactive site – you can strip out anything propitiatory related to your application, and just have a buidable project that includes the +UDP code and driver.
I will do that, but I need a bit of time to clean up my code first.