Open gayathri191855 opened 2 years ago
Could you type anything in the terminal then? Like help? And is your main.c untouched?
No, I couldn't able to type anything on the terminal
I used make tool to build the target 'all' in the makefile and source code main.c will be processed and main.d, main.o was generated.
I had similar issue when I first tried. I know it would be frustrating. In the main.c, is there a function called console service in a while(1) loop or something like that? And in your base.py which you generate the bitstream, does the soc has a reset signal? If so, what would happen when you pressed the reset button?
Hi,
can you try to apply similar changes than in https://github.com/enjoy-digital/litex/pull/1259/files? If working we'll probably just disable LTO until someone has more time to have a closer look.
When I press reset button on the board it will display as
nexys4ddr board.
_ _ / / () /____ | |// / // / / -)> < /____//_/_//||
Build your hardware, easily!
(c) Copyright 2012-2021 Enjoy-Digital (c) Copyright 2007-2015 M-Labs
BIOS built on May 19 2022 15:53:24 BIOS CRC passed (dbfbcbc7)
Migen git sha1: ac70301 LiteX git sha1: d36e1b60
--=============== SoC ==================-- CPU: VexRiscv @ 100MHz BUS: WISHBONE 32-bit @ 4GiB CSR: 32-bit data ROM: 32KiB SRAM: 8KiB MAIN-RAM: 16KiB
--============== Boot ==================-- Booting from serial... Press Q or ESC to abort boot completely. sL5DdSMmkekro [LXTERM] Received firmware download request from the device. [LXTERM] Uploading firmware.bin to 0x40000000 (3580 bytes)... [LXTERM] Upload calibration... (inter-frame: 10.00us, length: 64) [LXTERM] Upload complete (9.8KB/s). [LXTERM] Booting the device. [LXTERM] Done. Executing booted program at 0x40000000
--============= Liftoff! ===============--
I was unable to type anything here
Thank you very much for your reply!
In main.c, there is main function which contains console_service function in while loop(1).
int main(void) {
irq_setmask(0);
irq_setie(1);
uart_init();
puts("\nLab004 - CPU testing software built "__DATE__" "__TIME__"\n");
help();
prompt();
while(1) {
console_service();
}
return 0;
}
and I didn't make any changes in the main.c
how should I resolve this problem?
Thanks!!!
Hi, do you see something like this when make the main.c? warning: cannot find entry symbol _start; defaulting to 0000000000000000
If that's the case, you may have to change to the makefile to an older version on the git. I guess it's something to do with the crt0.S/o file. I also messed this up sometime ago.
Hi, when I do make all in the firmware directory,
CC main.o CC firmware.elf /usr/lib/riscv64-unknown-elf/bin/ld: warning: cannot find entry symbol _start; defaulting to 0000000040000000 chmod -x firmware.elf OBJCOPY firmware.bin chmod -x firmware.bin
do I need to make changes in crt.o file? what are the changes?
Hi, I got the similar output before. Try to change the makefile to this It seems that it could not find the right start instruction address. So the whole bin was not executed. However, I see yours was already default to the right address 0x40000000. I don't know what cause the error then, but you can change the makefile and eliminate the warning and then try.
Thank you so much for your reply. Lab004 is working when I made the changes in makefile.
The bit stream was loaded on to the board and it was hang at Liftoff while loading firmware to the board with the command ("litex_term /dev/ttyUSB1 --kernel=firmware.bin"). Here I'm using nexys4ddr board.
Build your hardware, easily!
(c) Copyright 2012-2021 Enjoy-Digital (c) Copyright 2007-2015 M-Labs
BIOS built on May 19 2022 15:53:24 BIOS CRC passed (dbfbcbc7)
Migen git sha1: ac70301 LiteX git sha1: d36e1b60
--=============== SoC ==================-- CPU: VexRiscv @ 100MHz BUS: WISHBONE 32-bit @ 4GiB CSR: 32-bit data ROM: 32KiB SRAM: 8KiB MAIN-RAM: 16KiB
--============== Boot ==================-- Booting from serial... Press Q or ESC to abort boot completely. sL5DdSMmkekro [LXTERM] Received firmware download request from the device. [LXTERM] Uploading firmware.bin to 0x40000000 (3580 bytes)... [LXTERM] Upload calibration... (inter-frame: 10.00us, length: 64) [LXTERM] Upload complete (9.8KB/s). [LXTERM] Booting the device. [LXTERM] Done. Executing booted program at 0x40000000
--============= Liftoff! ===============--
what am I doing wrong? Is nexys4ddr board supported for https://github.com/litex-hub/fpga_101/tree/master/lab004 ??
Thanks!!!