Re: [Openocd-development] [SWD] STM32Primer2 JTAG/SWD + RLink pinout
SWD support is under going. I'm busy with another project in mobile phone market, and will come back maybe end of this month. 2010/3/22 Andrew Rogers and...@rogerstech.co.uk On Mon, 2010-03-08 at 10:51 +, and...@rogerstech.co.uk wrote: Quoting CeDeROM tomek.ce...@gmail.com: Hello! If anyone is interested to work on the SWJ/RLink with STM32Primer2, here goes the pinouts: http://www.tomek.cedro.info/content/view/236/1/lang,en/ Best regards, Tomek I'm interested. I started a while ago tackling this. I developed the firmware for the ST7 DTC to do the SWD. Where I got a bit stuck was with changes required to OpenOCD. The problem has now been partly resolved as I see that changes are being made to the GIT repository to support SWD. Should be easier now just to add another interface and will pick this up again soon. BTW, the link you gave is broken. Regards Andrew ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development Looking at the GIT repository I see that there is no support for SWD apart from switch between JTAG SWD to perform some kind of reset. Simon Qian has an SWD patch for the versaloon adapter. http://www.simonqian.com/en/Versaloon/versaloon_how_to.html We will either need to incorporate this patch or write it again before we can have SWD in the main GIT repository. I can build on Simon's patch but unless it is incorporated into the main branch it will become increasingly stale. I will need the help of the developers in order to bring OpenOCD to the Primer2 in a way that will be maintainable. Regards Andrew ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development -- Best Regards, SimonQian http://www.SimonQian.com ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
Re: [Openocd-development] [SWD] STM32Primer2 JTAG/SWD + RLink pinout
Hi Andrew, David is working on this currently. We(the maintainers) are much more concerned about doing this correctly(maintainable, decent performance) than doing it quickly. If you have any thoughts on how to do this, please post it to the list. -- Meet us in Paris at rts EMBEDDED SYSTEMS 2010 - March 30. and April 1. http://www.zylin.com/events_rts.html Øyvind Harboe US toll free 1-866-980-3434 / International +47 51 63 25 00 http://www.zylin.com/zy1000.html ARM7 ARM9 ARM11 XScale Cortex JTAG debugger and flash programmer ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] ST-Link with OpenOCD?
Hi, As far as I know, the ST-Link dongle is not yet supported by OpenOCD. According to STs homepage ( http://www.st.com/mcu/contentid-126-110-ST_LINK.html) only the Attolic toolset, the TrueSTUDIO, the IAR toolset EWARM and the Keil toolset officially support the dongle. Unfortunately, these are all closed-source toolchains with certain restrictions when it comes to debugging etc... Has anybody got the dongle working in an opensource toolchain? Preferably with OpenOCD? best, Sammy Omari ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] Unused symbols; Global vs Static
By a quick automatic analysis of OpenOCD code, I have found ~300 global symbols that: - or only have local use, e.g. add_connection() is defined and used in src/server/server.c only - or are completely unused e.g. armv4_5_mmu_page_type_names[] in src/target/armv4_5_mmu.c Does it makes sense to submit patches to - restrict visibility of local-only symbols by static keyword? - remove unused symbols? Best Regards, Antonio Borneo ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
Re: [Openocd-development] Unused symbols; Global vs Static
On Wed, Mar 24, 2010 at 1:18 AM, Øyvind Harboe oyvind.har...@zylin.com wrote: On Tue, Mar 23, 2010 at 6:16 PM, Antonio Borneo borneo.anto...@gmail.com wrote: By a quick automatic analysis of OpenOCD code, I have found ~300 global symbols that: - or only have local use, e.g. add_connection() is defined and used in src/server/server.c only - or are completely unused e.g. armv4_5_mmu_page_type_names[] in src/target/armv4_5_mmu.c Does it makes sense to submit patches to - restrict visibility of local-only symbols by static keyword? - remove unused symbols? That would be most welcome! I think the best way to proceed would be for you to create a patch series and break it apart in relatively small commits. That way we can do the trivial ones first and leave any problematic ones for later. Ok, I will try to collect small set of modifications in separate and consistent patches, e.g. only one .c file and eventually the associated .h This should also be easier to review. Forgot to say that the analysis is simply based on nm on the object files, plus a set of scripts. This means that the analysis (and the result) does not include the files not compiled because of specific flags passed to ./configure So, the potential number of symbols unused or to be static-ized is even higher. Best Regards, Antonio Borneo ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] xds100v2
Hi, I am thinking about getting an XDS100v2 jtag/usb adapter to debug a beagleboard. It appears that I can use this board with a free version of CodeComposer. Does anybody know if I can debug the OMAP's Arm Cortex A8 with the XDS100v2 board, OpenOCD, and GDB? Does anybody use the XDS100v2 board with a recent ARM processor and OpenOCD? Thanks, Dave. ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
Re: [Openocd-development] ST-Link with OpenOCD?
At that level, it may make sense to build a separate GDB server. The GDB remote protocol is not very difficult, and I've done it in HL languages. Contact me off-list if you'd like help doing so. - Alex -Original Message- From: openocd-development-boun...@lists.berlios.de [mailto:openocd- development-boun...@lists.berlios.de] On Behalf Of Spencer Oliver Sent: Tuesday, March 23, 2010 9:02 AM To: simon qian Cc: openocd-development@lists.berlios.de Subject: Re: [Openocd-development] ST-Link with OpenOCD? On 23/03/2010 10:12, simon qian wrote: ST doesn't open the protocol of ST-Link, so it's impossible to support it in OpenOCD. I have 2 ST-Link sent by vendor of ST, but now, they are Versaloon. ST sent me the api, it is based on mass storage device. They are happy for openocd to support it. The current issue is that it is high level access only, eg. Step Core, Read registers etc. So some changes are required to support this kind of dongle. Cheers Spen ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
Re: [Openocd-development] Unused symbols; Global vs Static
On Tuesday 23 March 2010, Øyvind Harboe wrote: What is nm and how do you run it? man nm it's part of binutils, like as and ld, or 'objdump, etc. Is it an open source tool? In the GNU toolchain, yes. There are non-GNU toolchains which also include tools named nm, for (ISTR) POSIX conformance. ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
Re: [Openocd-development] xds100v2
On Tuesday 23 March 2010, Dave wrote: Hi, I am thinking about getting an XDS100v2 jtag/usb adapter to debug a beagleboard. It appears that I can use this board with a free version of CodeComposer. Does anybody know if I can debug the OMAP's Arm Cortex A8 with the XDS100v2 board, OpenOCD, and GDB? It ought to work once you write a driver. I'm not sure that we'd be able to merge such a driver, given the legalese surrounding access to the XDS100 schematics, and on v2, CPLD info, (needed to write such a driver) ... but you would at least be able to use such a driver with your own copy. Does anybody use the XDS100v2 board with a recent ARM processor and OpenOCD? No, but I've thought about doing that too. XDS100 is at some level just another FT2232 based JTAG adapter ... with level shifting so it supports 1.8V parts (like omap3) TI-14 JTAG layout, including EMU0/EMU1 signals Compact-TI-20 JTAG layout (some versions) Reporting some events that OpenOCD doesn't otherwise expose (Zy1000 does though) ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
Re: [Openocd-development] Unused symbols; Global vs Static
In attachment first 2 patches of what seems to be a long sequence. Them cleanup just one C file. I have split in one patch just adding static keyword and one just removing unused function. I let you decide to proceed removing unused code right now, or just add those identifiers in a list of to-be-removed-soon items. In case somebody wants contribute, in attachment the script I'm using to find: - local identifiers with global scope and - unused global identifiers. You need to successfully compile OpenOCD, then run the script in the same directory in which you have typed make. You will get the list in alphabetic order. Explanation of the script: - get all symbols from all .o files - remove symbol address, useless - change U type for undefined symbol with a char (0) that has lowest ascii code - sort by symbol name and then by type - print symbols that has global scope somewhere (uppercase type) but never appears as undefined, so never referenced, in any other place I'm sure there are much better tools for similar code analysis, without passing through compiling the code. Any comment is welcome Best Regards, Antonio Borneo From 6d457d4fdba7915bec3d8d20233dc6e5cadb2fbc Mon Sep 17 00:00:00 2001 From: Antonio Borneo borneo.anto...@gmail.com Date: Wed, 24 Mar 2010 12:06:45 +0800 Subject: [PATCH] server: review scope of functions and data Add static qualifier to private functions and data. Signed-off-by: Antonio Borneo borneo.anto...@gmail.com --- src/server/server.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/server/server.c b/src/server/server.c index 173beb8..1a6250c 100644 --- a/src/server/server.c +++ b/src/server/server.c @@ -40,7 +40,7 @@ #endif -struct service *services = NULL; +static struct service *services = NULL; /* shutdown_openocd == 1: exit the main event loop, and quit the debugger */ static int shutdown_openocd = 0; @@ -48,7 +48,7 @@ static int shutdown_openocd = 0; /* set when using pipes rather than tcp */ int server_use_pipes = 0; -int add_connection(struct service *service, struct command_context *cmd_ctx) +static int add_connection(struct service *service, struct command_context *cmd_ctx) { socklen_t address_size; struct connection *c, **p; @@ -112,7 +112,7 @@ int add_connection(struct service *service, struct command_context *cmd_ctx) return ERROR_OK; } -int remove_connection(struct service *service, struct connection *connection) +static int remove_connection(struct service *service, struct connection *connection) { struct connection **p = service-connections; struct connection *c; @@ -261,7 +261,7 @@ int remove_service(unsigned short port) return ERROR_OK; } -int remove_services(void) +static int remove_services(void) { struct service *c = services; -- 1.5.2.2 From ae06e88a21ad717cfb0618528fccf6cbce14aece Mon Sep 17 00:00:00 2001 From: Antonio Borneo borneo.anto...@gmail.com Date: Wed, 24 Mar 2010 12:08:45 +0800 Subject: [PATCH] server: review unused symbols Remove unused function Signed-off-by: Antonio Borneo borneo.anto...@gmail.com --- src/server/server.c | 28 1 files changed, 0 insertions(+), 28 deletions(-) diff --git a/src/server/server.c b/src/server/server.c index 1a6250c..0d3273b 100644 --- a/src/server/server.c +++ b/src/server/server.c @@ -233,34 +233,6 @@ int add_service(char *name, enum connection_type type, unsigned short port, int return ERROR_OK; } -int remove_service(unsigned short port) -{ - struct service **p = services; - struct service *c; - - /* find service */ - while ((c = *p)) - { - if (c-port == port) - { - if (c-name) -free(c-name); - - if (c-priv) -free(c-priv); - - /* delete service */ - *p = c-next; - free(c); - } - - /* redirect p to next list pointer */ - p = (*p)-next; - } - - return ERROR_OK; -} - static int remove_services(void) { struct service *c = services; -- 1.5.2.2 search.sh Description: Bourne shell script ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development