platformio / platform-titiva

TI TIVA: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/titiva
Apache License 2.0
10 stars 10 forks source link

Upload error using EK-TM4C123GXL evaluation board #12

Open MartinPetrei opened 3 years ago

MartinPetrei commented 3 years ago

I have been trying the Blink LED example (libopencm3). I have modified the platformio.ini in order to have only the lptm4c1230c3pmenv, i.e. this file only has

[env:lptm4c1230c3pm]
platform = titiva
framework = libopencm3
board = lptm4c1230c3pm

The project builds OK. When upload is executed, I get this output in terminal:

> Executing task in folder libopencm3-blink: platformio run --target upload --target monitor --environment lptm4c1230c3pm <

Processing lptm4c1230c3pm (platform: titiva; framework: libopencm3; board: lptm4c1230c3pm)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/titiva/lptm4c1230c3pm.html
PLATFORM: TI TIVA (3.0.0) > TI LaunchPad (Tiva C) w/ tm4c123 (80MHz)
HARDWARE: LPTM4C1230C3PM 80MHz, 32KB RAM, 256KB Flash
DEBUG: Current (ti-icdi) On-board (ti-icdi)
PACKAGES: 
 - framework-libopencm3 1.10000.200730 (1.0.0) 
 - tool-openocd 2.1000.200630 (10.0) 
 - toolchain-gccarmnoneeabi 1.40804.0 (4.8.4)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 0 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Checking size .pio/build/lptm4c1230c3pm/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [          ]   0.0% (used 12 bytes from 32768 bytes)
Flash: [          ]   0.9% (used 2340 bytes from 262144 bytes)
Configuring upload protocol...
Uploading .pio/build/lptm4c1230c3pm/firmware.bin
xPack OpenOCD, x86_64 Open On-Chip Debugger 0.10.0+dev-00378-ge5be992df (2020-06-26-09:27)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
debug_level: 1

Error: SRST error
Error: SRST error
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x000006d8 msp: 0x20008000
** Programming Started **
** Programming Finished **
** Verify Started **
** Verified OK **
** Resetting Target **
Error: SRST error
Error: memory read failed: 0x7
Error: memory write failed: 0x7
in procedure 'program'
*** [upload] Error 1
================================================================================= [FAILED] Took 1.31 seconds =================================================================================
The terminal process "platformio 'run', '--target', 'upload', '--target', 'monitor', '--environment', 'lptm4c1230c3pm'" terminated with exit code: 1.

Terminal will be reused by tasks, press any key to close it.

I don't known what the errors messages mean. The TM4C is flashed OK and the example program runs successfully (LED blinks on three colors).

Have I missed something? There is a workaround for this? Please let me know if you need something else. Thanks.

Jabbajoe commented 3 years ago

The same problem here!

That's my platformio.ini

[env:lptm4c1230c3pm]
platform = titiva
board = lptm4c1230c3pm
framework = libopencm3
debug_tool = ti-icdi
upload_protocol = ti-icdi

And here is the log after compiling and upload

> Executing task in folder Tiva_LoRaClient: platformio run --target upload <

Processing lptm4c1230c3pm (platform: titiva; board: lptm4c1230c3pm; framework: libopencm3)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
CONFIGURATION: https://docs.platformio.org/page/boards/titiva/lptm4c1230c3pm.html
PLATFORM: TI TIVA (3.0.0) > TI LaunchPad (Tiva C) w/ tm4c123 (80MHz)
HARDWARE: LPTM4C1230C3PM 80MHz, 32KB RAM, 256KB Flash
DEBUG: Current (ti-icdi) On-board (ti-icdi)
PACKAGES: 
 - framework-libopencm3 1.10000.200730 (1.0.0) 
 - tool-openocd 2.1000.200630 (10.0) 
 - toolchain-gccarmnoneeabi 1.40804.0 (4.8.4)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 0 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
