public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Kinetis TWR-K60N512-KIT questions
@ 2011-01-27 17:24 jjp jjp
  2011-01-28 16:05 ` Ilija Kocho
  0 siblings, 1 reply; 26+ messages in thread
From: jjp jjp @ 2011-01-27 17:24 UTC (permalink / raw)
  To: ecos-discuss


Hi,
I follow very closely the port of Ilija Kocho on Kinetis TWR-K60N512-KIT and
I have some questions about your development methods :

What cross compiler tools are you using (arm-eabi-gcc v-4.3 with patchs for cortex-m4)?
What kind of debugging tools are you using?

I don't see debug tools (except libSWD with OpenOCD) in Free and Open Source Software community trying
to get debug by Serial Wire Debug.

Best regards
 		 	   		  

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [ECOS] Kinetis TWR-K60N512-KIT questions
  2011-01-27 17:24 [ECOS] Kinetis TWR-K60N512-KIT questions jjp jjp
@ 2011-01-28 16:05 ` Ilija Kocho
       [not found]   ` <SNT129-W29DA08015F0442D154694DADA70@phx.gbl>
  0 siblings, 1 reply; 26+ messages in thread
From: Ilija Kocho @ 2011-01-28 16:05 UTC (permalink / raw)
  To: ecos-discuss


On 27.01.2011 10:09, jjp jjp wrote:
> Hi,
> I follow very closely the port of Ilija Kocho on Kinetis TWR-K60N512-KIT and
> I have some questions about your development methods :
Hello, and thanks for your interest.
> What cross compiler tools are you using (arm-eabi-gcc v-4.3 with patchs for cortex-m4)?
> What kind of debugging tools are you using?
Cortex-M4 is binary and backward compatible with M3 so, for the time
being you can use current compiler, of course you can't use Cortex-M4
specific features. Or you can try forthcoming 4.6.

> I don't see debug tools (except libSWD with OpenOCD) in Free and Open Source Software community trying
> to get debug by Serial Wire Debug.

Kinetis is very new, not yet in regular production so many tools are not
yet prepared. I don't know if OpenOCD supports Kinetis. In our lab we
have Ronetix PEEDI that is just getting Kinetis support. In meantime we
are working "dry" :(

Regards
Ilija


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [ECOS] Kinetis TWR-K60N512-KIT questions
       [not found]   ` <SNT129-W29DA08015F0442D154694DADA70@phx.gbl>
@ 2011-04-08 20:16     ` Ilija Kocho
       [not found]     ` <4D9F6B61.705@siva.com.mk>
  1 sibling, 0 replies; 26+ messages in thread
From: Ilija Kocho @ 2011-04-08 20:16 UTC (permalink / raw)
  To: eCos Discussion; +Cc: jjp jjp

Hi jjp

Thank for question, you are coming in right time, A week ago I placed
Kinetis port on Bugzilla.
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001187
I'll appreciate if you try it and come with feedback.
Note:You need to commit latest version from CVS as it has bugs 1001184,
1001186 integrated.

I am using official eCos 3.0 tools (-m3 of course) in order to maintain
compatibility, but I am keen to try gcc 4.6.

Note: When you send mail to eCos mailing lists make sure it is plain
text, not HTML - because it shall be discarded.

Regards
Ilija

