How to connect ESP32 - esp32

I am getting the following eroor while connecting ESP32
Arduino: 1.8.19 (Windows Store 1.8.57.0) (Windows 10), Board: "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, None"
Multiple libraries were found for "WiFi.h"
In file included from C:\Users\Ayan Atal\Desktop\College\SEM 6\Minor\Ultrasonic\Ultrasonic.ino:3:0:
Used: C:\Users\Ayan Atal\Documents\ArduinoData\packages\esp32\hardware\esp32\1.0.6\libraries\WiFi
C:\Users\Ayan Atal\Documents\Arduino\libraries\ESPAsyncWebServer-master\src/ESPAsyncWebServer.h:33:22: fatal error: AsyncTCP.h: No such file or directory
Not used: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\libraries\WiFi
compilation terminated.
exit status 1
Error compiling for board ESP32 Dev Module.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

There is library name conflicts. I usually solve this by first uninstalling Arduino IDE and then deleting arduino libraries, and then reinstalling everything from scratch. Sometimes using older versions of arduino IDE also had helped.
Thank You,
Have a Great Day,
Naveen.

Related

Access denied when building esp-idf-sys for Rust project for ESP32 on Windows 10

I'm attempting to set up this Rust template project to get started doing Rust development for ESP32: https://github.com/esp-rs/esp-idf-template
I've installed the Rustup esp toolchain, as described here: https://github.com/esp-rs/rust-build
At the Generate the Project step, I chose these parameters:
Configure project to use Dev Containers = false
ESP-IDF native build version = v4.4
Rust toolchain = esp
STD Support = true
MCU = esp32
At the Build step, I get this output (second run displayed, first run compiles a long list of dependencies before this point):
C:\Users\Me\boop\doop>cargo build
Compiling esp-idf-sys v0.31.6
error: failed to run custom build command for `esp-idf-sys v0.31.6`
Caused by:
process didn't exit successfully: `C:\Users\Me\boop\doop\target\debug\build\esp-idf-sys-cafd80a349bfdbb2\build-script-build` (exit code: 1)
--- stdout
cargo:rerun-if-env-changed=IDF_PATH
cargo:rerun-if-env-changed=ESP_IDF_TOOLS_INSTALL_DIR
cargo:rerun-if-env-changed=ESP_IDF_VERSION
cargo:rerun-if-env-changed=ESP_IDF_REPOSITORY
cargo:rerun-if-env-changed=ESP_IDF_SDKCONFIG_DEFAULTS
cargo:rerun-if-env-changed=ESP_IDF_SDKCONFIG
cargo:rerun-if-env-changed=MCU
IDF_PYTHON_ENV_PATH=C:\Users\Me\boop\doop\.embuild\espressif\python_env\idf4.4_py3.10_env
PATH=C:\Users\Me\boop\doop\.embuild\espressif\tools\esp32ulp-elf\2.28.51-esp-20191205\esp32ulp-elf-binutils\bin;C:\Users\Me\boop\doop\.embuild\espressif\tools\cmake\3.23.1\bin;C:\Users\Me\boop\doop\.embuild\espressif\tools\ninja\1.10.2\;C:\Users\Me\boop\doop\.embuild\espressif\python_env\idf4.4_py3.10_env\Scripts;C:\Users\Me\boop\doop\.embuild\espressif\esp-idf\release-v4.4\tools;%PATH%
Current system platform: win64
Skipping xtensa-esp32-elf#esp-2021r2-patch3-8.4.0 (already installed)
Skipping cmake#3.23.1 (already installed)
Skipping ninja#1.10.2 (already installed)
Skipping esp32ulp-elf#2.28.51-esp-20191205 (already installed)
IDF_PYTHON_ENV_PATH=C:\Users\Me\boop\doop\.embuild\espressif\python_env\idf4.4_py3.10_env
PATH=C:\Users\Me\boop\doop\.embuild\espressif\tools\esp32ulp-elf\2.28.51-esp-20191205\esp32ulp-elf-binutils\bin;C:\Users\Me\boop\doop\.embuild\espressif\tools\cmake\3.23.1\bin;C:\Users\Me\boop\doop\.embuild\espressif\tools\ninja\1.10.2\;C:\Users\Me\boop\doop\.embuild\espressif\python_env\idf4.4_py3.10_env\Scripts;C:\Users\Me\boop\doop\.embuild\espressif\esp-idf\release-v4.4\tools;%PATH%
--- stderr
Using managed esp-idf repository: EspIdfRemote { repo_url: None, git_ref: Branch("release/v4.4") }
fatal: No names found, cannot describe anything.
Using esp-idf v4.4.1 at 'C:\Users\Me\boop\doop\.embuild\espressif\esp-idf\release-v4.4'
fatal: No names found, cannot describe anything.
Error: Access is denied. (os error 5)
I get the same error when I choose ESP-IDF native build version = v4.3.2, although without the fatal: No names found, cannot describe anything. messages.
I get an identical error when attempting to build this Rust ESP32 demo project: https://github.com/ivmarkov/rust-esp32-std-demo
This was run as Administrator.
In my search for a solution, I found this: Why os.rename sometimes returns error access is denied python Per the top answer, I disabled "Show frequently used folders in Quick access" in File explorer, but unfortunately the build error has not changed.
What access is being denied, and what could be causing the denial, even when run as Administrator?
Secondarily, what is the cause and meaning of the fatal: No names found, cannot describe anything. messages?
I've been working through the same issue today.
It is caused by a change in the embuild dependency: https://github.com/esp-rs/embuild/commit/d8f8da228f1e1e6c105074d96617a8601092f633
Trying to write permission data to an open file causes the 'os error 5
I've submitted a PR to the project: https://github.com/esp-rs/embuild/pull/56
Now merged, cargo update and you should be good!

