Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

From upstream #913

Merged
merged 51 commits into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
59bc761
rtos: add custom stack read function
erhankur Jan 21, 2023
cf50bcb
rtos/nuttx: add stacking info for Espressif Xtensa chips
erhankur Jan 21, 2023
43c8aa2
rtos: Support rt-kernel
nattgris Apr 15, 2016
d032e7e
rtos: Fix constness of struct rtos_type
nattgris Nov 8, 2021
20285b9
jtag/drivers/openjtag: fix annoying num_cycles > 16 warning
nlshipp Dec 24, 2022
148bc7e
jtag/drivers/bitbang: avoid mostly harmless glitch on SWDIO
tom-van Oct 14, 2022
b4dd8db
jtag/drivers/bcm2835gpio: use rounding in delay math
tom-van Oct 13, 2022
2dde7e9
jtag/drivers/bcm2835gpio: refactor delays to inline function
tom-van Oct 13, 2022
bec6c0e
tcl/interface: universal config for all Raspberry Pi models
tom-van Oct 14, 2022
227577b
rtos: remove config.h includes from stackings headers
erhankur Jan 21, 2023
4423e05
jtag/drivers/jlink: allow SWD multidrop
tom-van Nov 28, 2022
0b6f53e
tcl/target: add rescue mode to RP2040 config
tom-van Oct 2, 2022
9d97cac
flash/nor/spi: Add some zbit flash chips.
dmsc Jan 25, 2023
700cdbf
target: arc: rewrite command 'arc jtag get-aux-reg' as COMMAND_HANDLER
borneoa Dec 19, 2022
551d85b
target: arc: rewrite command 'arc jtag set-aux-reg' as COMMAND_HANDLER
borneoa Dec 19, 2022
16af56f
target: arc: rewrite command 'arc jtag get-core-reg' as COMMAND_HANDLER
borneoa Dec 19, 2022
f0cb5b0
target: arc: rewrite command 'arc jtag set-core-reg' as COMMAND_HANDLER
borneoa Dec 19, 2022
996d6f3
target: arc: rewrite command 'arc get-reg-field' as COMMAND_HANDLER
borneoa Dec 19, 2022
da76ba6
target: arc: rewrite command 'arc num-actionpoints' as COMMAND_HANDLER
borneoa Dec 19, 2022
18bafdc
target: arc: fix error handling in command 'arc set-reg-exists'
borneoa Dec 19, 2022
ea6a992
helper: nvp: add openocd nvp files
borneoa Dec 26, 2022
92ef274
target: arc: rewrite command 'arc add-reg-type-flags' as COMMAND_HANDLER
borneoa Dec 26, 2022
85f3b10
target: arc: rewrite command 'arc add-reg-type-struct' as COMMAND_HAN…
borneoa Dec 26, 2022
4a79372
target: arc: rewrite command 'arc add-reg' as COMMAND_HANDLER
borneoa Dec 27, 2022
b6021e8
flash/nor/stm32l4x: Add revision 'Z' for STM32L552/562 devices
zapb-0 Jan 30, 2023
1998b1e
README: Remove statement about libjaylink Git submodule
zapb-0 Feb 2, 2023
85ae73d
new SPI memory devices, continuation code for manufacturer id
Mar 9, 2022
79caea8
flash/nor/spi: add 25pe{10/20/40/80/16}
danselmi Dec 22, 2022
c99c043
helper: command: drop last LF ('\n') from sequence of command_print()
borneoa Dec 19, 2022
0a20e78
jtag/drivers/cmsis_dap: run queue on reaching transaction limit
pcc Feb 18, 2023
fc30feb
tlc/interface: does fix source of raspberrypi-gpio-connector.cfg
Tomdein Feb 28, 2023
e1b0d57
tcl/board/at91sam9g20-ek: remove outdated FIXME
wsakernel Mar 3, 2023
c8f56b4
TODO: remove outdated AT91SAM92xx entry
wsakernel Mar 3, 2023
c7e0040
drivers/libusb_helper: allow external use of jtag_libusb_match_ids()
tom-van Mar 6, 2023
a8bc4e7
drivers/ftdi: prevent misleading error msg when more vid/pids configured
tom-van Mar 6, 2023
70d771c
flash/nor/at91samd: fix RAM size for SAMR34/35
AndreyLalaev Mar 5, 2023
8d1261c
flash/nor/at91samd: add missing SAMR34/35 part numbers
AndreyLalaev Mar 5, 2023
a7f8a1d
doc: add missing FreeRTOS symbol
Du-Chao Mar 8, 2023
047b1a8
target/image: zero-initialize ELF segments up to p_memsz
pcc Mar 2, 2023
904d58c
target/xtensa: add NX support
ianstcdns Nov 4, 2022
e8f376e
helper: add compiler.h to handle compiler specific workarounds
borneoa Mar 4, 2023
6427354
openocd: drop JIM_EMBEDDED macro
borneoa Mar 4, 2023
45eeeab
build: fix distcheck for jimtcl
borneoa Mar 5, 2023
dccf323
jimtcl: update to version 0.82
borneoa Mar 4, 2023
1528845
tcl/tools/test_cpu_speed: Fix register name
zapb-0 Feb 9, 2023
b4e2844
tcl: remove exec permission to tcl config files
borneoa Mar 6, 2023
b6b4f9d
svf: new command line options -noreset and -addcycles
kaischmitzAdv Jan 5, 2023
9ce6b08
helper/compiler: fix build on MacOS
borneoa Mar 19, 2023
ee31f15
rtos/nuttx: add Espressif target support and refactoring
erhankur Jan 22, 2023
8c1f1b7
Merge commit 'ee31f1578a333a75737bc5b183cd4ae98cdaf798' into from_ups…
timsifive Sep 12, 2023
fb26f4f
target/xtensa: Fix build warning.
timsifive Sep 12, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 7 additions & 12 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,14 @@ noinst_LTLIBRARIES =
info_TEXINFOS =
dist_man_MANS =
EXTRA_DIST =
DISTCLEANFILES =

