When compiling for an RP2040, compilation is failing with "section .bss' will not fit in region
RAM'"
Is this related to code or variables ?
What's strange is that yesterday it cmpiled ok, and I can't recall any change made since...
Weird
When compiling for an RP2040, compilation is failing with "section .bss' will not fit in region
RAM'"
Is this related to code or variables ?
What's strange is that yesterday it cmpiled ok, and I can't recall any change made since...
Weird
When a C or C++ program is compiled, it has several sections in its memory layout, including the text section (for executable code), data section (for initialized global and static variables), and the BSS section.
BSS stands for "block starting symbol." It is a section in the memory of a computer program that contains uninitialized or zero-initialized global and static variables (ie where variables that are not explicitly initialized in the source code are stored).
Variables in the BSS section are implicitly initialized to zero by the operating system loader when the program is loaded into memory. This is different from variables in the data section, which are initialized with specific values as defined in the source code.
did you remove some initialisation?
Interesting...
I'll have a look at the code. But when you say "initialized with specific values" would the compiler spot those initializations if they are inside a function instead of in the initial variable declarations ?
Thanks
Only if they are static, ie the survive the function call and have an essentially global lifetime (but scope limited to the function).
Otherwise if they are not static then they will be allocated on the stack (or a register depending on possible optimizations) at run time and initialized if you provided a value when you enter the function
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.