arm-none-eabi-g++ -o .pio/build/lptm4c1230c3pm/src/main.o -c -fno-rtti -fno-exceptions -fno-threadsafe-statics -std=gnu++11 -fno-rtti -fno-exceptions -Os -ffunction-sections -fdata-sections -Wall -mthumb -nostdlib -mcpu=cortex-m4 -Os -ffunction-sections -fdata-sections -Wall -Wextra -Wimplicit-function-declaration -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes -Wshadow -fno-common -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DF_CPU=80000000L -DPLATFORMIO=50101 -DENERGIA_ARCH_TIVAC -DENERGIA_EK_TM4C123GXL -DLM4F -DF_CPU=80000000L -Iinclude -Isrc -I/home/pedro/.platformio/packages/framework-libopencm3 -I/home/pedro/.platformio/packages/framework-libopencm3/include src/main.cpp
cc1plus: warning: command line option '-Wimplicit-function-declaration' is valid for C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option '-Wmissing-prototypes' is valid for C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++ [enabled by default]
arm-none-eabi-gcc -P -E /home/pedro/.platformio/packages/framework-libopencm3/ld/linker.ld.S -o .pio/build/lptm4c1230c3pm/generated.lm4f.ld -DLM4F -D_ROM_OFF=0x00000000 -D_RAM_OFF=0x20000000 -D_ROM=262144 -D_RAM=32768 -mthumb -mcpu=cortex-m4 -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16
arm-none-eabi-gcc -o .pio/build/lptm4c1230c3pm/FrameworkLibOpenCM3/lib/cm3/assert.o -c -std=gnu11 -Os -ffunction-sections -fdata-sections -Wall -mthumb -nostdlib -mcpu=cortex-m4 -Os -ffunction-sections -fdata-sections -Wall -Wextra -Wimplicit-function-declaration -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes -Wshadow -fno-common -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DF_CPU=80000000L -DPLATFORMIO=50101 -DENERGIA_ARCH_TIVAC -DENERGIA_EK_TM4C123GXL -DLM4F -DF_CPU=80000000L -I/home/pedro/.platformio/packages/framework-libopencm3 -I/home/pedro/.platformio/packages/framework-libopencm3/include /home/pedro/.platformio/packages/framework-libopencm3/lib/cm3/assert.c
arm-none-eabi-gcc -o .pio/build/lptm4c1230c3pm/FrameworkLibOpenCM3/lib/lm4f/gpio.o -c -std=gnu11 -Os -ffunction-sections -fdata-sections -Wall -mthumb -nostdlib -mcpu=cortex-m4 -Os -ffunction-sections -fdata-sections -Wall -Wextra -Wimplicit-function-declaration -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes -Wshadow -fno-common -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DF_CPU=80000000L -DPLATFORMIO=50101 -DENERGIA_ARCH_TIVAC -DENERGIA_EK_TM4C123GXL -DLM4F -DF_CPU=80000000L -I/home/pedro/.platformio/packages/framework-libopencm3 -I/home/pedro/.platformio/packages/framework-libopencm3/include /home/pedro/.platformio/packages/framework-libopencm3/lib/lm4f/gpio.c
arm-none-eabi-gcc -o .pio/build/lptm4c1230c3pm/FrameworkLibOpenCM3/lib/lm4f/rcc.o -c -std=gnu11 -Os -ffunction-sections -fdata-sections -Wall -mthumb -nostdlib -mcpu=cortex-m4 -Os -ffunction-sections -fdata-sections -Wall -Wextra -Wimplicit-function-declaration -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes -Wshadow -fno-common -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DF_CPU=80000000L -DPLATFORMIO=50101 -DENERGIA_ARCH_TIVAC -DENERGIA_EK_TM4C123GXL -DLM4F -DF_CPU=80000000L -I/home/pedro/.platformio/packages/framework-libopencm3 -I/home/pedro/.platformio/packages/framework-libopencm3/include /home/pedro/.platformio/packages/framework-libopencm3/lib/lm4f/rcc.c
arm-none-eabi-gcc -o .pio/build/lptm4c1230c3pm/FrameworkLibOpenCM3/lib/lm4f/systemcontrol.o -c -std=gnu11 -Os -ffunction-sections -fdata-sections -Wall -mthumb -nostdlib -mcpu=cortex-m4 -Os -ffunction-sections -fdata-sections -Wall -Wextra -Wimplicit-function-declaration -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes -Wshadow -fno-common -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DF_CPU=80000000L -DPLATFORMIO=50101 -DENERGIA_ARCH_TIVAC -DENERGIA_EK_TM4C123GXL -DLM4F -DF_CPU=80000000L -I/home/pedro/.platformio/packages/framework-libopencm3 -I/home/pedro/.platformio/packages/framework-libopencm3/include /home/pedro/.platformio/packages/framework-libopencm3/lib/lm4f/systemcontrol.c
arm-none-eabi-gcc -o .pio/build/lptm4c1230c3pm/FrameworkLibOpenCM3/lib/lm4f/uart.o -c -std=gnu11 -Os -ffunction-sections -fdata-sections -Wall -mthumb -nostdlib -mcpu=cortex-m4 -Os -ffunction-sections -fdata-sections -Wall -Wextra -Wimplicit-function-declaration -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes -Wshadow -fno-common -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DF_CPU=80000000L -DPLATFORMIO=50101 -DENERGIA_ARCH_TIVAC -DENERGIA_EK_TM4C123GXL -DLM4F -DF_CPU=80000000L -I/home/pedro/.platformio/packages/framework-libopencm3 -I/home/pedro/.platformio/packages/framework-libopencm3/include /home/pedro/.platformio/packages/framework-libopencm3/lib/lm4f/uart.c
arm-none-eabi-gcc -o .pio/build/lptm4c1230c3pm/FrameworkLibOpenCM3/lib/cm3/vector.o -c -std=gnu11 -Os -ffunction-sections -fdata-sections -Wall -mthumb -nostdlib -mcpu=cortex-m4 -Os -ffunction-sections -fdata-sections -Wall -Wextra -Wimplicit-function-declaration -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes -Wshadow -fno-common -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DF_CPU=80000000L -DPLATFORMIO=50101 -DENERGIA_ARCH_TIVAC -DENERGIA_EK_TM4C123GXL -DLM4F -DF_CPU=80000000L -I/home/pedro/.platformio/packages/framework-libopencm3 -I/home/pedro/.platformio/packages/framework-libopencm3/include /home/pedro/.platformio/packages/framework-libopencm3/lib/cm3/vector.c
arm-none-eabi-gcc -o .pio/build/lptm4c1230c3pm/FrameworkLibOpenCM3/lib/usb/usb.o -c -std=gnu11 -Os -ffunction-sections -fdata-sections -Wall -mthumb -nostdlib -mcpu=cortex-m4 -Os -ffunction-sections -fdata-sections -Wall -Wextra -Wimplicit-function-declaration -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes -Wshadow -fno-common -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DF_CPU=80000000L -DPLATFORMIO=50101 -DENERGIA_ARCH_TIVAC -DENERGIA_EK_TM4C123GXL -DLM4F -DF_CPU=80000000L -I/home/pedro/.platformio/packages/framework-libopencm3 -I/home/pedro/.platformio/packages/framework-libopencm3/include /home/pedro/.platformio/packages/framework-libopencm3/lib/usb/usb.c
arm-none-eabi-gcc -o .pio/build/lptm4c1230c3pm/FrameworkLibOpenCM3/lib/usb/usb_control.o -c -std=gnu11 -Os -ffunction-sections -fdata-sections -Wall -mthumb -nostdlib -mcpu=cortex-m4 -Os -ffunction-sections -fdata-sections -Wall -Wextra -Wimplicit-function-declaration -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes -Wshadow -fno-common -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DF_CPU=80000000L -DPLATFORMIO=50101 -DENERGIA_ARCH_TIVAC -DENERGIA_EK_TM4C123GXL -DLM4F -DF_CPU=80000000L -I/home/pedro/.platformio/packages/framework-libopencm3 -I/home/pedro/.platformio/packages/framework-libopencm3/include /home/pedro/.platformio/packages/framework-libopencm3/lib/usb/usb_control.c
arm-none-eabi-gcc -o .pio/build/lptm4c1230c3pm/FrameworkLibOpenCM3/lib/usb/usb_standard.o -c -std=gnu11 -Os -ffunction-sections -fdata-sections -Wall -mthumb -nostdlib -mcpu=cortex-m4 -Os -ffunction-sections -fdata-sections -Wall -Wextra -Wimplicit-function-declaration -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes -Wshadow -fno-common -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DF_CPU=80000000L -DPLATFORMIO=50101 -DENERGIA_ARCH_TIVAC -DENERGIA_EK_TM4C123GXL -DLM4F -DF_CPU=80000000L -I/home/pedro/.platformio/packages/framework-libopencm3 -I/home/pedro/.platformio/packages/framework-libopencm3/include /home/pedro/.platformio/packages/framework-libopencm3/lib/usb/usb_standard.c
arm-none-eabi-gcc -o .pio/build/lptm4c1230c3pm/FrameworkLibOpenCM3/lib/usb/usb_msc.o -c -std=gnu11 -Os -ffunction-sections -fdata-sections -Wall -mthumb -nostdlib -mcpu=cortex-m4 -Os -ffunction-sections -fdata-sections -Wall -Wextra -Wimplicit-function-declaration -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes -Wshadow -fno-common -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DF_CPU=80000000L -DPLATFORMIO=50101 -DENERGIA_ARCH_TIVAC -DENERGIA_EK_TM4C123GXL -DLM4F -DF_CPU=80000000L -I/home/pedro/.platformio/packages/framework-libopencm3 -I/home/pedro/.platformio/packages/framework-libopencm3/include /home/pedro/.platformio/packages/framework-libopencm3/lib/usb/usb_msc.c
arm-none-eabi-gcc -o .pio/build/lptm4c1230c3pm/FrameworkLibOpenCM3/lib/usb/usb_hid.o -c -std=gnu11 -Os -ffunction-sections -fdata-sections -Wall -mthumb -nostdlib -mcpu=cortex-m4 -Os -ffunction-sections -fdata-sections -Wall -Wextra -Wimplicit-function-declaration -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes -Wshadow -fno-common -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DF_CPU=80000000L -DPLATFORMIO=50101 -DENERGIA_ARCH_TIVAC -DENERGIA_EK_TM4C123GXL -DLM4F -DF_CPU=80000000L -I/home/pedro/.platformio/packages/framework-libopencm3 -I/home/pedro/.platformio/packages/framework-libopencm3/include /home/pedro/.platformio/packages/framework-libopencm3/lib/usb/usb_hid.c
arm-none-eabi-gcc -o .pio/build/lptm4c1230c3pm/FrameworkLibOpenCM3/lib/usb/usb_lm4f.o -c -std=gnu11 -Os -ffunction-sections -fdata-sections -Wall -mthumb -nostdlib -mcpu=cortex-m4 -Os -ffunction-sections -fdata-sections -Wall -Wextra -Wimplicit-function-declaration -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes -Wshadow -fno-common -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DF_CPU=80000000L -DPLATFORMIO=50101 -DENERGIA_ARCH_TIVAC -DENERGIA_EK_TM4C123GXL -DLM4F -DF_CPU=80000000L -I/home/pedro/.platformio/packages/framework-libopencm3 -I/home/pedro/.platformio/packages/framework-libopencm3/include /home/pedro/.platformio/packages/framework-libopencm3/lib/usb/usb_lm4f.c
arm-none-eabi-gcc -o .pio/build/lptm4c1230c3pm/FrameworkLibOpenCM3/lib/cm3/systick.o -c -std=gnu11 -Os -ffunction-sections -fdata-sections -Wall -mthumb -nostdlib -mcpu=cortex-m4 -Os -ffunction-sections -fdata-sections -Wall -Wextra -Wimplicit-function-declaration -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes -Wshadow -fno-common -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DF_CPU=80000000L -DPLATFORMIO=50101 -DENERGIA_ARCH_TIVAC -DENERGIA_EK_TM4C123GXL -DLM4F -DF_CPU=80000000L -I/home/pedro/.platformio/packages/framework-libopencm3 -I/home/pedro/.platformio/packages/framework-libopencm3/include /home/pedro/.platformio/packages/framework-libopencm3/lib/cm3/systick.c
arm-none-eabi-gcc -o .pio/build/lptm4c1230c3pm/FrameworkLibOpenCM3/lib/cm3/scb.o -c -std=gnu11 -Os -ffunction-sections -fdata-sections -Wall -mthumb -nostdlib -mcpu=cortex-m4 -Os -ffunction-sections -fdata-sections -Wall -Wextra -Wimplicit-function-declaration -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes -Wshadow -fno-common -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DF_CPU=80000000L -DPLATFORMIO=50101 -DENERGIA_ARCH_TIVAC -DENERGIA_EK_TM4C123GXL -DLM4F -DF_CPU=80000000L -I/home/pedro/.platformio/packages/framework-libopencm3 -I/home/pedro/.platformio/packages/framework-libopencm3/include /home/pedro/.platformio/packages/framework-libopencm3/lib/cm3/scb.c
arm-none-eabi-gcc -o .pio/build/lptm4c1230c3pm/FrameworkLibOpenCM3/lib/cm3/nvic.o -c -std=gnu11 -Os -ffunction-sections -fdata-sections -Wall -mthumb -nostdlib -mcpu=cortex-m4 -Os -ffunction-sections -fdata-sections -Wall -Wextra -Wimplicit-function-declaration -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes -Wshadow -fno-common -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DF_CPU=80000000L -DPLATFORMIO=50101 -DENERGIA_ARCH_TIVAC -DENERGIA_EK_TM4C123GXL -DLM4F -DF_CPU=80000000L -I/home/pedro/.platformio/packages/framework-libopencm3 -I/home/pedro/.platformio/packages/framework-libopencm3/include /home/pedro/.platformio/packages/framework-libopencm3/lib/cm3/nvic.c
arm-none-eabi-gcc -o .pio/build/lptm4c1230c3pm/FrameworkLibOpenCM3/lib/cm3/sync.o -c -std=gnu11 -Os -ffunction-sections -fdata-sections -Wall -mthumb -nostdlib -mcpu=cortex-m4 -Os -ffunction-sections -fdata-sections -Wall -Wextra -Wimplicit-function-declaration -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes -Wshadow -fno-common -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DF_CPU=80000000L -DPLATFORMIO=50101 -DENERGIA_ARCH_TIVAC -DENERGIA_EK_TM4C123GXL -DLM4F -DF_CPU=80000000L -I/home/pedro/.platformio/packages/framework-libopencm3 -I/home/pedro/.platformio/packages/framework-libopencm3/include /home/pedro/.platformio/packages/framework-libopencm3/lib/cm3/sync.c
arm-none-eabi-gcc -o .pio/build/lptm4c1230c3pm/FrameworkLibOpenCM3/lib/cm3/dwt.o -c -std=gnu11 -Os -ffunction-sections -fdata-sections -Wall -mthumb -nostdlib -mcpu=cortex-m4 -Os -ffunction-sections -fdata-sections -Wall -Wextra -Wimplicit-function-declaration -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes -Wshadow -fno-common -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DF_CPU=80000000L -DPLATFORMIO=50101 -DENERGIA_ARCH_TIVAC -DENERGIA_EK_TM4C123GXL -DLM4F -DF_CPU=80000000L -I/home/pedro/.platformio/packages/framework-libopencm3 -I/home/pedro/.platformio/packages/framework-libopencm3/include /home/pedro/.platformio/packages/framework-libopencm3/lib/cm3/dwt.c
arm-none-eabi-ar rc .pio/build/lptm4c1230c3pm/libFrameworkLibOpenCM3.a .pio/build/lptm4c1230c3pm/FrameworkLibOpenCM3/lib/cm3/assert.o .pio/build/lptm4c1230c3pm/FrameworkLibOpenCM3/lib/lm4f/gpio.o .pio/build/lptm4c1230c3pm/FrameworkLibOpenCM3/lib/lm4f/rcc.o .pio/build/lptm4c1230c3pm/FrameworkLibOpenCM3/lib/lm4f/systemcontrol.o .pio/build/lptm4c1230c3pm/FrameworkLibOpenCM3/lib/lm4f/uart.o .pio/build/lptm4c1230c3pm/FrameworkLibOpenCM3/lib/cm3/vector.o .pio/build/lptm4c1230c3pm/FrameworkLibOpenCM3/lib/usb/usb.o .pio/build/lptm4c1230c3pm/FrameworkLibOpenCM3/lib/usb/usb_control.o .pio/build/lptm4c1230c3pm/FrameworkLibOpenCM3/lib/usb/usb_standard.o .pio/build/lptm4c1230c3pm/FrameworkLibOpenCM3/lib/usb/usb_msc.o .pio/build/lptm4c1230c3pm/FrameworkLibOpenCM3/lib/usb/usb_hid.o .pio/build/lptm4c1230c3pm/FrameworkLibOpenCM3/lib/usb/usb_lm4f.o .pio/build/lptm4c1230c3pm/FrameworkLibOpenCM3/lib/cm3/systick.o .pio/build/lptm4c1230c3pm/FrameworkLibOpenCM3/lib/cm3/scb.o .pio/build/lptm4c1230c3pm/FrameworkLibOpenCM3/lib/cm3/nvic.o .pio/build/lptm4c1230c3pm/FrameworkLibOpenCM3/lib/cm3/sync.o .pio/build/lptm4c1230c3pm/FrameworkLibOpenCM3/lib/cm3/dwt.o
arm-none-eabi-ranlib .pio/build/lptm4c1230c3pm/libFrameworkLibOpenCM3.a
arm-none-eabi-g++ -o .pio/build/lptm4c1230c3pm/firmware.elf -T /home/pedro/Documents/PlatformIO/Projects/Tiva_LoRaClient/.pio/build/lptm4c1230c3pm/generated.lm4f.ld -Os -mthumb -nostartfiles -nostdlib -mcpu=cortex-m4 -Os -Wl,--gc-sections -mthumb -mcpu=cortex-m4 -nostartfiles --static -mfloat-abi=hard -mfpu=fpv4-sp-d16 .pio/build/lptm4c1230c3pm/src/main.o -L/home/pedro/.platformio/platforms/titiva/ldscripts -L.pio/build/lptm4c1230c3pm -L/home/pedro/.platformio/packages/framework-libopencm3/lib -Wl,--start-group -lc -lgcc -lm -lc -lgcc -lm -lstdc++ -lnosys .pio/build/lptm4c1230c3pm/libFrameworkLibOpenCM3.a -Wl,--end-group
arm-none-eabi-objcopy -O binary .pio/build/lptm4c1230c3pm/firmware.elf .pio/build/lptm4c1230c3pm/firmware.bin
MethodWrapper(["checkprogsize"], [".pio/build/lptm4c1230c3pm/firmware.elf"])
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [          ]   0.0% (used 12 bytes from 32768 bytes)
Flash: [          ]   0.9% (used 2340 bytes from 262144 bytes)
.pio/build/lptm4c1230c3pm/firmware.elf  :
section           size        addr
.text             2336           0
.data                4   536870912
.bss                 8   536870916
.comment           112           0
.ARM.attributes     55           0
Total             2515
<lambda>(["upload"], [".pio/build/lptm4c1230c3pm/firmware.bin"])
AVAILABLE: ti-icdi
CURRENT: upload_protocol = ti-icdi
openocd -d2 -s /home/pedro/.platformio/packages/tool-openocd/scripts -f board/ti_ek-tm4c123gxl.cfg -c "program {.pio/build/lptm4c1230c3pm/firmware.bin}  verify reset; shutdown;"
xPack OpenOCD, x86_64 Open On-Chip Debugger 0.10.0+dev-00378-ge5be992df (2020-06-26-09:27)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
debug_level: 2

Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
Info : clock speed 21999 kHz
Info : ICDI Firmware version: 9270
Error: SRST error
Info : tm4c123gh6pm.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : starting gdb server for tm4c123gh6pm.cpu on 3333
Info : Listening on port 3333 for gdb connections
Error: SRST error
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x0000078c msp: 0x20008000
** Programming Started **
** Programming Finished **
** Verify Started **
** Verified OK **
** Resetting Target **
Error: SRST error
Error: memory read failed: 0x7
Error: memory write failed: 0x7
in procedure 'program'
*** [upload] Error 1
================================================================================== [FAILED] Took 1.90 seconds ==================================================================================
The terminal process "platformio 'run', '--target', 'upload'" terminated with exit code: 1.

