portTASK_CALLS_SECURE_FUNCTIONS (v10.0.1)

westmorelandeng wrote on Wednesday, March 21, 2018:

Hello,

When compiling in the vSuicidalTask demo function I’m getting this:

undefined first referenced
symbol in file


_portTASK_CALLS_SECURE_FUNCTIONS ./FreeRTOS/Demo/Minimal/death.obj

So, what is the portTASK_CALLS_SECURE_FUNCTIONS() supposed to be?
(I assume I could stub this - but wanted to know what it should be.)

I’m currently using the CCS tools from TI (v 8.0.0.00016 ) and my target device is the TMS320F28069 port; I’m currently using the port from Ivan Zaitsev; and have only made a slight change in the critical nesting thus far; and that shouldn’t have anything to do with that function/macro.

I did search for this but I didn’t readily turn up much; of course my search was not exhaustive.

Thanks In Advance,
John W.

rtel wrote on Wednesday, March 21, 2018:

This should get defined to nothing if it is not implemented. Are you using source file from multiple different FreeRTOS versions, so maybe it appears in a .c file from a newer FreeRTOS version but doesn’t get defined away because you are using header files from an older FreeRTOS version?

(The macro is used in an ARM V8-M port that is not published yet).

westmorelandeng wrote on Wednesday, March 21, 2018:

Richard,

No - since there’s no official port yet for the TMS320F2x series from TI - I’m using the latest plus I just grabbed an old demo (not using any files) other than the main.c from that demo and modifying it - but as far as I know there’s no legacy stuff there.

Maybe something is missing from FreeRTOSConfig.h that is new that I don’t know about?

Thanks,
John

westmorelandeng wrote on Wednesday, March 21, 2018:

Not to get too far afield here - have any ideas on how to use the RTOS INT that’s included in this architecture?

I will admit I’m disappointed what TI-RTOS ‘is’ - I had been under the impression it was largely a port of FreeRTOS and a whole sale replacement for SYS-BIOS. I don’t even want to say publicy my reaction when I found out not only is it not FreeRTOS - but SYS-BIOS is still required.

And, it appears some details on how to use RTOS INT are not exposed; but I’m digging into that now - again, some of this is a little surprising. Just my 2cents as they say… :wink:

rtel wrote on Wednesday, March 21, 2018:

See line 761 (at the time of writing) here:
https://sourceforge.net/p/freertos/code/HEAD/tree/trunk/FreeRTOS/Source/include/FreeRTOS.h

rtel wrote on Wednesday, March 21, 2018:

Can you elaborate on RTOS INT?

westmorelandeng wrote on Friday, March 23, 2018:

Yes - the C28x architecture has what they call the RTOS INT - but it apparently isn’t an RTI like in other families. The Hecules family has an RTI, as well as some of the other DSP’s TI has; but there are no explicit RTI registers that I have found on the C28x even though there is an RTOS INT; apparently only useful for real-time debug according to some of the documentation.

For the Hercules, for instance:
static void prvSetupTimerInterrupt(void)
{
/* Disable timer 0. */
portRTI_GCTRL_REG &= 0xFFFFFFFEUL;

/* Use the internal counter. */
portRTI_TBCTRL_REG = 0x00000000U;

/* COMPSEL0 will use the RTIFRC0 counter. */
portRTI_COMPCTRL_REG = 0x00000000U;

/* Initialise the counter and the prescale counter registers. */
portRTI_CNT0_UC0_REG =  0x00000000U;
portRTI_CNT0_FRC0_REG =  0x00000000U;

/* Set Prescalar for RTI clock. */
portRTI_CNT0_CPUC0_REG = 0x00000001U;
portRTI_CNT0_COMP0_REG = ( configCPU_CLOCK_HZ / 2 ) / configTICK_RATE_HZ;
portRTI_CNT0_UDCP0_REG = ( configCPU_CLOCK_HZ / 2 ) / configTICK_RATE_HZ;

/* Clear interrupts. */
portRTI_INTFLAG_REG =  0x0007000FU;
portRTI_CLEARINTENA_REG	= 0x00070F0FU;

/* Enable the compare 0 interrupt. */
portRTI_SETINTENA_REG = 0x00000001U;
portRTI_GCTRL_REG |= 0x00000001U;

}

Which is straightforward.

Here’s something that was mentioned on one of TI’s wikis:
http://processors.wiki.ti.com/index.php/SYS/BIOS_for_the_28x
mportant: Significant enhancements were made in SYS/BIOS 6.32 to support 28x devices. We recommend that you use SYS/BIOS 6.32.01 or a later version with 28x devices.

If you want to see some discussion on this on TI’s E2E site - I’ve started a thread here; I can send a link if you want to see that.

Just an FYI - under the c28 port, I have all of the HRCAP IRQ’s running plus one EPWM running; but using CPU timer 2. There is a way to enable ‘real-time-mode’ as well.