CCM section & "section `.bss' will not fit in region `ram'"

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

jscott
Posts: 129
Joined: Tue Jul 03, 2012 3:50 pm

Re: CCM section & "section `.bss' will not fit in region `ra

Post by jscott »

Also read this thread...

viewtopic.php?f=16&t=1069&hilit=ccm

It has more discussion about this topic...

Hitting the road now, so I will check in tonight and see what is happening...

-John Scott
User avatar
russian
Posts: 368
Joined: Mon Oct 29, 2012 3:17 am
Has thanked: 16 times
Been thanked: 14 times

Re: CCM section & "section `.bss' will not fit in region `ra

Post by russian »

This .ld file is pretty much the default ChibiOS CCM .ld file. So, in it original form, does it make sense all? Is that an issue that it does not work as is?

Here is the original file http://svn.code.sf.net/p/chibios/svn/br ... 7xG_CCM.ld
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: CCM section & "section `.bss' will not fit in region `ra

Post by Giovanni »

Hi,

I think that adding .ccm.* sections is the correct fix, GCC generates a different section for each object when the garbage collector is enabled (it is enabled by default in ChibiOS makefikes).

Giovanni
jscott
Posts: 129
Joined: Tue Jul 03, 2012 3:50 pm

Re: CCM section & "section `.bss' will not fit in region `ra

Post by jscott »

Ah, I though that I was using the unmodified version of STM32F407xG_CCM.ld, but it seems I had changed it as indicated by that other thread... :oops:

The default STM32F407xG_CCM.ld does work and does make sense, but as it is
now, you have to modify it to add your own variables to the CCM.

As mentioned there are two reasons to use CCM.

1. Like your case where you are using a lot of ram and need a place to store stuff.

2. Like my case where I am running three fast & large DMA transactions and also
want to do some more number crunching at the same time. With CCM I can do that without my memory accesses being impacted by memory conflicts from the DMA.

-John Scott
jscott
Posts: 129
Joined: Tue Jul 03, 2012 3:50 pm

Re: CCM section & "section `.bss' will not fit in region `ra

Post by jscott »

Giovanni, can you add the .ccm.* sections to STM32F407xG_CCM.ld when you get a chance? That way we have one less 'system' file we have to modify in applications where CCM is needed / wanted.

I will be happy to test it out. :D :D

-John Scott
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: CCM section & "section `.bss' will not fit in region `ra

Post by Giovanni »

Sure, not a big deal.

Giovanni
User avatar
russian
Posts: 368
Joined: Mon Oct 29, 2012 3:17 am
Has thanked: 16 times
Been thanked: 14 times

Re: CCM section & "section `.bss' will not fit in region `ra

Post by russian »

Thank you Giovanni! I totally agree with John, that change would make CCM a bit more user-friendly
jscott
Posts: 129
Joined: Tue Jul 03, 2012 3:50 pm

Re: CCM section & "section `.bss' will not fit in region `ra

Post by jscott »

Ok, so it looks like the basic CCM issue is resolved...

Now we just need to figure out what is going on with pendingBuffer..

Can you do a rebuild and post the build reports?
I would still like to the the compiler output that lists warning and
errors.

-John Scott
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: CCM section & "section `.bss' will not fit in region `ra

Post by Giovanni »

Changes committed.

Giovanni
jscott
Posts: 129
Joined: Tue Jul 03, 2012 3:50 pm

Re: CCM section & "section `.bss' will not fit in region `ra

Post by jscott »

Great, i will pull that file and tweak my code to test it.

Probably later today.

Thanks
Post Reply