Hi Alex, Have you read through part 2 of Learning gem5? http://www.gem5.org/documentation/learning_gem5/part2/environment/
That might help this confusion. It sounds like you added the SimObject() call to the wrong Sconscript file. You have to add it to the file in the same directory. Also, your files should go in src/mem, not build/X86/mem. All files must go in src/ that you want to be compiled. The build directory is auto-generated when running scons. Cheers, Jason On Thu, May 7, 2020 at 8:19 AM Alex Freij via gem5-users < gem5-users@gem5.org> wrote: > Hi Francisco, > > Thanks for the quick reply! Yes I did; the .cc/.hh files are present and > are in the same directory. I've also realized something else: the file I'm > creating should reside in X86/mem/ (since that's where the .cc/.hh files > reside and the SConscript in that directory was updated), while SCons is > failing and stating that the file can't be found in the X86/sim directory. > > - Alex > > On Thu, May 7, 2020 at 11:04 AM Francisco Carlos via gem5-users < > gem5-users@gem5.org> wrote: > >> Did you create myFile.cc? myFile.cc should be in the same directory of >> the Sconscript that you added because you used the path 'myFile.cc' to the >> file. >> >> I hope this helps. >> >> >> ---------------------------------------------------------------------------------------------------------------------------------------------- >> Francisco Carlos Silva Junior >> Phd Student >> >> ------------------------------ >> *De:* Alex Freij via gem5-users <gem5-users@gem5.org> >> *Enviado:* quinta-feira, 7 de maio de 2020 11:31 >> *Para:* gem5-users@gem5.org <gem5-users@gem5.org> >> *Cc:* Alex Freij <atfr...@ncsu.edu> >> *Assunto:* [gem5-users] Adding new source files >> >> Hi all, >> >> I'm trying to understand how to add source files to the gem5 project >> without the need to create a SimObject. I've added `Source('myFile.cc')` >> into the respective SConscript file, but when I try to build I get this >> message: >> >> scons: *** [build/X86/sim/myFile.o] Source `build/X86/sim/myFile.cc' not >> found, needed by target `build/X86/sim/myFile.o'. >> scons: building terminated because of errors. >> >> This is a very rookie question, but guidance would be appreciated! >> >> - Alex >> _______________________________________________ >> gem5-users mailing list -- gem5-users@gem5.org >> To unsubscribe send an email to gem5-users-le...@gem5.org >> %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s > > _______________________________________________ > gem5-users mailing list -- gem5-users@gem5.org > To unsubscribe send an email to gem5-users-le...@gem5.org > %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
_______________________________________________ gem5-users mailing list -- gem5-users@gem5.org To unsubscribe send an email to gem5-users-le...@gem5.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s