2024-09-19 02:38 AM
I am new user of stm32h750, and I try developing it with STM32 vscode extension, it is great!
For sci_dma, I need a buffer at RAM_D1(@0x24000000) , how can I define the array?
I can only define a pointer at the address and it works:
uint8_t *p = (uint8_t *)0x24000000;
But how about a char_buffer[n]?
Please kindly help me, thank you.
Solved! Go to Solution.
2024-09-29 07:26 AM
in STM32H743IITx_FLASH.ld
add
._D1_Area :
{
. = ALIGN(4);
. = ALIGN(4);
} >RAM_D1
and
__attribute__((section("._D1_Area"))) float char_buffer[n] = {0};
Sorry, I overlooked something.
2024-09-21 06:16 PM - edited 2024-09-21 06:18 PM
try like
__attribute__((section("._DTCM_Area"))) float adcBuf[3] = {0};
__attribute__((section(".RAM_D1"))) float char_buffer[n] = {0};
2024-09-24 12:27 AM
Thanks a lot.
I will try and report back my result.
2024-09-24 01:29 AM
Dear Hollies,
I tried your suggestion :
__attribute__((section(".RAM_D1"))) float char_buffer[n] = {0};
The define may not be working with STM32 vscode extension. I checked the map file:
2024-09-29 07:26 AM
in STM32H743IITx_FLASH.ld
add
._D1_Area :
{
. = ALIGN(4);
. = ALIGN(4);
} >RAM_D1
and
__attribute__((section("._D1_Area"))) float char_buffer[n] = {0};
Sorry, I overlooked something.
2024-10-08 08:09 PM
Thanks a lot.
I will try your suggestion and report back my result.
2024-10-10 06:39 PM
Dear Hollies,
it works!
thank you very much.
2024-10-10 09:39 PM - edited 2024-10-10 09:40 PM
@prof89 wrote:Dear Hollies,
it works!
thank you very much.
May I ask you a favor? Where can I learn relative define method as you given above?
I'm from China.I can search for relevant Chinese articles on bing.
You could find "STM32H743+CubeIDE-将变量定义到指定的内存" in CSDN.
And I found that, ST maybe has offered a pdf.But I never tried.
In STM32CubeIDE:
“Help”->“Read STM32CubeIDE Documentation”->“C/C++ Linker”(ld.pdf)
2024-10-13 06:57 PM
Thank you for your generous response.
I will read the ld.pdf.