Development and Debugging - What do you use?

#1

While I’m very happy with Mongoose OS, I’m finding the development process is somewhat less productive than it could be. I’m using a text editor (Atom) to work on the code and then mos to build it. Building is slow, and sifting through the result to find errors in mos is difficult. Atom does not offer much help finding errors before I build. Something like Eclipse would be great, but I don’t think it’s available.

How do you all do your development?

Next challenge will be debugging. I’m about to have a prototype board fabbed and it will have a JTAG port. What’s your preferred environment for debugging?

Thanks, I appreciate your comments.

1 Like
#2

Hello @jim
I am using Ubuntu as dev platform
VSCode editor

  • supports mongoose-os via plugin
  • supports git\gdb\c++\js\json syntax

GIT

  • mongoose-os cloned as git -submodule

Build

  • custom script which sync-up mongoose-os-libs to appropriate versions & stores them in local folder
  • custom python script which invokes mos --local … with path to local mongoose-os & mongoose-os-libs folders
mos build --local --repo external/mongoose-os --libs-dir external/mongoose-os-libs --verbose

Debug

  • VSCode + GDB when build for Ubuntu to test common C code
1 Like
#3

I am having a pleasant expirience developing with VSCode + Mongoose OS extension -
https://mongoose-os.com/docs/mongoose-os/quickstart/ide.md

I also suggest having a look at this links if you are new to VSCode in general


#4

I have never used Visual Studio Code but if it’s my only option I can learn it.

Thanks! Installing now :slight_smile:

#5

I also found this:

https://medium.com/himinds/visual-studio-code-setup-for-esp32-and-mongoose-os-870158484c86

#6

Looking at the link above, it says:

In your folder .vscode you should find the c_cpp_properties.json, add the following:

[
  {
    "includePath": [
      "${workspaceFolder}/**",
      "/your path/git/mongoose-os/",
      "/your path/git/esp-idf/",
      "/your path/git/mjs/"
    ]
  }
]

On my Mac I can’t find a folder called .vscode and I can’t find c_cpp_properties.json file. Anyone know what this is talking about?

#7

.vscode is used to store project-wide configuration files, including extension and tasks configs.
To produce c_cpp_properties.json, you should try to configure C/C++ extension (you already have it installed, right?). To do that go to View -> Command Palette… and select C/C++:Edit Configurations (JSON). Issuing that command shall bring you to freshly created default .vscode/c_cpp_properties.json.

#8

Excellent thank you!

#9

Our team uses VS Code on Windows 10 to edit code, then we build it from the command line with the mos tool. I generally pipe the output to a text file which I can search for errors.

Builds for us take anywhere from 10 seconds to 20 minutes depending on how much of the system is being built, and whose computer is doing the build - in other words, it is fairly slow for us too.

Using a debugger would be nice; the first person on our team to work with it tried to get it running and his comment was “don’t bother trying because JTAG debugging on ESP32 doesn’t work well enough to be useful.” Maybe things are better or, if you are not using ESP32, maybe you won’t have any issues.

#10

Well I’m using an ESP32, maybe someday Expressif will improve the JTAG. I won’t know for a few months, by boards (with the JTAG interface) are being fabbed in China and that virus has everything backed up.