get MAC address from EEPROM on Kasli-SoC #89

Closed
opened 2022-02-11 15:04:54 +08:00 by sb10q · 3 comments

read_eui48 is defined but never used.

read_eui48 is defined but never used.
mwojcik was assigned by sb10q 2022-02-11 15:04:54 +08:00

I put the code for getting the MAC from EEPROM into libconfig - seems natural that MAC would be pulled from EEPROM and possibly overriden with config - however, with all that i2c code, when linking kasli_soc-szl the linker claims that .rodata won't fit into OCM:

rust-lld: error: section '.rodata' will not fit in region 'OCM': overflowed by 304 bytes
rust-lld: error: section '.rodata' will not fit in region 'OCM': overflowed by 320 bytes
rust-lld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)

Not sure what to do with this now - there isn't much to be shaved off. Possibly make a no_i2c feature so that SZL would get the hardcoded address still, but other applications could get the one from EEPROM?

I put the code for getting the MAC from EEPROM into ``libconfig`` - seems natural that MAC would be pulled from EEPROM and possibly overriden with config - however, with all that i2c code, when linking kasli_soc-szl the linker claims that ``.rodata`` won't fit into OCM: ``` rust-lld: error: section '.rodata' will not fit in region 'OCM': overflowed by 304 bytes rust-lld: error: section '.rodata' will not fit in region 'OCM': overflowed by 320 bytes rust-lld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors) ``` Not sure what to do with this now - there isn't much to be shaved off. Possibly make a ``no_i2c`` feature so that SZL would get the hardcoded address still, but other applications could get the one from EEPROM?
Poster
Owner

Maybe the stack can be shaved off a bit?

Maybe the stack can be shaved off a bit?

Weirdly enough, if I try to compile it from the shell (p much same command as in flake), even from master branch, I get overflowed errors.

cargo xbuild --release --frozen -p szl --no-default-features --features=target_kasli_soc

(or any other target)

  = note: rust-lld: error: section '.rodata' will not fit in region 'OCM': overflowed by 25 bytes
          rust-lld: error: section '.rodata' will not fit in region 'OCM': overflowed by 42 bytes
          rust-lld: error: section '.rodata' will not fit in region 'OCM': overflowed by 64 bytes
          rust-lld: error: section '.rodata' will not fit in region 'OCM': overflowed by 81 bytes
          rust-lld: error: section '.rodata' will not fit in region 'OCM': overflowed by 90 bytes
          rust-lld: error: section '.data' will not fit in region 'OCM': overflowed by 92 bytes
          rust-lld: error: section '.data' will not fit in region 'OCM': overflowed by 100 bytes
          rust-lld: error: section '.rodata' will not fit in region 'OCM': overflowed by 25 bytes
          rust-lld: error: section '.rodata' will not fit in region 'OCM': overflowed by 42 bytes
          rust-lld: error: section '.rodata' will not fit in region 'OCM': overflowed by 64 bytes
          rust-lld: error: section '.rodata' will not fit in region 'OCM': overflowed by 81 bytes
          rust-lld: error: section '.rodata' will not fit in region 'OCM': overflowed by 90 bytes
          rust-lld: error: section '.data' will not fit in region 'OCM': overflowed by 92 bytes
          rust-lld: error: section '.data' will not fit in region 'OCM': overflowed by 100 bytes

Now I'm not sure how is it working in the first place :| Seems like it's really tight here already.

Weirdly enough, if I try to compile it from the shell (p much same command as in flake), even from master branch, I get overflowed errors. ``cargo xbuild --release --frozen -p szl --no-default-features --features=target_kasli_soc`` (or any other target) ``` = note: rust-lld: error: section '.rodata' will not fit in region 'OCM': overflowed by 25 bytes rust-lld: error: section '.rodata' will not fit in region 'OCM': overflowed by 42 bytes rust-lld: error: section '.rodata' will not fit in region 'OCM': overflowed by 64 bytes rust-lld: error: section '.rodata' will not fit in region 'OCM': overflowed by 81 bytes rust-lld: error: section '.rodata' will not fit in region 'OCM': overflowed by 90 bytes rust-lld: error: section '.data' will not fit in region 'OCM': overflowed by 92 bytes rust-lld: error: section '.data' will not fit in region 'OCM': overflowed by 100 bytes rust-lld: error: section '.rodata' will not fit in region 'OCM': overflowed by 25 bytes rust-lld: error: section '.rodata' will not fit in region 'OCM': overflowed by 42 bytes rust-lld: error: section '.rodata' will not fit in region 'OCM': overflowed by 64 bytes rust-lld: error: section '.rodata' will not fit in region 'OCM': overflowed by 81 bytes rust-lld: error: section '.rodata' will not fit in region 'OCM': overflowed by 90 bytes rust-lld: error: section '.data' will not fit in region 'OCM': overflowed by 92 bytes rust-lld: error: section '.data' will not fit in region 'OCM': overflowed by 100 bytes ``` Now I'm not sure how is it working in the first place :| Seems like it's really tight here already.
sb10q closed this issue 2022-03-07 18:01:44 +08:00
Sign in to join this conversation.
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/zynq-rs#89
There is no content yet.