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
Stm32 ethernet f7 disc #6
Conversation
It works! And provides a full socket implementation. But some performance is lost: with a lot of memory allocated to lwIP it gives Around 750,000 bytes/sec max TCP download, compared with 1M/sec when using the TCP/IP stack on the Wiznet module. TODO: - probably put lwip polling in systick via a pending scheduled event - could update wiznet driver since it fixes the -2 bug and buf size masks that are patched here - update lwip to v2
libaxtls requires the build directory to exist, and lwip's dhcp.c can give warnings on certain gcc versions.
Instead of including sys/types.h which leads to problems with the cc3000 driver.
Dramatically improves TCP sending throughput because without an explicit call to tcp_output() the data is only sent to the lower layers via the lwIP slow timer which (by default) ticks every 500ms.
…ADME.md is created
…ects/STM32F767ZI-Nucleo/Applications/LwIP/LwIP_HTTP_Server_Netconn_RTOS/Src)
ethernetif.c --- low level driver mainly derived from STM example code network_ethernet.c --- MicroPython module code Makefile and mpconfigport.mk are modified to build these files modnetwork.c added ethernet
…ip_init becase it would be called from netif_add.
…LAY and PHY_CONFIG_DELAY from 0xfff to 0xff
Thanks for submitting this PR. Ethernet support in the stm32 port would be a great addition and I'd be happy to merge this code. Can you please re-open this PR at the main, upstream repository https://github.com/micropython/micropython ? It won't get merged immediately -- there are a few things that need to be fixed/merged first -- but it will go in the queue. |
Thank you for your response. |
asan considers that memcmp(p, q, N) is permitted to access N bytes at each of p and q, even for values of p and q that have a difference earlier. Accessing additional values is frequently done in practice, reading 4 or more bytes from each input at a time for efficiency, so when completing "non_exist<TAB>" in the repl, this causes a diagnostic: ==16938==ERROR: AddressSanitizer: global-buffer-overflow on address 0x555555cd8dc8 at pc 0x7ffff726457b bp 0x7fffffffda20 sp 0x7fff READ of size 9 at 0x555555cd8dc8 thread T0 #0 0x7ffff726457a (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xb857a) #1 0x555555b0e82a in mp_repl_autocomplete ../../py/repl.c:301 #2 0x555555c89585 in readline_process_char ../../lib/mp-readline/re #3 0x555555c8ac6e in readline ../../lib/mp-readline/readline.c:513 #4 0x555555b8dcbd in do_repl /home/jepler/src/micropython/ports/uni #5 0x555555b90859 in main_ /home/jepler/src/micropython/ports/unix/ #6 0x555555b90a3a in main /home/jepler/src/micropython/ports/unix/m #7 0x7ffff619a09a in __libc_start_main ../csu/libc-start.c:308 #8 0x55555595fd69 in _start (/home/jepler/src/micropython/ports/uni 0x555555cd8dc8 is located 0 bytes to the right of global variable 'import_str' defined in '../../py/repl.c:285:23' (0x555555cd8dc0) of size 8 'import_str' is ascii string 'import ' Signed-off-by: Jeff Epler <jepler@gmail.com>
I normally want to use onboard ethernet with NUCLEO and F7disco.
Is it possible to merge these codes in the micropython/micropyhton master branch?