running unit tests (with Eclipse CDT + GCC on Windows)

chromebin
Posts: 77
Joined: Wed Feb 07, 2018 3:53 pm

running unit tests (with Eclipse CDT + GCC on Windows)

Postby chromebin » Fri Jul 20, 2018 2:10 pm

Hello, I'd like to develop, test and debug my code on Windows, so by running a test program on the PC, instead of on the ESP32. It seems Eclipse CDT can do this, however, I am not at all experienced at setting this up. I have many perhaps silly questions:

- Is it a matter of adding a build target to the current install?

- Do you know resources, ideally related to mixed (ESP32) development, I could take a look at?

- Should I use a seperate Eclipse CDT + MINGW compiler install? This may be the best option as all components are portable?

- Maybe there is a working workspace configuration for download?

Following instructions (as on https://www.codeproject.com/Articles/14 ... ters-guide) feels like reinventing the weel, when _every_ install is identical to the next (sadly except for the irrelevant user name).

Note that this and other pages I looked at are from 2003..2007, while Eclipse has changed quite a lot since then.

chromebin
Posts: 77
Joined: Wed Feb 07, 2018 3:53 pm

Re: running unit tests (with Eclipse CDT + GCC on Windows)

Postby chromebin » Sat Jul 28, 2018 10:56 pm

The answer turns out to be very simple: just download and install the 64bit version of:

http://tdm-gcc.tdragon.net/download

Then start Eclipse in a new folder, then File->New C Project and select MINGW (automatically detected) and the Hello World example.

Enter in Debug Configurations once, select Debug and say goodbye to long debug cycles :mrgreen:

davdav
Posts: 208
Joined: Thu Nov 17, 2016 2:33 pm

Re: running unit tests (with Eclipse CDT + GCC on Windows)

Postby davdav » Sat Aug 04, 2018 10:42 am

Hello @chromebin,

Are you able to debug any kind of esp32 example on win without downloading the program the device and at least a jtag adapter and ocd?

Thanks

chromebin
Posts: 77
Joined: Wed Feb 07, 2018 3:53 pm

Re: running unit tests (with Eclipse CDT + GCC on Windows)

Postby chromebin » Sat Aug 04, 2018 7:07 pm

Sorry, no. There is no on device ESP32 emulation or debugging.

But most things, like a radio connection or a screen, I can simulate quite easily ("mock"). It's better than debugging on the device, because, for example in a protocol, I can introduce transmission errors and reproduce any errors that may result.

A few months ago we tried debugging with the Olimex ARM JTAG and OpenOCD, but it was much too buggy to be usable.
Last edited by chromebin on Mon Aug 06, 2018 10:20 am, edited 1 time in total.

davdav
Posts: 208
Joined: Thu Nov 17, 2016 2:33 pm

Re: running unit tests (with Eclipse CDT + GCC on Windows)

Postby davdav » Sun Aug 05, 2018 9:06 am

Ok.thanks.

Who is online

Users browsing this forum: No registered users and 92 guests