From b8880d0b4e247585512cdfa8545b78f2d1887573 Mon Sep 17 00:00:00 2001 From: Adam Greig Date: Mon, 16 Oct 2023 01:33:34 +0100 Subject: [PATCH] Move cortex-m crate into cortex-m directory --- .gitignore | 4 - Cargo.toml | 49 +---- README.md | 42 ++-- cortex-m-rt/LICENSE-APACHE | 201 ------------------ cortex-m-rt/LICENSE-MIT | 25 --- CHANGELOG.md => cortex-m/CHANGELOG.md | 0 cortex-m/Cargo.toml | 46 ++++ cortex-m/README.md | 39 ++++ build.rs => cortex-m/build.rs | 0 {src => cortex-m/src}/asm.rs | 0 {src => cortex-m/src}/cmse.rs | 0 {src => cortex-m/src}/critical_section.rs | 0 {src => cortex-m/src}/delay.rs | 0 {src => cortex-m/src}/interrupt.rs | 0 {src => cortex-m/src}/itm.rs | 0 {src => cortex-m/src}/lib.rs | 0 {src => cortex-m/src}/macros.rs | 0 {src => cortex-m/src}/peripheral/ac.rs | 0 {src => cortex-m/src}/peripheral/cbp.rs | 0 {src => cortex-m/src}/peripheral/cpuid.rs | 0 {src => cortex-m/src}/peripheral/dcb.rs | 0 {src => cortex-m/src}/peripheral/dwt.rs | 0 {src => cortex-m/src}/peripheral/fpb.rs | 0 {src => cortex-m/src}/peripheral/fpu.rs | 0 {src => cortex-m/src}/peripheral/icb.rs | 0 {src => cortex-m/src}/peripheral/itm.rs | 0 {src => cortex-m/src}/peripheral/mod.rs | 0 {src => cortex-m/src}/peripheral/mpu.rs | 0 {src => cortex-m/src}/peripheral/nvic.rs | 0 {src => cortex-m/src}/peripheral/sau.rs | 0 {src => cortex-m/src}/peripheral/scb.rs | 0 {src => cortex-m/src}/peripheral/syst.rs | 0 {src => cortex-m/src}/peripheral/test.rs | 0 {src => cortex-m/src}/peripheral/tpiu.rs | 0 {src => cortex-m/src}/register/apsr.rs | 0 {src => cortex-m/src}/register/basepri.rs | 0 {src => cortex-m/src}/register/basepri_max.rs | 0 {src => cortex-m/src}/register/control.rs | 0 {src => cortex-m/src}/register/faultmask.rs | 0 {src => cortex-m/src}/register/fpscr.rs | 0 {src => cortex-m/src}/register/lr.rs | 0 {src => cortex-m/src}/register/mod.rs | 0 {src => cortex-m/src}/register/msp.rs | 0 {src => cortex-m/src}/register/msplim.rs | 0 {src => cortex-m/src}/register/pc.rs | 0 {src => cortex-m/src}/register/primask.rs | 0 {src => cortex-m/src}/register/psp.rs | 0 {src => cortex-m/src}/register/psplim.rs | 0 48 files changed, 106 insertions(+), 300 deletions(-) delete mode 100644 cortex-m-rt/LICENSE-APACHE delete mode 100644 cortex-m-rt/LICENSE-MIT rename CHANGELOG.md => cortex-m/CHANGELOG.md (100%) create mode 100644 cortex-m/Cargo.toml create mode 100644 cortex-m/README.md rename build.rs => cortex-m/build.rs (100%) rename {src => cortex-m/src}/asm.rs (100%) rename {src => cortex-m/src}/cmse.rs (100%) rename {src => cortex-m/src}/critical_section.rs (100%) rename {src => cortex-m/src}/delay.rs (100%) rename {src => cortex-m/src}/interrupt.rs (100%) rename {src => cortex-m/src}/itm.rs (100%) rename {src => cortex-m/src}/lib.rs (100%) rename {src => cortex-m/src}/macros.rs (100%) rename {src => cortex-m/src}/peripheral/ac.rs (100%) rename {src => cortex-m/src}/peripheral/cbp.rs (100%) rename {src => cortex-m/src}/peripheral/cpuid.rs (100%) rename {src => cortex-m/src}/peripheral/dcb.rs (100%) rename {src => cortex-m/src}/peripheral/dwt.rs (100%) rename {src => cortex-m/src}/peripheral/fpb.rs (100%) rename {src => cortex-m/src}/peripheral/fpu.rs (100%) rename {src => cortex-m/src}/peripheral/icb.rs (100%) rename {src => cortex-m/src}/peripheral/itm.rs (100%) rename {src => cortex-m/src}/peripheral/mod.rs (100%) rename {src => cortex-m/src}/peripheral/mpu.rs (100%) rename {src => cortex-m/src}/peripheral/nvic.rs (100%) rename {src => cortex-m/src}/peripheral/sau.rs (100%) rename {src => cortex-m/src}/peripheral/scb.rs (100%) rename {src => cortex-m/src}/peripheral/syst.rs (100%) rename {src => cortex-m/src}/peripheral/test.rs (100%) rename {src => cortex-m/src}/peripheral/tpiu.rs (100%) rename {src => cortex-m/src}/register/apsr.rs (100%) rename {src => cortex-m/src}/register/basepri.rs (100%) rename {src => cortex-m/src}/register/basepri_max.rs (100%) rename {src => cortex-m/src}/register/control.rs (100%) rename {src => cortex-m/src}/register/faultmask.rs (100%) rename {src => cortex-m/src}/register/fpscr.rs (100%) rename {src => cortex-m/src}/register/lr.rs (100%) rename {src => cortex-m/src}/register/mod.rs (100%) rename {src => cortex-m/src}/register/msp.rs (100%) rename {src => cortex-m/src}/register/msplim.rs (100%) rename {src => cortex-m/src}/register/pc.rs (100%) rename {src => cortex-m/src}/register/primask.rs (100%) rename {src => cortex-m/src}/register/psp.rs (100%) rename {src => cortex-m/src}/register/psplim.rs (100%) diff --git a/.gitignore b/.gitignore index 9c3fcb43..49841bb1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,4 @@ *.org -*.rs.bk .#* Cargo.lock -bin/*.after -bin/*.before -bin/*.o target diff --git a/Cargo.toml b/Cargo.toml index f6ac580f..059853a0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,41 +1,7 @@ -[package] -authors = [ - "The Cortex-M Team ", - "Jorge Aparicio ", -] -categories = ["embedded", "hardware-support", "no-std"] -description = "Low level access to Cortex-M processors" -documentation = "https://docs.rs/cortex-m" -keywords = ["arm", "cortex-m", "register", "peripheral"] -license = "MIT OR Apache-2.0" -name = "cortex-m" -readme = "README.md" -repository = "https://github.com/rust-embedded/cortex-m" -version = "0.7.4" -edition = "2021" -rust-version = "1.59" -links = "cortex-m" # prevent multiple versions of this crate to be linked together - -[dependencies] -critical-section = "1.0.0" -volatile-register = "0.2.0" -bitfield = "0.13.2" -embedded-hal = "0.2.4" - -[dependencies.serde] -version = "1" -features = [ "derive" ] -optional = true - -[features] -cm7 = [] -cm7-r0p1 = ["cm7"] -linker-plugin-lto = [] -std = [] -critical-section-single-core = ["critical-section/restore-state-bool"] - [workspace] +resolver = "2" members = [ + "cortex-m", "cortex-m-rt", "cortex-m-semihosting", "panic-itm", @@ -45,14 +11,3 @@ members = [ "testsuite/minitest/macros", "xtask", ] - -[package.metadata.docs.rs] -targets = [ - "thumbv8m.main-none-eabihf", - "thumbv6m-none-eabi", - "thumbv7em-none-eabi", - "thumbv7em-none-eabihf", - "thumbv7m-none-eabi", - "thumbv8m.base-none-eabi", - "thumbv8m.main-none-eabi" -] diff --git a/README.md b/README.md index a0457651..b4885bfd 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,23 @@ -[![crates.io](https://img.shields.io/crates/d/cortex-m.svg)](https://crates.io/crates/cortex-m) -[![crates.io](https://img.shields.io/crates/v/cortex-m.svg)](https://crates.io/crates/cortex-m) +# Cortex-M crates -# `cortex-m` +This repository contains various crates useful for writing Rust programs +on Cortex-M microcontrollers: -> Low level access to Cortex-M processors +* [`cortex-m`]: CPU peripheral access and intrinsics +* [`cortex-m-rt`]: Startup code and interrupt handling +* [`cortex-m-semihosting`]: Support for semihosting debugging +* [`cortex-m-interrupt-number`]: Shared trait for interacting with peripheral access crates +* [`panic-itm`]: Panic handler that sends messages over the ITM/SWO output +* [`panic-semihosting`]: Panic handler that sends messages over semihosting -This project is developed and maintained by the [Cortex-M team][team]. - -## [Documentation](https://docs.rs/crate/cortex-m) - -## Minimum Supported Rust Version (MSRV) - -This crate is guaranteed to compile on stable Rust 1.59 and up. It might compile with older versions but that may change in any new patch release. +[`cortex-m`]: https://crates.io/crates/cortex-m +[`cortex-m-rt`]: https://crates.io/crates/cortex-m-rt +[`cortex-m-semihosting`]: https://crates.io/crates/cortex-m-semihosting +[`cortex-m-interrupt-number`]: https://crates.io/crates/cortex-m-interrupt-number +[`panic-itm`]: https://crates.io/crates/panic-itm +[`panic-semihosting`]: https://crates.io/crates/panic-semihosting -## License - -Licensed under either of - -- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or - http://www.apache.org/licenses/LICENSE-2.0) -- MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT) - -at your option. +This project is developed and maintained by the [Cortex-M team][team]. ### Contribution @@ -31,9 +27,9 @@ additional terms or conditions. ## Code of Conduct -Contribution to this crate is organized under the terms of the [Rust Code of -Conduct][CoC], the maintainer of this crate, the [Cortex-M team][team], promises -to intervene to uphold that code of conduct. +Contribution to this repository is organized under the terms of the [Rust Code +of Conduct][CoC], the maintainer of this crate, the [Cortex-M team][team], +promises to intervene to uphold that code of conduct. [CoC]: CODE_OF_CONDUCT.md [team]: https://github.com/rust-embedded/wg#the-cortex-m-team diff --git a/cortex-m-rt/LICENSE-APACHE b/cortex-m-rt/LICENSE-APACHE deleted file mode 100644 index 16fe87b0..00000000 --- a/cortex-m-rt/LICENSE-APACHE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/cortex-m-rt/LICENSE-MIT b/cortex-m-rt/LICENSE-MIT deleted file mode 100644 index a128ba40..00000000 --- a/cortex-m-rt/LICENSE-MIT +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2017 Jorge Aparicio - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. diff --git a/CHANGELOG.md b/cortex-m/CHANGELOG.md similarity index 100% rename from CHANGELOG.md rename to cortex-m/CHANGELOG.md diff --git a/cortex-m/Cargo.toml b/cortex-m/Cargo.toml new file mode 100644 index 00000000..cdd63bd9 --- /dev/null +++ b/cortex-m/Cargo.toml @@ -0,0 +1,46 @@ +[package] +authors = [ + "The Cortex-M Team ", + "Jorge Aparicio ", +] +categories = ["embedded", "hardware-support", "no-std"] +description = "Low level access to Cortex-M processors" +documentation = "https://docs.rs/cortex-m" +keywords = ["arm", "cortex-m", "register", "peripheral"] +license = "MIT OR Apache-2.0" +name = "cortex-m" +readme = "README.md" +repository = "https://github.com/rust-embedded/cortex-m" +version = "0.7.4" +edition = "2021" +rust-version = "1.59" +links = "cortex-m" # prevent multiple versions of this crate to be linked together + +[dependencies] +critical-section = "1.0.0" +volatile-register = "0.2.0" +bitfield = "0.13.2" +embedded-hal = "0.2.4" + +[dependencies.serde] +version = "1" +features = [ "derive" ] +optional = true + +[features] +cm7 = [] +cm7-r0p1 = ["cm7"] +linker-plugin-lto = [] +std = [] +critical-section-single-core = ["critical-section/restore-state-bool"] + +[package.metadata.docs.rs] +targets = [ + "thumbv8m.main-none-eabihf", + "thumbv6m-none-eabi", + "thumbv7em-none-eabi", + "thumbv7em-none-eabihf", + "thumbv7m-none-eabi", + "thumbv8m.base-none-eabi", + "thumbv8m.main-none-eabi" +] diff --git a/cortex-m/README.md b/cortex-m/README.md new file mode 100644 index 00000000..a0457651 --- /dev/null +++ b/cortex-m/README.md @@ -0,0 +1,39 @@ +[![crates.io](https://img.shields.io/crates/d/cortex-m.svg)](https://crates.io/crates/cortex-m) +[![crates.io](https://img.shields.io/crates/v/cortex-m.svg)](https://crates.io/crates/cortex-m) + +# `cortex-m` + +> Low level access to Cortex-M processors + +This project is developed and maintained by the [Cortex-M team][team]. + +## [Documentation](https://docs.rs/crate/cortex-m) + +## Minimum Supported Rust Version (MSRV) + +This crate is guaranteed to compile on stable Rust 1.59 and up. It might compile with older versions but that may change in any new patch release. + +## License + +Licensed under either of + +- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or + http://www.apache.org/licenses/LICENSE-2.0) +- MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT) + +at your option. + +### Contribution + +Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the +work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any +additional terms or conditions. + +## Code of Conduct + +Contribution to this crate is organized under the terms of the [Rust Code of +Conduct][CoC], the maintainer of this crate, the [Cortex-M team][team], promises +to intervene to uphold that code of conduct. + +[CoC]: CODE_OF_CONDUCT.md +[team]: https://github.com/rust-embedded/wg#the-cortex-m-team diff --git a/build.rs b/cortex-m/build.rs similarity index 100% rename from build.rs rename to cortex-m/build.rs diff --git a/src/asm.rs b/cortex-m/src/asm.rs similarity index 100% rename from src/asm.rs rename to cortex-m/src/asm.rs diff --git a/src/cmse.rs b/cortex-m/src/cmse.rs similarity index 100% rename from src/cmse.rs rename to cortex-m/src/cmse.rs diff --git a/src/critical_section.rs b/cortex-m/src/critical_section.rs similarity index 100% rename from src/critical_section.rs rename to cortex-m/src/critical_section.rs diff --git a/src/delay.rs b/cortex-m/src/delay.rs similarity index 100% rename from src/delay.rs rename to cortex-m/src/delay.rs diff --git a/src/interrupt.rs b/cortex-m/src/interrupt.rs similarity index 100% rename from src/interrupt.rs rename to cortex-m/src/interrupt.rs diff --git a/src/itm.rs b/cortex-m/src/itm.rs similarity index 100% rename from src/itm.rs rename to cortex-m/src/itm.rs diff --git a/src/lib.rs b/cortex-m/src/lib.rs similarity index 100% rename from src/lib.rs rename to cortex-m/src/lib.rs diff --git a/src/macros.rs b/cortex-m/src/macros.rs similarity index 100% rename from src/macros.rs rename to cortex-m/src/macros.rs diff --git a/src/peripheral/ac.rs b/cortex-m/src/peripheral/ac.rs similarity index 100% rename from src/peripheral/ac.rs rename to cortex-m/src/peripheral/ac.rs diff --git a/src/peripheral/cbp.rs b/cortex-m/src/peripheral/cbp.rs similarity index 100% rename from src/peripheral/cbp.rs rename to cortex-m/src/peripheral/cbp.rs diff --git a/src/peripheral/cpuid.rs b/cortex-m/src/peripheral/cpuid.rs similarity index 100% rename from src/peripheral/cpuid.rs rename to cortex-m/src/peripheral/cpuid.rs diff --git a/src/peripheral/dcb.rs b/cortex-m/src/peripheral/dcb.rs similarity index 100% rename from src/peripheral/dcb.rs rename to cortex-m/src/peripheral/dcb.rs diff --git a/src/peripheral/dwt.rs b/cortex-m/src/peripheral/dwt.rs similarity index 100% rename from src/peripheral/dwt.rs rename to cortex-m/src/peripheral/dwt.rs diff --git a/src/peripheral/fpb.rs b/cortex-m/src/peripheral/fpb.rs similarity index 100% rename from src/peripheral/fpb.rs rename to cortex-m/src/peripheral/fpb.rs diff --git a/src/peripheral/fpu.rs b/cortex-m/src/peripheral/fpu.rs similarity index 100% rename from src/peripheral/fpu.rs rename to cortex-m/src/peripheral/fpu.rs diff --git a/src/peripheral/icb.rs b/cortex-m/src/peripheral/icb.rs similarity index 100% rename from src/peripheral/icb.rs rename to cortex-m/src/peripheral/icb.rs diff --git a/src/peripheral/itm.rs b/cortex-m/src/peripheral/itm.rs similarity index 100% rename from src/peripheral/itm.rs rename to cortex-m/src/peripheral/itm.rs diff --git a/src/peripheral/mod.rs b/cortex-m/src/peripheral/mod.rs similarity index 100% rename from src/peripheral/mod.rs rename to cortex-m/src/peripheral/mod.rs diff --git a/src/peripheral/mpu.rs b/cortex-m/src/peripheral/mpu.rs similarity index 100% rename from src/peripheral/mpu.rs rename to cortex-m/src/peripheral/mpu.rs diff --git a/src/peripheral/nvic.rs b/cortex-m/src/peripheral/nvic.rs similarity index 100% rename from src/peripheral/nvic.rs rename to cortex-m/src/peripheral/nvic.rs diff --git a/src/peripheral/sau.rs b/cortex-m/src/peripheral/sau.rs similarity index 100% rename from src/peripheral/sau.rs rename to cortex-m/src/peripheral/sau.rs diff --git a/src/peripheral/scb.rs b/cortex-m/src/peripheral/scb.rs similarity index 100% rename from src/peripheral/scb.rs rename to cortex-m/src/peripheral/scb.rs diff --git a/src/peripheral/syst.rs b/cortex-m/src/peripheral/syst.rs similarity index 100% rename from src/peripheral/syst.rs rename to cortex-m/src/peripheral/syst.rs diff --git a/src/peripheral/test.rs b/cortex-m/src/peripheral/test.rs similarity index 100% rename from src/peripheral/test.rs rename to cortex-m/src/peripheral/test.rs diff --git a/src/peripheral/tpiu.rs b/cortex-m/src/peripheral/tpiu.rs similarity index 100% rename from src/peripheral/tpiu.rs rename to cortex-m/src/peripheral/tpiu.rs diff --git a/src/register/apsr.rs b/cortex-m/src/register/apsr.rs similarity index 100% rename from src/register/apsr.rs rename to cortex-m/src/register/apsr.rs diff --git a/src/register/basepri.rs b/cortex-m/src/register/basepri.rs similarity index 100% rename from src/register/basepri.rs rename to cortex-m/src/register/basepri.rs diff --git a/src/register/basepri_max.rs b/cortex-m/src/register/basepri_max.rs similarity index 100% rename from src/register/basepri_max.rs rename to cortex-m/src/register/basepri_max.rs diff --git a/src/register/control.rs b/cortex-m/src/register/control.rs similarity index 100% rename from src/register/control.rs rename to cortex-m/src/register/control.rs diff --git a/src/register/faultmask.rs b/cortex-m/src/register/faultmask.rs similarity index 100% rename from src/register/faultmask.rs rename to cortex-m/src/register/faultmask.rs diff --git a/src/register/fpscr.rs b/cortex-m/src/register/fpscr.rs similarity index 100% rename from src/register/fpscr.rs rename to cortex-m/src/register/fpscr.rs diff --git a/src/register/lr.rs b/cortex-m/src/register/lr.rs similarity index 100% rename from src/register/lr.rs rename to cortex-m/src/register/lr.rs diff --git a/src/register/mod.rs b/cortex-m/src/register/mod.rs similarity index 100% rename from src/register/mod.rs rename to cortex-m/src/register/mod.rs diff --git a/src/register/msp.rs b/cortex-m/src/register/msp.rs similarity index 100% rename from src/register/msp.rs rename to cortex-m/src/register/msp.rs diff --git a/src/register/msplim.rs b/cortex-m/src/register/msplim.rs similarity index 100% rename from src/register/msplim.rs rename to cortex-m/src/register/msplim.rs diff --git a/src/register/pc.rs b/cortex-m/src/register/pc.rs similarity index 100% rename from src/register/pc.rs rename to cortex-m/src/register/pc.rs diff --git a/src/register/primask.rs b/cortex-m/src/register/primask.rs similarity index 100% rename from src/register/primask.rs rename to cortex-m/src/register/primask.rs diff --git a/src/register/psp.rs b/cortex-m/src/register/psp.rs similarity index 100% rename from src/register/psp.rs rename to cortex-m/src/register/psp.rs diff --git a/src/register/psplim.rs b/cortex-m/src/register/psplim.rs similarity index 100% rename from src/register/psplim.rs rename to cortex-m/src/register/psplim.rs