Skip to content

Conversation

0xc0170
Copy link
Contributor

@0xc0170 0xc0170 commented Oct 12, 2016

Description

Fix for the issue #2993, do not use platform.h in the C files.

Status

READY

Tested defining EMAC for one platform and see if DEVICE_ it's properly defined and the code is compiled.

@pan-

@pan-
Copy link
Member

pan- commented Oct 12, 2016

@0xc0170 It fail to compile printing the following error:

[ERROR] .\mbed-os\features\FEATURE_LWIP\lwip-interface\emac_lwip.c:17:25: fatal error: mbed_config.h: No such file or directory

As a note, DEVICE_ defines are not present in mbed_config.h

@0xc0170
Copy link
Contributor Author

0xc0170 commented Oct 12, 2016

Thanks @pan- , I had old config in the example I was testing, cleaned and reproduced the issue. I rebased it, thus no inclusion required there. Please review again

@pan-
Copy link
Member

pan- commented Oct 12, 2016

@0xc0170 It doesn't work, other parts of lwip (in my case ./mbed-os/hal/hal/emac_api.h) are pulling platform.h unprefixed.

@bridadan
Copy link
Contributor

/morph test

@bridadan
Copy link
Contributor

I tried the HeartRate example with this patch on the K64F with the ST BLE shield and it worked. Are you seeing the same thing @pan- ?

@bridadan
Copy link
Contributor

retest uvisor

@mbed-bot
Copy link

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 0

All builds and test passed!

@0xc0170
Copy link
Contributor Author

0xc0170 commented Oct 13, 2016

@pan- Need your +1 for this one !

DEVICE_ are passed as command line -D, thus no inclusion is required.
``platform.h`` is C++ header file, should not be pulled in C files
@0xc0170
Copy link
Contributor Author

0xc0170 commented Oct 13, 2016

/morph test

@pan-
Copy link
Member

pan- commented Oct 13, 2016

+1 now.

@mbed-bot
Copy link

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 0

All builds and test passed!

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.

None yet

5 participants