RA-MPS VM StudentVersion issueshttps://code.fbi.h-da.de/vm/sv/-/issues2021-02-01T14:32:20Zhttps://code.fbi.h-da.de/vm/sv/-/issues/8Additional Programs2021-02-01T14:32:20ZDaniel MüllerAdditional Programs# Actually helpful stuff
- [ ] Screenshot tool `xfce4-screenshooter`
# Cool stuff
- [ ] `exa` as `ls` _replacement_ (https://github.com/ogham/exa)
- [ ] `zoxide` as a better `cd` (https://github.com/ajeetdsouza/zoxide)
- [ ] `tealdee...# Actually helpful stuff
- [ ] Screenshot tool `xfce4-screenshooter`
# Cool stuff
- [ ] `exa` as `ls` _replacement_ (https://github.com/ogham/exa)
- [ ] `zoxide` as a better `cd` (https://github.com/ajeetdsouza/zoxide)
- [ ] `tealdeer` as TLDR implementation (short examples for programs) (https://github.com/dbrgn/tealdeer)
- [ ] `bat` as `cat` _replacement_ (https://github.com/sharkdp/bat)https://code.fbi.h-da.de/vm/sv/-/issues/7Disable USB 2.0 Adapter in VM config2020-12-27T16:10:35ZDaniel MüllerDisable USB 2.0 Adapter in VM configThe VM uses USB 2.0 adapers which is apparently no supported by default on all VirtualBox installations.
Error message:
```
Implementation of the USB 2.0 controller not found!
Because the USB 2.0 controller state is part of the saved ...The VM uses USB 2.0 adapers which is apparently no supported by default on all VirtualBox installations.
Error message:
```
Implementation of the USB 2.0 controller not found!
Because the USB 2.0 controller state is part of the saved VM state, the VM cannot be started. To fix this problem, either install the 'Oracle VM VirtualBox Extension Pack' or disable USB 2.0 support in the VM settings.
Note! This error could also mean that an incompatible version of the 'Oracle VM VirtualBox Extension Pack' is installed (VERR_NOT_FOUND).
```
Workarounds:
- Install the 'Oracle VM VirtualBox Extension Pack' in VirtualBox to get support for USB 2.0 and 3.0 support
- Change the adapter from USB 2.0 to something lower
- Disable the USB adapter completely
Possible fixes:
- Mention the Extension Pack as required in the documentation and provide steps for workarounds
- Downgrade the USB adapter in the deployed VM imagehttps://code.fbi.h-da.de/vm/sv/-/issues/5Investigate use of default debian arm compiler instead of provided mpstools t...2020-12-27T16:10:51ZDaniel MüllerInvestigate use of default debian arm compiler instead of provided mpstools toolchainIn the Debian 10 repository there is the `gcc-arm-none-eabi` package which provides a gcc crosscompiler for arm (gcc version 7.3.1 instead of 4.4.5 from mpstools).
The first problem occours with the `arm-elf-insight` debugger which thro...In the Debian 10 repository there is the `gcc-arm-none-eabi` package which provides a gcc crosscompiler for arm (gcc version 7.3.1 instead of 4.4.5 from mpstools).
The first problem occours with the `arm-elf-insight` debugger which throws the following error:
```
Error loading "prog.elf":
wrong version in compilation unit header (is 4, should be 2) [in module prog.elf]
```
This refers to the [DWARF](https://en.wikipedia.org/wiki/DWARF) version for the included debug information in the executable. This should only be in issue if this particular version of the insight debugger is used. Nevertheless this can be fixed by [specifying the DWARF version](https://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html) that `gcc` should use. To use version 2, `-gdwarf-2` must be added to the compiler calls.
The next problem is that the `ligcc.a` provided by mpstools is somehow incompatible since it has EABI version set to 0 (which means undefined?) while the compiled c code is on EABI version 5. This problem can be solved by using the `libgcc.a` provided by the default compiler which is located at `/usr/lib/gcc/arm-none-eabi/{version}/libgcc.a`.
At this point everything works in the insight debugger but it most likely would not work on the real hardware. It is pretty safe to assume the mpstools toolchain was either compiled especially to target the AT91M63200, or it was used because the configuration is close enough. This special configuration at compiletime results in certain default parameters so that everything works with no need for special parameters when compiling. However all those parameters can be just set in the makefile for the default toolchain. The default parameters of the mpstools gcc can be inspected using `arm-elf-gcc -Q -v` and `arm-elf-gcc -Q --help=target`. The same needs to be done with the default gcc to see if there are any problematic defaults active.
Important options in the mpstools gcc:
- `-mabi=`
- `-march=armv4t`
- `-mcpu=`
- `-mfloatabi=soft`
- `-mlittle-endian=[enabled]`
- `-mtune=arm7tdmi`
For some reason, abi and cpu are not set which seems strange.
Important options in the default gcc:
- `-mabi=aapcs`
- `-march=armv2`
- `-mcpu=[default]`
- `-mfloatabi=soft`
- `-mlittle-endian=[enabled]`
- `-mtune=[default]`
This is not testes on the hardware, but the following options should result in a binary executable that runs on the AT91M63200: `-gdwarf-2 -march=armv4t -mtune=arm7tdmi` and maybe optionally `-mcpu=arm7tdmi`
The rest of the options are either the same or are likely to be irrelevant.
The command `arm-none-eabi-gcc --help-target` shows some of the possible values for the options.