ColdFire - start is not included into project's memory map

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ColdFire - start is not included into project's memory map

2,967 Views
Veter
Contributor I
I have __start designated as the Entry Point of my project.
In my startup.s source it is declared like:
.global start
; Boot code section definition: 4 byte alignment, read-only data, & executable code
.section ".text",4,rx
start:
   nop
   nop
   nop
   nop
; initialize a5 to sdata (provided by linker)
   move.l #__SDA_BASE_,a5
   
; initialize the stack pointer
   move.l  #__SRAM_END, a7
   jsr _initRegisters     ; jump to the function that will initialize the remaining registers
; we will never reach this point as initRegisters never returns!
 
I need help understanding why it is not included into my memory map.
 
Also, I have a bootup.c source that is placed into flush and listed in memory code as:
00040010 0000001C .text   initRegisters (bootup.c)
...
0004042C 00000040 .text   martini_init_main() (bootup.c)
 
However, it is not copied into sdram designated at:
 sdram   (RWX): ORIGIN = 0xfe000410, LENGTH = 0x00FFFBF0 // 8Mb SDRAM
I expected it to have bootup.c code at  FE000410, but instead there is another code source allocated to this memory and bootup is completely missing: FE000410 00000200 .rodata crcTable (crc.c)
 
Could anyone help me in understanding why start label is not listed in the memory map and why bootup code is not copied into sdram location?
 
Thank you!
 
--
Alban: device name should appear in subject line.

Message Edited by Alban on 2007-03-28 08:36 PM

Labels (1)
0 Kudos
6 Replies

376 Views
Arev
Contributor III
Hello,
Assuming you're using CW IDE on a ColdFire Target and Debugging your Software in SDRAM.
 
I think that __start designated as the Entry Point, Refere to "asm void _start(void)" from "E68k_startup.c" in the FREESCALE RUNTIME LIBRARY.

In DEBUG Mode, specialy if you use Console, Target Initialisation is done by CW.
 
So, if you want to Control initialisation, you have to change your Project Entry Point to your own Starting Code.  
I Hope this helps..

Bye
0 Kudos

376 Views
Veter
Contributor I
Could you please tell me how to set project entry point.
I am using CodeWarrior for ColdFire Version 6.3, Build 14.
0 Kudos

376 Views
CrasyCat
Specialist III
Hello
 
  - Start IDE
  - Open your project
  - Open target settings dialog (pressing ALT + F7)
  - Go to "Coldfire Linker" Panel
  - Specify your entry point in "Entry Point" edit box. Be careful, Coldfire compiler internally adds a _ prefix
     to symbol names. So if your function is called MyEntry write _MyEntry in the edit box.
 
CrasyCat
0 Kudos

376 Views
Veter
Contributor I
CrasyCat,
 
You are the best!
Thank you!
0 Kudos

376 Views
SimonMarsden_de
Contributor II
Hi

I think we need to see your Linker Control File (LCF) to see what the problem is.


Cheers

Simon
0 Kudos

376 Views
Veter
Contributor I
I attached the mainboard.lcf file.
Thank you.
0 Kudos