by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Kiran Shila
    @kiranshila
    ClojureScript is an incredible language, and having it work on an embedded system is simply phenomenal
    We just need to flash haha
    Mike gave a talk at clojure/north this year showing off Espruino+ClojureScript on the ESP32, you should check it out if you have not yet: https://www.youtube.com/watch?v=u1jr4v7dhoo&feature=youtu.be
    Here is the gist on what he did to set it up https://gist.github.com/mfikes/5ed90e461229161ba9197461af888107
    And here is his project page https://github.com/mfikes/esprit
    Kiran Shila
    @kiranshila
    But as his gist said, he had to modify the partition table and bump up the number of JsVars.However, I have been unable to get this to work on the recent releases.
    Mark Becker
    @MaBecker
    Well, this file explains what to do, how fare did you get with this?
    Kiran Shila
    @kiranshila
    So the normal partition table is slightly different now as factory and ota_0 were bumped up in size. Without changing the flash size, I tried to reduce storage to 65k and bumped up js_code. Then I just did the exact same thing he did. It built successfully and flashed, and verified that I did in fact increase the js_code size. The problem came from not being able to flash our "binary" of the cljs std lib.
    Mike wrote a library to create the bin that we flash to that js_code space, but Espruino is now rejecting it, saying it is corrupt while it works fine on the older release
    Mark Becker
    @MaBecker
    there are three changes named: partable, vars in board file and vars in targets/esp32/main.c
    Kiran Shila
    @kiranshila
    Yep those are the lines that I changed
    And here I have the new partition table I tried
    #Name,Type,SubType,Offset,Size
    #boot,data,0,0x1000,4K
    #reserved,0,0,0x2000,24K
    #partition,data,0,0x8000,4K
    nvs,data,nvs,0x9000,12K
    otadata,data,ota,0xC000,8K
    free,data,0x40,0xE000,8K
    factory,app,factory,0x10000,1536K
    ota_0,app,ota_0,0x190000,1536K
    flash,data,0x40,0x310000,64K
    js_code,data,0,0x320000,832K
    storage,data,0,0x3F0000,64K
    Kiran Shila
    @kiranshila
    Ahhhh wait a sec I think I figured it out
    Yeah, I thought 832k would be enough - it's not
    Mark Becker
    @MaBecker
    +js_code,data,0,0x2C0000,1024K
    +storage,data,0,0x3C0000,256K
    Kiran Shila
    @kiranshila
    Our main.js is 879.714K
    Yeah ok so we need 1M, but I didn't know what of those partitions was safe to take space away from

    +js_code,data,0,0x2C0000,1024K
    +storage,data,0,0x3C0000,256K

    Right so you'll notice the addrs of those partitions have changed

    Mark Becker
    @MaBecker
    mom
    Mark Becker
    @MaBecker
    firmware was growing
    Kiran Shila
    @kiranshila
    Right, so I assume we need that 1536K instead of the 1344K
    As in, the size of the interpreter for the ESP32 grew
    Mark Becker
    @MaBecker
    yep
    Kiran Shila
    @kiranshila
    Is the ota_0 partition even being used on the ESP32? I thought I read somewhere OTA firmware updates don't work
    *on the ESP32
    Mark Becker
    @MaBecker
    There is no fota implemented jet, but who knows
    just created a pr to sync partitions_espruino.csv
    Kiran Shila
    @kiranshila
    Why is the partition table in two places? Is The firmware built with the one from EspruinoBuildTools or from Espruino?
    Mark Becker
    @MaBecker
    Well, this folder is not use for build, it's just for info https://github.com/espruino/Espruino/tree/master/targets/esp32/Changes_V3.1
    Kiran Shila
    @kiranshila
    Oh gotchya
    I wonder if it would work if I remove the ota partition
    Mark Becker
    @MaBecker
    so as you stumbled over it, I thought it's time to update it.
    Kiran Shila
    @kiranshila
    Yeah of course
    Like I said, the real solution is to utilize all of the RAM, 8M in my case, versus the 4M allocated here
    Mark Becker
    @MaBecker
    the .csv is used to build the .bin file and that one is flashed
    Kiran Shila
    @kiranshila
    The one from EspruinoBuildTools?
    Mark Becker
    @MaBecker
    yep
    Kiran Shila
    @kiranshila
    Ok yeah that's what I thought
    Mark Becker
    @MaBecker
    As far as I can see Mike was using a Espruino before the partition was changed
    So it looks like Mike is using Espruino without contributing to the ESP32 firmware, hope he donated to Gordon
    Mark Becker
    @MaBecker
    @kiranshila did you managed to flash the firmware?
    Kiran Shila
    @kiranshila
    Using my modified partition table or the stock firmware?

    So it looks like Mike is using Espruino without contributing to the ESP32 firmware, hope he donated to Gordon

    Can't speak for him, but I'll donate. This is a pretty neat project and it would be even better if it ran ClojureScript :)

    Kiran Shila
    @kiranshila
    @MaBecker Is the bootloader.bin the normal bootloader from esp-idf or has it been customized for Espruino - I can't quite tell reading the makefiles