These are chat archives for SmingHub/Sming

1st
Jan 2016
laurentppol
@laurentppol
Jan 01 2016 09:02
@kireevco could You build toolchain for "plain x86" - 32 bit? Please. Not everyone uses 64bit...
Dmitry Kireev
@kireevco
Jan 01 2016 09:23
It is plain 32 bit
@laurentppol
For Windows
@laurentppol which is do you use?
Dmitry Kireev
@kireevco
Jan 01 2016 10:15
** OS
laurentppol
@laurentppol
Jan 01 2016 10:26
@kireevco Linux, Fedora 16, a bit old but working good
Dmitry Kireev
@kireevco
Jan 01 2016 10:27
32bit?
laurentppol
@laurentppol
Jan 01 2016 10:27
yes
Dmitry Kireev
@kireevco
Jan 01 2016 10:27
well, for now - you'll have to build it yourself. I'll get a 32bit node
or maybe there is an easier stable cross-compiling path
@laurentppol you are more than welcome to add env/ubuntu_i386.sh with required packages for cross-compiling, and add parameters to export right gcc and host platform when we are making github.com/kireevco/esp-alt-sdk
laurentppol
@laurentppol
Jan 01 2016 10:31
one more question: is (on Sming) some way to make a delay without "killing processor" loop? On AVR I use sleep() which sleeps until (timer or serial) interrupt.
and for SDK I will wait. Don't want to play with SDK and my program (first on Sming) at the same time...
I use gcc 4.7.1 and SDK 1.4
ystrem
@ystrem
Jan 01 2016 10:36
Hi
I have problem with miniterm in eclipse, when it's uploaded then I get this
Leaving...
python -m serial.tools.miniterm /dev/ttyUSB0 115200
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/lib/python2.7/dist-packages/serial/tools/miniterm.py", line 128, in <module>
    console.setup()
  File "/usr/lib/python2.7/dist-packages/serial/tools/miniterm.py", line 109, in setup
    self.old = termios.tcgetattr(self.fd)
termios.error: (25, 'Inappropriate ioctl for device')
make: *** [flash] Error 1

