Anyone interested in Arduino Environment?

User avatar
rudi ;-)
Posts: 1564
Joined: Fri Nov 13, 2015 3:25 pm

Re: Anyone interested in Arduino Environment?

Postby rudi ;-) » Sun Jan 24, 2016 11:50 pm

me-no-dev wrote:no luck with mingw here as well :) have you tried the toolchains I posted on the front post? they are compiled by espressif's instructions.
1 1/2 weeks now for mingw toolchain waste.. :mrgreen:
hey we are family :D
so be warned:
have a try with cygwin and crosstool-NG now,
but there are few bugs in the crosstool-NG! :evil:
why we work with unpatched crosstool-NG ?
i don't know :mrgreen:

the patch is from 2012!
https://sourceware.org/ml/crossgcc/2012 ... 00012.html


Before you begin, it is imperative to set your file system to be case sensitive in Windows. Both the kernel headers and C library use file names with the same case insensitive name but different case sensitive name. Open regedit.exe and set the following to 0.

Code: Select all

HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel\obcaseinsensitive
Then reboot.


to do's

..crosstool-NG/kconfig/nconf.c

Code: Select all

..
	notimeout(stdscr, FALSE);
	// bug 
	// ESCDELAY = 1;
	// changed to 
	set_escdelay(1);
..
..crosstool-NG/kconfig/Makefile
changed are marked with
# bug
# rudi 2016-jan-24

Code: Select all


#-----------------------------------------------------------
# Hmmm! Cheesy build!
# Or: where I can unveil my make-fu... :-]

all: conf mconf nconf
	@true   # Just be silent, you fscking son of a fscking beach...

# Build flags
CFLAGS = -DCONFIG_=\"CT_\" -DPACKAGE="\"crosstool-NG $(VERSION)\""
LDFLAGS =

# Compiler flags to use gettext
ifeq ($(gettext),)
INTL_CFLAGS = -DKBUILD_NO_NLS
endif

# Compiler and linker flags to use ncurses
NCURSES_CFLAGS = -DCURSES_LOC="\"$(curses_hdr)\""
NCURSES_LDFLAGS = $(LIBS)

# Common source files
COMMON_SRC = zconf.tab.c
COMMON_OBJ = $(patsubst %.c,%.o,$(COMMON_SRC))
COMMON_DEP = $(patsubst %.o,%.dep,$(COMMON_OBJ))
$(COMMON_OBJ) $(COMMON_DEP): CFLAGS += $(INTL_CFLAGS) -I.