On 08.04.2011 16:42, jjp jjp wrote:
> Hi list,
> I am doing some tiny tests with k60 and I have some troubles to make
> SVC call running properly.
> Vector table is set at 0x20000000 in register SCB_VTOR, psp and msp
> have different adresses in RAM.
> I always get an HardFault after __asm__("svc 0");
Check if VTOR setting is as desired, 0x20000000 should work. Also stack,
what do you have in mlt files?
> Ilija, is it working properly for you?
> I'm using :
>    -. gcc-4.6.0
>    -. binutils-2.21.51 (patched snaphot with OS support for cortex-m4)
>    -. zylin zy1000 (revB 1.66)
Nice to see that Zylin supports Kinetis too.
> Regards
>
> > Date: Thu, 27 Jan 2011 23:01:15 +0100
> > From: ilijak@siva.com.mk
> > To: ecos-discuss@ecos.sourceware.org
> > Subject: Re: [ECOS] Kinetis TWR-K60N512-KIT questions
> >
> >
> > On 27.01.2011 10:09, jjp jjp wrote:
> > > Hi,
> > > I follow very closely the port of Ilija Kocho on Kinetis
> TWR-K60N512-KIT and
> > > I have some questions about your development methods :
> > Hello, and thanks for your interest.
> > > What cross compiler tools are you using (arm-eabi-gcc v-4.3 with
> patchs for cortex-m4)?
> > > What kind of debugging tools are you using?
> > Cortex-M4 is binary and backward compatible with M3 so, for the time
> > being you can use current compiler, of course you can't use Cortex-M4
> > specific features. Or you can try forthcoming 4.6.
> >
> > > I don't see debug tools (except libSWD with OpenOCD) in Free and
> Open Source Software community trying
> > > to get debug by Serial Wire Debug.
> >
> > Kinetis is very new, not yet in regular production so many tools are not
> > yet prepared. I don't know if OpenOCD supports Kinetis. In our lab we
> > have Ronetix PEEDI that is just getting Kinetis support. In meantime we
> > are working "dry" :(
> >
> > Regards
> > Ilija
> >
> >
> > --
> > Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> > and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
> >



-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 26+ messages in thread

* RE: [ECOS] Kinetis TWR-K60N512-KIT questions
       [not found]     ` <4D9F6B61.705@siva.com.mk>
@ 2011-04-11  7:42       ` jjp jjp
  2011-04-12 18:09         ` Ilija Kocho
  0 siblings, 1 reply; 26+ messages in thread
From: jjp jjp @ 2011-04-11  7:42 UTC (permalink / raw)
  To: ilijak, ecos-discuss


Hi Ilija,
I can't test it before wednesday.
I will give you feedbacks as soon as possible.
Regards.


Date: Fri, 8 Apr 2011 22:09:05 +0200
From: ilijak@siva.com.mk
To: ecos-discuss@ecos.sourceware.org
CC: jackoaway@hotmail.com
Subject: Re: [ECOS] Kinetis TWR-K60N512-KIT questions



  


    
  
  
    Hi jjp

    

    Thank for question, you are coming in right time, A week ago I
    placed Kinetis port on Bugzilla. 

    http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001187

    I'll appreciate if you try it and come with feedback.

    Note:You need to commit latest version from CVS as it has bugs
    1001184, 1001186 integrated.

    

    I am using official eCos 3.0 tools (-m3 of course) in order to
    maintain compatibility, but I am keen to try gcc 4.6.

    

    Regards

    Ilija

    

    On 08.04.2011 16:42, jjp jjp wrote:
    
      
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Tahoma;}


      Hi list,

      I am doing some tiny tests with k60 and I have some troubles to
      make SVC call running properly.

      Vector table is set at 0x20000000 in register SCB_VTOR, psp and
      msp have different adresses in RAM.

      I always get an HardFault after __asm__("svc 0");

    
    Check if VTOR setting is as desired, 0x20000000 should work. Also
    stack, what do you have in mlt files?

    Ilija, is it working properly for you?

      I'm using :

         -. gcc-4.6.0

    
       -. binutils-2.21.51 (patched snaphot with OS
      support for cortex-m4)

         -. zylin zy1000 (revB 1.66)

    
    Nice to see that Zylin supports Kinetis too.

    Regards

      

      > Date: Thu, 27 Jan 2011 23:01:15 +0100

      > From: ilijak@siva.com.mk

      > To: ecos-discuss@ecos.sourceware.org

      > Subject: Re: [ECOS] Kinetis TWR-K60N512-KIT questions

      > 

      > 

      > On 27.01.2011 10:09, jjp jjp wrote:

      > > Hi,

      > > I follow very closely the port of Ilija Kocho on Kinetis
      TWR-K60N512-KIT and

      > > I have some questions about your development methods :

      > Hello, and thanks for your interest.

      > > What cross compiler tools are you using (arm-eabi-gcc
      v-4.3 with patchs for cortex-m4)?

      > > What kind of debugging tools are you using?

      > Cortex-M4 is binary and backward compatible with M3 so, for
      the time

      > being you can use current compiler, of course you can't use
      Cortex-M4

      > specific features. Or you can try forthcoming 4.6.

      > 

      > > I don't see debug tools (except libSWD with OpenOCD) in
      Free and Open Source Software community trying

      > > to get debug by Serial Wire Debug.

      > 

      > Kinetis is very new, not yet in regular production so many
      tools are not

      > yet prepared. I don't know if OpenOCD supports Kinetis. In
      our lab we

      > have Ronetix PEEDI that is just getting Kinetis support. In
      meantime we

      > are working "dry" :(

      > 

      > Regards

      > Ilija

      > 

      > 

      > -- 

      > Before posting, please read the FAQ:
      http://ecos.sourceware.org/fom/ecos

      > and search the list archive:
      http://ecos.sourceware.org/ml/ecos-discuss

      > 

    
    
 		 	   		  

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [ECOS] Kinetis TWR-K60N512-KIT questions
  2011-04-11  7:42       ` jjp jjp
@ 2011-04-12 18:09         ` Ilija Kocho
  2011-04-13  8:01           ` jjp jjp
  0 siblings, 1 reply; 26+ messages in thread
From: Ilija Kocho @ 2011-04-12 18:09 UTC (permalink / raw)
  To: ecos-discuss

Hi again

In meantime I have built gnutools arround GCC 4.6.0:
    gcc-4.6.0
    newlib-1.19.0
    binutils-2.21.51 (+ OS patch, see note below)
    gdb-7.2

First tests are encouraging, I was able to get "Hello world" with both
HAL and devs serial driver.

Note regarding binutils-2.21.51:

>       -. binutils-2.21.51 (patched snaphot with OS
>     support for cortex-m4)


I don't quite figure out whether you mean that you downloaded
binutils-2.21.51 already patched or you have applied the patch. I
downloaded binutils-2.21.51 today and it is didn't have the OS patch,
(Btw it seem to have been committed yesterday):
http://sourceware.org/bugzilla/show_bug.cgi?id=12296

However gcc-4.6.0 works for Cortex-M4, or at least for Kinetis - with
both -mcpu=cortex-m4 and -mcpu=cortex-m3.

I am looking forward to your tests.

Regards
Ilija


On 11.04.2011 09:42, jjp jjp wrote:
> Hi Ilija,
> I can't test it before wednesday.
> I will give you feedbacks as soon as possible.
> Regards.
>
>
> Date: Fri, 8 Apr 2011 22:09:05 +0200
> From: ilijak@siva.com.mk
> To: ecos-discuss@ecos.sourceware.org
> CC: jackoaway@hotmail.com
> Subject: Re: [ECOS] Kinetis TWR-K60N512-KIT questions
>   
>     Hi jjp
>
>     
>
>     Thank for question, you are coming in right time, A week ago I
>     placed Kinetis port on Bugzilla. 
>
>     http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001187
>
>     I'll appreciate if you try it and come with feedback.
>
>     Note:You need to commit latest version from CVS as it has bugs
>     1001184, 1001186 integrated.
>
>     
>
>     I am using official eCos 3.0 tools (-m3 of course) in order to
>     maintain compatibility, but I am keen to try gcc 4.6.
>
>     
>
>     Regards
>
>     Ilija
>
>     
>
>     On 08.04.2011 16:42, jjp jjp wrote:
>     
>       Hi list,
>
>       I am doing some tiny tests with k60 and I have some troubles to
>       make SVC call running properly.
>
>       Vector table is set at 0x20000000 in register SCB_VTOR, psp and
>       msp have different adresses in RAM.
>
>       I always get an HardFault after __asm__("svc 0");
>
>     
>     Check if VTOR setting is as desired, 0x20000000 should work. Also
>     stack, what do you have in mlt files?
>
>     Ilija, is it working properly for you?
>
>       I'm using :
>
>          -. gcc-4.6.0
>
>     
>        -. binutils-2.21.51 (patched snaphot with OS
>       support for cortex-m4)
>
>          -. zylin zy1000 (revB 1.66)
>
>     
>     Nice to see that Zylin supports Kinetis too.
>
>     Regards
>
>       
>
>       > Date: Thu, 27 Jan 2011 23:01:15 +0100
>
>       > From: ilijak@siva.com.mk
>
>       > To: ecos-discuss@ecos.sourceware.org
>
>       > Subject: Re: [ECOS] Kinetis TWR-K60N512-KIT questions
>
>       > 
>
>       > 
>
>       > On 27.01.2011 10:09, jjp jjp wrote:
>
>       > > Hi,
>
>       > > I follow very closely the port of Ilija Kocho on Kinetis
>       TWR-K60N512-KIT and
>
>       > > I have some questions about your development methods :
>
>       > Hello, and thanks for your interest.
>
>       > > What cross compiler tools are you using (arm-eabi-gcc
>       v-4.3 with patchs for cortex-m4)?
>
>       > > What kind of debugging tools are you using?
>
>       > Cortex-M4 is binary and backward compatible with M3 so, for
>       the time
>
>       > being you can use current compiler, of course you can't use
>       Cortex-M4
>
>       > specific features. Or you can try forthcoming 4.6.
>
>       > 
>
>       > > I don't see debug tools (except libSWD with OpenOCD) in
>       Free and Open Source Software community trying
>
>       > > to get debug by Serial Wire Debug.
>
>       > 
>
>       > Kinetis is very new, not yet in regular production so many
>       tools are not
>
>       > yet prepared. I don't know if OpenOCD supports Kinetis. In
>       our lab we
>
>       > have Ronetix PEEDI that is just getting Kinetis support. In
>       meantime we
>
>       > are working "dry" :(
>
>       > 
>
>       > Regards
>
>       > Ilija
>
>       > 
>
>       > 
>
>       > -- 
>
>       > Before posting, please read the FAQ:
>       http://ecos.sourceware.org/fom/ecos
>
>       > and search the list archive:
>       http://ecos.sourceware.org/ml/ecos-discuss
>
>       > 
>
>     
>     
>  		 	   		  
>


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 26+ messages in thread

* RE: [ECOS] Kinetis TWR-K60N512-KIT questions
  2011-04-12 18:09         ` Ilija Kocho
@ 2011-04-13  8:01           ` jjp jjp
  2011-04-13 15:55             ` Ilija Kocho
  0 siblings, 1 reply; 26+ messages in thread
From: jjp jjp @ 2011-04-13  8:01 UTC (permalink / raw)
  To: ilijak, ecos-discuss


Hi,
I modify the code according to http://sourceware.org/bugzilla/attachment.cgi?id=5340&action=diff
which is same bug you are talking about.

I will begin to test your HAL as soon as possible (maybe tomorrow).

Regards.
Note :  I'm using cortex-m3 support on Zylin zy1000.

----------------------------------------
> Date: Tue, 12 Apr 2011 20:08:56 +0200
> From: ilijak@siva.com.mk
> To: ecos-discuss@ecos.sourceware.org
> Subject: Re: [ECOS] Kinetis TWR-K60N512-KIT questions
>
> Hi again
>
> In meantime I have built gnutools arround GCC 4.6.0:
> gcc-4.6.0
> newlib-1.19.0
> binutils-2.21.51 (+ OS patch, see note below)
> gdb-7.2
>
> First tests are encouraging, I was able to get "Hello world" with both
> HAL and devs serial driver.
>
> Note regarding binutils-2.21.51:
>
> > -. binutils-2.21.51 (patched snaphot with OS
> > support for cortex-m4)
>
>
> I don't quite figure out whether you mean that you downloaded
> binutils-2.21.51 already patched or you have applied the patch. I
> downloaded binutils-2.21.51 today and it is didn't have the OS patch,
> (Btw it seem to have been committed yesterday):
> http://sourceware.org/bugzilla/show_bug.cgi?id=12296
>
> However gcc-4.6.0 works for Cortex-M4, or at least for Kinetis - with
> both -mcpu=cortex-m4 and -mcpu=cortex-m3.
>
> I am looking forward to your tests.
>
> Regards
> Ilija
>
>
> On 11.04.2011 09:42, jjp jjp wrote:
> > Hi Ilija,
> > I can't test it before wednesday.
> > I will give you feedbacks as soon as possible.
> > Regards.
> >
> >
> > Date: Fri, 8 Apr 2011 22:09:05 +0200
> > From: ilijak@siva.com.mk
> > To: ecos-discuss@ecos.sourceware.org
> > CC: jackoaway@hotmail.com
> > Subject: Re: [ECOS] Kinetis TWR-K60N512-KIT questions
> >
> > Hi jjp
> >
> >
> >
> > Thank for question, you are coming in right time, A week ago I
> > placed Kinetis port on Bugzilla.
> >
> > http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001187
> >
> > I'll appreciate if you try it and come with feedback.
> >
> > Note:You need to commit latest version from CVS as it has bugs
> > 1001184, 1001186 integrated.
> >
> >
> >
> > I am using official eCos 3.0 tools (-m3 of course) in order to
> > maintain compatibility, but I am keen to try gcc 4.6.
> >
> >
> >
> > Regards
> >
> > Ilija
> >
> >
> >
> > On 08.04.2011 16:42, jjp jjp wrote:
> >
> > Hi list,
> >
> > I am doing some tiny tests with k60 and I have some troubles to
> > make SVC call running properly.
> >
> > Vector table is set at 0x20000000 in register SCB_VTOR, psp and
> > msp have different adresses in RAM.
> >
> > I always get an HardFault after __asm__("svc 0");
> >
> >
> > Check if VTOR setting is as desired, 0x20000000 should work. Also
> > stack, what do you have in mlt files?
> >
> > Ilija, is it working properly for you?
> >
> > I'm using :
> >
> > -. gcc-4.6.0
> >
> >
> > -. binutils-2.21.51 (patched snaphot with OS
> > support for cortex-m4)
> >
> > -. zylin zy1000 (revB 1.66)
> >
> >
> > Nice to see that Zylin supports Kinetis too.
> >
> > Regards
> >
> >
> >
> > > Date: Thu, 27 Jan 2011 23:01:15 +0100
> >
> > > From: ilijak@siva.com.mk
> >
> > > To: ecos-discuss@ecos.sourceware.org
> >
> > > Subject: Re: [ECOS] Kinetis TWR-K60N512-KIT questions
> >
> > >
> >
> > >
> >
> > > On 27.01.2011 10:09, jjp jjp wrote:
> >
> > > > Hi,
> >
> > > > I follow very closely the port of Ilija Kocho on Kinetis
> > TWR-K60N512-KIT and
> >
> > > > I have some questions about your development methods :
> >
> > > Hello, and thanks for your interest.
> >
> > > > What cross compiler tools are you using (arm-eabi-gcc
> > v-4.3 with patchs for cortex-m4)?
> >
> > > > What kind of debugging tools are you using?
> >
> > > Cortex-M4 is binary and backward compatible with M3 so, for
> > the time
> >
> > > being you can use current compiler, of course you can't use
> > Cortex-M4
> >
> > > specific features. Or you can try forthcoming 4.6.
> >
> > >
> >
> > > > I don't see debug tools (except libSWD with OpenOCD) in
> > Free and Open Source Software community trying
> >
> > > > to get debug by Serial Wire Debug.
> >
> > >
> >
> > > Kinetis is very new, not yet in regular production so many
> > tools are not
> >
> > > yet prepared. I don't know if OpenOCD supports Kinetis. In
> > our lab we
> >
> > > have Ronetix PEEDI that is just getting Kinetis support. In
> > meantime we
> >
> > > are working "dry" :(
> >
> > >
> >
> > > Regards
> >
> > > Ilija
> >
> > >
> >
> > >
> >
> > > --
> >
> > > Before posting, please read the FAQ:
> > http://ecos.sourceware.org/fom/ecos
> >
> > > and search the list archive:
> > http://ecos.sourceware.org/ml/ecos-discuss
> >
> > >
> >
> >
> >
> >
> >
>
>
> --
> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
>
 		 	   		  

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [ECOS] Kinetis TWR-K60N512-KIT questions
  2011-04-13  8:01           ` jjp jjp
@ 2011-04-13 15:55             ` Ilija Kocho
  2011-04-14  7:29               ` jjp jjp
  0 siblings, 1 reply; 26+ messages in thread
From: Ilija Kocho @ 2011-04-13 15:55 UTC (permalink / raw)
  To: ecos-discuss

On 13.04.2011 10:01, jjp jjp wrote:
> Hi,
> I modify the code according to http://sourceware.org/bugzilla/attachment.cgi?id=5340&action=diff
> which is same bug you are talking about.

It is the same bug, but the patch is obsoleted by a new one. Pse revisit
the bug.

> I will begin to test your HAL as soon as possible (maybe tomorrow).
Can you tell me what platform HW do you test on?
Especially what is your clock source (unless it is TWR-K60N512)?

> Regards.
> Note :  I'm using cortex-m3 support on Zylin zy1000.
>
> ----------------------------------------
>> Date: Tue, 12 Apr 2011 20:08:56 +0200
>> From: ilijak@siva.com.mk
>> To: ecos-discuss@ecos.sourceware.org
>> Subject: Re: [ECOS] Kinetis TWR-K60N512-KIT questions
>>
>> Hi again
>>
>> In meantime I have built gnutools arround GCC 4.6.0:
>> gcc-4.6.0
>> newlib-1.19.0
>> binutils-2.21.51 (+ OS patch, see note below)
>> gdb-7.2
>>
>> First tests are encouraging, I was able to get "Hello world" with both
>> HAL and devs serial driver.
>>
>> Note regarding binutils-2.21.51:
>>
>>> -. binutils-2.21.51 (patched snaphot with OS
>>> support for cortex-m4)
>>
>> I don't quite figure out whether you mean that you downloaded
>> binutils-2.21.51 already patched or you have applied the patch. I
>> downloaded binutils-2.21.51 today and it is didn't have the OS patch,
>> (Btw it seem to have been committed yesterday):
>> http://sourceware.org/bugzilla/show_bug.cgi?id=12296
>>
>> However gcc-4.6.0 works for Cortex-M4, or at least for Kinetis - with
>> both -mcpu=cortex-m4 and -mcpu=cortex-m3.
>>
>> I am looking forward to your tests.
>>
>> Regards
>> Ilija
>>
>>
>> On 11.04.2011 09:42, jjp jjp wrote:
>>> Hi Ilija,
>>> I can't test it before wednesday.
>>> I will give you feedbacks as soon as possible.
>>> Regards.
>>>
>>>
>>> Date: Fri, 8 Apr 2011 22:09:05 +0200
>>> From: ilijak@siva.com.mk
>>> To: ecos-discuss@ecos.sourceware.org
>>> CC: jackoaway@hotmail.com
>>> Subject: Re: [ECOS] Kinetis TWR-K60N512-KIT questions
>>>
>>> Hi jjp
>>>
>>>
>>>
>>> Thank for question, you are coming in right time, A week ago I
>>> placed Kinetis port on Bugzilla.
>>>
>>> http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001187
>>>
>>> I'll appreciate if you try it and come with feedback.
>>>
>>> Note:You need to commit latest version from CVS as it has bugs
>>> 1001184, 1001186 integrated.
>>>
>>>
>>>
>>> I am using official eCos 3.0 tools (-m3 of course) in order to
>>> maintain compatibility, but I am keen to try gcc 4.6.
>>>
>>>
>>>
>>> Regards
>>>
>>> Ilija
>>>
>>>
>>>
>>> On 08.04.2011 16:42, jjp jjp wrote:
>>>
>>> Hi list,
>>>
>>> I am doing some tiny tests with k60 and I have some troubles to
>>> make SVC call running properly.
>>>
>>> Vector table is set at 0x20000000 in register SCB_VTOR, psp and
>>> msp have different adresses in RAM.
>>>
>>> I always get an HardFault after __asm__("svc 0");
>>>
>>>
>>> Check if VTOR setting is as desired, 0x20000000 should work. Also
>>> stack, what do you have in mlt files?
>>>
>>> Ilija, is it working properly for you?
>>>
>>> I'm using :
>>>
>>> -. gcc-4.6.0
>>>
>>>
>>> -. binutils-2.21.51 (patched snaphot with OS
>>> support for cortex-m4)
>>>
>>> -. zylin zy1000 (revB 1.66)
>>>
>>>
>>> Nice to see that Zylin supports Kinetis too.
>>>
>>> Regards
>>>
>>>
>>>
>>>> Date: Thu, 27 Jan 2011 23:01:15 +0100
>>>> From: ilijak@siva.com.mk
>>>> To: ecos-discuss@ecos.sourceware.org
>>>> Subject: Re: [ECOS] Kinetis TWR-K60N512-KIT questions
>>>> On 27.01.2011 10:09, jjp jjp wrote:
>>>>> Hi,
>>>>> I follow very closely the port of Ilija Kocho on Kinetis
>>> TWR-K60N512-KIT and
>>>
>>>>> I have some questions about your development methods :
>>>> Hello, and thanks for your interest.
>>>>> What cross compiler tools are you using (arm-eabi-gcc
>>> v-4.3 with patchs for cortex-m4)?
>>>
>>>>> What kind of debugging tools are you using?
>>>> Cortex-M4 is binary and backward compatible with M3 so, for
>>> the time
>>>
>>>> being you can use current compiler, of course you can't use
>>> Cortex-M4
>>>
>>>> specific features. Or you can try forthcoming 4.6.
>>>>> I don't see debug tools (except libSWD with OpenOCD) in
>>> Free and Open Source Software community trying
>>>
>>>>> to get debug by Serial Wire Debug.
>>>> Kinetis is very new, not yet in regular production so many
>>> tools are not
>>>
>>>> yet prepared. I don't know if OpenOCD supports Kinetis. In
>>> our lab we
>>>
>>>> have Ronetix PEEDI that is just getting Kinetis support. In
>>> meantime we
>>>
>>>> are working "dry" :(
>>>> Regards
>>>> Ilija
>>>> --
>>>> Before posting, please read the FAQ:
>>> http://ecos.sourceware.org/fom/ecos
>>>
>>>> and search the list archive:
>>> http://ecos.sourceware.org/ml/ecos-discuss
>>>
>>>
>>>
>>>
>>>
>>
>> --
>> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
>> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
>>
>  		 	   		  
>


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 26+ messages in thread

* RE: [ECOS] Kinetis TWR-K60N512-KIT questions
  2011-04-13 15:55             ` Ilija Kocho
@ 2011-04-14  7:29               ` jjp jjp
  2011-04-14 10:53                 ` Ilija Kocho
  0 siblings, 1 reply; 26+ messages in thread
From: jjp jjp @ 2011-04-14  7:29 UTC (permalink / raw)
  To: ilijak, ecos-discuss


Hi,
I have a TWR-K60N512 too!
Is it possible to apply patchs to Mercurial version?
(CVS is blocked and I ask my admin to free it)
Actually, I clone the repository using informations from
http://www.ecoscentric.com/devzone/snapshots.shtml and actual
changeset is 3029:9aec6a8ff9b9.
Regards.

----------------------------------------
> Date: Wed, 13 Apr 2011 17:54:49 +0200
> From: ilijak@siva.com.mk
> To: ecos-discuss@ecos.sourceware.org
> Subject: Re: [ECOS] Kinetis TWR-K60N512-KIT questions
>
> On 13.04.2011 10:01, jjp jjp wrote:
> > Hi,
> > I modify the code according to http://sourceware.org/bugzilla/attachment.cgi?id=5340&action=diff
> > which is same bug you are talking about.
>
> It is the same bug, but the patch is obsoleted by a new one. Pse revisit
> the bug.
>
> > I will begin to test your HAL as soon as possible (maybe tomorrow).
> Can you tell me what platform HW do you test on?
> Especially what is your clock source (unless it is TWR-K60N512)?
>
> > Regards.
> > Note : I'm using cortex-m3 support on Zylin zy1000.
> >
> > ----------------------------------------
> >> Date: Tue, 12 Apr 2011 20:08:56 +0200
> >> From: ilijak@siva.com.mk
> >> To: ecos-discuss@ecos.sourceware.org
> >> Subject: Re: [ECOS] Kinetis TWR-K60N512-KIT questions
> >>
> >> Hi again
> >>
> >> In meantime I have built gnutools arround GCC 4.6.0:
> >> gcc-4.6.0
> >> newlib-1.19.0
> >> binutils-2.21.51 (+ OS patch, see note below)
> >> gdb-7.2
> >>
> >> First tests are encouraging, I was able to get "Hello world" with both
> >> HAL and devs serial driver.
> >>
> >> Note regarding binutils-2.21.51:
> >>
> >>> -. binutils-2.21.51 (patched snaphot with OS
> >>> support for cortex-m4)
> >>
> >> I don't quite figure out whether you mean that you downloaded
> >> binutils-2.21.51 already patched or you have applied the patch. I
> >> downloaded binutils-2.21.51 today and it is didn't have the OS patch,
> >> (Btw it seem to have been committed yesterday):
> >> http://sourceware.org/bugzilla/show_bug.cgi?id=12296
> >>
> >> However gcc-4.6.0 works for Cortex-M4, or at least for Kinetis - with
> >> both -mcpu=cortex-m4 and -mcpu=cortex-m3.
> >>
> >> I am looking forward to your tests.
> >>
> >> Regards
> >> Ilija
> >>
> >>
> >> On 11.04.2011 09:42, jjp jjp wrote:
> >>> Hi Ilija,
> >>> I can't test it before wednesday.
> >>> I will give you feedbacks as soon as possible.
> >>> Regards.
> >>>
> >>>
> >>> Date: Fri, 8 Apr 2011 22:09:05 +0200
> >>> From: ilijak@siva.com.mk
> >>> To: ecos-discuss@ecos.sourceware.org
> >>> CC: jackoaway@hotmail.com
> >>> Subject: Re: [ECOS] Kinetis TWR-K60N512-KIT questions
> >>>
> >>> Hi jjp
> >>>
> >>>
> >>>
> >>> Thank for question, you are coming in right time, A week ago I
> >>> placed Kinetis port on Bugzilla.
> >>>
> >>> http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001187
> >>>
> >>> I'll appreciate if you try it and come with feedback.
> >>>
> >>> Note:You need to commit latest version from CVS as it has bugs
> >>> 1001184, 1001186 integrated.
> >>>
> >>>
> >>>
> >>> I am using official eCos 3.0 tools (-m3 of course) in order to
> >>> maintain compatibility, but I am keen to try gcc 4.6.
> >>>
> >>>
> >>>
> >>> Regards
> >>>
> >>> Ilija
> >>>
> >>>
> >>>
> >>> On 08.04.2011 16:42, jjp jjp wrote:
> >>>
> >>> Hi list,
> >>>
> >>> I am doing some tiny tests with k60 and I have some troubles to
> >>> make SVC call running properly.
> >>>
> >>> Vector table is set at 0x20000000 in register SCB_VTOR, psp and
> >>> msp have different adresses in RAM.
> >>>
> >>> I always get an HardFault after __asm__("svc 0");
> >>>
> >>>
> >>> Check if VTOR setting is as desired, 0x20000000 should work. Also
> >>> stack, what do you have in mlt files?
> >>>
> >>> Ilija, is it working properly for you?
> >>>
> >>> I'm using :
> >>>
> >>> -. gcc-4.6.0
> >>>
> >>>
> >>> -. binutils-2.21.51 (patched snaphot with OS
> >>> support for cortex-m4)
> >>>
> >>> -. zylin zy1000 (revB 1.66)
> >>>
> >>>
> >>> Nice to see that Zylin supports Kinetis too.
> >>>
> >>> Regards
> >>>
> >>>
> >>>
> >>>> Date: Thu, 27 Jan 2011 23:01:15 +0100
> >>>> From: ilijak@siva.com.mk
> >>>> To: ecos-discuss@ecos.sourceware.org
> >>>> Subject: Re: [ECOS] Kinetis TWR-K60N512-KIT questions
> >>>> On 27.01.2011 10:09, jjp jjp wrote:
> >>>>> Hi,
> >>>>> I follow very closely the port of Ilija Kocho on Kinetis
> >>> TWR-K60N512-KIT and
> >>>
> >>>>> I have some questions about your development methods :
> >>>> Hello, and thanks for your interest.
> >>>>> What cross compiler tools are you using (arm-eabi-gcc
> >>> v-4.3 with patchs for cortex-m4)?
> >>>
> >>>>> What kind of debugging tools are you using?
> >>>> Cortex-M4 is binary and backward compatible with M3 so, for
> >>> the time
> >>>
> >>>> being you can use current compiler, of course you can't use
> >>> Cortex-M4
> >>>
> >>>> specific features. Or you can try forthcoming 4.6.
> >>>>> I don't see debug tools (except libSWD with OpenOCD) in
> >>> Free and Open Source Software community trying
> >>>
> >>>>> to get debug by Serial Wire Debug.
> >>>> Kinetis is very new, not yet in regular production so many
> >>> tools are not
> >>>
> >>>> yet prepared. I don't know if OpenOCD supports Kinetis. In
> >>> our lab we
> >>>
> >>>> have Ronetix PEEDI that is just getting Kinetis support. In
> >>> meantime we
> >>>
> >>>> are working "dry" :(
> >>>> Regards
> >>>> Ilija
> >>>> --
> >>>> Before posting, please read the FAQ:
> >>> http://ecos.sourceware.org/fom/ecos
> >>>
> >>>> and search the list archive:
> >>> http://ecos.sourceware.org/ml/ecos-discuss
> >>>
> >>>
> >>>
> >>>
> >>>
> >>
> >> --
> >> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> >> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
> >>
> >
> >
>
>
> --
> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
>
 		 	   		  

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [ECOS] Kinetis TWR-K60N512-KIT questions
  2011-04-14  7:29               ` jjp jjp
@ 2011-04-14 10:53                 ` Ilija Kocho
  2011-04-14 11:11                   ` Drasko DRASKOVIC
  2011-04-14 12:14                   ` jjp jjp
  0 siblings, 2 replies; 26+ messages in thread
From: Ilija Kocho @ 2011-04-14 10:53 UTC (permalink / raw)
  To: ecos-discuss

On 14.04.2011 09:28, jjp jjp wrote:
> Hi,
> I have a TWR-K60N512 too!
> Is it possible to apply patchs to Mercurial version?

Actually, our Kinetis port is not yet committed to CVS. It is in
Bugzilla, in a queue for review by maintainers.
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001187
You can download the Kinetis Port diff files from there and patch your
eCos repository. Please observe the note (Comment 3) regarding patching.

I recommend to checkout a fresh eCos repository from CVS/Mercurial
unless you have revision later than 2011-04-06 17:59:20 BST, since it
has resolved bugs 1001184, 1001186 which are needed for this port.

I also recommend for first run to use official eCos gnutools. Later you
can try gcc-4.6.0

Tell me if you need additional info.

Regards
Ilija


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [ECOS] Kinetis TWR-K60N512-KIT questions
  2011-04-14 10:53                 ` Ilija Kocho
@ 2011-04-14 11:11                   ` Drasko DRASKOVIC
  2011-04-14 13:09                     ` Ilija Kocho
  2011-04-14 12:14                   ` jjp jjp
  1 sibling, 1 reply; 26+ messages in thread
From: Drasko DRASKOVIC @ 2011-04-14 11:11 UTC (permalink / raw)
  To: Ilija Kocho; +Cc: ecos-discuss

Hi Ilija,
for my curiosity, what is the footprint of this port ?

If I am not mistaken,  K60 have only 128KB of on-chip SRAM. Can it fit ?

BR,
Drasko

On Thu, Apr 14, 2011 at 12:52 PM, Ilija Kocho <ilijak@siva.com.mk> wrote:
> On 14.04.2011 09:28, jjp jjp wrote:
>> Hi,
>> I have a TWR-K60N512 too!
>> Is it possible to apply patchs to Mercurial version?
>
> Actually, our Kinetis port is not yet committed to CVS. It is in
> Bugzilla, in a queue for review by maintainers.
> http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001187
> You can download the Kinetis Port diff files from there and patch your
> eCos repository. Please observe the note (Comment 3) regarding patching.
>
> I recommend to checkout a fresh eCos repository from CVS/Mercurial
> unless you have revision later than 2011-04-06 17:59:20 BST, since it
> has resolved bugs 1001184, 1001186 which are needed for this port.
>
> I also recommend for first run to use official eCos gnutools. Later you
> can try gcc-4.6.0
>
> Tell me if you need additional info.
>
> Regards
> Ilija
>
>
> --
> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
>
>

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 26+ messages in thread

* RE: [ECOS] Kinetis TWR-K60N512-KIT questions
  2011-04-14 10:53                 ` Ilija Kocho
  2011-04-14 11:11                   ` Drasko DRASKOVIC
@ 2011-04-14 12:14                   ` jjp jjp
  2011-04-14 13:18                     ` Edgar Grimberg
  2011-04-14 13:50                     ` Ilija Kocho
  1 sibling, 2 replies; 26+ messages in thread
From: jjp jjp @ 2011-04-14 12:14 UTC (permalink / raw)
  To: ilijak, ecos-discuss


Hi,
Patchs apply!
(Date of last commit of my revison is Wed Apr 06 16:54:16 2011 +0000 with
with changeset 3029:9aec6a8ff9b92bcfff4852e47355e64494ec9ca8)

I make a simple "Hello world" application.
I am trying to find a way to flash binary file from elf application using 
CodeWarrior way.
Are you using PEEDI to flash your application?
Regards.


> Date: Thu, 14 Apr 2011 12:52:59 +0200
> From: ilijak@siva.com.mk
> To: ecos-discuss@ecos.sourceware.org
> Subject: Re: [ECOS] Kinetis TWR-K60N512-KIT questions
> 
> On 14.04.2011 09:28, jjp jjp wrote:
> > Hi,
> > I have a TWR-K60N512 too!
> > Is it possible to apply patchs to Mercurial version?
> 
> Actually, our Kinetis port is not yet committed to CVS. It is in
> Bugzilla, in a queue for review by maintainers.
> http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001187
> You can download the Kinetis Port diff files from there and patch your
> eCos repository. Please observe the note (Comment 3) regarding patching.
> 
> I recommend to checkout a fresh eCos repository from CVS/Mercurial
> unless you have revision later than 2011-04-06 17:59:20 BST, since it
> has resolved bugs 1001184, 1001186 which are needed for this port.
> 
> I also recommend for first run to use official eCos gnutools. Later you
> can try gcc-4.6.0
> 
> Tell me if you need additional info.
> 
> Regards
> Ilija
> 
> 
> -- 
> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
> 
 		 	   		  

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [ECOS] Kinetis TWR-K60N512-KIT questions
  2011-04-14 11:11                   ` Drasko DRASKOVIC
@ 2011-04-14 13:09                     ` Ilija Kocho
  2011-04-14 15:05                       ` Drasko DRASKOVIC
  0 siblings, 1 reply; 26+ messages in thread
From: Ilija Kocho @ 2011-04-14 13:09 UTC (permalink / raw)
  To: ecos-discuss

On 14.04.2011 13:11, Drasko DRASKOVIC wrote:
> Hi Ilija,
> for my curiosity, what is the footprint of this port ?
>
> If I am not mistaken,  K60 have only 128KB of on-chip SRAM. Can it fit ?
You are not mistaken regarding K60, only for eCos 128KiB RAM is not
"only", it's "a lot" - "puna kapa".

Regards
Ilija


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [ECOS] Kinetis TWR-K60N512-KIT questions
  2011-04-14 12:14                   ` jjp jjp
@ 2011-04-14 13:18                     ` Edgar Grimberg
  2011-04-14 14:11                       ` jjp jjp
  2011-04-14 13:50                     ` Ilija Kocho
  1 sibling, 1 reply; 26+ messages in thread
From: Edgar Grimberg @ 2011-04-14 13:18 UTC (permalink / raw)
  To: jjp jjp; +Cc: ecos-discuss

On Thu, Apr 14, 2011 at 2:14 PM, jjp jjp <jackoaway@hotmail.com> wrote:
>
> Hi,
> Patchs apply!
> (Date of last commit of my revison is Wed Apr 06 16:54:16 2011 +0000 with
> with changeset 3029:9aec6a8ff9b92bcfff4852e47355e64494ec9ca8)
>
> I make a simple "Hello world" application.
> I am trying to find a way to flash binary file from elf application using
> CodeWarrior way.

If you use OpenOCD (ZY1000 is OpenOCD), and you configure it
correctly, you can flash from within GDB on a "load" command.
Of course, you can transform your elf file into a bin (using objcopy),
and then flash it using a flash programmer of sorts.
What is the CoreWarrior way?

Edgar

> Are you using PEEDI to flash your application?
> Regards.
>
>
>> Date: Thu, 14 Apr 2011 12:52:59 +0200
>> From: ilijak@siva.com.mk
>> To: ecos-discuss@ecos.sourceware.org
>> Subject: Re: [ECOS] Kinetis TWR-K60N512-KIT questions
>>
>> On 14.04.2011 09:28, jjp jjp wrote:
>> > Hi,
>> > I have a TWR-K60N512 too!
>> > Is it possible to apply patchs to Mercurial version?
>>
>> Actually, our Kinetis port is not yet committed to CVS. It is in
>> Bugzilla, in a queue for review by maintainers.
>> http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001187
>> You can download the Kinetis Port diff files from there and patch your
>> eCos repository. Please observe the note (Comment 3) regarding patching.
>>
>> I recommend to checkout a fresh eCos repository from CVS/Mercurial
>> unless you have revision later than 2011-04-06 17:59:20 BST, since it
>> has resolved bugs 1001184, 1001186 which are needed for this port.
>>
>> I also recommend for first run to use official eCos gnutools. Later you
>> can try gcc-4.6.0
>>
>> Tell me if you need additional info.
>>
>> Regards
>> Ilija
>>
>>
>> --
>> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
>> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
>>
>
>
> --
> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
>
>

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [ECOS] Kinetis TWR-K60N512-KIT questions
  2011-04-14 12:14                   ` jjp jjp
  2011-04-14 13:18                     ` Edgar Grimberg
@ 2011-04-14 13:50                     ` Ilija Kocho
  1 sibling, 0 replies; 26+ messages in thread
From: Ilija Kocho @ 2011-04-14 13:50 UTC (permalink / raw)
  To: ecos-discuss

On 14.04.2011 14:14, jjp jjp wrote:
> Hi,
> Patchs apply!
> (Date of last commit of my revison is Wed Apr 06 16:54:16 2011 +0000 with
> with changeset 3029:9aec6a8ff9b92bcfff4852e47355e64494ec9ca8)
>
> I make a simple "Hello world" application.
> I am trying to find a way to flash binary file from elf application using 
> CodeWarrior way.

I'll am going to develop SRAM startup. Hope to have something early next
week (2011-04-18).

> Are you using PEEDI to flash your application?

Yes.

> Regards.
>
>
>> Date: Thu, 14 Apr 2011 12:52:59 +0200
>> From: ilijak@siva.com.mk
>> To: ecos-discuss@ecos.sourceware.org
>> Subject: Re: [ECOS] Kinetis TWR-K60N512-KIT questions
>>
>> On 14.04.2011 09:28, jjp jjp wrote:
>>> Hi,
>>> I have a TWR-K60N512 too!
>>> Is it possible to apply patchs to Mercurial version?
>> Actually, our Kinetis port is not yet committed to CVS. It is in
>> Bugzilla, in a queue for review by maintainers.
>> http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001187
>> You can download the Kinetis Port diff files from there and patch your
>> eCos repository. Please observe the note (Comment 3) regarding patching.
>>
>> I recommend to checkout a fresh eCos repository from CVS/Mercurial
>> unless you have revision later than 2011-04-06 17:59:20 BST, since it
>> has resolved bugs 1001184, 1001186 which are needed for this port.
>>
>> I also recommend for first run to use official eCos gnutools. Later you
>> can try gcc-4.6.0
>>
>> Tell me if you need additional info.
>>
>> Regards
>> Ilija
>>
>>
>> -- 
>> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
>> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
>>
>  		 	   		  
>


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 26+ messages in thread

* RE: [ECOS] Kinetis TWR-K60N512-KIT questions
  2011-04-14 13:18                     ` Edgar Grimberg
@ 2011-04-14 14:11                       ` jjp jjp
  2011-05-03 15:07                         ` jjp jjp
  0 siblings, 1 reply; 26+ messages in thread
From: jjp jjp @ 2011-04-14 14:11 UTC (permalink / raw)
  To: edgar.grimberg; +Cc: ecos-discuss


Hi,
I use finally SEGGER J-Flash program (4.2.4) to flash my bin.
But now with same program I can't access my board 
(even a connection to it!) and I am trying to solve this situation.

In OpenOCD doc, for Internal Flash it needs a driver name.
Except stm32 and at91sam3 which are cortex-m3 cores, there is nothing else.

There is an USB-OSJTAG port on the board. Apparently CodeWarrior can access
it to program flash and if I can't solve my problem with J-Link I will test it.

Regards.

----------------------------------------
> Date: Thu, 14 Apr 2011 15:17:53 +0200
> From: edgar.grimberg@gmail.com
> To: jackoaway@hotmail.com
> CC: ecos-discuss@ecos.sourceware.org
> Subject: Re: [ECOS] Kinetis TWR-K60N512-KIT questions
>
> On Thu, Apr 14, 2011 at 2:14 PM, jjp jjp  wrote:
> >
> > Hi,
> > Patchs apply!
> > (Date of last commit of my revison is Wed Apr 06 16:54:16 2011 +0000 with
> > with changeset 3029:9aec6a8ff9b92bcfff4852e47355e64494ec9ca8)
> >
> > I make a simple "Hello world" application.
> > I am trying to find a way to flash binary file from elf application using
> > CodeWarrior way.
>
> If you use OpenOCD (ZY1000 is OpenOCD), and you configure it
> correctly, you can flash from within GDB on a "load" command.
> Of course, you can transform your elf file into a bin (using objcopy),
> and then flash it using a flash programmer of sorts.
> What is the CoreWarrior way?
>
> Edgar
>
> > Are you using PEEDI to flash your application?
> > Regards.
> >
> >
> >> Date: Thu, 14 Apr 2011 12:52:59 +0200
> >> From: ilijak@siva.com.mk
> >> To: ecos-discuss@ecos.sourceware.org
> >> Subject: Re: [ECOS] Kinetis TWR-K60N512-KIT questions
> >>
> >> On 14.04.2011 09:28, jjp jjp wrote:
> >> > Hi,
> >> > I have a TWR-K60N512 too!
> >> > Is it possible to apply patchs to Mercurial version?
> >>
> >> Actually, our Kinetis port is not yet committed to CVS. It is in
> >> Bugzilla, in a queue for review by maintainers.
> >> http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001187
> >> You can download the Kinetis Port diff files from there and patch your
> >> eCos repository. Please observe the note (Comment 3) regarding patching.
> >>
> >> I recommend to checkout a fresh eCos repository from CVS/Mercurial
> >> unless you have revision later than 2011-04-06 17:59:20 BST, since it
> >> has resolved bugs 1001184, 1001186 which are needed for this port.
> >>
> >> I also recommend for first run to use official eCos gnutools. Later you
> >> can try gcc-4.6.0
> >>
> >> Tell me if you need additional info.
> >>
> >> Regards
> >> Ilija
> >>
> >>
> >> --
> >> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> >> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
> >>
> >
> >
> > --
> > Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> > and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
> >
> >
>
> --
> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
>
 		 	   		  

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [ECOS] Kinetis TWR-K60N512-KIT questions
  2011-04-14 13:09                     ` Ilija Kocho
@ 2011-04-14 15:05                       ` Drasko DRASKOVIC
  2011-04-15  9:56                         ` Ilija Kocho
  0 siblings, 1 reply; 26+ messages in thread
From: Drasko DRASKOVIC @ 2011-04-14 15:05 UTC (permalink / raw)
  To: Ilija Kocho; +Cc: ecos-discuss

On Thu, Apr 14, 2011 at 3:09 PM, Ilija Kocho <ilijak@siva.com.mk> wrote:
> On 14.04.2011 13:11, Drasko DRASKOVIC wrote:
>> Hi Ilija,
>> for my curiosity, what is the footprint of this port ?
>>
>> If I am not mistaken,  K60 have only 128KB of on-chip SRAM. Can it fit ?
> You are not mistaken regarding K60, only for eCos 128KiB RAM is not
> "only", it's "a lot" - "puna kapa".

Wow,
this is great. I have been looking lately at these SoCs and I like
eCos, but so fat I have been running it only on SoCs wit lot of
external RAM. The images I was makeing have been ~1.5MB with my
application.

I am interested in haveing RedBoot, USB stack and TCP/IP stack. It
would be impressive to me if this port can fit this all in K60 ! Can
it ? What can it currently do ?

Speaking of which, do what would be the crucial advantages for you of
eCos ove Freescales MQX that comes with K60 ?

Thanks for your help, for your answers and impressive work !

BR,
Drasko

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [ECOS] Kinetis TWR-K60N512-KIT questions
  2011-04-14 15:05                       ` Drasko DRASKOVIC
@ 2011-04-15  9:56                         ` Ilija Kocho
  2011-04-15 10:21                           ` Ross Younger
  0 siblings, 1 reply; 26+ messages in thread
From: Ilija Kocho @ 2011-04-15  9:56 UTC (permalink / raw)
  To: ecos-discuss

Hi Drasko

Thanks for your encouraging words.

On 14.04.2011 17:04, Drasko DRASKOVIC wrote:
> On Thu, Apr 14, 2011 at 3:09 PM, Ilija Kocho <ilijak@siva.com.mk> wrote:
>> On 14.04.2011 13:11, Drasko DRASKOVIC wrote:
>>> Hi Ilija,
>>> for my curiosity, what is the footprint of this port ?
>>>
>>> If I am not mistaken,  K60 have only 128KB of on-chip SRAM. Can it fit ?
>> You are not mistaken regarding K60, only for eCos 128KiB RAM is not
>> "only", it's "a lot" - "puna kapa".
> Wow,
> this is great. I have been looking lately at these SoCs and I like
> eCos, but so fat I have been running it only on SoCs wit lot of
> external RAM. The images I was makeing have been ~1.5MB with my
> application.

How much of this is for eCos itself? How much is code and how much data?
I guess/speculate your experience is with general purpose OSses like Linux.
In eCos-like environments, unlike Linux, code is typically executed in
FLASH so you need RAM only for data (including stacks, etc).

> I am interested in haveing RedBoot, USB stack and TCP/IP stack. It
> would be impressive to me if this port can fit this all in K60 ! Can
> it ? What can it currently do ?

RedBoot is not an environment for running an application. You can use it
during development for loading code and debugging, but finally you burn
your (eCos) application image in FLASH.
Currently available K60 has 512 KiB FLASH + 128 KiB RAM, announced are 1
MiB FLASH.
What it can do depends on your application requirements.
For example (Note: this may be extreme) on system with 32KiB RAM you can
have lwIP TCP/IP and run elementary HTTP server. Code would occupy less
than 64 KiB FLASH. Adding USB would add some memory but not much.

> Speaking of which, do what would be the crucial advantages for you of
> eCos ove Freescales MQX that comes with K60 ?

I can't speak for MQX technical merits as I haven't tried it. I can say
only what I like at eCos:

    - Excellent modular structure;
    - Source code configurabulity: again due to structure but also
configtool/ecosconfig;
    - Unix like I/O, POSIX compatibility - not every RTOS has it;
    - Well (could be better) documented (particularly kernel and system
modules);
    - Free as freedom. This is like roll-your-own, only you are not
alone. (Note: Freescale gives MQX free of charge but you are allowed to
use it only on their chips)
    - Community that helps and (very important for me) allows you to
participate (unlikely in proprietary SW world).

Speaking of Kinetis we have one apparent disadvantage regarding MQX -
we're lagging little-bit. This is the main reason why I decided for
early release of our port. Ethernet, SPI, USB are still on our ToDo
list, but what you have on Bugzilla has everything you need to start
working:
     HAL - basic system initialization and system clock;
     HAL - diagnostic serial support - polled;
     Serial device driver - interrupt driven.

> Thanks for your help, for your answers and impressive work !

You are welcome.

Regards
Ilija


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [ECOS] Kinetis TWR-K60N512-KIT questions
  2011-04-15  9:56                         ` Ilija Kocho
@ 2011-04-15 10:21                           ` Ross Younger
  0 siblings, 0 replies; 26+ messages in thread
From: Ross Younger @ 2011-04-15 10:21 UTC (permalink / raw)
  To: ecos-discuss

* Ilija Kocho <ilijak@siva.com.mk> wrote:
> RedBoot is not an environment for running an application. You can use it
> during development for loading code and debugging, but finally you burn
> your (eCos) application image in FLASH.

I disagree... while what you describe is traditional for a lot of
hardware, in some cases you might well want to keep RedBoot as boot
loader for your application. For example, if you want to upgrade your
application in the field, you presumably want to arrange things so that
if power fails you aren't left with a bricked device; RedBoot is one way
you could achieve this. Also, you can script RedBoot to load an image
from TFTP and run it automatically. Or let's say you have a board that
boots off NAND; such boards often have pretty dumb NAND loaders in ROM
and you'd want to minimise the amount of work that they do - so build
a RedBoot image to use as a second-stage loader which does the right
thing (ECC, bad block handling, filesystem, whatever is appropriate)
with your application image.

Ross

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 26+ messages in thread

* RE: [ECOS] Kinetis TWR-K60N512-KIT questions
  2011-04-14 14:11                       ` jjp jjp
@ 2011-05-03 15:07                         ` jjp jjp
  2011-05-03 17:10                           ` Ilija Kocho
  0 siblings, 1 reply; 26+ messages in thread
From: jjp jjp @ 2011-05-03 15:07 UTC (permalink / raw)
  To: ecos-discuss


Hi list,
Sorry for my slow answer... (other stuff and injury)

I find a way to flash a program with CodeWarrior 10.1 using OSJTAG.
I'm using standard ecos arm-eabi tools for this test.
I modify the target.ld (put flash_security section at 0x000004b0) because linker give me something like that:
--
/home/kvm/dev/crosstool/arm-cortex-toolchain/bin/../lib/gcc/arm-eabi/4.3.2/../../../../arm-eabi/bin/ld: section .flash_security [00000400 -> 0000040f] overlaps section .kinetis_misc [00000008 -> 00000473]
/home/kvm/dev/crosstool/arm-cortex-toolchain/bin/../lib/gcc/arm-eabi/4.3.2/../../../../arm-eabi/bin/ld: hello-k60.elf: section .flash_security lma 0x400 overlaps previous sections
/home/kvm/dev/crosstool/arm-cortex-toolchain/bin/../lib/gcc/arm-eabi/4.3.2/../../../../arm-eabi/bin/ld: hello-k60.elf: section .ARM.exidx lma 0x410 overlaps previous sections
/home/kvm/dev/crosstool/arm-cortex-toolchain/bin/../lib/gcc/arm-eabi/4.3.2/../../../../arm-eabi/bin/ld: hello-k60.elf: section .text lma 0x420 overlaps previous sections
/home/kvm/dev/crosstool/arm-cortex-toolchain/bin/../lib/gcc/arm-eabi/4.3.2/../../../../arm-eabi/bin/ld: hello-k60.elf: section .rodata lma 0x67e0 overlaps previous sections
/home/kvm/dev/crosstool/arm-cortex-toolchain/bin/../lib/gcc/arm-eabi/4.3.2/../../../../arm-eabi/bin/ld: hello-k60.elf: section .eh_frame lma 0x6a10 overlaps previous sections
collect2: ld returned 1 exit status
scons: *** [hello-k60.elf] Error 1
--

I flash a little blinking led exemple but apparently it stucks in clock configuration in hal_start_main_clock :
--
209         CYGHAL_KINETIS_MCG_WAIT_WHILE(!(mcg_p->S & CYGHWR_HAL_KINETIS_MCG_S_PLLST_M));
--

Backtrace seems to be strange:
--
#0  hal_start_main_clock ()
    at /home/kvm/dev/ecos-v3.0/ecos/packages/hal/cortexm/kinetis/var/current/src/kinetis_misc.c:197
#1  0x0000001a in hal_start_clocks ()
    at /home/kvm/dev/ecos-v3.0/ecos/packages/hal/cortexm/kinetis/var/current/src/kinetis_misc.c:144
#2  0x00003b84 in Cyg_HardwareThread::thread_entry (thread=0x0)
    at /home/kvm/dev/ecos-v3.0/ecos/packages/kernel/current/src/common/thread.cxx:94
--

I'm using the kernel template.
Maybe I have forgotten something important.
Ilija can you give me your ecos.ecc to have same parameters as you?
I will take a look to clock configuration.

Regards.
----------------------------------------
> From: jackoaway@hotmail.com
> To: edgar.grimberg@gmail.com
> CC: ecos-discuss@ecos.sourceware.org
> Date: Thu, 14 Apr 2011 15:11:40 +0100
> Subject: RE: [ECOS] Kinetis TWR-K60N512-KIT questions
>
>
> Hi,
> I use finally SEGGER J-Flash program (4.2.4) to flash my bin.
> But now with same program I can't access my board
> (even a connection to it!) and I am trying to solve this situation.
>
> In OpenOCD doc, for Internal Flash it needs a driver name.
> Except stm32 and at91sam3 which are cortex-m3 cores, there is nothing else.
>
> There is an USB-OSJTAG port on the board. Apparently CodeWarrior can access
> it to program flash and if I can't solve my problem with J-Link I will test it.
>
> Regards.
>
> ----------------------------------------
> > Date: Thu, 14 Apr 2011 15:17:53 +0200
> > From: edgar.grimberg@gmail.com
> > To: jackoaway@hotmail.com
> > CC: ecos-discuss@ecos.sourceware.org
> > Subject: Re: [ECOS] Kinetis TWR-K60N512-KIT questions
> >
> > On Thu, Apr 14, 2011 at 2:14 PM, jjp jjp wrote:
> > >
> > > Hi,
> > > Patchs apply!
> > > (Date of last commit of my revison is Wed Apr 06 16:54:16 2011 +0000 with
> > > with changeset 3029:9aec6a8ff9b92bcfff4852e47355e64494ec9ca8)
> > >
> > > I make a simple "Hello world" application.
> > > I am trying to find a way to flash binary file from elf application using
> > > CodeWarrior way.
> >
> > If you use OpenOCD (ZY1000 is OpenOCD), and you configure it
> > correctly, you can flash from within GDB on a "load" command.
> > Of course, you can transform your elf file into a bin (using objcopy),
> > and then flash it using a flash programmer of sorts.
> > What is the CoreWarrior way?
> >
> > Edgar
> >
> > > Are you using PEEDI to flash your application?
> > > Regards.
> > >
> > >
> > >> Date: Thu, 14 Apr 2011 12:52:59 +0200
> > >> From: ilijak@siva.com.mk
> > >> To: ecos-discuss@ecos.sourceware.org
> > >> Subject: Re: [ECOS] Kinetis TWR-K60N512-KIT questions
> > >>
> > >> On 14.04.2011 09:28, jjp jjp wrote:
> > >> > Hi,
> > >> > I have a TWR-K60N512 too!
> > >> > Is it possible to apply patchs to Mercurial version?
> > >>
> > >> Actually, our Kinetis port is not yet committed to CVS. It is in
> > >> Bugzilla, in a queue for review by maintainers.
> > >> http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001187
> > >> You can download the Kinetis Port diff files from there and patch your
> > >> eCos repository. Please observe the note (Comment 3) regarding patching.
> > >>
> > >> I recommend to checkout a fresh eCos repository from CVS/Mercurial
> > >> unless you have revision later than 2011-04-06 17:59:20 BST, since it
> > >> has resolved bugs 1001184, 1001186 which are needed for this port.
> > >>
> > >> I also recommend for first run to use official eCos gnutools. Later you
> > >> can try gcc-4.6.0
> > >>
> > >> Tell me if you need additional info.
> > >>
> > >> Regards
> > >> Ilija
> > >>
> > >>
> > >> --
> > >> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> > >> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
> > >>
> > >
> > >
> > > --
> > > Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> > > and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
> > >
> > >
> >
> > --
> > Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> > and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
> >
>
>
> --
> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
>
 		 	   		  

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [ECOS] Kinetis TWR-K60N512-KIT questions
  2011-05-03 15:07                         ` jjp jjp
@ 2011-05-03 17:10                           ` Ilija Kocho
  2011-05-04 10:47                             ` jjp jjp
  0 siblings, 1 reply; 26+ messages in thread
From: Ilija Kocho @ 2011-05-03 17:10 UTC (permalink / raw)
  To: ecos-discuss

On 03.05.2011 17:07, jjp jjp wrote:
> Hi list,
> Sorry for my slow answer... (other stuff and injury)

Oh! I hope you are in good health now.

> I find a way to flash a program with CodeWarrior 10.1 using OSJTAG.
> I'm using standard ecos arm-eabi tools for this test.
> I modify the target.ld (put flash_security section at 0x000004b0) because linker give me something like that:

NOTE: flash_security *must* reside *exactly* at locations 0x400..0x40f
otherwise the chip may lock (in worst case - permanently).

> --
> /home/kvm/dev/crosstool/arm-cortex-toolchain/bin/../lib/gcc/arm-eabi/4.3.2/../../../../arm-eabi/bin/ld: section .flash_security [00000400 -> 0000040f] overlaps section .kinetis_misc [00000008 -> 00000473]

I wander what do you have in kinetis_misc that causes this overlap.
Normally kinetis_misc stuff occupies up to cca 0x200. Is it HAL diag or
some of your stuff? If it is HAL diag pse deselect it. (And I might
consider removing this option from CDL).

> /home/kvm/dev/crosstool/arm-cortex-toolchain/bin/../lib/gcc/arm-eabi/4.3.2/../../../../arm-eabi/bin/ld: hello-k60.elf: section .flash_security lma 0x400 overlaps previous sections

[snip]

> I'm using the kernel template.
> Maybe I have forgotten something important.
> Ilija can you give me your ecos.ecc to have same parameters as you?

At the moment I am away on a trip so it will take a day or 2 for me to
make ecc and test.
FYI I am normally using default template either with or without enabling
UART driver (/dev/ser3). "Hello world" should work. I have also tried
RedBoot and kernel template. All without problems.

I suggest you to try default configuration "as is" with default template
and "Hello world". On serial port connect some terminal (I am using
minicom) set to "38400 N 1" with no handshaking.

> I will take a look to clock configuration.

What clock configuration do you use?

FYI in meantime I have placed updated version on Bugzilla. It
incorporates SRAM startup.
Note: Beware not to accidentally flash SRAM startup image since it has
no flash_security section - Lock Up may happen.

Regards
Ilija


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 26+ messages in thread

* RE: [ECOS] Kinetis TWR-K60N512-KIT questions
  2011-05-03 17:10                           ` Ilija Kocho
@ 2011-05-04 10:47                             ` jjp jjp
  2011-05-04 22:36                               ` Ilija Kocho
  0 siblings, 1 reply; 26+ messages in thread
From: jjp jjp @ 2011-05-04 10:47 UTC (permalink / raw)
  To: ecos-discuss


Hi,
It works with ecos toolchain and gcc-4.6 with -mcpu=cortex-m4!
Great job Ilija.
My miktake was to put optimization flag to -O0 in global flags.
I will test your RAM configuration and give you feedbacks.
Regards.
----------------------------------------
> Date: Tue, 3 May 2011 19:10:30 +0200
> From: ilijak@siva.com.mk
> To: ecos-discuss@ecos.sourceware.org
> Subject: Re: [ECOS] Kinetis TWR-K60N512-KIT questions
>
> On 03.05.2011 17:07, jjp jjp wrote:
> > Hi list,
> > Sorry for my slow answer... (other stuff and injury)
>
> Oh! I hope you are in good health now.
>
> > I find a way to flash a program with CodeWarrior 10.1 using OSJTAG.
> > I'm using standard ecos arm-eabi tools for this test.
> > I modify the target.ld (put flash_security section at 0x000004b0) because linker give me something like that:
>
> NOTE: flash_security *must* reside *exactly* at locations 0x400..0x40f
> otherwise the chip may lock (in worst case - permanently).
>
> > --
> > /home/kvm/dev/crosstool/arm-cortex-toolchain/bin/../lib/gcc/arm-eabi/4.3.2/../../../../arm-eabi/bin/ld: section .flash_security [00000400 -> 0000040f] overlaps section .kinetis_misc [00000008 -> 00000473]
>
> I wander what do you have in kinetis_misc that causes this overlap.
> Normally kinetis_misc stuff occupies up to cca 0x200. Is it HAL diag or
> some of your stuff? If it is HAL diag pse deselect it. (And I might
> consider removing this option from CDL).
>
> > /home/kvm/dev/crosstool/arm-cortex-toolchain/bin/../lib/gcc/arm-eabi/4.3.2/../../../../arm-eabi/bin/ld: hello-k60.elf: section .flash_security lma 0x400 overlaps previous sections
>
> [snip]
>
> > I'm using the kernel template.
> > Maybe I have forgotten something important.
> > Ilija can you give me your ecos.ecc to have same parameters as you?
>
> At the moment I am away on a trip so it will take a day or 2 for me to
> make ecc and test.
> FYI I am normally using default template either with or without enabling
> UART driver (/dev/ser3). "Hello world" should work. I have also tried
> RedBoot and kernel template. All without problems.
>
> I suggest you to try default configuration "as is" with default template
> and "Hello world". On serial port connect some terminal (I am using
> minicom) set to "38400 N 1" with no handshaking.
>
> > I will take a look to clock configuration.
>
> What clock configuration do you use?
>
> FYI in meantime I have placed updated version on Bugzilla. It
> incorporates SRAM startup.
> Note: Beware not to accidentally flash SRAM startup image since it has
> no flash_security section - Lock Up may happen.
>
> Regards
> Ilija
>
>
> --
> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
>
 		 	   		  

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [ECOS] Kinetis TWR-K60N512-KIT questions
  2011-05-04 10:47                             ` jjp jjp
@ 2011-05-04 22:36                               ` Ilija Kocho
  2011-05-05 14:30                                 ` jjp jjp
  0 siblings, 1 reply; 26+ messages in thread
From: Ilija Kocho @ 2011-05-04 22:36 UTC (permalink / raw)
  To: ecos-discuss

On 04.05.2011 12:46, jjp jjp wrote:
> Hi,
> It works with ecos toolchain and gcc-4.6 with -mcpu=cortex-m4!
> Great job Ilija.

Thanks for good words.
I am testing some integer DFT code with gcc-4.6 / Cortex-M4. Shows
performance improvement over M3 code even for plain C code.

> My miktake was to put optimization flag to -O0 in global flags.
> I will test your RAM configuration and give you feedbacks.

I appreciate.

Regards
Ilija


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 26+ messages in thread

* RE: [ECOS] Kinetis TWR-K60N512-KIT questions
  2011-05-04 22:36                               ` Ilija Kocho
@ 2011-05-05 14:30                                 ` jjp jjp
  2011-05-06  7:36                                   ` Ilija Kocho
  0 siblings, 1 reply; 26+ messages in thread
From: jjp jjp @ 2011-05-05 14:30 UTC (permalink / raw)
  To: ecos-discuss


Hi,
I test unified RAM configuration and it works for me with some modifications.
   -. Replace SRAM by RAM hal_cortexm_kinetis_twr_k60n512.cdl to disable execution of SWI in
hal_reset_vsr (line 187). Execution of this part reset tower and flash code runs again.

   -. Lookup /dev/ser3 and make cyg_io_write instead of printf. Code with printf reset tower and
flash code runs again.

I also try to use cortexm exception support but it fails.
I install an exception handler with cyg_exception_set_handler for CYGNUM_HAL_VECTOR_SERVICE
(vector 11 -> SVCall). I make a SWI call an I expect it to modify execution flow to call my exception handler.
SWI calls hal_default_svc_vsr and R3 get a dummy value not a function address value.

Why software interrupt doesn't call hal_default_exception_vsr?
Regards.

----------------------------------------
> Date: Thu, 5 May 2011 00:36:00 +0200
> From: ilijak@siva.com.mk
> To: ecos-discuss@ecos.sourceware.org
> Subject: Re: [ECOS] Kinetis TWR-K60N512-KIT questions
>
> On 04.05.2011 12:46, jjp jjp wrote:
> > Hi,
> > It works with ecos toolchain and gcc-4.6 with -mcpu=cortex-m4!
> > Great job Ilija.
>
> Thanks for good words.
> I am testing some integer DFT code with gcc-4.6 / Cortex-M4. Shows
> performance improvement over M3 code even for plain C code.
>
> > My miktake was to put optimization flag to -O0 in global flags.
> > I will test your RAM configuration and give you feedbacks.
>
> I appreciate.
>
> Regards
> Ilija
>
>
> --
> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
>
 		 	   		  

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [ECOS] Kinetis TWR-K60N512-KIT questions
  2011-05-05 14:30                                 ` jjp jjp
@ 2011-05-06  7:36                                   ` Ilija Kocho
  2011-05-11  8:47                                     ` jjp jjp
  0 siblings, 1 reply; 26+ messages in thread
From: Ilija Kocho @ 2011-05-06  7:36 UTC (permalink / raw)
  To: ecos-discuss

On 05.05.2011 16:30, jjp jjp wrote:
> Hi,
> I test unified RAM configuration and it works for me with some modifications.
>    -. Replace SRAM by RAM hal_cortexm_kinetis_twr_k60n512.cdl to disable execution of SWI in

Might help if I see your modified CDL (or diff). Have you tried with
original files?

> hal_reset_vsr (line 187). Execution of this part reset tower and flash code runs again.

Other than selecting SRAM what is your configuration? Can you send me
the .ecc ?
What gnutools are you using?

>    -. Lookup /dev/ser3 and make cyg_io_write instead of printf. Code with printf reset tower and
> flash code runs again.
>
> I also try to use cortexm exception support but it fails.
> I install an exception handler with cyg_exception_set_handler for CYGNUM_HAL_VECTOR_SERVICE
> (vector 11 -> SVCall). I make a SWI call an I expect it to modify execution flow to call my exception handler.
> SWI calls hal_default_svc_vsr and R3 get a dummy value not a function address value.

I would need more information. Can you send some code snippet?

> Why software interrupt doesn't call hal_default_exception_vsr?
> Regards.
>
> ----------------------------------------
>> Date: Thu, 5 May 2011 00:36:00 +0200
>> From: ilijak@siva.com.mk
>> To: ecos-discuss@ecos.sourceware.org
>> Subject: Re: [ECOS] Kinetis TWR-K60N512-KIT questions
>>
>> On 04.05.2011 12:46, jjp jjp wrote:
>>> Hi,
>>> It works with ecos toolchain and gcc-4.6 with -mcpu=cortex-m4!
>>> Great job Ilija.
>> Thanks for good words.
>> I am testing some integer DFT code with gcc-4.6 / Cortex-M4. Shows
>> performance improvement over M3 code even for plain C code.
>>
>>> My miktake was to put optimization flag to -O0 in global flags.
>>> I will test your RAM configuration and give you feedbacks.
>> I appreciate.
>>
>> Regards
>> Ilija
>>
>>
>> --
>> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
>> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
>>
>  		 	   		  
>


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 26+ messages in thread

* RE: [ECOS] Kinetis TWR-K60N512-KIT questions
  2011-05-06  7:36                                   ` Ilija Kocho
@ 2011-05-11  8:47                                     ` jjp jjp
  2011-05-11 17:13                                       ` Ilija Kocho
  0 siblings, 1 reply; 26+ messages in thread
From: jjp jjp @ 2011-05-11  8:47 UTC (permalink / raw)
  To: ecos-discuss

[-- Attachment #1: Type: text/plain, Size: 2949 bytes --]


Hi,
Modifications in CDL file is in attach patch file (hal_kinetis.diff).
I send you too a diff between my ecc file and default template (ecos_dflt_sram.diff) without SRAM modifications.
You can test it with your hello world example.
I don't need exception explanation until SRAM hello world example works properly.
Code hangs in hal_reset_vsr (line 187), exactly in SVC routine hal_switch_state_vsr (line 141).
Regards.
----------------------------------------
> Date: Fri, 6 May 2011 09:35:47 +0200
> From: ilijak@siva.com.mk
> To: ecos-discuss@ecos.sourceware.org
> Subject: Re: [ECOS] Kinetis TWR-K60N512-KIT questions
>
> On 05.05.2011 16:30, jjp jjp wrote:
> > Hi,
> > I test unified RAM configuration and it works for me with some modifications.
> > -. Replace SRAM by RAM hal_cortexm_kinetis_twr_k60n512.cdl to disable execution of SWI in
>
> Might help if I see your modified CDL (or diff). Have you tried with
> original files?
>
> > hal_reset_vsr (line 187). Execution of this part reset tower and flash code runs again.
>
> Other than selecting SRAM what is your configuration? Can you send me
> the .ecc ?
> What gnutools are you using?
>
> > -. Lookup /dev/ser3 and make cyg_io_write instead of printf. Code with printf reset tower and
> > flash code runs again.
> >
> > I also try to use cortexm exception support but it fails.
> > I install an exception handler with cyg_exception_set_handler for CYGNUM_HAL_VECTOR_SERVICE
> > (vector 11 -> SVCall). I make a SWI call an I expect it to modify execution flow to call my exception handler.
> > SWI calls hal_default_svc_vsr and R3 get a dummy value not a function address value.
>
> I would need more information. Can you send some code snippet?
>
> > Why software interrupt doesn't call hal_default_exception_vsr?
> > Regards.
> >
> > ----------------------------------------
> >> Date: Thu, 5 May 2011 00:36:00 +0200
> >> From: ilijak@siva.com.mk
> >> To: ecos-discuss@ecos.sourceware.org
> >> Subject: Re: [ECOS] Kinetis TWR-K60N512-KIT questions
> >>
> >> On 04.05.2011 12:46, jjp jjp wrote:
> >>> Hi,
> >>> It works with ecos toolchain and gcc-4.6 with -mcpu=cortex-m4!
> >>> Great job Ilija.
> >> Thanks for good words.
> >> I am testing some integer DFT code with gcc-4.6 / Cortex-M4. Shows
> >> performance improvement over M3 code even for plain C code.
> >>
> >>> My miktake was to put optimization flag to -O0 in global flags.
> >>> I will test your RAM configuration and give you feedbacks.
> >> I appreciate.
> >>
> >> Regards
> >> Ilija
> >>
> >>
> >> --
> >> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> >> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
> >>
> >
> >
>
>
> --
> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
>
 		 	   		  

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: ecos_dflt_sram.diff --]
[-- Type: text/x-diff, Size: 13693 bytes --]

--- ecos_dflt.ecc	2011-05-11 10:42:10.000000000 +0200
+++ ecos.ecc	2011-05-11 10:08:07.000000000 +0200
@@ -116,18 +116,17 @@
 #
 cdl_option CYGBLD_GLOBAL_CFLAGS {
     # Flavor: data
-    # No user value, uncomment the following line to provide one.
-    # user_value "-Wall -Wpointer-arith -Wstrict-prototypes -Wundef -Woverloaded-virtual -Wno-write-strings -mcpu=cortex-m3 -mthumb -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions"
-    # value_source default
+    user_value "-Wall -Wpointer-arith -Wstrict-prototypes -Wundef -Woverloaded-virtual -Wno-write-strings -mcpu=cortex-m3 -mthumb -g -O0 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions"
+    # value_source user
     # Default value:  CYGBLD_GLOBAL_WARNFLAGS . "-mcpu=cortex-m3 -mthumb -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions" 
     #     CYGBLD_GLOBAL_WARNFLAGS == "-Wall -Wpointer-arith -Wstrict-prototypes -Wundef -Woverloaded-virtual -Wno-write-strings "
     #   --> "-Wall -Wpointer-arith -Wstrict-prototypes -Wundef -Woverloaded-virtual -Wno-write-strings -mcpu=cortex-m3 -mthumb -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions"
 
     # The following properties are affected by this value
-    # option CYGBLD_INFRA_CFLAGS_PIPE
-    #     Requires:  is_substr(CYGBLD_GLOBAL_CFLAGS, " -pipe") 
     # option CYGBLD_INFRA_CFLAGS_WARNINGS_AS_ERRORS
     #     Requires:  is_substr(CYGBLD_GLOBAL_CFLAGS, " -Werror") 
+    # option CYGBLD_INFRA_CFLAGS_PIPE
+    #     Requires:  is_substr(CYGBLD_GLOBAL_CFLAGS, " -pipe") 
     # package CYGPKG_HAL_CORTEXM
     #     Requires:  CYGHWR_HAL_CORTEXM_BIGENDIAN implies
     #             is_substr(CYGBLD_GLOBAL_CFLAGS,   " -mbig-endian ") &&
@@ -144,9 +143,8 @@
 #
 cdl_option CYGBLD_GLOBAL_LDFLAGS {
     # Flavor: data
-    # No user value, uncomment the following line to provide one.
-    # user_value "-mcpu=cortex-m3 -mthumb -Wl,--gc-sections -Wl,-static -Wl,-n -g -nostdlib"
-    # value_source default
+    user_value "-mcpu=cortex-m3 -mthumb -Wl,--gc-sections -Wl,-static -Wl,-n -g -nostdlib"
+    # value_source user
     # Default value: "-mcpu=cortex-m3 -mthumb -Wl,--gc-sections -Wl,-static -Wl,-n -g -nostdlib"
 
     # The following properties are affected by this value
@@ -160,6 +158,20 @@
     #             !is_substr(CYGBLD_GLOBAL_LDFLAGS, " -mbig-endian ") 
 };
 
+# Standard compiler warning flags
+# This option specifies the default warning-related compiler flags used
+# on all eCos platforms.
+#
+cdl_option CYGBLD_GLOBAL_WARNFLAGS {
+    # Calculated value:  "-Wall -Wpointer-arith -Wstrict-prototypes -Wundef -Woverloaded-virtual -Wno-write-strings " 
+    # Flavor: data
+    # Current_value: -Wall -Wpointer-arith -Wstrict-prototypes -Wundef -Woverloaded-virtual -Wno-write-strings 
+
+    # The following properties are affected by this value
+    # option CYGBLD_GLOBAL_CFLAGS
+    #     DefaultValue:  CYGBLD_GLOBAL_WARNFLAGS . "-mcpu=cortex-m3 -mthumb -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions" 
+};
+
 # Build common GDB stub ROM image
 # Unless a target board has specific requirements to the
 # stub implementation, it can use a simple common stub.
@@ -181,20 +193,6 @@
     #     ActiveIf: CYGBLD_BUILD_COMMON_GDB_STUBS
 };
 
-# Standard compiler warning flags
-# This option specifies the default warning-related compiler flags used
-# on all eCos platforms.
-#
-cdl_option CYGBLD_GLOBAL_WARNFLAGS {
-    # Calculated value:  "-Wall -Wpointer-arith -Wstrict-prototypes -Wundef -Woverloaded-virtual -Wno-write-strings " 
-    # Flavor: data
-    # Current_value: -Wall -Wpointer-arith -Wstrict-prototypes -Wundef -Woverloaded-virtual -Wno-write-strings 
-
-    # The following properties are affected by this value
-    # option CYGBLD_GLOBAL_CFLAGS
-    #     DefaultValue:  CYGBLD_GLOBAL_WARNFLAGS . "-mcpu=cortex-m3 -mthumb -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions" 
-};
-
 # <
 # <
 # eCos HAL
@@ -340,7 +338,7 @@
     # user_value 1
     # value_source default
     # Default value:  CYG_HAL_STARTUP != "RAM" 
-    #     CYG_HAL_STARTUP == ROM
+    #     CYG_HAL_STARTUP == SRAM
     #   --> 1
 
     # The following properties are affected by this value
@@ -389,7 +387,7 @@
     # value_source default
     # Default value:  (CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS  || CYG_HAL_STARTUP == "RAM") ? 1 : 0
     #     CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS == 0
-    #     CYG_HAL_STARTUP == ROM
+    #     CYG_HAL_STARTUP == SRAM
     #   --> 0
 
     # The following properties are affected by this value
@@ -1062,7 +1060,7 @@
     # user_value 1
     # value_source default
     # Default value:  CYG_HAL_STARTUP != "RAM" || !CYGSEM_HAL_USE_ROM_MONITOR 
-    #     CYG_HAL_STARTUP == ROM
+    #     CYG_HAL_STARTUP == SRAM
     #     CYGSEM_HAL_USE_ROM_MONITOR == 0
     #   --> 1
     # Requires: CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_RESET
@@ -1273,9 +1271,9 @@
     # value_source default
     # Default value: 0
     # Requires:  CYG_HAL_STARTUP == "ROM" || CYG_HAL_STARTUP == "JTAG" 
-    #     CYG_HAL_STARTUP == ROM
-    #     CYG_HAL_STARTUP == ROM
-    #   --> 1
+    #     CYG_HAL_STARTUP == SRAM
+    #     CYG_HAL_STARTUP == SRAM
+    #   --> 0
     # Requires:  CYGDBG_HAL_CRCTABLE_LOCATION == "ROM" 
     #     CYGDBG_HAL_CRCTABLE_LOCATION == RAM
     #   --> 0
@@ -1304,22 +1302,22 @@
     # user_value 0 0
     # value_source default
     # Default value:  CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 
-    #     CYG_HAL_STARTUP == ROM
+    #     CYG_HAL_STARTUP == SRAM
     #   --> 0 0
     # Legal values:  "Generic" "GDB_stubs" 
     # Requires:  CYG_HAL_STARTUP == "RAM" 
-    #     CYG_HAL_STARTUP == ROM
+    #     CYG_HAL_STARTUP == SRAM
     #   --> 0
 
     # The following properties are affected by this value
-    # option CYGSEM_HAL_VIRTUAL_VECTOR_INIT_WHOLE_TABLE
-    #     DefaultValue:  CYG_HAL_STARTUP != "RAM" || !CYGSEM_HAL_USE_ROM_MONITOR 
-    # option CYGSEM_HAL_VIRTUAL_VECTOR_INHERIT_CONSOLE
-    #     ActiveIf: CYGSEM_HAL_USE_ROM_MONITOR
-    # option CYGDBG_HAL_DEBUG_GDB_CTRLC_SUPPORT
-    #     ActiveIf:  CYGSEM_HAL_USE_ROM_MONITOR || CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS 
     # option CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
     #     Requires: ! CYGSEM_HAL_USE_ROM_MONITOR
+    # option CYGDBG_HAL_DEBUG_GDB_CTRLC_SUPPORT
+    #     ActiveIf:  CYGSEM_HAL_USE_ROM_MONITOR || CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS 
+    # option CYGSEM_HAL_VIRTUAL_VECTOR_INHERIT_CONSOLE
+    #     ActiveIf: CYGSEM_HAL_USE_ROM_MONITOR
+    # option CYGSEM_HAL_VIRTUAL_VECTOR_INIT_WHOLE_TABLE
+    #     DefaultValue:  CYG_HAL_STARTUP != "RAM" || !CYGSEM_HAL_USE_ROM_MONITOR 
 };
 
 # <
@@ -1464,14 +1462,14 @@
     #             is_substr(CYGBLD_GLOBAL_CFLAGS,   " -mbig-endian ") &&
     #             is_substr(CYGBLD_GLOBAL_LDFLAGS,  " -mbig-endian ") 
     #     CYGHWR_HAL_CORTEXM_BIGENDIAN == 0
-    #     CYGBLD_GLOBAL_CFLAGS == "-Wall -Wpointer-arith -Wstrict-prototypes -Wundef -Woverloaded-virtual -Wno-write-strings -mcpu=cortex-m3 -mthumb -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions"
+    #     CYGBLD_GLOBAL_CFLAGS == "-Wall -Wpointer-arith -Wstrict-prototypes -Wundef -Woverloaded-virtual -Wno-write-strings -mcpu=cortex-m3 -mthumb -g -O0 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions"
     #     CYGBLD_GLOBAL_LDFLAGS == "-mcpu=cortex-m3 -mthumb -Wl,--gc-sections -Wl,-static -Wl,-n -g -nostdlib"
     #   --> 1
     # Requires:  !CYGHWR_HAL_CORTEXM_BIGENDIAN implies
     #             !is_substr(CYGBLD_GLOBAL_CFLAGS,  " -mbig-endian ") &&
     #             !is_substr(CYGBLD_GLOBAL_LDFLAGS, " -mbig-endian ") 
     #     CYGHWR_HAL_CORTEXM_BIGENDIAN == 0
-    #     CYGBLD_GLOBAL_CFLAGS == "-Wall -Wpointer-arith -Wstrict-prototypes -Wundef -Woverloaded-virtual -Wno-write-strings -mcpu=cortex-m3 -mthumb -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions"
+    #     CYGBLD_GLOBAL_CFLAGS == "-Wall -Wpointer-arith -Wstrict-prototypes -Wundef -Woverloaded-virtual -Wno-write-strings -mcpu=cortex-m3 -mthumb -g -O0 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions"
     #     CYGBLD_GLOBAL_LDFLAGS == "-mcpu=cortex-m3 -mthumb -Wl,--gc-sections -Wl,-static -Wl,-n -g -nostdlib"
     #   --> 1
 
@@ -2068,17 +2066,18 @@
 # functions in this area.
 #
 cdl_option CYGOPT_HAL_KINETIS_MISC_FLASH_SECTION {
+    # This option is not active
     # ActiveIf constraint:  CYG_HAL_STARTUP == "ROM" 
-    #     CYG_HAL_STARTUP == ROM
-    #   --> 1
+    #     CYG_HAL_STARTUP == SRAM
+    #   --> 0
 
     # Flavor: bool
     # No user value, uncomment the following line to provide one.
-    # user_value 1
+    # user_value 0
     # value_source default
     # Default value:  CYG_HAL_STARTUP == "ROM" 
-    #     CYG_HAL_STARTUP == ROM
-    #   --> 1
+    #     CYG_HAL_STARTUP == SRAM
+    #   --> 0
 
     # The following properties are affected by this value
     # option CYGOPT_HAL_KINETIS_DIAG_IN_MISC_FLASH_SECTION
@@ -2091,9 +2090,10 @@
 # functions may be placed as well.
 #
 cdl_option CYGOPT_HAL_KINETIS_DIAG_IN_MISC_FLASH_SECTION {
+    # This option is not active
     # ActiveIf constraint: CYGOPT_HAL_KINETIS_MISC_FLASH_SECTION
-    #     CYGOPT_HAL_KINETIS_MISC_FLASH_SECTION == 1
-    #   --> 1
+    #     CYGOPT_HAL_KINETIS_MISC_FLASH_SECTION == 0
+    #   --> 0
 
     # Flavor: bool
     # No user value, uncomment the following line to provide one.
@@ -4077,9 +4077,8 @@
 #
 cdl_component CYG_HAL_STARTUP {
     # Flavor: data
-    # No user value, uncomment the following line to provide one.
-    # user_value ROM
-    # value_source default
+    user_value SRAM
+    # value_source user
     # Default value: ROM
     # Legal values: "ROM" "SRAM"
 
@@ -4106,12 +4105,12 @@
     #     Requires:  CYG_HAL_STARTUP == "RAM" 
     # component CYGBLD_HAL_CORTEXM_TWR_MK60N512_GDB_STUBS
     #     Requires:  CYG_HAL_STARTUP == "ROM" 
-    # option CYGSEM_HAL_VIRTUAL_VECTOR_INIT_WHOLE_TABLE
-    #     DefaultValue:  CYG_HAL_STARTUP != "RAM" || !CYGSEM_HAL_USE_ROM_MONITOR 
-    # component CYGDBG_HAL_DIAG_TO_DEBUG_CHAN
-    #     DefaultValue:  (CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS  || CYG_HAL_STARTUP == "RAM") ? 1 : 0
     # option CYGSEM_HAL_INSTALL_MMU_TABLES
     #     DefaultValue:  CYG_HAL_STARTUP != "RAM" 
+    # component CYGDBG_HAL_DIAG_TO_DEBUG_CHAN
+    #     DefaultValue:  (CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS  || CYG_HAL_STARTUP == "RAM") ? 1 : 0
+    # option CYGSEM_HAL_VIRTUAL_VECTOR_INIT_WHOLE_TABLE
+    #     DefaultValue:  CYG_HAL_STARTUP != "RAM" || !CYGSEM_HAL_USE_ROM_MONITOR 
     # option CYGOPT_HAL_KINETIS_MISC_FLASH_SECTION
     #     DefaultValue:  CYG_HAL_STARTUP == "ROM" 
     # option CYGOPT_HAL_KINETIS_MISC_FLASH_SECTION
@@ -4128,12 +4127,12 @@
     #                 . CYGHWR_HAL_CORTEXM_KINETIS_MEM_LAYOUT  . "_rom" :
     #                 (CYG_HAL_STARTUP == "SRAM") ? "kinetis_" 
     #                 . CYGHWR_HAL_CORTEXM_KINETIS_MEM_LAYOUT  . "_sram" : "undefined" 
-    #     CYG_HAL_STARTUP == ROM
+    #     CYG_HAL_STARTUP == SRAM
     #     CYGHWR_HAL_CORTEXM_KINETIS_MEM_LAYOUT == 512n128
-    #     CYG_HAL_STARTUP == ROM
+    #     CYG_HAL_STARTUP == SRAM
     #     CYGHWR_HAL_CORTEXM_KINETIS_MEM_LAYOUT == 512n128
     # Flavor: data
-    # Current_value: kinetis_512n128_rom
+    # Current_value: kinetis_512n128_sram
 
     # The following properties are affected by this value
     # option CYGHWR_MEMORY_LAYOUT_LDI
@@ -4147,18 +4146,18 @@
 #
 cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
     # Calculated value:  "<pkgconf/mlt_" . CYGHWR_MEMORY_LAYOUT . ".ldi>" 
-    #     CYGHWR_MEMORY_LAYOUT == kinetis_512n128_rom
+    #     CYGHWR_MEMORY_LAYOUT == kinetis_512n128_sram
     # Flavor: data
-    # Current_value: <pkgconf/mlt_kinetis_512n128_rom.ldi>
+    # Current_value: <pkgconf/mlt_kinetis_512n128_sram.ldi>
 };
 
 # Memory layout header file
 #
 cdl_option CYGHWR_MEMORY_LAYOUT_H {
     # Calculated value:  "<pkgconf/mlt_" . CYGHWR_MEMORY_LAYOUT . ".h>" 
-    #     CYGHWR_MEMORY_LAYOUT == kinetis_512n128_rom
+    #     CYGHWR_MEMORY_LAYOUT == kinetis_512n128_sram
     # Flavor: data
-    # Current_value: <pkgconf/mlt_kinetis_512n128_rom.h>
+    # Current_value: <pkgconf/mlt_kinetis_512n128_sram.h>
 };
 
 # <
@@ -4261,8 +4260,8 @@
     # Flavor: bool
     # Current value: 1
     # Requires:  CYG_HAL_STARTUP == "ROM" 
-    #     CYG_HAL_STARTUP == ROM
-    #   --> 1
+    #     CYG_HAL_STARTUP == SRAM
+    #   --> 0
 };
 
 # <
@@ -6861,7 +6860,7 @@
     # value_source default
     # Default value: 0
     # Requires:  is_substr(CYGBLD_GLOBAL_CFLAGS, " -Werror") 
-    #     CYGBLD_GLOBAL_CFLAGS == "-Wall -Wpointer-arith -Wstrict-prototypes -Wundef -Woverloaded-virtual -Wno-write-strings -mcpu=cortex-m3 -mthumb -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions"
+    #     CYGBLD_GLOBAL_CFLAGS == "-Wall -Wpointer-arith -Wstrict-prototypes -Wundef -Woverloaded-virtual -Wno-write-strings -mcpu=cortex-m3 -mthumb -g -O0 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions"
     #   --> 0
 };
 
@@ -6878,7 +6877,7 @@
     # value_source default
     # Default value: 0
     # Requires:  is_substr(CYGBLD_GLOBAL_CFLAGS, " -pipe") 
-    #     CYGBLD_GLOBAL_CFLAGS == "-Wall -Wpointer-arith -Wstrict-prototypes -Wundef -Woverloaded-virtual -Wno-write-strings -mcpu=cortex-m3 -mthumb -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions"
+    #     CYGBLD_GLOBAL_CFLAGS == "-Wall -Wpointer-arith -Wstrict-prototypes -Wundef -Woverloaded-virtual -Wno-write-strings -mcpu=cortex-m3 -mthumb -g -O0 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions"
     #   --> 0
 };
 

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: hal_kinetis.diff --]
[-- Type: text/x-diff, Size: 1195 bytes --]

