From: Michel Pollet Date: Sun, 14 Jun 2015 10:42:10 +0000 (+0100) Subject: Whitespaces at end of line removed.. X-Git-Tag: v1.3~30 X-Git-Url: https://git.htl-mechatronik.at/public/?a=commitdiff_plain;h=b702ace2e408e2ace0b2ae61ba17eb06840cf038;p=sx%2Fsimavr.git Whitespaces at end of line removed.. Dunno how these came to be.. Signed-off-by: Michel Pollet --- diff --git a/simavr/sim/sim_avr.c b/simavr/sim/sim_avr.c index 3e12c74..fc03d28 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; } @@ -148,7 +148,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; } @@ -224,9 +224,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); @@ -256,7 +256,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) { @@ -288,7 +288,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) {