if INTERNAL_JIMTCL
SUBDIRS += jimtcl
DIST_SUBDIRS += jimtcl
EXTRA_DIST += jimtcl/configure.gnu
# jimtcl from 0.79 to 0.82 miss cleaning jsmn.o
DISTCLEANFILES += jimtcl/jsmn/jsmn.o
endif

# common flags used in openocd build
Expand Down Expand Up @@ -131,18 +135,9 @@ uninstall-hook:

distclean-local:
rm -rf Doxyfile doxygen
rm -f $(srcdir)/jimtcl/configure.gnu

# We want every change to have Signed-off-by. This is tricky to enforce in
# Travis, because it automatically makes temporary commits when merging. So
# instead we have a hook that enforces this in each workspace. To make sure
# that users actually use those hooks, we point git at them here.
# If git fails for some reason, that's OK. It's probably because somebody is
# building the source completely outside a git repo.
all-local:
cd $(srcdir) && git config core.hooksPath ./git-hooks || true

DISTCLEANFILES = doxygen.log
-rm -f $(srcdir)/jimtcl/configure.gnu

DISTCLEANFILES += doxygen.log

METASOURCES = AUTO

Expand Down
3 changes: 1 addition & 2 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,7 @@ Optional CMSIS-DAP adapter driver needs HIDAPI library.

Optional linuxgpiod adapter driver needs libgpiod library.

Optional JLink adapter driver needs libjaylink; build from git can
retrieve libjaylink as git submodule.
Optional J-Link adapter driver needs libjaylink library.

Optional ARM disassembly needs capstone library.

