610 views
in Platform Packages by
Hello,

I am using windows 10 and I want to communicate over ModBus TCP to control and read the hardware. I have created few buttons and display on the GUI. But I am unable to complie the code in Eclipse. Kinldy help.

Is there a package for Windows or "Tara.Win32.Index8" is enough?. I get errors on missing headers.

Hope I am correct. I dint find help on working on windows.

1 Answer

0 votes
by

Hi,

could you please show us the error messages? To create an application for Win32 all necessary files are provided in the directory Platforms\Tara\Win32\RTE and Platforms\Tara\Win32\<your-selected-color-format>\GFX both relative to the Embedded Wizard installation directory. You will need to add these files to your project in order to compile the resulting application.

Please note, few of the files are libraries (*.LIB) compiled with Visual Studio. Maybe, Eclipse can't use these files? 

Best regards

Paul Banach

by
Hello Paul,

Sorry I dint mention this earlier. As I dint find the package(Build environment) for windows in "https://www.embedded-wizard.de/download" after i registered. I downloaded the "PIC32MZ-DA-MEB-II" build environment to get the missing header files required for the compliation. But even this approch dint work.

Also I tired compliing using the "https://doc.embedded-wizard.de/getting-started-pic32mz-dag-meb-ii?v=9.10". Followed the step by step process but the command promt says "The system cannot find the path specified.".

I would like to have build environment for windows. I dont have the path "Platforms\Tara\Win32\RTE and Platforms\Tara\Win32\<your-selected-color-format>\GFX " as you have mentioned. Is it included in the free download of "Embedded Wizard Studio Free" version?
by
I took the files form "Platforms\Tara\Win32\RTE and Platforms\Tara\Win32\<your-selected-color-format>\GFX" and complied and got the below error.

 

