Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rust-embedded/cortex-m
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.7.7
Choose a base ref
...
head repository: rust-embedded/cortex-m
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Mar 12, 2017

  1. initial commit

    Jorge Aparicio committed Mar 12, 2017
    Copy the full SHA
    1f2c429 View commit details

Commits on Apr 4, 2017

  1. force the linker to keep the entry point around

    a sane linker shouldn't throw the entry point symbol away but some newer
    versions of gcc do
    Jorge Aparicio committed Apr 4, 2017
    Copy the full SHA
    d92ecc1 View commit details

Commits on Apr 7, 2017

  1. make the reset handler private

    Jorge Aparicio committed Apr 7, 2017
    Copy the full SHA
    eeaf566 View commit details

Commits on Apr 9, 2017

  1. add .init_array support

    Jorge Aparicio committed Apr 9, 2017
    Copy the full SHA
    201d4e2 View commit details
  2. Merge pull request #1 from japaric/used

    make the reset handler private
    Jorge Aparicio authored Apr 9, 2017
    Copy the full SHA
    f072735 View commit details
  3. stub exception handlers by default, change name of interrupt/exceptio…

    …n sections
    Jorge Aparicio committed Apr 9, 2017
    Copy the full SHA
    58b0570 View commit details

Commits on Apr 10, 2017

  1. remove .init_array support

    Jorge Aparicio committed Apr 10, 2017
    Copy the full SHA
    f2ff000 View commit details
  2. Merge pull request #2 from japaric/ng

    stub exceptions by default, drop .init_array support
    Jorge Aparicio authored Apr 10, 2017
    Copy the full SHA
    9c95cbd View commit details

Commits on Apr 11, 2017

  1. remove .init_array from the linker script

    Jorge Aparicio committed Apr 11, 2017
    Copy the full SHA
    78573f9 View commit details

Commits on Apr 12, 2017

  1. drop the direct dependency on compiler-builtins

    this crate is part of the Xargo sysroot and the dependency should be
    implicit (to e.g. avoid linking to the same crate twice)
    Jorge Aparicio committed Apr 12, 2017
    Copy the full SHA
    3b08a99 View commit details
  2. add documentation

    Jorge Aparicio committed Apr 12, 2017
    Copy the full SHA
    3d145f9 View commit details
  3. Merge pull request #3 from japaric/next

    drop compiler-builtins dependency, add documentation
    Jorge Aparicio authored Apr 12, 2017
    Copy the full SHA
    bd2f05a View commit details
  4. improve the linker error messages

    Jorge Aparicio committed Apr 12, 2017
    Copy the full SHA
    bb41c70 View commit details
  5. make the "linker-script" Cargo feature opt-out

    Jorge Aparicio committed Apr 12, 2017
    Copy the full SHA
    a214bad View commit details
  6. Merge pull request #4 from japaric/dev

    make the "linker-script" Cargo feature opt-out
    Jorge Aparicio authored Apr 12, 2017
    Copy the full SHA
    fad0f28 View commit details
  7. Usage -> Example

    Jorge Aparicio committed Apr 12, 2017
    Copy the full SHA
    603a10f View commit details
  8. v0.1.0

    Jorge Aparicio committed Apr 12, 2017
    Copy the full SHA
    f2ce9a5 View commit details
  9. improve linker error messages

    Jorge Aparicio committed Apr 12, 2017
    Copy the full SHA
    6080d29 View commit details

Commits on Apr 15, 2017

  1. v0.1.1

    Jorge Aparicio committed Apr 15, 2017
    Copy the full SHA
    36ea73c View commit details

Commits on Apr 22, 2017

  1. v0.1.2

    japaric committed Apr 22, 2017
    Copy the full SHA
    a5363f5 View commit details

Commits on Apr 24, 2017

  1. Copy the full SHA
    adef5af View commit details

Commits on Apr 26, 2017

  1. v0.1.3

    japaric committed Apr 26, 2017
    Copy the full SHA
    1e03f51 View commit details
  2. Copy the full SHA
    945c5d0 View commit details

Commits on Apr 27, 2017

  1. v0.2.0

    japaric committed Apr 27, 2017
    Copy the full SHA
    9cf6745 View commit details
  2. Copy the full SHA
    4d1cf60 View commit details

Commits on Apr 30, 2017

  1. Mark .debug_gdb_scripts as non-allocatable.

    See the discussion in rust-lang/rust#41627
    for an explanation of why this is necessary.
    whitequark authored Apr 30, 2017
    Copy the full SHA
    d86829a View commit details