# lxdialog source files
LX_SRC = $(sort $(wildcard lxdialog/*.c))
LX_OBJ = $(patsubst %.c,%.o,$(LX_SRC))
LX_DEP = $(patsubst %.o,%.dep,$(LX_OBJ))
$(LX_OBJ) $(LX_DEP): CFLAGS += $(NCURSES_CFLAGS) $(INTL_CFLAGS)

# What's needed to build 'conf'
conf_SRC = conf.c
conf_OBJ = $(patsubst %.c,%.o,$(conf_SRC))
conf_DEP = $(patsubst %.o,%.dep,$(conf_OBJ))
$(conf_OBJ) $(conf_DEP): CFLAGS += $(INTL_CFLAGS)
# bug
# rudi 2016-jan-24
conf: LDFLAGS += -lintl

# What's needed to build 'mconf'
mconf_SRC = mconf.c
mconf_OBJ = $(patsubst %.c,%.o,$(mconf_SRC))
mconf_DEP = $(patsubst %.c,%.dep,$(mconf_SRC))
$(mconf_OBJ) $(mconf_DEP): CFLAGS += $(NCURSES_CFLAGS) $(INTL_CFLAGS)
# bug
# rudi 2016-jan-24
# mconf: LDFLAGS += $(NCURSES_LDFLAGS)
mconf: LDFLAGS += -lintl $(NCURSES_LDFLAGS)


# What's needed to build 'nconf'
nconf_SRC = nconf.c nconf.gui.c
nconf_OBJ = $(patsubst %.c,%.o,$(nconf_SRC))
nconf_DEP = $(patsubst %.c,%.dep,$(nconf_SRC))
# bug
# rudi 2016-jan-24
# $(nconf_OBJ) $(nconf_DEP): CFLAGS += $(INTL_CFLAGS) -I/usr/include/ncurses
# nconf: LDFLAGS += -lmenu -lpanel -lncurses
$(nconf_OBJ) $(nconf_DEP): CFLAGS += -I/usr/include/ncurses/ $(INTL_CFLAGS)
nconf: LDFLAGS += -lintl -lmenu -lpanel -lncurses

# Under Cygwin, we need to auto-import some libs (which ones, exactly?)
# for mconf and nconf to lin properly.
ifeq ($(shell uname -o 2>/dev/null || echo unknown),Cygwin)
mconf: LDFLAGS += -Wl,--enable-auto-import
nconf: LDFLAGS += -Wl,--enable-auto-import
endif

# These are generated files:
ALL_OBJS = $(sort $(COMMON_OBJ) $(LX_OBJ) $(conf_OBJ) $(mconf_OBJ) $(nconf_OBJ))
ALL_DEPS = $(sort $(COMMON_DEP) $(LX_DEP) $(conf_DEP) $(mconf_DEP) $(nconf_DEP))

# Cheesy auto-dependencies
DEPS = $(COMMON_DEP)
DEPS += $(conf_DEP)
DEPS += $(mconf_DEP) $(LX_DEP)
DEPS += $(nconf_DEP)
-include $(DEPS)

# Build the dependency for C files
%.dep: %.c
	@echo "  DEP    '$@'"
	@$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -MM $< |$(sed) -r -e 's|([^:]+.o)( *:+)|$(<:.c=.o) $@\2|;' >$@

# Generate the grammar parser
zconf.tab.o: zconf.tab.c zconf.hash.c lex.zconf.c
zconf.tab.dep: zconf.tab.c zconf.hash.c lex.zconf.c

.PRECIOUS: zconf.tab.c
zconf.tab.c: zconf.y
	@echo "  BISON  '$@'"
	@bison -l -b zconf -p zconf $<

zconf.hash.c: zconf.gperf
	@echo "  GPERF  '$@'"
	@$(gperf) < $< > $@

lex.zconf.c: zconf.l
	@echo "  LEX    '$@'"
	@flex -L -Pzconf -o$@ $<

# Build C files
%.o: %.c
	@echo "  CC     '$@'"
	@$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -o $@ -c $<

# Actual link
mconf: $(COMMON_OBJ) $(LX_OBJ) $(mconf_OBJ)
	@echo "  LD     '$@'"
	@$(CC) -o $@ $^ $(LDFLAGS) $(EXTRA_LDFLAGS)

nconf: $(COMMON_OBJ) $(nconf_OBJ)
	@echo "  LD     '$@'"
	@$(CC) -o $@ $^ $(LDFLAGS) $(EXTRA_LDFLAGS)

conf: $(COMMON_OBJ) $(conf_OBJ)
	@echo "  LD     '$@'"
	@$(CC) -o $@ $^ $(LDFLAGS) $(EXTRA_LDFLAGS)

#-----------------------------------------------------------
# Cleaning up the mess...

clean:
	@echo "  RM     'kconfig'"
	@rm -f conf mconf nconf $(ALL_OBJS) $(ALL_DEPS)
	@rm -f rm -f zconf.tab.c zconf.hash.c lex.zconf.c lex.backup



and if you build mingw toolchain under cygwin
be sure you:



Using crosstool-NG on Windows |
------------------------------+

Contributed by: Ray Donnelly

Prerequisites and instructions for using crosstool-NG for building a cross
toolchain on Windows (Cygwin) as build and, optionally Windows (hereafter)
MinGW-w64 as host.

0. Use Cygwin64 if you can. DLL base-address problems are lessened that
way and if you bought a 64-bit CPU, you may as well use it.

1. You must enable Case Sensitivity in the Windows Kernel (this is only really
necessary for Linux targets, but at present, crosstool-ng refuses to operate
on case insensitive filesystems). The registry key for this is:
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel\obcaseinsensitive
Read more at:
https://cygwin.com/cygwin-ug-net/using- ... names.html

2. Using setup{,-x86_64}.exe, install the default packages and also the
following ones: (tested versions in brackets, please test newer versions
and report successes via pull requests changing this list and failures to:
https://github.com/crosstool-ng/crosstool-ng/issues
autoconf (13-1), make (4.1-1), gcc-g++ (4.9.3-1), gperf (3.0.4-2),
bison (3.0.4-1), flex (2.5.39-1), texinfo (6.0-1), wget (1.16.3-1),
patch (2.7.4-1), libtool (2.4.6-2), automake (9-1), diffutils (3.3-3),
libncurses-devel (6.0-1.20151017), help2man (1.44.1-1)
mingw64-i686-gcc-g++* (4.9.2-2), mingw64-x86_64-gcc-g++* (4.9.2-2)
Leave "Select required packages (RECOMMENDED)" ticked.
Notes:
2.1 The packages marked with * are only needed if your host is MinGW-w64.
2.2 Unfortunately, wget pulls in an awful lot of dependencies, including
Python 2.7, Ruby, glib and Tcl.

3. Although nativestrict symlinks seem like the best idea, extracting glibc fails
when they are enabled, so just don't set anything here. If your host is MinGW-w64
then these 'Cygwin-special' symlinks won't work, but you can dereference them by
using tar options --dereference and --hard-dereference when making a final tarball.
I plan to investigate and fix or at least work around the extraction problem.
Read more at:
https://cygwin.com/cygwin-ug-net/using-cygwinenv.html

4. collect2.exe will attempt to run ld which is a shell script that runs either
ld.exe or gold.exe so you need to make sure that a working shell is in your path.
Eventually I will replace this with a native program for MinGW-w64 host.



@chin.
http://blog.techlab-xe.net/archives/3274

i stopped the try to make the toolchain directly in MinGW
because, we need posix for do this, and only cygwin have this
so if we work at windows(64) then use cygwin64

now i hope we will have at end the comming week, all possible toolchains what is possible.
i start again, this time with cygwin64, under win7(64) and with --host=mingw32
hope we hang not again with ncurses.h and curses.h like in cygwin32.
we have installed 100x the header, devels and more, configure do not find the ncurses.h curses.h
in installed /usr/include/ncurses

hope we can go on now.

best wishes
rudi ;-)
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

User avatar
rudi ;-)
Posts: 1564
Joined: Fri Nov 13, 2015 3:25 pm

Re: Anyone interested in Arduino Environment?

Postby rudi ;-) » Mon Jan 25, 2016 2:56 am

Code: Select all


$ ./bootstrap && ./configure --host=mingw64 --prefix=`pwd` && make && make install
Running autoconf...
Done. You may now run:
    ./configure
checking build system type... i686-pc-cygwin
.. sheethappens..
checking host system type... x86_64-pc-mingw64         <<--- this is the cygwin-mingw :(
..sheethappens..
checking for a BSD-compatible install... /usr/bin/install -c
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking whether sed understands -r -i -e... yes
checking whether ln -s works... yes
checking for mingw64-gcc... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for mingw64-ranlib... no
checking for ranlib... ranlib
checking for mingw64-gobjcopy... no
checking for mingw64-objcopy... no
checking for gobjcopy... no
checking for objcopy... objcopy
checking for absolute path to objcopy... /usr/bin/objcopy
checking for mingw64-gobjdump... no
checking for mingw64-objdump... no
checking for gobjdump... no
checking for objdump... objdump
checking for absolute path to objdump... /usr/bin/objdump
checking for mingw64-greadelf... no
checking for mingw64-readelf... no
checking for greadelf... no
checking for readelf... readelf
checking for absolute path to readelf... /usr/bin/readelf
checking for mingw64-gperf... no
checking for gperf... gperf
checking for absolute path to gperf... /usr/bin/gperf
checking for bison... bison
checking for flex... flex
checking for makeinfo... makeinfo
checking for cut... cut
checking for stat... stat
checking for readlink... readlink
checking for wget... wget
checking for tar... tar
checking for gzip... gzip
checking for bzip2... bzip2
checking for patch... /usr/bin/patch
checking for bash >= 3.1... /usr/bin/bash
checking for GNU awk... /usr/bin/gawk
checking for GNU make >= 3.80... /usr/bin/make
checking whether /usr/bin/make sets $(MAKE)... yes
checking for make 3.81... no
checking for GNU libtool >= 1.5.26... /usr/bin/libtool
checking for GNU libtoolize >= 1.5.26... /usr/bin/libtoolize
checking for GNU automake >= 1.10... /usr/bin/automake
checking for xz... xz
checking for cvs... no
checking for svn... no
checking for inline... inline
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking for size_t... yes
checking for working alloca.h... yes
checking for alloca... yes
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
checking whether gettext is declared... yes
checking ncurses/ncurses.h usability... yes
checking ncurses/ncurses.h presence... yes
checking for ncurses/ncurses.h... yes
checking for library containing initscr... -lncursesw
configure: creating ./config.status
config.status: creating Makefile
  SED    'ct-ng'
  SED    'scripts/crosstool-NG.sh'
  SED    'scripts/saveSample.sh'
  SED    'scripts/showTuple.sh'
  GEN    'config/configure.in'
  GEN    'paths.mk'
  GEN    'paths.sh'
  DEP    'nconf.gui.dep'
  DEP    'nconf.dep'
  DEP    'lxdialog/yesno.dep'
  DEP    'lxdialog/util.dep'
  DEP    'lxdialog/textbox.dep'
  DEP    'lxdialog/menubox.dep'
  DEP    'lxdialog/inputbox.dep'
  DEP    'lxdialog/checklist.dep'
  DEP    'mconf.dep'
  DEP    'conf.dep'
  BISON  'zconf.tab.c'
  GPERF  'zconf.hash.c'
  LEX    'lex.zconf.c'
  DEP    'zconf.tab.dep'
  CC     'zconf.tab.o'
  CC     'conf.o'
  LD     'conf'
  CC     'lxdialog/checklist.o'
  CC     'lxdialog/inputbox.o'
  CC     'lxdialog/menubox.o'
  CC     'lxdialog/textbox.o'
  CC     'lxdialog/util.o'
  CC     'lxdialog/yesno.o'
  CC     'mconf.o'
  LD     'mconf'
  CC     'nconf.o'
  CC     'nconf.gui.o'
  LD     'nconf'
  SED    'docs/ct-ng.1'
  GZIP   'docs/ct-ng.1.gz'
  GEN    'config/configure.in'
  GEN    'paths.mk'
  GEN    'paths.sh'
  MKDIR   '/opt/Espressif/crosstool-NG/bin/'
  INST    'ct-ng'
  MKDIR   '/opt/Espressif/crosstool-NG/lib/ct-ng.1.21.0/'
  INSTDIR 'config/'
  INSTDIR 'contrib/'
  INSTDIR 'patches/'
  INSTDIR 'scripts/'
  INST    'steps.mk'
  INST    'paths'
  INSTDIR 'samples/'
  INST    'kconfig/'
  MKDIR   '/opt/Espressif/crosstool-NG/share/doc/crosstool-ng/ct-ng.1.21.0/'
  INST    'docs/*.txt'
  MKDIR   '/opt/Espressif/crosstool-NG/share/man/man1/'
  INST    'ct-ng.1.gz'

For auto-completion, do not forget to install 'ct-ng.comp' into
your bash completion directory (usually /etc/bash_completion.d)


Code: Select all


$ ./ct-ng build
[INFO ]  Performing some trivial sanity checks
[INFO ]  Build started 20160125.013229
[INFO ]  Building environment variables
[INFO ]  =================================================================
[INFO ]  Retrieving needed toolchain components' tarballs
[INFO ]  Retrieving needed toolchain components' tarballs: done in 732.82s (at        12:35)
[INFO ]  =================================================================
[INFO ]  Extracting and patching toolchain components
[INFO ]  Extracting and patching toolchain components: done in 177.13s (at 15:       32)
[INFO ]  =================================================================
[INFO ]  Installing GMP for host
[INFO ]  Installing GMP for host: done in 362.23s (at 21:35)
[INFO ]  =================================================================
[INFO ]  Installing MPFR for host
[INFO ]  Installing MPFR for host: done in 164.58s (at 24:20)
[INFO ]  =================================================================
[INFO ]  Installing ISL for host
[INFO ]  Installing ISL for host: done in 197.32s (at 27:37)
[INFO ]  =================================================================
[INFO ]  Installing MPC for host
[INFO ]  Installing MPC for host: done in 72.97s (at 28:50)
[INFO ]  =================================================================
[INFO ]  Installing binutils for host
[INFO ]  Installing binutils for host: done in 596.59s (at 38:47)
[INFO ]  =================================================================
[INFO ]  Installing C library headers & start files
[INFO ]  Installing C library headers & start files: done in 0.63s (at 38:48)
[INFO ]  =================================================================
[INFO ]  Installing pass-2 core C compiler
[INFO ]  Installing pass-2 core C compiler: done in 1514.97s (at 64:03)
[INFO ]  =================================================================
[INFO ]  Installing C library
[INFO ]  Installing C library: done in 352.25s (at 69:55)
[INFO ]  =================================================================
[INFO ]  Installing final compiler
[INFO ]  Installing final compiler: done in 1984.68s (at 103:00)
[INFO ]  =================================================================
[INFO ]  Installing cross-gdb
[INFO ]  Installing cross-gdb: done in 913.14s (at 118:13)
[INFO ]  =================================================================
[INFO ]  Cleaning-up the toolchain's directory
[INFO ]    Stripping all toolchain executables
[INFO ]  Cleaning-up the toolchain's directory: done in 23.54s (at 118:37)
[INFO ]  Build completed at 20160125.033103
[INFO ]  (elapsed: 118:33.88)
[INFO ]  Finishing installation (may take a few seconds)...
[118:37] /



Yes this is the way i like ;-)
but have one mistak in it.
so here my hint:

be sure you have the toolchain installed, what you later will be used.
example,

i want a windows mingw toolchain that is created in windows cygwin in this way.
so you will use it for mingw( windows ) ,
then you must be sure, you use as host the windows mingw src.
you see this in the moment after the config is run for the makefile.
./bootstrap && ./configure --host=mingw64 --prefix=`pwd` && make && make install

with my thinking i was "right" --host=mingw64
but a mingw64 was installed in cygwin and a mingw64 was installed in windows.
the crosstool-NG was used .... sheethappens... the mingw64 from cygwin because it was in system path
so the info for "crosscompile" is ?...

-> checking whether we are cross compiling... no

so the thing is later, we need cygwin later installed for the "not_crosscompiler"
this is bad...
and cygwin esp108 toolchain we have already, ladyada, baoshi, me-no-dev
but we want the windows mingw esp108

example:

Code: Select all


..

$ ./bootstrap && ./configure --host=mingw64 --prefix=`pwd` && make && make install
Running autoconf...
Done. You may now run:
    ./configure
checking build system type... i686-pc-cygwin
checking host system type... x86_64-pc-mingw64
checking for a BSD-compatible install... /usr/bin/install -c
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking whether sed understands -r -i -e... yes
checking whether ln -s works... yes
checking for mingw64-gcc... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
..
checking whether we are cross compiling... no
..
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes


..

but what can we do?
there we can export before start the things, the right mingw folder, what crosstool-NG must used.
..will update.. asap( next few days ) here, must test before ;-) itself :mrgreen:
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

windalser
Posts: 15
Joined: Sat Nov 28, 2015 3:29 pm
Location: Ukraine

Re: Anyone interested in Arduino Environment?

Postby windalser » Mon Jan 25, 2016 10:05 am

About slow aploading.
I think there are something unlogical in uploading.
Size of eagle.app.v7.irom1text.bin is 11572 bytes but script uploads 306176 bytes.
Size of eagle.app.v7.irom0text.bin is 217985 bytes but script uloads 577536 bytes.
It takes a lot of time and ineffective uses resource of flash programming..

And maybe there is no need to flash bootloader every time..

User avatar
ESP_Me-no-dev
Posts: 73
Joined: Mon Jan 04, 2016 6:30 pm

Re: Anyone interested in Arduino Environment?

Postby ESP_Me-no-dev » Tue Jan 26, 2016 1:37 am

will have a look. The symptoms lead me to believe that old binaries are not cleaned before the new ones are created. I had it happen on unix, maybe something like the previous one.

User avatar
rudi ;-)
Posts: 1564
Joined: Fri Nov 13, 2015 3:25 pm

Re: Anyone interested in Arduino Environment?

Postby rudi ;-) » Tue Jan 26, 2016 2:53 am

hi guys
cross compiles becomes an own thread: http://esp32.com/viewtopic.php?f=2&t=111
best wishes
rudi ;-)

@men-no-dev
if load an example, the include where not found
#include <SPI.h>
#include <SD.h>

the things are in hardware folder of esp but would not find.
try to move to things to sketch folder and
#include "SPI.h"
#include "SD.h"
helps, but in next header the files are
#inlcude <SPI.h>
and then the compiler do not find the header right again.
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

User avatar
ESP_Me-no-dev
Posts: 73
Joined: Mon Jan 04, 2016 6:30 pm

Re: Anyone interested in Arduino Environment?

Postby ESP_Me-no-dev » Fri Jan 29, 2016 9:58 am

compiles fine either way :) Not sure what's up on your end

User avatar
ESP_Me-no-dev
Posts: 73
Joined: Mon Jan 04, 2016 6:30 pm

Re: Anyone interested in Arduino Environment?

Postby ESP_Me-no-dev » Fri Jan 29, 2016 10:11 am

@windalser here is the "fix". It really did not delete the binaries from previous builds so they grew in size.
https://github.com/me-no-dev/ESP31B/com ... 2ab2c09841

User avatar
rudi ;-)
Posts: 1564
Joined: Fri Nov 13, 2015 3:25 pm

Re: Anyone interested in Arduino Environment?

Postby rudi ;-) » Sun Jan 31, 2016 12:13 am

me-no-dev wrote:compiles fine either way :) Not sure what's up on your end

Sketch

Code: Select all


#include <SPI.h>



void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}


compiler messages:

Code: Select all




Arduino: 1.6.7 (Windows 7), Board: "Beta ESP31B Module, 80 MHz, 40MHz, QIO, 115200, 2M (1M SPIFFS)"

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware "C:\Program Files (x86)\Arduino\hardware" -tools "C:\Program Files (x86)\Arduino\tools-builder" -tools "C:\Program Files (x86)\Arduino\hardware\tools\avr" -built-in-libraries "C:\Program Files (x86)\Arduino\libraries" -libraries "C:\Users\mysqlus\Documents\Arduino\libraries" -fqbn=Espressif:ESP31B:esp31b:CpuFrequency=80,FlashFreq=40,FlashMode=qio,UploadSpeed=115200,FlashSize=2M -ide-version=10607 -build-path "C:\Users\mysqlus\AppData\Local\Temp\build064ab24a81b5d25e71a36628f8c6ff74.tmp" -warnings=none -prefs=build.warn_data_percentage=75 -verbose "C:\Users\mysqlus\Desktop\ard\sketch_jan31a\sketch_jan31a.ino"
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware "C:\Program Files (x86)\Arduino\hardware" -tools "C:\Program Files (x86)\Arduino\tools-builder" -tools "C:\Program Files (x86)\Arduino\hardware\tools\avr" -built-in-libraries "C:\Program Files (x86)\Arduino\libraries" -libraries "C:\Users\mysqlus\Documents\Arduino\libraries" -fqbn=Espressif:ESP31B:esp31b:CpuFrequency=80,FlashFreq=40,FlashMode=qio,UploadSpeed=115200,FlashSize=2M -ide-version=10607 -build-path "C:\Users\mysqlus\AppData\Local\Temp\build064ab24a81b5d25e71a36628f8c6ff74.tmp" -warnings=none -prefs=build.warn_data_percentage=75 -verbose "C:\Users\mysqlus\Desktop\ard\sketch_jan31a\sketch_jan31a.ino"
"C:\Program Files (x86)\Arduino\hardware\Espressif\ESP31B/tools/xtensa-esp108-elf/bin/xtensa-esp108-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\Program Files (x86)\Arduino\hardware\Espressif\ESP31B/tools/sdk/include" "-IC:\Program Files (x86)\Arduino\hardware\Espressif\ESP31B/tools/sdk/include/ipv4" "-IC:\Program Files (x86)\Arduino\hardware\Espressif\ESP31B/tools/sdk/include/ipv6" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11  -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=80000000L -DARDUINO=10607 -DARDUINO_ESP31B_DEV -DARDUINO_ARCH_ESP31B  -DESP31B       "-IC:\Program Files (x86)\Arduino\hardware\Espressif\ESP31B\cores\esp31b" "-IC:\Program Files (x86)\Arduino\hardware\Espressif\ESP31B\variants\esp31b" "C:\Users\mysqlus\AppData\Local\Temp\build064ab24a81b5d25e71a36628f8c6ff74.tmp\sketch\sketch_jan31a.ino.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\Espressif\ESP31B/tools/xtensa-esp108-elf/bin/xtensa-esp108-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\Program Files (x86)\Arduino\hardware\Espressif\ESP31B/tools/sdk/include" "-IC:\Program Files (x86)\Arduino\hardware\Espressif\ESP31B/tools/sdk/include/ipv4" "-IC:\Program Files (x86)\Arduino\hardware\Espressif\ESP31B/tools/sdk/include/ipv6" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11  -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=80000000L -DARDUINO=10607 -DARDUINO_ESP31B_DEV -DARDUINO_ARCH_ESP31B  -DESP31B       "-IC:\Program Files (x86)\Arduino\hardware\Espressif\ESP31B\cores\esp31b" "-IC:\Program Files (x86)\Arduino\hardware\Espressif\ESP31B\variants\esp31b" "C:\Users\mysqlus\AppData\Local\Temp\build064ab24a81b5d25e71a36628f8c6ff74.tmp\sketch\sketch_jan31a.ino.cpp" -o "C:\Users\mysqlus\AppData\Local\Temp\build064ab24a81b5d25e71a36628f8c6ff74.tmp\preproc\ctags_target_for_gcc_minus_e.cpp"

C:\Users\mysqlus\Desktop\ard\sketch_jan31a\sketch_jan31a.ino:1:17: fatal error: SPI.h: No such file or directory
compilation terminated.
exit status 1

looks like arduino ide do not find the <SPI.h> and do not copy the SPI.h in the sketch folder ?

if i copy the SPI.h and SPI.c to the folder then the same error.

if i change then the sketch to:

Code: Select all


// #include <SPI.h>

// search in the same Folder for SPI.h
#include "SPI.h"


void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}


then its compile.
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

windalser
Posts: 15
Joined: Sat Nov 28, 2015 3:29 pm
Location: Ukraine

Re: Anyone interested in Arduino Environment?

Postby windalser » Mon Feb 01, 2016 12:43 pm

me-no-dev wrote:@windalser here is the "fix". It really did not delete the binaries from previous builds so they grew in size.
https://github.com/me-no-dev/ESP31B/com ... 2ab2c09841
Yes, it works much faster now, thanks!

davydnorris
Posts: 10
Joined: Thu Sep 15, 2016 8:11 am

Re: Anyone interested in Arduino Environment?

Postby davydnorris » Wed Sep 28, 2016 8:02 am

rudi ;-) wrote:

Code: Select all


$ ./bootstrap && ./configure --host=mingw64 --prefix=`pwd` && make && make install
Running autoconf...
Done. You may now run:
    ./configure
checking build system type... i686-pc-cygwin
.. sheethappens..
checking host system type... x86_64-pc-mingw64         <<--- this is the cygwin-mingw :(
..sheethappens..
checking for a BSD-compatible install... /usr/bin/install -c

...

$ ./ct-ng build
[INFO ]  Performing some trivial sanity checks
[INFO ]  Build started 20160125.013229
[INFO ]  Building environment variables
[INFO ]  =================================================================
[INFO ]  Retrieving needed toolchain components' tarballs
[INFO ]  Retrieving needed toolchain components' tarballs: done in 732.82s (at        12:35)
[INFO ]  =================================================================
[INFO ]  Extracting and patching toolchain components
[INFO ]  Extracting and patching toolchain components: done in 177.13s (at 15:       32)
[INFO ]  =================================================================
[INFO ]  Installing GMP for host
[INFO ]  Installing GMP for host: done in 362.23s (at 21:35)
[INFO ]  =================================================================
[INFO ]  Installing MPFR for host
[INFO ]  Installing MPFR for host: done in 164.58s (at 24:20)
[INFO ]  =================================================================
[INFO ]  Installing ISL for host
[INFO ]  Installing ISL for host: done in 197.32s (at 27:37)
[INFO ]  =================================================================
[INFO ]  Installing MPC for host
[INFO ]  Installing MPC for host: done in 72.97s (at 28:50)
[INFO ]  =================================================================
[INFO ]  Installing binutils for host
[INFO ]  Installing binutils for host: done in 596.59s (at 38:47)
[INFO ]  =================================================================
[INFO ]  Installing C library headers & start files
[INFO ]  Installing C library headers & start files: done in 0.63s (at 38:48)
[INFO ]  =================================================================
[INFO ]  Installing pass-2 core C compiler
[INFO ]  Installing pass-2 core C compiler: done in 1514.97s (at 64:03)
[INFO ]  =================================================================
[INFO ]  Installing C library
[INFO ]  Installing C library: done in 352.25s (at 69:55)
[INFO ]  =================================================================
[INFO ]  Installing final compiler
[INFO ]  Installing final compiler: done in 1984.68s (at 103:00)
[INFO ]  =================================================================
[INFO ]  Installing cross-gdb
[INFO ]  Installing cross-gdb: done in 913.14s (at 118:13)
[INFO ]  =================================================================
[INFO ]  Cleaning-up the toolchain's directory
[INFO ]    Stripping all toolchain executables
[INFO ]  Cleaning-up the toolchain's directory: done in 23.54s (at 118:37)
[INFO ]  Build completed at 20160125.033103
[INFO ]  (elapsed: 118:33.88)
[INFO ]  Finishing installation (may take a few seconds)...
[118:37] /



Yes this is the way i like ;-)
but have one mistake in it.
Hey rudi!

Great work on getting Cygwin64 to work!

I am currently trying to get my toolchain for esp8266 to compile under Cygwin64 and I figure they are almost exactly the same as ESP32 (my next project) so you might be able to help me. I am using latest versions of everything:

Cygwin64 2.6.0 including gcc 5.4 and all the latest required utilities, latest pull of pfalcon/esp-open-sdk, and when that didn't work latest pull of jcmvbkbc/crosstool-NG, and I even went to latest pull of crosstool-ng/crosstool-ng and added the overlays and patches. I get exactly the same errors in all three so if I solve it once I solve it everywhere!

First builds failed on final stage of gcc with a segfault, until I found that Cygwin doesn't like precompiled headers, then I added:
CT_CC_GCC_DISABLE_PCH=y
and got much further. I also had the non-fatal errors about xgcc: spawn but these went away when I changed from gcc 4.8.5 to gcc 5.2.0

Now I am almost there but I am getting errors in the TUI part of gdb, with undefined references in the final link. Has anyone seen this before, and do you have any ideas?

I have found others with the same problem, different platform, no solutions

MANY THANKS!!!

Code: Select all

[ALL  ]    x86_64-build_unknown-cygwin-gcc -g -O2   -static-libstdc++ -static-libgcc -Wl,--stack,12582912   	-o gdb.exe gdb.o xtensa-tdep.o xtensa-config.o solib-svr4.o ser-base.o ser-unix.o ser-pipe.o ser-tcp.o  remote.o dcache.o tracepoint.o ax-general.o ax-gdb.o remote-fileio.o remote-notif.o ctf.o tracefile.o tracefile-tfile.o  cli-dump.o cli-decode.o cli-script.o cli-cmds.o cli-setshow.o cli-logging.o cli-interp.o cli-utils.o mi-out.o mi-console.o mi-cmds.o mi-cmd-catch.o mi-cmd-env.o mi-cmd-var.o mi-cmd-break.o mi-cmd-stack.o mi-cmd-file.o mi-cmd-disas.o mi-symbol-cmds.o mi-cmd-target.o mi-cmd-info.o mi-interp.o mi-main.o mi-parse.o mi-getopt.o tui-command.o tui-data.o tui-disasm.o tui-file.o tui-hooks.o tui-interp.o tui-io.o tui-layout.o tui-out.o tui-regs.o tui-source.o tui-stack.o tui-win.o tui-windata.o tui-wingeneral.o tui-winsource.o tui.o python.o py-arch.o py-auto-load.o py-block.o py-bpevent.o py-breakpoint.o py-cmd.o py-continueevent.o py-xmethods.o py-event.o py-evtregistry.o py-evts.o py-exitedevent.o py-finishbreakpoint.o py-frame.o py-framefilter.o py-function.o py-gdb-readline.o py-inferior.o py-infevents.o py-infthread.o py-lazy-string.o py-linetable.o py-newobjfileevent.o py-objfile.o py-param.o py-prettyprint.o py-progspace.o py-signalevent.o py-stopevent.o py-symbol.o py-symtab.o py-threadevent.o py-type.o py-unwind.o py-utils.o py-value.o py-varobj.o guile.o elfread.o stap-probe.o dtrace-probe.o posix-hdep.o posix-strerror.o c-exp.o cp-name-parser.o ada-exp.o jv-exp.o d-exp.o f-exp.o go-exp.o m2-exp.o p-exp.o version.o annotate.o addrmap.o auto-load.o auxv.o agent.o bfd-target.o blockframe.o breakpoint.o break-catch-sig.o break-catch-throw.o break-catch-syscall.o findvar.o regcache.o cleanups.o charset.o continuations.o corelow.o disasm.o dummy-frame.o dfp.o source.o value.o eval.o valops.o valarith.o valprint.o printcmd.o block.o symtab.o psymtab.o symfile.o symfile-debug.o symmisc.o linespec.o dictionary.o infcall.o infcmd.o infrun.o expprint.o environ.o stack.o thread.o exceptions.o extension.o filesystem.o filestuff.o inf-child.o interps.o minidebug.o main.o macrotab.o macrocmd.o macroexp.o macroscope.o mi-common.o event-loop.o event-top.o inf-loop.o completer.o gdbarch.o arch-utils.o gdbtypes.o gdb_bfd.o gdb_obstack.o osabi.o copying.o memattr.o mem-break.o target.o target-dcache.o parse.o language.o build-id.o buildsym.o findcmd.o std-regs.o signals.o exec.o reverse.o bcache.o objfiles.o observer.o minsyms.o maint.o demangle.o dbxread.o coffread.o coff-pe-read.o dwarf2read.o mipsread.o stabsread.o corefile.o dwarf2expr.o dwarf2loc.o dwarf2-frame.o dwarf2-frame-tailcall.o ada-lang.o c-lang.o d-lang.o f-lang.o objc-lang.o ada-tasks.o ada-varobj.o c-varobj.o ui-out.o cli-out.o varobj.o vec.o go-lang.o go-valprint.o go-typeprint.o jv-lang.o jv-valprint.o jv-typeprint.o jv-varobj.o m2-lang.o opencl-lang.o p-lang.o p-typeprint.o p-valprint.o sentinel-frame.o complaints.o typeprint.o ada-typeprint.o c-typeprint.o f-typeprint.o m2-typeprint.o ada-valprint.o c-valprint.o cp-valprint.o d-valprint.o f-valprint.o m2-valprint.o serial.o mdebugread.o top.o utils.o ui-file.o user-regs.o frame.o frame-unwind.o doublest.o frame-base.o inline-frame.o gnu-v2-abi.o gnu-v3-abi.o cp-abi.o cp-support.o cp-namespace.o reggroups.o trad-frame.o tramp-frame.o solib.o solib-target.o prologue-value.o memory-map.o memrange.o xml-support.o xml-syscall.o xml-utils.o target-descriptions.o target-memory.o xml-tdesc.o xml-builtin.o inferior.o osdata.o gdb_usleep.o record.o record-full.o gcore.o gdb_vecs.o jit.o progspace.o skip.o probe.o common-utils.o buffer.o ptid.o gdb-dlfcn.o common-agent.o format.o registry.o btrace.o record-btrace.o waitstatus.o print-utils.o rsp-low.o errors.o common-debug.o debug.o common-exceptions.o btrace-common.o fileio.o compile.o compile-c-symbols.o compile-c-types.o compile-object-load.o compile-object-run.o compile-loc2c.o compile-c-support.o inflow.o    init.o 	   ../readline/libreadline.a ../opcodes/libopcodes.a ../bfd/libbfd.a -L./../zlib -lz  ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a    -lncurses -lm   -liconv  -ldl -lpython2.7 /home/dnorris/crosstool-NG/.build/xtensa-lx106-elf/buildtools/lib/libexpat.a -llzma   ../libiberty/libiberty.a -luser32 build-gnulib/import/libgnu.a 
[ALL  ]    tui-win.o:tui-win.c:(.rdata$.refptr.stdscr[.refptr.stdscr]+0x0): undefined reference to `stdscr'
[ALL  ]    tui-win.o:tui-win.c:(.rdata$.refptr.curscr[.refptr.curscr]+0x0): undefined reference to `curscr'
[ALL  ]    tui-win.o:tui-win.c:(.rdata$.refptr.acs_map[.refptr.acs_map]+0x0): undefined reference to `acs_map'
[ALL  ]    tui.o:tui.c:(.rdata$.refptr.COLS[.refptr.COLS]+0x0): undefined reference to `COLS'
[ALL  ]    tui.o:tui.c:(.rdata$.refptr.LINES[.refptr.LINES]+0x0): undefined reference to `LINES'
[ERROR]    collect2: error: ld returned 1 exit status
[ERROR]    make[3]: *** [Makefile:1391: gdb.exe] Error 1
[ALL  ]    make[3]: Leaving directory '/home/dnorris/crosstool-NG/.build/xtensa-lx106-elf/build/build-gdb-cross/gdb'
[ERROR]    make[2]: *** [Makefile:8759: all-gdb] Error 2
[ALL  ]    make[2]: Leaving directory '/home/dnorris/crosstool-NG/.build/xtensa-lx106-elf/build/build-gdb-cross'
[ERROR]    make[1]: *** [Makefile:849: all] Error 2
[ALL  ]    make[1]: Leaving directory '/home/dnorris/crosstool-NG/.build/xtensa-lx106-elf/build/build-gdb-cross'
[ERROR]  
[ERROR]  >>
[ERROR]  >>  Build failed in step 'Installing cross-gdb'
[ERROR]  >>        called in step '(top-level)'
[ERROR]  >>
[ERROR]  >>  Error happened in: CT_DoExecLog[scripts/functions@257]
[ERROR]  >>        called from: do_debug_gdb_build[scripts/build/debug/300-gdb.sh@120]
[ERROR]  >>        called from: do_debug[scripts/build/debug.sh@35]
[ERROR]  >>        called from: main[scripts/crosstool-NG.sh@646]
[ERROR]  >>
[ERROR]  >>  For more info on this error, look at the file: 'build.log'
[ERROR]  >>  There is a list of known issues, some with workarounds, in:
[ERROR]  >>      '/esp8266/share/doc/crosstool-ng/crosstool-ng-1.22.0-56-g7d844e7/B - Known issues.txt'
[ERROR]  
[ERROR]  (elapsed: 76:41.93)


Who is online

Users browsing this forum: Google [Bot] and 42 guests