These are chat archives for SmingHub/Sming

Jan 2019
Jan 07 04:48

@mikee47 Thanks for that tip, the F macro without leading underscore works better. For some strange reason I changed all my literals to _F("xxx"), thinking that _F was a better thing to use.
In sming, both macros are used, eg:

commandOutput->print(_F("Welcome to the Tcp Command executor\r\n"));
println(_F("Debug started"));


String system = F("system");

Do you have some advice for when to use _F("literal") and when to use just F("literal")?

Stack strings are generally preferable, but need to be mindful of scope.
I use FlashString quite a lot...
Jan 07 08:24
See also Basic_Progmem example
Jan 07 08:37
and HttpServer_ConfigNetwork sample for example of IMPORT_FSTR
Jan 07 08:50
_F() uses the stack so the content is lost as soon as the containing block goes out of scope. Used as a function parameter, that means the end of the function call.
An assignment such as char* s = _F("string")will not work because the temporary will be out of scope after the statement, hence s will point to garbage.
Jan 07 08:59
In this instance PSTR_ARRAY(s, "string") can be used.
Jan 07 10:29

Hey! SDK 2.1.0 should be supported with the current master, right?

@SvenLuebke No, SDK 2.0.0 is the only supported SDK from the v2 series. The next one is v3.0.0. In the Readme you will find the following text:

SDK 3.0+: (default: OFF) In order to use SDK 3.0.0 or newer you should set one environment variable before (re)compiling Sming AND applications based on it. The variable is SDK_BASE and it should point to $SMING_HOME/third-party/ESP8266_NONOS_SDK.
For Windows you need to do:

set SDK_BASE %SMING_HOME%//third-party/ESP8266_NONOS_SDK
For Linux(bash) you need to do:

export SDK_BASE="$SMING_HOME/third-party/ESP8266_NONOS_SDK"
Read the comments from this URL for known issues. This feature is still experimental which means that we still do not recommend it in production.
Jan 07 12:09
@slaff #1264 refers to SDK 2.1, do you know if there's a corresponding list for SDK 3.0?
Jan 07 12:10
Not that I am aware of.
@mikee47 And Happy New Year :) Is it a good time to start pushing your super-PRs to Sming develop ;) ?
Jan 07 12:17
@slaff LOL. Happy New Year too you too! Yes, I'll see about getting some PRs going.