diff options
| author | James Munns <[email protected]> | 2024-08-18 10:58:07 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-08-18 10:58:07 +0200 |
| commit | d8459685fd1e53a0fb57f44d950e0bc4f450c5f7 (patch) | |
| tree | da3e39f208f3e1ee911e11d7c27ea0edeee2d8a2 /docs/pages | |
| parent | e0da483ad5f5d021334b590c4f6939023130443f (diff) | |
Update faq.adoc - "code doesn't work in release mode" (#3267)
Add debugging tips from chat
Diffstat (limited to 'docs/pages')
| -rw-r--r-- | docs/pages/faq.adoc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/docs/pages/faq.adoc b/docs/pages/faq.adoc index 4ab04e2a1..8eb947b5e 100644 --- a/docs/pages/faq.adoc +++ b/docs/pages/faq.adoc | |||
| @@ -361,4 +361,14 @@ Practically, there's not a LOT of difference either way - so go with what makes | |||
| 361 | 361 | ||
| 362 | == splitting peripherals resources between tasks | 362 | == splitting peripherals resources between tasks |
| 363 | 363 | ||
| 364 | There are two ways to split resources between tasks, either manually assigned or by a convenient macro. See link:https://github.com/embassy-rs/embassy/blob/main/examples/rp/src/bin/assign_resources.rs[this example] \ No newline at end of file | 364 | There are two ways to split resources between tasks, either manually assigned or by a convenient macro. See link:https://github.com/embassy-rs/embassy/blob/main/examples/rp/src/bin/assign_resources.rs[this example] |
| 365 | |||
| 366 | == My code/driver works in debug mode, but not release mode (or with LTO) | ||
| 367 | |||
| 368 | Issues like these while implementing drivers often fall into one of the following general causes, which are a good list of common errors to check for: | ||
| 369 | |||
| 370 | 1. Some kind of race condition - the faster code means you miss an interrupt or something | ||
| 371 | 2. Some kind of UB, if you have unsafe code, or something like DMA with fences missing | ||
| 372 | 3. Some kind of hardware errata, or some hardware misconfiguration like wrong clock speeds | ||
| 373 | 4. Some issue with an interrupt handler, either enabling, disabling, or re-enabling of interrupts when necessary | ||
| 374 | 5. Some kind of async issue, like not registering wakers fully before checking flags, or not registering or pending wakers at the right time | ||