Terminal will be reused by tasks, press any key to close it.

And below is the log from the debug console

Processing lptm4c1230c3pm (platform: titiva; board: lptm4c1230c3pm; framework: libopencm3)
--------------------------------------------------------------------------------
CONFIGURATION: https://docs.platformio.org/page/boards/titiva/lptm4c1230c3pm.html
PLATFORM: TI TIVA (3.0.0) > TI LaunchPad (Tiva C) w/ tm4c123 (80MHz)
HARDWARE: LPTM4C1230C3PM 80MHz, 32KB RAM, 256KB Flash
DEBUG: Current (ti-icdi) On-board (ti-icdi)
PACKAGES:
 - framework-libopencm3 1.10000.200730 (1.0.0)
 - toolchain-gccarmnoneeabi 1.40804.0 (4.8.4)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 0 compatible libraries
Scanning dependencies...
No dependencies
Building in debug mode
MethodWrapper(["checkprogsize"], [".pio/build/lptm4c1230c3pm/firmware.elf"])
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [          ]   0.0% (used 12 bytes from 32768 bytes)
Flash: [          ]   1.0% (used 2516 bytes from 262144 bytes)
.pio/build/lptm4c1230c3pm/firmware.elf  :
section            size        addr
.text              2512           0
.data                 4   536870912
.bss                  8   536870916
.debug_info        8817           0
.debug_abbrev      1856           0
.debug_loc         1989           0
.debug_aranges      544           0
.debug_ranges       544           0
.debug_line        3787           0
.debug_str         5198           0
.comment            112           0
.ARM.attributes      55           0
.debug_frame       1000           0
Total             26426
========================= [SUCCESS] Took 0.46 seconds =========================
Reading symbols from /home/pedro/Documents/PlatformIO/Projects/Tiva_LoRaClient/.pio/build/lptm4c1230c3pm/firmware.elf...
done.
PlatformIO Unified Debugger -> http://bit.ly/pio-debug
PlatformIO: debug_tool = ti-icdi
PlatformIO: Initializing remote target...
xPack OpenOCD, x86_64 Open On-Chip Debugger 0.10.0+dev-00378-ge5be992df (2020-06-26-09:27)
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
Info : tcl server disabled
Info : telnet server disabled
Info : clock speed 21848 kHz
Info : ICDI Firmware version: 9270
Error: SRST error
Info : tm4c123gh6pm.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : starting gdb server for tm4c123gh6pm.cpu on pipe
Info : accepting 'gdb' connection from pipe
target halted due to debug-request, current mode: Thread
xPSR: 0x81000000 pc: 0x00000272 msp: 0x20007fe8
delay () at src/main.cpp:136
136         __asm__("nop");
Error: SRST error
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x0000078c msp: 0x20008000
Loading section .text, size 0x9d0 lma 0x0
Loading section .data, size 0x4 lma 0x9d0
Error: SRST error
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x0000078c msp: 0x20008000
Start address 0x78c, load size 2516
Transfer rate: 3 KB/sec, 1258 bytes/write.
Error: SRST error
SRST error
Error: memory write failed: 0x7
memory write failed: 0x7
Error: memory write failed: 0x7
memory write failed: 0x7
Error: memory read failed: 0x7
Error: jtag status contains invalid mode value - communication failure
memory read failed: 0x7
TARGET: tm4c123gh6pm.cpu - Not halted
jtag status contains invalid mode value - communication failure
TARGET: tm4c123gh6pm.cpu - Not halted
Error: memory read failed: 0x7
Error: jtag status contains invalid mode value - communication failure
Polling target tm4c123gh6pm.cpu failed, trying to reexamine
memory read failed: 0x7
jtag status contains invalid mode value - communication failure
Polling target tm4c123gh6pm.cpu failed, trying to reexamine
Error: memory read failed: 0x7
Examination failed, GDB will be halted. Polling again in 100ms
memory read failed: 0x7
Examination failed, GDB will be halted. Polling again in 100ms
Error: memory read failed: 0x7
Error: memory read failed: 0x7
Error: memory read failed: 0x7
Error: memory read failed: 0x7
Temporary breakpoint 1 at 0x2f4: file src/main.cpp, line 140.
PlatformIO: Initialization completed
PlatformIO: Resume the execution to `debug_init_break = tbreak main`
PlatformIO: More configuration options -> http://bit.ly/pio-debug
Polling target tm4c123gh6pm.cpu failed, trying to reexamine
Info : tm4c123gh6pm.cpu: hardware has 6 breakpoints, 4 watchpoints
Note: automatically using hardware breakpoints for read-only addresses.
Warn : target not halted
Info : target tm4c123gh6pm.cpu was not halted when resume was requested
target not halted
target tm4c123gh6pm.cpu was not halted when resume was requested

The code is flashed to the tm4c board and seems to work flawlessly. In the debug console, I can see that it gets stuck in an infinite loop inside the delay function

#define FLASH_DELAY 800000
static void delay(void)
{
    int i;
    for (i = 0; i < FLASH_DELAY; i++)       /* Wait a bit. */
        __asm__("nop");
}

If I pause the debug and step over, I can see the program in infinite loop. The debug console shows the loop:

Info : halted: PC: 0x00000274
halted: PC: 0x00000274
Info : halted: PC: 0x00000276
halted: PC: 0x00000276
Info : halted: PC: 0x00000278
halted: PC: 0x00000278
Info : halted: PC: 0x00000272
halted: PC: 0x00000272
Info : halted: PC: 0x00000274
halted: PC: 0x00000274
Info : halted: PC: 0x00000276
halted: PC: 0x00000276
Info : halted: PC: 0x00000278
halted: PC: 0x00000278
Info : halted: PC: 0x00000272
halted: PC: 0x00000272
Info : halted: PC: 0x00000274
halted: PC: 0x00000274
Info : halted: PC: 0x00000276
halted: PC: 0x00000276
Info : halted: PC: 0x00000278
halted: PC: 0x00000278
Info : halted: PC: 0x00000272
halted: PC: 0x00000272

