From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8915 invoked by alias); 2 Dec 2012 17:53:53 -0000 Received: (qmail 8906 invoked by uid 22791); 2 Dec 2012 17:53:53 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=AWL,BAYES_00,KHOP_SPAMHAUS_DROP,KHOP_THREADED,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from p02c12o148.mxlogic.net (HELO p02c12o148.mxlogic.net) (208.65.145.81) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 02 Dec 2012 17:53:44 +0000 Received: from unknown [12.218.215.72] (EHLO smtpauth1.linear.com) by p02c12o148.mxlogic.net(mxl_mta-6.16.0-0) with ESMTP id 7a59bb05.0.64100.00-2399.115446.p02c12o148.mxlogic.net (envelope-from ); Sun, 02 Dec 2012 10:53:44 -0700 (MST) X-MXL-Hash: 50bb95a85bccbaac-25f412e95d1212ccd4f72ea04e2877af17760a17 Received: from smtpauth1.linear.com (localhost [127.0.0.1]) by smtpauth1.linear.com (Postfix) with ESMTP id 1579D740A5; Sun, 2 Dec 2012 09:53:43 -0800 (PST) Received: from [192.168.0.119] (75-163-186-131.clsp.qwest.net [75.163.186.131]) by smtpauth1.linear.com (Postfix) with ESMTPSA id 85F89740A2; Sun, 2 Dec 2012 09:53:42 -0800 (PST) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) From: Michael Jones In-Reply-To: <50BB8743.1090308@siva.com.mk> Date: Sun, 02 Dec 2012 17:53:00 -0000 Cc: eCos Discussion , tf+bugs.ecos@r-finger.com Content-Transfer-Encoding: quoted-printable Message-Id: References: <88A5F92E-1AE1-4246-B566-3EFE5DEA360B@linear.com> <50BB299F.5070404@siva.com.mk> <50BB8743.1090308@siva.com.mk> To: Ilija Kocho X-AnalysisOut: [v=2.0 cv=e+exv9V/ c=1 sm=1 a=glloKNylpeYNumXQcclYyA==:17 a] X-AnalysisOut: [=gTASQVg5WCMA:10 a=D2_GN2MmYMYA:10 a=BLceEmwcHowA:10 a=8nJ] X-AnalysisOut: [EP1OIZ-IA:10 a=MqDINYqSAAAA:8 a=l9cmVeDug7kA:10 a=O8eIFpr9] X-AnalysisOut: [AAAA:8 a=CCpqsmhAAAAA:8 a=MH2HChe8nylnYK7C6K8A:9 a=wPNLvfG] X-AnalysisOut: [TeEIA:10] X-MAIL-FROM: X-IsSubscribed: yes 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 Subject: Re: [ECOS] Kinetis CYG_HAL_STARTUP_VAR conflict X-SW-Source: 2012-12/txt/msg00008.txt.bz2 IIija, I would love to just use Eclipse, and have the Config tool generate a compa= tible tree. Then use a standard debugger interface, like the PEMicro tools.= The experience using Code Warrior with MQX is overall good. The thing I do= n't like about MQX is having to configure things with #define in include fi= les. I really like that eCos takes the configuration out of the code tree. = This makes it much easier to have multiple configurations, especially when = using source code control. I suppose I could just take the configuration results and use Code Warrior,= but I loose some generality if my end users want to compile and debug on o= ther targets. Do you have any suggestions on a generic compile and debugging tool chain t= hat includes a JTAG debugger and has a low entry price? I would guess that = eCos could be integrated into Eclipse, but the issue would be supporting de= bug on all the different targets. Mike On Dec 2, 2012, at 9:52 AM, Ilija Kocho wrote: > Jones, >=20 > On 02.12.2012 16:44, Michael Jones wrote: >> IIija, >>=20 >> In my case, I already have an application in MQX, and it fits in a K60N5= 12 with room to spare. There is a lot of value in applications that have mi= nimum component count, and minimum cost. My goal is to port the application= to eCos so that I de-constrain the target choice.=20 >=20 > FAOD, my comment is about debugging with RedBoot not eCos. For > standalone eCos application 128KiB RAM is plenty (dependent of > application of course). RedBoot provides some debugging facility but it > will occupy some memory for it's own use so less memory for application. > Therefore, provided that you have some kind of JTAG debugger you do not > need RedBoot, unless you need dynamic firmware loading. In that case > something like FLASH startup (mentioned in my previous mail) may be a > solution. >=20 >> The eCos architecture is similar enough to MQX to make the port practica= l. For this application to work, I will have to add support for I2C, >=20 > Actually there is already I2C driver for eCos, almost ready for check > in. http://bugs.ecos.sourceware.org/show_bug.cgi?id=3D1001397 > I would ask Tomas, if he receives this mail, to tell us about the status > of the driver. >=20 >> create a disk from part of the FLASH (MQX can do this through the BSP an= d Posix calls), use an SD card, use serial, and ethernet. > SD card works over SPI but there are 2 issues: >=20 > 1. If you are using revision1 silicon you need to swap MISO and MOSI. > (Revision2 as well as K70 have additional PIN multiplexing that fixes thi= s. > 2. There is a small bug in SPI driver that I discovered recently that > didn't show on our custom hardware but. I am preparing a fix. >=20 >> The real constraints on the application are fast handling of interrupts = and accurate timers triggering small amounts of time sensitive IO tasks. Me= mory is not such an issue. >>=20 >> Once I get a hello world working that does not depend on external memory= , I'll post a bug and my results, etc. >>=20 >> Mike >>=20 >>=20 >> On Dec 2, 2012, at 3:12 AM, Ilija Kocho wrote: >>=20 >>> Hi Mike >>>=20 >>> On 01.12.2012 22:07, Michael Jones wrote: >>>> BACKGROUND >>>> ---------------------- >>>>=20 >>>> I am having a little bit of trouble trying to get my first hello world= app on a K60 Tower Board. >>>>=20 >>>> I have RedBoot running from ROM and I can ping the ethernet port, so p= resumably I will eventually get GDB to talk to it. >>>>=20 >>>> I am having trouble building an initial app that uses the ROM monitor.= Following the example in the eCos book, I went hunting for CYGSEM_HAL_USE_= ROM_MONITOR, enabled it and then set startup to SRAM. This seems the obviou= s way to run and debug. >>>>=20 >>>> PROBLEM >>>> -------------- >>>>=20 >>>> I am getting a conflict I don't know how to resolve. I have set CYG_HA= L_STARTUP_VAR =3D SRAM. This results in CYG_HAL_STARTUP =3D SRAM by calcula= tion. >>>>=20 >>>> But I get a conflict from CYGSEM_HAL_USE_ROM_MONITOR that wants CYG_HA= L_STARTUP =3D=3D RAM >>> SRAM and RAM startups are not the same. RAM startup is intended for >>> using under control of RedBoot and has some special properties: RAM, >>> unlike other startup types uses RedBoot's vectors, etc... >>>=20 >>> SRAM startup is kind of "stand-alone" in a way it does not depend on >>> RedBoot (but depends on JTAG debugger) >>>=20 >>>> QUESTIONS >>>> ----------------- >>>>=20 >>>> 1) Can I ignore this conflict and get the monitor and app to work? >>> I'm afraid not because, SRAM startup collides with RedBoot. >>>> 2) Is there a better approach? >>> The right approach is to create RAM startup. It could live on variant >>> level and be available to all Kinetis platforms (though some may have >>> too little memory to utilize it). >>> The attached patches should produce proper variant-level RAM startup. >>>=20 >>> I did not add it from beginning since I consider internal SRAM too >>> little for practical work, seems that other people have different view. >>> You are not the first to look for. >>> This being said, I am considering to add this startup to the main >>> repository. Would you open a Bug on Bugzilla? >>>=20 >>>> 3) Has anyone succeeded to use RedBoot on the K60 and can you supply a= n example config project that works that I can look at? >>> You may want to try this: >>> http://bugs.ecos.sourceware.org/show_bug.cgi?id=3D1001623 but beware, it >>> is experimental, and at present it may be broken as it's not synced with >>> recent Kinetis patches. >>> Take care not to lock your Kinetis flash - You have been warned :) >>>=20 >>> I hope this helps and I would appreciate feedback. >>>=20 >>> Regards >>> Ilija >>> --=20 >>> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos >>> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss >>=20 >=20 -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss