Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Compler (Assembling) error

Status
Not open for further replies.

Prakash Rajolli

Newbie level 6
Joined
Jul 16, 2010
Messages
13
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Bangalore
Activity points
1,416
Hello,

I am new to the assembly code. The code which I given below is compile(assembling) fine in KEIL.

AREA |.text|, CODE, READONLY

EXPORT vF_dspl_pid

vF_dspl_pid
push {r4-r7}

ldrsh Kp,[pS_StateCoeff]
ldrsh Ki,[pS_StateCoeff,#2]
ldrsh Kd,[pS_StateCoeff,#4]
ldrsh IntegratedError,[pS_StateCoeff,#6]

mla Acc,Ki,si_Error,IntegratedError //update integrated error
strh Acc,[pS_StateCoeff,#6] //store to state

ldrsh LastError,[pS_StateCoeff,#8]
strh si_Error,[pS_StateCoeff,#8]

mla Acc,Kp,si_Error,Acc //add in proportional part

sub Temp,si_Error,LastError
mla Acc,Kd,Temp,Acc //add in the difference part

mov Acc,Acc,ASR#16 //scale down to short int
pop {r4-r7}
bx lr

END


But when I switch from KEIL to ROWLEY CROSS WORKS. The foolowing errors are getting during assembling.

Error: bad instruction 'area |.text|,CODE,READONLY'

Error: bad instruction 'export vF_dspl_pid'

Error: bad instruction 'vf_dspl_pid'

Error: Thumb does not support this addressing mode -- 'ldrsh r3,[r1]'

Error: Thumb does not support this addressing mode -- 'ldrsh r4,[r1,#2]'

Error: Thumb does not support this addressing mode -- 'ldrsh r5,[r1,#4]'

Error: Thumb does not support this addressing mode -- 'ldrsh r6,[r1,#6]'

Error: Thumb does not support this addressing mode -- 'ldrsh r6,[r1,#8]'

Error: shifts in CMP/MOV instructions are only supported in unified syntax -- 'mov r7,r7,ASR#16'

Error: bad instruction 'end'
Build failed


Kindly give me suggession to come out of these errors.

-Prakash
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top