diff -Naur hal/cortexm/kinetis_2011-05-11//twr_k60n512/current/cdl/hal_cortexm_kinetis_twr_k60n512.cdl hal/cortexm/kinetis/twr_k60n512/current/cdl/hal_cortexm_kinetis_twr_k60n512.cdl
--- hal/cortexm/kinetis_2011-05-11//twr_k60n512/current/cdl/hal_cortexm_kinetis_twr_k60n512.cdl	2011-05-04 16:33:19.000000000 +0200
+++ hal/cortexm/kinetis/twr_k60n512/current/cdl/hal_cortexm_kinetis_twr_k60n512.cdl	2011-05-11 09:45:48.000000000 +0200
@@ -81,7 +81,7 @@
         display       "Startup type"
         flavor        data
         default_value {"ROM"}
-        legal_values  {"ROM" "RAM"}
+        legal_values  {"ROM" "SRAM"}
         no_define
         define -file system.h CYG_HAL_STARTUP
         description   "
@@ -97,7 +97,7 @@
         calculated {
             (CYG_HAL_STARTUP == "ROM" ) ? "kinetis_" 
             . CYGHWR_HAL_CORTEXM_KINETIS_MEM_LAYOUT  . "_rom" :
-            (CYG_HAL_STARTUP == "RAM") ? "kinetis_" 
+            (CYG_HAL_STARTUP == "SRAM") ? "kinetis_" 
             . CYGHWR_HAL_CORTEXM_KINETIS_MEM_LAYOUT  . "_sram" : "undefined" }
         description "Combination of 'Startup type' and 'Kinetis member in use'
                     produces the memory layout."

