hi
im working with MSP430F2272
i run my program (on CC5) and after few minutes when i pause it
it gave me the message:
No source available for "_mpyi() at 0x88bc"
could some one tell why
omry cohenNo source available for "_mpyi() at 0x88bc"
It seems that you have a multiplication in your code using the Hardware Multiplier support in CCS. Is that correct?
Can you provide this code?
BR,
Mo.
i didnt understand exactly what do tou mean by "using the Hardware Multiplier support in CCS".
In the project properties, under Build -> MSP430 Linker -> Basic Options: "Link in hardware version of RTS mpy routine (--use_hw_mpy)". Here you have choices for the 16-bit or 32-bit multiplier, depending on your MSP430 variant.
From the command line, the replacement is invoked with the linker option '--use_hw_mpy[={16/32/F5}]'.
Using this, the compiler / linker makes use of the hardware multiplier whenever it sees a multiplication in your code. In the assembly code listing, you should see the set-up and then "CALLA #__mpyi_hw" for the call to the routine to use the hardware multiplier (with the correct routine for signed, unsigned, ....)
THANKS
_mpyi() is a function that does an integer multiplication. It is part of the C runtime library (along with e.g. the startup code that initializes the variables in ram etc.)It is automatically linked-in when the MSP has no hardware multiplier or if its use is disabled.Since it comes form a library, the debugger has no source code for it.
Switch to assembly view and follow the code in single-steppign until it returns to your program code, where source is available. Most likely a multiplication.
_____________________________________Before posting bug reports or ask for help, do at least quick scan over this article. It applies to any kind of problem reporting. On any forum. And/or look here.If you cannot discuss your problem in the public, feel free to start a private conversation: click on my name and then 'start conversation'. But please do so only if you really cannot do it in a public thread, as I usually read all threads. And I prefer to answer where others can profit from it (or contribute to it) too.
Hello.
I'm using H/W multiplier. Below are the sample C code, assembly output and dis-assembly step through.
The '__mpyi' actually jumps to a code that puts values in &MPY and &OP2 (per user guide) for h/w mutiplication.
#include "msp430x26x.h"int x, y, z;void main(void){ z = x * y;}
main:;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 4 .dwcfi save_reg_to_mem, 16, -4;** 10 ----------------------- z = x*y; .dwpsn file "../main.c",line 10,column 2,is_stmt MOV.W &x+0,r12 ; [] |10| MOV.W &y+0,r13 ; [] |10| $C$DW$5 .dwtag DW_TAG_TI_branch .dwattr $C$DW$5, DW_AT_low_pc(0x00) .dwattr $C$DW$5, DW_AT_name("__mpyi") .dwattr $C$DW$5, DW_AT_TI_call CALLA #__mpyi ; [] |10| ; [] |10| MOV.W r12,&z+0 ; [] |10| ;** ----------------------- return; .dwpsn file "../main.c",line 12,column 1,is_stmt$C$DW$6 .dwtag DW_TAG_TI_branch .dwattr $C$DW$6, DW_AT_low_pc(0x00) .dwattr $C$DW$6, DW_AT_TI_return RETA ; [] ; [] .dwattr $C$DW$4, DW_AT_TI_end_file("../main.c") .dwattr $C$DW$4, DW_AT_TI_end_line(0x0c) .dwattr $C$DW$4, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$4
__mpyi_hw:0x03122: 1202 PUSH ST0x03124: C232 DINT0x03126: 4303 NOP0x03128: 4C82 0130 MOV.W R12,&Multiplier_MPY0x0312C: 4D82 0138 MOV.W R13,&Multiplier_OP20x03130: 421C 013A MOV.W &Multiplier_RESLO,R120x03134: 4132 POP.W ST0x03136: 0110 RETA main:0x03138: 421C 1110 MOV.W &x,R120x0313C: 421D 1112 MOV.W &y,R130x03140: 13B0 3122 CALLA #__mpyi_hw0x03144: 4C82 1114 MOV.W R12,&z0x03148: 0110 RETA _system_pre_init:0x0314A: 431C MOV.W #1,R120x0314C: 0110 RETA C$$EXIT, abort:0x0314E: 4303 NOP C$L1:0x03150: 3FFF JMP (C$L1) _nop:0x03152: 0110 RETA