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

Refactor hal directory #13489

Merged
merged 3 commits into from Sep 2, 2020
Merged

Conversation

rajkan01
Copy link
Contributor

@rajkan01 rajkan01 commented Aug 25, 2020

Summary of changes

Restructured hal as per the new directory structure proposal:

hal
├── include 
│   └── hal
│       └── [...]
├── source
│       ├── mpu 
│       └── [...]
├── usb
│     ├── include 
│     │   └── usb
│     │       └── [...]
│     └── source
│         └── [...] 
└── tests    
    └── TESTS
        └── [...]

Note:
Duplicated below TESTS/host_tests script into hal/tests/TESTS as the current build tool is looking for host_tests in that directory. Already raised an internal ticket to remove this duplicate scripts once build tools can able to pick the scripts from a common location

  • mbed-os/hal/tests/TESTS/host_tests/rtc_calc_auto.py
  • mbed-os/hal/tests/TESTS/host_tests/reset_reason.py
  • mbed-os/hal/tests/TESTS/host_tests/sync_on_reset.py
  • mbed-os/hal/tests/TESTS/host_tests/rtc_reset.py
  • mbed-os/hal/tests/TESTS/host_tests/timing_drift_auto.py
  • mbed-os/hal/tests/TESTS/host_tests/system_reset.py
  • mbed-os/hal/tests/TESTS/host_tests/trng_reset.py
  • mbed-os/hal/tests/TESTS/host_tests/watchdog_reset.py

Impact of changes

None.

Migration actions required

None.

Documentation

To be updated


Pull request type

[x] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[x] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Manual testing: (Build for K64F target with GCC_ARM toolchain)

  • mbed-os-example-blinky
  • Greentea tests: Full profile build and run
  • Unit tests build and run

Reviewers

@0xc0170 @ARMmbed/mbed-os-core


@ciarmcom ciarmcom added the release-type: patch Indentifies a PR as containing just a patch label Aug 25, 2020
@ciarmcom ciarmcom requested review from 0xc0170 and a team August 25, 2020 14:30
@ciarmcom
Copy link
Member

@rajkan01, thank you for your changes.
@0xc0170 @ARMmbed/mbed-os-hal @ARMmbed/mbed-os-maintainers please review.

Copy link
Contributor

@evedon evedon left a comment

Choose a reason for hiding this comment

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

Code change is fine

@mergify mergify bot added needs: CI and removed needs: work labels Aug 25, 2020
Copy link

@MarceloSalazar MarceloSalazar 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

@rajkan01
Copy link
Contributor Author

@0xc0170 Could you review and start the CI for this PR Thanks

@0Grit
Copy link

0Grit commented Aug 25, 2020

Why "hal/include/hal/"?

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 26, 2020

CI started

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 26, 2020

Why "hal/include/hal/"?

In CMake for illustration: Include paths are set to: hal/include and hal/include/hal (second is for backward compatibility, the former is recommended). A user would include as #include hal/hal_header.h or possibly #include hal_header.h

@evedon
Copy link
Contributor

evedon commented Aug 26, 2020

Why "hal/include/hal/"?

We are following this convention for all components/libraries to avoid ambiguity for public headers. With this new include-style (and once the new build system is ready), all public headers will be references as <library-name>/<header>.h.
In the case of the hal, the headers should normally not be used by developpers but regardless, as a component and for consistency sake, it should follow the new directory structure.

@mbed-ci
Copy link

mbed-ci commented Aug 26, 2020

Jenkins CI Test : ❌ FAILED

Build Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_build-ARM ✔️
jenkins-ci/mbed-os-ci_build-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_dynamic-memory-usage ✔️
jenkins-ci/mbed-os-ci_cloud-client-pytest ✔️
jenkins-ci/mbed-os-ci_greentea-test

@mergify mergify bot added needs: work and removed needs: CI labels Aug 26, 2020
@rajkan01
Copy link
Contributor Author

rajkan01 commented Sep 1, 2020

@0xc0170 Greentea test failure related to device issue, could you restart the greentea test

[1598436004.93][GLRM][ERR] Write response(request_id: e143a89a-e782-11ea-bd7b-0242ac110006) timeout!
[1598436004.93][urllib3.connectionpool]Starting new HTTPS connection (1): hanna.mbedcloudtesting.com:443
[1598436013.06][urllib3.connectionpool]https://hanna.mbedcloudtesting.com:443 "PUT /resource/07400221064666333902F04E/disconnect HTTP/1.1" 200 62
[1598436016.36][HTST][ERR] remote write error: Write response(request_id: e143a89a-e782-11ea-bd7b-0242ac110006) timeout!
[1598436016.36][HTST][WRN] stopped to consume events due to __notify_conn_lost event

@rajkan01
Copy link
Contributor Author

rajkan01 commented Sep 1, 2020

@0xc0170 Greentea test failed again but this is a problem with mbed_NUCLEO_F411RE#1 MRFE4 target in Hanna RAAS server so requested Qinghao to put the target into maintenance mode and He did that so and the target is no longer available. Could you restart the CI greentea test

@0xc0170
Copy link
Contributor

0xc0170 commented Sep 1, 2020

I restarted the entire pipeline to clear pr-head

@mbed-ci
Copy link

mbed-ci commented Sep 1, 2020

Jenkins CI Test : ✔️ SUCCESS

Build Number: 2 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_build-ARM ✔️
jenkins-ci/mbed-os-ci_build-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_dynamic-memory-usage ✔️
jenkins-ci/mbed-os-ci_greentea-test ✔️
jenkins-ci/mbed-os-ci_cloud-client-pytest ✔️

@rajkan01
Copy link
Contributor Author

rajkan01 commented Sep 1, 2020

@0xc0170 CI passed for this PR, please merge

@0xc0170 0xc0170 merged commit 9073a48 into ARMmbed:master Sep 2, 2020
@mergify mergify bot removed the ready for merge label Sep 2, 2020
@mbedmain mbedmain added release-version: 6.3.0 Release-pending and removed release-type: patch Indentifies a PR as containing just a patch Release-pending labels Sep 14, 2020
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

9 participants