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.
最近在调试570的 boot_uart,程序是processors.wiki.ti.com/.../RM4x_Hercules_MCU_Bootloader上下载的,
程序编译无错并下载,
Debug环境下 UART_putString(UART, "\r Hercules MCU UART BootLoader ");语句运行完没有PC端没有收到信息,
正常情况下 Debug 执行完这个语句能收到信息么?
还有pdf及资料中 After HDK reset 我用的是上图的开发板,但是我按复位按键没有变化?
请问 我需要怎么做才能让程序跳转到bootloader程序中。
Yiran, 你好
TMS570和RM4x产品是不同的,其主频不同,且TMS570为大端模式,RM4x为小端模式。你使用的例程应该是不正确的,请查收附件,重新测试。谢谢。
你好,我现在用TMS570ls3137的开发板,烧进去UART Bootloader for' Hercules TMS570LS31x MCU文档中http://www.ti.com/general/docs/lit/getliterature.tsp?baseLiteratureNumber=spna193&fileType=zip提到spn193的uart bootloader例程,运行bootloader后Hyper terminal出现文档中说的主菜单,5项菜单都能够执行,但是执行完菜单1(下载应用程序bin文件到开发板中)hyper ternal显示下载成功,再在键盘上输入“3”(运行应用程序),这时应用程序不能运行,而且开发板上指示MCU错误的D1灯亮起。请问是怎么回事?按照例程压缩包中的readme.txt将bootloader里面bl_config.h中应用程序起始位置改成#define APP_STATUS_ADDRESS 0x00010000并将应用程序里面的memory也进行相应的修改(起始地址改为0x00020000 ):
MEMORY
{
VECTORS (X) : origin=0x00020000 length=0x00000020
FLASH0 (RX) : origin=0x00020020 length=0x0017FFE0
FLASH1 (RX) : origin=0x001A0000 length=0x00180000
STACKS (RW) : origin=0x08000000 length=0x00001500
RAM (RW) : origin=0x08001500 length=0x0003EB00
/* USER CODE BEGIN (2) */
/* USER CODE END */
}
原来没有修改的应用程序cmd:
MEMORY
{
VECTORS (X) : origin=0x00000000 length=0x00000020
FLASH0 (RX) : origin=0x00000020 length=0x0017FFE0
FLASH1 (RX) : origin=0x00180000 length=0x00180000
STACKS (RW) : origin=0x08000000 length=0x00001500
RAM (RW) : origin=0x08001500 length=0x0003EB00
/* USER CODE BEGIN (2) */
/* USER CODE END */
}
/* USER CODE BEGIN (3) */
/* USER CODE END */
/*----------------------------------------------------------------------------*/
/* Section Configuration */
SECTIONS
{
.intvecs : {} > VECTORS
.text : {} > FLASH0 | FLASH1
.const : {} > FLASH0 | FLASH1
.cinit : {} > FLASH0 | FLASH1
.pinit : {} > FLASH0 | FLASH1
.bss : {} > RAM
.data : {} > RAM
.sysmem : {} > RAM
/* USER CODE BEGIN (4) */
/* USER CODE END */
}
应用程序是两个can模块通讯,成功后点亮LED灯,程序通过仿真器下载能正常运行,但是通过bootloader下载进去能运行到bootloader的跳转到0x00020000 处,但是再运行就会出现上面所说的现象,应用程序的main函数如下:
#include "sys_common.h"
/* USER CODE BEGIN (1) */
#include "sys_common.h"
#include "can.h"
#include "het.h"
/* Include ESM header file - types, definitions and function declarations for system driver */
#include "esm.h"
#define D_SIZE 9
uint8 tx_data[D_SIZE] = {'H','E','R','C','U','L','E','S','\0'};
uint8 rx_data[D_SIZE] = {0};
uint32 error = 0;
uint32 checkPackets(uint8 *src_packet,uint8 *dst_packet,uint32 psize);
/* USER CODE END */
/** @fn void main(void)
* @brief Application main function
* @note This function is empty by default.
*
* This function is called after startup.
* The user can use this function to implement the application.
*/
/* USER CODE BEGIN (2) */
/* USER CODE END */
int main(void)
{
/* USER CODE BEGIN (3) */
/* initialize can 1 and 2 */
canInit(); /* can1 -> can2 */
/* transmit on can1 */
while(!canTransmit(canREG1, canMESSAGE_BOX1, tx_data));
/*... wait until message receive on can2 */
while(!canIsRxMessageArrived(canREG2, canMESSAGE_BOX1));
canGetData(canREG2, canMESSAGE_BOX1, rx_data); /* receive on can2 */
hetInit();
/* check received data patterns */
error = checkPackets(&tx_data[0],&rx_data[0],D_SIZE);
/* ... run forever */
while(1)
return 0;
/* USER CODE END */
return 0;
}
麻烦能帮我看下是怎么回事吗,谢谢!!