Comments (4)
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.
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.
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.
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)
- Support LSM303AGR for newer micro:bit hardware revisions HOT 1
- Target not found for Micro:Bit with Debian Linux HOT 3
- Project Wizard doesn't generate startup files HOT 3
- Include directions in examples/README.md to have compatible versions of bb-runtimes and compiler
- Support for Adafruit Feather M0 board HOT 3
- mma8653 initialization fails on MicroBit HOT 21
- EXAMPLES: Installing run-time dependencies fails with both Python 2 and Python 3 on Linux HOT 2
- Make HAL packages preelaborable HOT 1
- I2C HAL ideas HOT 15
- Many warnings with GCC 12 HOT 2
- RISC-V requires "zicsr" ISA extension to build with FSF GNAT 12.1.1 HOT 11
- IO expander MCP23x08 reports GPIO mode always as Output HOT 1
- Support for STM32F411CEU6 board HOT 1
- Extension zicsr required in HiFive1_rev_B board
- Microbit.Time resets the board
- How to get the toolchain up and running? HOT 15
- Compiler crash with pragma Ada_2022 on body HOT 2
- gnatprove incompatibility
- Incorrect usage of 'Val instead of 'Enum_Val
- No repository for HAL crate available.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ada_drivers_library.