simulavr  1.1.0
avrerror.h File Reference
#include <iostream>

Go to the source code of this file.

Classes

class  SystemConsoleHandler
 Class, that handle messages to console and also exit/abort calls. More...
 

Macros

#define ATTRIBUTE_NORETURN
 
#define ATTRIBUTE_PRINTF(string_arg, first_arg)
 
#define traceOut   sysConHandler.traceOutStream()
 
#define avr_message(...)   sysConHandler.vfmessage(__VA_ARGS__)
 
#define avr_warning(...)   sysConHandler.vfwarning(__FILE__, __LINE__, ## __VA_ARGS__)
 
#define avr_failure(...)   sysConHandler.vferror(__FILE__, __LINE__, ## __VA_ARGS__)
 
#define avr_error(...)   sysConHandler.vffatal(__FILE__, __LINE__, ## __VA_ARGS__)
 

Functions

void trioaccess (const char *t, unsigned char val)
 Helper function for writing trace (trace IO access) More...
 

Variables

SystemConsoleHandler sysConHandler
 The SystemConsoleHandler instance for common usage. More...
 
int global_verbose_on
 Verbose enable flag. More...
 
bool global_suppress_memory_warnings
 flag to suppress invalid memory usage warnings More...
 

Macro Definition Documentation

◆ ATTRIBUTE_NORETURN

#define ATTRIBUTE_NORETURN

Definition at line 42 of file avrerror.h.

Referenced by SystemConsoleHandler::traceOutStream().

◆ ATTRIBUTE_PRINTF

#define ATTRIBUTE_PRINTF (   string_arg,
  first_arg 
)

Definition at line 43 of file avrerror.h.

Referenced by SystemConsoleHandler::traceOutStream().

◆ avr_error

#define avr_error (   ...)    sysConHandler.vffatal(__FILE__, __LINE__, ## __VA_ARGS__)

◆ avr_failure

#define avr_failure (   ...)    sysConHandler.vferror(__FILE__, __LINE__, ## __VA_ARGS__)

Definition at line 134 of file avrerror.h.

◆ avr_message

#define avr_message (   ...)    sysConHandler.vfmessage(__VA_ARGS__)

◆ avr_warning

◆ traceOut

#define traceOut   sysConHandler.traceOutStream()

Definition at line 121 of file avrerror.h.

Referenced by HWIrqSystem::ClearIrqFlag(), HWEeprom::CpuCycle(), HWSpi::CpuCycle(), HWAd::CpuCycle(), HWIrqSystem::IrqHandlerFinished(), HWIrqSystem::IrqHandlerStarted(), HWStackSram::Pop(), HWStackSram::Push(), HWEeprom::SetEearh(), HWEeprom::SetEearl(), HWEeprom::SetEecr(), HWEeprom::SetEedr(), HWIrqSystem::SetIrqFlag(), HWStackSram::SetSph(), HWStackSram::SetSpl(), HWSpi::SetSPSR(), AvrDevice::Step(), avr_op_ADC::Trace(), avr_op_ADD::Trace(), avr_op_ADIW::Trace(), avr_op_AND::Trace(), avr_op_ANDI::Trace(), avr_op_ASR::Trace(), avr_op_BCLR::Trace(), avr_op_BLD::Trace(), avr_op_BRBC::Trace(), avr_op_BRBS::Trace(), avr_op_BSET::Trace(), avr_op_BST::Trace(), avr_op_CALL::Trace(), avr_op_CBI::Trace(), avr_op_COM::Trace(), avr_op_CP::Trace(), avr_op_CPC::Trace(), avr_op_CPI::Trace(), avr_op_CPSE::Trace(), avr_op_DEC::Trace(), avr_op_EICALL::Trace(), avr_op_EIJMP::Trace(), avr_op_ELPM_Z::Trace(), avr_op_ELPM_Z_incr::Trace(), avr_op_ELPM::Trace(), avr_op_EOR::Trace(), avr_op_ESPM::Trace(), avr_op_FMUL::Trace(), avr_op_FMULS::Trace(), avr_op_FMULSU::Trace(), avr_op_ICALL::Trace(), avr_op_IJMP::Trace(), avr_op_IN::Trace(), avr_op_INC::Trace(), avr_op_JMP::Trace(), avr_op_LDD_Y::Trace(), avr_op_LDD_Z::Trace(), avr_op_LDI::Trace(), avr_op_LDS::Trace(), avr_op_LD_X::Trace(), avr_op_LD_X_decr::Trace(), avr_op_LD_X_incr::Trace(), avr_op_LD_Y_decr::Trace(), avr_op_LD_Y_incr::Trace(), avr_op_LD_Z_incr::Trace(), avr_op_LD_Z_decr::Trace(), avr_op_LPM_Z::Trace(), avr_op_LPM::Trace(), avr_op_LPM_Z_incr::Trace(), avr_op_LSR::Trace(), avr_op_MOV::Trace(), avr_op_MOVW::Trace(), avr_op_MUL::Trace(), avr_op_MULS::Trace(), avr_op_MULSU::Trace(), avr_op_NEG::Trace(), avr_op_NOP::Trace(), avr_op_OR::Trace(), avr_op_ORI::Trace(), avr_op_OUT::Trace(), avr_op_POP::Trace(), avr_op_PUSH::Trace(), avr_op_RCALL::Trace(), avr_op_RET::Trace(), avr_op_RETI::Trace(), avr_op_RJMP::Trace(), avr_op_ROR::Trace(), avr_op_SBC::Trace(), avr_op_SBCI::Trace(), avr_op_SBI::Trace(), avr_op_SBIC::Trace(), avr_op_SBIS::Trace(), avr_op_SBIW::Trace(), avr_op_SBRC::Trace(), avr_op_SBRS::Trace(), avr_op_SLEEP::Trace(), avr_op_SPM::Trace(), avr_op_STD_Y::Trace(), avr_op_STD_Z::Trace(), avr_op_STS::Trace(), avr_op_ST_X::Trace(), avr_op_ST_X_decr::Trace(), avr_op_ST_X_incr::Trace(), avr_op_ST_Y_decr::Trace(), avr_op_ST_Y_incr::Trace(), avr_op_ST_Z_decr::Trace(), avr_op_ST_Z_incr::Trace(), avr_op_SUB::Trace(), avr_op_SUBI::Trace(), avr_op_SWAP::Trace(), avr_op_WDR::Trace(), avr_op_BREAK::Trace(), avr_op_ILLEGAL::Trace(), and HWSpi::trxend().

Function Documentation

◆ trioaccess()

void trioaccess ( const char *  t,
unsigned char  val 
)

Helper function for writing trace (trace IO access)

Definition at line 239 of file avrerror.cpp.

References SystemConsoleHandler::traceOutStream().

Variable Documentation

◆ global_suppress_memory_warnings

bool global_suppress_memory_warnings

flag to suppress invalid memory usage warnings

Definition at line 237 of file avrerror.cpp.

Referenced by RWWriteToFile::get(), InvalidMem::get(), NotSimulatedRegister::get(), RWReadFromFile::set(), InvalidMem::set(), and NotSimulatedRegister::set().

◆ global_verbose_on

int global_verbose_on

Verbose enable flag.

Definition at line 236 of file avrerror.cpp.

Referenced by SystemConsoleHandler::vfmessage().

◆ sysConHandler

SystemConsoleHandler sysConHandler

The SystemConsoleHandler instance for common usage.

Definition at line 234 of file avrerror.cpp.

Referenced by avr_trace_tf(), RWExit::get(), RWAbort::get(), RWExit::set(), RWAbort::set(), and AvrDevice::Step().