Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"make testdlimage" => "./mini-rv32ima -f DownloadedImage" ... hangs (tested on 3 different platforms). #29

Closed
sanderjo opened this issue Apr 13, 2023 · 4 comments

Comments

@sanderjo
Copy link

sanderjo commented Apr 13, 2023

Yesterday, on my laptop, everything went well

But today, on 3 other different platforms (Ubuntu, Ubuntu, WSL), fresh git clone, fresh make, it hangs on ./mini-rv32ima -f DownloadedImage

Pressing CTRL-C gives a register overview?

sander@brixit:~/git/mini-rv32ima$ make testdlimage
make -C mini-rv32ima testdlimage
make[1]: Entering directory '/home/sander/git/mini-rv32ima/mini-rv32ima'
echo "#include <stdio.h>" > bintoh.c
echo "int main(int argc,char ** argv) {if(argc==1) return -1; int c, p=0; printf( \"static const unsigned char %s[] = {\", argv[1] ); while( ( c = getchar() ) != EOF ) printf( \"0x%02x,%c\", c, (((p++)&15)==15)?10:' '); printf( \"};\" ); return 0; }" >> bintoh.c
gcc bintoh.c -o bintoh
./bintoh default64mbdtb < sixtyfourmb.dtb > default64mbdtc.h
# WARNING: sixtyfourmb.dtb MUST hvave at least 16 bytes of buffer room AND be 16-byte aligned.
#  dtc -I dts -O dtb -o sixtyfourmb.dtb sixtyfourmb.dts -S 1536
# for debug
gcc -o mini-rv32ima mini-rv32ima.c -g -O2 -Wall
gcc -o mini-rv32ima.tiny mini-rv32ima.c -Os -ffunction-sections -fdata-sections -Wl,--gc-sections -fwhole-program -s
wget https://github.com/cnlohr/mini-rv32ima-images/raw/master/images/linux-6.1.14-rv32nommu-cnl-1.zip -O linux-6.1.14-rv32nommu-cnl-1.zip
--2023-04-13 17:50:35--  https://github.com/cnlohr/mini-rv32ima-images/raw/master/images/linux-6.1.14-rv32nommu-cnl-1.zip
Resolving github.com (github.com)... 140.82.121.4
Connecting to github.com (github.com)|140.82.121.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://raw.githubusercontent.com/cnlohr/mini-rv32ima-images/master/images/linux-6.1.14-rv32nommu-cnl-1.zip [following]
--2023-04-13 17:50:35--  https://raw.githubusercontent.com/cnlohr/mini-rv32ima-images/master/images/linux-6.1.14-rv32nommu-cnl-1.zip
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.109.133, 185.199.110.133, 185.199.111.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.109.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1507463 (1,4M) [application/zip]
Saving to: ‘linux-6.1.14-rv32nommu-cnl-1.zip’

linux-6.1.14-rv32nommu-cnl-1.zip                100%[====================================================================================================>]   1,44M  --.-KB/s    in 0,03s

2023-04-13 17:50:35 (47,2 MB/s) - ‘linux-6.1.14-rv32nommu-cnl-1.zip’ saved [1507463/1507463]

unzip linux-6.1.14-rv32nommu-cnl-1.zip
Archive:  linux-6.1.14-rv32nommu-cnl-1.zip
  inflating: Image
mv Image DownloadedImage
./mini-rv32ima -f DownloadedImage

... hang. So CTRL-C:

PC: 80001cbc [0x34021273] Z:00000000 ra:80001e4c sp:802e31d0 gp:80351078 tp:8030f340 t0:00001fff t1:802e31d0 t2:802e3210 s0:802e32f0 s1:00001800 a0:802e3260 a1:00000001 a2:802e32d8 a3:80351000 a4:00000080 a5:803510e4 a6:00000000 a7:8034c89e s2:800076f0 s3:800076f0 s4:00000002 s5:8030f340 s6:00000008 s7:802f6fe5 s8:802f5758 s9:00000007 s10:00000019 s11:00000000 t3:00000000 t4:8035c096 t5:8035c06c t6:802f577c
make: *** [Makefile:24: testdlimage] Interrupt

sander@brixit:~/git/mini-rv32ima$
@sanderjo
Copy link
Author

Ah, going back to earlier commit ... and it works

sander@brixit:~/git/mini-rv32ima$ git reset --hard f5154edc2894c2624361ef26ad8c3e6ebd23dea3
HEAD is now at f5154ed Update banner note.

sanderjo referenced this issue Apr 13, 2023
 * Get started on a cache test.
@cnlohr
Copy link
Owner

cnlohr commented Apr 13, 2023

Interesting - I will need to re-test this with the changes outlined in the previous commit.

@cnlohr
Copy link
Owner

cnlohr commented Apr 13, 2023

Does it all work now, @sanderjo ?

@sanderjo
Copy link
Author

Yes, it works now. I see you removed the last commit?

This is the git log of what works.

commit f5154edc2894c2624361ef26ad8c3e6ebd23dea3 (HEAD -> master, origin/master, origin/HEAD)
Author: cnlohr <lohr85@gmail.com>
Date:   Tue Mar 28 22:05:38 2023 -0700

    Update banner note.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants