These are chat archives for SmingHub/Sming

18th
Feb 2016
alon24
@alon24
Feb 18 2016 05:08 UTC
@hreintke i cannot get my code to build, it says there is not enough space for it:
AR out/build/app_app.a
LD out/build/app_0.out
/opt/esp-alt-sdk-v1.3.0-rtos.258-macos-x86_64/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/5.1.0/../../../../xtensa-lx106-elf/bin/ld: out/build/app_0.out section .irom0.text' will not fit in region irom0_0_seg'
/opt/esp-alt-sdk-v1.3.0-rtos.258-macos-x86_64/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/5.1.0/../../../../xtensa-lx106-elf/bin/ld: region irom0_0_seg' overflowed by 4766 bytes
collect2: error: ld returned 1 exit status
make: *** [out/build/app_0.out] Error 1
alon24
@alon24
Feb 18 2016 05:14 UTC
## use rboot build mode
RBOOT_ENABLED ?= 1
## enable big flash support (for multiple roms, each in separate 1mb block of flash)
RBOOT_BIG_FLASH ?= 1
## size of the flash chip
SPI_SIZE        ?= 4M
## size of the spiffs to create
SPIFF_SIZE      ?= 600000
## (spiffs location defaults to the mb after the rom slot on 4mb flash)

//LD file
MEMORY
{
dport0_0_seg :                          org = 0x3FF00000, len = 0x10
dram0_0_seg :                           org = 0x3FFE8000, len = 0x18000
iram1_0_seg :                           org = 0x40100000, len = 0x9000
/*irom0_0_seg :                           org = 0x4020A000, len = 0x52000*/
irom0_0_seg :                           org = 0x40202010, len = 0x52000
}

INCLUDE "../ld/eagle.app.v6.hr.common.ld"