02:34:26 Build Finished (took 26s.359ms)
What do you use for serial in eclipse ?
alonewolfx2
@alonewolfx2
Jan 01 2016 10:48
@laurentppol sleep is different on esp8266 so.
You can use deepsleep for sleep like avr but program will restart until
ystrem
@ystrem
Jan 01 2016 10:52
@laurentppol on esp it's similar you have several sleep modes so on the AVR
look in SDK there it is
laurentppol
@laurentppol
Jan 01 2016 10:57
I want serial, timer and WiFi running, but make wait in program until some (serial/timer).
ystrem
@ystrem
Jan 01 2016 10:59
From HDK, http://bbs.espressif.com/download/file.php?id=714
5. Power Management
The chip can be put into the following states:
• OFF: CHIP_PD pin is low. The RTC is disabled. All registers are cleared.
• DEEP_SLEEP: Only RTC is powered on – the rest of the chip is powered off. Recovery memory
of RTC can keep basic WiFi connecting information.
• SLEEP: Only the RTC is operating. The crystal oscillator is disabled. Any wakeup events (MAC,
host, RTC timer, external interrupts) will put the chip into the WAKEUP state.
• WAKEUP: In this state, the system goes from the sleep states to the PWR state. The crystal
oscillator and PLLs are enabled.
• ON: the high speed clock is operational and sent to each block enabled by the clock control
register. Lower level clock gating is implemented at the block level, including the CPU, which
can be gated off using the WAITI instruction, while the system is on.
Yep on AVR you can turn off peripherals, here you have only this sleep modes.
laurentppol
@laurentppol
Jan 01 2016 11:13
how are Timers in Sming realized? Using RTC or some else timer? "SLEEP" -> "MAC" is this meaning that WiFi is operating in this mode?
alonewolfx2
@alonewolfx2
Jan 01 2016 11:22
There are 3 different sleep mode and 2 different deepsleep mode.
Forever deepsleep like avr power down mode.
3 sleep modes on chips working.
If you need like avr's interrupted power down mode, you need to use forever deepsleep mode. But it can wake up just from rst pin to low.
Actually low pulse.
Chip will consume almost 15-20 ua in this mode.
alonewolfx2
@alonewolfx2
Jan 01 2016 11:28
If you need chip running sleep mode, you need to use wifi sleep types and it's consuming 30 -100mA in this mode.
If you need more information about sleep you can Sen pm to me
hreintke
@hreintke
Jan 01 2016 11:58
@All : Happy new year. Looks like it will be an exiting one with lots of new products and functionalities :smile:
@raburton : In SmingRTOS the Serial class has not yet "serial receive" included. Already working on it and close to finish. Will push probably today or tomorrow.
laurentppol
@laurentppol
Jan 01 2016 12:14
@alonewolfx2 I want just "wait" for a flag (that 10ms interrupt sets every 500ms) without taking 100% processor (and possibly making WiFi unusable). If there is no way to do so, I'll make another timer firing every 500ms.
laurentppol
@laurentppol
Jan 01 2016 12:22
don't know how to write PM
hreintke
@hreintke
Jan 01 2016 12:47
@laurentppol :
Is that an action you want to every 500 milliseconds ?
laurentppol
@laurentppol
Jan 01 2016 12:51
every 500ms I want to refresh text LCD (on I2C) and every 1s I want: - read 4 DS1820 sensors, then send them START_T to begin next cycle. DS bus is slow, so on AVR I put it in "main" (not in interrupt)
10ms timer is used to filter keyboard input
DS's are 5V powered, so they can measure in parallel
ystrem
@ystrem
Jan 01 2016 13:37
@laurentppol Do you power it with parasite power mode ?
laurentppol
@laurentppol
Jan 01 2016 13:43
no, "5V powered", using parasite power it wouldn't be possible to make multiple DS's measure at the same time, on same bus
Richard Antony Burton
@raburton
Jan 01 2016 13:50
@hreintke thanks
hreintke
@hreintke
Jan 01 2016 15:25
@raburton : Merged HardwareSerial update.
Only functionality missing in there is disable/enable debugf output.
robotiko
@robotiko
Jan 01 2016 15:33
@hreintke that serials refers rtos, right?
alonewolfx2
@alonewolfx2
Jan 01 2016 15:39
@laurentppol you need to use timer for that. espressif sdk and wdt things dont like delay things. but all delay things will freeze chip and wdt will restart chip if you use more than 5 second delay
@hreintke i saw new directory structure. i will try to port other adafruits library
into the sming rtos
laurentppol
@laurentppol
Jan 01 2016 15:45
@alonewolfx2 You mean "regular timer"? Every 500ms in my case? Until RTOS is "up and running well"?
alonewolfx2
@alonewolfx2
Jan 01 2016 15:50
yes
@raburton can we integrate spiffs directly?
into the sming rtos
ok. seems already integrated
alonewolfx2
@alonewolfx2
Jan 01 2016 16:02
@hreintke can we use rtos tasks?
hreintke
@hreintke
Jan 01 2016 16:25
@robotiko : yes RTOS Hardware Serial.
I will prefix with RTOS when writing again to prevent confusion
@alonewolfx2 :
Yes you can in RTOS Sming. Just updated the example application to start a task in init();
In principle all RTOS functionality should be available : timers/task/queue/mutex/semaphore
alonewolfx2
@alonewolfx2
Jan 01 2016 16:31
@hreintke soo i can start http server on the new task right?
hreintke
@hreintke
Jan 01 2016 16:34
@alonewolfx2 :
Spiffy & Spiffs is in and working. Not sure whether the "auto placement" of spiffs after the application is already in.
I used manual mount up till now.
alonewolfx2
@alonewolfx2
Jan 01 2016 16:41
@hreintke i have this issue. i used udk clean install on win10
hreintke
@hreintke
Jan 01 2016 16:43
@alonewolfx2 :
You can instantiate and maniluHttpServer objects in a Task.
But network processing is part of lwip and main task. I don't know yet where callbacks are running and how to influence that.
alonewolfx2
@alonewolfx2
Jan 01 2016 16:47
c:/Espressif/ESP8266_RTOS_SDK/include/espressif/ets_sys.h:48:0: error: "ETS_INTR_UNLOCK" redefined [-Werror]
 #define ETS_INTR_UNLOCK() \
 ^
In file included from include/esp_systemapi.h:20:0,
                 from SmingCore/../SmingCore/../Wiring/../include/user_config.h:4,
                 from SmingCore/../SmingCore/../Wiring/WiringFrameworkDependencies.h:11,
                 from SmingCore/../SmingCore/Interrupts.h:11,
                 from SmingCore/Interrupts.cpp:8:
