Toolchain and IDE in container

Go To Last Post
9 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello fellow freaks!

 

After writing over my SSD with dd a little while back I started to plan how I could make it easier to manage my toolchain.

So a couple of days ago I started making a docker image running Arch Linux, AVR-GCC 7.2.0 and with Eclipse as IDE,

after lots of frustration I finally got it working with the X11 socket on my Debian host(s) mounted to the docker image.

So now I can just keep my workspaces on Google Drive, and start up the same IDE and toolchain on all my computers without

lots of work trying to keep things in order.

 

When I start Eclipse it opens up like any other software on my desktop, really nice, but also "kind of" unsafe since the docker image

has direct access to my X server and can read all the keys I type even outside of the IDE.

 

 

Is there anyone else using docker or other solutions for keeping toolchains intact?

VM's with toolchains?

Git?

 

I like the portability with solutions like this, really easy to share a pre-setup toolchain to someone else for example.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

canbeany1 wrote:
... or other solutions for keeping toolchains intact?

VM's with toolchains?

Vagrant plus a VM.

Vagrant

Introduction

https://www.vagrantup.com/intro/index.html

Introduction to Vagrant

Vagrant is a tool for building and managing virtual machine environments in a single workflow. With an easy-to-use workflow and focus on automation, Vagrant lowers development environment setup time, increases production parity, and makes the "works on my machine" excuse a relic of the past.

...

Vagrant

Vagrant vs. Docker

https://www.vagrantup.com/intro/vs/docker.html

https://app.vagrantup.com/boxes/search?utf8=%E2%9C%93&sort=downloads&provider=&q=Arch

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Image result for tow chain tools trunk

Log chain and other tools in a container.  Don't know about "IDE"; is that a name brand for containers?

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I don't use it for AVR (too trivial) but in day job I use docker a lot. Also using Eclipse as the IDE for the source and compilers/debuggers in the docker container.
.
My main gripe about docker containers are the size. I usually have 5 or 6 on my HDD for various projects (common source) and they each range between 10GB and 20GB so I'm always grubbing around for more space to make room for the next one!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
My main gripe about docker containers are the size.
Does Docker have dynamic storage sizing?

Apparently VirtualBox does.

Vagrant

Creating a Base Box

https://www.vagrantup.com/docs/boxes/base.html

https://www.vagrantup.com/docs/boxes/base.html#disk-space

Disk Space

...

For example, in VirtualBox, you should create a dynamically resizing drive with a large maximum size. This causes the actual footprint of the drive to be small initially, but to dynamically grow towards the max size as disk space is needed, providing the most flexibility for the end user.

...

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The docker containers don't generally change size. They are just ensuring that all 200..300 engineers have identical OS, identical compilers, identical binutils, identical code analysis tools and so on. So we all build (and test!) identical binaries. But all temporaries and outputs are outside the container. Docker is just there to ensure 100% identical build environments.
.
That's why I wondered about its role for AVR where there's seldom more than one engineer so no need for duplicated build environments

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
That's why I wondered about its role for AVR where there's seldom more than one engineer so no need for duplicated build environments
If the AVR's running an RTOS then maybe it's one task per designer in a small team.

More likely for AVR are :

  • configuration control (known functional Windows 10 builds, Atmel Studio incompatible with Visual Studio)
  • Linux and macOS

 


[TUT][SOFT][CODE]FreeRTOS for ATmega2560/1

by stu_san

https://www.avrfreaks.net/forum/tutsoftcodefreertos-atmega25601

Once again: Debugging with GDB

by JohanEkdahl

https://www.avrfreaks.net/forum/once-again-debugging-gdb

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You might as well just push the compiler/binutils into revision control.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
I don't use it for AVR (too trivial) but in day job I use docker a lot. Also using Eclipse as the IDE for the source and compilers/debuggers in the docker container. . My main gripe about docker containers are the size. I usually have 5 or 6 on my HDD for various projects (common source) and they each range between 10GB and 20GB so I'm always grubbing around for more space to make room for the next one!

 

I switch a lot between several computers, so having an image with extra µC's already added from device packs saves me the work from keeping everything synchronized after I first make the image.

I can just close the project on my workstation and open it right after on my laptop, and see the exact same window, with the same file open.

The reason I made it was because I am planning to start thinkering with ARM's though, and wanted some practice making docker images.

 

You must have big toolchains and lots of dependencies in your images for them to grow that large right? The one I use for AVR is only 2.09GB, from a 686MB base image.

I don't expect the ARM one to be much bigger than the AVR, but then again it is only GNU ARM, Eclipse, debugger + some plugins.

 

Do you run the GDB server on the host and connect to it from inside the container, or do you connect the debugger to the docker container?