Hi,
Is it planned to add the CCM RAM in 3.0.0 linker scripts again?
I was using that linker-file with 2.6.4 but it seems to have disappeared in 3.0.0.
Best Regards
Emil
Usage of CCM RAM in 3.0.0
Moderator: RoccoMarco
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: Usage of CCM RAM in 3.0.0
The file from 2.6.x can be used with minimal modifications: just remove the stack sizes settings, those symbols come from the makefile now.
Giovanni
Giovanni
Re: Usage of CCM RAM in 3.0.0
Great news!
Feels bad to not use the CCM.
I converted a copy of rules.ld to rules_ccm.ld.
If you want you can add it to 3.0.0: https://github.com/korken89/KFly_ChibiO ... les_ccm.ld
I converted a copy of rules.ld to rules_ccm.ld.
If you want you can add it to 3.0.0: https://github.com/korken89/KFly_ChibiO ... les_ccm.ld
Re: Usage of CCM RAM in 3.0.0
I have been trying out the CCM linker a bit, but a strange side effect appears.
If you put any variable in CCM memory using __attribute__ ((section(".ccm"))) the generated .bin file is huge, about 130MB.
The problem is that the linker includes all data from flash to the CCM memory in the .bin fiile.
To make this not happen I needed to change the ".ccm : " line in rules_ccm.ld to ".ccm (NOLOAD) : "
Could be worth knowing.
If you put any variable in CCM memory using __attribute__ ((section(".ccm"))) the generated .bin file is huge, about 130MB.
The problem is that the linker includes all data from flash to the CCM memory in the .bin fiile.
To make this not happen I needed to change the ".ccm : " line in rules_ccm.ld to ".ccm (NOLOAD) : "
Could be worth knowing.
Re: Usage of CCM RAM in 3.0.0
While still talking about CCM RAM, I have another question.
Does any of the abstract stream or abstract channel interfaces (chSequentialStreamXXX / chnXXX) any problem with reading from the CCM RAM?
I was unable to find in the documentation if any one of these rely on the DMA for transferring data.
I'm thinking of putting some data buffers in the CCM RAM but I am unsure if it would cause problems when at a later time transmitting this data over UART, SPI or USB.
Does any of the abstract stream or abstract channel interfaces (chSequentialStreamXXX / chnXXX) any problem with reading from the CCM RAM?
I was unable to find in the documentation if any one of these rely on the DMA for transferring data.
I'm thinking of putting some data buffers in the CCM RAM but I am unsure if it would cause problems when at a later time transmitting this data over UART, SPI or USB.
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: Usage of CCM RAM in 3.0.0
It causes problems only with those drivers using DMA: ADC, SPI, I2C, I2S, UART and soon DAC.
Streams by themselves are just interfaces so the answers is: it depends on the implementing class/driver.
Giovanni
Streams by themselves are just interfaces so the answers is: it depends on the implementing class/driver.
Giovanni
Re: Usage of CCM RAM in 3.0.0
Okey!
I looked into the code of the STM32 UART driver and I think I understand.
For example the Serial driver seems to use interrupt driven transfers while the "UART" driver uses DMA directly to transfer data.
Thanks for the clarification!
I looked into the code of the STM32 UART driver and I think I understand.
For example the Serial driver seems to use interrupt driven transfers while the "UART" driver uses DMA directly to transfer data.
Thanks for the clarification!
Re: Usage of CCM RAM in 3.0.0
Korken wrote:I have been trying out the CCM linker a bit, but a strange side effect appears.
If you put any variable in CCM memory using __attribute__ ((section(".ccm"))) the generated .bin file is huge, about 130MB.
The problem is that the linker includes all data from flash to the CCM memory in the .bin fiile.
To make this not happen I needed to change the ".ccm : " line in rules_ccm.ld to ".ccm (NOLOAD) : "
Could be worth knowing.
We've got the same issue - 130MB .bin file with default Chibi CCM .ld file
Once we've added (NOLOAD) the .bin got to the normal 160Kb size. This is important because linux guys need to have a .bin file for their non-official https://github.com/texane/stlink flasher. Once my guy confirms that this has resolved the linux flashing problem, I will create a ticket to fix the default CCM .ld file because I guess it's worth fixing.
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: Usage of CCM RAM in 3.0.0
Yep, the NOLOAD did fix the problem for my linux guy! https://sourceforge.net/p/chibios/bugs/507/