Expand Down
2 changes: 0 additions & 2 deletions TODO
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,6 @@ https://lists.berlios.de/pipermail/openocd-development/2009-October/011506.html
- MC1322x support (JW/DE?)
- integrate and test support from JW (and DE?)
- get working with a known good interface (i.e. not today's jlink)
- AT91SAM92xx:
- improvements for unknown-board-atmel-at91sam9260.cfg (RD)
- STR9x: (ZW)
- improvements to str912.cfg to be more general purpose
- AVR: (SQ)
Expand Down
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -572,9 +572,9 @@ AS_IF([test "x$enable_buspirate" != "xno"], [
AS_IF([test "x$use_internal_jimtcl" = "xyes"], [
AS_IF([test -f "$srcdir/jimtcl/configure"], [
AS_IF([test "x$use_internal_jimtcl_maintainer" = "xyes"], [
jimtcl_config_options="--disable-install-jim --with-ext=json --maintainer"
jimtcl_config_options="--disable-install-jim --with-ext=json --minimal --disable-ssl --maintainer"
], [
jimtcl_config_options="--disable-install-jim --with-ext=json"
jimtcl_config_options="--disable-install-jim --with-ext=json --minimal --disable-ssl"
])
AX_CONFIG_SUBDIR_OPTION([jimtcl], [$jimtcl_config_options])
], [
Expand Down
14 changes: 11 additions & 3 deletions doc/openocd.texi
Original file line number Diff line number Diff line change
Expand Up @@ -5031,7 +5031,7 @@ The value should normally correspond to a static mapping for the
@var{rtos_type} can be one of @option{auto}, @option{none}, @option{eCos},
@option{ThreadX}, @option{FreeRTOS}, @option{linux}, @option{ChibiOS},
@option{embKernel}, @option{mqx}, @option{uCOS-III}, @option{nuttx},
@option{RIOT}, @option{Zephyr}
@option{RIOT}, @option{Zephyr}, @option{rtkernel}
@xref{gdbrtossupport,,RTOS Support}.

@item @code{-defer-examine} -- skip target examination at initial JTAG chain
Expand Down Expand Up @@ -11651,7 +11651,8 @@ In a debug session using JTAG for its transport protocol,
OpenOCD supports running such test files.

@deffn {Command} {svf} @file{filename} [@option{-tap @var{tapname}}] [@option{[-]quiet}] @
[@option{[-]nil}] [@option{[-]progress}] [@option{[-]ignore_error}]
[@option{[-]nil}] [@option{[-]progress}] [@option{[-]ignore_error}] @
[@option{-noreset}] [@option{-addcycles @var{cyclecount}}]
This issues a JTAG reset (Test-Logic-Reset) and then
runs the SVF script from @file{filename}.

Expand All @@ -11670,6 +11671,10 @@ on the real interface;
@item @option{[-]progress} enable progress indication;
@item @option{[-]ignore_error} continue execution despite TDO check
errors.
@item @option{-noreset} omit JTAG reset (Test-Logic-Reset) before executing
content of the SVF file;
@item @option{-addcycles @var{cyclecount}} inject @var{cyclecount} number of
additional TCLK cycles after each SDR scan instruction;
@end itemize
@end deffn

Expand Down Expand Up @@ -12085,6 +12090,7 @@ Currently supported rtos's include:
@item @option{RIOT}
@item @option{hwthread} (This is not an actual RTOS. @xref{usingopenocdsmpwithgdb,,Using OpenOCD SMP with GDB}.)
@item @option{Zephyr}
@item @option{rtkernel}
@end itemize

At any time, it's possible to drop the selected RTOS using:
Expand All @@ -12104,7 +12110,7 @@ _tx_thread_current_ptr, _tx_thread_created_ptr, _tx_thread_created_count.
@raggedright
pxCurrentTCB, pxReadyTasksLists, xDelayedTaskList1, xDelayedTaskList2,
pxDelayedTaskList, pxOverflowDelayedTaskList, xPendingReadyList,
uxCurrentNumberOfTasks, uxTopUsedPriority.
uxCurrentNumberOfTasks, uxTopUsedPriority, xSchedulerRunning.
@end raggedright
@item linux symbols
init_task.
Expand All @@ -12126,6 +12132,8 @@ _tcb_name_offset.
@end raggedright
@item Zephyr symbols
_kernel, _kernel_openocd_offsets, _kernel_openocd_size_t_size
@item rtkernel symbols
Multiple struct offsets.
@end table

For most RTOS supported the above symbols will be exported by default. However for
Expand Down
2 changes: 1 addition & 1 deletion jimtcl
Submodule jimtcl updated 86 files
+30 −0 .github/workflows/makefile.yml
+1 −1 .travis.yml
+304 −99 EastAsianWidth.txt
+25 −14 Makefile.in
+24 −26 README
+50 −0 README.ensemble
+11 −0 README.linenoise
+22 −7 README.oo
+64 −4 README.redis
+680 −102 Tcl_shipped.html
+3,071 −63 UnicodeData.txt
+3 −3 appveyor.yml
+102 −54 auto.def
+1 −1 autosetup/README.autosetup
+46 −3 autosetup/autosetup
+3 −2 autosetup/autosetup-find-tclsh
+4 −4 autosetup/cc-lib.tcl
+36 −13 autosetup/cc.tcl
+23 −22 autosetup/local.tcl
+4 −1 autosetup/system.tcl
+18 −0 autosetup/tmake.auto
+148 −53 bench.tcl
+2 −2 build-jim-ext.in
+1 −0 configure
+0 −3 configure.ac
+36 −0 ensemble.tcl
+1 −5 examples.api/README
+1 −2 examples.api/jim_hello.c
+38 −0 examples/nonblocking-gets.tcl
+24 −14 examples/ootest.tcl
+62 −0 examples/redis-async.tcl
+23 −10 examples/redis-pubsub.tcl
+11 −0 examples/redis.tcl
+27 −0 examples/socket-show-filename.tcl
+26 −0 examples/vwaitsignal.tcl
+156 −51 jim-aio.c
+9 −14 jim-clock.c
+24 −33 jim-eventloop.c
+72 −54 jim-exec.c
+48 −26 jim-file.c
+3 −3 jim-interactive.c
+2 −2 jim-namespace.c
+4 −0 jim-posix.c
+91 −20 jim-redis.c
+5 −0 jim-signal.c
+438 −157 jim.c
+43 −5 jim.h
+185 −53 jim_tcl.txt
+3 −1 jimdb
+43 −6 jimiocompat.c
+22 −10 jimiocompat.h
+1 −1 jimregexp.c
+98 −23 linenoise.c
+3 −3 make-bootstrap-jim
+14 −0 nshelper.tcl
+15 −7 oo.tcl
+1 −1 parse-unidata.tcl
+24 −0 regtest.tcl
+2 −2 sqlite3/Makefile
+7 −1 sqlite3/README
+97,963 −56,591 sqlite3/sqlite3.c
+3,889 −1,429 sqlite3/sqlite3.h
+134 −5 sqlite3/sqlite3ext.h
+23 −3 stdlib.tcl
+3 −3 tests/apply.test
+6 −0 tests/array.test
+1 −2 tests/coverage.test
+12 −0 tests/dict.test
+20 −2 tests/dict2.test
+47 −0 tests/ensemble.test
+6 −6 tests/event.test
+4 −0 tests/exec.test
+12 −10 tests/exec2.test
+68 −0 tests/file.test
+14 −10 tests/infoframe.test
+17 −19 tests/load.test
+1 −1 tests/lock.test
+75 −0 tests/nsensemble.test
+99 −0 tests/ref.test
+4 −0 tests/regexp2.test
+2 −2 tests/runall.tcl
+1 −1 tests/tree.test
+44 −0 tests/try.test
+43 −2 tools/benchtable.tcl
+1 −1 tree.tcl
+2 −2 utf8.c
8 changes: 6 additions & 2 deletions src/flash/nor/at91samd.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,12 @@ static const struct samd_part saml21_parts[] = {
{ 0x1F, "SAMR30E18A", 256, 32 },

/* SAMR34/R35 parts have integrated SAML21 with a lora radio */
{ 0x28, "SAMR34J18", 256, 32 },
{ 0x2B, "SAMR35J18", 256, 32 },
{ 0x28, "SAMR34J18", 256, 40 },
{ 0x29, "SAMR34J17", 128, 24 },
{ 0x2A, "SAMR34J16", 64, 12 },
{ 0x2B, "SAMR35J18", 256, 40 },
{ 0x2C, "SAMR35J17", 128, 24 },
{ 0x2D, "SAMR35J16", 64, 12 },
};

/* Known SAML22 parts. */
Expand Down
85 changes: 76 additions & 9 deletions src/flash/nor/spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,14 @@
* from device datasheets and Linux SPI flash drivers. */
const struct flash_device flash_devices[] = {
/* name, read_cmd, qread_cmd, pprog_cmd, erase_cmd, chip_erase_cmd, device_id,
* pagesize, sectorsize, size_in_bytes */
* pagesize, sectorsize, size_in_bytes
* note: device id is usually 3 bytes long, however the unused highest byte counts
* continuation codes for manufacturer id as per JEP106xx */
FLASH_ID("st m25pe10", 0x03, 0x00, 0x02, 0xd8, 0x00, 0x00118020, 0x100, 0x10000, 0x20000),
FLASH_ID("st m25pe20", 0x03, 0x00, 0x02, 0xd8, 0x00, 0x00128020, 0x100, 0x10000, 0x40000),
FLASH_ID("st m25pe40", 0x03, 0x00, 0x02, 0xd8, 0x00, 0x00138020, 0x100, 0x10000, 0x80000),
FLASH_ID("st m25pe80", 0x03, 0x00, 0x02, 0xd8, 0xc7, 0x00148020, 0x100, 0x10000, 0x100000),
FLASH_ID("st m25pe16", 0x03, 0x00, 0x02, 0xd8, 0xc7, 0x00158020, 0x100, 0x10000, 0x200000),
FLASH_ID("st m25p05", 0x03, 0x00, 0x02, 0xd8, 0xc7, 0x00102020, 0x80, 0x8000, 0x10000),
FLASH_ID("st m25p10", 0x03, 0x00, 0x02, 0xd8, 0xc7, 0x00112020, 0x80, 0x8000, 0x20000),
FLASH_ID("st m25p20", 0x03, 0x00, 0x02, 0xd8, 0xc7, 0x00122020, 0x100, 0x10000, 0x40000),
Expand Down Expand Up @@ -51,12 +58,28 @@ const struct flash_device flash_devices[] = {
FLASH_ID("cyp s25fl064l", 0x03, 0x00, 0x02, 0xd8, 0xc7, 0x00176001, 0x100, 0x10000, 0x800000),
FLASH_ID("cyp s25fl128l", 0x03, 0x00, 0x02, 0xd8, 0xc7, 0x00186001, 0x100, 0x10000, 0x1000000),
FLASH_ID("cyp s25fl256l", 0x13, 0x00, 0x12, 0xdc, 0xc7, 0x00196001, 0x100, 0x10000, 0x2000000),
FLASH_ID("cyp s28hl256t", 0x13, 0xec, 0x12, 0xdc, 0xc7, 0x00195a34, 0x100, 0x40000, 0x2000000), /* page! */
FLASH_ID("cyp s28hs256t", 0x13, 0xec, 0x12, 0xdc, 0xc7, 0x00195b34, 0x100, 0x40000, 0x2000000), /* page! */
FLASH_ID("cyp s28hl512t", 0x13, 0xec, 0x12, 0xdc, 0xc7, 0x001a5a34, 0x100, 0x40000, 0x4000000), /* page! */
FLASH_ID("cyp s28hs512t", 0x13, 0xec, 0x12, 0xdc, 0xc7, 0x001a5b34, 0x100, 0x40000, 0x4000000), /* page! */
FLASH_ID("cyp s28hl01gt", 0x13, 0xec, 0x12, 0xdc, 0xc7, 0x001b5a34, 0x100, 0x40000, 0x8000000), /* page! */
FLASH_ID("cyp s28hs01gt", 0x13, 0xec, 0x12, 0xdc, 0xc7, 0x001b5b34, 0x100, 0x40000, 0x8000000), /* page! */
FLASH_ID("atmel 25f512", 0x03, 0x00, 0x02, 0x52, 0xc7, 0x0065001f, 0x80, 0x8000, 0x10000),
FLASH_ID("atmel 25f1024", 0x03, 0x00, 0x02, 0x52, 0x62, 0x0060001f, 0x100, 0x8000, 0x20000),
FLASH_ID("atmel 25f2048", 0x03, 0x00, 0x02, 0x52, 0x62, 0x0063001f, 0x100, 0x10000, 0x40000),
FLASH_ID("atmel 25f4096", 0x03, 0x00, 0x02, 0x52, 0x62, 0x0064001f, 0x100, 0x10000, 0x80000),
FLASH_ID("atmel 25fs040", 0x03, 0x00, 0x02, 0xd7, 0xc7, 0x0004661f, 0x100, 0x10000, 0x80000),
FLASH_ID("adesto 25sf041b", 0x03, 0x00, 0x02, 0xd8, 0xc7, 0x0001841f, 0x100, 0x10000, 0x80000),
FLASH_ID("adesto 25df081a", 0x03, 0x00, 0x02, 0xd8, 0xc7, 0x0001451f, 0x100, 0x10000, 0x100000),
FLASH_ID("adesto 25sf081b", 0x03, 0x00, 0x02, 0xd8, 0xc7, 0x0001851f, 0x100, 0x10000, 0x100000),
FLASH_ID("adesto 25sf161b", 0x03, 0x00, 0x02, 0xd8, 0xc7, 0x0001861f, 0x100, 0x10000, 0x200000),
FLASH_ID("adesto 25df321b", 0x03, 0x00, 0x02, 0xd8, 0xc7, 0x0001471f, 0x100, 0x10000, 0x400000),
FLASH_ID("adesto 25sf321b", 0x03, 0x00, 0x02, 0xd8, 0xc7, 0x0001871f, 0x100, 0x10000, 0x400000),
FLASH_ID("adesto 25xf641b", 0x03, 0x00, 0x02, 0xd8, 0xc7, 0x0001881f, 0x100, 0x10000, 0x800000), /* sf/qf */
FLASH_ID("adesto 25xf128a", 0x03, 0x00, 0x02, 0xd8, 0xc7, 0x0001891f, 0x100, 0x10000, 0x1000000), /* sf/qf */
FLASH_ID("adesto xp032", 0x03, 0x0b, 0x02, 0xd8, 0xc7, 0x0700a743, 0x100, 0x10000, 0x400000), /* 4-byte */
FLASH_ID("adesto xp064b", 0x03, 0x0b, 0x02, 0xd8, 0xc7, 0x0001a81f, 0x100, 0x10000, 0x800000), /* 4-byte */
FLASH_ID("adesto xp128", 0x03, 0x0b, 0x02, 0xd8, 0xc7, 0x0000a91f, 0x100, 0x10000, 0x1000000), /* 4-byte */
FLASH_ID("mac 25l512", 0x03, 0x00, 0x02, 0xd8, 0xc7, 0x001020c2, 0x010, 0x10000, 0x10000),
FLASH_ID("mac 25l1005", 0x03, 0x00, 0x02, 0xd8, 0xc7, 0x001120c2, 0x010, 0x10000, 0x20000),
FLASH_ID("mac 25l2005", 0x03, 0x00, 0x02, 0xd8, 0xc7, 0x001220c2, 0x010, 0x10000, 0x40000),
Expand All @@ -78,6 +101,9 @@ const struct flash_device flash_devices[] = {
FLASH_ID("mac 25r3235f", 0x03, 0x00, 0x02, 0xd8, 0xc7, 0x001628c2, 0x100, 0x10000, 0x400000),
FLASH_ID("mac 25r6435f", 0x03, 0x00, 0x02, 0xd8, 0xc7, 0x001728c2, 0x100, 0x10000, 0x800000),
FLASH_ID("mac 25u1635e", 0x03, 0xeb, 0x02, 0x20, 0xc7, 0x003525c2, 0x100, 0x1000, 0x100000),
FLASH_ID("mac 66l1g45g", 0x13, 0xec, 0x12, 0xdc, 0xc7, 0x001b20c2, 0x100, 0x10000, 0x8000000),
FLASH_ID("mac 66um1g45g", 0x13, 0xec, 0x12, 0xdc, 0xc7, 0x003b80c2, 0x100, 0x10000, 0x8000000),
FLASH_ID("mac 66lm1g45g", 0x13, 0xec, 0x12, 0xdc, 0xc7, 0x003b85c2, 0x100, 0x10000, 0x8000000),
FLASH_ID("micron n25q032", 0x03, 0xeb, 0x02, 0xd8, 0xc7, 0x0016ba20, 0x100, 0x10000, 0x400000),
FLASH_ID("micron n25q064", 0x03, 0xeb, 0x02, 0xd8, 0xc7, 0x0017ba20, 0x100, 0x10000, 0x800000),
FLASH_ID("micron n25q128", 0x03, 0xeb, 0x02, 0xd8, 0xc7, 0x0018ba20, 0x100, 0x10000, 0x1000000),
Expand All @@ -102,16 +128,28 @@ const struct flash_device flash_devices[] = {
FLASH_ID("win w25q256fv/jv", 0x03, 0xeb, 0x02, 0xd8, 0xc7, 0x001940ef, 0x100, 0x10000, 0x2000000),
FLASH_ID("win w25q256fv", 0x03, 0xeb, 0x02, 0xd8, 0xc7, 0x001960ef, 0x100, 0x10000, 0x2000000), /* QPI mode */
FLASH_ID("win w25q256jv", 0x03, 0x00, 0x02, 0xd8, 0xc7, 0x001970ef, 0x100, 0x10000, 0x2000000),
FLASH_ID("win w25q512jv", 0x03, 0x00, 0x02, 0xd8, 0xc7, 0x002040ef, 0x100, 0x10000, 0x4000000),
FLASH_ID("win w25q01jv", 0x13, 0x00, 0x12, 0xdc, 0xc7, 0x002140ef, 0x100, 0x10000, 0x8000000),
FLASH_ID("win w25q01jv-dtr", 0x03, 0xeb, 0x02, 0xd8, 0xc7, 0x002170ef, 0x100, 0x10000, 0x8000000),
FLASH_ID("win w25q02jv-dtr", 0x03, 0xeb, 0x02, 0xd8, 0xc7, 0x002270ef, 0x100, 0x10000, 0x10000000),
FLASH_ID("gd gd25q512", 0x03, 0x00, 0x02, 0x20, 0xc7, 0x001040c8, 0x100, 0x1000, 0x10000),
FLASH_ID("gd gd25q10", 0x03, 0x00, 0x02, 0x20, 0xc7, 0x001140c8, 0x100, 0x1000, 0x20000),
FLASH_ID("gd gd25q20", 0x03, 0x00, 0x02, 0x20, 0xc7, 0x001240c8, 0x100, 0x1000, 0x40000),
FLASH_ID("gd gd25q40", 0x03, 0x00, 0x02, 0x20, 0xc7, 0x001340c8, 0x100, 0x1000, 0x80000),
FLASH_ID("gd gd25q16c", 0x03, 0x00, 0x02, 0xd8, 0xc7, 0x001540c8, 0x100, 0x10000, 0x200000),
FLASH_ID("gd gd25q32c", 0x03, 0x00, 0x02, 0xd8, 0xc7, 0x001640c8, 0x100, 0x10000, 0x400000),
FLASH_ID("gd gd25q64c", 0x03, 0x00, 0x02, 0xd8, 0xc7, 0x001740c8, 0x100, 0x10000, 0x800000),
FLASH_ID("gd gd25q128c", 0x03, 0xeb, 0x02, 0xd8, 0xc7, 0x001840c8, 0x100, 0x10000, 0x1000000),
FLASH_ID("gd gd25q128c", 0x03, 0x0b, 0x02, 0xd8, 0xc7, 0x001840c8, 0x100, 0x10000, 0x1000000),
FLASH_ID("gd gd25q256c", 0x13, 0x00, 0x12, 0xdc, 0xc7, 0x001940c8, 0x100, 0x10000, 0x2000000),
FLASH_ID("gd gd25q512mc", 0x13, 0x00, 0x12, 0xdc, 0xc7, 0x002040c8, 0x100, 0x10000, 0x4000000),
FLASH_ID("gd gd25lx256e", 0x13, 0x0c, 0x12, 0xdc, 0xc7, 0x001968c8, 0x100, 0x10000, 0x2000000),
FLASH_ID("zbit zb25vq16", 0x03, 0x00, 0x02, 0xd8, 0xc7, 0x0015605e, 0x100, 0x10000, 0x200000),
FLASH_ID("zbit zb25vq32", 0x03, 0x0b, 0x02, 0xd8, 0xc7, 0x0016405e, 0x100, 0x10000, 0x400000),
FLASH_ID("zbit zb25vq32", 0x03, 0x0b, 0x02, 0xd8, 0xc7, 0x0016605e, 0x100, 0x10000, 0x400000), /* QPI mode */
FLASH_ID("zbit zb25vq64", 0x03, 0x0b, 0x02, 0xd8, 0xc7, 0x0017405e, 0x100, 0x10000, 0x800000),
FLASH_ID("zbit zb25vq64", 0x03, 0x0b, 0x02, 0xd8, 0xc7, 0x0017605e, 0x100, 0x10000, 0x800000), /* QPI mode */
FLASH_ID("zbit zb25vq128", 0x03, 0x0b, 0x02, 0xd8, 0xc7, 0x0018405e, 0x100, 0x10000, 0x1000000),
FLASH_ID("zbit zb25vq128", 0x03, 0x0b, 0x02, 0xd8, 0xc7, 0x0018605e, 0x100, 0x10000, 0x1000000), /* QPI mode */
FLASH_ID("issi is25lq040b", 0x03, 0xeb, 0x02, 0x20, 0xc7, 0x0013409d, 0x100, 0x1000, 0x80000),
FLASH_ID("issi is25lp032", 0x03, 0x00, 0x02, 0xd8, 0xc7, 0x0016609d, 0x100, 0x10000, 0x400000),
FLASH_ID("issi is25lp064", 0x03, 0x00, 0x02, 0xd8, 0xc7, 0x0017609d, 0x100, 0x10000, 0x800000),
Expand All @@ -121,6 +159,18 @@ const struct flash_device flash_devices[] = {
FLASH_ID("issi is25wp256d", 0x13, 0xec, 0x12, 0xdc, 0xc7, 0x0019709d, 0x100, 0x10000, 0x2000000),
FLASH_ID("issi is25lp512m", 0x13, 0xec, 0x12, 0xdc, 0xc7, 0x001a609d, 0x100, 0x10000, 0x4000000),
FLASH_ID("issi is25wp512m", 0x13, 0xec, 0x12, 0xdc, 0xc7, 0x001a709d, 0x100, 0x10000, 0x4000000),
FLASH_ID("xtx xt25f02e", 0x03, 0x00, 0x02, 0xd8, 0xc7, 0x0012400b, 0x100, 0x10000, 0x40000),
FLASH_ID("xtx xt25f04d", 0x03, 0x00, 0x02, 0xd8, 0xc7, 0x0013400b, 0x100, 0x10000, 0x80000),
FLASH_ID("xtx xt25f08b", 0x03, 0x00, 0x02, 0xd8, 0xc7, 0x0014400b, 0x100, 0x10000, 0x100000),
FLASH_ID("xtx xt25f16b", 0x03, 0x00, 0x02, 0xd8, 0xc7, 0x0015400b, 0x100, 0x10000, 0x200000),
FLASH_ID("xtx xt25f32b", 0x03, 0x0b, 0x02, 0xd8, 0xc7, 0x0016400b, 0x100, 0x10000, 0x200000),
FLASH_ID("xtx xt25f64b", 0x03, 0x0b, 0x02, 0xd8, 0xc7, 0x0017400b, 0x100, 0x10000, 0x400000),
FLASH_ID("xtx xt25f128b", 0x03, 0x0b, 0x02, 0xd8, 0xc7, 0x0018400b, 0x100, 0x10000, 0x800000),
FLASH_ID("xtx xt25q08d", 0x03, 0x0b, 0x02, 0xd8, 0xc7, 0x0014600b, 0x100, 0x10000, 0x100000),
FLASH_ID("xtx xt25q16b", 0x03, 0x0b, 0x02, 0xd8, 0xc7, 0x0015600b, 0x100, 0x10000, 0x200000),
FLASH_ID("xtx xt25q32b", 0x03, 0x0b, 0x02, 0xd8, 0xc7, 0x0016600b, 0x100, 0x10000, 0x400000), /* exists ? */
FLASH_ID("xtx xt25q64b", 0x03, 0x0b, 0x02, 0xd8, 0xc7, 0x0017600b, 0x100, 0x10000, 0x800000),
FLASH_ID("xtx xt25q128b", 0x03, 0x0b, 0x02, 0xd8, 0xc7, 0x0018600b, 0x100, 0x10000, 0x1000000),

/* FRAM, no erase commands, no write page or sectors */
FRAM_ID("fu mb85rs16n", 0x03, 0, 0x02, 0x00010104, 0x800),
Expand All @@ -131,13 +181,30 @@ const struct flash_device flash_devices[] = {
FRAM_ID("fu mb85rs512t", 0x03, 0, 0x02, 0x00032604, 0x10000),
FRAM_ID("fu mb85rs1mt", 0x03, 0, 0x02, 0x00032704, 0x20000),
FRAM_ID("fu mb85rs2mta", 0x03, 0, 0x02, 0x00034804, 0x40000),
FRAM_ID("cyp fm25v01a", 0x03, 0, 0x02, 0x000821c2, 0x4000),
FRAM_ID("cyp fm25v02", 0x03, 0, 0x02, 0x000022c2, 0x8000),
FRAM_ID("cyp fm25v02a", 0x03, 0, 0x02, 0x000822c2, 0x8000),
FRAM_ID("cyp fm25v05", 0x03, 0, 0x02, 0x000023c2, 0x10000),
FRAM_ID("cyp fm25v10", 0x03, 0, 0x02, 0x000024c2, 0x20000),
FRAM_ID("cyp fm25v20a", 0x03, 0, 0x02, 0x000825c2, 0x40000),
FRAM_ID("cyp fm25v40", 0x03, 0, 0x02, 0x004026c2, 0x80000),
FRAM_ID("cyp fm25v01a", 0x03, 0, 0x02, 0x060821c2, 0x4000),
FRAM_ID("cyp fm25v02", 0x03, 0, 0x02, 0x060022c2, 0x8000),
FRAM_ID("cyp fm25v02a", 0x03, 0, 0x02, 0x060822c2, 0x8000),
FRAM_ID("cyp fm25v05", 0x03, 0, 0x02, 0x060023c2, 0x10000),
FRAM_ID("cyp fm25v10", 0x03, 0, 0x02, 0x060024c2, 0x20000),
FRAM_ID("cyp fm25v20a", 0x03, 0, 0x02, 0x060825c2, 0x40000),
FRAM_ID("cyp fm25v40", 0x03, 0, 0x02, 0x064026c2, 0x80000),
FRAM_ID("cyp cy15b102qn", 0x03, 0, 0x02, 0x06002ac2, 0x40000),
FRAM_ID("cyp cy15v102qn", 0x03, 0, 0x02, 0x06042ac2, 0x40000),
FRAM_ID("cyp cy15b104qi", 0x03, 0, 0x02, 0x06012dc2, 0x80000),
FRAM_ID("cyp cy15b104qi", 0x03, 0, 0x02, 0x06a12dc2, 0x80000),
FRAM_ID("cyp cy15v104qi", 0x03, 0, 0x02, 0x06052dc2, 0x80000),
FRAM_ID("cyp cy15v104qi", 0x03, 0, 0x02, 0x06a52dc2, 0x80000),
FRAM_ID("cyp cy15b104qn", 0x03, 0, 0x02, 0x06402cc2, 0x80000),
FRAM_ID("cyp cy15b108qi", 0x03, 0, 0x02, 0x06012fc2, 0x100000),
FRAM_ID("cyp cy15b108qi", 0x03, 0, 0x02, 0x06a12fc2, 0x100000),
FRAM_ID("cyp cy15v108qi", 0x03, 0, 0x02, 0x06052fc2, 0x100000),
FRAM_ID("cyp cy15v108qi", 0x03, 0, 0x02, 0x06a52fc2, 0x100000),
FRAM_ID("cyp cy15b108qn", 0x03, 0, 0x02, 0x06012ec2, 0x100000),
FRAM_ID("cyp cy15b108qn", 0x03, 0, 0x02, 0x06032ec2, 0x100000),
FRAM_ID("cyp cy15b108qn", 0x03, 0, 0x02, 0x06a12ec2, 0x100000),
FRAM_ID("cyp cy15v108qn", 0x03, 0, 0x02, 0x06052ec2, 0x100000),
FRAM_ID("cyp cy15v108qn", 0x03, 0, 0x02, 0x06072ec2, 0x100000),
FRAM_ID("cyp cy15v108qn", 0x03, 0, 0x02, 0x06a52ec2, 0x100000),

FLASH_ID(NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0)
};
2 changes: 1 addition & 1 deletion src/flash/nor/stm32l4x.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ static const struct stm32l4_rev stm32l4p_l4qxx_revs[] = {
};

static const struct stm32l4_rev stm32l55_l56xx_revs[] = {
{ 0x1000, "A" }, { 0x2000, "B" },
{ 0x1000, "A" }, { 0x2000, "B" }, { 0x2001, "Z" },
};

static const struct stm32l4_rev stm32g49_g4axx_revs[] = {
Expand Down
5 changes: 4 additions & 1 deletion src/helper/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ noinst_LTLIBRARIES += %D%/libhelper.la
%D%/util.c \
%D%/jep106.c \
%D%/jim-nvp.c \
%D%/nvp.c \
%D%/align.h \
%D%/binarybuffer.h \
%D%/bits.h \
Expand All @@ -34,7 +35,9 @@ noinst_LTLIBRARIES += %D%/libhelper.la
%D%/jep106.inc \
%D%/jim-nvp.h \
%D%/base64.c \
%D%/base64.h
%D%/base64.h \
%D%/nvp.h \
%D%/compiler.h

STARTUP_TCL_SRCS += %D%/startup.tcl
EXTRA_DIST += \
Expand Down
15 changes: 10 additions & 5 deletions src/helper/command.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
#include "config.h"
#endif

/* see Embedded-HOWTO.txt in Jim Tcl project hosted on BerliOS*/
#define JIM_EMBEDDED

/* @todo the inclusion of target.h here is a layering violation */
#include <jtag/jtag.h>
#include <target/target.h>
Expand Down Expand Up @@ -543,8 +540,16 @@ static int run_command(struct command_context *context,
if (retval != ERROR_OK)
LOG_DEBUG("Command '%s' failed with error code %d",
words[0], retval);
/* Use the command output as the Tcl result */
Jim_SetResult(context->interp, cmd.output);
/*
* Use the command output as the Tcl result.
* Drop last '\n' to allow command output concatenation
* while keep using command_print() everywhere.
*/
const char *output_txt = Jim_String(cmd.output);
int len = strlen(output_txt);
if (len && output_txt[len - 1] == '\n')
--len;
Jim_SetResultString(context->interp, output_txt, len);
}
Jim_DecrRefCount(context->interp, cmd.output);

Expand Down
Loading
Loading