-
Notifications
You must be signed in to change notification settings - Fork 100
en test how to compile and run your program
Susumu Mashimo edited this page May 7, 2020
·
8 revisions
- See Development Environment and setup the development environment for
Software simulation
. - See Environment Variables and setup the environment variables for
Software simulation
. - Go to $RSD_ROOT/Processor/Src.
- Make sure RSD is correctly compiled by
make -f Makefile.verilator.mk
.
- Note that the YourTest directory must be in Verification/TestCode/C.
- Note that RSD does not support printf at this time.
- See Verification/TestCode/C/HelloWorld/code.c to learn how RSD currently outputs characters.
3. Modify Verification/TestCode/C/YourTest/serial.ref.txt so that this file has the expected output of your test code.
4. If you add any source code file except for code.c, add them in the SRCS variable in Verification/TestCode/C/YourTest/Makefile.
cd Verification/TestCode/C/YourTest
make
- This command will compile YourTest and generate code.hex in Verification/TestCode/C/YourTest.
6. Go to $RSD_ROOT/Processor/Src, open Makefile.verilator.mk, and modify the TEST_CODE variable as below.
TEST_CODE = Verification/TestCode/C/YourTest
make -f Makefile.verilator.mk run