c:/Espressif/ESP8266_RTOS_SDK/include/espressif/esp8266/ets_sys.h:56:0: note: this is the location of the previous definition
 #define ETS_INTR_UNLOCK()   do {    \
 ^
cc1plus.exe: all warnings being treated as errors
make: *** [build/SmingCore/Interrupts.o] Error 1
laurentppol
@laurentppol
Jan 01 2016 16:57
@hreintke for testing on Linux: is it correct: 1). download and unpack ZIP into /opt/Sming/Sming_RTOS_POC/, 2). adjust $SMING_HOME to point to this new directory, 3). unpack examples & try to compile. Or I need something more?
I am using Fedora 16, xtensa-gcc 4.7.1, Espressif SDK 1.4
laurentppol
@laurentppol
Jan 01 2016 17:59
aggrrrhhh, I have had xtensa 4.7.1 installed with Fedora 16, for Sming version installed is 4.8.2
hreintke
@hreintke
Jan 01 2016 18:18
@alonewolfx2 :
First : I presume you are working with the latest Sming RTOS from master (updated today) correct ?
Did not see this before and @robotiko also managed to run on Windows
We had/have some unresolved issues with pvPortMalloc and vPortFree for which we know the temporary solution.
Can you check in which files the define for ETS_INTR_UNLOCK is included ?
@laurentppol : Sming RTOS works with Espressiff RTOS SDK, not NONOS SDK.
The latest RTOS SDK version is 1.3.0
laurentppol
@laurentppol
Jan 01 2016 18:26
@hreintke could You tell me, what to download where, and how to set env variables?
as for Sming I have: /opt/Sming, SMING_HOME=/opt/Sming/Sming, ESP_HOME=/opt/esp-open-sdk. GCC/binutils in /opt/esp-open-sdk/xtensa-lx106-elf/bin. And THAT works. But I am confused, how to set RTOS environement. :|
I have downloader RTOS SDK 1.3, and now it is in /opt/ESP8266RTOS_SDK. If I add path to GCC _from_esp_open_sdk(!) to PATH, basic example compiles. But where to go for Sming RTOS?
and in this RTOS there are only blob libraries and header files. Is that OK?
laurentppol
@laurentppol
Jan 01 2016 18:42
OK, got to compile Sming RTOS libs.
drwxr-xr-x 10 laurent laurent 4096 01-01 18:45 ESP8266_RTOS_SDK
drwxr-xr-x  9 laurent laurent 4096 10-24 23:39 esp-open-sdk
drwxr-xr-x  9 laurent laurent 4096 10-24 21:11 Espressif
drwxr-xr-x  4 laurent laurent 4096 01-01 17:24 ESP_RTOS_examples
drwxr-xr-x 15 laurent laurent 4096 01-01 19:38 ESP_RTOS_POC
drwxr-xr-x  4 root    root    4096 2011-01-17  openoffice.org
drwxr-xr-x  6 root    root    4096 2012-11-03  openoffice.org3
drwxr-xr-x  5 root    root    4096 2013-01-25  OpenPrinting-SpliX
drwxr-xr-x 46 laurent laurent 4096 01-01 19:32 Sming
[laurent@laptop2 ESP_RTOS_POC]$ set | grep HOME
BIN_HOME=/opt/ESP8266_RTOS_SDK/bin
ESP_HOME=/opt/esp-open-sdk
HOME=/home/laurent
PROFILEHOME=
SDK_HOME=/opt/ESP8266_RTOS_SDK
SMING_HOME=/opt/Sming/Sming
I had to adjust Makefile:
#############################################################
#
# Root Level Makefile ESP8266 + RTOS
#
# (c) by CHERTS <sleuthhound@gmail.com>
#
#############################################################

BUILD_BASE      = build
FW_BASE         = firmware

#TOOLS_ROOT ?= c:/Espressif
TOOLS_ROOT ?= /opt/ESP8266_RTOS_SDK

# Base directory for the compiler
#XTENSA_TOOLS_ROOT ?= c:/Espressif/xtensa-lx106-elf/bin
XTENSA_TOOLS_ROOT ?= /opt/esp-open-sdk/xtensa-lx106-elf/bin

