您好 Jagadish、很抱歉耽误我的时间。 我在链接 器 TMS570LS3137上尝试了您的解决方案:引导加载程序 FreeRTOS 程序、但它对我不起作用。
我附上了我的完整代码:
e2e.ti.com/.../V2.2_5F00_Firmware_5F00_Boot.zip
当引导加载程序完成时、我注意到 FreeRTOS 没有运行(它必须给 LED 上电)。 所以我点击了"暂停",我观察到程序 显示了以下:




我附上了我的代码。 如果您想看到一段特定的代码、请告诉我。
SYS_main.c
/* Include Files */
#include "sys_common.h"
#include "system.h"
#include "stdio.h"
#include "esm.h"
#include "sys_mpu.h"
#include "FreeRTOS.h"
#include "os_task.h"
#include "os_semphr.h"
#include "het.h"
#include "gio.h"
#include "can.h"
#include "sci.h"
#include "adc.h"
#include "sys_vim.h"
#include "sys_core.h"
#include "bootloader.h"
#include "bl_can.h"
#include "includes.h"
#include "bl_check.h"
#include "bl_led_demo.h"
#include "bl_config.h"
#include "sci_common.h"
void initFunction()
{
_enable_interrupt_();
gioSetDirection(hetPORT1, 0xFFFFFFFF);
canInit();
// sciInit();
adcInit();
vimInit();
}
/*
*********************************************************************************************************
* MAIN
*********************************************************************************************************
*/
void main(void){
/* USER CODE BEGIN (22) */
systemInit();
_coreEnableIrqVicOffset_();
initFunction();
esmInit();
/* USER CODE END */
_mpuInit_();
RTOSFunction();
}
包括.c
/* Define Task Handles */
xTaskHandle xTask1Handle;
xTaskHandle xTask2Handle;
xTaskHandle xTask3Handle;
xTaskHandle xTask4Handle;
xTaskHandle xTask5Handle;
xQueueHandle xMainQ = NULL;
xQueueHandle xErrQ = NULL;
xQueueHandle xComQ = NULL;
xQueueHandle xComRx = NULL;
xQueueHandle xComIn = NULL;
xQueueHandle xSense = NULL;
xQueueHandle xTimer = NULL;
xSemaphoreHandle xSemaphoreTime = NULL;
void vApp(void *pvParameters);
void vTimer(void *pvParameters);
void vTaskIDLE(void *pvParameters);
void vSense(void *pvParameters);
void RTOSFunction()
{
vSemaphoreCreateBinary(xSemaphoreTime);
/*Create Queues*/
xMainQ = xQueueCreate(10, sizeof (struct xMessage));
xSense = xQueueCreate(10, sizeof (struct xMessage));
xErrQ = xQueueCreate(10, sizeof (struct xMessage));
xComIn = xQueueCreate(10, sizeof(int));
xComRx = xQueueCreate(10, sizeof(int));
/* Create Tasks */
xTaskCreate(vTimer, "TIMER", configMINIMAL_STACK_SIZE, NULL, 5, &xTask1Handle);
xTaskCreate(vApp, "APP", configMINIMAL_STACK_SIZE, NULL, 5, &xTask1Handle);
xTaskCreate(vTaskIDLE, "IDLE", configMINIMAL_STACK_SIZE, NULL, 4, &xTask1Handle);
/*Create Aperiodic Tasks*/
xTaskCreate(vSense, "HK", configMINIMAL_STACK_SIZE, NULL, 4 , &xTask5Handle);
xTaskCreate(vTCP, "TCP", configMINIMAL_STACK_SIZE, NULL, 4, &xTask4Handle);
//_mpuInit_();
/* Start Scheduler */
vTaskStartScheduler();
/* Run forever */
while(1);
}
SYS_link.cmd
MEMORY
{
/* PARA GRABAR*/
VECTORS (X) : origin=0x00020020 length=0x00000020
FLASH_CODE (RX) : origin=0x00020040 length=0x008000-0x40 fill=0xFFFFFFFF
FLASH0 (RX) : origin=0x00028000 length=0x0014FFC0
FLASH1 (RX) : origin=0x00180000 length=0x00180000
STACKS (RW) : origin=0x08000000 length=0x00000800
KRAM (RW) : origin=0x08000800 length=0x00000800
RAM (RW) : origin=(0x08000800+0x00000800) length=(0x0003F800 - 0x00000800)
/* USER CODE BEGIN (2) */
/* USER CODE END */
}
/* USER CODE BEGIN (3) */
/* USER CODE END */
/*----------------------------------------------------------------------------*/
/* Section Configuration */
SECTIONS
{
.intvecs : {} > VECTORS
/* FreeRTOS Kernel in protected region of Flash */
.kernelTEXT : {} > FLASH0 | FLASH1
.cinit : {} > FLASH0 | FLASH1
.pinit : {} > FLASH0 | FLASH1
/* Rest of code to user mode flash region */
.text : {} > FLASH0 | FLASH1
.const : {} > FLASH0 | FLASH1
/* FreeRTOS Kernel data in protected region of RAM */
.kernelBSS : {} > KRAM
.kernelHEAP : {} > RAM
.bss : {} > RAM
.data : {} > RAM
/* USER CODE BEGIN (4) */
/* USER CODE END */
}
提前感谢您。 我会等待您提供任何建议。


















