Skip to content

Compilation and simulation issue

Hi, I have two questions.

1.I'm using gcc-11 and Python 3.8 to compile this project, but I encountered the following error message (*1). It seems to be caused by the newer version of gcc because I can compile it successfully with gcc 9.3. I'm wondering if you have any plans to support newer versions of gcc.

2.I'm running the test_force.Default.ELF generated by gcc 9.3 on Spike, but I'm getting a "memory address is invalid" error. I would like to know if there is any way to fix this issue.

Access exception occurred while loading payload ./test_force.Default.ELF: Memory address 0x50000000 is invalid

(1) ../base/src/GenInstructionAgent.cc:394:21: error: loop variable ‘update’ creates a copy from type ‘const Force::RegUpdate’ [-Werror=range-loop-construct] 394 | for (auto const update : regUpdates) { | ^~~~~~ ../base/src/GenInstructionAgent.cc:394:21: note: use reference type to prevent copying 394 | for (auto const update : regUpdates) { | ^~~~~~ | & g++ -c -Wall -std=c++11 -gdwarf-3 -m64 -Werror -O2 -Weffc++ -fvisibility=hidden -D 'ARCH_ENUM_HEADER="EnumsRISCV.h"' -I./inc -I../base/inc -I../3rd_party/inc -I/usr/include/python3.8 -o make_area/obj/ImageIO.o ../base/src/ImageIO.cc In file included from ../base/src/ImageIO.cc:16: ../base/inc/ImageIO.h:39:38: error: ‘string’ in namespace ‘std’ does not name a type 39 | void PrintMemoryImage(const std::string& imageFile, const Memory memory); //!< write memory initial data to an image file. | ^~~~~~ ../base/inc/ImageIO.h:22:1: note: ‘std::string’ is defined in header ‘’; did you forget to ‘#include ’? 21 | #include "Defines.h" +++ |+#include 22 | ../base/src/ImageIO.cc:517:8: error: no declaration matches ‘void Force::ImageIO::PrintRegistersImage(const string&, const std::map<std::__cxx11::basic_string, long long unsigned int>&, const Force::RegisterFile*)’ 517 | void ImageIO::PrintRegistersImage(const string& imageFile, const map<string, uint64>& threadInfo, const RegisterFile* regFile) | ^~~~~~~ In file included from ../base/src/ImageIO.cc:16: ../base/inc/ImageIO.h:40:10: note: candidate is: ‘void Force::ImageIO::PrintRegistersImage(const int&, const int&, const Force::RegisterFile*)’ 40 | void PrintRegistersImage(const std::string& imageFile, const std::map<std::string, uint64>& threadInfo, const RegisterFile* regFile); //!< write registers initial value to an Text file. | ^~~~~~~~~~~~~~~~~~~ In file included from ../base/src/ImageIO.cc:16: ../base/inc/ImageIO.h:33:9: note: ‘class Force::ImageIO’ defined here 33 | class ImageIO { |