# base directory of the ESP8266 SDK package, absolute
#SDK_BASE       ?= c:/Espressif/ESP8266_RTOS_SDK
SDK_BASE        ?= /opt/ESP8266_RTOS_SDK
#SDK_TOOLS      ?= c:/Espressif/utils
SDK_TOOLS       ?= c:/Espressif/utils
Now it's to some "Makefile master" to make correct adjustments to Makefiles to support Win$ and Linux (possibly Mac too)
laurentppol
@laurentppol
Jan 01 2016 19:08
Now RTOS_SDK sample compiles, but how to merge Sming_RTOS with?
Sming_RTOS libraries compile into /build dir, but trying to compile examples gives:
[laurent@laptop2 FirstTest]$ make
C+ app/application.cpp
app/application.cpp:6:29: fatal error: freertos/timers.h: No such file or directory
 #include "freertos/timers.h"
                             ^
compilation terminated.
make: *** [out/build/app/application.o] Błąd 1
[laurent@laptop2 FirstTest]$
laurentppol
@laurentppol
Jan 01 2016 19:15
How to make build system take includes/libs from BOTH SDK_HOME (for Rtos) and ESP_HOME (for basic libs)?
hreintke
@hreintke
Jan 01 2016 19:33
@laurentppol :
The "updates to the makefile" should not be necessary if the settings of the env variables are set accordingly.
laurentppol
@laurentppol
Jan 01 2016 19:34
think got it: SDK_BASE not SDK_HOME...
hreintke
@hreintke
Jan 01 2016 19:35
That might also be the issue with compile
The freertos/timers.h comes from (SDK_BASE)/include
ystrem
@ystrem
Jan 01 2016 19:39
I think I got it, but I have issue that you mentioned...
ystrem@ubuntu:~/Desktop/Sming_RTOS_POC/ESP_RTOS_POC$ make
CC system/flashmem.c
C+ system/m_printf.cpp
CC system/uart.c
C+ appinit/user_main.cpp
C+ SmingCore/Clock.cpp
C+ SmingCore/DataSourceStream.cpp
C+ SmingCore/Debug.cpp
C+ SmingCore/Digital.cpp
C+ SmingCore/ESP8266EX.cpp
C+ SmingCore/FileSystem.cpp
C+ SmingCore/HardwarePWM.cpp
C+ SmingCore/HardwareSerial.cpp
C+ SmingCore/Interrupts.cpp
C+ SmingCore/SPISoft.cpp
C+ SmingCore/stringconversion.cpp
C+ SmingCore/SystemClock.cpp
C+ SmingCore/Timer.cpp
C+ SmingCore/WifiStation.cpp
C+ SmingCore/Wire.cpp
C+ Wiring/FakePgmSpace.cpp
C+ Wiring/I2CMaster.cpp
C+ Wiring/IPAddress.cpp
C+ Wiring/Print.cpp
C+ Wiring/SplitString.cpp
C+ Wiring/Stream.cpp
C+ Wiring/WMath.cpp
C+ Wiring/WShift.cpp
C+ Wiring/WString.cpp
C+ SmingCore/Platform/AccessPoint.cpp
C+ SmingCore/Platform/RTC.cpp
C+ SmingCore/Platform/Station.cpp
C+ SmingCore/Platform/System.cpp
C+ SmingCore/Network/FtpServerConnection.cpp
C+ SmingCore/Network/FtpServer.cpp
C+ SmingCore/Network/HttpClient.cpp
C+ SmingCore/Network/HttpRequest.cpp
C+ SmingCore/Network/HttpResponse.cpp
C+ SmingCore/Network/HttpServerConnection.cpp
C+ SmingCore/Network/HttpServer.cpp
C+ SmingCore/Network/MqttClient.cpp
C+ SmingCore/Network/NetUtils.cpp
C+ SmingCore/Network/NtpClient.cpp
C+ SmingCore/Network/rBootHttpUpdate.cpp
C+ SmingCore/Network/TcpClient.cpp
C+ SmingCore/Network/TcpConnection.cpp
C+ SmingCore/Network/TcpServer.cpp
C+ SmingCore/Network/TelnetServer.cpp
C+ SmingCore/Network/UdpConnection.cpp
C+ SmingCore/Network/URL.cpp
C+ SmingCore/Network/WebSocket.cpp
C+ Services/ArduinoJson/ArduinoJson.cpp
C+ Services/CommandProcessing/CommandDelegate.cpp
C+ Services/CommandProcessing/CommandExecutor.cpp
C+ Services/CommandProcessing/CommandHandler.cpp
C+ Services/CommandProcessing/CommandOutput.cpp
C+ Services/cWebsocket/websocket.cpp
C+ Services/DateTime/DateTime.cpp
CC Services/FATFS/ff.c
CC Services/libemqtt/libemqtt.c
CC Services/SpifFS/spiffs_cache.c
CC Services/SpifFS/spiffs_check.c
CC Services/SpifFS/spiffs_gc.c
CC Services/SpifFS/spiffs_hydrogen.c
CC Services/SpifFS/spiffs_nucleus.c
CC Services/SpifFS/spiffs_sming.c
C+ Services/WebHelpers/base64.cpp
C+ Services/WebHelpers/escape.cpp
C+ Libraries/DS18S20/ds18s20.cpp
C+ Libraries/OneWire/OneWire.cpp
CC rboot/appcode/rboot-api.c
In file included from rboot/appcode/rboot-api.c:18:0:
rboot/appcode/rboot-api.c: In function 'rboot_set_config':
system/mem.h:17:27: error: implicit declaration of function 'pvPortMalloc' [-Werror=implicit-function-declaration]
 #define os_malloc(s)      pvPortMalloc(s, "", 0)
                           ^
