Re: [Openocd-development] support for freescale mc13224

2009-01-21 Thread Sergey Lapin
On Wed, Jan 21, 2009 at 8:56 PM, Sergey Lapin  wrote:
> On Wed, Jan 21, 2009 at 8:26 PM, Alan Carvalho de Assis
>  wrote:
>> Hi Sergey,
>>
>> On Wed, Jan 21, 2009 at 4:30 PM, Sergey Lapin  wrote:
>>> Hi, all!
>>>
>>> I write support for mc13224 - arm7tdmi-based ieee8021.15.4 -compliant
>>> communication chip. Chip is quite new, documentation is in weird state
>>> and is not full, but core and basic peripherals like SPI are
>>> documented normally. I already managed to make core work,
>>> but I can't manage it to reset properly.
>>>
>>
>> Can you please send your patches to OpenOCD? Even if it is not working
>> correctly your patch base help other people who wants to test it.
> It is basically very messy config, need to clean it up first, but
> I of course plan to do it. I did not patch any code inside openocd
> itself.
>
> Also, I need to mention I use jlink interface.
>
>> Please go ahead! It is nice to see open-source alternatives to closed 
>> solution.
>> Be sure your work will help more people.
>
> Hope so,
> S.
>

Well, logs follow up:

sla...@slapin-notebook:~/mc13224$ telnet localhost 
Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.
Open On-Chip Debugger
> halt
target state: halted
target halted in Thumb state due to debug-request, current mode: System
cpsr: 0x803f pc: 0x004106d6

> reset
JTAG tap: mc13224.cpu tap/device found: 0x1f1f001d (Manufacturer:
0x00e, Part: 0xf1f0, Version: 0x1)
JTAG Tap/device matched
TAP mc13224.cpu:
value captured during scan didn't pass the requested check:
captured: 0x04 check_value: 0x01 check_mask: 0x0f
in_handler: w/o "in_value", mismatch in SIR

> reset
JTAG tap: mc13224.cpu tap/device found: 0x1f1f001d (Manufacturer:
0x00e, Part: 0xf1f0, Version: 0x1)
JTAG Tap/device matched
TAP mc13224.cpu:
value captured during scan didn't pass the requested check:
captured: 0x04 check_value: 0x01 check_mask: 0x0f
in_handler: w/o "in_value", mismatch in SIR

> reset
JTAG tap: mc13224.cpu tap/device found: 0x1f1f001d (Manufacturer:
0x00e, Part: 0xf1f0, Version: 0x1)
JTAG Tap/device matched
TAP mc13224.cpu:
value captured during scan didn't pass the requested check:
captured: 0x04 check_value: 0x01 check_mask: 0x0f
in_handler: w/o "in_value", mismatch in SIR

>


openocd log:

sla...@slapin-notebook:~/mc13224$ sudo /usr/local/bin/openocd -d3
[sudo] password for slapin:
Open On-Chip Debugger 1.0 (2008-12-24-10:25) svn:1273


BUGS? Read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS


$URL: svn://svn.berlios.de/openocd/trunk/src/openocd.c $
User : 5 1 command.c:494 command_run_line():
Debug: 6 49 configuration.c:88 find_file(): found openocd.cfg
Debug: 7 120 configuration.c:88 find_file(): found
/usr/local/lib/openocd/interface/jlink.cfg
Debug: 9 131 command.c:91 script_command(): script_command - interface
Debug: 10 131 command.c:108 script_command(): script_command -
interface, argv[0]=ocd_interface
Debug: 11 131 command.c:108 script_command(): script_command -
interface, argv[1]=jlink
Debug: 13 131 command.c:91 script_command(): script_command - telnet_port
Debug: 14 131 command.c:108 script_command(): script_command -
telnet_port, argv[0]=ocd_telnet_port
Debug: 15 131 command.c:108 script_command(): script_command -
telnet_port, argv[1]=
Debug: 17 131 command.c:91 script_command(): script_command - gdb_port
Debug: 18 131 command.c:108 script_command(): script_command -
gdb_port, argv[0]=ocd_gdb_port
Debug: 19 131 command.c:108 script_command(): script_command -
gdb_port, argv[1]=
Debug: 21 131 command.c:91 script_command(): script_command - gdb_memory_map
Debug: 22 131 command.c:108 script_command(): script_command -
gdb_memory_map, argv[0]=ocd_gdb_memory_map
Debug: 23 131 command.c:108 script_command(): script_command -
gdb_memory_map, argv[1]=enable
Debug: 25 132 command.c:91 script_command(): script_command - gdb_flash_program
Debug: 26 132 command.c:108 script_command(): script_command -
gdb_flash_program, argv[0]=ocd_gdb_flash_program
Debug: 27 132 command.c:108 script_command(): script_command -
gdb_flash_program, argv[1]=enable
Debug: 28 144 configuration.c:88 find_file(): found
/usr/local/lib/openocd/tcl/bitsbytes.tcl
Debug: 29 154 configuration.c:88 find_file(): found
/usr/local/lib/openocd/tcl/cpu/arm/arm7tdmi.tcl
Debug: 30 157 configuration.c:88 find_file(): found
/usr/local/lib/openocd/tcl/memory.tcl
Debug: 31 167 configuration.c:88 find_file(): found
/usr/local/lib/openocd/tcl/mmr_helpers.tcl
Debug: 33 167 command.c:91 script_command(): script_command - reset_config
Debug: 34 167 command.c:108 script_command(): script_command -
reset_config, argv[0]=ocd_reset_config
Debug: 35 167 command.c:108 script_command(): script_command -
reset_config, argv[1]=srst_only
Debug: 36 167 command.c:108 script_command(): script_command -
reset_config, argv[2]=srst_pulls_trst
Debug: 37 167 jtag.c:1847 jim_newtap_cmd(): Creating New Tap, Chip:
mc13224, Tap: cpu, Dotted: mc13224.cpu, 8 params
Debug: 38 167 jtag.c:1866 jim_newta

