I am working on a C project for the university where a CoAP server is to be hosted on a TM4C129EXL. It is particularly important to choose a FreeRTOS operating system. Unfortunately, I had to learn that Texas Instruments has stopped supporting FreeRTOS. There are no options for me to switch to another operating system. It is for this reason that I turn to you.
I'm looking for a sample program in which Free RTOS is executed on a TM4C129EXL board. In the best case, I would be happy about a Code Composer Studio Project, as this is the IDE we work with from the university.
If you do not have any sample code available, I would be happy to receive any other information regarding FreeRTOS and CoAP of course with reference to the TM4C129EXL.
You did not specify if you had any requirements in terms of
FreeRTOS
version, but you can either:SW-EK-TM4C1294XL-2.1.4.178.exe
available on TI WEB site as is - you will find it in directoryexamples\boards\ek-tm4c1294xl-boostxl-senshub\senshub_iot
The procedure hereafter describes step by step how to create a minimalist FreeRTOS program with Code Composer Studio 10.3.0 and FreeRTOS v202104.00 in a Windows 10 environment using the second approach. You may have to adjust the drive letter to you specific setup, I am using
D
: for the purpose of this example..Download Code Composer Studio 10.3.0, FreeRTOS v202104.00 and SW-EK-TM4C1294XL-2.1.4.178.exe.
Install Code Composer Studio with support for the
Tiva-C
MCU familly. When prompted for a workspace name, specifyD:\ti\workspace_v10
.Unzip
FreeRTOSv202104.00.zip
intoD:\
.Unzip
SW-EK-TM4C1294XL-2.1.4.178.exe
intoD:\SW-EK-TM4C1294XL-2.1.4.178
.Launch CCS
Use the menu item
File/New/CCS Project
, and create an 'Empty Project (with main.c).[
]
Finish
button.D:\ti\workspace_v10\TM4C129EXL-FreeRTOS\driverlib
D:\ti\workspace_v10\TM4C129EXL-FreeRTOS\inc
D:\ti\workspace_v10\TM4C129EXL-FreeRTOS\FreeRTOS-Kernel
D:\ti\workspace_v10\TM4C129EXL-FreeRTOS\FreeRTOS-Kernel\include
D:\ti\workspace_v10\TM4C129EXL-FreeRTOS\FreeRTOS-Kernel\portable\GCC
D:\ti\workspace_v10\TM4C129EXL-FreeRTOS\FreeRTOS-Kernel\portable\GCC\ARM_CM4F
D:\ti\workspace_v10\TM4C129EXL-FreeRTOS\FreeRTOS-Kernel\portable\MemMang
D:\SW-EK-TM4C1294XL-2.1.4.178\examples\boards\ek-tm4c1294xl-boostxl-senshub\senshub_iot\FreeRTOSConfig.h
intoD:\ti\workspace_v10\TM4C129EXL-FreeRTOS
.h
files fromD:\SW-EK-TM4C1294XL-2.1.4.178\driverlib
intoD:\ti\workspace_v10\TM4C129EXL-FreeRTOS\driverlib
.D:\SW-EK-TM4C1294XL-2.1.4.178\driverlib\gcc\libdriver.a
intoD:\ti\workspace_v10\TM4C129EXL-FreeRTOS\driverlib
..h
files fromD:\SW-EK-TM4C1294XL-2.1.4.178\inc
intoD:\ti\workspace_v10\TM4C129EXL-FreeRTOS\inc
.D:\FreeRTOSv202104.00\FreeRTOS\Source\include
intoD:\ti\workspace_v10\TM4C129EXL-FreeRTOS\FreeRTOS-Kernel\include
..c
files present inD:\FreeRTOSv202104.00\FreeRTOS\Source
intoD:\ti\workspace_v10\TM4C129EXL-FreeRTOS\FreeRTOS-Kernel
.D:\FreeRTOSv202104.00\FreeRTOS\Source\portable\GCC\ARM_CM4F
intoD:\ti\workspace_v10\TM4C129EXL-FreeRTOS\FreeRTOS-Kernel\portable\GCC\ARM_CM4F
D:\FreeRTOSv202104.00\FreeRTOS\Source\portable\MemMang\heap_4.c
intoD:\ti\workspace_v10\TM4C129EXL-FreeRTOS\FreeRTOS-Kernel\portable\MemMang
.D:\ti\workspace_v10\TM4C129EXL-FreeRTOS\main.c
, and replace its content by:D:\ti\workspace_v10\TM4C129EXL-FreeRTOS\blinky.c
with the following content:tm4c1294ncpdt_startup_ccs_gcc.c
: add the following lines after the line containingstatic void IntDefaultHandler(void);
The resulting code should look like:
tm4c1294ncpdt_startup_ccs_gcc.c
: replace the default interrupt handler by the FreeRTOS one in arrayg_pfnVectors[]
.Original code:
Resulting code:
${workspace_loc:/${ProjName}/FreeRTOS-Kernel/include}
${workspace_loc:/${ProjName}/FreeRTOS-Kernel/portable/GCC/ARM_CM4F}
${workspace_loc:/${ProjName}
${workspace_loc:/${ProjName}/driverlib}
and click on the
Apply and close
button.D:\ti\workspace_v10\TM4C129EXL-FreeRTOS\FreeRTOSConfig.h
and delete the following lines:-mfloat-abi=hard
option after${flags}
in the Command-line pattern:${command} ${flags} -mfloat-abi=hard ${output_flag}${output} ${inputs}
-mfloat-abi=hard
option after${flags}
:>br/>${command} ${flags} -mfloat-abi=hard ${output_flag}${output} ${inputs}
libdriver.a
to the-l
option, and${workspace_loc:/${ProjName}/driverlib}
to the-L
option, then click on theApply and close
button.In my case, I had to stop the project and to press the board
reset
button in order to the program to start.Finally, the LED should start blinking every 200ms.
The complete list of files in the project once the project 'cleaned' should ultimately be: