How to install and use Eclipse properly to build example codes
-
- Posts: 13
- Joined: Wed Nov 03, 2021 10:24 pm
How to install and use Eclipse properly to build example codes
I installed the ESP-IDF suite on Windows 10 according to the information in https://docs.espressif.com/projects/esp ... index.html, and it somehow got installed on my C:\users\public\desktop\edf-ide-2 folder. The desktop also has the shortcut links to ESP-IDF 4.3 CMD, ESP-IDF 4.3 Powershell and ESP-IDF Eclipse. The targets are:
C:\WINDOWS\system32\cmd.exe /k ""C:\Users\paul\.espressif\idf_cmd_init.bat" esp-idf-9a13e73ecaeca1c08b94992add490a27"
C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -NoExit -File "C:\Users\paul\.espressif/Initialize-Idf.ps1" -IdfId esp-idf-9a13e73ecaeca1c08b94992add490a27
and
C:\Users\paul\.espressif\tools\idf-eclipse\2021-09\eclipse.exe
All three have "Start In" Public Desktop
In order for me to use these links, I need to run them as administrator - otherwise they give write permission errors. I might be able to avoid that by setting up the executables as "run as administrator", but I haven't tried that yet. I also tried to install the ESP-IDF suite in my C:\Users\paul folder, and so I have a copy of the esp-idf folder there, as well as an eclipse-workspace folder in which I now have folders for blink1, blink2, NewBlink, NewBlink1, HelloWorld, and .metadata. The HelloWorld folder has hello_world_main.c which I have edited in Eclipse, and I think I was able to build and run this from Eclipse.
However, I seem to be making some mistakes with the various "blink" projects. "NewBlink" has "local" as target, and I cannot edit or delete the configuration from the list. "NewBlink1" somehow has main.c which is from a wifi project. "blink1" has a main.c which i copied from the original blink project where it is named blink.c.
I have been able to build, flash, and run the "blink" project on an ESP32-DevKitC-VE, and the "Hello_World" project on an ESP32-S2-DevKitM-1, using command prompt. But I don't really understand the Eclipse environment and I seem to be doing some wrong things. I would really like to just uninstall the software and then make a new install in my C:\users\paul folder where I think it belongs. And that may eliminate the problem that requires me to run in administrator mode. But the programs do not show up in the Windows App list where I would normally choose to remove the software.
I can live with it as it is now, but I'd like to learn the proper way to set up a new project in Eclipse from the examples. Please provide a detailed step-by step process to do this for "blink", or even better, one of the Bluetooth projects, especially if one will allow the use of one of the modules as a simple Bluetooth Com port like the HC-05.
TIA for any help you can provide, including perhaps a video or tutorial on using Eclipse for ESP-32 modules.
C:\WINDOWS\system32\cmd.exe /k ""C:\Users\paul\.espressif\idf_cmd_init.bat" esp-idf-9a13e73ecaeca1c08b94992add490a27"
C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -NoExit -File "C:\Users\paul\.espressif/Initialize-Idf.ps1" -IdfId esp-idf-9a13e73ecaeca1c08b94992add490a27
and
C:\Users\paul\.espressif\tools\idf-eclipse\2021-09\eclipse.exe
All three have "Start In" Public Desktop
In order for me to use these links, I need to run them as administrator - otherwise they give write permission errors. I might be able to avoid that by setting up the executables as "run as administrator", but I haven't tried that yet. I also tried to install the ESP-IDF suite in my C:\Users\paul folder, and so I have a copy of the esp-idf folder there, as well as an eclipse-workspace folder in which I now have folders for blink1, blink2, NewBlink, NewBlink1, HelloWorld, and .metadata. The HelloWorld folder has hello_world_main.c which I have edited in Eclipse, and I think I was able to build and run this from Eclipse.
However, I seem to be making some mistakes with the various "blink" projects. "NewBlink" has "local" as target, and I cannot edit or delete the configuration from the list. "NewBlink1" somehow has main.c which is from a wifi project. "blink1" has a main.c which i copied from the original blink project where it is named blink.c.
I have been able to build, flash, and run the "blink" project on an ESP32-DevKitC-VE, and the "Hello_World" project on an ESP32-S2-DevKitM-1, using command prompt. But I don't really understand the Eclipse environment and I seem to be doing some wrong things. I would really like to just uninstall the software and then make a new install in my C:\users\paul folder where I think it belongs. And that may eliminate the problem that requires me to run in administrator mode. But the programs do not show up in the Windows App list where I would normally choose to remove the software.
I can live with it as it is now, but I'd like to learn the proper way to set up a new project in Eclipse from the examples. Please provide a detailed step-by step process to do this for "blink", or even better, one of the Bluetooth projects, especially if one will allow the use of one of the modules as a simple Bluetooth Com port like the HC-05.
TIA for any help you can provide, including perhaps a video or tutorial on using Eclipse for ESP-32 modules.
-
- Posts: 7
- Joined: Wed Nov 10, 2021 11:01 am
Re: How to install and use Eclipse properly to build example codes
Hi
You are right about installing it in a proper user directory because anything not in user directory often requires the admin privileges to run. If you are not seeing this in the General software installation manager in windows you can remove the folders and install in proper directory if you used the Installer running it again should be fine in a different directory.
As per the examples you may have to reinstall the idf tools. If you have already installed them one workaround this is that you need to switch to a new workspace (switching workspace is just to be safe so that old launch configs are not forwarded) launch the ESP-IDF Terminal in eclipse and run install.bat and export.bat respectively.
After that install the idf tools again from the menu option. Then try to create a new example project and see if you are able to build and flash.
Hope it helps
You are right about installing it in a proper user directory because anything not in user directory often requires the admin privileges to run. If you are not seeing this in the General software installation manager in windows you can remove the folders and install in proper directory if you used the Installer running it again should be fine in a different directory.
As per the examples you may have to reinstall the idf tools. If you have already installed them one workaround this is that you need to switch to a new workspace (switching workspace is just to be safe so that old launch configs are not forwarded) launch the ESP-IDF Terminal in eclipse and run install.bat and export.bat respectively.
After that install the idf tools again from the menu option. Then try to create a new example project and see if you are able to build and flash.
Hope it helps
-
- Posts: 7
- Joined: Wed Nov 10, 2021 11:01 am
Re: How to install and use Eclipse properly to build example codes
Can you please share the projects that you are creating?PSTechPaul wrote: ↑Wed Nov 10, 2021 1:11 amI installed the ESP-IDF suite on Windows 10 according to the information in https://docs.espressif.com/projects/esp ... index.html, and it somehow got installed on my C:\users\public\desktop\edf-ide-2 folder. The desktop also has the shortcut links to ESP-IDF 4.3 CMD, ESP-IDF 4.3 Powershell and ESP-IDF Eclipse. The targets are:
C:\WINDOWS\system32\cmd.exe /k ""C:\Users\paul\.espressif\idf_cmd_init.bat" esp-idf-9a13e73ecaeca1c08b94992add490a27"
C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -NoExit -File "C:\Users\paul\.espressif/Initialize-Idf.ps1" -IdfId esp-idf-9a13e73ecaeca1c08b94992add490a27
and
C:\Users\paul\.espressif\tools\idf-eclipse\2021-09\eclipse.exe
All three have "Start In" Public Desktop
In order for me to use these links, I need to run them as administrator - otherwise they give write permission errors. I might be able to avoid that by setting up the executables as "run as administrator", but I haven't tried that yet. I also tried to install the ESP-IDF suite in my C:\Users\paul folder, and so I have a copy of the esp-idf folder there, as well as an eclipse-workspace folder in which I now have folders for blink1, blink2, NewBlink, NewBlink1, HelloWorld, and .metadata. The HelloWorld folder has hello_world_main.c which I have edited in Eclipse, and I think I was able to build and run this from Eclipse.
However, I seem to be making some mistakes with the various "blink" projects. "NewBlink" has "local" as target, and I cannot edit or delete the configuration from the list. "NewBlink1" somehow has main.c which is from a wifi project. "blink1" has a main.c which i copied from the original blink project where it is named blink.c.
I have been able to build, flash, and run the "blink" project on an ESP32-DevKitC-VE, and the "Hello_World" project on an ESP32-S2-DevKitM-1, using command prompt. But I don't really understand the Eclipse environment and I seem to be doing some wrong things. I would really like to just uninstall the software and then make a new install in my C:\users\paul folder where I think it belongs. And that may eliminate the problem that requires me to run in administrator mode. But the programs do not show up in the Windows App list where I would normally choose to remove the software.
I can live with it as it is now, but I'd like to learn the proper way to set up a new project in Eclipse from the examples. Please provide a detailed step-by step process to do this for "blink", or even better, one of the Bluetooth projects, especially if one will allow the use of one of the modules as a simple Bluetooth Com port like the HC-05.
TIA for any help you can provide, including perhaps a video or tutorial on using Eclipse for ESP-32 modules.
-
- Posts: 13
- Joined: Wed Nov 03, 2021 10:24 pm
Re: How to install and use Eclipse properly to build example codes
I have only been working with the sample "Hello_World" and "blink" projects. I've only modified the main source code a little bit, and somehow I got "Hello_World" to work in Eclipse but not "blink". I really need to learn more about Eclipse which will be more convenient to edit, build, flash, and run.
The only reason (for now) that I have been trying to work with these ESP modules is to replace the HC-05 Bluetooth modules that I have used before, but they seem to be no longer discovered on Windows 10. I am developing a simple VFD motor control using a Microchip dsPIC33 device and the ESP32 devices seemed much more versatile and less expensive than the Microchip BLE modules.
I'll try and follow your suggestions but this is taking a lot more effort than I had hoped for. I appreciate the advice. Thanks.
The only reason (for now) that I have been trying to work with these ESP modules is to replace the HC-05 Bluetooth modules that I have used before, but they seem to be no longer discovered on Windows 10. I am developing a simple VFD motor control using a Microchip dsPIC33 device and the ESP32 devices seemed much more versatile and less expensive than the Microchip BLE modules.
I'll try and follow your suggestions but this is taking a lot more effort than I had hoped for. I appreciate the advice. Thanks.
-
- Posts: 7
- Joined: Wed Nov 10, 2021 11:01 am
Re: How to install and use Eclipse properly to build example codes
Hi PaulPSTechPaul wrote: ↑Thu Nov 11, 2021 6:22 amI have only been working with the sample "Hello_World" and "blink" projects. I've only modified the main source code a little bit, and somehow I got "Hello_World" to work in Eclipse but not "blink". I really need to learn more about Eclipse which will be more convenient to edit, build, flash, and run.
The only reason (for now) that I have been trying to work with these ESP modules is to replace the HC-05 Bluetooth modules that I have used before, but they seem to be no longer discovered on Windows 10. I am developing a simple VFD motor control using a Microchip dsPIC33 device and the ESP32 devices seemed much more versatile and less expensive than the Microchip BLE modules.
I'll try and follow your suggestions but this is taking a lot more effort than I had hoped for. I appreciate the advice. Thanks.
We have noticed your concerns and will be making it more streamlined for the new users. Can you please attach the blink project that is created from the examples. We can test and see what are the issues with that.
Regards
-
- Posts: 13
- Joined: Wed Nov 03, 2021 10:24 pm
Re: How to install and use Eclipse properly to build example codes
I was able to use one of my build configurations or projects, which I had named "blink1". I have copied the entire folder into a compressed folder but it is still about 40 Mb, and I don't think it will help, since it works, but I don't remember just how I was able to transfer it from the Public Desktop where the links and the esp-idf-2 folder were originally installed. I also discovered how to view the Project Explorer in Eclipse, which helped a lot. Once I built the project (which took almost ten minutes) I was able to run it, although it had an error in which it could not find the BLINK_GPIO definition. So I just defined it as 5, which is where I attached my LED, and it pretty quickly recompiled just that file and successfully flashed the ESP-32 module.
I found a YouTube tutorial https://www.youtube.com/watch?v=bYh2w0HzS7s on using Eclipse for ESP32, but it is from 2016 and seems to involve a lot of extra steps that are probably unnecessary for the current version I assume I am using:
Version: 2021-06 (4.20.0)
Build id: 20210612-2011
At this point it would really help if you could suggest how to most easily program this ESP32C (or the ESP32-S2 to operate as a Bluetooth adapter which can be discovered and paired as a COM port and echo the received data to the Rx and Tx pins of the module. I can then attach it to my dsPIC project board and use an external computer or smart phone Bluetooth terminal for control and data. I think this would be:
C:\Users\Public\Desktop\esp-idf-2\examples\bluetooth\bluedroid\classic_bt
But there are many other Bluetooth examples and I'm not sure which one would do what I want (like the HC-05 module). And if you could list the specific steps needed to use one of these example projects with Eclipse I would appreciate it, and it might be very helpful to other new users. Thanks.
I found a YouTube tutorial https://www.youtube.com/watch?v=bYh2w0HzS7s on using Eclipse for ESP32, but it is from 2016 and seems to involve a lot of extra steps that are probably unnecessary for the current version I assume I am using:
Version: 2021-06 (4.20.0)
Build id: 20210612-2011
At this point it would really help if you could suggest how to most easily program this ESP32C (or the ESP32-S2 to operate as a Bluetooth adapter which can be discovered and paired as a COM port and echo the received data to the Rx and Tx pins of the module. I can then attach it to my dsPIC project board and use an external computer or smart phone Bluetooth terminal for control and data. I think this would be:
C:\Users\Public\Desktop\esp-idf-2\examples\bluetooth\bluedroid\classic_bt
But there are many other Bluetooth examples and I'm not sure which one would do what I want (like the HC-05 module). And if you could list the specific steps needed to use one of these example projects with Eclipse I would appreciate it, and it might be very helpful to other new users. Thanks.
-
- Posts: 786
- Joined: Wed Nov 14, 2018 8:45 am
Re: How to install and use Eclipse properly to build example codes
Hi PSTechPaul, how do you use HC-05 module? Do you use AT commands to communicate with it? If so, please transfer to https://docs.espressif.com/projects/esp ... index.html, and check whether it feeds your requirement.
-
- Posts: 13
- Joined: Wed Nov 03, 2021 10:24 pm
Re: How to install and use Eclipse properly to build example codes
That looks like a very good solution to my problems. I am familiar with the AT command codes for the HC-05, although I usually don't need to use them. Once configured, I just want to use the device as a wireless serial port to communicate with a remote PC or tablet device. I'll try implementing these examples and hopefully they will do the job. Thanks!
-
- Posts: 13
- Joined: Wed Nov 03, 2021 10:24 pm
Re: How to install and use Eclipse properly to build example codes
I was able to install the factory settings (bin) and the TX/RX pins work by responding to AT commands. This is on an ESP-32-WROVER module, using GPI9 and GPIO22.
However, I would like to be able to use the Bluetooth function where this device acts as a wireless serial port and can be discovered and paired.
However, I would like to be able to use the Bluetooth function where this device acts as a wireless serial port and can be discovered and paired.
-
- Posts: 13
- Joined: Wed Nov 03, 2021 10:24 pm
Re: How to install and use Eclipse properly to build example codes
I found out how to set up the device for classic Bluetooth, and it works OK with my Android phone and the Bluetooth terminal. However, when I send an ASCII command such as "123", it responds with "+BTDATA:5,123". This was surprising, but I can easily enough parse that to get the response I need on my target device. The number seems to be the number of bytes received, including the CRLF (newline).
It appears that I will need to resend the initialization commands when the device is disconnected. Again, surprising, but OK.
https://docs.espressif.com/projects/esp ... utnooutput
It appears that I will need to resend the initialization commands when the device is disconnected. Again, surprising, but OK.
https://docs.espressif.com/projects/esp ... utnooutput
Who is online
Users browsing this forum: No registered users and 53 guests