void initSpiff()
{
// mount spiffs
int slot = rboot_get_current_rom();
#ifndef DISABLE_SPIFFS
if (slot == 0)
{
#ifdef RBOOT_SPIFFS_0
debugf("trying to mount spiffs at %x, length %d", RBOOT_SPIFFS_0 , SPIFF_SIZE);
spiffs_mount_manual(RBOOT_SPIFFS_0, SPIFF_SIZE);
#else
debugf("trying to mount spiffs at %x, length %d", 0x100000, SPIFF_SIZE);
spiffs_mount_manual(0x100000, SPIFF_SIZE);
#endif
}
else
{
#ifdef RBOOT_SPIFFS_1
debugf("trying to mount spiffs at %x, length %d", RBOOT_SPIFFS_1 , SPIFF_SIZE);
spiffs_mount_manual(RBOOT_SPIFFS_1, SPIFF_SIZE);
#else
debugf("trying to mount spiffs at %x, length %d", SPIFF_SIZE);
spiffs_mount_manual(0x300000, SPIFF_SIZE);
#endif
}
#else
debugf("spiffs disabled");
#endif
//WifiAccessPoint.enable(false);

Serial.printf("\r\nCurrently running rom %d.\r\n", slot);
Serial.println("Type 'help' and press enter for instructions.");
Serial.println();
}
Ricardo Martínez
@mtzfactory
Feb 18 2016 07:30 UTC
Hi, i would like how can i use the following arduino library in my project... https://github.com/gauravmm/HT1632-for-Arduino
Do i have to change something in the code, what do I have to take into account?
hreintke
@hreintke
Feb 18 2016 07:53 UTC
@alon24 :
The size in the LD file is (like some other values in the makefile) not changed dependent on the value of SPI_SIZE.
For the 4Mb esp (?) you are using, I think the size can go up to 0xF0000.
For now the only way to get that in is to update the LD file accordingly.
BTW : The SPIFFS_SIZE should be a multiple of 4K which is the blocksize of the Flash.
Not sure how spiffy/spiffs_mount/spiifs usage will be with non-aligned values
hreintke
@hreintke
Feb 18 2016 08:00 UTC
BTW2 : If you change the spiffs_mount_manual from spiffs_mount_manual(0x300000, SPIFF_SIZE);
to spiffs_mount_manual(0x300000, 0); The spiffs_mount will detect the size of the spiffs on the flash and use that.
New feature of SmingRTOS :smile:
Alexander V. Ribchansky
@avr39-ripe
Feb 18 2016 08:04 UTC
@dobrishinov about ajax - update sming if old one and no problem with ajax :) just works :)
alon24
@alon24
Feb 18 2016 08:23 UTC
@hreintke which part in ld should now be 0xF0000.
alon24
@alon24
Feb 18 2016 08:47 UTC
@hreintke I am guessing irom0_0_seg : org = 0x40202010, len = 0xF0000 ??
hreintke
@hreintke
Feb 18 2016 09:09 UTC
yes that correct
alon24
@alon24
Feb 18 2016 09:13 UTC
well it now compiles, but i will see later (@work now) about more. thanks for u'r help
zhivko
@zhivko
Feb 18 2016 11:33 UTC
I am missing blankfs.bin ... in sming rtos
IOError: [Errno 2] No such file or directory: '/home/kz/git/Sming_RTOS_POC/sming/compiler/data/blankfs.bin'
/home/kz/git/Sming_RTOS_POC/sming/Makefile-rboot.mk:385: recipe for target 'flashinit' failed
make: *** [flashinit] Error 1
robotiko
@robotiko
Feb 18 2016 11:57 UTC
@crosofg we crossed with the ssl testing
as you just mentioned
compiling
but ssl is failing a
and also resets the device
zhivko
@zhivko
Feb 18 2016 12:16 UTC
IS this ok to be used near nodemcu (esp12) as switching regulator power supply?
http://www.digikey.com/product-detail/en/OKI-78SR-5%2F1.5-W36-C/811-2196-5-ND/2259781
I mean because of the switching emi ? I do not want wireless to be disturbed because of this psu
slaff
@slaff
Feb 18 2016 13:04 UTC
@hreintke Is the HttpClient in RTOS migrated, working and tested ?
hreintke
@hreintke
Feb 18 2016 13:14 UTC
@slaff : yes, all functionality of NONOS is available in RTOS.
There are some differences between the two versions (not HttpClient) see : https://github.com/SmingHub/SmingRTOS
That is for Sming Applications. For Sming Framework the biggest change is the directory layout and the decoupling of changes in Espressif sdk and Sming Framework.
FYI, The LWIP in RTOS has IPv6 support enabled. Only thing I needed to update for that was in the IPAddress class.
slaff
@slaff
Feb 18 2016 13:19 UTC
@hreintke I was thinking about organizing a Hackathon for a day with the goal of testing/ fixing and finishishing / fixing all existing features + libraries.
Would it be possible for you to prepare something like a small migration guide: Tips and Tricks, Things to consider, etc ?
crosofg
@crosofg
Feb 18 2016 13:41 UTC
@robotiko yes its failing ..even mqtt client is throwing error
C:\tools\Sming\samples\MqttClient_Hello>make ENABLE_SSL=1
LD out/build/app.out
c:/tools/sming/sming/compiler/lib/\libaxtls.a(loader.o):(.irom0.literal+0x3c): undefined reference to default_private_key_len'
c:/tools/sming/sming/compiler/lib/\libaxtls.a(loader.o):(.irom0.literal+0x44): undefined reference to default_certificate'
collect2.exe: error: ld returned 1 exit status
make: *** [out/build/app.out] Error 1

