Open lrusak opened 6 years ago
Hello,
write_csr
is both used as macro (in encoding.h, line 198) and as function name (in dtm.cc, line 405), resulting in a compile error.
My solution (not a clever solution, though) is to comment the #include "encoding.h"
and add #define CSR_DSCRATCH 0x7b2
in dtm.cc. Since CSR_DSCRATCH is a constant needed in dtm.cc defined in encoding.h but including encoding.h will cause naming conflict.
i.e. in dtm.cc replace this
#include "dtm.h"
#include "debug_defines.h"
#include "encoding.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <pthread.h>
with this
#include "dtm.h"
#include "debug_defines.h"
// #include "encoding.h"
#define CSR_DSCRATCH 0x7b2
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <pthread.h>
Hope that there will be a bug fix soon!
Update 1: I put my compiling notes and a script to compile riscv-isa-sim in my repo. Hope it helps!
Any idea what this is about?
build log http://sprunge.us/LTBO