arduino.h: 48:17: fatal error: sam.h: No such file or directory

I am trying to compile a simple new project ('hello') for the Arduino M0 Pro. I have created a new project in visual studio 2015 (using vMicro).
But I get the error:
hello.ino: In file included from
arduino.h: 48:17: fatal error: sam.h: No such file or directory
#include "sam.h"
compilation terminated
Through the Arduino IDE - board manager I have installed the cores for Arduino SAM Boards and SAMD Boards. Currently it is on Arduino IDE: v1.6.18, SAM: v1.6.11 and SAMD: v1.6.15 (the newest version at time of writing).
The strange thing is that I do see that the project has included this file, as it is shown in the file tree of External Dependencies, see screenshot.
file tree showing sam.h
I have also checked the include paths in the 'hello.vcxproj' file. I have cut out the list below:
<AdditionalIncludeDirectories>
$(ProjectDir)..\..\..\..\..\Program Files (x86)\Arduino\libraries
$(ProjectDir)..\..\..\AppData\Local\arduino15\packages\arduino\hardware\samd\1.6.10\libraries
$(ProjectDir)..\libraries
$(ProjectDir)..\..\..\AppData\Local\arduino15\packages\arduino\hardware\samd\1.6.10\cores\arduino
$(ProjectDir)..\..\..\AppData\Local\arduino15\packages\arduino\hardware\samd\1.6.10\cores\arduino\avr
$(ProjectDir)..\..\..\AppData\Local\arduino15\packages\arduino\hardware\samd\1.6.10\cores\arduino\USB
$(ProjectDir)..\..\..\AppData\Local\arduino15\packages\arduino\hardware\samd\1.6.10\variants\arduino_mzero
$(ProjectDir)..\hello
$(ProjectDir)..\..\..\AppData\Local\arduino15\packages\arduino\tools\CMSIS\4.5.0\CMSIS\Include\
$(ProjectDir)..\..\..\AppData\Local\arduino15\packages\arduino\tools\CMSIS-Atmel\1.0.0\CMSIS\Device\ATMEL\
$(ProjectDir)..\..\..\AppData\Local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1\arm-none-eabi\include\c++\4.8.3
$(ProjectDir)..\..\..\AppData\Local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1\arm-none-eabi\include\c++\4.8.3\arm-none-eabi
$(ProjectDir)..\..\..\AppData\Local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1\arm-none-eabi\include\c++\4.8.3\bits
$(ProjectDir)..\..\..\AppData\Local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1\arm-none-eabi\include
$(ProjectDir)..\..\..\AppData\Local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1\arm-none-eabi\include\sys
$(ProjectDir)..\..\..\AppData\Local\arduino15\packages\arduino\hardware\samd\1.6.10\system
$(ProjectDir)..\..\..\AppData\Local\arduino15\packages\arduino\hardware\samd\avr
$(ProjectDir)..\..\..\AppData\Local\arduino15\packages\arduino\hardware\samd\usb
$(ProjectDir)..\..\..\AppData\Local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1\lib\gcc\arm-none-eabi\4.8.3\include
$(ProjectDir)..\..\..\AppData\Local\arduino15\packages\arduino\tools\CMSIS\4.5.0
$(ProjectDir)..\..\..\AppData\Local\arduino15\packages\arduino\tools\CMSIS\4.5.0\Device\ATMEL\samd21\include
$(ProjectDir)..\..\..\AppData\Local\arduino15\packages\arduino\tools\CMSIS\4.5.0\CMSIS\include
$(ProjectDir)..\..\..\AppData\Local\arduino15\packages\arduino\tools\CMSIS\4.5.0\Device\ATMEL\samd21\include\component
$(ProjectDir)..\..\..\AppData\Local\arduino15\packages\arduino\tools\CMSIS\4.5.0\Device\ATMEL\samd21\include\instance
$(ProjectDir)..\..\..\AppData\Local\arduino15\packages\arduino\tools\CMSIS\4.5.0\Device\ATMEL\samd21\include\pio
$(ProjectDir)..\..\..\AppData\Local\arduino15\packages\arduino\tools\CMSIS\4.5.0\Device\ATMEL\samd21\include\component
$(ProjectDir)..\..\..\AppData\Local\arduino15\packages\arduino\tools\CMSIS-Atmel\1.0.0\CMSIS\Device\ATMEL\samd21\include
$(ProjectDir)..\..\..\AppData\Local\arduino15\packages\arduino\tools\CMSIS\CMSIS\include
$(ProjectDir)..\..\..\AppData\Local\arduino15\packages\arduino\tools\CMSIS\CMSIS-Atmel\1.0.0\CMSIS\Device\ATMEL\samd21\include\component
$(ProjectDir)..\..\..\AppData\Local\arduino15\packages\arduino\tools\CMSIS\CMSIS-Atmel\1.0.0\CMSIS\Device\ATMEL\samd21\include\instance
$(ProjectDir)..\..\..\AppData\Local\arduino15\packages\arduino\tools\CMSIS\CMSIS-Atmel\1.0.0\CMSIS\Device\ATMEL\samd21\include\pio
$(ProjectDir)..\..\..\AppData\Local\arduino15\packages\arduino\tools\CMSIS\CMSIS-Atmel\1.0.0\CMSIS\Device\ATMEL\samd21\include\component
%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
Even when I just open a completely new project in the Arduino IDE and try to compile it for Arduino M0, I get the exact same error!
I am stuck at this point. I've tried, as suggested at some other websites, de-installing SAM, de-installing SAMD, changing versions of either, but no luck.
In my case the specific solution was to delete the C:\Users[username]\AppData\Local\Arduino15 folder and reinstall the board packages I needed through the Arduino IDE Boards Manager.
Note this will not impact any libraries or other changes you have made in the IDE.

