This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Tivaware vs TI-RTOS on TM4C129

Other Parts Discussed in Thread: SYSBIOS

Some functions are only available in Tivaware (eg EEPROM driver, can bus driver) and some are available on both (eg GPIO).  I'm trying to understand how these play together and how to configure my project correctly especially in terms of interrupts

For example, if I use the training example "Blink tm4c BIOS using Swi", and copy the code into an empty project, it compiles fine but I dont get an interrupt.  as soon as I configure the interrupt in the TI-RTOS HWI module, I get a long list of compiler warnings:

"C:/ti/tirtos_tivac_2_10_01_38/products/bios_6_41_00_26/packages/ti/sysbios/family/arm/m3/Hwi.h", line 1208: warning #48-D: incompatible redefinition of macro "Hwi_Instance" (declared at line 615 of "C:/ti/tirtos_tivac_2_10_01_38/products/bios_6_41_00_26/packages/ti/sysbios/hal/Hwi.h")

I have seen in my project that if I comment out the "#include <ti/sysbios/family/arm/m3/Hwi.h> ", I the system will crash.

What is the correct way to configure the system to use both TI-RTOS and Tivaware drivers?

  • Jack,

    TI-RTOS drivers are RTOS-safe drivers that utilize tivaware driverlib calls.

    I'm not sure if Tivaware provides their own bare-metal drivers but generally what they provide isn't ideal for a multi-task RTOS environment as a lot of time is used within while() loops polling on registers rather than allowing lower priority tasks to operate. Both Tivaware drivers and TI-RTOS driver both utilize driverlib API calls to manipulate peripheral registers, but TI-RTOS drivers use RTOS primitives to allow lower priority tasks to run while the calling task is pending on I/O from the peripheral.

    Additionally, in a bare-metal environment,  you would use driverlib APIs to manipulate the NVIC directly, whereas when using the TI-RTOS kernel, you must use the Kernel APIs to manipulate the NVIC (via Hwi APIs). TI-RTOS drivers use the Hwi APIs for interrupt management.

    Jack Lix said:

    "C:/ti/tirtos_tivac_2_10_01_38/products/bios_6_41_00_26/packages/ti/sysbios/family/arm/m3/Hwi.h", line 1208: warning #48-D: incompatible redefinition of macro "Hwi_Instance" (declared at line 615 of "C:/ti/tirtos_tivac_2_10_01_38/products/bios_6_41_00_26/packages/ti/sysbios/hal/Hwi.h")

    I have seen in my project that if I comment out the "#include <ti/sysbios/family/arm/m3/Hwi.h> ", I the system will crash.

    Yeah, I understand the frustration with this one. Generally we try to keep API so generic that you can reuse your code from one system to another, but in doing so we loose some specific peripheral features. This error one of of those examples. I think in your .cfg file you have included the generic "var Hwi = use.Module('ti.sysbios.hal.Hwi')" but in your code (or in the TI-RTOS drivers) you reference the non-generic specific one "#include <ti/sysbios/family/arm/m3/Hwi.h>".

    I think you don't want the #include <ti/sysbios/family/arm/m3/Hwi.h> as you already mentioned in your post, but now we need to see why the system is crashing. Can you use ROV and see the Hwi module can give you more information as to what caused the crash?