Chat freely about anything...

User avatar
By ranhaber
#9184
fenyvesi wrote:Temporarily I found a solution: modified the standard Makefile in 2 points:

1. Added the extra mqtt include directory:
MODULES = driver mqtt user --line 135
2. Added the extra libs

LIBS = c gcc hal phy pp net80211 lwip wpa upgrade main ssl -line 139


Thanks,
I did that and it works, but my question is sill there, what is wrong with the giving makefile?
User avatar
By Hack
#9291 Hello,
I feel like I'm missing something. In fact, I think I'm missing many somethings. I've asked for help with this before, and I thought I had it figured out. I was wrong.

A few weeks ago I followed a guide (mentioned below) to build the Windows based Eclipse environment. I cloned the git repository for the ESP_MQTT code, I imported the project without issue, and I was able to compile and flash the code as-is (I didn't use the flash build target). I even edited the config and had it connect to my MQTT Broker. I recently wiped my system and re-installed windows. It seems that was a bad idea. I'm not able to get back to this most basic of states.

As it stands right now I'm using this page to build the Eclipse based Windows dev environment: viewtopic.php?f=9&t=820

I've cloned the same repository, but there are no longer any included .project or .cproject files, which means I'm not able to import the code as a project. If, in Eclipse, I create a new Makefile project with Existing Code, I can select the build chain, etc, it creates the new project file, and I'm able to add my own build targets. If I try to build an 'all' or 'clean' target I get errors indicating it can't find mingw32-make.exe. Which is odd, I was getting some weird eclipse java error earlier...

If I copy the .project and .cproject files from the initial commit of esp_mqtt I get clean, flash, and all build targets. However, if I try to run 'all' I get the same errors mentioned in the few comments right before this:

FW firmware/0x00000.bin
C:/Users/Daniel/Desktop/AGC/ESP8266/gitclones/esp_mqtt/Makefile:120: recipe for target 'firmware/0x00000.bin' failed
process_begin: CreateProcess(NULL, c:/Espressif/xtensa-lx106-elf/bin/esptool -eo build/app.out -bo firmware/0x00000.bin -bs .text -bs .data -bs .rodata -bc -ec, ...) failed.
make (e=2): The system cannot find the file specified.

I don't understand the error: line 120 appears to just be echoing some text? I don't really 'get' makefiles and make so maybe I'm wrong.

The previous comments about this issue said the fix was to do the following:

1. Added the extra mqtt include directory:
MODULES = driver mqtt user --line 135
2. Added the extra libs
LIBS = c gcc hal phy pp net80211 lwip wpa upgrade main ssl -line 139

I don't understand why - my makefile already has both of these lines in them, just at different locations, and the lines referenced are actually blank.

After making these changes I still get the same errors.

Also, what exactly is the system trying to do? I thought esptool was designed to flash the firmware, not help compile it? But I see this exact few lines on every Makefile I've tried to use (from previous commits of esp_mqtt)..once of which worked for me (although I don't know exactly which one).

These makefiles/build environment seems to be working for other people, and I've stared at this for way too many hours spread across way too many days. I want to go curl up into a little ball.

At this point I don't know if this is a problem with Eclipse (although it can compile any of the other samples I've tried without issue), the way I'm importing the esp_mqtt code, the way I'm using old .cproject and .project files, or something else.

Can someone please take pity on me and post a zip of their mqtt project folder that works in Eclipse? Or can someone please explain what I'm doing wrong, if you have any idea?

*sigh*

-Daniel