Building and OpenOCD Issues on Tiva C TM4C123G

ChibiOS public support forum for topics related to the Texas Instruments Tiva family of micro-controllers.

Moderator: Marco

chansore
Posts: 3
Joined: Sun Sep 30, 2018 9:16 pm

Building and OpenOCD Issues on Tiva C TM4C123G

Postby chansore » Sun Sep 30, 2018 9:34 pm

Hello,

I've been trying to run the TM4C123G demo on the 18.2.1 release of ChibiOS, and I've been having trouble with the following lines on the Makefile:

RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC
include $(RULESPATH)/rules.mk

With the error and warning:
- Description Resource Path Location Type
make: *** No rule to make target '../../../../ChibiOS-RT/os/common/startup/ARMCMx/compilers/GCC/rules.mk'. Stop. RT-TM4C123G-LAUNCHPAD C/C++ Problem


- Description Resource Path Location Type
make: ../../../../ChibiOS-RT/os/common/startup/ARMCMx/compilers/GCC/rules.mk: No such file or directory Makefile /RT-TM4C123G-LAUNCHPAD line 215 C/C++ Problem


I haven't tinkered with the file, and the rules.mk is in that directory so I don't understand how it won't run.

Also, I'm getting this error when I try to run the file to check and see if the program sees my microcontroller with OpenOCD with ICDI:

embedded:startup.tcl:60: Error: Can't find interface/ti-icdi.cfg
in procedure 'script'
at file "embedded:startup.tcl", line 60


Again, I checked to see if the ti-icdi.cfg file is in the /interface/ directory and it's there. I also made sure that I had the correct drivers installed for the TM4C123G. As a last note, I followed the guide on utilizing the Tiva C in ChibiOS. Even though the guide is somewhat dated, the information should still be relevant.

The OS that I'm using is Windows 10, and I'm currently running on ChibiOS182. Any help would be appreciated.

User avatar
Giovanni
Site Admin
Posts: 11376
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 429 times
Been thanked: 361 times
Contact:

Re: Building and OpenOCD Issues on Tiva C TM4C123G

Postby Giovanni » Mon Oct 01, 2018 5:31 am

Is the relative path in $(CHIBIOS) correct? the starting point is the directory containing Makefile.

Giovanni

Marco
Posts: 128
Joined: Tue Apr 16, 2013 8:22 pm
Has thanked: 4 times
Been thanked: 11 times

Re: Building and OpenOCD Issues on Tiva C TM4C123G

Postby Marco » Mon Oct 01, 2018 12:25 pm

Hi,

Are you using the repositories from GitHub or svn?

The GitHub ones should work out of the box. If you use svn the $(CHIBIOS) and $(CHIBIOS_CONTRIB) paths should be modified to match the correct paths as Giovanni mentioned.

Marco.

chansore
Posts: 3
Joined: Sun Sep 30, 2018 9:16 pm

Re: Building and OpenOCD Issues on Tiva C TM4C123G

Postby chansore » Mon Oct 01, 2018 4:56 pm

Giovanni wrote:Is the relative path in $(CHIBIOS) correct? the starting point is the directory containing Makefile.


Giovanni


The paths for $(CHIBIOS) and $(CHIBIOS_CONTRIB) are respectively:
CHIBIOS = ../../../../ChibiOS-RT
CHIBIOS_CONTRIB = $(CHIBIOS)/../ChibiOS-Contrib


I don't see a ChibiOS-RT folder, and I'm using the most recent version of ChibiStudio that I downloaded off of SourceForge. Should I redirect CHIBIOS to chibios182?
Marco wrote:Hi,

Are you using the repositories from GitHub or svn?

The GitHub ones should work out of the box. If you use svn the $(CHIBIOS) and $(CHIBIOS_CONTRIB) paths should be modified to match the correct paths as Giovanni mentioned.

Marco.


I downloaded ChibiStudio_Preview20.7z from SourceForge and have been using that.

User avatar
Giovanni
Site Admin
Posts: 11376
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 429 times
Been thanked: 361 times
Contact:

Re: Building and OpenOCD Issues on Tiva C TM4C123G

Postby Giovanni » Mon Oct 01, 2018 5:49 pm

Correct, you need to redirect to the version you want to use, 182 is the latest stable.

Giovanni

chansore
Posts: 3
Joined: Sun Sep 30, 2018 9:16 pm

Re: Building and OpenOCD Issues on Tiva C TM4C123G

Postby chansore » Tue Oct 02, 2018 5:18 am

So I've redirected the $(CHIBIOS) and $(CHIBIOS_CONTRIB) that were already in the Makerfile for the TM4C123G paths to:

CHIBIOS = C:/ChibiStudio/chibios182
CHIBIOS_CONTRIB = $(CHIBIOS)


With changes to the following code after moving some files around:

# Licensing files.
include $(CHIBIOS)/os/license/license.mk
# Startup files.
include $(CHIBIOS_CONTRIB)/os/common/startup/ARMCMx/compilers/GCC/mk/startup_tm4c123x.mk
# HAL-OSAL files (optional).
include $(CHIBIOS)/os/hal/hal.mk
include $(CHIBIOS_CONTRIB)/os/hal/ports/TIVA/TM4C123x/platform.mk
include $(CHIBIOS_CONTRIB)/os/hal/boards/TI_TM4C123G_LAUNCHPAD/board.mk
include $(CHIBIOS)/os/hal/osal/rt/osal.mk
# RTOS files (optional).
include $(CHIBIOS)/os/rt/rt.mk
include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
# Other files (optional).
include $(CHIBIOS)/test/lib/test.mk
include $(CHIBIOS)/test/rt/rt_test.mk
include $(CHIBIOS)/test/oslib/oslib_test.mk


However, I'm still getting this error after I clean and build the code:

Makefile:215: ../../../../ChibiOS-RT/os/common/startup/ARMCMx/compilers/GCC/rules.mk: No such file or directory
make: *** No rule to make target '../../../../ChibiOS-RT/os/common/startup/ARMCMx/compilers/GCC/rules.mk'. Stop.


I don't understand why it isn't registering the fact that I had altered the path.

Marco
Posts: 128
Joined: Tue Apr 16, 2013 8:22 pm
Has thanked: 4 times
Been thanked: 11 times

Re: Building and OpenOCD Issues on Tiva C TM4C123G

Postby Marco » Tue Oct 02, 2018 8:14 pm

Hi chansore,

I also downloaded the ChibiStudio_Preview20.7z archive and extracted it.
The values for CHIBIOS and CHIBIOS_CONTRIB should be as follows when using svn or an archive. This is because by default the community repository expects it is placed next to the ChibiOS repository.

Code: Select all

# Imported source files and paths
CHIBIOS = ../../../../../chibios182
CHIBIOS_CONTRIB = $(CHIBIOS)/community


Let me know if it works for you now.

Marco


Return to “Tiva Support”

Who is online

Users browsing this forum: No registered users and 1 guest