Yuri Petriaev

how to define starting point in the project?

Discussion created by Yuri Petriaev on May 7, 2007
Latest reply on Jun 11, 2007 by Yuri Petriaev
I am using CodeWarrior for ColdFire version 6.4.
My target is MCF5307.
The project was before created using DIAB compiler.
It has an entry point:
PSECT
XDEF start
ALIGN 4
 
; 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! 
    jsr _main
 
I have a problem building project in CW for "start" initialization is not recognized.
Is there any alternative to start point initialization in CW?
PSECT
XDEF start
ALIGN 4
 
I tried using .global statement with start: and the substituded three lines above with one:
.global start
However, when running in debugger I get: "__start" is not recognized error.
Please help.
 
 
 

Outcomes