MBT build for Windows OS

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
YoTa_1693656
Level 6
Level 6
Distributor - Marubun (Japan)
250 replies posted 250 sign-ins 100 replies posted

Hello Cypress IoT team.

[Environment]

- WICED Studio version: 6.4

- Compiler:                      MinGW-w64

- Target OS:                    Windows 10

[Background]

To optimize MBT tool for our environment, we would like to build mbt.cpp in the following directory.

  WICED-Studio-6.4\wiced_tools\mbt\mbt.cpp

However, I encountered some errors when building.

== Error Log ==

$g++ -o mbt.exe mbt_com.cpp mbt_usb.cpp mbt.cpp

mbt_com.cpp:17:46: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]

static char* _stopBits[] = { "1", "1.5", "2" };

                                              ^

mbt_com.cpp:17:46: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]

mbt_com.cpp:17:46: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]

mbt_com.cpp: In destructor 'virtual ComHelper::~ComHelper()':

mbt_com.cpp:80:39: error: no matching function for call to 'ComHelper::~ComHelper()'

     TransportHelper::~TransportHelper();

                                       ^

In file included from mbt_com.h:13,

                 from mbt_com.cpp:14:

mbt.h:17:13: note: candidate: 'virtual TransportHelper::~TransportHelper()'

     virtual ~TransportHelper() {};

             ^

mbt.h:17:13: note:   candidate expects 1 argument, 0 provided

mbt_com.cpp: In member function 'virtual BOOL ComHelper::OpenPort(char*)':

mbt_com.cpp:126:84: error: cast from 'HANDLE' {aka 'void*'} to 'DWORD' {aka 'long unsigned int'} loses precision [-fpermissive]

         Logger.DebugOut("OpenPort Overlap Event Handle=%x\n", (DWORD)m_OverlapRead.hEvent);

                                                                                    ^~~~~~

mbt_com.cpp:128:85: error: cast from 'HANDLE' {aka 'void*'} to 'DWORD' {aka 'long unsigned int'} loses precision [-fpermissive]

         Logger.DebugOut("OpenPort Overlap Event Handle=%x\n", (DWORD)m_OverlapWrite.hEvent);

                                                                                     ^~~~~~

mbt.cpp: In function 'int execute_connectionless_dut_loopback_mode(char*)':

mbt.cpp:832:9: error: 'scanf_s' was not declared in this scope

         scanf_s("%x",&bd);

         ^~~~~~~

mbt.cpp:832:9: note: suggested alternative: 'sscanf_s'

         scanf_s("%x",&bd);

         ^~~~~~~

         sscanf_s

mbt.cpp:840:5: error: 'scanf_s' was not declared in this scope

     scanf_s("%x", &lt_addr);

     ^~~~~~~

mbt.cpp:840:5: note: suggested alternative: 'sscanf_s'

     scanf_s("%x", &lt_addr);

     ^~~~~~~

     sscanf_s

==================

        

[Need Help]

Could you tell us the cypress reference way to build MBT?

Thanks,

Yoshinori

0 Likes
1 Solution
SheetalJ
Moderator
Moderator
Moderator
First comment on KBA 750 replies posted 500 likes received

Hi Yoshinori,

Are you trying to change source code of MBT tool?

We strongly suggest customers not to modify source code of in-built tools such as MBT, chipload. I am afraid I won't be able to help you with any advancements with the MBT source code

However, I will suggest you to get in touch with your local Cypress team regarding this request.

View solution in original post

0 Likes
1 Reply
SheetalJ
Moderator
Moderator
Moderator
First comment on KBA 750 replies posted 500 likes received

Hi Yoshinori,

Are you trying to change source code of MBT tool?

We strongly suggest customers not to modify source code of in-built tools such as MBT, chipload. I am afraid I won't be able to help you with any advancements with the MBT source code

However, I will suggest you to get in touch with your local Cypress team regarding this request.

0 Likes