Do you have a list of supported features?
Thank you for interest. Initially UART, Ethernet and RTC are supported. For details please click eCos-TWR-K60N512 and eCos-TWR-K40X256 . FlexBus (burst multiplexed mode) has been tested but we are waiting for final hardware of memory module.
Many thanks for the work, eCos looks like a nice framework.
I have built redboot using the redboot eCos template, but when I load it and run it on the TWR-K60, nothing seems to happen; I was expecting to see some activity on the serial, but there is none, so I must be missing something -- any pointers for getting redboot working on the board?
Many thanks for your interest in eCos.
RedBoot should work from scratch with serial port and you should get prompt on serial port (default setting 38400 N 1).
Please give me information on configuration (options) as well as build and load procedures. Do you run it from FLASH or SRAM? What is the startup type? What tools do you use?
Thanks for your reply.
Using the precompiled gnu toolchain from the eCos website,
Building RedBoot from eCos CVS, selecting the TWRK60+redboot template, with no configuration changes
Loading the resulting redboot.elf from gdb connected to Segger gdbserver (over JLink). The gdb server output is:
Halting target CPU... ...Target halted (PC = 0x00024C3C) Resetting target Downloading 8 bytes @ address 0x00000000 Downloading 636 bytes @ address 0x00000008 Downloading 16 bytes @ address 0x00000400 Downloading 16 bytes @ address 0x00000410 Downloading 16048 bytes @ address 0x00000420 Downloading 14976 bytes @ address 0x000042D0 Downloading 7936 bytes @ address 0x00007D50 Downloading 788 bytes @ address 0x00009C58 Writing register (PC = 0x00000421) Writing register (CPSR = 0x010000A1)
Starting target CPU...
I am not sure why the PC is set by gdb to 0x421 rather than 0x420, but starting it from 0x420 (or 0x0) does not work either.
If I tweak the default config to use SRAM startup, I get the following from the server:
Downloading 8 bytes @ address 0x00000000Downloading 16 bytes @ address 0x00000400Downloading 16048 bytes @ address 0x00000410Downloading 13184 bytes @ address 0x000042C0Downloading 7912 bytes @ address 0x00007640Downloading 788 bytes @ address 0x00009530Writing register (PC = 0x00000411)Writing register (CPSR = 0x01000081)Starting target CPU...
Still nothing on the serial :(
You are using default (ROM) startup type which means that code should be located in FLASH. This is confirmed by Downloading sequence that goes from 0x00000000 on.
I would assume that code has been (silently) flashed by JLink so it should run after powering up when you detach JTAG (standalone). If it doesn't then my assumption is wrong and you could try flashing.
Regarding GDB the address is not correct. The problem is not the odd address (PC bit 0 is set in order to enforce Thumb mode). I couldn't tell why loader is loading 0x421 into PC as it is not starting address.
Here's a way to load PC with correct address: Since the image is prepared for boot from reset, the initial values for SP and PC are at locations 0x0 and 0x4 respectively (reset vectrors). You can load them in SP and PC registers with following commands in GDB initialization (startup) script:
set $sp=*0set $pc=*4
I hope this helps.
It doesn't look like SRAM locations to me. Have you started this configuration from fresh or have yoy changed the old ROM configuration?
Thank you! I forgot about that warning in the docs not to modify existing config; having created a new SRAM config, I get proper addresses and a RedBoot prompt on the serial (once I added SW flow control to my minicom settings).
I'm glad that it works for you. If you need additional explanations feel free to ask. And remarks too, I would appreciate feedback.
Btw, you mention you're using minicom which implies (not mandates) to me that you might use Jlink on Linux. This would be (a good) news for me (since we're looking some low cost Jtag with support for Linux). Is it true?
Yes, I am using JLink on Linux; the segger Linux sofware that comes with it is somewhat basic but works, and according to the info on segger-us.com, the gdb server in recent releases no longer requires a license; of course the basic software does not handle flashing ...
I am hoping to get OpenOcd to work with JLink and TWR-K60; it has a driver for JLink and (in git) also scripts for K40 and the Kwikstik board; I am trying to tweak that for the TWR, but not got it working yet, I shall poke at it as time allows.
OK, so I have worked out why the ROM images were not working for me, the image themselves are fine, but gdb needs a memory map to load images into flash, and as the segger gdb server does not provide this, gdb treats the whole memory as sram. The server should probably error, but it just carries on as if the load succeeded. It should be possible to set up the map by hand, but haven't had a chance to test that yet.
OpenOcd does provide the memory map, and when using it GDB tries to do the right thing sending vFlash packets, but the write fails for some other reason; I suspect there is either something wrong in my OpenOcd config for the board, or the OpenOcd driver for the kinetis flash is buggy.
Anyway, I am getting OT here, really just wanted to confirm that both the sram and rom versions of redboot work out of the box. :)
Thank you for your concern, eCos contributions go through very prudent review before being committed to main tree, and the basic code: kernel, infrastructure, hw independent driver level, etc. is rather mature.
Of course, there is a real possibility that you catch a bug, so your feedback is appreciated.
I have created a group eCos for tower. I would be glad to get some company.
I want to start with eCos on KwikStik. I received yesterday the board. Unfortunately on the delivered CD there are only very common information and trail versions of standard development toolchains.
I compiled eCos already. Next step is to download and debug sample application by usage of GDB/GDBServer, connected to On-Board Segger J-Link USB-Connector.
But I have problems to continue. I cannot find any startup scripts for the J-Link. I assume, at least I need to configure things like PLL, Clock, Memory to make the device ready for downloading the code.
Has anybody any hints, how I have to do this?
Retrieving data ...