If I restart the debug, it seems to start working ok (but the SRST error is still there!) Here is my Terminal log after restart the debug

> Executing task in folder Tiva_LoRaClient: platformio debug <

Processing lptm4c1230c3pm (platform: titiva; board: lptm4c1230c3pm; framework: libopencm3)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
CONFIGURATION: https://docs.platformio.org/page/boards/titiva/lptm4c1230c3pm.html
PLATFORM: TI TIVA (3.0.0) > TI LaunchPad (Tiva C) w/ tm4c123 (80MHz)
HARDWARE: LPTM4C1230C3PM 80MHz, 32KB RAM, 256KB Flash
DEBUG: Current (ti-icdi) On-board (ti-icdi)
PACKAGES: 
 - framework-libopencm3 1.10000.200730 (1.0.0) 
 - toolchain-gccarmnoneeabi 1.40804.0 (4.8.4)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 0 compatible libraries
Scanning dependencies...
No dependencies
Building in debug mode
MethodWrapper(["checkprogsize"], [".pio/build/lptm4c1230c3pm/firmware.elf"])
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [          ]   0.0% (used 12 bytes from 32768 bytes)
Flash: [          ]   1.0% (used 2516 bytes from 262144 bytes)
.pio/build/lptm4c1230c3pm/firmware.elf  :
section            size        addr
.text              2512           0
.data                 4   536870912
.bss                  8   536870916
.debug_info        8817           0
.debug_abbrev      1856           0
.debug_loc         1989           0
.debug_aranges      544           0
.debug_ranges       544           0
.debug_line        3787           0
.debug_str         5198           0
.comment            112           0
.ARM.attributes      55           0
.debug_frame       1000           0
Total             26426
================================================================================= [SUCCESS] Took 0.49 seconds =================================================================================

