FCS, failure to step

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

FCS, failure to step

Jump to solution
1,079 Views
Matt1of3
Contributor II

Hi All

 

I have 2 questions, I'm using Codewarrior 10.0, mcs08ac16 controller

 

1)      The PEmicro drop down menu on the tool bar is turned off, how do I turn it on?

 

2)      I’m having difficulty with the Full Chip Simulator when using the BCLR instruction.  If I try to set a bit in RAM (first page) it will not work, I get a “Target request failed: Failed to step" error.  I also have problems with the Assembler at the same instruction:

 

BCLR  1,$71  will assemble but will not step

BCLR  1,0x71 will not assemble, I get and “End of line expected “ error A2400

BCLR  1,113            will assemble but will not step.

 

When I’m using the BDM the code will run although I get a warning on the BCLR Instructions.  If it Assembles the disassembly looks good to me.

 

Is there a way I can get the simulator to accept bit instructions to low RAM?

 

Thanks and regards,

Labels (1)
Tags (1)
0 Kudos
1 Solution
572 Views
Matt1of3
Contributor II

Thank Mac, Spot On!   We usually initialize flags with the bit instructions, I wouldn’t have figured this out. 

View solution in original post

0 Kudos
2 Replies
572 Views
bigmac
Specialist III

Hello,


Matt1of3 wrote:

2)      I’m having difficulty with the Full Chip Simulator when using the BCLR instruction.  If I try to set a bit in RAM (first page) it will not work, I get a “Target request failed: Failed to step" error.  I also have problems with the Assembler at the same instruction:

 

BCLR  1,$71  will assemble but will not step

BCLR  1,0x71 will not assemble, I get and “End of line expected “ error A2400

BCLR  1,113            will assemble but will not step.


I assume that you have a .asm file, and you are not using HLI assembler within a .c file.  For a .asm file, the representation of a hexadecimal number uses the $ prefix only.

 

The FCS objects to reading "uninitialised" memory locations, even though the MCU itself would actually return the value containing the "garbage" bits.  The BCLR instruction is actually a read-modify-write type, where the whole byte value is read.  If this be the issue, simply initialise the memory location with MOV #0,$71 during the POR initialisation process to ensure that all bits are initialised.

 

Regards,

Mac

 

0 Kudos
573 Views
Matt1of3
Contributor II

Thank Mac, Spot On!   We usually initialize flags with the bit instructions, I wouldn’t have figured this out. 

0 Kudos