MLIB and SPI compilation error

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

MLIB and SPI compilation error

Jump to solution
3,298 Views
engineer_attila
Contributor III

Hi, i have a MPC5775E-EVB .I can't use MBLIB within SPI defined project.When i just put spi configure block on this simple project, i got the error.

what causing this problem?

My Matlab version:2020a .I also made "set path" configuration for AMMCLib.

MPC5775E parameters
Compile Options: -g3 -mbig -mvle -O1 -mregnames -mlsp -specs=ewl_c9x.specs -mhard-float -Wall -c -std=c99 -fdata-sections -ffunction-sections -funsigned-char -fmessage-length=0 -nostdinc -fno-jump-tables -DTURN_ON_CPU0

Assemble Options: -g3 -mbig -mvle -mregnames -O1 -DTURN_ON_CPU0 -mhard-float

Link Options: -Xlinker -gc-sections

regards.

 

v15.c: In function 'v15_initialize':
v15.c:145:1: error: insn does not satisfy its constraints:
}
^
(insn/f 117 116 118 2 (set (mem/c:V2SI (plus:SI (reg:SI 11 %r11)
(const_int 0 [0])) [0 S8 A8])
(reg:V2SI 31 %r31)) v15.c:54 2475 {*movv2si_internal}
(expr_list:REG_DEAD (reg:SI 11 %r11)
(expr_list:REG_DEAD (reg:V2SI 31 %r31)
(expr_list:REG_FRAME_RELATED_EXPR (set (mem/c:V2SI (plus:SI (reg/f:SI 1 %r1)
(const_int 360 [0x168])) [0 S8 A8])
(reg:V2SI 31 %r31))
(nil)))))
v15.c:145:1: internal compiler error: in copyprop_hardreg_forward_1, at regcprop.c:775
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
gmake: *** [v15.o] Error 1

Error(s) encountered while building "v15"

 

issue.png

UPDATE

If i disable CS pin from SPI Config block , Automotive Math and Motor Control library error is dissapear. But i need to CS pin.

0 Kudos
Reply
1 Solution
3,179 Views
mariuslucianand
NXP Employee
NXP Employee

Hello @engineer_attila,

It looks to be something related to the compiler. The workaround I've found is to assign another CS pin in the SPI block. It can be a pin that is not used in your project.

Can you please try this workaround?

mariuslucianand_0-1649321096087.png

Regards,

Marius

 

 

View solution in original post

0 Kudos
Reply
5 Replies
3,197 Views
Carmela
Contributor I

Indeed there are conflicts as the ArduinoRobot library already includes SPI
library.
You may remove the SPI library directory from your arduino/libraries
directory when using ArduinoRobot.
Also remove Robot_Control and Robot_Motor when not using the ArduinoRobot.

0 Kudos
Reply
3,189 Views
engineer_attila
Contributor III

Hi Carmela, Thank you for responding my problem.That looks like weird. I completely uninstall Arduino that includes Robot_Control and Robot_Motor directories from my computer ,but nothing changed.

0 Kudos
Reply
3,274 Views
engineer_attila
Contributor III

@mariuslucianand  Can you help me? 

0 Kudos
Reply
3,180 Views
mariuslucianand
NXP Employee
NXP Employee

Hello @engineer_attila,

It looks to be something related to the compiler. The workaround I've found is to assign another CS pin in the SPI block. It can be a pin that is not used in your project.

Can you please try this workaround?

mariuslucianand_0-1649321096087.png

Regards,

Marius

 

 

0 Kudos
Reply
3,165 Views
engineer_attila
Contributor III

That works, thank you @mariuslucianand.

0 Kudos
Reply