These are chat archives for esp8266/Arduino

4th
Jan 2019
Hasenradball
@hasenradball
Jan 04 05:54
ok, i Think in the same direction. But which permission? my user is in the dailout group.
Develo
@devyte
Jan 04 13:09
my user is in the dailout group.
That was my first thought
My second is something is messed up with the tty device on your system. Check the permissions for it, and try to change the baudrate from command line.
Beyond that, I don't know
Clemens Kirchgatterer
@everslick
Jan 04 13:50
what is a sensible lower size limit for strings to put into flash? i.e. only put strings into flash that are longer then 4 bytes?
Develo
@devyte
Jan 04 14:10
I don't remember if it was 4 or 5 bytes where it starts to .ake a difference.
Beware: RAM strings get unified (the compiler removes duplicates). Flash strings don't.
That means: if you have 100 4-char strings in RAM, moving them to flash individually makes things worse, and manually unifying and moving to flash gives you nothing.
Hasenradball
@hasenradball
Jan 04 14:22
@ develo is it possible to set a baudrate of 74880 in ubuntu for the tty dev?
Develo
@devyte
Jan 04 14:25
most likely it depends on your hardware. It works with my serial-usb cable, but it's a strange baudrate, and I'm pretty sure I have a serial board somewhere with which it wouldn't work.
Clemens Kirchgatterer
@everslick
Jan 04 15:11
@devyte thx! so first thing to do is, to grep -E 'F\(\".{1,4}\"\)' * and remove the F() :-D
Clemens Kirchgatterer
@everslick
Jan 04 15:20
woo I got 461 of them :-/
Hasenradball
@hasenradball
Jan 04 15:25
@devyte so you mean it is an Topic of the USB HW of the UBS2ttL in Kombination with Ubuntu? 115200 works fine.
Develo
@devyte
Jan 04 16:09
@hasenradball yes
Ubuntu is rather permissive about allowed baudrates, unlike windows, but it still depends on your hw
There are command line tools to set/get baudrates directly on the tty device
Among other params
I don't remember the specifics off the top of my head
Develo
@devyte
Jan 04 16:15
@everslick I hope I explained it correctly. If you have 100 cases of const char * blah = "blah"; or even other ptr names that point ohe the same string "blah", then the compiler is going to unify all instances of "blah" into one, and make all pointers point to that one instance. So you only get one single instance of the string in RAM.
If you were to start moving them to flash, then the strings don't get unified, so for each one you move, you'll add a new instance of the string in flash, and if you miss even one, you still get the RAM one on top. Even if you get them all, you don't gain anything, because the string is short.
My suggestion: do what I did to understand this: make an empty sketch, and play with a bunch of strings and the combinations described.
Then do what I didn't: document the results!!!!!!!!!!!!!
Clemens Kirchgatterer
@everslick
Jan 04 18:25
@devyte will be interesting, if it is only the compiler that unifies strings in one compilation unit, or if even the linker can unify them across multiple object files. then I will probably save a bunch of strings. I have many instances of "\n\r" or "," sticking around.
Shelby Merrick
@forkineye
Jan 04 18:38
One of those days when you have 10 commits in a row that all says "Travis fix"....
Develo
@devyte
Jan 04 18:47
Hahaha
Shelby Merrick
@forkineye
Jan 04 18:49
That shit just drives me nuts, lol. Wish it was easier to test before committing.
Was trying to add support for ESP32 Arduino to one of my libraries and build for both.
Holy hell, works now. lol... I had stripped too much off the build options for ESP8266 - https://travis-ci.org/forkineye/ESPAsyncE131
david gauchard
@d-a-v
Jan 04 19:51
You can run TravisCI locally on linux from test/ directory after committing locally and before pushing to github
I mean, with esp8266/arduino
Earle F. Philhower, III
@earlephilhower
Jan 04 21:22
@everslick, I was recently knee deep in the unifying strings bit while enabling exceptions in the last toolchain. It's the linker that merges things, and only when the SECTION name is the same and there is a special "this is a string section" flag applied to the .SECTION directive emitted. It's smart enough to merge two strings if the tail of one == the other (i.e. it'll merge "tacos\n" and "os\n" with the 2nd string pointing to the middle of the first one.).
For PMEM, though, we have everything in a separate section due to the fact you're not really supposed to have a SECTION inside of a function, only globally, or you can get really weird section type conflict errors.
Clemens Kirchgatterer
@everslick
Jan 04 21:42
@earlephilhower thx, that is very enlightening. PMEM like in "persistent memory" ?
Earle F. Philhower, III
@earlephilhower
Jan 04 21:45
PROGMEM. PSTR() macro. Lives in flash
Clemens Kirchgatterer
@everslick
Jan 04 22:02
i thought i missed a new macro :-D