Open mroavi opened 7 years ago
That looks interesting. One workaround that I see is the switch -fomit-frame-pointer, which frees a15. But the assembly only wants 14 registers, which we have even when the frame pointer is in use. Let me look at it some more.
I finally manged to compile it.
Adding the -O2
option to the CFLAGS did the trick:
# compiler flags using during compilation of source files
CFLAGS = -g -O2 \
-Wpointer-arith \
-Wundef \
-Wl,-EL \
-fno-inline-functions \
-nostdlib \
-mlongcalls \
-mtext-section-literals \
-ffunction-sections \
-fdata-sections \
-fno-builtin-printf\
-DICACHE_FLASH \
-DBUID_TIME=\"$(DATETIME)\" \
-std=gnu89
It also works with -g -O1
but not with -g -O0
.
I found a very interesting I2C master implementation written in assembly language for the ESP8266 (https://github.com/pasko-zh/brzo_i2c). However, as the author mentions, the library is written for the Arduino toolchain.
I made some slight changes in order to compile it with the newest SDK from espressif: ESP8266_NONOS_SDK_V2.0.0_16_07_19.
However, I haven't been able to get past this compiler error:
The CFLAG variable in my Makefile looks like this:
This is the inline assembler code that it points to:
I would really appreciate if you could help me understand what it is that is going wrong and what options there are to solve it. Thanks in advance.