-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Using LWIP on Windows #6463
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
Comments
The .vcxproj file is for |
Sorry don't have time to figure out what's wrong in a 1k LOC Makefile :) Plus if I run make on it I get this:
Anyway, some pointers:
|
In rule
I was a big fan of MinGW ~ years 10 ago. Now, I hate it.
Tried it. Doesn't work here. E.g a
Gave up on it. Hence my reason for creating my own Makefile I can understand. |
yes
Looks like an escape character problem, is it possible you're not invoking this from a posix-like shell (msys2/cygwin/bash/...) but from cmd or so? |
The TABs got lost between github and your editor. They're all in there. Click here and save to...
I use 4NT from JPsoft.com. So what? CMD, Bash? Puke. |
Aha. Now:
Looks like cmd. Anyway this is probably more suited for the forum since it's not one specific clearly aligned issue. |
Huh. That file is in the repo. What make version is this? What does |
So perhaps it wants the makefile in the MicroPython root directory?
|
Absolutely. The failed |
Ok after removing some things which don't compile with plain msvc (mainly socket stuff) this builds an executbale now. Cool to see this can be done. |
Exactly. My motivation behind this issue was to be able to do I've modified Edit: here are the diffs mentioned above. |
Sorry but it's hard to provide help without knowing exactly what you are doing. And to add to the confiusion different unrelated issues keep on piling up (started with lwip for msvc, then there's the clang problem, now it's about mouscoket but we don't know with which compiler nor what your source code looks like). So I'd suggest you head over to the forum and make a dedicated post per issue in which you provide all possible information to be able to reproduce it (complete build environment information, source code modifications). |
IMHO, the issues are related to why LwIP won't run. But I've managed with
Seems I have to create something better than |
It's rather unlikely the ImportError for the socket module is related - unless that's not the exact error.
Well, depends on what you mean with boiler plate. There's only a couple of mutexs in lwip, they're not initialized, so solution is to initialize them. Brief glance over the lwip source code lets me think that happens in |
I've progressed a bit further than that. Now a
Edit.
No, err_t err = sys_sem_new (&init_sem, 0);
tcpip_init (test_init, &init_sem);
sys_sem_wait (&init_sem);
sys_sem_free (&init_sem); works kinda, but a lot of LwIP stuff is still missing. It's a real pain of a tcp/ip-stack. |
Not exactly, tcpip_init calls lwip_init, it's only sys_init which gets skipped. So if you're calling that and the mutex is still not initialized it could still be the problem I mentioned with PP flags. |
Finally got it working; had a crash with So I feel like putting together a PR of my patches. But I'm a n00b when it comes to Github and pull requests. Edit: And with MbedTLS, now even the |
That's nice!
Surely there are a ton of tutorials out there, but practically it comes down to (of which you may have done parts already):
|
Catch main up to 7.3.x
First off, building MicroPython with MSVC and the
ports/windows/micropython.vcxproj
was exceptionally easy. Good job!But when trying to add support for LwIP with:
-DMICROPY_PY_LWIP=1
-DMICROPY_ENABLE_SCHEDULER=1
extmod/modlwip.c
andlib/netutils/netutils.c
.And trying to figure out where to add that in the
.vcxproj
files was not so easy. So I hacked up my own GNU-makefile.And then getting to the link stage, I got this error:
Is there another define that should be set to avoid this? Adding
-DNO_SYS=1
did not help.Or are we supposed to link with a dynamic LwIP import-library? Since that works.
The text was updated successfully, but these errors were encountered: