From 54d744f4bb2f48abd6a9e715788061d122529d96 Mon Sep 17 00:00:00 2001 From: Michel Pollet Date: Sun, 14 Jun 2015 11:42:10 +0100 Subject: [PATCH] Whitespaces at end of line removed.. Dunno how these came to be.. Signed-off-by: Michel Pollet --- simavr/sim/sim_avr.c | 22 +++++++++++----------- simavr/sim/sim_avr.h | 26 +++++++++++++------------- tests/tests.c | 8 ++++---- 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/simavr/sim/sim_avr.c b/simavr/sim/sim_avr.c index 6c985cc..93487bf 100644 --- a/simavr/sim/sim_avr.c +++ b/simavr/sim/sim_avr.c @@ -40,16 +40,16 @@ static avr_logger_p _avr_global_logger = std_logger; void avr_global_logger( - struct avr_t* avr, - const int level, - const char * format, + struct avr_t* avr, + const int level, + const char * format, ... ) { va_list args; va_start(args, format); if (_avr_global_logger) _avr_global_logger(avr, level, format, args); - va_end(args); + va_end(args); } void @@ -76,7 +76,7 @@ int avr_init(avr_t * avr) #ifdef CONFIG_SIMAVR_TRACE avr->trace_data = calloc(1, sizeof(struct avr_trace_data_t)); #endif - + AVR_LOG(avr, LOG_TRACE, "%s init\n", avr->mmcu); // cpu is in limbo before init is finished. @@ -93,7 +93,7 @@ int avr_init(avr_t * avr) // number of address bytes to push/pull on/off the stack avr->address_size = avr->eind ? 3 : 2; avr->log = 1; - avr_reset(avr); + avr_reset(avr); return 0; } @@ -147,7 +147,7 @@ void avr_sadly_crashed(avr_t *avr, uint8_t signal) // enable gdb server, and wait if (!avr->gdb) avr_gdb_init(avr); - } + } if (!avr->gdb) avr->state = cpu_Crashed; } @@ -223,9 +223,9 @@ void avr_loadcode(avr_t * avr, uint8_t * code, uint32_t size, avr_flashaddr_t ad * a minimum count of requested sleep microseconds are reached * (low amounts cannot be handled accurately). */ -uint32_t +uint32_t avr_pending_sleep_usec( - avr_t * avr, + avr_t * avr, avr_cycle_count_t howLong) { avr->sleep_usec += avr_cycles_to_usec(avr, howLong); @@ -255,7 +255,7 @@ void avr_callback_run_gdb(avr_t * avr) int step = avr->state == cpu_Step; if (step) avr->state = cpu_Running; - + avr_flashaddr_t new_pc = avr->pc; if (avr->state == cpu_Running) { @@ -287,7 +287,7 @@ void avr_callback_run_gdb(avr_t * avr) // Interrupt servicing might change the PC too, during 'sleep' if (avr->state == cpu_Running || avr->state == cpu_Sleeping) avr_service_interrupts(avr); - + // if we were stepping, use this state to inform remote gdb if (step) avr->state = cpu_StepDone; diff --git a/simavr/sim/sim_avr.h b/simavr/sim/sim_avr.h index 1366cb5..f71b575 100644 --- a/simavr/sim/sim_avr.h +++ b/simavr/sim/sim_avr.h @@ -121,7 +121,7 @@ struct avr_trace_data_t { // code that munches the stack -under- their own frame struct { uint32_t pc; - uint16_t sp; + uint16_t sp; } stack_frame[STACK_FRAME_SIZE]; int stack_frame_index; #endif @@ -142,7 +142,7 @@ typedef void (*avr_run_t)( typedef struct avr_t { const char * mmcu; // name of the AVR // these are filled by sim_core_declare from constants in /usr/lib/avr/include/avr/io*.h - uint16_t ramend; + uint16_t ramend; uint32_t flashend; uint32_t e2end; uint8_t vector_size; @@ -151,7 +151,7 @@ typedef struct avr_t { avr_io_addr_t rampz; // optional, only for ELPM/SPM on >64Kb cores avr_io_addr_t eind; // optional, only for EIJMP/EICALL on >64Kb cores uint8_t address_size; // 2, or 3 for cores >128KB in flash - + // filled by the ELF data, this allow tracking of invalid jumps uint32_t codeend; @@ -220,7 +220,7 @@ typedef struct avr_t { >0: interrupt pending */ int8_t interrupt_state; // interrupt state - /* + /* * ** current PC ** * Note that the PC is representing /bytes/ while the AVR value is * assumed to be "words". This is in line with what GDB does... @@ -284,17 +284,17 @@ typedef struct avr_t { // DEBUG ONLY -- value ignored if CONFIG_SIMAVR_TRACE = 0 uint8_t trace : 1, log : 2; // log level, default to 1 - + // Only used if CONFIG_SIMAVR_TRACE is defined struct avr_trace_data_t *trace_data; // VALUE CHANGE DUMP file (waveforms) - // this is the VCD file that gets allocated if the + // this is the VCD file that gets allocated if the // firmware that is loaded explicitly asks for a trace // to be generated, and allocates it's own symbols // using AVR_MMCU_TAG_VCD_TRACE (see avr_mcu_section.h) struct avr_vcd_t * vcd; - + // gdb hooking structure. Only present when gdb server is active struct avr_gdb_t * gdb; @@ -339,7 +339,7 @@ avr_reset( int avr_run( avr_t * avr); -// finish any pending operations +// finish any pending operations void avr_terminate( avr_t * avr); @@ -393,9 +393,9 @@ avr_sadly_crashed( */ void avr_global_logger( - struct avr_t* avr, - const int level, - const char * format, + struct avr_t* avr, + const int level, + const char * format, ... ); #ifndef AVR_CORE @@ -428,9 +428,9 @@ void avr_callback_run_raw(avr_t * avr); * (low amounts cannot be handled accurately). * This function is an utility function for the sleep callbacks */ -uint32_t +uint32_t avr_pending_sleep_usec( - avr_t * avr, + avr_t * avr, avr_cycle_count_t howLong); #ifdef __cplusplus diff --git a/tests/tests.c b/tests/tests.c index 046c6e4..a6a504e 100644 --- a/tests/tests.c +++ b/tests/tests.c @@ -28,7 +28,7 @@ static FILE *orig_stderr = NULL; stderr = stdout; \ } } #endif - + static void atexit_handler(void) { if (!finished) _fail(NULL, 0, "Test exit without indicating success."); @@ -93,7 +93,7 @@ static int my_avr_run(avr_t * avr) // Interrupt servicing might change the PC too, during 'sleep' if (avr->state == cpu_Running || avr->state == cpu_Sleeping) avr_service_interrupts(avr); - + // if we were stepping, use this state to inform remote gdb return avr->state; @@ -102,7 +102,7 @@ static int my_avr_run(avr_t * avr) avr_t *tests_init_avr(const char *elfname) { tests_cycle_count = 0; map_stderr(); - + elf_firmware_t fw; if (elf_read_firmware(elfname, &fw)) fail("Failed to read ELF firmware \"%s\"", elfname); @@ -138,7 +138,7 @@ int tests_run_test(avr_t *avr, unsigned long run_usec) { return reason; } fail("Error in test case: Should never reach this."); - return 0; + return 0; } int tests_init_and_run_test(const char *elfname, unsigned long run_usec) { -- 2.39.5