Problem setting breakpoints in assembler source CW 11.1

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Problem setting breakpoints in assembler source CW 11.1

1,275件の閲覧回数
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,251件の閲覧回数
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,246件の閲覧回数
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,256件の閲覧回数
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 件の賞賛