cyberman54 / ESP32-Paxcounter

Wifi & BLE driven passenger flow metering with cheap ESP32 boards
https://cyberman54.github.io/ESP32-Paxcounter/
Other
1.69k stars 397 forks source link

variable srcdir throws build issues - is that the same for other environment or just win10, vs code 1.63.2 with platformio core 5.2.4 and home 3.4.0? #835

Closed robeweber closed 2 years ago

robeweber commented 2 years ago

Discussed in https://github.com/cyberman54/ESP32-Paxcounter/discussions/834

Originally posted by **robeweber** December 20, 2021 Hi, if anybody has a problem with building this project in the stated environment, you can possibly benefit from my 16hour investigation into my problem: I have used this project in january 2021 with zero problems. But last week I tried to compile and load paxcounter to the TTGO T-Beam v1.0 with the latest git version. At first I was not able to compile due to an abort message when trying to access de hal configuration for the TTGO T-Beam named ttgobeam10.h The compiler said that it can not find the definition in $PROJECTSRC_DIR\hal\ttgobeam10.h I have searched long and wide and could not find a solution. Then it dawned on me that in build.py sits the declaration (line 23): srcdir = env.get("PROJECTSRC_DIR") When debugging, I found that this should be variable name PROJECT_SRC_DIR instead. So change line 23 to: srcdir = env.get("PROJECT_SRC_DIR") But that was not all my trouble. Then I received warnings about definitions of the display dependencies (deblibs). I realized an the end (last night) that esptool is not installed within VS Code and platformio. That took the longest to investigate. Solution is simple: in a terminal (within VS Code) execute the following command: pip install esptool And voila, the code compiles without errors and produces a bin file. Just in case anybody has the same mindblowing problem. Can save you hours of debugging. cyberman54: great code by-the-way. Thanks for writing it.
cyberman54 commented 2 years ago

Thanks for this. I will check it. Seems to match this report: https://community.platformio.org/t/src-dir-setting-using-pre-build-extra-script-with-latest-platformio-release/10633

cyberman54 commented 2 years ago

fixed. Thanks!