mirror of
https://github.com/aolofsson/oh.git
synced 2025-02-07 06:44:09 +08:00
Add test for writes to same address. Apparently consecutive 64-bit writes to the same address can turn into burst writes. From: https://github.com/parallella/oh/issues/37 Andreas: > Remembered that we have a long forgotten mode in the epiphany chip elink > (not impemented in the fpga elink) that creates bursts when you write > doubles to the same address. (F**K!) > So the writes were likely coming in as bursts. > Looks like the mailbox works fine when you write in "int"s (I tested it on > the board with consecutive) > (see "mailbox_test" in elink/sw0) Signed-off-by: Ola Jeppsson <ola@adapteva.com>
34 lines
662 B
Bash
Executable File
34 lines
662 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 -g -T ${ELDF} -O${OPT} src/emain.c src/etest.S -o bin/emain.elf -le-lib
|
|
|
|
|