Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    M.K.
    @mk-pmb
    in that case it might be worth trying to invest a few of the precious RAM bytes in a swap mechanism.
    … which probably won't work without hardware support like a Memory Management Unit.
    Modestas Bunokas
    @KT819GM
    LFS play kind a swap (read-only) role for Lua. About C modules, still, it’s easy to build firmware and easy to reload it. You barely need to change C modules at all to be honest. On my daily test unit I have 35 C modules enabled and I still get more than 32K free ram on latest dev. Firmware compile / chip erase / firmware write / LFS load / init.lua is a one-liner bash script.
    M.K.
    @mk-pmb
    ok then I'm probably overthinking it and we should just rewrite the beginner's guide some time to make it sound less complicated. after all, having to decide the module selection upfront, before I had any idea about MCUs at all, was what had turned me away at first. only came back because MicroPython still doesn't have the features I want.
    back then especially because I had no way to export/import my module selection in the cloud build service to incrementally refine my selection, I'd have had to fill the entire form again for each attempt. at least that's going to be easier soon.
    Modestas Bunokas
    @KT819GM
    You sound like a linux guy, isn't native or docker ways looks to you complicated? Mostly 2 files need editing before compile: user_config.h and user_modules.h everything well commented inside files
    M.K.
    @mk-pmb
    Indeed I am a "linux guy", but also a user experience activist. I already made the Github Action that powers https://github.com/mk-pmb/nodemcu-firmware-daily-vanilla/ to make at least that level of ease available to all Githubbers independent of their OS preference. and I'm planning on building a noob-friendly module selection wizard as well.
    Terry Ellison
    @TerryE
    Neither the xtensa toolchain nor the ESP loaders support dynamic libraries. This is an IoT device with very limited RAM and flash memory.
    M.K.
    @mk-pmb
    I know they have few memory of each type, thus the cheap price. I just don't grasp the resulting consequences and limitations in detail.
    when you say the toolchain doesn't support dynamic libs, does it mean there's no known compiler to make shared object files in the first place?
    M.K.
    @mk-pmb
    would it further imply that even if I'd find a compiler that can produce such shared object file, our firmware's LUA's package.loadlib() would be unable to load it?
    Modestas Bunokas
    @KT819GM
    Maybe better approach for this issue we discussing now would be plugin for popular ide like VSCode which would allow you to choose dependencies (parser of config file) and saving it. And for sure ability to erase/write and so on. Would be something like platformio, just for nodemcu?
    M.K.
    @mk-pmb
    I would not be in that approach's target audience, as most of the computers I use for experimenting with my MCU are too weak for VSCode. I don't know platformio, so I can't comment on that.
    ("weak" as in what's left of resources after firefox and VLC eat their share. :-) )
    Modestas Bunokas
    @KT819GM
    Jeeez, if it can run firefox ... vscode should not be a problem at all
    M.K.
    @mk-pmb
    I prefer to have the manual open in Firefox while I'm writing my code. :)
    also this Gitter
    M.K.
    @mk-pmb
    after firmware upload, the greeting message says "LFS: 0x0", is that the size of my LFS? If so, why? because I built it with #define LUA_FLASH_STORE 0x10000
    Modestas Bunokas
    @KT819GM
    You have to define it’s size in the same file I think
    M.K.
    @mk-pmb
    oh, I thought LUA_FLASH_STORE is the size. I'll read again.
    Modestas Bunokas
    @KT819GM
    It is, I’m wrong, can’t check code now on phone
    M.K.
    @mk-pmb
    then at least thanks for verifying the option name. :-)
    Modestas Bunokas
    @KT819GM
    have you done erase before writing new FW?
    M.K.
    @mk-pmb
    nope, will try.
    M.K.
    @mk-pmb
    ran esptool.py erase_flash, re-uploaded firmware, still "LFS: 0x0". I hope it's the amount used then.
    the message is almost for sure from tools/update_buildinfo.sh ln 60, BUILDINFO_TO_STR(BUILDINFO_LFS), I wish someone would have used a more descriptive identifier there. gonna trace it and send a PR.
    Modestas Bunokas
    @KT819GM
    I’m getting LFS: 0x20000 after erase / write
    M.K.
    @mk-pmb
    oh. then at least I know it's the right place for my PR.
    Modestas Bunokas
    @KT819GM
    I’m using spiffs size of 0x40000 and lfs size of 0x20000, and behaviour looks okay for me with latest dev branch
    M.K.
    @mk-pmb
    oh maybe I forgot to activate spiffs
    btw śizes are in bytes, right?
    found "#define BUILD_SPIFFS", it's already active. would you mind sharing your config for comparison?
    Modestas Bunokas
    @KT819GM
    If I understand correctly, you have to leave free space for LFS. So you have to define limited size of spiffs which I think is not defined at your file
    #define SPIFFS_MAX_FILESYSTEM_SIZE 0x40000
    this is my config, which works with spiffs perfectly on latest dev branch
    M.K.
    @mk-pmb
    thanks! I'll try
    M.K.
    @mk-pmb
    nice! now it greets with "Formatting file system. Please wait..."
    Modestas Bunokas
    @KT819GM
    so after format fire node.restart()
    and check if LFS was fixed
    M.K.
    @mk-pmb
    I just hard-reset it after format
    but still LFS: 0x0
    same with .restart()
    Modestas Bunokas
    @KT819GM
    really strange, will recheck after I will get to one of my dev machines
    M.K.
    @mk-pmb
    thanks! if you're in the mood to try earlier, you could also clone my wifi-gpio repo, have it build the firmwares and I'll test them for you.
    Modestas Bunokas
    @KT819GM
    okay
    M.K.
    @mk-pmb
    now if that's not the picture book usecase for my github action builder, I wouldn't know what is. :)
    M.K.
    @mk-pmb
    oh I think I just copied a wrong size
    nah just inexplicable stupidity. probably too early in the morning still.