Problem setting breakpoints in assembler source CW 11.1

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

Problem setting breakpoints in assembler source CW 11.1

1,656 次查看
BooleanBob
Contributor IV

I mostly write C code for HCS08 and sometimes I set breakpoints for debugging some issue.

Sometimes in C code breakpoints fail to set in some source lines, in my experience mostly problems related to blank lines, code writing style that fools the debugger or compiler optimized code (I guess). When this happens I usually try to set the breakpoint somewhere else within the code and problem solved.

These days I am trying to teach HCS08 assembler to a small group of beginners, CodeWarrior 11.1 IDE refuses to set any breakpoints, and instead a crossed out symbol (the usual blue bullet breakpoint symbol) appears. So I end up using "Run to line" command which is not what I want. Instruction trace works fine, (Step Over and Step Into commands). The same programming tool and hardware is been used for C and Assembler projects.

Also, once the code is correctly assembled and after FLASH programming, the debugger never starts at _Startup. Instead an extra tab appears in the debugger code window section called main(). RESET vector is correctly defined in the absolute Assembler source code listing. The  Reset Target arrow button solves this last problem and the debugger positions itself at the _Startup label as expected. But still breakpoints do not work.

Any ideas of what am I doing wrong for this 2 issues? Thanks in advance

0 项奖励
回复
3 回复数

1,632 次查看
BooleanBob
Contributor IV

Thank you Jennie, problem solved.

The "SKIP ALL BREAKPOINTS" toggle button was accidentally switched on or for some unknown reason.
This prevented the setting of any breakpoints.
This button is close to the left "DEBUG AS" button.
By the way, I am writing assembler code, where I think there are no optimizations other than the programmer can do.
 
Thank you again for your valuable time.
0 项奖励
回复

1,627 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi BooleanBob

Good to know your problem was solved. You are welcome.

Have a nice day,

Jun Zhang

0 项奖励
回复

1,637 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi BooleanBob

Normally, if a specific line of code is optimized, the breakpoint can't be set there.

Please do clean the object code then rebuild. if still can't set the breakpoint, please upload demo project. I will check the problem directly.

 

Best Regards

Jun Zhang

0 项奖励
回复