56 views
in System Integration by
Hello Embedded Wizard,

I have built an Intrinsics Module for use in my GUI development, following the instructions here: https://doc.embedded-wizard.de/implement-intrinsics?v=9.20. I built the intrinsics module using MS Visual Studio Express 2017 under Windows 10.  When I tried to run the prototyper in Embedded Wizard Studio, I get the error message "Fatal error: The type of the module "name.ewi" is not expected",  I can't understand what this error message means - can you help please?

Thanks

1 Answer

+1 vote
by
 
Best answer

Hello Jonathan,

it sounds as if the second parameter in the EW_MODULE is invalid. Can you verify whether the first two values are correct as shown in the screenshot below? Only the last value is intended to be changed:

Best regards

Paul Banach

by
Wow!  You were correct, thank you very much Paul.

Best regards,

Jonathan
by
Hello Paul,

I have one more question: I have created a Win32 exe file of my EmWi project to share with colleagues.  Can this file be made to interact with my intrinsics module in the same way that the prototyper does please?

Thanks
by

Hello Jonathan,

the Intrinsics Modules are just a 'trick' to add some native code to Embedded Wizard Studio. When you compile an application for a concrete target system (e.g. Win32) you can add all the native code (C files) directly to your build process. Then in Embedded Wizard project use native statement to incorporate code containing the invocations of the C functions. This is the regular approach of how to integrate the GUI with target specific code. See also: Integrating with the device. Using Intrinsics Modules within a Win32 application is not possible.

I hope, it helps you further.

Best regards

Paul Banach

by
Hello Paul,

Thanks for the answer.  I can add calls to C functions using the native statement in my EmWi project, however how should I add the calls to EwInitModule() and EwDoneModule() in a Win32 project?  My understanding is that these functions are automatically called by the prototyper, and so I would need to manually add calls to these functions in a Win32 project.

Thanks and regards

Jonathan
by

Hello Jonathan,

the calls to EwInitModule() and EwDoneModule() are Intrinsic specific and not found in the target system. If your C code contains some initialization/shutdown specific code, you invoke it similarly to how you invoke other functions from the native statement. Please take a look at the Applet example (found in the folder Embedded Wizard <version>\Examples\Applet just below your Documents folder. It contains some C code (simple game function), which is used in both cases: within an Intrinsic Module and directly within a Win32 project. In the last case all the Intrinsic specific functions (e.g. EwInitModule()) are ignored.

Best regards

Paul Banach

by
Hello Paul,

Thanks for your answer.  I am looking at the Applet example, and will develop my own solution from there.  Thanks a lot for the great support!

Best regards,

Jonathan

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

...