Coder Social home page Coder Social logo

rt1062-eth-rs's Introduction

cargo objcopy --release -- -O ihex out.hex cargo objcopy --example teensy_ethernet --release -- -O ihex out.hex

cargo b --example teensy_demo --features="teensy4" cargo b --example rt1176_evk_demo --features="imxrt1170evk"

/home/timv/teensy_loader_cli/teensy_loader_cli --mcu TEENSY41 out.hex -w

python3 -m serial.tools.miniterm /dev/ttyACM0

/home/timv/teensy_loader_cli/teensy_loader_cli --mcu TEENSY41 out.hex -w && sleep 1 && python3 -m serial.tools.miniterm /dev/ttyACM0

cargo flash --example rt1176_evk_demo --features="imxrt1170evk" --release --target=thumbv7em-none-eabihf --chip=mimxrt1170 && miniterm /dev/ttyACM0 115200

cargo build --example=rt1176_evk_demo --features=imxrt1170evk --target=thumbv7em-none-eabihf

teensy_loader_cli --mcu TEENSY41 out.hex -w && sleep 1 && python3 -m serial.tools.miniterm /dev/tty.usbmodem2101

EVK

export IMXRT_LOG_BUFFER_SIZE=8192 cargo build --example=rt1176_evk_demo --features=imxrt1170evk --target=thumbv7em-none-eabihf pyocd load --target=mimxrt1170_cm7 --format=elf target/thumbv7em-none-eabihf/debug/examples/rt1176_evk_demo pyocd reset --target=mimxrt1170_cm7 -m hw pyocd gdbserver --target=mimxrt1170_cm7 miniterm /dev/ttyACM0 115200

https://github.com/PaulStoffregen/teensy41_ethernet/blob/master/teensy41_ethernet.ino

MIMXRT1062DVJ6B

https://www.nxp.com/webapp/Download?colCode=IMXRT1060RM

2079-2250

Caveats:

  • No IP CRC acceleration
  • Only 100BASE-TX
  • No Magic Packet handling
  • No PTP (for now)
  • No VLANs

Lessons Learned

  • smoltcp will only ever create one each TXToken and RXToken. Device implementations are meant to enforce this by having the token borrow something from the Device, so that multiple calls to transmit() or receive() will be prevented by the borrow checker.
  • The ENET uDMA engine maintains pointers/counters to the last/next used TX and RX descriptor table entries. When TDAR is asserted, only the "next" descriptor is checked for readiness (and any subsequent until exahusted). Thus, you can't populate any free descriptor, you need to maintain your own pointer so that you populate the next entry. For RX, you don't need to scan the entire descriptor table for non-empty entries, just the "next" one.
  • There may be data caching going on. I don't have a complete understanding, but out of an abundance of caution, I added atomic fences. More work needed.
  • There's only 16k allocated for the stack in the teensy-rs runtime, and there's nothing to warn you if you break that limit. You should keep large data structures statically allocated.

cargo objcopy --features=teensy4 --target=thumbv7em-none-eabihf --example=teensy_demo --release -- -O ihex out.hex

rt1062-eth-rs's People

Contributors

timvrakas avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.