Skip to content

Renamed files in platform to match source names #3654

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
Feb 23, 2017

Conversation

geky
Copy link
Contributor

@geky geky commented Jan 27, 2017

Small pr to rename the files in platform to match source names.

Here's the changed files

critical.h     -> mbed_critical.h
sleep.h        -> mbed_sleep.h
toolchain.h    -> mbed_toolchain.h
rtc_time.h     -> mbed_rtc_time.h
semihost_api.h -> mbed_semihost_api.h
wait_api.h     -> mbed_wait_api.h

Useful sed command for updating files:

sed -i 's/#include "\(.*\)\<\(critical\|sleep\|toolchain\|rtc_time\|semihost_api\|wait_api\).h"/#include "\1mbed_\2.h"/' $(find -regex '.*\.\(h\|hpp\|c\|cpp\)')

Should resolve #3259
cc @bridadan, @adbridge, @0xc0170

@bridadan
Copy link
Contributor

@geky Can you take a look at the travis failure?

$ python tools/build_travis.py
Executing: python tools/build.py -m LPC1768 -t GCC_ARM -j 4 -c --silent --dsp --rtos --eth --usb_host --usb --ublox --fat
/home/travis/build/ARMmbed/mbed-os/drivers/LocalFileSystem.cpp:20:45: fatal error: platform/mbed_mbed_semihost_api.h: No such file or directory
 #include "platform/mbed_mbed_semihost_api.h"

@adbridge
Copy link
Contributor

adbridge commented Jan 30, 2017

Looks like the sed added an extra 'mbed_' for some of the files , resulting in eg. mbed_mbed_semihost_api.h which is obviously wrong. Looks like this change may need revisiting.
Files that need fixing:
drivers/LocalFileSystem.cpp
features/unsupported/tests/mbed/file/main.cpp
features/unsupported/tests/mbed/semihost/main.cpp
features/unsupported/tests/utest/general/general.cpp
features/unsupported/tests/utest/semihost_fs/semihost_fs.cpp
platform/mbed_interface.c
platform/mbed_retarget.cpp
platform/mbed_semihost_api.c
platform/rtc_time.h
platform/semihost_api.h
platform/sleep.h
platform/toolchain.h
platform/wait_api.h

@geky
Copy link
Contributor Author

geky commented Jan 30, 2017

Noted: Don't run the script twice 😆

Should be updated

@adbridge
Copy link
Contributor

/morph test

Copy link
Contributor

@adbridge adbridge left a comment

Choose a reason for hiding this comment

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

Looks good after the update

@mbed-bot
Copy link

Result: FAILURE

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

/morph test

Output

mbed Build Number: 1472

Build failed!

@mazimkhan
Copy link

retest uvisor

1 similar comment
@mazimkhan
Copy link

retest uvisor

#endif // __MBED_UTIL_CRITICAL_H__

/** @}*/
#warning critical.h has been replaced by mbed_critical.h, please update to mbed_critical.h [since mbed-os-5.3]
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't all these headers have still protection against multiple inclusion? (as it had on line 21, 22 in this one)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The included file has the protection against multiple inclusion, the only downside is multiple warning messages which shouldn't be an issue.

Copy link
Contributor

Choose a reason for hiding this comment

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

the only downside is multiple warning messages which shouldn't be an issue.

That's what I was referring to.

Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't all these headers have still protection against multiple inclusion?

can this be added back?

Copy link
Contributor

Choose a reason for hiding this comment

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

@geky bump - can header guards get added back in?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah sorry, I missed this earlier. Didn't realize this was a blocking issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should be updated

@0xc0170
Copy link
Contributor

0xc0170 commented Jan 31, 2017

There's failure with morph CI for this command: mbed test --compile -m NCS36510 -t ARM -DMBED_HEAP_STATS_ENABLED=1 -DMBED_STACK_STATS_ENABLED=1 --clean

Locally, latest master works, its regarding sleep that should not be affected by this PR.

/morph test

@mbed-bot
Copy link

Result: FAILURE

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

/morph test

Output

mbed Build Number: 1479

Build failed!

@0xc0170
Copy link
Contributor

0xc0170 commented Jan 31, 2017

OK, the failure is even on master but it did not break , anyway, going to fix it on master, this can be rebased on top of it.

@0xc0170
Copy link
Contributor

0xc0170 commented Jan 31, 2017

PR referenced above that should fix the morph failure, please review, rebase once integrated

@sg-
Copy link
Contributor

sg- commented Feb 2, 2017

@geky PR maintenance needed.

@geky
Copy link
Contributor Author

geky commented Feb 2, 2017

Should be up to date. Rebasing this guy is quite painful when the header files are modified.

@geky geky force-pushed the header-rename branch 3 times, most recently from 04a699b to d2a66cf Compare February 2, 2017 18:49
@bridadan
Copy link
Contributor

bridadan commented Feb 2, 2017

/morph test

@mbed-bot
Copy link

mbed-bot commented Feb 3, 2017

Result: SUCCESS

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

/morph test

Output

mbed Build Number: 1498

All builds and test passed!

@adbridge
Copy link
Contributor

adbridge commented Feb 6, 2017

@mazimkhan

@mazimkhan
Copy link

retest uvisor

@geky
Copy link
Contributor Author

geky commented Feb 15, 2017

/morph test

@mbed-bot
Copy link

Result: SUCCESS

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

/morph test

Output

mbed Build Number: 1610

All builds and test passed!

@bridadan
Copy link
Contributor

Hey @geky I looked through the CI logs and it looks like there's only one include that needs to be touched up: https://github.com/ARMmbed/mbed-os/blob/master/rtos/rtos_idle.c#L24

This came in as part of #3566 after you made this PR, so this just needs a rebase/update!

@0xc0170
Copy link
Contributor

0xc0170 commented Feb 20, 2017

@geky Can you please resolve the conflict and run CI again?

critical.h     -> mbed_critical.h
sleep.h        -> mbed_sleep.h
toolchain.h    -> mbed_toolchain.h
rtc_time.h     -> mbed_rtc_time.h
semihost_api.h -> mbed_semihost_api.h
wait_api.h     -> mbed_wait_api.h
@geky
Copy link
Contributor Author

geky commented Feb 23, 2017

Updated again
/morph test-nightly

@bridadan
Copy link
Contributor

Ooops, bot was down....

/morph test-nightly

@mbed-bot
Copy link

Result: SUCCESS

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

/morph test-nightly

Output

mbed Build Number: 1682

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.

Inconsistent header file naming. critical.h should be mbed_critical.h
7 participants