flash memory re-map using linker control (ld) file.

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

flash memory re-map using linker control (ld) file.

559件の閲覧回数
Ming
Contributor III

I would like to partition m_text (RX) section into two separate sections. One contains all ProcessorExpert generated code while the other one takes care of my application specific code. Within ld file, I divided m_text spaces into two sections: m_text2 and m_text. I attempted to specify a particular object generated by ProcessorExpert and place it under m_text2 while keeping the rest of code (.text) under m_text. The linker doesn't like it and generated an error.
The only usable method I have tried so far is using __attribute__((section(".xxxx"))) method, but it is impractical to manually place it before every functions generated by ProcessorExpert.

.generated_code :
  {
          AD1.o (.text)
          . = ALIGN(4);
  } > m_text2 /* new section to include AD1.o generated by ProcessorExpert, that's the intention, NOT working */
 
  /* The program code and other data goes into INTERNAL_FLASH */
  .text :
  {
    . = ALIGN(4);
    *(.text)           /* .text sections (code) */
    *(.text*)          /* .text* sections (code) */
    *(.rodata)         /* .rodata sections (constants, strings, etc.) */
    *(.rodata*)        /* .rodata* sections (constants, strings, etc.) */

    KEEP (*(.init))
    KEEP (*(.fini))

    . = ALIGN(4);

0 件の賞賛
3 返答(返信)

398件の閲覧回数
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Ming Jiang:

I think you should use this format instead (check the asterisks):

.generated_code :

  {

          *AD1.o (.text*)

          . = ALIGN(4);

  } > m_text2

PS. Always try to post to specialized forum spaces. Otherwise your questions gets lost and you get no answers.


Regards!,
Jorge Gonzalez

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛

398件の閲覧回数
Ming
Contributor III

Thanks. BTW, I was trying to post my issue to the Kinetis forum by clicking the Ask it botton. But the post never showed up, maybe I am not doing wright. How do I make a post?

0 件の賞賛

398件の閲覧回数
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Ming:

The "Ask it" button should work. But I have known of some threads submitted to review due to some used words that could be classified as spam.

If you still have problems to post, try asking about this issue in Using Freescale Community, and I hope you can at least post your question there.

Regards!

Jorge Gonzalez

0 件の賞賛