|
18 | 18 | //!
|
19 | 19 | //! [`exception!`]: macro.exception.html
|
20 | 20 | //!
|
21 |
| -//! # `memory.x` |
| 21 | +//! # Requirements |
| 22 | +//! |
| 23 | +//! ## `arm-none-eabi-gcc` |
| 24 | +//! |
| 25 | +//! This crate requires `arm-none-eabi-gcc` to be installed and available in `$PATH`. |
| 26 | +//! |
| 27 | +//! ## `memory.x` |
22 | 28 | //!
|
23 | 29 | //! This crate expects the user, or some other crate, to provide the memory layout of the target
|
24 | 30 | //! device via a linker script named `memory.x`. This section covers the contents of `memory.x`
|
25 | 31 | //!
|
26 |
| -//! ## `MEMORY` |
| 32 | +//! ### `MEMORY` |
27 | 33 | //!
|
28 | 34 | //! The linker script must specify the memory available in the device as, at least, two `MEMORY`
|
29 | 35 | //! regions: one named `FLASH` and one named `RAM`. The `.text` and `.rodata` sections of the
|
|
39 | 45 | //! }
|
40 | 46 | //! ```
|
41 | 47 | //!
|
42 |
| -//! ## `_stack_start` |
| 48 | +//! ### `_stack_start` |
43 | 49 | //!
|
44 | 50 | //! This optional symbol can be used to indicate where the call stack of the program should be
|
45 | 51 | //! placed. If this symbol is not used then the stack will be placed at the *end* of the `RAM`
|
|
62 | 68 | //! _stack_start = ORIGIN(CCRAM) + LENGTH(CCRAM);
|
63 | 69 | //! ```
|
64 | 70 | //!
|
65 |
| -//! ## `_stext` |
| 71 | +//! ### `_stext` |
66 | 72 | //!
|
67 | 73 | //! This optional symbol can be used to control where the `.text` section is placed. If omitted the
|
68 | 74 | //! `.text` section will be placed right after the vector table, which is placed at the beginning of
|
|
80 | 86 | //! _stext = ORIGIN(FLASH) + 0x40C
|
81 | 87 | //! ```
|
82 | 88 | //!
|
83 |
| -//! # Example |
| 89 | +//! # An example |
84 | 90 | //!
|
85 | 91 | //! This section presents a minimal application built on top of `cortex-m-rt`. Apart from the
|
86 | 92 | //! mandatory `memory.x` linker script describing the memory layout of the device, the hard fault
|
@@ -436,10 +442,9 @@ impl fmt::Debug for ExceptionFrame {
|
436 | 442 | }
|
437 | 443 | }
|
438 | 444 |
|
439 |
| -/// Returns a pointer into which the heap can be placed |
| 445 | +/// Returns a pointer to the start of the heap |
440 | 446 | ///
|
441 |
| -/// The start of the heap is guaranteed to be 4-byte aligned; that is the pointer returned by this |
442 |
| -/// function is a multiple of 4. |
| 447 | +/// The returned pointer is guaranteed to be 4-byte aligned. |
443 | 448 | #[inline]
|
444 | 449 | pub fn heap_start() -> *mut u32 {
|
445 | 450 | extern "C" {
|
|
0 commit comments