Network setup and class "Veins::ObstacleControl" not found

I will be grateful if you help me to figure out my problems with veins:
I successfully installed veins 4a2 and sumo 0.21.0 and Omnet 4.4 , the simulation example works fine.
Next, I imported Crypto++ 5.6.3 in the workspace as a new project under C/C++ → Existing Code as Makefile Project. Then I linked it to veins as follow:
in Project References I selected the Crypto++
in Makemake options, I select Link → and write Crypto++
I include in my code #include< rsa.h> etc… , it is recognized and there is no syntax errors, but when I run the simulation (omnet.ini), opp_run.exe crash.
The system is Windows 10 and the error is :
<!> Error in module (cCompoundModule) RSUExampleScenario (id=1) during network setup: Class "Veins::ObstacleControl" not found -- perhaps its code was not linked in, or the class wasn't registered with Register_Class(), or in the case of modules and channels, with Define_Module()/Define_Channel().
TRAPPING on the exception above, due to a debug-on-errors=true configuration option. Is your debugger ready?
Simulation terminated with exit code: -2147483645
Working directory: C:/Simulateur/veins-4a2/veins-veins-4a2/examples/veins
Command line: c:/Simulateur/omnetpp-4.4-src-windows/omnetpp-4.4/bin/opp_run.exe -r 0 -n .;../../src/veins --tkenv-image-path=../../images omnetpp.ini
Environment variables:
OMNETPP_ROOT=c:/Simulateur/omnetpp-4.4-src-windows/omnetpp-4.4
PATH=;c:\Simulateur\omnetpp-4.4-src-windows\omnetpp-4.4\bin;c:\Simulateur\omnetpp-4.4-src-windows\omnetpp-4.4\msys\bin;c:\Simulateur\omnetpp-4.4-src-windows\omnetpp-4.4\mingw\bin;c:/Simulateur/omnetpp-4.4-src-windows/omnetpp-4.4/ide/jre/bin/client;c:/Simulateur/omnetpp-4.4-src-windows/omnetpp-4.4/ide/jre/bin;c:/Simulateur/omnetpp-4.4-src-windows/omnetpp-4.4/ide/jre/lib/i386;.;C:\Simulateur\omnetpp-4.4-src-windows\omnetpp-4.4\msys\local\bin;c:\Simulateur\omnetpp-4.4-src-windows\omnetpp-4.4\mingw\bin;C:\Simulateur\omnetpp-4.4-src-windows\omnetpp-4.4\msys\bin;c:\Simulateur\omnetpp-4.4-src-windows\omnetpp-4.4\bin;c:\Windows\system32;c:\Windows;c:\Windows\System32\Wbem;c:\Windows\System32\WindowsPowerShell\v1.0\;c:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;c:\Program Files (x86)\AMD\ATI.ACE\Core-Static;c:\Windows\system32\config\systemprofile\.dnx\bin;c:\Program Files\Microsoft DNX\Dnvm\;c:\Program Files\Microsoft SQL Server\120\Tools\Binn\;c:\Program Files (x86)\Skype\Phone\;c:\Simulateur\omnetpp-4.4-src-windows\omnetpp-4.4;
OMNETPP_IMAGE_PATH=c:\Simulateur\omnetpp-4.4-src-windows\omnetpp-4.4\images
Question: How to link another C++ library, like Crypto++, to my veins project?
Veins generates a dynamic library of its simulation modules. When using opp_run you will need to tell it to load this library. Otherwise the simulation will not be able to instantiate any of Veins’ modules.
Try doing the Veins tutorial to see what command line parameters OMNeT++ uses to launch the simulation.

