Skip to content

Conversation

@cajt
Copy link
Contributor

@cajt cajt commented Aug 28, 2024

Summary

Fixes a compile error if STM32 port is compiled with:

make BOARD=(..) MICROPY_PY_LWIP=1 MICROPY_PY_LWIP_SLIP=1

Testing

Tested with STM32F4DISC target in hardware, with SLIP link over UART. Ping from Linux host got a proper response.

On STM32F4DISC:

import pyb
import lwip
import network
tim = pyb.Timer(7)
tim.init(freq=20)
tim.callback(lambda t: lwip.callback())
u = pyb.UART(3, 500000, read_buf_len=1550)
sl = lwip.slip(u, "192.168.5.2", "192.168.5.1")

On Host (Linux):

sudo slattach -L -p slip  /dev/ttyUSB0 &
sudo ifconfig sl0 192.168.5.1 pointopoint 192.168.5.2 mtu 1500
ping 192.168.5.2

@github-actions
Copy link

Code size report:

   bare-arm:    +0 +0.000% 
minimal x86:    +0 +0.000% 
   unix x64:    +0 +0.000% standard
      stm32:    +0 +0.000% PYBV10
     mimxrt:    +0 +0.000% TEENSY40
        rp2:    +0 +0.000% RPI_PICO_W
       samd:    +0 +0.000% ADAFRUIT_ITSYBITSY_M4_EXPRESS

@dpgeorge dpgeorge added the extmod Relates to extmod/ directory in source label Aug 29, 2024
Copy link
Member

@dpgeorge dpgeorge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution!

This change looks correct.

sio_send() & sio_tryread() now use mp_get_stream.

Signed-off-by: Carl Treudler <cjt@users.sf.net>
@codecov
Copy link

codecov bot commented Aug 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.43%. Comparing base (fd03a05) to head (e9fcc39).
Report is 49 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #15740   +/-   ##
=======================================
  Coverage   98.43%   98.43%           
=======================================
  Files         163      163           
  Lines       21295    21295           
=======================================
  Hits        20961    20961           
  Misses        334      334           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cajt cajt changed the title Fix compile error for LWIP with SLIP support extmod: Fix compile error for LWIP with SLIP support. Aug 29, 2024
@cajt
Copy link
Contributor Author

cajt commented Aug 29, 2024

Fixed PR & commit message conventions and sign-off.

@dpgeorge
Copy link
Member

dpgeorge commented Sep 6, 2024

Rebased and merged in 65244d2

@dpgeorge dpgeorge closed this Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extmod Relates to extmod/ directory in source

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants