From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2080 invoked by alias); 10 Jul 2012 09:02:52 -0000 Received: (qmail 2019 invoked by uid 22791); 10 Jul 2012 09:02:49 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from hagrid.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.197) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 10 Jul 2012 09:02:34 +0000 Received: from localhost (hagrid.ecoscentric.com [127.0.0.1]) by mail.ecoscentric.com (Postfix) with ESMTP id 201B92F780C6 for ; Tue, 10 Jul 2012 10:02:33 +0100 (BST) Received: from mail.ecoscentric.com ([127.0.0.1]) by localhost (hagrid.ecoscentric.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id v613p6FvwWK7; Tue, 10 Jul 2012 10:02:28 +0100 (BST) From: bugzilla-daemon@bugs.ecos.sourceware.org To: ecos-patches@ecos.sourceware.org Subject: [Bug 1001561] Internal flash driver for Freescale TWR-K60N512 board X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: eCos X-Bugzilla-Component: Patches and contributions X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: ilijak@siva.com.mk X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: low X-Bugzilla-Assigned-To: ilijak@siva.com.mk X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: In-Reply-To: References: X-Bugzilla-URL: http://bugs.ecos.sourceware.org/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Tue, 10 Jul 2012 09:02:00 -0000 Message-Id: <20120710090228.30EC62F78005@mail.ecoscentric.com> Mailing-List: contact ecos-patches-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-patches-owner@ecos.sourceware.org X-SW-Source: 2012-07/txt/msg00004.txt.bz2 Please do not reply to this email. Use the web interface provided at: http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001561 --- Comment #28 from Ilija Kocho 2012-07-10 10:02:21 BST --- Created an attachment (id=1819) --> (http://bugs.ecos.sourceware.org/attachment.cgi?id=1819) K60 Redboot-Flash ECM file Hi Nicolas (In reply to comment #27) > Created an attachment (id=1807) --> (http://bugs.ecos.sourceware.org/attachment.cgi?id=1807) [details] > Hal part of the patch I have tested it at seems to work. With attached ECM applied I could use "fis init" and "fconfig -f". There's, however, one limitation - we can't write to the flash bank that contains Redboot itself. This is easily achieved by placing flashCommandSequence() in RAM (only one function goes to RAM - good software design :) ). eCos has provision for this with ".2ram" memory section(s). You just need to add the __attribute__ to the function declaration: -- Code snippet --- static int flashCommandSequence(cyg_uint8, cyg_uint8*) __attribute__((section (".2ram.flashCommandSequence"))); -- snippet end --- Now that we have it working, you can remove REDBOOT_IMAGE_SIZE macro as fis will recognize and reserve the Redboot area. Note: Flash configuration record 0x400-0x40f still must be protected from accidental writing. -- Code snippet --- CYG_FLASH_DRIVER(hal_kinetis_flash, &cyg_kinetis_flash_funs, 0, CYGMEM_REGION_flash, (CYGMEM_REGION_flash + CYGMEM_REGION_flash_SIZE - 1), 1, //number of block info cyg_flash_kinetis_block_info, &hal_kinetis_flash_priv); -- snippet end Next things we should address are support for other parts: K40, K70 and automatic Flash type/size recognition. Ilija -- Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.