Clarification on specific firmware build instructions please #6518
Replies: 1 comment
-
Posted at 2021-04-21 by @gfwilliams Hi,
For STM32 it 'just happens' - for nRF52 you need to do
Yes, Chances are you did To run it locally, all you need is:
If that fails, chances are the
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
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:
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 Posted at 2021-04-21 by @fanoush as for VSCode it has handy WSL extension so you can edit files, use git/shell 'remotely' etc https://code.visualstudio.com/docs/remote/wsl-tutorial I guess there is similar/same remote extension for ssh. Did not try to debug or build directly with it but for editing and git it is quite nice. Posted at 2021-04-23 by Robin Thr 2021.04.22 Thank you @gfwilliams and @fanoush for the prompt response. More for Windows developers here:
Now having the knowledge on what I'm searching for, I found a nice detailed explanation:
Will have a busy weekend reviewing those steps and going over those links. Thankx . . . |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2021-04-21 by Robin
Tue 2021.04.20
Q1: Is there a specific switch that must be set in order to produce the .lst listing file? How, syntax, which file, etc. I'm looking in wrong folder maybe?
Q2: Explanation please on: 'now you can "run ./espruino" '
I'm not familiar with the "./" syntax and how to execute this step. Could this be a Unix, Make, source, .py, other toolchain command?
Tried from the terminal window within VSCode
I made the assumption this was Unix, but unable to search as the slash gets interpreted literally, but initial finds don't seem to support that:
Have been successful in building using VSCode and flashing using esptool.py as a separate step. Having much success flashing .ino files this way, has allowed me a two step process for Espruino builds, rather than using a VM as the GitHub README's suggest. I may live to regret doing it this way, and may learn it will be much faster as suggested, but for now I have a process that in mind, works.
I understand that I would need a main() function to do the following, but not sure where to place, how to call, so as to keep/allow the entire environment to run as if it were running Espruino waiting for JS instructions.
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?
Thanks for the ongoing help and suggestions and look forward to additional learning this weekend.
Beta Was this translation helpful? Give feedback.
All reactions