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.

CCS/TMS320F28388D: Defining assembly function and using extern definiton in .c file

Part Number: TMS320F28388D

Tool/software: Code Composer Studio

Hello,

I have a TMS320F28388D and docking station and attempting to blink an led using the FreeRTOS code here https://github.com/IvanZuy/freertos_c28x and modifying to suite my MCU. I am running into the error below and wondering if my assembler function definiton is correct as I beleive it is giving me issues. Can someone verify? The first picture is the function defintion in the .asm file and the other is the extern declaration in my port.c file. 

portasm.asm(Another question, what does it meaning when "getSTF" is highlighted as a light blue color? I know the grey highlight signifies code that isn`t run):

port.c file:

Error I get:

I have also included the two files below:

portasm.asm

port.c
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
//-------------------------------------------------------------------------------------------------
// Author: Ivan Zaitsev, ivan.zaitsev@gmail.com
//
// This file follows the FreeRTOS distribution license.
//
// FreeRTOS is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License (version 2) as published by the
// Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception.
//
// ***************************************************************************
// >>! NOTE: The modification to the GPL is included to allow you to !<<
// >>! distribute a combined work that includes FreeRTOS without being !<<
// >>! obliged to provide the source code for proprietary components !<<
// >>! outside of the FreeRTOS kernel. !<<
// ***************************************************************************
//
// FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. Full license text is available on the following
// link: http://www.freertos.org/a00114.html
//-------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------
// Scheduler includes.
//-------------------------------------------------------------------------------------------------
#include "FreeRTOS.h"
#include "task.h"
//-------------------------------------------------------------------------------------------------
// Implementation of functions defined in portable.h for the C28x port.
//-------------------------------------------------------------------------------------------------
// Constants required for hardware setup.
#define portINITIAL_CRITICAL_NESTING ( ( uint16_t ) 10 )
#define portFLAGS_INT_ENABLED ( ( StackType_t ) 0x08 )
#if defined(__TMS320C28XX_FPU32__)
# define AUX_REGISTERS_TO_SAVE 19 // XAR + FPU registers
# define XAR4_REGISTER_POSITION 6 // XAR4 position in AUX registers array
# define STF_REGISTER_POSITION 10 // STF position in AUX registers array
#else
# define AUX_REGISTERS_TO_SAVE 9 // XAR registers only
# define XAR4_REGISTER_POSITION 5 // XAR4 position in AUX registers array
#endif
extern uint32_t getSTF( void );
extern void vApplicationSetupTimerInterrupt( void );
// Each task maintains a count of the critical section nesting depth. Each
// time a critical section is entered the count is incremented. Each time a
// critical section is exited the count is decremented - with interrupts only
// being re-enabled if the count is zero.
//
// ulCriticalNesting will get set to zero when the scheduler starts, but must
// not be initialised to zero as this will cause problems during the startup
// sequence.
// ulCriticalNesting should be 32 bit value to keep stack alignment unchanged.
volatile uint32_t ulCriticalNesting = portINITIAL_CRITICAL_NESTING;
volatile uint16_t bYield = 0;
volatile uint16_t bPreemptive = 0;
//-------------------------------------------------------------------------------------------------
// Initialise the stack of a task to look exactly as if
// timer interrupt was executed.
//-------------------------------------------------------------------------------------------------
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{
uint16_t i;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

main.c led code:

4667.led_ex1_blinky.c
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#include "f28x_project.h"//#include "F28x_Project.h" // Device Headerfile and Examples Include File
#include "FreeRTOS.h"
#include "task.h"
#include "semphr.h"
#define DEVICE_GPIO_PIN_LED1 31
#define STACK_SIZE 256U
#define RED 0xDEADBEAF
#define BLUE 0xBAADF00D
static StaticTask_t redTaskBuffer;
static StackType_t redTaskStack[STACK_SIZE];
static StaticTask_t blueTaskBuffer;
static StackType_t blueTaskStack[STACK_SIZE];
static StaticTask_t idleTaskBuffer;
static StackType_t idleTaskStack[STACK_SIZE];
static SemaphoreHandle_t xSemaphore = NULL;
static StaticSemaphore_t xSemaphoreBuffer;
//-------------------------------------------------------------------------------------------------
void vApplicationStackOverflowHook( TaskHandle_t xTask, signed char *pcTaskName )
{
while(1);
}
//-------------------------------------------------------------------------------------------------
static void blueLedToggle(void)
{
static uint32_t counter = 0;
counter++;
GPIO_WritePin(DEVICE_GPIO_PIN_LED1, counter & 1);
}
//-------------------------------------------------------------------------------------------------
static void redLedToggle(void)
{
static uint32_t counter = 0;
counter++;
GPIO_WritePin(12, counter & 1);
}
//-------------------------------------------------------------------------------------------------
static void ledToggle(uint32_t led)
{
if(RED == led)
{
redLedToggle();
}
else
if(BLUE == led)
{
blueLedToggle();
}
}
//-------------------------------------------------------------------------------------------------
void vApplicationSetupTimerInterrupt( void )
{
// Start the timer than activate timer interrupt to switch into first task.
EALLOW;
PieVectTable.TIMER2_INT = &portTICK_ISR;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Thanks,

John