工具与软件:
你(们)好
IAM 尝试 通过为自定义引导加载程序和自定义应用对闪存进行分区来通过以太网引导加载程序代码执行自定义固件升级
我所面临的问题是
固件升级后、非 RTOS 应用程序正常工作并正常引导
而 在固件升级中使用基于 RTOS 的应用程序,它会卡在下面提到的切换地址功能中
void SwitchAddress (uint32_t StartAddress)
{
UARTprintf ("Start at %x\n"、StartAddress);
IntDisable (INT_TIMER0A);
IntDisable (INT_TIMER1A);
IntDisable (INT_TIMER2A);
IntDisable (INT_EMAC0);
IntDisable (FAULT_SysTick);
IntDisable (FAULT_NMI);
IntDisable (FAULT_hard);
//
//禁用所有处理器中断。 而不是禁用它们
//一次写入一个 NVIC 可以禁用所有功能
//外设中断。
//
HWREG (NVIC_DIS0)= 0xffffffff;
HWREG (NVIC_DIS1)= 0xffffffff;
HWREG (NVIC_DIS2)= 0xffffffff;
HWREG (NVIC_DIS3)= 0xffffffff;
HWREG (NVIC_VTABLE)= StartAddress;
//从应用程序的向量表加载堆栈指针。
_asm (" LDR R1、[r0]\n"
" mov sp、R1");
//从应用程序的矢量表加载初始 PC 并分支到
//应用程序的入口点。
_asm (" LDR r0、[R0、#4]\n"
" bx r0\n");
}
我将共享引导加载程序和应用程序.CMD 文件
Bootloader.cmd 文件
/******************************************************************************
*
* Copyright (c) 2013-2017 Texas Instruments Incorporated. All rights reserved.
* Software License Agreement
*
* Texas Instruments (TI) is supplying this software for use solely and
* exclusively on TI's microcontroller products. The software is owned by
* TI and/or its suppliers, and is protected under applicable copyright
* laws. You may not combine this software with "viral" open-source
* software in order to form a larger program.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS.
* NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT
* NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. TI SHALL NOT, UNDER ANY
* CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
* DAMAGES, FOR ANY REASON WHATSOEVER.
*
*
*****************************************************************************/
--retain=g_pfnVectors
/* The following command line options are set as part of the CCS project. */
/* If you are building using the command line, or for some reason want to */
/* define them here, you can uncomment and modify these lines as needed. */
/* If you are using CCS for building, it is probably better to make any such */
/* modifications in your CCS project and leave this file alone. */
/* */
/* --heap_size=0 */
/* --stack_size=256 */
/* --library=rtsv7M3_T_le_eabi.lib */
/* The starting address of the application. Normally the interrupt vectors */
/* must be located at the beginning of the application. */
#define APP_BASE 0x00000000
#define RAM_BASE 0x20000000
#define APP_LENGTH 0x01000000 //0x010000000
#define EXSRAM_BASE 0x60000000
/* System memory map */
MEMORY
{
/* Application stored in and executes from internal flash */
FLASH (RX) : origin = APP_BASE, length = 0x0000B000
/* Application uses internal RAM for data */
SRAM (RWX) : origin = RAM_BASE, length = 0x00040000
SDRAM (RWX) : origin = EXSRAM_BASE, length = 0x01000000
}
/* Section allocation in memory */
SECTIONS
{
.intvecs: > APP_BASE
.text : > FLASH
.const : > FLASH
.cinit : > FLASH
.pinit : > FLASH
.init_array : > FLASH
.vtable : > RAM_BASE
.data : > SRAM
.bss : > SRAM
.sysmem : > SRAM
.stack : > SRAM
/* .sdram : > EXSRAM_BASE*/
#ifdef __TI_COMPILER_VERSION__
#if __TI_COMPILER_VERSION__ >= 15009000
.TI.ramfunc : {} load=FLASH, run=SRAM, table(BINIT)
#endif
#endif
}
__STACK_TOP = __stack + 512;
应用程序.cmd 文件
/******************************************************************************
*
* Default Linker Command file for the Texas Instruments TM4C1294NCPDT
*
* This is derived from revision 15071 of the TivaWare Library.
*
*****************************************************************************/
--retain=g_pfnVectors
#define APP_BASE 0xC000//0x04000 //000B078
#define RAM_BASE 0x20000000 + 512
MEMORY
{
FLASH (RX) : origin = APP_BASE, length = 0x00016000//(1024K - 0xB078)
SRAM (RWX) : origin = 0x20000000, length = 256K//0x01000000
}
/* The following command line options are set as part of the CCS project. */
/* If you are building using the command line, or for some reason want to */
/* define them here, you can uncomment and modify these lines as needed. */
/* If you are using CCS for building, it is probably better to make any such */
/* modifications in your CCS project and leave this file alone. */
/* */
/* --heap_size=0 */
/* --stack_size=256 */
/* --library=rtsv7M4_T_le_eabi.lib */
/* Section allocation in memory */
SECTIONS
{
.intvecs: > APP_BASE
.text : > FLASH
.const : > FLASH
.cinit : > FLASH
.pinit : > FLASH
.init_array : > FLASH
// .isr_vector : > FLASH
.vtable : > RAM_BASE
.data : > SRAM
.bss : > SRAM
.sysmem : > SRAM
.stack : > SRAM
#ifdef __TI_COMPILER_VERSION__
#if __TI_COMPILER_VERSION__ >= 15009000
.TI.ramfunc : {} load=FLASH, run=SRAM, table(BINIT)
#endif
#endif
}
//_estack = 0x20040000;
__STACK_TOP = __stack + 512;
您能帮助我们检查.cmd 文件中的任何配置错误、或者对引导基于 RTOS 的代码所做的任何更改吗
调试特性









