These are chat archives for esp8266/Arduino

14th
Apr 2016
Ivan Grokhotkov
@igrr
Apr 14 2016 08:52
Running Arduino on a Raspberry Pi, took 5 minutes to compile WiFiClient sketch...
I wonder how much faster it's going to be on a Pi 2 or Pi 3.
Me No Dev
@me-no-dev
Apr 14 2016 08:52
much but not PC times
I don't even compile Pi things on the Pi
Ivan Grokhotkov
@igrr
Apr 14 2016 08:54
yeah, compiling the toolchain on the Pi took 18 hours
i tried running chroot with Qemu, but it didn't work out for some reason
Me No Dev
@me-no-dev
Apr 14 2016 08:54
why qemu?
isn't there a ready made toolchain?
I know I have one for the esp32
and btw it took a couple of hours on the pi2 to build
Ivan Grokhotkov
@igrr
Apr 14 2016 08:55
well i wanted to use crosstool-NG to compile a toolchain for the 8266
MajenkoTech did that once, but the link didn't resolve last time i checked
Me No Dev
@me-no-dev
Apr 14 2016 08:56
oh ok
platformio might have it
they advertise pi support
Ivan Grokhotkov
@igrr
Apr 14 2016 08:57
they aren't building their own ESP toolchains AFAICT
using the same ones I host at arduino.esp8266.com
ok, anyway, i do have to toolchain now.
Me No Dev
@me-no-dev
Apr 14 2016 08:58
want to share?
Ivan Grokhotkov
@igrr
Apr 14 2016 08:58
but will probably look for something more capable than a Pi for my jenkins setup
Me No Dev
@me-no-dev
Apr 14 2016 08:58
i have a pi2 on my esk
Ivan Grokhotkov
@igrr
Apr 14 2016 08:58
Sure, i'm gonna upload it and add to boards manager package
along with esptool and mkspiffs
Me No Dev
@me-no-dev
Apr 14 2016 08:59
add to the repo run.py also please as I do not use board manager
Ivan Grokhotkov
@igrr
Apr 14 2016 09:00
./get.py actually gets it from the boards manager json template, so that's covered :)
Me No Dev
@me-no-dev
Apr 14 2016 09:00
also I opt for older arduino versions there as arduino-builder is just horribly slow
also while you are here, I would like to ask you something
I'm writing a stack dump for the esp32 and I'm a bit confused how to get the stack range
I have the stack pointer but no end and urrently I'm dumping untill I hit 0xa5a5a5a5 which seems to be border/free stack space
Me No Dev
@me-no-dev
Apr 14 2016 09:07
also you calculate offset from the start of the stack to the actuall call stack based on the reset reason
and that is not available on the 32
how can I get those numbers better?
Ivan Grokhotkov
@igrr
Apr 14 2016 09:13
I'm not at the computer where i have a copy of ESP32 stuff now, but you might want to check is there is a symbol called pxCurrentTCB in libfreertos.a
Me No Dev
@me-no-dev
Apr 14 2016 09:16
yes there is
since in the ESP32 SDK there is no FreeRTOS source available, i'm pointing at ESP8266 RTOS SDK
portSTACK_TYPE *pxStack; points at the start of the stack
This should work in a non-SMP case (on ESP31). On the ESP32 it gets slightly more interesting.
Me No Dev
@me-no-dev
Apr 14 2016 09:22
I think we need only proper linker to get SMP going on the 31B
they have given all the tools in the latest SDK
just no linker to build app.bin
Ivan Grokhotkov
@igrr
Apr 14 2016 09:24
that's MP without an S. i.e. you can not run tasks on both cores with a single FreeRTOS scheduler
Me No Dev
@me-no-dev
Apr 14 2016 09:26
correct
Me No Dev
@me-no-dev
Apr 14 2016 09:44
TCB: start:0x3ffe1bbc, stop:0x3ffe2230, name:uiT
Exception (28), stack at: 0x3FFE21B0
nice..
Ivan Grokhotkov
@igrr
Apr 14 2016 10:08
@me-no-dev added tools for the Pi, let me know if it works on Pi 2 (if you get a chance to test)
Me No Dev
@me-no-dev
Apr 14 2016 10:08
sure thing :) thanks
Me No Dev
@me-no-dev
Apr 14 2016 12:19
@igrr I just notied that the linker uses 80KB dram0 instead of 96KB
any reason for that?
it would mean 16k more heap
hmm maybe it's a NONOS thing
RTOS has it to 96K
Me No Dev
@me-no-dev
Apr 14 2016 17:29
@igrr 2:50 for WiFiClient example on Pi2
Single threaded build :)
Ivan Grokhotkov
@igrr
Apr 14 2016 17:29
Ok, so less than 2x difference.
Me No Dev
@me-no-dev
Apr 14 2016 17:30
yes
I do not think the Pi3 will be much better
Ivan Grokhotkov
@igrr
Apr 14 2016 17:30
I'll probably get myself a Core i-something then.
Me No Dev
@me-no-dev
Apr 14 2016 17:31
one of those intel sticks might do
Ivan Grokhotkov
@igrr
Apr 14 2016 17:34
However if i combine several (like 10) tests in one binary, that will mean about 2 minutes of runtime (most tests run less than 10 seconds), plus ~5-10 seconds for upload, which is close to 2:50 for the actual compilation.
this means that if i can compile the next batch of tests while running the previous one, i might get reasonable performance
Me No Dev
@me-no-dev
Apr 14 2016 17:35
performance might increase if makefile is used
i imagine some files can be build once and then just linked for each test
Ivan Grokhotkov
@igrr
Apr 14 2016 17:36
True, that is also an option. However I'm not sure if i want to introduce any differences w.r.t. the way sketches are really built by arduino-builder.
ccache might also be a good option
Me No Dev
@me-no-dev
Apr 14 2016 17:37
the 2:50 is with ide 1.6.8 and arduino slower
Ivan Grokhotkov
@igrr
Apr 14 2016 17:37
yeah, i think i'll try ccache.
Me No Dev
@me-no-dev
Apr 14 2016 17:39
I used this to compile with the builder
Ivan Grokhotkov
@igrr
Apr 14 2016 17:42
Ok, I use tools/build.py :)
Me No Dev
@me-no-dev
Apr 14 2016 17:43
never noticed that in the tools :D