Commits on May 6, 2017

  1. Merge pull request #7 from whitequark/patch-1

    Mark .debug_gdb_scripts as non-allocatable
    japaric authored May 6, 2017
    Copy the full SHA
    2adb3a2 View commit details

Commits on May 7, 2017

  1. v0.2.1

    japaric committed May 7, 2017
    Copy the full SHA
    6410a65 View commit details

Commits on May 26, 2017

  1. Explicitly place non-suffixed sections

    The `*(.data.*);` command does not place the `.data` section, which may lead
    to incorrect placement of symbols, etc. I have not verified that the current
    linker script leads to broken products, but if not it is by accident.
    whitequark authored May 26, 2017
    Copy the full SHA
    bf375ae View commit details
  2. Merge pull request #9 from whitequark/patch-2

    Explicitly place non-suffixed sections
    japaric authored May 26, 2017
    Copy the full SHA
    2d30f46 View commit details
  3. Rename __exceptions/__interrupts symbols to reduce confusion.

    Right now these symbols get placed *after* their respective contents,
    but not named to indicate that.
    whitequark committed May 26, 2017
    Copy the full SHA
    aa2321c View commit details
  4. Merge pull request #10 from whitequark/patch-3

    Rename __exceptions/__interrupts symbols to reduce confusion
    japaric authored May 26, 2017
    Copy the full SHA
    e6f4b1e View commit details
  5. reorders the linker sections; make the reset_handler the entry point

    Before this commit the .rodata sections of the inputs were placed in the output
    .text section. As the vector table is in the .rodata of the cortex-m-rt crate
    this placed the vector table first in the output .text section:
    
    ``` console
    $ arm-none-eabi-objdump -Cd hello
    Disassembly of section .text:
    
    08000000 <_VECTOR_TABLE>:
     8000000:       10002000        .word   0x10002000
    
    08000004 <cortex_m_rt::RESET_HANDLER>:
     8000004:       08000405                                ....
    (..)
    
    $ arm-none-eabi-readelf -h hello | grep Entry
      Entry point address:               0x8000000
    ```
    
    With this memory layout using `load` and then `step` on a GDB session made the
    processor execute the vector table (PC = 0x08000000).
    
    This commit places the .rodata sections of the inputs into the output .rodata
    section, and also moves the reset_handler code to the start the output .text
    section. This turns the reset_handler into the entry point of the program.
    
    ``` console
    $ arm-none-eabi-objdump -Cd hello
    Disassembly of section .text:
    
    08000410 <cortex_m_rt::reset_handler>:
    (..)
    
    $ arm-none-eabi-readelf -h hello | grep Entry
      Entry point address:               0x8000410
    ```
    
    With these changes the GDB commands `load` and `step` work correctly: `load`
    sets the PC = reset_handler.
    
    Also the `size` output is now more helpful:
    
    ``` console
    $ arm-none-eabi-size -Ax hello
    section                 size         addr
    .vector_table          0x400    0x8000000
    .text                  0x120    0x8000400
    .rodata                  0xd    0x8000520
    .bss                     0x4   0x20000000
    .data                    0x4   0x20000004
    ```
    japaric committed May 26, 2017
    Copy the full SHA
    7895609 View commit details
  6. Copy the full SHA
    44995b0 View commit details

Commits on May 27, 2017

  1. update CHANGELOG; revert .rodata to .vector_table rename in input sec…

    …tions
    
    downstream crates depend on the name of those linker sections. Avoiding the
    rename let us release a patch version instead of a minor one.
    japaric committed May 27, 2017
    Copy the full SHA
    6f86357 View commit details
  2. Merge pull request #8 from japaric/entry

    reorder the linker sections; make reset_handler the entry point
    japaric authored May 27, 2017
    Copy the full SHA
    890cc3b View commit details
  3. Copy the full SHA
    4848357 View commit details
  4. Merge pull request #11 from japaric/heap

    add a _sheap symbol where a heap can be located
    japaric authored May 27, 2017
    Copy the full SHA
    7b2ac2e View commit details
  5. v0.2.2

    japaric committed May 27, 2017
    Copy the full SHA
    fe0ba08 View commit details

Commits on May 29, 2017

  1. Added a optional .reserved region between .vector_table and .text, se…

    …t text_offset in memory.x to override default value of 0
    kjetilkjeka committed May 29, 2017
    Copy the full SHA
    a88895f View commit details

