I have been copying some code into the 'Raspberry Pi SL' platform and ran smack into "C0077: Unknown type: 'NULL'" errors. How is this even possible? This same program () compiles on a standard platform without any problems.
I'd really appreciate some advice on this. Is there some compiler switch which enables recognition of NULLs?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Did a little more work porting the eFFL Fuzzy Logic library to the RPi platform. By copy/pasting everything individually into the new platform, i found that the compiler had no trouble with NULLs. Everything seemed cool - right up to the moment i switched on the "Use dynamic memory allocation" (see attached pic). Suddenly, NULL is no longer recognized. Is this a compiler bug?
I am adding a link here to the project file (RPi_Fuzzy_eFFL_000 (Unknown type NULL).project) in case anybody is curious. -->
The intent here is to provide an open source Fuzzy Logic controller for the IEC 61131-3 (CODESYS) ST language. If I/we can get past this NULL issue then the controller is free to incorporate into the RPi, as it is the Standard platform (see LICENSE).
Any ideas appreciated
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
So, the good folks at CODESYS help sent the following in response to my ticket:
Your problem is that 'NULL' is declared in two different libraries (CDS_MemMan, SoftMotion_CNC_Constants) , both of which do not use the 'qualified_only' attribute. Therefore, there are ambiguous messages for NULL and the related-position messages to track down the problem. In your case, you have to qualify the 'NULL' you want to use.
A bit cryptic, but the answer to the problem is in there. I was able to find the CDS_MemMan library definition of NULL, but i wasn't able to find SoftMotion_CNC_Constants exactly. However, I did find another definition for NULL in the SM3_Basic library. The only way i have been able to 'qualify' anything in the library properties was the 'Only allow qualified access to all identifiers' checkbox (see pic). One or the other library needs to be checked off.
This has broken the log jam. The project now compiles without errors, downloads to the simulation, and runs. There is, however, still some ambiguity going on somewhere because, in my case anyway, every NULL is still underlined and pops up an "Ambiguous use of name 'NULL'" message. That doesn't stop compilation, and for now i'll take that as a win.
Find the new revision of the Fuzzy RPi project (Fuzzy_eFFL_RPi_010.project) at:
Thanks to the CODESYS folks for the direction.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have been copying some code into the 'Raspberry Pi SL' platform and ran smack into "C0077: Unknown type: 'NULL'" errors. How is this even possible? This same program () compiles on a standard platform without any problems.
I'd really appreciate some advice on this. Is there some compiler switch which enables recognition of NULLs?
Did a little more work porting the eFFL Fuzzy Logic library to the RPi platform. By copy/pasting everything individually into the new platform, i found that the compiler had no trouble with NULLs. Everything seemed cool - right up to the moment i switched on the "Use dynamic memory allocation" (see attached pic). Suddenly, NULL is no longer recognized. Is this a compiler bug?
I am adding a link here to the project file (RPi_Fuzzy_eFFL_000 (Unknown type NULL).project) in case anybody is curious. -->
The intent here is to provide an open source Fuzzy Logic controller for the IEC 61131-3 (CODESYS) ST language. If I/we can get past this NULL issue then the controller is free to incorporate into the RPi, as it is the Standard platform (see LICENSE).
Any ideas appreciated
So, the good folks at CODESYS help sent the following in response to my ticket:
Your problem is that 'NULL' is declared in two different libraries (CDS_MemMan, SoftMotion_CNC_Constants) , both of which do not use the 'qualified_only' attribute. Therefore, there are ambiguous messages for NULL and the related-position messages to track down the problem. In your case, you have to qualify the 'NULL' you want to use.
A bit cryptic, but the answer to the problem is in there. I was able to find the CDS_MemMan library definition of NULL, but i wasn't able to find SoftMotion_CNC_Constants exactly. However, I did find another definition for NULL in the SM3_Basic library. The only way i have been able to 'qualify' anything in the library properties was the 'Only allow qualified access to all identifiers' checkbox (see pic). One or the other library needs to be checked off.
This has broken the log jam. The project now compiles without errors, downloads to the simulation, and runs. There is, however, still some ambiguity going on somewhere because, in my case anyway, every NULL is still underlined and pops up an "Ambiguous use of name 'NULL'" message. That doesn't stop compilation, and for now i'll take that as a win.
Find the new revision of the Fuzzy RPi project (Fuzzy_eFFL_RPi_010.project) at:
Thanks to the CODESYS folks for the direction.