View Single Post
  #5   Spotlight this post!  
Unread 02-22-2014, 09:38 AM
taichichuan's Avatar
taichichuan taichichuan is offline
Software Mentor
AKA: Mike Anderson
FRC #0116 (Epsilon Delta)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Herndon, VA
Posts: 328
taichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud of
Send a message via AIM to taichichuan
Re: Cannot Deploy - "No Robot Code"

Yes, you'll need to add the -mlong_call build option. There's a weirdness in the PPC architecture relating to the branch local (bl) instruction that dates back to the early 1990s. The bl instruction only supports jumps of 24-bits or less. The -mlong_call option uses address redirection through a 32-bit register to get beyond the 24-bit relocation issues.

The really weird thing is that the code would work if run as a kernel thread from the IDE, but not work if the code were deployed. That has to do with the way WRS loads code in the two different modes. In the deployed mode, the code is loaded down low and can be more than 24-bits (16MB) from the kernel which is loaded in high memory. Since the 4-slot cRio has more memory than the 8-slot, the kernel is further away from where the code is loaded when deployed and that increases the likelihood of the 24-bit relocation error.

HTH,

Mike
Reply With Quote