Commits on May 30, 2017

  1. Copy the full SHA
    c3b5907 View commit details
  2. Copy the full SHA
    32e11ee View commit details
  3. Copy the full SHA
    321f5a0 View commit details
  4. Fixed typo

    kjetilkjeka committed May 30, 2017
    Copy the full SHA
    506fd6a View commit details
  5. Explicitly set start of .text instead of padding between .vector_tabl…

    …e and .data with a .reserved section. The main reason for this change was that assertions aren't evaluated after decrementing the location pointer (which happend when _stext < _einterrupts before this commit). If the .reserved region is in fact desired it's addition should be implemented in a different manner
    kjetilkjeka committed May 30, 2017
    Copy the full SHA
    f382845 View commit details

Commits on May 31, 2017

  1. Merge pull request #14 from kjetilkjeka/master

    [WIP] Optional .reserved region between .vector_table and .text
    japaric authored May 31, 2017
    Copy the full SHA
    5dcef21 View commit details
  2. v0.2.3

    japaric committed May 31, 2017
    Copy the full SHA
    f5f9afb View commit details

Commits on Jun 4, 2017

  1. Copy the full SHA
    d944077 View commit details
  2. v0.2.4

    japaric committed Jun 4, 2017
    Copy the full SHA
    a2af5e2 View commit details

Commits on Jun 25, 2017

  1. Copy the full SHA
    a81bb98 View commit details
