From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7002 invoked by alias); 21 May 2013 06:31:52 -0000 Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Received: (qmail 6966 invoked by uid 89); 21 May 2013 06:31:45 -0000 X-Spam-SWARE-Status: No, score=4.4 required=5.0 tests=AWL,BAYES_20,CHARSET_FARAWAY_HEADER,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,SPF_PASS autolearn=ham version=3.3.1 Received: from mail-ia0-f195.google.com (HELO mail-ia0-f195.google.com) (209.85.210.195) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 21 May 2013 06:31:45 +0000 Received: by mail-ia0-f195.google.com with SMTP id j38so70655iad.2 for ; Mon, 20 May 2013 23:31:43 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.42.190.74 with SMTP id dh10mr513469icb.35.1369117903711; Mon, 20 May 2013 23:31:43 -0700 (PDT) Received: by 10.42.66.144 with HTTP; Mon, 20 May 2013 23:31:43 -0700 (PDT) Date: Tue, 21 May 2013 06:31:00 -0000 Message-ID: From: =?GB2312?B?1cXM7NPC?= To: ecos-discuss@ecos.sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Subject: [ECOS] questrons about pc jump from rom to ram X-SW-Source: 2013-05/txt/msg00038.txt.bz2 Hi all I am working on the stm32f207zg board, and going to develop a bootloader myself which works same as redboot.The loader will receive the executable through the net and save which to the ram, and then jump PC from ROM to RAM to execute the new executable. In case of redboot,after load a new executable to the ram, type the commend of go 0x64008011, then the new executable in RAM works. But in case of my bootloader, i use the following code to realize the same job. Disable the interrupt first, jump sp to the top of ram then , and finally jump pc to the entry address of executable in ram. HAL_DISABLE_INTERRUPTS(oldints); __asm__ volatile("ldr sp,=0x64800000" ); (*(void (*)(void))(0x64008011))(); But it cannot work. so,would anybody give me some advice,thanks very much! -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss