Posts: 65
Joined: Sat Jul 07, 2012 11:21 pm
Location: Zero Page

Re: Bare Metal VideoCore

Wed Aug 22, 2012 10:35 pm

jamesh wrote:
DexOS wrote:
jamesh wrote: So at the end of the day, you have the ability to write machine code (unless you also write an assembler),
There's no need to write a assembler, they could just write a add on to fasm like they did for fasmarm, as its designed to be module.
Just out of interest can it cope with mixed vector/scaler code? I'm thinking it probably can.
If you think through the constraints, fasmarm is a weak choice for a number of reasons. Writing a simple macro assembler is a couple of hours work in the right language. Weigh that up against unraveling an unknown instruction set and bit encodings. The uart and flasher samples were posted with a tiny assembler over a month ago (only using scalar). I have a separate tool now, which I'd prefer not to release - because someone is working on binutils which is a much better choice for the ecosystem.

Mixing vector/scalar is ok. The vector instructions just have to accept the register slice addressing (eg. H(32, 16++) and the modifiers, then choose between the compact and long form of the packing.

The QPU is treated separately as its essentially completely unrelated and the use cases are different. I'm working loosely off a 3-slot "VLIW" form:
<add-or-logic-alu-slot> <sep> <mul-alu-slot> [<sep> <control-slot>]

Posts: 1
Joined: Thu Aug 23, 2012 11:15 pm

Re: Bare Metal VideoCore

Fri Aug 24, 2012 12:39 am

If anyone's interested, I wrote a disassembler that also handles the ELF structure, including branch relocations/symbols:


It's C# (monodevelop 3.0/.Net 4) - I just used that since it's most familiar to me (it's actually based on an ARM disassembler I wrote a while ago). I'm not sure if something like binutils/objdump might be better, unfortunately I don't have a Linux dev environment set up right now. It doesn't use anything fancy, just standard .Net System functions, so hopefully it should run under Mono on other systems. If anyone wants to re-write/improve it, please do so! It's also kind of hacked together and not the most readable code, sorry. :(

It's based on hermanhermitage's original javascript version.To use it, just build the project, and copy the following files from the bin directory to wherever you want to run it:
- vcelfdis.exe
- NCalc.dll
- videocoreiv.arch
Then run:
vcelfdis.exe FILE >FILE.asm

I'm doing some experimenting with the vector instruction decoding (see the included version of videocoreiv.arch) but haven't gotten all that far, so I decided to release this in case anyone else finds it useful.

Posts: 4
Joined: Wed Jul 18, 2012 2:39 am

Re: Bare Metal VideoCore

Fri Aug 24, 2012 2:09 am

jamesh wrote:People do need to be aware of DMCA if they are in the State's though
Luckily no one on the project is subjected to such an act.

Return to “Bare metal, Assembly language”