Showing with 7,832 additions and 1,963 deletions.
  1. 0 .cargo/{config → config.toml}
  2. +0 −9 .github/bors.toml
  3. +9 −10 .github/workflows/ci.yml
  4. +8 −15 .github/workflows/clippy.yml
  5. +46 −8 .github/workflows/cron.yml
  6. +34 −0 .github/workflows/on-target.yml
  7. +85 −0 .github/workflows/rt-ci.yml
  8. +7 −10 .github/workflows/rustfmt.yml
  9. +0 −4 .gitignore
  10. +11 −46 Cargo.toml
  11. +19 −23 README.md
  12. +0 −1 asm-toolchain
  13. +0 −410 asm/inline.rs
  14. +0 −141 asm/lib.rs
  15. BIN bin/thumbv6m-none-eabi-lto.a
  16. BIN bin/thumbv6m-none-eabi.a
  17. BIN bin/thumbv7em-none-eabi-lto.a
  18. BIN bin/thumbv7em-none-eabi.a
  19. BIN bin/thumbv7em-none-eabihf-lto.a
  20. BIN bin/thumbv7em-none-eabihf.a
  21. BIN bin/thumbv7m-none-eabi-lto.a
  22. BIN bin/thumbv7m-none-eabi.a
  23. BIN bin/thumbv8m.base-none-eabi-lto.a
  24. BIN bin/thumbv8m.base-none-eabi.a
  25. BIN bin/thumbv8m.main-none-eabi-lto.a
  26. BIN bin/thumbv8m.main-none-eabi.a
  27. BIN bin/thumbv8m.main-none-eabihf-lto.a
  28. BIN bin/thumbv8m.main-none-eabihf.a
  29. +34 −0 cortex-m-rt/.cargo/config.toml
  30. +7 −0 cortex-m-rt/.gitignore
  31. +702 −0 cortex-m-rt/CHANGELOG.md
  32. +53 −0 cortex-m-rt/Cargo.toml
  33. +41 −0 cortex-m-rt/README.md
  34. +105 −0 cortex-m-rt/build.rs
  35. +87 −0 cortex-m-rt/ci/script.sh
  36. +33 −0 cortex-m-rt/examples/alignment.rs
  37. +27 −0 cortex-m-rt/examples/cfg-static.rs
  38. +31 −0 cortex-m-rt/examples/data_overflow.rs
  39. +37 −0 cortex-m-rt/examples/device.rs
  40. +18 −0 cortex-m-rt/examples/divergent-default-handler.rs
  41. +18 −0 cortex-m-rt/examples/divergent-exception.rs
  42. +20 −0 cortex-m-rt/examples/entry-static.rs
  43. +31 −0 cortex-m-rt/examples/hard-fault-trampoline.rs
  44. +13 −0 cortex-m-rt/examples/main.rs
  45. +17 −0 cortex-m-rt/examples/minimal.rs
  46. +29 −0 cortex-m-rt/examples/override-exception.rs
  47. +20 −0 cortex-m-rt/examples/pre_init.rs
  48. +34 −0 cortex-m-rt/examples/qemu.rs
  49. +24 −0 cortex-m-rt/examples/state.rs
  50. +16 −0 cortex-m-rt/examples/unsafe-default-handler.rs
  51. +13 −0 cortex-m-rt/examples/unsafe-entry.rs
  52. +16 −0 cortex-m-rt/examples/unsafe-exception.rs
  53. +18 −0 cortex-m-rt/examples/unsafe-hard-fault.rs
  54. +36 −0 cortex-m-rt/examples/unsafety.rs
  55. +51 −0 cortex-m-rt/examples/warnings.rs
  56. +279 −0 cortex-m-rt/link.x.in
  57. +23 −0 cortex-m-rt/macros/Cargo.toml
  58. +788 −0 cortex-m-rt/macros/src/lib.rs
  59. +1,299 −0 cortex-m-rt/src/lib.rs
  60. +7 −0 cortex-m-rt/tests/README.md
  61. +16 −0 cortex-m-rt/tests/compile-fail/default-handler-bad-signature-1.rs
  62. +18 −0 cortex-m-rt/tests/compile-fail/default-handler-bad-signature-2.rs
  63. +22 −0 cortex-m-rt/tests/compile-fail/default-handler-hidden.rs
  64. +22 −0 cortex-m-rt/tests/compile-fail/default-handler-twice.rs
  65. +32 −0 cortex-m-rt/tests/compile-fail/duplicate-static.rs
  66. +12 −0 cortex-m-rt/tests/compile-fail/entry-args.rs
  67. +11 −0 cortex-m-rt/tests/compile-fail/entry-bad-signature-1.rs
  68. +11 −0 cortex-m-rt/tests/compile-fail/entry-bad-signature-2.rs
  69. +13 −0 cortex-m-rt/tests/compile-fail/entry-bad-signature-3.rs
  70. +19 −0 cortex-m-rt/tests/compile-fail/entry-hidden.rs
  71. +26 −0 cortex-m-rt/tests/compile-fail/entry-soundness.rs
  72. +17 −0 cortex-m-rt/tests/compile-fail/entry-twice.rs
  73. +15 −0 cortex-m-rt/tests/compile-fail/exception-args.rs
  74. +16 −0 cortex-m-rt/tests/compile-fail/exception-bad-signature-1.rs
  75. +18 −0 cortex-m-rt/tests/compile-fail/exception-bad-signature-2.rs
  76. +22 −0 cortex-m-rt/tests/compile-fail/exception-hidden.rs
  77. +24 −0 cortex-m-rt/tests/compile-fail/exception-nmi-unsafe.rs
  78. +29 −0 cortex-m-rt/tests/compile-fail/exception-soundness.rs
  79. +22 −0 cortex-m-rt/tests/compile-fail/exception-twice.rs
  80. +16 −0 cortex-m-rt/tests/compile-fail/exception-v8only.rs
  81. +18 −0 cortex-m-rt/tests/compile-fail/hard-fault-bad-signature-1.rs
  82. +18 −0 cortex-m-rt/tests/compile-fail/hard-fault-bad-signature-2.rs
  83. +18 −0 cortex-m-rt/tests/compile-fail/hard-fault-bad-signature-3.rs
  84. +24 −0 cortex-m-rt/tests/compile-fail/hard-fault-hidden.rs
  85. +26 −0 cortex-m-rt/tests/compile-fail/hard-fault-twice-mixed-trampoline.rs
  86. +26 −0 cortex-m-rt/tests/compile-fail/hard-fault-twice.rs
  87. +20 −0 cortex-m-rt/tests/compile-fail/interrupt-args.rs
  88. +21 −0 cortex-m-rt/tests/compile-fail/interrupt-bad-signature-1.rs
  89. +23 −0 cortex-m-rt/tests/compile-fail/interrupt-bad-signature-2.rs
  90. +22 −0 cortex-m-rt/tests/compile-fail/interrupt-invalid.rs
  91. +15 −0 cortex-m-rt/tests/compile-fail/interrupt-not-reexported.rs
  92. +34 −0 cortex-m-rt/tests/compile-fail/interrupt-soundness.rs
  93. +31 −0 cortex-m-rt/tests/compile-fail/interrupt-twice.rs
  94. +44 −0 cortex-m-rt/tests/compile-fail/non-static-resource.rs
  95. +15 −0 cortex-m-rt/tests/compile-fail/pre-init-args.rs
  96. +16 −0 cortex-m-rt/tests/compile-fail/pre-init-bad-signature-1.rs
  97. +16 −0 cortex-m-rt/tests/compile-fail/pre-init-bad-signature-2.rs
  98. +23 −0 cortex-m-rt/tests/compile-fail/pre-init-hidden.rs
  99. +18 −0 cortex-m-rt/tests/compile-fail/pre-init-twice.rs
  100. +45 −0 cortex-m-rt/tests/compile-fail/unsafe-init-static.rs
  101. +32 −0 cortex-m-rt/tests/compile-fail/whitelist-1.rs
  102. +32 −0 cortex-m-rt/tests/compile-fail/whitelist-2.rs
  103. +32 −0 cortex-m-rt/tests/compile-fail/whitelist-3.rs
  104. +32 −0 cortex-m-rt/tests/compile-fail/whitelist-4.rs
  105. +13 −0 cortex-m-rt/tests/compile-fail/whitelist-double-attr.rs
  106. +22 −0 cortex-m-rt/tests/compiletest.rs
  107. +9 −1 cortex-m-semihosting/CHANGELOG.md
  108. +5 −4 cortex-m-semihosting/Cargo.toml
  109. +1 −1 cortex-m-semihosting/README.md
  110. +0 −1 cortex-m-semihosting/bin
  111. +2 −15 cortex-m-semihosting/build.rs
  112. +7 −9 cortex-m-semihosting/src/debug.rs
  113. +8 −6 cortex-m-semihosting/src/export.rs
  114. +3 −0 cortex-m-semihosting/src/hio.rs
  115. +17 −23 cortex-m-semihosting/src/lib.rs
  116. +50 −2 { → cortex-m}/CHANGELOG.md
  117. +47 −0 cortex-m/Cargo.toml
  118. +39 −0 cortex-m/README.md
  119. +14 −19 { → cortex-m}/build.rs
  120. +126 −41 { → cortex-m}/src/asm.rs
  121. +3 −3 { → cortex-m}/src/cmse.rs
  122. +24 −0 cortex-m/src/critical_section.rs
  123. +52 −17 { → cortex-m}/src/delay.rs
  124. +96 −0 cortex-m/src/interrupt.rs
  125. +2 −2 { → cortex-m}/src/itm.rs
  126. +24 −39 { → cortex-m}/src/lib.rs
  127. +39 −12 { → cortex-m}/src/macros.rs
  128. +1 −1 { → cortex-m}/src/peripheral/ac.rs
  129. 0 { → cortex-m}/src/peripheral/cbp.rs
  130. +2 −2 { → cortex-m}/src/peripheral/cpuid.rs
  131. +22 −1 { → cortex-m}/src/peripheral/dcb.rs
  132. +507 −0 cortex-m/src/peripheral/dwt.rs
  133. 0 { → cortex-m}/src/peripheral/fpb.rs
  134. 0 { → cortex-m}/src/peripheral/fpu.rs
  135. +3 −3 { → cortex-m}/src/peripheral/icb.rs
  136. +216 −0 cortex-m/src/peripheral/itm.rs
  137. +26 −104 { → cortex-m}/src/peripheral/mod.rs
  138. 0 { → cortex-m}/src/peripheral/mpu.rs
  139. +22 −15 { → cortex-m}/src/peripheral/nvic.rs
  140. +2 −3 { → cortex-m}/src/peripheral/sau.rs
  141. +53 −38 { → cortex-m}/src/peripheral/scb.rs
  142. +20 −6 { → cortex-m}/src/peripheral/syst.rs
  143. +11 −11 { → cortex-m}/src/peripheral/test.rs
  144. +160 −0 cortex-m/src/peripheral/tpiu.rs
  145. +6 −3 { → cortex-m}/src/register/apsr.rs
  146. +42 −0 cortex-m/src/register/basepri.rs
  147. +40 −0 cortex-m/src/register/basepri_max.rs
  148. +21 −2 { → cortex-m}/src/register/control.rs
  149. +6 −1 { → cortex-m}/src/register/faultmask.rs
  150. +5 −2 { → cortex-m}/src/register/fpscr.rs
  151. +20 −0 cortex-m/src/register/lr.rs
  152. +0 −5 { → cortex-m}/src/register/mod.rs
  153. +45 −0 cortex-m/src/register/msp.rs
  154. +17 −0 cortex-m/src/register/msplim.rs
  155. +20 −0 cortex-m/src/register/pc.rs
  156. +69 −0 cortex-m/src/register/primask.rs
  157. +22 −0 cortex-m/src/register/psp.rs
  158. +17 −0 cortex-m/src/register/psplim.rs
  159. +3 −0 device.x
  160. +23 −0 memory.x
  161. +5 −0 panic-itm/CHANGELOG.md
  162. +2 −1 panic-itm/Cargo.toml
  163. +1 −1 panic-itm/README.md
  164. +4 −3 panic-itm/src/lib.rs
  165. +7 −1 panic-semihosting/CHANGELOG.md
  166. +5 −4 panic-semihosting/Cargo.toml
  167. +1 −1 panic-semihosting/README.md
  168. +1 −9 panic-semihosting/src/lib.rs
  169. +0 −24 src/call_asm.rs
  170. +0 −73 src/interrupt.rs
  171. +0 −268 src/peripheral/dwt.rs
  172. +0 −71 src/peripheral/itm.rs
  173. +0 −31 src/peripheral/tpiu.rs
  174. +0 −3 src/prelude.rs
  175. +0 −24 src/register/basepri.rs
  176. +0 −21 src/register/basepri_max.rs
  177. +0 −17 src/register/lr.rs
  178. +0 −32 src/register/msp.rs
  179. +0 −13 src/register/msplim.rs
  180. +0 −17 src/register/pc.rs
  181. +0 −35 src/register/primask.rs
  182. +0 −13 src/register/psp.rs
  183. +0 −13 src/register/psplim.rs
  184. +6 −0 testsuite/.cargo/config.toml
  185. +17 −0 testsuite/Cargo.toml
  186. +69 −0 testsuite/README.md
  187. +25 −0 testsuite/build.rs
  188. +16 −0 testsuite/minitest/Cargo.toml
  189. +7 −0 testsuite/minitest/README.md
  190. +17 −0 testsuite/minitest/macros/Cargo.toml
  191. +316 −0 testsuite/minitest/macros/src/lib.rs
  192. +13 −0 testsuite/minitest/src/export.rs
  193. +59 −0 testsuite/minitest/src/lib.rs
  194. +89 −0 testsuite/src/main.rs
  195. +2 −2 xtask/Cargo.toml
  196. +20 −196 xtask/src/lib.rs
  197. +3 −7 xtask/src/main.rs
  198. +15 −14 xtask/tests/ci.rs
