Debug (simulation) freeze with hardware functions

General discussion on mikroC PRO for 8051.
Post Reply
Author
Message
MrMotorola
Posts: 2
Joined: 05 Feb 2020 23:31

Debug (simulation) freeze with hardware functions

#1 Post by MrMotorola » 05 Feb 2020 23:53

Using version 3.6 in debugger mode for an AT89S8253, I attempt to F8 (step over) this code:

Code: Select all

void main()
{
    ...
    eeprom_data = EEPROM_Read(0x0000);
    ...
Upon hitting the EEPROM_Read() call, the debugger goes into the read function, and never returns. This is to be expected, since the call does not have actual hardware to act upon!

I'm curious as to how to best "simulate" when stepping through hardware calls? Set the PC to another location after the function (can the debugger even do this?) Comment the function out? Write a "debug" function that returns some value without actually calling the function?

A debugger that is aware that one is calling an "impossible" hardware function would be nice! (Future feature??)

Best regards,
Charles in Colorado

User avatar
stefan.filipovic
mikroElektronika team
Posts: 1135
Joined: 18 Dec 2018 10:30

Re: Debug (simulation) freeze with hardware functions

#2 Post by stefan.filipovic » 07 Feb 2020 16:03

Hi,

Welcome to the MikroE forum.
Set the PC to another location after the function (can the debugger even do this?)
No, you cannot do this in the simulator, I'm afraid.

Code: Select all

Comment the function out? Write a "debug" function that returns some value without actually calling the function?
I believe the second case would be better.

Thank you for the feedback, I'll forward this to our developers for consideration.

Kind regards,
Stefan Filipović

MrMotorola
Posts: 2
Joined: 05 Feb 2020 23:31

Re: Debug (simulation) freeze with hardware functions

#3 Post by MrMotorola » 07 Feb 2020 20:01

Thank you for the welcome and the response, Stefan. I am enjoying your products!

Post Reply

Return to “mikroC PRO for 8051 General”