Docker image that can be used to create a container with vbcc, vasm and vlink build tools.
1.6K
Multi platform, multi target compiler, assembler and linker.
Dockerfile to build a Linux based image that can create containers for the purpose of providing build tools to cross compile on an 'x86' based host that target multiple platforms.
The following table shows the base build tools:
| Name | Description |
|---|---|
| vbcc | Portable ISO C compiler |
| vasm | Portable and retargetable assembler |
| vlink | Versatile linker |
| Tool | Target | Syntax | Description |
|---|---|---|---|
| vasm6502_madmac | 6502 | madmac | Motorola 6502 CPU |
| vasm6502_oldstyle | 6502 | oldstyle | Motorola 6502 CPU |
| vasm6502_std | 6502 | std | Motorola 6502 CPU |
| vasm6800_oldstyle | 6800 | oldstyle | Motorola 6800 CPU |
| vasm6800_std | 6800 | std | Motorola 6800 CPU |
| vasm6809_oldstyle | 6809 | oldstyle | Motorola 6809 CPU |
| vasm6809_std | 6808 | std | Motorola 6808 CPU |
| vasmarm_std | arm | std | ARM CPU |
| vasmc16x_std | C16x | std | Infineon C16x microcontroller |
| vasmjagrisc_madmac | risc | madmac | Jaguuar RISC CPU |
| vasmjagrisc_std | risc | std | Jaguuar RISC CPU |
| vasmm68k_madmac | 68000 | madmac | Motorola 68000 CPU |
| vasmm68k_mot | 68000 | motorola | Motorola 68000 CPU |
| vasmm68k_std | 68000 | std | Motorola 68000 CPU |
| vasmpdp11_std | pdp11 | std | PDP-11 CPU |
| vasmppc_std | ppc | std | Power PC CPU |
| vasmqnice_std | qnice | std | QNICE CPU |
| vasmtr3200_oldstyle | tr3200 | oldstyle | TR3200 RISC CPU |
| vasmtr3200_std | tr3200 | std | TR3200 RISC CPU |
| vasmvidcore_std | vidcore | std | VidCore CPU |
| vasmx86_std | x86 | std | Intel x86 series CPU |
| vasmz80_oldstyle | z80 | oldstyle | Zilog Z80 CPU |
| vasmz80_std | z80 | std | Zilog Z80 CPU |
| Tool | Target | Description |
|---|---|---|
| vbcc6502 | 6502 | Motorola 6502 CPU |
| vbcc832 | ||
| vbccalpha | alpha | |
| vbccc16x | c16x | C16x microcontroller |
| vbcchc12 | ||
| vbcci386 | i386 | Intel i386 CPU |
| vbccm68k | 68000 | Motorola 68000 CPU |
| vbccm68ks | 68000 | Motorola 68000 CPU |
| vbccppc | ppc | Power PC CPU |
| vbccqnice | qnice | QNICE CPU |
| vbccvidcore | vidcore | VidCore CPU |
| vbccz |
| Tool | Target | Description |
|---|---|---|
| vlink | multiple | Linker for multiple targets |
The Docker image uses 2 stages. The first stage is based on an alpine linux image and is used to download and extract the vbcc and vasm binaries.
The second stage is based on an alpine linux image with glibc. The 'make' program is installed and some environment variables are set. The binaries are copied from the first stage to the second stage and /home/dev/project is set as the working directory. Finally 'make' is set as the command to run when the container is started.
The container can be used to build the project from the local computer in a couple of ways. The container can be run interactively and build commands can be entered in the cli. The preferred method is to run the container as part of a build process from the local computer project directory.
The following is an example of a project directory structure:
project
├── inc
├── obj
├── out
├── src
└── Makefile
From the local computer shell, inside the project folder a 'docker run' command can be issued to automatically build the project. The command can be entered manually or automatically from an IDE as part of a build task or process.
Depending on the host OS and shell being used, the command to run the container will differ slightly. The commands that follow will map a local project folder into the container at /home/dev/project and automatically run 'make' using the Makefile within the project folder.
| Shell | Command |
|---|---|
| PowerShell | docker run --rm -v ${PWD}:/home/dev/project gkbmdz/vbcc:latest |
| cmd.exe | docker run --rm -v %CD%:/home/dev/project gkbmdz/vbcc:latest |
| Shell | Command |
|---|---|
| bash | docker run --rm -v $(pwd):/home/dev/project gkbmdz/vbcc:latest |
Content type
Image
Digest
sha256:f4dae755d…
Size
41.1 MB
Last updated
almost 4 years ago
docker pull gkbmdz/vbcc