Loading code into S12X problems

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Loading code into S12X problems

跳至解决方案
2,058 次查看
ThomasG
Contributor I
Hello,
 
I am working with a MC9S12XDT256 part with Codewarrior for HC12 Professional Edition and am having trouble after I load the code into flash.
 
The loading of the S19 file seems to go ok but once the program starts running, it stops and says an ILLEGAL_BP error occurred.  This seems to be occuring right away in the startup code (before I get to main).
 
I then looked at the hardware schematics and noticed MODB and MODA are not tied to ground or VDD.  The hardware designer left one of the pins open while using another pin as a GPIO pin to an external hardware chip.
 
My question is there anything else I should be making sure I setup as part of the startup process or is it not working because the MODB and MODA pins are not connected properly.  If this is the case, am I out of luck or is there a possible workaround?
 
Thank you,
 
Thomas
 
标签 (1)
标记 (1)
0 项奖励
1 解答
958 次查看
CrasyCat
Specialist III
Hello
 
  ILLEGAL_BP just notifies you that the application reaches an invalid code position.
  First thing I would suspect here is that an un-initialized interrupt arises somewhere in your code.
 
  But there might be other reason for that behavior.
  From here you have two solutions:
     1- Try to debug from the application entry point to figure out what is happening before main
          To tell the debugger it should stop at the application entry point:
            - Start the debugger the usual way
            - Select File -> "Configuration"
            - Switch to the "Load" tab.
            - Uncheck the box "Run after successful load"
            - Close the debugger and restart it.
         Application should now stop directly at application entry point. You can step from here and
         check what is happening.
    2- You can submit a service request  for that.
        To log the issue please go to following URL: 
            http://www.freescale.com/TechSupport
        and click on "Submit a service request"
        Make sure to attached a reproducible project to the request. You can collect information
        needed for the service request using the Pack and Go wizard.
        Just select Help -> "Pack and Go" and follow the instruction on the screen.
 
CrasyCat

在原帖中查看解决方案

0 项奖励
3 回复数
958 次查看
ThomasG
Contributor I
Thank you for the replies.
 
I may try to somehow ground the MODA and MODB signals lines on power-up and see if anything changes.
0 项奖励
958 次查看
Alban
Senior Contributor II
Hello Thomas,
 
It is imperative that MODx pins are at appropriate level when a reset occurs.
There is no workaround as the hardware will decide which mode (External Bus, Single Chip, BDM...) the MCU should run in when reset is happening. At that point no software is executed yet.
 
Sorry...
 
Alban.
959 次查看
CrasyCat
Specialist III
Hello
 
  ILLEGAL_BP just notifies you that the application reaches an invalid code position.
  First thing I would suspect here is that an un-initialized interrupt arises somewhere in your code.
 
  But there might be other reason for that behavior.
  From here you have two solutions:
     1- Try to debug from the application entry point to figure out what is happening before main
          To tell the debugger it should stop at the application entry point:
            - Start the debugger the usual way
            - Select File -> "Configuration"
            - Switch to the "Load" tab.
            - Uncheck the box "Run after successful load"
            - Close the debugger and restart it.
         Application should now stop directly at application entry point. You can step from here and
         check what is happening.
    2- You can submit a service request  for that.
        To log the issue please go to following URL: 
            http://www.freescale.com/TechSupport
        and click on "Submit a service request"
        Make sure to attached a reproducible project to the request. You can collect information
        needed for the service request using the Pack and Go wizard.
        Just select Help -> "Pack and Go" and follow the instruction on the screen.
 
CrasyCat
0 项奖励