ARM GCC - jak vytvořit neinicializovanou proměnnou v SDRAM

Jaroslav Buchta jaroslav.buchta na hascomp.cz
Pondělí Říjen 13 21:49:18 CEST 2014


Tak si odpovim sam, uz to asi vidim. ?

_siccmram = LOADADDR(.ccmram);

   /* CCM-RAM section
   *
   * IMPORTANT NOTE!
   * If initialized variables will be placed in this section,
   * the startup code needs to be modified to copy the init-values.
   */
   .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

cili LOADADDR da adresu z FLASH pro startup code  a umisteni sekce v 
xxxRAM i FLASH, ze?




Dne 13. 10. 2014 21:40, Jaroslav Buchta napsal(a):
> Tak diky, zda se ze jsem nakonec nasel potrebnou informaci prave vcas ;-)
>
> Jeste by me zajimalo, jestli by sly udelat inicializovane promenne i v 
> ruznych pametovych prostorech, treba cast v SRAM a cast v SDRAM, musel 
> by se upravit startup code, to je jasne, ale aby to prekladac nespojil 
> do jednoho bloku vcetne par GB vyplne...
>
>
>
> Dne 13. 10. 2014 21:37, Jan Smrz napsal(a):
>> Zkuste v linker scriptu toto:
>>
>> .HeapMemSection (NOLOAD) :
>>   {
>>     *(.HeapMemSection*)
>>   } >SDRAM
>>
>> J.S.
>>
>>
>> Dne 13.10.2014 18:22, Jaroslav Buchta napsal(a):
>>> Mám tuto definici:
>>>
>>> static volatile uint16_t SamplesBuf[3][100000]  __attribute__ 
>>> ((section (".HeapMemSection")));
>>>
>>> ld script:
>>> /* Specify the memory areas */
>>> MEMORY
>>> {
>>>   FLASH (rx)      : ORIGIN = 0x08000000, LENGTH = 2048K
>>>   RAM (xrw)       : ORIGIN = 0x20000000, LENGTH = 192K
>>>   MEMORY_B1 (rx)  : ORIGIN = 0x60000000, LENGTH = 0K
>>>   CCMRAM (rw)     : ORIGIN = 0x10000000, LENGTH = 64K
>>>   SDRAM (rw)      : ORIGIN = 0xC0280000, LENGTH = 5632K
>>> }
>>> ....
>>>   .HeapMemSection :
>>>   {
>>>     *(.HeapMemSection*)
>>>   } >SDRAM
>>>
>>>
>>> a ve výsledku to chce nacpat to pole i do Flash jako inicializovana 
>>> data
>>>
>>>   text       data        bss        dec        hex    filename
>>>  127116     627171      46356     800643      c3783 
>>> bin/Debug/STM32F439-Test.elf
>>>
>>> skutecne je vysledny soubor .bin pres 3 GB.
>>>
>>> Uz mi to moc nemysli ani nehleda dneska, vysype to nekdo z rukavu?
>>>
>>> ---
>>> This email is free from viruses and malware because avast! Antivirus 
>>> protection is active.
>>> http://www.avast.com
>>>
>>> _______________________________________________
>>> HW-list mailing list  -  sponsored by www.HW.cz
>>> Hw-list na list.hw.cz
>>> http://list.hw.cz/mailman/listinfo/hw-list
>>
>> _______________________________________________
>> HW-list mailing list  -  sponsored by www.HW.cz
>> Hw-list na list.hw.cz
>> http://list.hw.cz/mailman/listinfo/hw-list
>
>
> ---
> This email is free from viruses and malware because avast! Antivirus 
> protection is active.
> http://www.avast.com
>
> _______________________________________________
> HW-list mailing list  -  sponsored by www.HW.cz
> Hw-list na list.hw.cz
> http://list.hw.cz/mailman/listinfo/hw-list


---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com



Další informace o konferenci Hw-list