1
0
mirror of https://github.com/aolofsson/oh.git synced 2025-01-30 02:32:53 +08:00
Ola Jeppsson 31ffb41247 Add kernel mailbox interface test
Kernel code here, will be included in official 'parallella-linux'
when API:s have stabilized...
https://github.com/olajep/parallella-linux/tree/wip-mailbox

```
Testing blocking wait with interrupts
i: 00 from: 0x00000000 data: 0x00000000
i: 01 from: 0x00000000 data: 0x00000001
i: 02 from: 0x00000000 data: 0x00000002
i: 03 from: 0x00000000 data: 0x00000003
i: 04 from: 0x00000000 data: 0x00000004
i: 05 from: 0x00000000 data: 0x00000005
i: 06 from: 0x00000000 data: 0x00000006
i: 07 from: 0x00000000 data: 0x00000007
i: 08 from: 0x00000000 data: 0x00000008
i: 09 from: 0x00000000 data: 0x00000009
i: 10 from: 0x00000000 data: 0x0000000a
i: 11 from: 0x00000000 data: 0x0000000b
i: 12 from: 0x00000000 data: 0x0000000c
i: 13 from: 0x00000000 data: 0x0000000d
i: 14 from: 0x00000000 data: 0x0000000e
i: 15 from: 0x00000000 data: 0x0000000f

Reading 1000000 messages
received: 1000000       errors: 0       time: 11.65s    rate: 85808
msgs/s
```

Signed-off-by: Ola Jeppsson <ola@adapteva.com>
2016-01-21 16:31:55 +00:00

34 lines
665 B
Bash
Executable File

#!/bin/bash
set -e
ESDK=${EPIPHANY_HOME}
ELIBS="-L ${ESDK}/tools/host/lib"
EINCS="-I ${ESDK}/tools/host/include"
ELDF=${ESDK}/bsps/current/internal.ldf
# Create the binaries directory
mkdir -p bin/
if [ -z "${CROSS_COMPILE+xxx}" ]; then
case $(uname -p) in
arm*)
# Use native arm compiler (no cross prefix)
CROSS_COMPILE=
;;
*)
# Use cross compiler
CROSS_COMPILE="arm-linux-gnueabihf-"
;;
esac
fi
# Build HOST side application
${CROSS_COMPILE}gcc src/main.c -g -o bin/main.elf ${EINCS} ${ELIBS} -le-hal -le-loader -lpthread
# Build DEVICE side program
OPT=3
e-gcc -funroll-loops -g -T ${ELDF} -O${OPT} src/emain.c -o bin/emain.elf -le-lib