rboot/appcode/rboot-api.c:168:19: note: in expansion of macro 'os_malloc'
  buffer = (uint8*)os_malloc(SECTOR_SIZE);
                   ^
system/mem.h:16:27: error: implicit declaration of function 'vPortFree' [-Werror=implicit-function-declaration]
 #define os_free(s)        vPortFree(s, "", 0)
                           ^
rboot/appcode/rboot-api.c:187:2: note: in expansion of macro 'os_free'
  os_free(buffer);
  ^
cc1: all warnings being treated as errors
make: *** [build/rboot/appcode/rboot-api.o] Error 1
I made some edit on makefile, I'm on linux ...
laurentppol
@laurentppol
Jan 01 2016 19:40
LAST (I hope) problem: there is NO "esptool2"
hreintke
@hreintke
Jan 01 2016 19:41
did you solve the pvPortMalloc with makefie update ?
In makefile-project ESPTOOL2 ?= esptool2
or set ESPTOOL2 environment variable.
laurentppol
@laurentppol
Jan 01 2016 19:47
@hreintke but there is NO any file with name esptool2* in ESP SDK, ESP_RTOS_SDK, Sming...
there is ONLY esptool.py, but symlinking this to esptool2 doesn't work
hreintke
@hreintke
Jan 01 2016 19:48

for pvPortMalloc and ..Free update C:\Userdata\RTOS_Project\ESP_RTOS_POC\include\esp_systemapi.h lines 75-79
to

extern void *pvPortMalloc(size_t xWantedSize, const char *file, uint32 line);
extern void *pvPortZalloc(size_t xWantedSize, const char *file, uint32 line);
//extern void pvPortFree(void *ptr);
extern void vPortFree(void *ptr, const char *file, uint32 line);
extern void *vPortMalloc(size_t xWantedSize);

Some need it some not. We don't know the reason yet

