Hey,
after some successful first steps in rust and getting to blink something and reading some I²C device on my STM32H730 custom board, for days now I'm trying to get the eth_client.rs running.
In line 22 I had to change RNG
to HASH_RNG
as I learned here, and of course adjust some pin numbers to my board.
I put a
info!("Hello World!");
right behindasync fn main(spawner: Spawner) -> ! {
(line 33) and ainfo!("I'm here!");
right behind line 68.
It compiles without warnings or errors, but no output is generated, not even the first, "Hello World!".
Then I tried to cook it down, and commented out everything inside loop { }
and piecewise parts from before, more and more upwards. It compiles without errors (some warnings of unused stuff, of course). I get my expected output as soon as I commented out this part of the code (and everything behind):
let device = Ethernet::new(
PACKETS.init(PacketQueue::<16, 16>::new()),
p.ETH,
Irqs,
p.PA1,
p.PA2,
p.PC1,
p.PA7,
p.PC4,
p.PC5,
p.PB12,
p.PB13,
p.PB11,
GenericSMI::new(0),
mac_addr,
);
Strangely: Even the "Hello World!" from before these lines doesn't appear in the output, if these line are uncommented.
For a test I inserted
let mut a=PACKETS.init(PacketQueue::<16, 16>::new());
let mut b=GenericSMI::new(0);
instead the let device
statement - output is there. So, these two initializations are not the problem.
Question is, how can I track this down any further? What I don't understand the most: Why is even the output of "Hello World!" from before disappearing?
I totally lack of foundations in rust, that's why I'm so stuck. I just don't really know to the fullest, what I'm doing there, so sorry for the noob question. I appreciate any hints where to look at.