2019-12-04 08:19 PM
2019-12-04 09:14 PM
Describe the sections in the linker script or scatter file, direct content into them, and initialize in startup_stm32xxxx.s
2019-12-05 12:16 AM
Thank you! I modify link file like this,but it does not work. so,why?
.data_CCMRAM : ALIGN(4)
{
. = 0x20004000;
test_ccm = 0x20004000;
FILL(0xFF)
*(.data.CCMRAM .data.CCMRAM.*)
. = ALIGN(4) ;
} > CCMRAM AT>FLASH
.bss_CCMRAM (NOLOAD) : ALIGN(4)
{
*(.bss.CCMRAM .bss.CCMRAM.*)
} > CCMRAM
2019-12-05 12:58 AM
Doesn't work in what respect?
Where does the .MAP file indicate it is placing things?
Don't think I'd set the location there, do it top side in the section definition.
You'd also need to track where in FLASH it is placed so your code in startup.s can unpack it.
2019-12-05 01:17 AM
And don't forget to enable the clock in RCC (RCC_AHB1ENR_CCMDATARAMEN or similar) before the reset handler starts copying data into it.
2019-12-05 02:57 AM
#define CCMRAM __attribute__((section(".data_CCMRAM")))
CCMRAM extern uint8_t ntripTxBuf[NTRIP_TX_BUFSIZE];
lt iike this,it use RAM address not CCMRAM address. this is map:
.data.udp_port
0x2000098e 0x2 .pio/build/OpenRTK/src/LWIP/lwip-1.4.1/src/core/udp.o
.data_CCMRAM 0x20000990 0xfa0 .pio/build/OpenRTK/src/LWIP/lwip_app/NtripClient/src/ntripClient.o
0x20000990 ntripTxBuf
0x20001160 ntripRxBuf
.data.g_pcSSIExtensions
0x20001930 0x10 .pio/build/OpenRTK/src/LWIP/lwip_app/webserver/src/httpd.o
0x20001930 g_pcSSIExtensions
.data.ssiTAGs 0x20001940 0x8 .pio/build/OpenRTK/src/LWIP/lwip_app/webserver/src/httpd_handler.o
.data_CCMRAM 0x20001948 0x800 .pio/build/OpenRTK/src/LWIP/lwip_app/webserver/src/httpd_handler.o
0x20001948 http_response
0x20001d48 http_response_body
but if i use this format, it works well.
#define CCMRAM __attribute__((section(".ccmram ")))
CCMRAM extern uint8_t ntripTxBuf[NTRIP_TX_BUFSIZE];
.ccmram :
{
. = ALIGN(4);
_sccmram = .; /* create a global symbol at ccmram start */
*(.ccmram)
*(.ccmram*)
. = ALIGN(4);
_eccmram = .; /* create a global symbol at ccmram end */
} >CCMRAM AT> FLASH
the map is:
.ccmram 0x10000000 0xfacc load address 0x08073a38
0x10000000 . = ALIGN (0x4)
0x10000000 _sccmram = .
*(.ccmram)
.ccmram 0x10000000 0xfa0 .pio/build/OpenRTK/src/LWIP/lwip_app/NtripClient/src/ntripClient.o
0x10000000 ntripTxBuf
0x100007d0 ntripRxBuf
.ccmram 0x10000fa0 0x800 .pio/build/OpenRTK/src/LWIP/lwip_app/webserver/src/httpd_handler.o
0x10000fa0 http_response
0x100013a0 http_response_body