The main idea is to have two containers:
- Development container with the cross-compilation toolchain on a native architecture where the code is developed
- Target container with the target architecture where the code will be executed
- [Optionally] A third container which already includes the compiled code of the project - this is generally not used for iteration during development but for deployment.
- Open vscode in the development container:
- Ctrl+Shift+P -> Remote-Containers: Open Folder in Container -> Select the folder where the project is located or
- Open the project in vscode and click on the bottom left corner on the green icon and select "Reopen in Container"
- Select the target IP in the prompt
- Develop the code (in this example change the main.cpp file)
- Launch the code with [TODO - finish]