631 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 - Archive

Welcome to the Ask Embedded Wizard archive. This community forum served us well for many years, but we've evolved our support approach!

Your resources:

The Embedded Wizard Online Documentation provides comprehensive documentation, tutorials, examples and ready-to-use software packages.

For dedicated assistance, explore our Embedded Wizard Product Support.

You can still browse the valuable discussions from our community history here.

Embedded Wizard Website | Privacy Policy | Imprint

...