• Hi,

    Q1: Is there a specific switch that must be set in order to produce the .lst listing file?

    For STM32 it 'just happens' - for nRF52 you need to do ... make lst. Code listings when building natively (eg to run on your PC) aren't supported - but chances are you're not wanting to trawl through x86-64 assembly code so I doubt this is a big deal?

    Q2: Explanation please on: 'now you can "run ./espruino" '

    Yes, ./command is the Unix syntax for 'run the command in the current directory'.

    Chances are you did BOARD=... RELEASE=1 make which built Espruino for that board, not to run on your local PC - so there was no 'espruino' executable.

    To run it locally, all you need is:

    make clean
    make
    ./espruino
    

    If that fails, chances are the make step produced some errors?

    Have been successful in building using VSCode and flashing using esptool.py as a separate step. ... I may live to regret doing it this way

    Yes, probably! I'm not sure what VSCode does, but on Windows 10 it is very easy: https://github.com/espruino/Espruino/blob/master/README_Building.md#under-windows

    You just install WSL (which you may already have now): https://docs.microsoft.com/en-gb/windows/wsl/install-win10

    Then follow the instructions for Linux: https://github.com/espruino/Espruino/blob/master/README_Building.md#under-linux-recommended

    And it should work out of the box

    Q3: As the GitHub source is all .c/.cpp is there a way to start and run my functions and wrappers from within VSCode to make use of breakpoints and the debugger there, without having to flash and call from the WebIDE? Is there a demo or test functions available?

    So you want to compile and run Espruino on your PC and debug the functions there? That should be totally fine.

    On linux (or WSL), you'd be doing something like:

    make clean
    DEBUG=1 make
    gdb ./espruino
    

    I don't use VSCode so I don't know what you need to do to debug there, but I imagine if you googled something like "debug Makefile projects in VSCode" it might work ok

About

Avatar for Gordon @Gordon started