Printer installation fails with "Unable to install printer - Some driver files are missing or incorrect"

Attempting to install my custom printer driver that I'm working on (a Unidrv minidriver-based one) fails with this error (Windows 8.1 Pro x64):
The LetterMaster.gpd file can be found here: https://github.com/TazeTSchnitzel/LetterMaster-Unidrv/blob/f9bcd4756bd095629d6a49115af17ce3bb16169c/LetterMaster.gpd (though I doubt it is the problem)
The INF file is known to be fine.
By "install" I mean going to Add printer -> blah -> Have Disk -> choosing the INF file -> clicking Next -> filling in the name of the printer -> Next. It'll then show UAC prompt, seem to go alright for a bit, but then the error above shows up.
EDIT: After using gpdcheck I was able to fix some syntactic errors in the LetterMaster.gpd file which I didn't know existed. Now I have a new error:
The LetterMaster.gpd content is now this: https://github.com/TazeTSchnitzel/LetterMaster-Unidrv/blob/10c4eed1c0b1592dbdd00466bc7a31a259223dbe/LetterMaster.gpd

LNK1000: Internal error during IMAGE::BuildImage

I have a problem with linking in VC++ 2010. When I compile in the debug mode it's ok, but in the release mode I regular receive the error "LNK1000: Internal error during IMAGE::BuildImage".
What am I doing wrong?
It began work as soon as I have changed "Whole program optimization" option from "Use Link Time Code Generation" to "Profile Guided Optimization-Instrument".
I encountered the same error. The problem in my case was that I was "playing" with the configuration properties (Project Properties -> Configuration Properties -> General)
The 'Configuration Type' of the project was 'Dynamic Library (.dll)', but the 'Target Extension' was .lib instead of .dll.
April 2020 update
Issue with MSBuild and Docker for Windows was fixed in MSBuild 16.5 (source), so if still seeing that - just update MSVS/MSBuild to the latest version
Original answer
Check for working C compiler: C:/BuildTools/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe -- broken
CMake Error at C:/Program Files/CMake/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 (message):
The C compiler
"C:/BuildTools/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe"
is not able to compile a simple test program.
......
LINK : fatal error LNK1000: Internal error during IMAGE::BuildImage.FinalPhase
I was getting this error when I was running cmake in Docker for Windows inside mounted Docker volume. Solution is to copy the workspace to local Docker filesystem.
In vs2019 it works for me:
Project->Property pages->Optimization->Link Time Code Generation, change from "Use Link Time Code Generation" to "Profile Guided Optimization-Instrument"

Resources