Git Product home page Git Product logo

Comments (4)

Fabien-Chouteau avatar Fabien-Chouteau commented on July 22, 2024

Congrats for the blinky! That's a good first step :)

About the Ethernet support, what we have in the repository is only experimental and was only tested for the STM32F7 disco. So you will probably have to implement a few things for the 429 nucleo.

The reset that you see probably comes from an unhandled exception, try to put a breakpoint on all exceptions with "(gdb) break exceptions" or stop the CPU before it resets "(gdb) break __gnat_last_chance_handler".

Note that you can define your own last chance handler, for example to blink an LED instead of reseting the board. You will find example of that in the repository.

from ada_drivers_library.

jorgie0 avatar jorgie0 commented on July 22, 2024

Hi
Thanks for the reply.
I found that the offending clause was in this line of code:
Rx_Descs (I) := (Rdes0 => (Own => 1, others => <>), Rdes1 => (Dic => 0, Rbs2 => 0, Rer => (if Last then 1 else 0), Rch => 1, Rbs => Rx_Buffer'Length, others => <>), Rdes2 => W (Rx_Buffs (I)'Address), Rdes3 => W (Rx_Descs (I + 1)'Address));

With the actual issue being:
Rx_Descs (I + 1)'Address
For some reason this was being allocated an address of 0.

I did put in an exception handler but that did not get executed, instead it dropped out to last chance handler.
exception when Constraint_Error => GNAT.IO.Put ("Constraint"); when others => GNAT.IO.Put ("Something Else"); end Init_Mac;

Now the funny thing is that even after putting a dummy variable in to move Rx_Descs up I do not get any received packets.

I'm new to Ada on STM32s so I have not been able to find out which IP address gets allocated so unable to send any packets to the board.

Any suggestions.

from ada_drivers_library.

jorgie0 avatar jorgie0 commented on July 22, 2024

I've "solved" the exceptions not being propagated. Ravenscar does not propagate exceptions.
Damn.

I've also worked out that there is no easy answer to the TCP/IP stack.

So at this stage the program will run, if I put in the dummy variable to move the address of Rx_Descs up, but I'm not sure if it is correct.

Why would there be a problem having Rx_Desc at address of 0?

from ada_drivers_library.

lambourg avatar lambourg commented on July 22, 2024

Hello,

As Fabien already mentioned, the fact that the stm32.Eth package is placed in the examples directory and not in the usual drivers place means that this package is very experimental. It is meant to run only on the STM32F7-disco board for the moment, so some hard work will be needed to make it work on another board. Also this driver is meant to control the hardware of the board, not to provide a full IP stack. The Ada_Drivers_Library do not contain such IP stack (for the good reason that we don't have a proper ethernet driver yet).

Now on your specific questions:

  • the ravenscar-sfp profile is a small foot-print runtime, that is equivalent to the zfp with just the ravenscar tasking added (zero-footprint: no runtime is embeddded in your code unless you explicitely call runtime functions). Zero footprint or small footprint implies no exception propagation is supported (this implies embedding code from the runtime. If you need exceptions, you can use the ravenscar-full profile, that contains much more functionalities (but embeds more code, so your application will be bigger).
  • the null value for Rx_Desc: if you look at the code, Rx_Desc needs initialization and SDRAM. It is initialized at line 225, via a call to STM32.SDRAM.Reserve. Having null pointers is in general a problem and trying to access such address will generate a hardware fault (thus will reset the board).

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.