16:39:46 **** Incremental Build of configuration Debug for project Hello_World ****
Info: Internal Builder is used for build
gcc -O0 -g3 -Wall -c -fmessage-length=0 -o "src\\Application.o" "..\\src\\Application.c"
..\src\Application.c:964:1: warning: 'naked' attribute directive ignored [-Wattributes]
 {
 ^
..\src\Application.c: In function 'ApplicationFontLarge_Proc':
..\src\Application.c:967:3: error: expected '(' before '{' token
   {
   ^
..\src\Application.c:968:5: error: unknown type name 'mov'
     mov eax, DWORD PTR [ ecx ]
     ^~~
..\src\Application.c:968:20: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'PTR'
     mov eax, DWORD PTR [ ecx ]
                    ^~~
..\src\Application.c:968:9: warning: unused variable 'eax' [-Wunused-variable]
     mov eax, DWORD PTR [ ecx ]
         ^~~
In file included from ..\src\ewgfx.h:135:0,
                 from ..\src\_ApplicationApplication.h:40,
                 from ..\src\Application.c:28:
..\src\ewextbmp.h:251:45: error: declaration of '_cp_ApplicationLogoDefault' with no linkage follows extern declaration
   EW_BITMAP_PIXEL_PRAGMA const unsigned int _cp_##aName##aLangId[] =           \
                                             ^
..\src\Application.c:983:3: note: in expansion of macro 'EW_BITMAP_PIXEL'
   EW_BITMAP_PIXEL( ApplicationLogo, Default )                   /* ratio 23.00 % */
   ^~~~~~~~~~~~~~~
..\src\ewextbmp.h:235:29: note: previous declaration of '_cp_ApplicationLogoDefault' was here
   extern const unsigned int _cp_##aName##aLangId[];                            \
                             ^
..\src\Application.c:983:3: note: in expansion of macro 'EW_BITMAP_PIXEL'
   EW_BITMAP_PIXEL( ApplicationLogo, Default )                   /* ratio 23.00 % */
   ^~~~~~~~~~~~~~~
..\src\Application.c:1067:1: warning: 'naked' attribute directive ignored [-Wattributes]
 {
 ^
..\src\Application.c: In function 'ApplicationLogo_Proc':
..\src\Application.c:1070:3: error: expected '(' before '{' token
   {
   ^
..\src\Application.c:1071:5: error: unknown type name 'mov'
     mov eax, DWORD PTR [ ecx ]
     ^~~
..\src\Application.c:1071:20: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'PTR'
     mov eax, DWORD PTR [ ecx ]
                    ^~~
..\src\Application.c:1071:9: warning: unused variable 'eax' [-Wunused-variable]
     mov eax, DWORD PTR [ ecx ]
         ^~~
In file included from ..\src\ewgfx.h:136:0,
                 from ..\src\_ApplicationApplication.h:40,
                 from ..\src\Application.c:28:
..\src\ewextfnt.h:190:22: error: declaration of '___ApplicationFontSmall' with no linkage follows extern declaration
   const XFntGlyphRes ___##aName[] =                                            \
                      ^
..\src\Application.c:1082:1: note: in expansion of macro 'EW_DEFINE_FONT_RES'
 EW_DEFINE_FONT_RES( ApplicationFontSmall, 16, 4, 1, 16, 0x001F, 0x00C0 )
 ^~~~~~~~~~~~~~~~~~
..\src\ewextfnt.h:173:30: note: previous declaration of '___ApplicationFontSmall' was here
   extern const XFntGlyphRes  ___##aName[];                                     \
                              ^
..\src\Application.c:1082:1: note: in expansion of macro 'EW_DEFINE_FONT_RES'
 EW_DEFINE_FONT_RES( ApplicationFontSmall, 16, 4, 1, 16, 0x001F, 0x00C0 )
 ^~~~~~~~~~~~~~~~~~
..\src\ewextfnt.h:208:43: error: declaration of '____ApplicationFontSmall' with no linkage follows extern declaration
   EW_FONT_PIXEL_PRAGMA const unsigned int ____##aName[] =                      \
                                           ^
..\src\Application.c:1276:3: note: in expansion of macro 'EW_FONT_PIXEL'
   EW_FONT_PIXEL( ApplicationFontSmall, 0x0000B7CF )             /* ratio 72.40 % */
   ^~~~~~~~~~~~~
..\src\ewextfnt.h:172:30: note: previous declaration of '____ApplicationFontSmall' was here
   extern const unsigned int  ____##aName[];                                    \
                              ^
..\src\Application.c:1082:1: note: in expansion of macro 'EW_DEFINE_FONT_RES'
 EW_DEFINE_FONT_RES( ApplicationFontSmall, 16, 4, 1, 16, 0x001F, 0x00C0 )
 ^~~~~~~~~~~~~~~~~~
..\src\ewextfnt.h:213:43: error: declaration of '_kc_ApplicationFontSmall' with no linkage follows extern declaration
   EW_FONT_PIXEL_PRAGMA const unsigned int _kc_##aName[] =                      \
                                           ^
..\src\Application.c:1489:3: note: in expansion of macro 'EW_FONT_KERNING_CODES'
   EW_FONT_KERNING_CODES( ApplicationFontSmall )
   ^~~~~~~~~~~~~~~~~~~~~
..\src\ewextfnt.h:174:30: note: previous declaration of '_kc_ApplicationFontSmall' was here
   extern const unsigned int  _kc_##aName[];                                    \
                              ^
..\src\Application.c:1082:1: note: in expansion of macro 'EW_DEFINE_FONT_RES'
 EW_DEFINE_FONT_RES( ApplicationFontSmall, 16, 4, 1, 16, 0x001F, 0x00C0 )
 ^~~~~~~~~~~~~~~~~~
..\src\ewextfnt.h:219:44: error: declaration of '_kv_ApplicationFontSmall' with no linkage follows extern declaration
   EW_FONT_PIXEL_PRAGMA const unsigned char _kv_##aName[] =                     \
                                            ^
..\src\Application.c:1502:3: note: in expansion of macro 'EW_FONT_KERNING_VALUES'
   EW_FONT_KERNING_VALUES( ApplicationFontSmall )
   ^~~~~~~~~~~~~~~~~~~~~~
..\src\ewextfnt.h:175:30: note: previous declaration of '_kv_ApplicationFontSmall' was here
   extern const unsigned char _kv_##aName[];                                    \
                              ^
..\src\Application.c:1082:1: note: in expansion of macro 'EW_DEFINE_FONT_RES'
 EW_DEFINE_FONT_RES( ApplicationFontSmall, 16, 4, 1, 16, 0x001F, 0x00C0 )
 ^~~~~~~~~~~~~~~~~~
..\src\Application.c:1513:1: warning: 'naked' attribute directive ignored [-Wattributes]
 {
 ^
..\src\Application.c: In function 'ApplicationFontSmall_Proc':
..\src\Application.c:1516:3: error: expected '(' before '{' token
   {
   ^
..\src\Application.c:1517:5: error: unknown type name 'mov'
     mov eax, DWORD PTR [ ecx ]
     ^~~
..\src\Application.c:1517:20: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'PTR'
     mov eax, DWORD PTR [ ecx ]
                    ^~~
..\src\Application.c:1517:9: warning: unused variable 'eax' [-Wunused-variable]
     mov eax, DWORD PTR [ ecx ]
         ^~~
..\src\Application.c:1525:1: error: expected declaration or statement at end of input
 EW_RES_WITHOUT_VARIANTS( ApplicationFontSmall )
 ^~~~~~~~~~~~~~~~~~~~~~~
In file included from ..\src\_ApplicationApplication.h:35:0,
                 from ..\src\Application.c:28:
..\src\Application.c:1525:26: warning: unused variable 'ApplicationFontSmall' [-Wunused-variable]
 EW_RES_WITHOUT_VARIANTS( ApplicationFontSmall )
                          ^
..\src\ewrte.h:2175:18: note: in definition of macro 'EW_RES_WITHOUT_VARIANTS'
   const XVariant aResource =                                                   \
                  ^~~~~~~~~
..\src\Application.c:1525:1: warning: no return statement in function returning non-void [-Wreturn-type]
 EW_RES_WITHOUT_VARIANTS( ApplicationFontSmall )
 ^~~~~~~~~~~~~~~~~~~~~~~
..\src\Application.c: In function 'ApplicationLogo_Proc':
..\src\Application.c:1525:1: error: expected declaration or statement at end of input
In file included from ..\src\ewgfx.h:136:0,
                 from ..\src\_ApplicationApplication.h:40,
                 from ..\src\Application.c:28:
..\src\ewextfnt.h:219:44: warning: unused variable '_kv_ApplicationFontSmall' [-Wunused-variable]
   EW_FONT_PIXEL_PRAGMA const unsigned char _kv_##aName[] =                     \
                                            ^
..\src\Application.c:1502:3: note: in expansion of macro 'EW_FONT_KERNING_VALUES'
   EW_FONT_KERNING_VALUES( ApplicationFontSmall )
   ^~~~~~~~~~~~~~~~~~~~~~
..\src\ewextfnt.h:213:43: warning: unused variable '_kc_ApplicationFontSmall' [-Wunused-variable]
   EW_FONT_PIXEL_PRAGMA const unsigned int _kc_##aName[] =                      \
                                           ^
..\src\Application.c:1489:3: note: in expansion of macro 'EW_FONT_KERNING_CODES'
   EW_FONT_KERNING_CODES( ApplicationFontSmall )
   ^~~~~~~~~~~~~~~~~~~~~
..\src\ewextfnt.h:208:43: warning: unused variable '____ApplicationFontSmall' [-Wunused-variable]
   EW_FONT_PIXEL_PRAGMA const unsigned int ____##aName[] =                      \
                                           ^
..\src\Application.c:1276:3: note: in expansion of macro 'EW_FONT_PIXEL'
   EW_FONT_PIXEL( ApplicationFontSmall, 0x0000B7CF )             /* ratio 72.40 % */
   ^~~~~~~~~~~~~
..\src\ewextfnt.h:190:22: warning: unused variable '___ApplicationFontSmall' [-Wunused-variable]
   const XFntGlyphRes ___##aName[] =                                            \
                      ^
..\src\Application.c:1082:1: note: in expansion of macro 'EW_DEFINE_FONT_RES'
 EW_DEFINE_FONT_RES( ApplicationFontSmall, 16, 4, 1, 16, 0x001F, 0x00C0 )
 ^~~~~~~~~~~~~~~~~~
In file included from ..\src\_ApplicationApplication.h:35:0,
                 from ..\src\Application.c:28:
..\src\Application.c:1079:26: warning: unused variable 'ApplicationLogo' [-Wunused-variable]
 EW_RES_WITHOUT_VARIANTS( ApplicationLogo )
                          ^
..\src\ewrte.h:2175:18: note: in definition of macro 'EW_RES_WITHOUT_VARIANTS'
   const XVariant aResource =                                                   \
                  ^~~~~~~~~
..\src\Application.c:1525:1: warning: no return statement in function returning non-void [-Wreturn-type]
 EW_RES_WITHOUT_VARIANTS( ApplicationFontSmall )
 ^~~~~~~~~~~~~~~~~~~~~~~
..\src\Application.c: In function 'ApplicationFontLarge_Proc':
..\src\Application.c:1525:1: error: expected declaration or statement at end of input
In file included from ..\src\ewgfx.h:135:0,
                 from ..\src\_ApplicationApplication.h:40,
                 from ..\src\Application.c:28:
..\src\ewextbmp.h:251:45: warning: unused variable '_cp_ApplicationLogoDefault' [-Wunused-variable]
   EW_BITMAP_PIXEL_PRAGMA const unsigned int _cp_##aName##aLangId[] =           \
                                             ^
..\src\Application.c:983:3: note: in expansion of macro 'EW_BITMAP_PIXEL'
   EW_BITMAP_PIXEL( ApplicationLogo, Default )                   /* ratio 23.00 % */
   ^~~~~~~~~~~~~~~
In file included from ..\src\_ApplicationApplication.h:35:0,
                 from ..\src\Application.c:28:
..\src\Application.c:976:26: warning: unused variable 'ApplicationFontLarge' [-Wunused-variable]
 EW_RES_WITHOUT_VARIANTS( ApplicationFontLarge )
                          ^
..\src\ewrte.h:2175:18: note: in definition of macro 'EW_RES_WITHOUT_VARIANTS'
   const XVariant aResource =                                                   \
                  ^~~~~~~~~
..\src\Application.c:1525:1: warning: control reaches end of non-void function [-Wreturn-type]
 EW_RES_WITHOUT_VARIANTS( ApplicationFontSmall )
 ^~~~~~~~~~~~~~~~~~~~~~~
In file included from ..\src\_ApplicationApplication.h:35:0,
                 from ..\src\Application.c:28:
At top level:
..\src\Application.c:976:26: warning: 'ApplicationFontLarge' defined but not used [-Wunused-const-variable=]
 EW_RES_WITHOUT_VARIANTS( ApplicationFontLarge )
                          ^
..\src\ewrte.h:2175:18: note: in definition of macro 'EW_RES_WITHOUT_VARIANTS'
   const XVariant aResource =                                                   \
                  ^~~~~~~~~
In file included from ..\src\ewgfx.h:135:0,
                 from ..\src\_ApplicationApplication.h:40,
                 from ..\src\Application.c:28:
..\src\ewextbmp.h:251:45: warning: '_cp_ApplicationLogoDefault' defined but not used [-Wunused-const-variable=]
   EW_BITMAP_PIXEL_PRAGMA const unsigned int _cp_##aName##aLangId[] =           \
                                             ^
..\src\Application.c:983:3: note: in expansion of macro 'EW_BITMAP_PIXEL'
   EW_BITMAP_PIXEL( ApplicationLogo, Default )                   /* ratio 23.00 % */
   ^~~~~~~~~~~~~~~
..\src\Application.c:1066:27: warning: 'ApplicationLogo_Proc' defined but not used [-Wunused-function]
 __declspec( naked ) void* ApplicationLogo_Proc( void* aResourceClass )
                           ^~~~~~~~~~~~~~~~~~~~
..\src\Application.c:1512:27: warning: 'ApplicationFontSmall_Proc' defined but not used [-Wunused-function]
 __declspec( naked ) void* ApplicationFontSmall_Proc( void* aResourceClass )
                           ^~~~~~~~~~~~~~~~~~~~~~~~~

16:39:47 Build Failed. 17 errors, 21 warnings. (took 828ms)
by

Hi,

The generated code is optimized for the Visual Studio compiler. Evidently, GCC will not accept it. I think, you will need to use the Visual Studio (e.g. the Express edition, which is also for free). Please see also the following article: How can I create a Win32 application?

Best regards

Paul Banach

by
Hello Paul,

Thanks a lot. The above approach worked.

So my next issue is with connecting the application with external device connected over Modbus. As per the knowledge base I know we have to update the device class but not sure where to start.

I have created a slider switch widget with a guage indicating the value. I want to use slider switch to change the value of the device and display the corresponing feedback from the device on the guage.

Hope you can help me on this.

Thanks,

Kiran
by

Hello Kiran,

almost every GUI application is intended to interact with a real system - so it needs to display some real data from a certain machine or it needs to control some activities of the underlying system. However this is sometimes not the simplest part.

Let me refer to the articles Integrating with the device and Device Class and Device Driver, both are part of our online documentation. They explain all basics about natvie code and the integration of external software APIs or hardware drivers.

For Win32 we do not have a ready to use example - but the principles are identical for every platform.

Best regards,

Paul Banach

Embedded Wizard Website | Privacy Policy | Imprint

...