-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pkg/lwip: use sys/event for handling ISR and bhp #18359
Conversation
Rebased to include the whitespace only style fixes. This no longer depends on other PRs. |
This needs a rebase. |
this is definitely the way to go, thanks! Note that you could also just use |
This breaks RX for me (both wired and wireless) when applied on top of 4b87a30 I use |
OK, I just rebased to see if the issue is a result of changes to |
Hm any news on this? |
I'm still having trouble to get OpenOCD up an running to be able to properly debug the issue on ESP. (I even gave up on using upstream OpenOCD and used openocd-esp32. Unlike upstream OpenOCD this could indeed flash the ESP32 Ethernet Kit via the FTDI bit-banging JTAG interface. But debugging shows the same errors as the upstream version. Did I mention that the state of the software on ESP is extremely frustrating?) |
@gschorcht might know more about how to debug esp32 |
OK, then let me provide some details on the problem first:
Full log output
|
I don't have any problem on USEMODULE=esp_jtag PROGRAMMER=openocd BOARD=esp32-wrover-kit make -C tests/shell flash debug
[...]
### Flashing Target ###
Binfile detected, adding ROM base address: 0x00000000
Flashing with IMAGE_OFFSET: 0x00010000
Open On-Chip Debugger v0.11.0-esp32-20211220 (2021-12-20-15:42)
[...]
### Starting Debugging ###
Open On-Chip Debugger v0.11.0-esp32-20211220 (2021-12-20-15:42)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Reading symbols from /home/gs/src/RIOT-Xtensa-ESP.esp-idf-4.4/tests/shell/bin/esp32-wrover-kit/tests_shell.elf...
Remote debugging using :3333
0x40000400 in ?? () Did you use the toolchain and the openocd-esp32 version that are pulled by the install script The following message in your log indicates an incompatibility between the openocd-esp32 and the gdb you are using:
|
@jia200x: Could you give this a spin on either the kw2xrf or the mrf24j40 to see if I got the rebase in regard to the bottom half processor correct? Specifically, this now ditches bhp_msg in favor of bhp_event, as there now is an event queue anyway. I sadly have neither radio at hands. |
Then let's get this in and fix lwIP afterwards. |
This is directly useful for the two driver using the bhp API, but also other drivers profit from not loosing IRQs. The main selling point is that this paves the way for implementing netdev_driver_t::confirm_send(). Co-authored-by: benpicco <benpicco@googlemail.com> Co-authored-by: Erik Ekman <eekman@google.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not that sure how the event loop thing works but it looks reasonable now
Thx :) |
Contribution description
This is many providing infrastructure for later use, specifically for making use of the
netdev_driver_t::confirm_send()
. However, as a positive side-effect, this should prevent lost IRQs. (E.g. consider one netdev saturating the message queue. If now a second netdev wouldalso need its ISR being run, it cannot enqueue its message and the IRQ is lost.)
Testing procedure
The expected failure mode is that no network operation is possible when the ISRs are not being run correctly. I ran
make LWIP=1 BOARD=nucleo-f767zi -C examples/gcoap
and could still successfully ping the board.Issues/PRs references
Contains #18357