So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By Curly_
#61985 I've installed esp-open-sdk using the following installation process:
Code: Select allgit clone https://github.com/pfalcon/esp-open-sdk.git
cd esp-open-sdk
git submodule init
git submodule update
#edit crosstool-config-overrides to build static toolchain
CPPFLAGS= CFLAGS= CXXFLAGS= LDFLAGS= LD_LIBRARY_PATH= make
patch examples/blinky/Makefile < ../blinky_Makefile.patch

blinky_Makefile.patch is:

Code: Select all--- Makefile.old   2017-02-01 22:03:52.089133574 +0000
+++ Makefile   2017-02-01 21:58:59.589922223 +0000
@@ -1,17 +1,17 @@
 CC = xtensa-lx106-elf-gcc
 CFLAGS = -I. -mlongcalls
-LDLIBS = -nostdlib -Wl,--start-group -lmain -lnet80211 -lwpa -llwip -lpp -lphy -Wl,--end-group -lgcc
+LDLIBS = -nostdlib -Wl,--start-group -lmain -lnet80211 -lwpa -llwip -lpp -lc -lphy -Wl,--end-group -lgcc
 LDFLAGS = -Teagle.app.v6.ld
 
-blinky-0x00000.bin: blinky
-   esptool.py elf2image $^
+blinky.bin: blinky
+   esptool elf2image --version=2 -o $@ $^
 
 blinky: blinky.o
 
 blinky.o: blinky.c
 
-flash: blinky-0x00000.bin
-   esptool.py write_flash 0 blinky-0x00000.bin 0x40000 blinky-0x40000.bin
+flash: blinky.bin
+   esptool write_flash 0 blinky.bin --verify
 
 clean:
-   rm -f blinky blinky.o blinky-0x00000.bin blinky-0x40000.bin
+   rm -f blinky blinky.o blinky.bin

However, anything that I compile with it results in the following error message being spammed until I reset the ESP:
Code: Select allFatal exception (28):
epc1=0x4000228b, epc2=0x00000000, epc3=0x00000000, excvaddr=0x000000b5, depc=0x00000000

After I reset the ESP, nothing useful is outputted.

I've tried to compile and flash both blinky, and the following file, but both result in the same error:
Code: Select allvoid user_init() {

}

Precompiled binaries flash to the ESP without any problems. I've tried flashing three ESPs, but haven't been able to get any of them to work.

Any ideas?

Edit: Found the problem. It was to do with
Code: Select allesptool elf2image --version=2 -o $@ $^
. Replacing this with
Code: Select allesptool elf2image $^
, and adjusting the rest of the makefile to work with the blinky-0xXXXXX.bin files solved the problem.