Discuss here different C compiler set ups, and compiling executables for the ESP8266

User avatar
By vic
#19805 Hi,

I'm starting a new project using the esp_iot_rtos_sdk, however I hit a roadblock right at the start, after compiling and uploading the sample application I can't receive properly the output of "printf" in the code. I tried all the standard baudrates from 1200 to 921600 (including 74880), 8,N,1, but all I get is gibberish. I get some characters at periodic intervals so the code itself on the chip seems to be working, although I can't be sure. I tried NodeMCU previously with the same setup and I could communicate without issue, so it must be a configuration problem (I'm switching to the esp sdk due to memory issues with lua). This is my first project for the ESP8266 so it's not clear yet for me how everything fits together, in particular why some firmware are in several pieces that must be uploaded at different offsets so maybe I've missed something here.

To give more details, I used to gen_misc.sh script which generated eagle.flash.bin and eagle.irom0text.bin that I flashed at 0x00000 and 0x40000 respectively. The script also asks other questions about the SPI flash chip, I just left everything as default, could the be a problem?

Thanks for your help.
User avatar
By cal
#19837 Moin,

just something I had:

My USB UART adapter pretended to support 74880 baud but instead used 9600 baud.

I managed to flash the USB adapter but it took me some time to realize and find that.

I you flash a standard firmware you should see a boot message similiar to
Code: Select all ets Jan  8 2013,rst cause:2, boot mode:(3,6)

load 0x40100000, len 29612, room 16
tail 12
chksum 0x45
ho 0 tail 12 room 4
load 0x3ffe8000, len 2916, room 12
tail 8
chksum 0x03
load 0x3ffe8b70, len 17240, room 0
tail 8
chksum 0x93
csum 0x93


If you get that you managed to use 74880 baud.
If your output looks like the same garbage you see when setting 9600 baud I guess not.

Good luck,
Carsten
User avatar
By vic
#19883 I found my issue : I was compiling using the esp-open-sdk in standalone mode (I believe it's the default), and I didn't realize that it overrode the ld library path and as a result didn't link with the .a files from esp_iot_rtos_sdk. After recompiling the toolchain in non-standalone mode, everything went fine connecting at 115200 bauds.
User avatar
By cal
#19895
vic wrote:I found my issue : I was compiling using the esp-open-sdk in standalone mode (I believe it's the default), and I didn't realize that it overrode the ld library path and as a result didn't link with the .a files from esp_iot_rtos_sdk. After recompiling the toolchain in non-standalone mode, everything went fine connecting at 115200 bauds.

Hmmm,

I didn't even know about "standalone mode" do you have more information and could tell what you did in each case?

Cal