Terminal will be reused by tasks, press any key to close it.

And here is my debug console after restart

Error: SRST error
SRST error
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x0000078c msp: 0x20008000
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x0000078c msp: 0x20008000
Temporary breakpoint 2 at 0x2f4: file src/main.cpp, line 140.

Temporary breakpoint 
1, main () at src/main.cpp:140
140 {
Jabbajoe commented 3 years ago

Looks like the problem is in the OpenOCD software used to flash and debug. If you use Energia IDE, it flashes using a software called DSLite, and it shows no warnings or errors. I don't know how to use DSLite, instead of OpenOCD in Platformio! (btw, using Energia IDE, there is no debug)

gagank1 commented 2 years ago

@Jabbajoe @MartinPetrei Did you ever find a solution for this? I'm running into the same issue, even with the latest version of OpenOCD (11.0)

MartinPetrei commented 2 years ago

@gagank1 not from my side, I haven't working with this platform in a while, but I'm going to resume the work in next days. Maybe I can take a look on this. If I found something, I'll keep this thread updated.

netweaver1970 commented 1 year ago

Same here with the latest PIO and the TM4C123G. All seems to work fine, apart from the spurious "Error: memory read failed: 0x7" and the way more frequent "SRST error"

Dangcaominh commented 5 months ago

I also got the same problem and I remebered that I hadn't installed the board's drivers. So I just downloaded it here https://www.ti.com/tool/download/SW-ICDI-DRIVERS and then everything now is going well for me.