File renamed without changes.
9 changes: 0 additions & 9 deletions .github/bors.toml

This file was deleted.

19 changes: 9 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
on:
push:
branches: [ staging, trying, master ]
branches-ignore:
- "gh-readonly-queue/**"
pull_request:
merge_group:
workflow_dispatch:

name: CI
name: cortex-m CI

jobs:
ci-linux:
@@ -16,19 +19,15 @@ jobs:

include:
# Test MSRV
- rust: 1.38.0
- rust: 1.61.0

# Test nightly but don't fail
- rust: nightly
experimental: true
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Run tests
run: cargo test --all

# FIXME: test on macOS and Windows
run: cargo test --all --exclude cortex-m-rt --exclude testsuite --features cortex-m/critical-section-single-core
23 changes: 8 additions & 15 deletions .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,18 @@
on:
push:
branches: [ staging, trying, master ]
pull_request_target:
branches-ignore:
- "gh-readonly-queue/**"
pull_request:
merge_group:
workflow_dispatch:

name: Clippy check
jobs:
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
if: github.event_name == 'pull_request_target'
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
ref: refs/pull/${{ github.event.number }}/head
- uses: actions/checkout@v2
if: github.event_name != 'pull_request_target'
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: clippy
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- run: cargo clippy --all --features cortex-m/critical-section-single-core -- --deny warnings
54 changes: 46 additions & 8 deletions .github/workflows/cron.yml
Original file line number Diff line number Diff line change
@@ -2,22 +2,60 @@ on:
schedule:
# Run every week at 8am UTC Saturday.
- cron: '0 8 * * SAT'
workflow_dispatch:

