243 views
in System Integration by
HI,

When I get a string from the Device Layer, I get the following errors:

../GeneratedCode/Application.c:144:18: warning: implicit declaration of function ‘DeviceDriver_GetRecipeName’ [-Wimplicit-function-declaration]
     recipeName = DeviceDriver_GetRecipeName();
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~
../GeneratedCode/Application.c:144:16: warning: assignment to ‘XString’ {aka ‘short unsigned int *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
     recipeName = DeviceDriver_GetRecipeName();
 

How do I declare DeviceDriver_GetRecipeName as it is a native call and how do I fix the XString warning?

Thanks

Phil

1 Answer

0 votes
by

Hi Phil,

in order to provide the declaration of your native functions let me recommend to add an Inline Code into your device class - there you can add your #include statement. Please don't forget to adjust the order of the Inline Code member so that the #include statement will be arranged at the beginning of the C file. 

Concerning the string warning, let me recommend the chapter Be careful when exchanging strings - it describes all aspects when transferring strings from and to a device driver.

Hope this helps...

Best regards,

Manfred.

by
Thanks Manfred, it was the position of the Inline code that was the issue, moving it to 'Bottom' solved both issues.

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...