Skip to content

Add the INTERRUPTIN compilation guard for ESP8266 #10244

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

Merged
merged 1 commit into from
Mar 29, 2019

Conversation

michalpasztamobica
Copy link
Contributor

@michalpasztamobica michalpasztamobica commented Mar 27, 2019

Description

In case INTERRUPTIN flag is not set for a particular target, ESP8266 source code should not be compiled. The reason is that it relies on submodules (such as UARTSerial), which will not compile without INTERRUPTIN flag set. Thus, the compilation fails with an error without the flag.

The solution to the issue is to guard the ESP8266 with a macro checking that INTERRUPTIN flag is set.

This fixes #10061 .

Pull request type

[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

@SeppoTakalo
@VeijoPesonen

@ciarmcom ciarmcom requested review from SeppoTakalo, VeijoPesonen and a team March 27, 2019 16:00
@ciarmcom
Copy link
Member

@michalpasztamobica, thank you for your changes.
@VeijoPesonen @SeppoTakalo @ARMmbed/mbed-os-ipcore @ARMmbed/mbed-os-maintainers please review.

@michalpasztamobica
Copy link
Contributor Author

Travis made me fix some pending astyle issues, hence the small update.

@cmonr
Copy link
Contributor

cmonr commented Mar 28, 2019

CI started

@mbed-ci
Copy link

mbed-ci commented Mar 29, 2019

Test run: FAILED

Summary: 1 of 13 test jobs failed
Build number : 1
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_greentea-test

@michalpasztamobica
Copy link
Contributor Author

One of the test suites for K64F timed out. I doubt this is related to my changes...

@NirSonnenschein
Copy link
Contributor

restarted greentea test

@adbridge
Copy link
Contributor

@michalpasztamobica please add a summary of the issue and the solution to the Description , rather than just 'Fixes #xxx' , thanks.

@michalpasztamobica
Copy link
Contributor Author

@adbridge , you are right. I am sorry, the description has been updated.

@adbridge
Copy link
Contributor

@adbridge , you are right. I am sorry, the description has been updated.

Thanks :)

@adbridge adbridge merged commit f7c289b into ARMmbed:master Mar 29, 2019
@@ -893,7 +893,7 @@ nsapi_error_t ESP8266Interface::set_country_code(bool track_ap, const char *coun

// Firmware takes only first three characters
strncpy(_ch_info.country_code, country_code, sizeof(_ch_info.country_code));
_ch_info.country_code[sizeof(_ch_info.country_code)-1] = '\0';
_ch_info.country_code[sizeof(_ch_info.country_code) - 1] = '\0';
Copy link
Contributor

Choose a reason for hiding this comment

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

For future - styling changes should be separate (I got to this line because its causing merge errors when applying this patch - someone else changed this line elsewhere)

Copy link
Contributor

Choose a reason for hiding this comment

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

Same for the line above, these 2 are causing conflicts when doing new release candidate

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@0xc0170 , just to make sure - you mean "separate commit", not "separate PR"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was forced to change this line by the Travis astyle check, it is likely that another PR faced the same issue.
No idea how astyle missed this when it was committed first, but it is checking the whole file that is being comitted :(
Would it help if the change was in a separate commit?

Copy link
Contributor

Choose a reason for hiding this comment

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

correct separate commit at least. I've identified this, 2 PR have t he same changes - #10265

Copy link
Contributor

Choose a reason for hiding this comment

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

Still having issues with this patch - changing the style for a commit that is targeting 5.13 (country code). I'll move this to 5.13 . Please send separate patch for 5.12 (targeting 5.12 branch) to be included in 5.12.2 release. We will patch manually.

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 5, 2019

Set to 5.13 for now, new PR should be created for 5.12.2 release (or 5.12.1 but would be need to be created today). I'll continue fighting other conflicts.

@michalpasztamobica
Copy link
Contributor Author

@0xc0170 #10329 created - same changes but no astyle.

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

Successfully merging this pull request may close these issues.

esp8266-driver can't compile is DEVICE_INTERRUPTIN is not enabled
9 participants