Did you ever use standard sming ? It is used there too.
You should take from repo and compile
laurentppol
@laurentppol
Jan 01 2016 19:49
I got "application.o" in /out/build/app, and "app.out" and "app_app.a" in /out/build
ystrem
@ystrem
Jan 01 2016 19:52
@hreintke Yep it's ok
hreintke
@hreintke
Jan 01 2016 19:54
@ystrem : great.
laurentppol
@laurentppol
Jan 01 2016 19:55
@hreintke THX, got it. "First Test" finally compiles
ystrem
@ystrem
Jan 01 2016 19:55
Yep, me too. :)
hreintke
@hreintke
Jan 01 2016 19:55
@laurentppol : great :smile:
If you needed to do something else than setting env variables correctly please submit an issue on my github repo.
The we know what is missing.
ystrem
@ystrem
Jan 01 2016 19:57
I have noob question about github, I forked your repo then clone to desktop, made changes, then git add, git commit and now I want to push it to repo, but it want to send it to yours repo not the forked.
laurentppol
@laurentppol
Jan 01 2016 19:57
can (simple) program written for Sming be compiled using Sming_RTOS w/o modification? I use 1Wire, I2C, and LCD
@hreintke Makefile is written for now for Win$ ONLY, to "automatic choice" depending OS
main Makefile for RTOS_POC
hreintke
@hreintke
Jan 01 2016 19:59
OK, @raburton worked on the makefiles. That's why I asked to submit the issue. He is not in this discussion so sould be informed
laurentppol
@laurentppol
Jan 01 2016 19:59
and esptool is missing (as we just found)
esptool2(!) not esptool which is included in esp-open-sdk
how do I "submit an issue", sorry, newbie question
ystrem
@ystrem
Jan 01 2016 20:02
I used esptool packed with esp-open-sdk
laurentppol
@laurentppol
Jan 01 2016 20:03
@ystrem and for me esptool.py (included) did NOT worked, esptool2 works (I get firmware images)
hreintke
@hreintke
Jan 01 2016 20:03
Issue : goto https://github.com/hreintke/Sming_RTOS_POC/issues and push new issue button
name close to eachother, different functionality
esptool is for flashing to esp, esptool2 is for creating firmware image.
alonewolfx2
@alonewolfx2
Jan 01 2016 20:06
@hreintke yes I am using udk 209 and latest code from (today) your repo
robotiko
@robotiko
Jan 01 2016 20:12
@alonewolfx2 what is not workign for you in rtos=
?
alonewolfx2
@alonewolfx2
Jan 01 2016 20:12
It's not compiling
laurentppol
@laurentppol
Jan 01 2016 20:13
@hreintke filled the issue, is it ok?
hreintke
@hreintke
Jan 01 2016 20:18
@laurentppol : yes it is. You can do the same for other "real problems"
But always try to get a solution here and also mention that in the issue description.
ystrem
@ystrem
Jan 01 2016 20:23
This message was deleted
MqttClient_Hello example look OK huray
alonewolfx2
@alonewolfx2
Jan 01 2016 20:37
@ystrem on rtos sming?
ystrem
@ystrem
Jan 01 2016 20:38
yes
alonewolfx2
@alonewolfx2
Jan 01 2016 20:42
lastest code?
it didnt compiledn on my windows
ystrem
@ystrem
Jan 01 2016 20:43
yep, i'm in linux
laurentppol
@laurentppol
Jan 01 2016 20:45
question on Serial.print behavior: is it blocking call? If not, how to detect "output buffer empty"?
for now on "regular Sming"
alonewolfx2
@alonewolfx2
Jan 01 2016 20:51
ok seems lastest cde compiling (4 hour ago)
hreintke
@hreintke
Jan 01 2016 20:55
@laurentppol : Nothing in Sming is blocking. Everything is event based.
Output buffer empty is not recognized and no callback available.
laurentppol
@laurentppol
Jan 01 2016 21:00
@hreintke is some doc on it? What happens when I issue Serial.print("xxx"); ? How early can I issue another one print? [on AVR I have small 120byte static buffer, next char transmitted when Tx register empty, and clear "some flag" on trailing /0 of printout.
advancing to next char in interrupt
simply "fill the buffer" and "print"?
sorry for questions, but I am total newbie to "32bit frameworks", AVR is "easy" bits, bytes, interrupts, registers...
Dmitry Kireev
@kireevco
Jan 01 2016 21:12
@hreintke I've heard from @anakod that sming is pseudo-async
are you sure it is non-blocking? :)
hreintke
@hreintke
Jan 01 2016 21:20
@laurentppol :
Currently in sming it the fill the buffer and print.
Of course there are the registers, interrupts etc, which you could use directly.
Sming is for a number of these a layer above to ease programming.
You can help to add this tx register empty callback to the HardwareSerial class.
@kireevco : don't know what @anakod means with pseudo-async.
I am not aware of blocking calls do you ?
zhivko
@zhivko
Jan 01 2016 21:23
Bi
laurentppol
@laurentppol
Jan 01 2016 21:25
@hreintke I know Sming is a layer. My question is quite simple: I prepare 100 chars text in some buffer, then I issue Serial.print(ln), now, how to detect if it is possible to issue another Serial.print to not get garbage?
If Serial.print is blocking, there is no problem, program stops until buffer send out...
Dmitry Kireev
@kireevco
Jan 01 2016 21:29
another one, when network stack is receiveing, nothing else works
so if there is an issue, device is gone
while in a true async, the callback just doesn't happen
laurentppol
@laurentppol
Jan 01 2016 21:30
@kireevco NONOS or RTOS? or (worst) - both?
Dmitry Kireev
@kireevco
Jan 01 2016 21:30
NONOS. the regular one
laurentppol
@laurentppol
Jan 01 2016 21:30
could You try with RTOS?
Dmitry Kireev
@kireevco
Jan 01 2016 21:31
(that was long time ago).
hreintke
@hreintke
Jan 01 2016 21:32
@laurentppol :
As said, not implemented in sming at the moment. But is possible on esp.
Options for you : 1/ PR to sming 2/ Write n your application 3/ accept that is is not available :smile:
laurentppol
@laurentppol
Jan 01 2016 21:35
PR? sorry don't know this abbrev
hreintke
@hreintke
Jan 01 2016 21:35
@kireevco :
I don't recognize that ? What issue should happen ?
If you mean : When the espressif SDK has an issue that resets the esp.
Even then you can detect. At startup of esp you can detect the reason for restart.
laurentppol
@laurentppol
Jan 01 2016 21:36
just as on AVR? PowerReset, WatchdogReset, ExternalReset....?
Dmitry Kireev
@kireevco
Jan 01 2016 21:36
@laurentppol PR=pull request=write it yourself
laurentppol
@laurentppol
Jan 01 2016 21:36
ok for PR :)
hreintke
@hreintke
Jan 01 2016 21:37
PR = Pull request, Clone sming repo, add code, create pull request, will be merged into sming, available for all
laurentppol
@laurentppol
Jan 01 2016 21:37
will try to finish porting app to Sming, and look how (reliably) it works
10ms interrupts (which make some work) already works :)
one more thing: I don't know how ugly xtensa asm looks, but how (what line to which Makefile) add, to get asm intermediate code?
AVR is really ugly, but sometimes last resort solving problems
maybe there should be a switch "#define MAKE_INTERMEDIARY_ASM"?
laurentppol
@laurentppol
Jan 01 2016 21:43
to keep/obtain something like *.lst files for avr-gcc (mix of C and resulting ASM)
on AVR it is obtained using "objdump -h -S"
laurentppol
@laurentppol
Jan 01 2016 21:48
same switches work (manually) for *.o on ESP
hreintke
@hreintke
Jan 01 2016 21:50
@laurentppol : I have no experience/knowledge on that. Maybe @raburton knows. He is working in the "asm area" for the rboot functionality
Dmitry Kireev
@kireevco
Jan 01 2016 21:50
Richard Antony Burton
@raburton
Jan 01 2016 21:53
@laurentppol check the gcc manual for the command line option needed
laurentppol
@laurentppol
Jan 01 2016 21:58
@raburton same switches as for AVR (-h -S) worked, producing "something cryptic"
but I don't know, in which Makefile should I put this
I can copy exact line from AVR makefile, but to which one?
I don't understand Makefiles for real
BTW, when (days, weeks, months) may I expect I2C and LCD libs to be ported to RTOS?
Richard Antony Burton
@raburton
Jan 01 2016 22:03
are you passing the flags to the compiler or the linker?
add them the CFLAGS or LDFLAGS accordingly
laurentppol
@laurentppol
Jan 01 2016 22:06
no, there is separate "target" in Makefile, I may @ it to You, if You provide @ address
it is "objdump -h -S"
ok, got @, Makefile for AVR sent
Richard Antony Burton
@raburton
Jan 01 2016 22:11
i'm not really sure what you want me to do with the makefile
laurentppol
@laurentppol
Jan 01 2016 22:13
tell me, what line(s) and in which Makefile (of Sming) should I put to obtain *.lst file (C + resulting ASM)
Richard Antony Burton
@raburton
Jan 01 2016 22:14
i don't understand what that has to do with the makefile you sent me
laurentppol
@laurentppol
Jan 01 2016 22:15
there is a line(s) on how to obtain *.lst files
Richard Antony Burton
@raburton
Jan 01 2016 22:18
just take that make target from, add it to the sming one and change the variables to use the ones used in the sming makefile (use the .out file instead of the .elf in the your file)
laurentppol
@laurentppol
Jan 01 2016 22:47
@kireevco have received @ about 2 PM's, but can't read/write (too old browser? - Seamonkey 2.13 / Firefox 16)
ystrem
@ystrem
Jan 01 2016 23:10
@kireevco they have nice docs :)