-2

I start a new project of a C++ application working on a BeagleBone Black (UbuntuĀ 14.04 (Trusty Tahr), ARM v7), but in the future I will do to port the application to Linux or Windows.

I want to set up a development environment who can be cross platform (especially for macOS)

For now, I use:

  • Visual Studio Code: I like this editor, and it is crossplatform.
  • CMake: I'm new to it, but I want to learn.
  • Docker with following things: I'm also new to Docker
    • arm-linux-gnueabihf-g++-4.8 as compiler
    • Libraries: like Poco

The goal is to build my application with my Docker image, transfer the binary on my BeagleBone Black and debug on target from my macOS Visual Studio Code instance.

Also, I try to install Visual Studio Code on my Docker image, but it's a little sluggish, and my keyboard doesn't work correctly.

I'm open to change my development setup, and I don't know the best practice.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
Martin
  • 31
  • 5

1 Answers1

0

Finally I use a "workaround" with Visual Studio Code tasks

{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "0.1.0",
    "showOutput": "always",
    "runner": "terminal",
    "command": "bash",
    "args": [
        "-c"
    ],
    "isShellCommand": true,
    "tasks": [
        {
            "taskName": "docker-cmake-configure",
            "suppressTaskName": true,
            "args": [
                "docker exec -it ${config:custom.docker.defaultName} cmake --no-warn-unused-cli -DCMAKE_C_COMPILER:FILEPATH=/usr/bin/arm-linux-gnueabihf-gcc-4.8 -DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/arm-linux-gnueabihf-g++-4.8 -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug -H/home/developer/project -B/home/developer/project/build"
            ]
        },
        {
            "taskName": "docker-cmake-build",
            "suppressTaskName": true,
            "isBuildCommand": true,
            "args": [
                "docker exec -it ${config:custom.docker.defaultName} cmake --build /home/developer/project/build --config Debug -- -j 6"
            ]
        }
    ]
}

Maybe when this issue will be solved, I can use a more integrated solution: https://github.com/vector-of-bool/vscode-cmake-tools/issues/111

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
Martin
  • 31
  • 5