Re: [Openocd-development] support for freescale mc13224

2009-01-21 Thread Sergey Lapin
On Wed, Jan 21, 2009 at 8:26 PM, Alan Carvalho de Assis
 wrote:
> Hi Sergey,
>
> On Wed, Jan 21, 2009 at 4:30 PM, Sergey Lapin  wrote:
>> Hi, all!
>>
>> I write support for mc13224 - arm7tdmi-based ieee8021.15.4 -compliant
>> communication chip. Chip is quite new, documentation is in weird state
>> and is not full, but core and basic peripherals like SPI are
>> documented normally. I already managed to make core work,
>> but I can't manage it to reset properly.
>>
>
> Can you please send your patches to OpenOCD? Even if it is not working
> correctly your patch base help other people who wants to test it.
It is basically very messy config, need to clean it up first, but
I of course plan to do it. I did not patch any code inside openocd
itself.

Also, I need to mention I use jlink interface.

> Please go ahead! It is nice to see open-source alternatives to closed 
> solution.
> Be sure your work will help more people.

Hope so,
S.
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] support for freescale mc13224

2009-01-21 Thread Alan Carvalho de Assis
Hi Sergey,

On Wed, Jan 21, 2009 at 4:30 PM, Sergey Lapin  wrote:
> Hi, all!
>
> I write support for mc13224 - arm7tdmi-based ieee8021.15.4 -compliant
> communication chip. Chip is quite new, documentation is in weird state
> and is not full, but core and basic peripherals like SPI are
> documented normally. I already managed to make core work,
> but I can't manage it to reset properly.
>

Can you please send your patches to OpenOCD? Even if it is not working
correctly your patch base help other people who wants to test it.

> 1. It does not have TRST, only SRST, and it works (resets), but then
> OpenOCD is unable to talk to it anymore, full restart of openocd and
> board reset button press works to some extent.
>
> 2. halt works only first time, then the same problem is as with reset.
> Startup process and limitations is not described in manual.
>
> Now I have managed to make GPIO and SPI work via mww,
> can write stuff to internal RAM and run it, so basically it works.
>
> Could anybody advice how to debug/gather information to fix this issue?
>
> I could provide -d3 log of openocd, but it just tells that chip is in
> invalid mode.
> (will submit in another email as soon as I get home).
>


I am also testing Freescale ARM9/11 processors with OpenOCD.
Sometimes I got this "invalid mode" error message from OpenOCD and
sometimes I got also this warning message:

Warn : captured: 0x00 check_value: 0x01 check_mask: 0x0f
Warn : in_handler: w/o "in_value", mismatch in SIR

> Freescale chose strategy of making very hard to work with this chip,
> demanding closed binaries every now and then, and depending on
> IAR Workbench for closed libraries, etc, but I'd like to
> make it work fully (at least as just controller) hoping to reverse engineer
> the rest for proper gcc support, because it is only integrated chip
> on market at the moment, and I'd like to experiment with this kind of stuff.
> By any chance if anybody had any experience with this particular chip,
> have any information, I'd like to know about it.
>

Please go ahead! It is nice to see open-source alternatives to closed solution.
Be sure your work will help more people.

> Thanks a lot.
> S.

Best Regards,

Alan
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


[Openocd-development] support for freescale mc13224

2009-01-21 Thread Sergey Lapin
Hi, all!

I write support for mc13224 - arm7tdmi-based ieee8021.15.4 -compliant
communication chip. Chip is quite new, documentation is in weird state
and is not full, but core and basic peripherals like SPI are
documented normally. I already managed to make core work,
but I can't manage it to reset properly.

1. It does not have TRST, only SRST, and it works (resets), but then
OpenOCD is unable to talk to it anymore, full restart of openocd and
board reset button press works to some extent.

2. halt works only first time, then the same problem is as with reset.
Startup process and limitations is not described in manual.

Now I have managed to make GPIO and SPI work via mww,
can write stuff to internal RAM and run it, so basically it works.

Could anybody advice how to debug/gather information to fix this issue?

I could provide -d3 log of openocd, but it just tells that chip is in
invalid mode.
(will submit in another email as soon as I get home).

Freescale chose strategy of making very hard to work with this chip,
demanding closed binaries every now and then, and depending on
IAR Workbench for closed libraries, etc, but I'd like to
make it work fully (at least as just controller) hoping to reverse engineer
the rest for proper gcc support, because it is only integrated chip
on market at the moment, and I'd like to experiment with this kind of stuff.
By any chance if anybody had any experience with this particular chip,
have any information, I'd like to know about it.

Thanks a lot.
S.
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development