Page 1 of 1

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

Posted: Fri Jul 20, 2018 2:10 pm
by chromebin
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.

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

Posted: Sat Jul 28, 2018 10:56 pm
by chromebin
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:

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

Posted: Sat Aug 04, 2018 10:42 am
by davdav
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

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

Posted: Sat Aug 04, 2018 7:07 pm
by chromebin
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.

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

Posted: Sun Aug 05, 2018 9:06 am
by davdav
Ok.thanks.