Code Monkey home page Code Monkey logo

Comments (8)

Fabien-Chouteau avatar Fabien-Chouteau commented on June 17, 2024

It's part of design that the STM32. packages provides an higher level interface.

Again the STM32.Eth is quite old and maybe not up to the standard of the other drivers. I encourage you to have a look others packages (STM32.I2C, STM32.SPI, STM32.PWM) to see what kind of interfaces we usually expect.

I also suggest that you start thinking about an HAL.Ethernet interface, again you can look at the other packages in HAL. This should define Ethernet interface that would work on any Ethernet controller. By doing this work, or only starting to think about it, you will be able to design a better interface for STM32.Eth.

from ada_drivers_library.

 avatar commented on June 17, 2024

I have been trying, particularly, to complete a project with Ethernet.

Is there a HAL.Ethernet interface anywhere - even an old one?

Do you know anybody who has successfully sent or received a packet with
STM32.Eth? Even if it's terrible code and very old, it'd still be very
useful.

On 6 September 2016 at 15:01, Fabien Chouteau [email protected]
wrote:

It's part of design that the STM32. packages provides an higher level
interface.

Again the STM32.Eth is quite old and maybe not up to the standard of the
other drivers. I encourage you to have a look others packages (STM32.I2C,
STM32.SPI, STM32.PWM) to see what kind of interfaces we usually expect.

I also suggest that you start thinking about an HAL.Ethernet interface,
again you can look at the other packages in HAL. This should define
Ethernet interface that would work on any Ethernet controller. By doing
this work, or only starting to think about it, you will be able to design a
better interface for STM32.Eth.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#51 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AESqR93_-1vQqgbrmF4J_gKu4w9tBLkXks5qnWQdgaJpZM4J1U_6
.

from ada_drivers_library.

Fabien-Chouteau avatar Fabien-Chouteau commented on June 17, 2024

I have been trying, particularly, to complete a project with Ethernet.

We appreciate your effort, Ethernet is not easy and we are mostly starting from scratch here :)

Is there a HAL.Ethernet interface anywhere - even an old one?

Not in Ada, it's on the TODO list. You can have look at ARM CMSIS C interfaces: http://www.keil.com/pack/doc/CMSIS/Driver/html/group__eth__interface__gr.html

Do you know anybody who has successfully sent or received a packet with STM32.Eth? Even if it's terrible code and very old, it'd still be very useful.

@gingold-adacore did, and all his code is in STM32.Eth (I think).

from ada_drivers_library.

 avatar commented on June 17, 2024

Thank you for the reference - I've written to Tristan, and the e-mail
didn't bounce back, but I've not yet had a reply. I know it's holiday
season in Europe, but I thought I should check, is Tristan's adacore e-mail
address still the correct one to use?

On 6 September 2016 at 16:31, Fabien Chouteau [email protected]
wrote:

I have been trying, particularly, to complete a project with Ethernet.

We appreciate your effort, Ethernet is not easy and we are mostly starting
from scratch here :)

Is there a HAL.Ethernet interface anywhere - even an old one?

Not in Ada, it's on the TODO list. You can have look at ARM CMSIS C
interfaces: http://www.keil.com/pack/doc/CMSIS/Driver/html/group__eth__
interface__gr.html

Do you know anybody who has successfully sent or received a packet with
STM32.Eth? Even if it's terrible code and very old, it'd still be very
useful.

@gingold-adacore https://github.com/gingold-adacore did, and all his
code is in STM32.Eth (I think).


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#51 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AESqR0ycLGMd5sLpQA5-9sWqa_Cvv9bHks5qnXksgaJpZM4J1U_6
.

from ada_drivers_library.

stcarrez avatar stcarrez commented on June 17, 2024

I played a little bit with STM32.Eth and it was a nice starting point to understand the Ethernet driver.

The Ethernet driver must have a transmit queue and a receive queue so that you can manage
the TX and RX Ethernet rings. There are many strategies for that and I've implemented a driver
that allows to avoid copies when a frame is sent but also when it is received.

As for now, the Ethernet driver receive queue works very well so that you can recieve network
packets and do whatever you like with them. The transmit queue works but it stops after sending
the first packet but it's a matter of time to fix it.

Check out:
https://github.com/stcarrez/ada-enet

and look at src/stm32/net-interfaces-stm32.adb for the TX and RX ring setup with the transmit
and receive queues.

I've picked the STM32.Eth and stripped down to the minimal subset for my own needs (MII setup).

from ada_drivers_library.

Fabien-Chouteau avatar Fabien-Chouteau commented on June 17, 2024

Thanks for sharing the info! That's an awesome project you have here!

May I suggest that you record a short video of the project in action and put it on YouTube or similar.

from ada_drivers_library.

 avatar commented on June 17, 2024

Dear Stephane,

Thank you very much - that's really helpful.

Regards,
Peter

On 27 September 2016 at 21:52, Stephane Carrez [email protected]
wrote:

I played a little bit with STM32.Eth and it was a nice starting point to
understand the Ethernet driver.

The Ethernet driver must have a transmit queue and a receive queue so that
you can manage
the TX and RX Ethernet rings. There are many strategies for that and I've
implemented a driver
that allows to avoid copies when a frame is sent but also when it is
received.

As for now, the Ethernet driver receive queue works very well so that you
can recieve network
packets and do whatever you like with them. The transmit queue works but
it stops after sending
the first packet but it's a matter of time to fix it.

Check out:
https://github.com/stcarrez/ada-enet

and look at src/stm32/net-interfaces-stm32.adb for the TX and RX ring
setup with the transmit
and receive queues.

I've picked the STM32.Eth and stripped down to the minimal subset for my
own needs (MII setup).


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#51 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AESqR-icPnM9ElcRk7V00UDjw-pG3ELzks5quXQGgaJpZM4J1U_6
.

from ada_drivers_library.

stcarrez avatar stcarrez commented on June 17, 2024

Here is a short video that shows EtherScope in action: EtherScope an Ethernet Traffic Monitor

from ada_drivers_library.

Related Issues (20)

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.