AXIOM Alpha

From apertus wiki
Revision as of 13:01, 26 September 2013 by Sebastian (talk | contribs)
Jump to: navigation, search

1 Developer Notes

1.1 Reading and Writing Sensor Register

This example script:

#!/bin/sh
cmv_reg() {
   addr=$(( 0x60000000 + ($1 * 4) ))
   [ $# -gt 1 ] && devmem $addr 32 $2
   devmem $addr 32
}
#change the registers 69/98/102/107/108/112 and 124                 
cmv_reg  69      2
cmv_reg  98  39705
cmv_reg 102   8312
cmv_reg 107   9814
cmv_reg 108  12381
cmv_reg 112      5
cmv_reg 124     15
#read the register 127
cmv_reg 127

basically the registers get mapped to 32bit spaces starting at a specific memory address (0x60000000 in this case), reading from that memory will show the register, writing to that memory will change it

so register '0' is at 0x60000000, register '1' at 0x60000004 ...


This example script reads the current bitdepth the sensor is running with:

get_bitdepth () {
	depth=$(( `cmv_reg 118` + 0 ))
	[ $depth -eq 0 ] && echo "12 bit mode"
	[ $depth -eq 1 ] && echo "10 bit mode"
	[ $depth -eq 2 ] && echo "8 bit mode"
}

1.1.1 statically linked busybox

http://vserver.13thfloor.at/Stuff/AXIOM/FAKE/

builtin fake devmem

all you need to get it to work is the following:

dd if=/dev/zero of=/tmp/mem bs=1k seek=4M count=1

this will create a sparse 4GB file /tmp/mem, which will be used by the fake devmem values written can be read back, non existing values return 0 /bin/sh and /sbin/devmem both link to busybox on the axiom alpha filesystem so both can be tested with this executeable