Skip to content

PiyushRamuka/coremark_lm32

 
 

Repository files navigation

These are the Milkmist/LM32 specific files to run the Coremark V1.0 benchmark on the Milkymist One.

Note the minimal git branch has fewer dependencies on the Milkymist libraries.

A working LM32 toolchain, Clang/LLVM, and qemu is needed to build and run Coremark on the Milkymist. See the Milymist wiki for directions on building and installing these tools:  
LM32 GNU toolchain: http://milkymist.org/wiki/index.php?title=RTEMS_build_instructions
clang/llvm: https://github.com/milkymist/llvm-lm32
compiler_rt: https://github.com/jpbonn/compiler-rt-lm32
newlib/libgloss: https://github.com/jpbonn/Newlib-build-scripts
qemu: http://www.qemu.org/ (alternatively http://github.com/mwalle/qemu)

Download the Coremark benchmark from http://coremark.org/home.php and extract the files.

Clone the LM32 Coremark files into a subdirectory of the coremark files:
# cd coremark_v1.0
# git clone git@github.com:jpbonn/coremark_lm32.git 

Edit coremark_lm32/core_portme.mak and edit the following variables to point to the appropriate directories:
MMDIR
COMPILERRT_DIR
NEWLIB_DIR
LIBGLOSS_DIR

If you rename the coremark_lm32 directory you'll need to edit the linker.ld linker script in coremark_lm32/linker.ld.

Build LM32 Coremark:
# make XCFLAGS="-DTOTAL_DATA_SIZE=6000" PORT_DIR=coremark_lm32

To run on the Milkymist One hardware:
- In one terminal
# flterm --port /dev/ttyUSB0 --kernel coremark.bin --gdb-passthrough
- In second terminal
# lm32-rtems4.11-gdb coremark.out
(gdb) set remote interrupt-on-connect on
Press middle button then quickly enter:
(gdb) target remote <pseudo terminal printed by flterm>
Remote debugging using /dev/pts/5
0x00860650 in ?? ()
(gdb) load
(gdb) set $PC=_mystart
(gdb) c


To run on QEMU simulator:
# qemu-system-lm32 -M milkymist -kernel coremark.bin -nographic

About

Target specific files for running Coremark V1.0 on the Milkymist One

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published