name: Cron CI

jobs:
ci-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Run tests
run: cargo test --all
- uses: imjohnbo/issue-bot@v2
run: cargo test --all --exclude cortex-m-rt --exclude testsuite
- uses: imjohnbo/issue-bot@v3
if: failure()
with:
title: CI Failure
labels: ci
body: |
Scheduled CI run failed. Details:
https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

rt-ci-linux:
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental || false }}
defaults:
run:
working-directory: cortex-m-rt
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Install all Rust targets for stable
run: rustup target install --toolchain=stable thumbv6m-none-eabi thumbv7m-none-eabi thumbv7em-none-eabi thumbv7em-none-eabihf thumbv8m.base-none-eabi thumbv8m.main-none-eabi thumbv8m.main-none-eabihf
- name: Install qemu and gcc
run: sudo apt-get update && sudo apt-get install qemu-system-arm gcc-arm-none-eabi
- name: Run CI script for x86_64-unknown-linux-gnu under stable
run: TARGET=x86_64-unknown-linux-gnu TRAVIS_RUST_VERSION=stable bash ci/script.sh
- name: Run CI script for thumbv6m-none-eabi under stable
run: TARGET=thumbv6m-none-eabi TRAVIS_RUST_VERSION=stable bash ci/script.sh
- name: Run CI script for thumbv7m-none-eabi under stable
run: TARGET=thumbv7m-none-eabi TRAVIS_RUST_VERSION=stable bash ci/script.sh
- name: Run CI script for thumbv7em-none-eabi under stable
run: TARGET=thumbv7em-none-eabi TRAVIS_RUST_VERSION=stable bash ci/script.sh
- name: Run CI script for thumbv7em-none-eabihf under stable
run: TARGET=thumbv7em-none-eabihf TRAVIS_RUST_VERSION=stable bash ci/script.sh
- name: Run CI script for thumbv8m.base-none-eabi under stable
run: TARGET=thumbv8m.base-none-eabi TRAVIS_RUST_VERSION=stable bash ci/script.sh
- name: Run CI script for thumbv8m.main-none-eabi under stable
run: TARGET=thumbv8m.main-none-eabi TRAVIS_RUST_VERSION=stable bash ci/script.sh
- name: Run CI script for thumbv8m.main-none-eabihf under stable
run: TARGET=thumbv8m.main-none-eabihf TRAVIS_RUST_VERSION=stable bash ci/script.sh
- uses: imjohnbo/issue-bot@v3
if: failure()
with:
title: CI Failure
34 changes: 34 additions & 0 deletions .github/workflows/on-target.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
on:
push:
branches-ignore:
- "gh-readonly-queue/**"
pull_request:
merge_group:
# allows manual triggering
workflow_dispatch:

