Skip to content
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

Closed
wants to merge 5 commits into from
Closed

Fixes for esp-open-sdk #37

wants to merge 5 commits into from

Conversation

someburner
Copy link
Contributor

  1. Including glue.h in glue-lwip/arch/cc.h causes errors when trying to compile in the target project since glue.h and gluedebug.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 in cc.h, at least IMO.

  2. Create an arduino dir for arduino-specific patches, similar to open-sdk-specific patches. Put cyclic-timers-to-pmem.patch into arduino dir and add logic in Makefile.lwip2 to execute it for arduino builds.

  3. remove napt.h as part of clean directive

  4. Enable TCP_RANDOM_PORT for open-sdk lwipopts.h

@@ -22,7 +22,10 @@ patches: .patched
.patched:
for p in ../../patches/*.patch; do echo "--------- APPLY PATCH $${p#../../}:"; patch -d .. -p1 < $$p; done
Copy link
Owner

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
Copy link
Owner

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 ?

Copy link
Contributor Author

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.

Copy link
Owner

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

Copy link
Contributor Author

@someburner someburner Sep 6, 2019

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

@someburner someburner closed this Sep 6, 2019
@d-a-v
Copy link
Owner

d-a-v commented Sep 6, 2019

That's OK I should have used less generic names.
Feel free to PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants