From 8f9f13c11bf984e9b88f554f8abfe8b4cce1faca Mon Sep 17 00:00:00 2001 From: iampi31415 <202419735+iampi31415@users.noreply.github.com> Date: Wed, 22 Oct 2025 19:02:52 +0100 Subject: [PATCH 1/2] Fix which sections of binary belong to Flash/ROM vs RAM Supporting information for my fix is here https://docs.rs/cortex-m-rt/latest/cortex_m_rt/#sections-size Notice that —besides the mistake— as the text is written, it is unclear why the sum is 2008, since it is nowhere said that `vector_table` belongs to flash at least in this chip. I don't link it because it may break in the future; but I could include it I you want it. --- faq.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/faq.md b/faq.md index 8a09047..1dcca6c 100644 --- a/faq.md +++ b/faq.md @@ -242,12 +242,12 @@ section size addr Total 555960 ``` -Of the standard sections, `.text`, `.rodata` and `.data` will occupy Flash / +Of the standard sections, `vector_table`, `.text`, `.rodata` will occupy Flash / ROM; `.bss` and `.data` will occupy RAM; `.debug_*`, `.ARM.attributes` and `.comments` can be ignored as they won't be loaded into the target device memory. For the other sections you'll have to check your dependencies' docs. -In this examples the program will occupy `2008` bytes of Flash. +In these examples the program will occupy `2008` bytes of Flash. Note that most (all?) runtime crates, like `cortex-m-rt`, will check at link time that the program fits in the target device memory. If it doesn't fit you'll From fc6b97eff3d015e4df00d7a3e90248108070db84 Mon Sep 17 00:00:00 2001 From: iampi31415 <202419735+iampi31415@users.noreply.github.com> Date: Thu, 23 Oct 2025 09:06:28 +0100 Subject: [PATCH 2/2] Rephrase: memory occupied by binary upon uploading it to device. --- faq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/faq.md b/faq.md index 1dcca6c..6464bab 100644 --- a/faq.md +++ b/faq.md @@ -247,7 +247,7 @@ ROM; `.bss` and `.data` will occupy RAM; `.debug_*`, `.ARM.attributes` and `.comments` can be ignored as they won't be loaded into the target device memory. For the other sections you'll have to check your dependencies' docs. -In these examples the program will occupy `2008` bytes of Flash. +In this example the uploaded software will occupy `2008` bytes of Flash. Note that most (all?) runtime crates, like `cortex-m-rt`, will check at link time that the program fits in the target device memory. If it doesn't fit you'll