name: cortex-m on-target tests

jobs:

hil-qemu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: thumbv7m-none-eabi
- name: Build testsuite
env:
RUSTFLAGS: -C link-arg=-Tlink.x -D warnings
run: cargo build -p testsuite --target thumbv7m-none-eabi
- name: Install QEMU
run: sudo apt-get update && sudo apt-get install qemu-system-arm
- name: Run testsuite
run: |
qemu-system-arm \
-cpu cortex-m3 \
-machine lm3s6965evb \
-nographic \
-semihosting-config enable=on,target=native \
-kernel target/thumbv7m-none-eabi/debug/testsuite
85 changes: 85 additions & 0 deletions .github/workflows/rt-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
on:
push:
branches-ignore:
- "gh-readonly-queue/**"
pull_request:
merge_group:
workflow_dispatch:

name: cortex-m-rt CI

jobs:
rt-ci-linux:
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental || false }}
strategy:
matrix:
rust: [nightly, stable, 1.61.0]

include:
# Nightly is only for reference and allowed to fail
- rust: nightly
experimental: true
defaults:
run:
working-directory: cortex-m-rt
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- name: Install all Rust targets for ${{ matrix.rust }}
run: rustup target install --toolchain=${{ matrix.rust }} thumbv6m-none-eabi thumbv7m-none-eabi thumbv7em-none-eabi thumbv7em-none-eabihf thumbv8m.base-none-eabi thumbv8m.main-none-eabi thumbv8m.main-none-eabihf
- name: Install qemu and gcc
run: sudo apt-get update && sudo apt-get install qemu-system-arm gcc-arm-none-eabi
- name: Run CI script for x86_64-unknown-linux-gnu under ${{ matrix.rust }}
run: TARGET=x86_64-unknown-linux-gnu TRAVIS_RUST_VERSION=${{ matrix.rust }} bash ci/script.sh
- name: Run CI script for thumbv6m-none-eabi under ${{ matrix.rust }}
run: TARGET=thumbv6m-none-eabi TRAVIS_RUST_VERSION=${{ matrix.rust }} bash ci/script.sh
- name: Run CI script for thumbv7m-none-eabi under ${{ matrix.rust }}
run: TARGET=thumbv7m-none-eabi TRAVIS_RUST_VERSION=${{ matrix.rust }} bash ci/script.sh
- name: Run CI script for thumbv7em-none-eabi under ${{ matrix.rust }}
run: TARGET=thumbv7em-none-eabi TRAVIS_RUST_VERSION=${{ matrix.rust }} bash ci/script.sh
- name: Run CI script for thumbv7em-none-eabihf under ${{ matrix.rust }}
run: TARGET=thumbv7em-none-eabihf TRAVIS_RUST_VERSION=${{ matrix.rust }} bash ci/script.sh
- name: Run CI script for thumbv8m.base-none-eabi under ${{ matrix.rust }}
run: TARGET=thumbv8m.base-none-eabi TRAVIS_RUST_VERSION=${{ matrix.rust }} bash ci/script.sh
- name: Run CI script for thumbv8m.main-none-eabi under ${{ matrix.rust }}
run: TARGET=thumbv8m.main-none-eabi TRAVIS_RUST_VERSION=${{ matrix.rust }} bash ci/script.sh
- name: Run CI script for thumbv8m.main-none-eabihf under ${{ matrix.rust }}
run: TARGET=thumbv8m.main-none-eabihf TRAVIS_RUST_VERSION=${{ matrix.rust }} bash ci/script.sh

