Skip to content

Commit

Permalink
Tiva 129 updates around emulator (#556)
Browse files Browse the repository at this point in the history
- Fixes blink_raw application for Tiva 129 by removing the console from blink_raw.
- Adds console the same way to async_blink which is expected to have the higher complexity.
- Fixes flash commands to work with newer openocd releases
- Adds alternative flash commands that work with XDS110
- Fixes search path for openocd scripts to work with newer openocd releases.

===

* Adjust the openocd commandline to work with the 432E4 launchpad.

* removes console from blink_raw and moves it to async_blink.

There seems to be an issue with listen on a tiva 129 which
breaks the blink_raw application when the console is enabled.

* Update flashing command for 129.

* Fixes the search path for newer openocd releases.

* Adds some alternative openocd arguments.

* Adds comments.
  • Loading branch information
balazsracz authored Aug 2, 2021
1 parent d1c544d commit 8c4e7bf
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 18 deletions.
7 changes: 3 additions & 4 deletions applications/async_blink/main.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@
#include "utils/ESPWifiClient.hxx"
#endif

#if defined (BOARD_LAUNCHPAD_EK) || defined (__linux__)
#if (defined (TARGET_IS_CC3200) || defined (__linux__) || defined(PART_TM4C1294NCPDT)) && (!defined(NO_CONSOLE))
#define HAVE_CONSOLE
#include "console/Console.hxx"
#endif

Expand Down Expand Up @@ -206,9 +207,7 @@ openlcb::BitEventConsumer consumer(&logger);
*/
int appl_main(int argc, char* argv[])
{
#if defined (BOARD_LAUNCHPAD_EK)
//new Console(stack.executor(), Console::FD_STDIN, Console::FD_STDOUT);
#elif defined (__linux__)
#ifdef HAVE_CONSOLE
new Console(stack.executor(), Console::FD_STDIN, Console::FD_STDOUT, 2121);
#endif

Expand Down
12 changes: 0 additions & 12 deletions applications/blink_raw/main.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,6 @@

#include "os/os.h"
#include "utils/blinker.h"
#include "console/Console.hxx"

#if (defined (TARGET_IS_CC3200) || defined (__linux__) || defined(PART_TM4C1294NCPDT)) && (!defined(NO_CONSOLE))
#define HAVE_CONSOLE
#endif

#ifdef HAVE_CONSOLE
Executor<1> executor("executor", 0, 2048);
#endif

/** Entry point to application.
* @param argc number of command line arguments
Expand All @@ -59,9 +50,6 @@ Executor<1> executor("executor", 0, 2048);
int appl_main(int argc, char *argv[])
{
setblink(0);
#ifdef HAVE_CONSOLE
new Console(&executor, Console::FD_STDIN, Console::FD_STDOUT, 2121);
#endif
while (1)
{
resetblink(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,21 @@ export BOARD

OPENOCDARGS = -f board/ek-tm4c1294xl.cfg

# this works for XDS110 with SWD (2 wire)
#OPENOCDARGS = -c 'set TRANSPORT swd' -f interface/xds110.cfg -c 'transport select swd' -c 'set WORKAREASIZE 0x8000' -c 'set CHIPNAME tm4c1294ncpdt' -f target/stellaris.cfg

#OPENOCDARGS = -f interface/xds110.cfg -c 'set WORKAREASIZE 0x8000' -c 'set CHIPNAME tm4c1294ncpdt' -f target/stellaris.cfg

# this works for XDS110 with JTAG (4 wire)
#OPENOCDARGS = -f interface/xds110.cfg -c 'transport select jtag' -c 'set WORKAREASIZE 0x8000' -c 'set CHIPNAME tm4c1294ncpdt' -f target/stellaris.cfg

include $(OPENMRNPATH)/etc/prog.mk

ifeq ($(call find_missing_deps,OPENOCDSCRIPTSPATH OPENOCDPATH),)
flash: $(EXECUTABLE)$(EXTENTION) $(EXECUTABLE).lst
@if ps ax -o comm | grep -q openocd ; then echo openocd already running. quit existing first. ; exit 1 ; fi
cp $< last-flashed-$<
$(GDB) $< -ex "target remote | $(OPENOCDPATH)/openocd -c \"gdb_port pipe\" --search $(OPENOCDSCRIPTSPATH) $(OPENOCDARGS)" -ex "monitor reset halt" -ex "load" -ex "monitor reset init" -ex "monitor reset run" -ex "detach" -ex "quit"
$(GDB) $< -ex "target remote | $(OPENOCDPATH)/openocd -c \"gdb_port pipe\" --search $(OPENOCDSCRIPTSPATH) $(OPENOCDARGS)" -ex "monitor reset init" -ex "monitor reset run" -ex "load" -ex "monitor reset init" -ex "monitor reset run" -ex "detach" -ex "quit"

gdb:
@if ps ax -o comm | grep -q openocd ; then echo openocd already running. quit existing first. ; exit 1 ; fi
Expand Down
2 changes: 1 addition & 1 deletion etc/path.mk
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ SEARCHPATH := \
/usr/share/openocd/scripts \


TRYPATH:=$(call findfirst,target/stellaris_icdi.cfg,$(SEARCHPATH))
TRYPATH:=$(call findfirst,target/stm32f0x.cfg,$(SEARCHPATH))
ifneq ($(TRYPATH),)
OPENOCDSCRIPTSPATH:=$(TRYPATH)
endif
Expand Down

0 comments on commit 8c4e7bf

Please sign in to comment.