CW6.3 CF - section creation in *.s file error

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

CW6.3 CF - section creation in *.s file error

2,710件の閲覧回数
Veter
Contributor I
I have a section created in the *.s file.
Unfortunately this section is not recognized or not shown in the *.xMAP file.
 
.section .init$00,2,C
.global ___init
___init
; Linker should place .init sections from other modules, containing
; calls to initialize global objects, here.
.section .init$99,2,C
 rts   ; Return from ___init.
 
In my *.lcf file I reference this section:
.flashdata : AT( ADDR(.flashcode) + SIZEOF(.flashcode) )  {... *(.init) ...} > sdram
 
Does any one knows what is wrong?
 
I am using CodeWarrior Development Studio for ColdFire Version 6.3, Build 14.
My target is MCF5307.
 
--
Alban added CW version + core in subject line

Message Edited by Alban on 2007-03-27 11:37 PM

ラベル(1)
タグ(1)
0 件の賞賛
返信
5 返答(返信)

531件の閲覧回数
CrasyCat
Specialist III
Hello
 
Not sure what you are trying to do achieve here.
According to the coldfire assembler manual the syntax of the .section directive is the following:

.section name [ ,alignment ] [ ,type ] [ ,flags ]

 
type might take any value from 0 to 11. I do not understand what C means there.
 
Please check the Assembler manual CF_Assem_Ref.pdf and adjust the command according to the supported format.
Also I am not sure why you put $$ in section name. 
Is there any reason?
 
CrasyCat
0 件の賞賛
返信

531件の閲覧回数
Veter
Contributor I
Hello CrasyCat.
To clarify, this code or statement was build and compiled with DIAB compiler.
.section .init$00 2,C
...
.section .init$99 2,C
 
This sintax declares section "init" that starts from address $00 to address $99, is aligned by 2 bytes and "C" means "executable" type.
 
I can not find alternative in CW for ColdFire tools where I can set section from address 00 to 99 and have type "executable". Do you know how to do that?
 
Thank you for your response!
0 件の賞賛
返信

531件の閲覧回数
CompilerGuru
NXP Employee
NXP Employee
Do you have a web reference which describes that .init$00 is a section allocated at address (with emphasis on address here) 0x0 for Diab?
I wonder because I actually think the $00 suffix is used to define the ordering in between all .init sections and not to define the actual address.
For example
http://www.freescale.com/files/microcontrollers/doc/app_note/AN2354.pdf

uses this for a Diab PPC use case. I think I did read in the past that Microsoft is using this definition too.

In order to define the ordering of the section in the CW CF elf file, just list them in the order you want.

Daniel
0 件の賞賛
返信

531件の閲覧回数
Veter
Contributor I

Daniel,

You are the best!

Thank you so much!

0 件の賞賛
返信

531件の閲覧回数
CrasyCat
Specialist III
Hello
 
Macro assembler language is not portable over different producer.
I would highly suggest to to take a look at the coldfire assembler to find the appropriate matching directive.
 
Using .section and .org will probably make the deal here :smileyvery-happy:
 
CrasyCat
0 件の賞賛
返信