# On macOS and Windows, we at least make sure that all examples build and link.
rt-ci-other-os:
strategy:
matrix:
os:
- macOS-latest
- windows-latest
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: cortex-m-rt
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Install all Rust targets
run: rustup target install thumbv6m-none-eabi thumbv7m-none-eabi thumbv7em-none-eabi thumbv7em-none-eabihf thumbv8m.base-none-eabi thumbv8m.main-none-eabi thumbv8m.main-none-eabihf
- name: Remove examples that pass by failing
run: rm examples/data_overflow.rs
- name: Build examples for thumbv6m-none-eabi
run: cargo build --target=thumbv6m-none-eabi --features cortex-m/critical-section-single-core --examples
- name: Build examples for thumbv7m-none-eabi
run: cargo build --target=thumbv7m-none-eabi --features cortex-m/critical-section-single-core --examples
- name: Build examples for thumbv7em-none-eabi
run: cargo build --target=thumbv7em-none-eabi --features cortex-m/critical-section-single-core --examples
- name: Build examples for thumbv7em-none-eabihf
run: cargo build --target=thumbv7em-none-eabihf --features cortex-m/critical-section-single-core --examples
- name: Build examples for thumbv8m.base-none-eabi
run: cargo build --target=thumbv8m.base-none-eabi --features cortex-m/critical-section-single-core --examples
- name: Build examples for thumbv8m.main-none-eabi
run: cargo build --target=thumbv8m.main-none-eabi --features cortex-m/critical-section-single-core --examples
- name: Build examples for thumbv8m.main-none-eabihf
run: cargo build --target=thumbv8m.main-none-eabihf --features cortex-m/critical-section-single-core --examples
- name: Build crate for host OS
run: cargo build
17 changes: 7 additions & 10 deletions .github/workflows/rustfmt.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
on:
push:
branches: [ staging, trying, master ]
branches-ignore:
- "gh-readonly-queue/**"
pull_request:
merge_group:
workflow_dispatch:

name: Code formatting check

@@ -10,14 +13,8 @@ jobs:
name: rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- run: cargo fmt --all -- --check
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
*.org
*.rs.bk
.#*
Cargo.lock
bin/*.after
bin/*.before
bin/*.o
target
57 changes: 11 additions & 46 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,48 +1,13 @@
[package]
authors = [
"The Cortex-M Team <cortex-m@teams.rust-embedded.org>",
"Jorge Aparicio <jorge@japaric.io>",
]
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.3"
edition = "2018"
links = "cortex-m" # prevent multiple versions of this crate to be linked together

[dependencies]
bare-metal = { version = "0.2.4", features = ["const-fn"] }
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"]
inline-asm = []
linker-plugin-lto = []
std-map = []

[workspace]
members = ["xtask", "cortex-m-semihosting", "panic-semihosting", "panic-itm"]

[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"
resolver = "2"
members = [
"cortex-m",
"cortex-m-rt",
"cortex-m-semihosting",
"panic-itm",
"panic-semihosting",
"testsuite",
"testsuite/minitest",
"testsuite/minitest/macros",
"xtask",
]
Loading