Kasli-SoC: Get MAC address from EEPROM #90
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "mwojcik/zynq-rs:mac_from_eeprom"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Added pulling data from eeprom using
read_eui48
function tolibconfig::net_settings
. However due to size constraints in SZL, i2c code is just too much and it won't fit in OCM - thus a feature is added that keeps the hardcoded MAC, without pulling the i2c lib in.Closes #89
Tested with modified
experiments
(should I include them too in the PR?).Also
get_adress
got fixed intoget_address
(meaning it's a breaking change, artiq-zynq will need to be fixed with the next zynq-rs update).With MAC taken from EEPROM:
When compiled with
no_i2c
feature:That doesn't sound very good. We commonly use netboot and changing the MAC address in the middle while keeping the same IP could cause some confusion.
Did you try reducing the stack size or changing compiler options?
Stack goes into OCM3, while rodata goes into OCM (so changing stack size won't help).
Changing opt-level to 's' instead of 'z' does let it all fit, even with
debug = true
. Would that be a better solution?Yes.
And if there are still problems I guess we can put more things in OCM3 by defining a new section and pushing certain data there.
Or if the toolchain has problems with that, remap OCM3 in the assembly startup code so it becomes only one chunk of memory when Rust starts executing. The Zynq technical reference manual explains how to do that.
It does feel iffy - in theory 'z' opt-level should yield smaller binaries than 's', but in this case it doesn't. No need to change the stack besides that.
Tested with SZL and experiments - same output with
arp
, pingable.