[-- Attachment #4: Type: text/plain, Size: 148 bytes --]

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [ECOS] Kinetis TWR-K60N512-KIT questions
  2011-05-11  8:47                                     ` jjp jjp
@ 2011-05-11 17:13                                       ` Ilija Kocho
  0 siblings, 0 replies; 26+ messages in thread
From: Ilija Kocho @ 2011-05-11 17:13 UTC (permalink / raw)
  To: ecos-discuss

On 11.05.2011 10:47, jjp jjp wrote:
> Hi,
> Modifications in CDL file is in attach patch file (hal_kinetis.diff).
It seem versions to be reversed in your diff, but I could deduce you
have simply renamed "SRAM" to "RAM" in CDL. This won't work because RAM
startup is a different type of startup. It is intended to start from
RedBoot so it does not initialize exception vectors - which would
explain your hangups. SRAM start-up, on the other hand, is intended to
run (almost) alone, with little help of JTAG loader.

Please note that RAM startup is not yet implemented in the current
Kinetis port, my idea is to add it once (a board with) external RAM is
available. See STM32 port for details on RAM startup.

Have you tried your code with SRAM startup?

Regards
Ilija.

> I send you too a diff between my ecc file and default template (ecos_dflt_sram.diff) without SRAM modifications.
> You can test it with your hello world example.
> I don't need exception explanation until SRAM hello world example works properly.
> Code hangs in hal_reset_vsr (line 187), exactly in SVC routine hal_switch_state_vsr (line 141).
> Regards.
> ----------------------------------------
>> Date: Fri, 6 May 2011 09:35:47 +0200
>> From: ilijak@siva.com.mk
>> To: ecos-discuss@ecos.sourceware.org
>> Subject: Re: [ECOS] Kinetis TWR-K60N512-KIT questions
>>
>> On 05.05.2011 16:30, jjp jjp wrote:
>>> Hi,
>>> I test unified RAM configuration and it works for me with some modifications.
>>> -. Replace SRAM by RAM hal_cortexm_kinetis_twr_k60n512.cdl to disable execution of SWI in
>> Might help if I see your modified CDL (or diff). Have you tried with
>> original files?
>>
>>> hal_reset_vsr (line 187). Execution of this part reset tower and flash code runs again.
>> Other than selecting SRAM what is your configuration? Can you send me
>> the .ecc ?
>> What gnutools are you using?
>>
>>> -. Lookup /dev/ser3 and make cyg_io_write instead of printf. Code with printf reset tower and
>>> flash code runs again.
>>>
>>> I also try to use cortexm exception support but it fails.
>>> I install an exception handler with cyg_exception_set_handler for CYGNUM_HAL_VECTOR_SERVICE
>>> (vector 11 -> SVCall). I make a SWI call an I expect it to modify execution flow to call my exception handler.
>>> SWI calls hal_default_svc_vsr and R3 get a dummy value not a function address value.
>> I would need more information. Can you send some code snippet?
>>
>>> Why software interrupt doesn't call hal_default_exception_vsr?
>>> Regards.
>>>
>>> ----------------------------------------
>>>> Date: Thu, 5 May 2011 00:36:00 +0200
>>>> From: ilijak@siva.com.mk
>>>> To: ecos-discuss@ecos.sourceware.org
>>>> Subject: Re: [ECOS] Kinetis TWR-K60N512-KIT questions
>>>>
>>>> On 04.05.2011 12:46, jjp jjp wrote:
>>>>> Hi,
>>>>> It works with ecos toolchain and gcc-4.6 with -mcpu=cortex-m4!
>>>>> Great job Ilija.
>>>> Thanks for good words.
>>>> I am testing some integer DFT code with gcc-4.6 / Cortex-M4. Shows
>>>> performance improvement over M3 code even for plain C code.
>>>>
>>>>> My miktake was to put optimization flag to -O0 in global flags.
>>>>> I will test your RAM configuration and give you feedbacks.
>>>> I appreciate.
>>>>
>>>> Regards
>>>> Ilija
>>>>
>>>>
>>>> --
>>>> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
>>>> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
>>>>
>>>
>>
>> --
>> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
>> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
>>
>  		 	   		  


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2011-05-11 17:13 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-27 17:24 [ECOS] Kinetis TWR-K60N512-KIT questions jjp jjp
2011-01-28 16:05 ` Ilija Kocho
     [not found]   ` <SNT129-W29DA08015F0442D154694DADA70@phx.gbl>
2011-04-08 20:16     ` Ilija Kocho
     [not found]     ` <4D9F6B61.705@siva.com.mk>
2011-04-11  7:42       ` jjp jjp
2011-04-12 18:09         ` Ilija Kocho
2011-04-13  8:01           ` jjp jjp
2011-04-13 15:55             ` Ilija Kocho
2011-04-14  7:29               ` jjp jjp
2011-04-14 10:53                 ` Ilija Kocho
2011-04-14 11:11                   ` Drasko DRASKOVIC
2011-04-14 13:09                     ` Ilija Kocho
2011-04-14 15:05                       ` Drasko DRASKOVIC
2011-04-15  9:56                         ` Ilija Kocho
2011-04-15 10:21                           ` Ross Younger
2011-04-14 12:14                   ` jjp jjp
2011-04-14 13:18                     ` Edgar Grimberg
2011-04-14 14:11                       ` jjp jjp
2011-05-03 15:07                         ` jjp jjp
2011-05-03 17:10                           ` Ilija Kocho
2011-05-04 10:47                             ` jjp jjp
2011-05-04 22:36                               ` Ilija Kocho
2011-05-05 14:30                                 ` jjp jjp
2011-05-06  7:36                                   ` Ilija Kocho
2011-05-11  8:47                                     ` jjp jjp
2011-05-11 17:13                                       ` Ilija Kocho
2011-04-14 13:50                     ` Ilija Kocho

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).