This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Re: Troubles when develop app with Kwikstik


On 07.09.2012 05:29, tangwei wrote:
> Dear Ilija,
>
> you said
>
>> SRAM startup is not intended for use with Redboot but with JTAG. You can
>> use OpenOCD or J-Link.
> but I found many examples in the net,which use Redboot(ROM startup burn into the on-chip flash)to debug the RAM startup APP(elf fomat) by the gdb com connect style not JTAG.
>
> steps are same as I have mentioned below. Do you mean only the Kwikstik not support this debug style? Thanks

1. Different platforms may have different memory layout set-ups.

2. Do not confuse SRAM with RAM startup. They are not the same.
TWR-K70F120M for instance provides both RAM and SRAM startup. Check it
and see differences.

The SRAM startup (i refer to Kinetis ports) when loaded uses some SRAM
locations which are also in use by RedBoot. Theoretically it would be
possible to avoid this, but it will shrink the available SRAM. If you
are willing to play, you can try to make custom memory layout by using
sram2s memory layout which keeps one 32KiB SRAM bank free.

I hope this helps

Ilija

>
>
>
> ----------------------------------------
>> Date: Mon, 27 Aug 2012 08:52:48 +0200
>> From: ilijak@siva.com.mk
>> To: tziang@hotmail.com
>> CC: ecos-discuss@ecos.sourceware.org
>> Subject: [ECOS] Re: Troubles when develop app with Kwikstik
>>
>> On 21.08.2012 05:52, tangwei wrote:
>>> Dear all,
>>>
>>> I have a FreeScale's Kwikstik board,and have troubles when develop
>>> with it as below
>>>
>>> setp1:Use the default redboot setting for KwikStik,and then download
>>> the bin into the flash,
>>> then connect the COM,I get the below string on the computer,it seems
>>> the redboot is OK.
>>>
>>> Platform: Freescale KwikStik (Cortex-M4)
>>> RAM: 0x1fff8000-0x20007000 [0x1fffb6a8-0x20007000 available]
>>> RedBoot>
>>>
>>> step2:Prepare the app from the examples directory (ELF fomart)
>>> If I use the default kernel setting(the startup setting is ROM),build
>>> the examples with the kernel,
>>> get the hello(elf fomart).
>>> then use the gdb tool download the hello
>>> (gdb) set remotebaud 38400
>>> (gdb) target remote /dev/ttyUSB0
>>> Remote debugging using /dev/ttyUSB0
>>> 0x00003aa2 in ?? ()
>>> (gdb) load hello
>>> Loading section .rom_vectors, size 0x8 lma 0x0
>>> Load failed
>>> (gdb)
>>>
>> You can't load ROM startup with RedBoot. There is an experimental FLASH
>> startup
>> http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001623 that will enable
>> loading applications in Flash by means of Internal Flash driver
>> http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001561 . With these you
>> should be able to load and run application, but GDB usage is limited
>> because current GDB stub doesn't support hardware breakpoints.
>>
>>> if I use the starup setting SRAM for the kernel,then do as above
>>>
>>> (gdb) set remotebaud 38400
>>> (gdb) target remote /dev/ttyUSB0
>>> Remote debugging using /dev/ttyUSB0
>>> 0x00003aa2 in ?? ()
>>> (gdb) load hello
>>> Loading section .rom_vectors, size 0x8 lma 0x1fff8400
>>> Loading section .ARM.exidx, size 0x10 lma 0x1fff8408
>>> Loading section .text, size 0x4dbc lma 0x1fff8418
>>> Ignoring packet error, continuing...
>>> Ignoring packet error, continuing...
>>> Ignoring packet error, continuing...
>>> Ignoring packet error, continuing...
>>> Ignoring packet error, continuing...
>>>
>>> I want to download the app to the RAM for debug,so I think the second
>>> kernel startup setting is right,
>>> but I don't know somewhere else to make the change,
>>> can anyone help me,where is the bug, and how to debug?
>>>
>> SRAM startup is not intended for use with Redboot but with JTAG. You can
>> use OpenOCD or J-Link.
>>
>> I hope this helps.
>>
>> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]