Open schnommus opened 7 years ago
Another note: If you are using the JLINK adapter that is shipped by PINE64, the JLINK debugger setting in the arduino IDE won't work, because it will set the adapter to JTAG mode instead of SWD mode, which is what you need.
This can be easily fixed by adding another line at the end of the existing openocd jlink.cfg config with `transport select swd'. A better solution would be to add an option to board.txt (i.e selectable IDE options) for JLINK (JTAG) and JLINK (SWD) and just have 2 different scripts - which is what I did on my machine.
Installing this package fails with the most recent ameba-arduino package (2.0.2), due to dependency issues. Also, there aren't host identifiers listed for linux hosts.
The following patch fixes the issues: ameba_hosts_patch.txt
(everything below here is just bonus information for others)
For anyone else who is trying to get this to work on Linux (Arch in my case), and bleeding edge OpenOCD and GCC7; you will also have to
Build your own version of OpenOCD, but change the configuration file
configure.ac
. The main problem is that thefile
command used by rebane's OpenOCD flasher is not compiled into newer versions of OpenOCD. Fixes:AX_CONFIG_SUBDIR_OPTION([jimtcl], [--disable-install-jim --with-ext="eventloop array clock regexp stdlib tclcompat" --without-ext="default"])
AX_CONFIG_SUBDIR_OPTION([jimtcl], [--disable-install-jim]) ], [ AC_MSG_ERROR([jimtcl not found, run git submodule init and git submodule update.]) ]) @@ -759,7 +759,7 @@ AS_IF([test "x${has_environ}" != "xyes" ], [ AC_DEFINE([_GNU_SOURCE],[1],[Use GNU C library extensions (e.g. stdndup).])
set default gcc warnings
-GCC_WARNINGS="-Wall -Wstrict-prototypes -Wformat-security -Wshadow" +GCC_WARNINGS="-Wall -Wstrict-prototypes -Wformat-security -Wshadow -Wno-implicit-fallthrough -Wno-format-truncation -Wno-format-overflow" AS_IF([test "x${gcc_wextra}" = "xyes"], [ GCC_WARNINGS="${GCC_WARNINGS} -Wextra -Wno-unused-parameter" GCC_WARNINGS="${GCC_WARNINGS} -Wbad-function-cast"
Make sure your openocd install directory is symlinked to where the package expects openocd to be.
Add udev rules for whatever jtag device you are using so that openocd has permissions to use it through the arduino IDE