aboutsummaryrefslogtreecommitdiff
path: root/src/helper/replacements.h
AgeCommit message (Collapse)AuthorFilesLines
2022-07-23openocd: src/helper: replace the GPL-2.0-or-later license tagAntonio Borneo1-13/+2
Replace the FSF boilerplate with the SPDX tag. The SPDX tag on files *.c is incorrect, as it should use the C99 single line comment using '//'. But current checkpatch doesn't allow C99 comments, so keep using standard C comments, by now. Change-Id: I7851617e2682f97ccc3927e3941aadef2df63b54 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7068 Tested-by: jenkins
2021-08-30helper: remove fix for libusb pre-v1.0.9Antonio Borneo1-4/+0
Libusb v1.0.9 has been released on April 2012. We can reasonably expect that every user has already updated his system to a libusb newer of equel to v1.0.9. Remove the fix for older libusb. Change-Id: I0c40e53d7af85a11b0bb265bbf8035857a2dfce1 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6253 Tested-by: jenkins Reviewed-by: Xiaofan Chen <xiaofanc@gmail.com>
2021-05-01Cleanup of config/includes.Tim Newsome1-0/+1
Remove a use of AH_BOTTOM from configure.ac. This macro is used by autoheader to add '#include' of some include file to the end of config.h.in and then to config.h. OpenOCD can be built with a custom config.h, so it's preferable to move these '#include' statement directly in the C files that need them dropping this unneeded dependency. It also causes problems when I want to use the gnulib library (which comes with its own Makefile, and does not have the same include path as the top-level Makefile). So this change touches a lot of files, but is actually really simple. It does not affect functionality at all. Change-Id: I52c70bf15eb2edc1dd10e0fde23b2bcd4caec000 Signed-off-by: Tim Newsome <tim@sifive.com> Reviewed-on: http://openocd.zylin.com/6171 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2021-05-01helper/replacements: remove unused typedef'sAntonio Borneo1-2/+0
The ELF typedef's 'Elf32_Sword' and 'Elf32_Hashelt' are not used within OpenOCD. Plus, being their name in CamelCase require extra effort to include them in the exceptions for checkpatch. Remove the unused typedef's. Change-Id: I18f039567edd5b24dbb41df5406c154f31022ae7 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/6178 Tested-by: jenkins Reviewed-by: Christian Hoff <christian.hoff@advantest.com>
2021-05-01target/image: allow loading of 64-bit ELF filesFlorian Meister1-1/+41
Change-Id: I9b88edacf5ffcc3c1caeab8c426693de0d92a695 Signed-off-by: Florian Meister <florian.meister@advantest.com> Signed-off-by: Christian Hoff <christian.hoff@advantest.com> Reviewed-on: http://openocd.zylin.com/5204 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Ooi, Cinly <cinly.ooi@intel.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2018-03-07helper/replacements.h: Add missing #includeMarc Schink1-0/+2
Change-Id: Ic6c47f7fbc999d00ef3211c1fa44867e3aabc321 Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/4057 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2018-01-25Add read buffer to bitbang, improving performance.Tim Newsome1-0/+11
Previously for every bit scanned OpenOCD would write the bit, wait for that bit to be scanned, and then read the result. This involves at least 2 context switches. Most of the time the next bit scanned does not depend on the last bit we read, so with a buffer we now write a bunch of bits to be scanned all at once, and then we wait for them all to be scanned and have a result. This reduces the time for one testcase where OpenOCD connects to a simulator from 12.30s to 5.35s! Running all our tests went from 13m13s to 3m55s. Change-Id: Ie9fcea043ac1d7877a521125334ed47d4b3e1615 Signed-off-by: Tim Newsome <tim@sifive.com> Reviewed-on: http://openocd.zylin.com/4312 Tested-by: jenkins Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2016-05-24Make #include guard naming consistentMarc Schink1-3/+3
Change-Id: Ie13e8af0bb74ed290f811dcad64ad06c9d8cb4fa Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/2956 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2016-05-24Remove FSF address from GPL noticesMarc Schink1-3/+1
Also make GPL notices consistent according to: https://www.gnu.org/licenses/gpl-howto.html Change-Id: I84c9df40a774958a7ed91460c5d931cfab9f45ba Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/3488 Tested-by: jenkins Reviewed-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2015-02-04configure: define WIN32_LEAN_AND_MEAN early to make it effectivePaul Fertser1-1/+0
This macro makes windows builds faster and helps with the old "#define interface struct" issue as the word "interface" is part of libusb-0.1 API. However, defining it in replacements.h is too late, as windows.h gets included by that time from somewhere else. This solution is provided by Ray Donnelly from the MSYS2 team. Change-Id: I376a5fb3d106786515d7e1ba44dbd751e4dcdb1b Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2486 Tested-by: jenkins Reviewed-by: Xiaofan <xiaofanc@gmail.com> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-06-12libusb1_common, ftdi: clarify libusb_open error messagePaul Fertser1-0/+4
Print a user-friendly message when libusb_open() fails, e.g. Error: libusb_open() failed with LIBUSB_ERROR_ACCESS when there's a permissions problem. Also output a configure warning if libusb older than 1.0.9 is detected. Change-Id: I800f71f06672fe06c0a98a4e469f853b5021bcfe Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/1430 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-06-05update files to correct FSF addressSpencer Oliver1-1/+1
Change-Id: I429f7fd51f77b0e7c86d7a7f110ca31afd76c173 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1426 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2012-05-21build: add helper/types.h to config.hSpencer Oliver1-4/+0
this header is used in numerous files and adding to config.h simplifies its use globally. Change-Id: Id724a9950b90504721233022c7fb5768e9bc5548 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/649 Tested-by: jenkins Reviewed-by: Xiaofan <xiaofanc@gmail.com>
2012-05-19remote_bitbang: fix native windows buildSpencer Oliver1-0/+9
Change-Id: Ied29ade0346c4595ffc1dafa788e2d5a595e0de3 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/648 Tested-by: jenkins Reviewed-by: Xiaofan <xiaofanc@gmail.com>
2012-03-13ecosboard: delete bit-rotted eCos codeØyvind Harboe1-4/+0
Change-Id: Iff7943eb9da3f41dcc45492acd0f36cf63b3497f Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com> Reviewed-on: http://openocd.zylin.com/503 Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com> Tested-by: jenkins
2012-02-06build: cleanup src/helper directorySpencer Oliver1-58/+61
Change-Id: I71a312df783995e9083c345c25e73902d5aef59e Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/415 Tested-by: jenkins
2011-12-31build: fix mingw build issuesSpencer Oliver1-0/+3
8901fca0270fec41b12c30c7dbd806d460548c5b broke the build under mingw, this fixes that. Change-Id: I22b91e220dac3b68cc576b65a9f1b8711e64263a Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/298 Tested-by: jenkins Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com> Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2010-01-28ARM semihosting: win32 and cygwin fixesSpencer Oliver1-0/+6
Cygwin would fail to reopen a previously written file if the mode is not given. Simplified converting the open flags and made sure the win32 O_BINARY bit is set. Added define for systems that do not support O_BINARY. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2009-12-03change #include "types.h" to <helper/types.h>Zachary T Welch1-1/+1
Changes from the flat namespace to heirarchical one. Instead of writing: #include "types.h" the following form should be used. #include <helper/types.h> The exception is from .c files in the same directory.
2009-11-09src/helper: wrap and clean headers.Zachary T Welch1-3/+4
Remove all useless 'extern' keywords from function prototypes. Wraps long lines for readability.
2009-07-17Andreas Fritiofson <andreas.fritiofson@gmail.com> UTF8 fixesoharboe1-1/+1
git-svn-id: svn://svn.berlios.de/openocd/trunk@2549 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-07-06- fix build when using a cross compiler - do not try and run any host toolsntfreak1-0/+2
- add missing types.h when platform does not contain elf.h git-svn-id: svn://svn.berlios.de/openocd/trunk@2482 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23Remove whitespace that occurs before ')'.zwelch1-3/+3
- Replace '[ \t]*[)]' with ')'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2377 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23Remove whitespace that occurs after '('.zwelch1-2/+2
- Replace '([ \t]*' with '('. git-svn-id: svn://svn.berlios.de/openocd/trunk@2376 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23- Fixes '[<>]' whitespacezwelch1-2/+2
- Replace ')\([<>]\)(' with ') \1 ('. - Replace ')\([<>]\)\(\w\)' with ') \1 \2'. - Replace '\(\w\)\([<>]\)(' with '\1 \2 ('. - Replace '\(\w\)\([<>]\)\(\w\)' with '\1 \2 \3'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2375 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-12- fix build issue when HAVE_ELF_H is not definedntfreak1-21/+29
git-svn-id: svn://svn.berlios.de/openocd/trunk@1764 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-12Audit and remove redundant uses of replacements.h in the tree.zwelch1-2/+0
git-svn-id: svn://svn.berlios.de/openocd/trunk@1761 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-12Make system.h private by including it from config.h autoheader.zwelch1-1/+0
git-svn-id: svn://svn.berlios.de/openocd/trunk@1759 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-11Remove redundant config.h from replacements.h, obtained from types.h.zwelch1-4/+0
git-svn-id: svn://svn.berlios.de/openocd/trunk@1717 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-11Factor system #includes out of replacements.h into new system.h.zwelch1-29/+1
git-svn-id: svn://svn.berlios.de/openocd/trunk@1702 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-29Remove redundant declarations to allow building with -Wredundant-decls.zwelch1-0/+2
git-svn-id: svn://svn.berlios.de/openocd/trunk@1560 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-29Add missing header files to fix C99 compatibility.zwelch1-1/+8
git-svn-id: svn://svn.berlios.de/openocd/trunk@1559 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-22- fix win32 build after svn 1511 changesntfreak1-0/+1
git-svn-id: svn://svn.berlios.de/openocd/trunk@1513 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-01-01- add gdb pipe support to native win32 (--pipe option)ntfreak1-0/+12
git-svn-id: svn://svn.berlios.de/openocd/trunk@1294 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-12-19- fix rlink build under native win32 (mingw)ntfreak1-1/+6
- remove rlink build warnings - add usb_set_configuration to rlink_init, win32 requires this - add win32 ETIMEDOUT define git-svn-id: svn://svn.berlios.de/openocd/trunk@1260 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-12-13- remove target specific variant and use target->variant memberntfreak1-9/+9
- fix build warning in cortex_m3 - code cleanup - remove trailing lf and convert c++ comments git-svn-id: svn://svn.berlios.de/openocd/trunk@1238 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-10-27now compiles under Cygwin and eCos again.oharboe1-0/+5
git-svn-id: svn://svn.berlios.de/openocd/trunk@1102 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-10-24- fix native mingw build if gettimeofday not defined.ntfreak1-7/+5
- reformat whitespace in startup.tcl git-svn-id: svn://svn.berlios.de/openocd/trunk@1101 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-10-22fix warnings when building for eCosoharboe1-0/+2
git-svn-id: svn://svn.berlios.de/openocd/trunk@1085 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-10-17try to get struct timezone def right w.r.t. config.h. Now compiles under ↵oharboe1-9/+13
Cygwin and eCos git-svn-id: svn://svn.berlios.de/openocd/trunk@1080 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-09-20- added myself to copyright on files i remember adding large contributions ↵ntfreak1-1/+4
for over the years - cleaned up headers to match rest of code - added missing svn props for previously added files git-svn-id: svn://svn.berlios.de/openocd/trunk@987 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-25added yours sincerely for files where I feel that I've made non-trivial ↵oharboe1-0/+3
contributions. git-svn-id: svn://svn.berlios.de/openocd/trunk@872 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-06- fixed build issues with win32ntfreak1-1/+7
- fixed build warnings for last commit - set svn props for last commit git-svn-id: svn://svn.berlios.de/openocd/trunk@760 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-04-09Don Porges fixed c99 issues.oharboe1-1/+1
git-svn-id: svn://svn.berlios.de/openocd/trunk@553 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-25- rename log functions to stop conflicts under win32 (wingdi)ntfreak1-2/+0
git-svn-id: svn://svn.berlios.de/openocd/trunk@523 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-11reduce compare noise. If someone should be crazy enough to try to run ↵oharboe1-2/+12
OpenOCD under eCos, then they'v got some hooks to point them in the general direction. git-svn-id: svn://svn.berlios.de/openocd/trunk@499 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-02Uwe Hermann tightned up comments, etc. to follow OpenOCD policyoharboe1-2/+2
git-svn-id: svn://svn.berlios.de/openocd/trunk@431 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-25- convert all files to unix line-endingdrath1-29/+29
git-svn-id: svn://svn.berlios.de/openocd/trunk@347 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-12-14Corrected typo (to many brackets)mifi1-2/+2
git-svn-id: svn://svn.berlios.de/openocd/trunk@230 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-12-14Sorry, I have forgotten to add a description for the last version, wheremifi1-0/+1
I have added the clear_malloc and fill_malloc functionality. But the default is the original malloc. git-svn-id: svn://svn.berlios.de/openocd/trunk@229 b42882b7-edfa-0310-969c-e2dbd0fdcd60