From: Doug Goldstein Date: Mon, 10 Mar 2014 01:32:05 +0000 (-0500) Subject: core: set reasonably safe default for 'codeend' X-Git-Tag: v1.2~10^2 X-Git-Url: https://git.htl-mechatronik.at/public/?a=commitdiff_plain;h=f17ac8250980a575b2bc4d9e4968102075bd89d9;p=sx%2Fsimavr.git core: set reasonably safe default for 'codeend' Its reasonably safe to assume that 'codeend' can not be past 'flashend' so that's a good default value. --- diff --git a/simavr/sim/sim_avr.c b/simavr/sim/sim_avr.c index 0366b58..73b049a 100644 --- a/simavr/sim/sim_avr.c +++ b/simavr/sim/sim_avr.c @@ -70,6 +70,7 @@ int avr_init(avr_t * avr) { avr->flash = malloc(avr->flashend + 1); memset(avr->flash, 0xff, avr->flashend + 1); + avr->codeend = avr->flashend; avr->data = malloc(avr->ramend + 1); memset(avr->data, 0, avr->ramend + 1); #ifdef CONFIG_SIMAVR_TRACE