Hello,
I'm trying litex with ethernet on colorlight 5a-7b (ecp5).
Everything works fine. I've added the default SoC setup and compiled the demo app which run fine.
The boot.bin is downloaded on the fpga and it runs the demo app fine.
When I try to change the firmware to include any of the udp function for example :
#include <libliteeth/udp.h>
static void helloc_cmd(void)
{
printf("UDP Start\n");
uint8_t* buffer = udp_get_tx_buffer();
printf("UDP End\n");
helloc();
}
It could be any of the udp functions...
It compiles without warning and errors, but when the fpga starts, it crash when trying to run the boot.bin firmware.
/ / (_) /____ | |/_/
/ /__/ / __/ -_)> <
/____/_/\__/\__/_/|_|
Build your hardware, easily!
(c) Copyright 2012-2024 Enjoy-Digital
(c) Copyright 2007-2015 M-Labs
BIOS built on Sep 13 2024 09:30:23
BIOS CRC passed (a3f170be)
LiteX git sha1: 2a19a61e0
--=============== SoC ==================--
CPU: VexRiscv @ 60MHz
BUS: wishbone 32-bit @ 4GiB
CSR: 32-bit data
ROM: 128.0KiB
SRAM: 8.0KiB
L2: 8.0KiB
SDRAM: 4.0MiB 32-bit @ 60MT/s (CL-2 CWL-2)
MAIN-RAM: 4.0MiB
--========== Initialization ============--
Ethernet init...
Initializing SDRAM @0x40000000...
Switching SDRAM to software control.
Switching SDRAM to hardware control.
Memtest at 0x40000000 (2.0MiB)...
Write: 0x40000000-0x40200000 2.0MiB
Read: 0x40000000-0x40200000 2.0MiB
Memtest OK
Memspeed at 0x40000000 (Sequential, 2.0MiB)...
Write speed: 22.1MiB/s
Read speed: 30.2MiB/s
--============== Boot ==================--
Booting from serial...
Press Q or ESC to abort boot completely.
sL5DdSMmkekro
Timeout
Booting from network...
Local IP: 192.168.100.50
Remote IP: 192.168.100.100
Booting from boot.json...
Booting from boot.bin...
Copying boot.bin to 0x40000000... (10090 bytes)
Executing booted program at 0x40000000
--============= Liftoff! ===============--
If I remove the udp function from the helloc function, it runs fine.
Calling other functions outside of the demo app such as crc16 or mdio_read works well.
Do you know what I am doing wrong?
Thanks!
Simon