• Continue with the XTENSA assembler in ESP32forth

    From Marc Petremann@21:1/5 to All on Sun Nov 20 14:45:00 2022
    Let's continue exploring the resources of the XTENSA assembler. Mastery of the instruction set opens up interesting possibilities.
    https://esp32.arduino-forth.com/article/XTENSA_nextXtensaSteps

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Mon Nov 21 02:41:35 2022
    Maybe it would be possible to prepare also UF2 binary of ESP32forth?
    It would make the installation significantly easier.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Petremann@21:1/5 to All on Mon Nov 21 12:47:56 2022
    Le lundi 21 novembre 2022 à 11:41:37 UTC+1, Zbig a écrit :
    Maybe it would be possible to prepare also UF2 binary of ESP32forth?
    It would make the installation significantly easier.

    Here:

    https://esp32.arduino-forth.com/public/files/ESP32forthV7074.zip

    ZIP with binary files.....

    Instal instructions here:

    https://esp32.arduino-forth.com/article/installation_instalFromBinaries

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Mon Nov 21 13:09:22 2022
    Here:

    https://esp32.arduino-forth.com/public/files/ESP32forthV7074.zip

    ZIP with binary files.....

    Instal instructions here:

    https://esp32.arduino-forth.com/article/installation_instalFromBinaries

    The point was to make it easier, without any need for additional ST
    programmer, like this:

    „Instead of needing drivers or a separate program for flashing (say, bossac, jlink or avrdude), one can simply drag a file onto a removable drive. The format
    of the file is a little special. Due to 'operating system woes' you cannot just drag
    a binary or hex file (trust us, we tried it, it isn't cross-platform compatible). Instead,
    the format of the file has extra information to help the bootloader know where the
    data goes. The format is called UF2 (USB Flashing Format). Microsoft MakeCode generates UF2s for flashing and CircuitPython releases are also available as UF2.”
    ( https://learn.adafruit.com/adafruit-hallowing/uf2-bootloader-details )

    I didn't use such kind of files yet — but if the Mecrisp guys were
    able to prepare it for RP2040, then it must be feasible somehow.
    I'll try to „convert” your binaries.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From SpainHackForth@21:1/5 to Zbig on Tue Nov 22 07:30:31 2022
    On Monday, November 21, 2022 at 10:09:24 PM UTC+1, Zbig wrote:
    Here:

    https://esp32.arduino-forth.com/public/files/ESP32forthV7074.zip

    ZIP with binary files.....

    Instal instructions here:

    https://esp32.arduino-forth.com/article/installation_instalFromBinaries
    The point was to make it easier, without any need for additional ST programmer, like this:

    „Instead of needing drivers or a separate program for flashing (say, bossac,
    jlink or avrdude), one can simply drag a file onto a removable drive. The format
    of the file is a little special. Due to 'operating system woes' you cannot just drag
    a binary or hex file (trust us, we tried it, it isn't cross-platform compatible). Instead,
    the format of the file has extra information to help the bootloader know where the
    data goes. The format is called UF2 (USB Flashing Format). Microsoft MakeCode
    generates UF2s for flashing and CircuitPython releases are also available as UF2.”
    ( https://learn.adafruit.com/adafruit-hallowing/uf2-bootloader-details )

    I didn't use such kind of files yet — but if the Mecrisp guys were
    able to prepare it for RP2040, then it must be feasible somehow.
    I'll try to „convert” your binaries.
    I believe this is part of the bootloader not the firmware itself.... https://learn.adafruit.com/adafruit-metro-esp32-s2/install-uf2-bootloader

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Tue Nov 22 14:30:03 2022
    I didn't use such kind of files yet — but if the Mecrisp guys were
    able to prepare it for RP2040, then it must be feasible somehow.
    I'll try to „convert” your binaries.
    I believe this is part of the bootloader not the firmware itself.... https://learn.adafruit.com/adafruit-metro-esp32-s2/install-uf2-bootloader

    Well, the bootloader „cost” is about 20 kB. It may be somewhat „expensive”
    for board like STM32F103C8T6, that features 64 kB — but we can afford it
    in case of ESP32, since Flash size of these is counted in megabytes, so we
    can sacrifice that few kB just to work with this more comfortably.

    From what I can see transforming „raw binary” into UF2 file is a matter of adding properly kind of „header”, that will be used by the bootloader to place the binary's contents into proper location.
    Searching the details, how to do this.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jach Feng@21:1/5 to All on Tue Nov 22 17:20:23 2022
    Zbig 在 2022年11月21日 星期一下午6:41:37 [UTC+8] 的信中寫道:
    Maybe it would be possible to prepare also UF2 binary of ESP32forth?
    It would make the installation significantly easier.
    I don't think a bootloader will help in the situation where the board may come from different sources.
    1) How the user flash the chip at the first time?
    2) What if the bootloader was messed up sometime later?
    Unless it was embedded in the chip's ROM, it's not a reliable solution.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Petremann@21:1/5 to All on Wed Nov 23 01:15:56 2022
    Hello,
    You are getting out of the initial subject which concerns the XTENSA assembler for ESP32forth.
    I would appreciate it if you would stick to the original topic.

    Le mardi 22 novembre 2022 à 16:30:37 UTC+1, SpainHackForth a écrit :
    On Monday, November 21, 2022 at 10:09:24 PM UTC+1, Zbig wrote:
    Here:

    https://esp32.arduino-forth.com/public/files/ESP32forthV7074.zip

    ZIP with binary files.....

    Instal instructions here:

    https://esp32.arduino-forth.com/article/installation_instalFromBinaries
    The point was to make it easier, without any need for additional ST programmer, like this:

    „Instead of needing drivers or a separate program for flashing (say, bossac,
    jlink or avrdude), one can simply drag a file onto a removable drive. The format
    of the file is a little special. Due to 'operating system woes' you cannot just drag
    a binary or hex file (trust us, we tried it, it isn't cross-platform compatible). Instead,
    the format of the file has extra information to help the bootloader know where the
    data goes. The format is called UF2 (USB Flashing Format). Microsoft MakeCode
    generates UF2s for flashing and CircuitPython releases are also available as UF2.”
    ( https://learn.adafruit.com/adafruit-hallowing/uf2-bootloader-details )

    I didn't use such kind of files yet — but if the Mecrisp guys were
    able to prepare it for RP2040, then it must be feasible somehow.
    I'll try to „convert” your binaries.
    I believe this is part of the bootloader not the firmware itself.... https://learn.adafruit.com/adafruit-metro-esp32-s2/install-uf2-bootloader

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Wed Nov 23 01:43:47 2022
    Maybe it would be possible to prepare also UF2 binary of ESP32forth?
    It would make the installation significantly easier.
    I don't think a bootloader will help in the situation where the board may come from different sources.
    1) How the user flash the chip at the first time?

    Usually the boards come already flashed with some kind of
    bootloader (like Arduino). If not — it can be installed later
    anyway, for example: https://www.youtube.com/watch?v=wGbiT6IxGP0

    2) What if the bootloader was messed up sometime later?

    In such case most probably it can be installed again. :)

    Unless it was embedded in the chip's ROM, it's not a reliable solution.

    Why not? It works elsewhere else (Arduino, STM32 etc.) without
    embedding it in the chip's ROM.

    BTW: I'd like to point your attention to the fact, that XTENSA assembler
    for ESP32forth is very useful and interesting.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Zbig on Wed Nov 23 21:06:41 2022
    On 23/11/2022 8:43 pm, Zbig wrote:

    BTW: I'd like to point your attention to the fact, that XTENSA assembler
    for ESP32forth is very useful and interesting.

    Add-on assemblers for Forth and tutorials for same have been around forever. There's something special about this one?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Wed Nov 23 02:18:10 2022
    BTW: I'd like to point your attention to the fact, that XTENSA assembler for ESP32forth is very useful and interesting.
    Add-on assemblers for Forth and tutorials for same have been around forever. There's something special about this one?

    Well this one allows coding „primitive” words directly in ESP32forth. :)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Petremann@21:1/5 to All on Wed Nov 23 03:25:44 2022
    Le mercredi 23 novembre 2022 à 11:18:12 UTC+1, Zbig a écrit :
    BTW: I'd like to point your attention to the fact, that XTENSA assembler for ESP32forth is very useful and interesting.
    Add-on assemblers for Forth and tutorials for same have been around forever.
    There's something special about this one?
    Well this one allows coding „primitive” words directly in ESP32forth. :)

    You have many examples here:

    https://github.com/MPETREMANN11/ESP32forth/blob/main/assembler/myXtensaTests.txt

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From SpainHackForth@21:1/5 to dxforth on Wed Nov 23 03:44:31 2022
    On Wednesday, November 23, 2022 at 11:06:45 AM UTC+1, dxforth wrote:
    On 23/11/2022 8:43 pm, Zbig wrote:

    BTW: I'd like to point your attention to the fact, that XTENSA assembler for ESP32forth is very useful and interesting.
    Add-on assemblers for Forth and tutorials for same have been around forever. There's something special about this one?
    Well, if you know the history of the Xtensa platform, you would better understand that while it's not new to have a compiler and de-compiler in Forth, it is a great deal more effort to get it done on the XTENSA platform.
    uForth is moving in a direction that gives it portability beyond the ESP32 platform, and as Espressif moves to RiskV, it opens up the horizon even more...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to SpainHackForth on Thu Nov 24 12:03:07 2022
    On 23/11/2022 10:44 pm, SpainHackForth wrote:
    On Wednesday, November 23, 2022 at 11:06:45 AM UTC+1, dxforth wrote:
    On 23/11/2022 8:43 pm, Zbig wrote:

    BTW: I'd like to point your attention to the fact, that XTENSA assembler >>> for ESP32forth is very useful and interesting.
    Add-on assemblers for Forth and tutorials for same have been around forever. >> There's something special about this one?

    Well, if you know the history of the Xtensa platform, you would better understand that while it's not new to have a compiler and de-compiler in Forth, it is a great deal more effort to get it done on the XTENSA platform.

    Get what done? Coding in assembler and writing assemblers in Forth is nothing new.
    If ESP32Forth is lacking basic docs requiring someone else to delve in and document it,
    then I'm afraid that's nothing new either.

    uForth is moving in a direction that gives it portability beyond the ESP32 platform, and as Espressif moves to RiskV, it opens up the horizon even more...

    Projecting into the future is what Forth does best :)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Fri Nov 25 06:05:28 2022
    Well this one allows coding „primitive” words directly in ESP32forth. :)
    You have many examples here:

    https://github.com/MPETREMANN11/ESP32forth/blob/main/assembler/myXtensaTests.txt

    Thanks! I'll have to test them using „traditional” way of programming ESP32,
    since uploading by USB is perfectly possible, but apart of binary conversion there's a need for dedicated bootloader. So either some good soul prepared one for you — or there's a need to create that bootloader by oneself.
    There are bootloaders already available for ESP32-S2 and ESP32-S3 (here: https://github.com/adafruit/tinyuf2/releases ), but not for my ESP-WROOM-32 based dev board („yet”?), unfortunately.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)