Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Keith Andrew Hill
@vic10us
(lua)
andig
@andig
@igrr is it possible to enable the lwip debug output with the gcc-compiled version? The bug above has been fixed by @me-no-dev and stability has greatly improved but we're still seeing crashes that seem to happen after the _error callback has finished.
Dmitry Kireev
@kireevco
ah.got it, now wrong
@igrr ok,so... try it this way: get https://bintray.com/artifact/download/kireevco/generic/esp-alt-sdk-v1.5.0.262-macos-x86_64.zip and run ./xtensa-lx106-elf/bin/xtensa-lx106-elf-gcc esp_iot_sdk_v1.5.0/lib/libmain.a -o /tmp/libmain.a -nostdlib -u call_user_start (relative path to the library)
or just try to use relative path to ~/e/esp_iot_sdk_v1.5.2/lib/libmain.a
Dmitry Kireev
@kireevco
@igrr Nevermind... Somerhing is wrong.
Ivan Grokhotkov
@igrr
@kireevco relative path doesn't seem to make a difference
(getting the same error)
Dmitry Kireev
@kireevco
yeah.. I'm looking into binutils... looks like LD thing
bidyutper
@bidyutper
@Makuna same here...ha
andig
@andig
I have an arduino ide question. I'd like to add a build script that converts some SPIFFS files into "production" mode. Unfortunately, arduino ide seems to insist on compiling everything in the project folder- include build script, node_npm folder etc. Can I force arduino to ignore files and folders in the build process?
Aditya Tannu
@AdySan
Another general Arduino IDE question: When I install an Arduino core from Baords Manager, on OS X, what folder does it get installed to?
Ivan Grokhotkov
@igrr
~/Library/Arduino15/packages/
Aditya Tannu
@AdySan
@igrr aha, thanks, was trying to figure out how to override boards manager installed core (arduino-nRF5) with latest git core.
seems like, <sketchbook>/hardware does take priority over installed one though
Stavros Korokithakis
@skorokithakis
hey guys, i got into a bootloop/crash loop
would that be because i inadvertently applied 5v to the esp earlier? :(
Angus Gratton
@projectgus
skorokithakis: possibly, but FWIW I've applied 5V to ESPs a few times without incident
Stavros Korokithakis
@skorokithakis
hmm, yeah, i thought so too, but this is odd
Stavros Korokithakis
@skorokithakis
nah, i keep getting watchdog reset
i can flash it fine, it just won't run for some reason
i keep getting a long memory dump, does anyone know what that's about?
Stavros Korokithakis
@skorokithakis
turns out the tx/rx connections weren't secure enough and data was getting corrupted
is there a way to parse a string like "10 20 30" to ints easily?
Michael Miller
@Makuna
atoi() three times?
Stavros Korokithakis
@skorokithakis
that would require me to also know where to split the string, though
i'm looking for something like sscanf, but that doesn't seem to exist
i see it in a branch @igrr wrote, but it doesn't seem to be merged
Michael Miller
@Makuna
what about strtok
Stavros Korokithakis
@skorokithakis
aha! that's what i need, thanks!
ugh, why is everything in C so cumbersome...
Stavros Korokithakis
@skorokithakis
can anyone tell me why this strtok code leads to an infinite loop? https://www.pastery.net/ydthje/
Martin Ayotte
@martinayotte
You could try to use sscanf() to do the parsing, I've used it under STM32, but I don't if used under ESP will bring additional gcc libs
Oupps ! I've already figured out that you've already figured out that libcreplacement didn't provide it ... But maybe some tiny replacement could be added to libcreplacement
Stavros Korokithakis
@skorokithakis
yes, but i don't know how :/
i hate having to spend one hour to do something so simple
i used strtok as above and it just hangs in an infinite loop
Michael Miller
@Makuna
could strtok be used in the in mqttPublish? try strtok_r, strtok state can be reset if someone you don't know calls it.
Stavros Korokithakis
@skorokithakis
hmm, this takes different arguments
i can't even find documentation on this :(
Michael Miller
@Makuna
Stavros Korokithakis
@skorokithakis
thanks, that was a bit too confusing, but this is clearer: https://stackoverflow.com/questions/15961253/c-correct-usage-of-strtok-r
yep, looks like that was the problem
it's no longer infinitely looping now
thanks
Michael Miller
@Makuna
char* strtok(char* s, const char* delim) {
    static char* last;

    return (strtok_r(s, delim, &last));
}
Stavros Korokithakis
@skorokithakis
oh, will that work? what does static do?
Michael Miller
@Makuna
that is the implementation of strtok, and why its a problem to use, as it stores a value between calls (that's what static does, it states, make the variable live longer than the scope) so that if someone else calls it, it resets the static that you were calling.
it also shows how you can use strtok_r() where ever you used strtok before, just provide your own locally scoped (but still always within the scope of the multiple calls) variable to the last param.
Stavros Korokithakis
@skorokithakis
i see, that clarifies everything, thank you