C:\tools\Sming\samples\MqttClient_Hello>`
ok jsut add ENABLE_SSL =1 in the makefile-user.mk of Mqtt hello. Then tis working
slaff
@slaff
Feb 18 2016 14:03 UTC
of course - the SSL needs SSL keys and cert.
when you compile the project with ENABLE_SSL=1 then it will work.
crosofg
@crosofg
Feb 18 2016 14:11 UTC
but doesnt the inlcude/ssl contains the key and cert?
hreintke
@hreintke
Feb 18 2016 14:44 UTC
@slaff :
For applications, conversion from NONOS to RTOS is straightforward, There is already the "difference note" in the Readme and maybe I will write a small howto next to it.
For Sming Framework the conversion is done. I don't see the need for a migration guide as new major functionality should be directly based on RTOS and not on NONOS. We will cease support for including major new functionality very soon.
For your ssl implementation, make a start, in RTOS is implementing new functionality is the same as in NONOS.
If you hit issues, ask here or submit an issue in the SmingRTOS and you will get the answers from me and others.
Sébastien
@sle118
Feb 18 2016 14:50 UTC
@slaff I have gone to the bottom of the gdb issue and report that it now works! The alt-sdk on linux is built with an older version of gdb, which confirms my initial suspicions that there was a structure alignment difference or a protocol incompatibility between the gdb stub and the gdb server
@robotiko debugging works well now on linux!
I just need to figure out how to get variable content to show up in debug now (all variables currently seem to be "optimized" out)
and then I'll be ready to resume debugging my stb image library port
hreintke
@hreintke
Feb 18 2016 14:53 UTC
@zhivko : I added blankfs.bin to the SmingRTOS repo.
robotiko
@robotiko
Feb 18 2016 14:56 UTC
@sle118 I'm having similar errors in windows..
I guess the problem is the same
exe used was extracted from esp-alt-sdk for windows (only place I could find it)
Sébastien
@sle118
Feb 18 2016 15:44 UTC
@robotiko have you tried building the open sdk yourself?
I decided to use a linux VM instead of windows cygwin
slaff
@slaff
Feb 18 2016 16:26 UTC

@sle118 > which confirms my initial suspicions that there was a structure alignment difference or a protocol incompatibility

Great! That's the type of help I need!

robotiko
@robotiko
Feb 18 2016 16:30 UTC
@sle118 not using linux vm at all
Sébastien
@sle118
Feb 18 2016 16:31 UTC
@robotiko you are on windows, correct?
robotiko
@robotiko
Feb 18 2016 16:33 UTC
pure windows environment
yes
Sébastien
@sle118
Feb 18 2016 16:34 UTC
I think you can try to pull the gdb executable from the open sdk like I did, just to see if it makes a difference
I was getting breaks to execute, but the addresses looked funky
robotiko
@robotiko
Feb 18 2016 16:34 UTC
Sébastien
@sle118
Feb 18 2016 16:34 UTC
and totally not in the range that would have been expected
robotiko
@robotiko
Feb 18 2016 16:35 UTC
ok but questions
that just contains linux and mac info to build
there is no compiled version ready to go
Sébastien
@sle118
Feb 18 2016 16:36 UTC
I am looking at the readme
robotiko
@robotiko
Feb 18 2016 16:36 UTC
isnt that what cherts do?
Sébastien
@sle118
Feb 18 2016 16:36 UTC
from there, I think you can find how to build in windows
Ricardo Martínez
@mtzfactory
Feb 18 2016 18:36 UTC
I would really appreciate a help on this:I would like how can i use the following arduino library in my project... https://github.com/gauravmm/HT1632-for-Arduino
Do i have to change something in the code, what do I have to take into account?
alon24
@alon24
Feb 18 2016 20:02 UTC
@hreintke can u add mqtt sample to rtos?
hreintke
@hreintke
Feb 18 2016 20:34 UTC
@alon24 If there is a NONOS version, can you take the action to convert that to RTOS.
Should be only updating the include files, compile and test.
If done and working please submit a PR and I will include it.
alon24
@alon24
Feb 18 2016 20:36 UTC
k i will look into this :)
hreintke
@hreintke
Feb 18 2016 20:36 UTC
@alonewolfx2 :
Can you check the libraries not yet converted to RTOS.
@alon24 : Thanks. :smile:
alon24
@alon24
Feb 18 2016 21:05 UTC
@hreintke the mqttClient_hello sample calls mqtt.setCompleteDelegate(checkMQTTDisconnect);
its not present in rtos
hreintke
@hreintke
Feb 18 2016 21:47 UTC
@alon24 :
I checked. The mqttclient implementation and sample are updated a couple of days ago.
Also dependent on another patch. Need to see what actions I need to get it in.
alon24
@alon24
Feb 18 2016 21:48 UTC
K