qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] armv7m/stm32f205 not starting if code linked from 0x080


From: Liviu Ionescu
Subject: Re: [Qemu-devel] armv7m/stm32f205 not starting if code linked from 0x08000000
Date: Mon, 8 Jun 2015 23:51:55 +0300

> On 08 Jun 2015, at 22:27, Peter Maydell <address@hidden> wrote:
> 
> On 8 June 2015 at 20:18, Liviu Ionescu <address@hidden> wrote:
>> 
>> aha, in this case the problem is the two step load, not the reset itself,
>> or even more accurate, it is a problem of making the reset calls in the
>> proper order.
> 
> That would also fix this problem, yes.

it did, thank you.

my new reset routine looks like:

static void cortexm_reset(void *opaque)
{
    qemu_log_function_name();

    CortexMState *cm_state = opaque;
    ARMCPU *cpu = cm_state->cpu;

#if defined(CONFIG_VERBOSE)
    if (verbosity_level >= VERBOSITY_COMMON) {
        printf("Cortex-M core reset.\n");
    }
#endif

    /* Ensure the image is copied into memory before reset fetches msp & pc */
    rom_reset(NULL);

    cpu_reset(CPU(cpu));
}

I had to make rom_reset() non static in hw/core/loader.c and add the prototype 
at the end of hw/loader.h


if you do the same in armv7m_reset() I guess the stm32f205 device will also 
work properly.


regards,

Liviu




reply via email to

[Prev in Thread] Current Thread [Next in Thread]