-
Notifications
You must be signed in to change notification settings - Fork 23
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
Fixes for esp-open-sdk #37
Conversation
…ayer into fix-open-sdk
@@ -22,7 +22,10 @@ patches: .patched | |||
.patched: | |||
for p in ../../patches/*.patch; do echo "--------- APPLY PATCH $${p#../../}:"; patch -d .. -p1 < $$p; done |
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.
for p in ../../patches/*.patch ../../patches/$(target)/*.patch; do
... ?
@@ -58,7 +58,11 @@ void sntp_set_system_time (uint32_t t); | |||
|
|||
#include "mem.h" // useful for os_malloc used in esp-arduino's mDNS | |||
|
|||
#include "glue.h" // include assembly locking macro used below |
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 added the defines in this file to avoid duplication because they are needed on both sides.
What was the issue when using glue.h
?
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.
Okay I traced down the issue. It's that ARDUINO
gets defined in glue.h
. This causes an issue for my project that has another cross-platform library that also uses ARDUINO
as a build select.
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.
Maybe we can change like this, what do you think ?
#define ARDUINO 0
#endif
#ifndef OPENSDK
#define OPENSDK 0
#endif
#if !ARDUINO && !OPENSDK
#error Must defined ARDUINO or OPENSDK
#endif
to
#if (!defined(ARDUINO) || !ARDUINO) && (!defined(OPENSDK) || !OPENSDK)
#error Must defined ARDUINO or OPENSDK
#endif
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.
If you don't mind changing ARDUINO
to BLD_LWIP_ARDUINO
and OPENSDK
to BLD_LWIP_OPENSDK
, that would resolve the issue for my project. I feel a bit silly requesting to change it just for my project, but the other library is huge and used by several developers and in other projects. If you're OK with that, I can make the changes and re-do the PR, and would make it easier for me to submit PRs in the future
That's OK I should have used less generic names. |
Including
glue.h
inglue-lwip/arch/cc.h
causes errors when trying to compile in the target project sinceglue.h
andgluedebug.h
don't get copied into the system include folder and it will error. Doesn't hurt to just have a copy of the definition incc.h
, at least IMO.Create an
arduino
dir for arduino-specific patches, similar to open-sdk-specific patches. Putcyclic-timers-to-pmem.patch
into arduino dir and add logic inMakefile.lwip2
to execute it for arduino builds.remove
napt.h
as part of clean directiveEnable
TCP_RANDOM_PORT
for open-sdklwipopts.h