Hello,
i am getting a "Section ".monitor2" overlaps section ".textf" ", how to slove this error,
Thanks and regards,
You need to specify the option to secure the debug monitor area. In CS+ go to Linker options under Device:
After making the suggested changes, I am now encountering an error message stating 'Section address overflow out of range: .SLIB'. I have attached an image for your reference.
After making the suggested changes. i am getting same error,
Would it be possible to share your project?
lean_A0.zip
I can see what is happening but I don't understand why it is happening. The ".SLIB" section is being allocated to RAM but does not fit, it should be allocated to the ROM/flash. The project uses the default setting to automatically layout the sections, which seems to work fine in another project that I created.
I will try to get more time to look at this later today, maybe someone else can have a look and understand why this is happening.
hello,
Previously, the code was working fine with no errors. However, after I modified it by adding extra lines, I started encountering this error. If I comment out that line, the error disappears. Please correct this issue as it is urgent; I am awaiting your response
Can you pls elaborate on where exactly that you added extra lines, or where you comment out lines to make the error disappear?
In the r_cg_timer.c file, I added the void Ao_angle(int roll_angle) function. Inside this function, I included several if conditions to continuously read the angle. Based on the angle, which ranges from 0 to 180 degrees, I adjust the duty cycle for each degree. However, if I comment out half of the function, the error is cleared.
r_cg_timer.c
void Ao_angle(int roll_angle)
if
I believe I know what is happening now, with that Ao_angle() function populated, your project's code size exceeds the available 8KB of flash in your MCU. From the faulty build map-file:
*** Total Section Size ***RAMDATA SECTION: 0000004e Byte(s)ROMDATA SECTION: 00000108 Byte(s)PROGRAM SECTION: 0000203e Byte(s)
203Eh == 8254d
Apparently when the linker ran out of space trying to fit the code into flash, it tried the next available memory (RAM) and also failed that. I don't know why the linker would behave in such a manner, but at least we know now what is happening.
The good news is that you have several upgrade options available to increase the flash size.