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.

[参考译文] TM4C1294NCPDT:关于固件升级

Guru**** 2826855 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1430254/tm4c1294ncpdt-regarding-firmware-upgrade

器件型号:TM4C1294NCPDT

工具与软件:

你(们)好  

我需要直接在 RAM 中使用以太网引导加载程序来升级应用二进制文件的固件  

以太网 引导加载程序将驻留在闪存中,但应用程序应直接需要使用引导加载程序在 RAM 中刷新,

是否有任何直接 在 RAM (而不是闪存)中运行二进制文件的示例代码

我的要求是在系统启动时从 RAM 加载应用、就像每次通过以太网引导加载程序上电时一样、我需要直接将固件(应用)下载到 RAM 中并从 RAM 而不是从闪存引导

 

我的第二个问题是没有 用于以太网数据包加密和解密的代码或示例项目   

请尽快回复  

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    Applicationtobe 已下载.cmd 文件

    /******************************************************************************
     *
     * blinky_ccs.cmd - CCS linker configuration file for blinky.
     *
     * Copyright (c) 2013-2020 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.
     * 
     * This is part of revision 2.2.0.295 of the EK-TM4C1294XL Firmware Package.
     *
     *****************************************************************************/
    
    --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 RAM_BASE	0x20800000
    #define APP_LENGTH	0x00004000
    #define SRAM_VTABLE	0x20160000
    #define SRAM_VTABLE_LEN	0x00004000
    
    
    //#define APP_BASE 0x00000000
    //#define RAM_BASE 0x20000000
    
    
    MEMORY
    {
       /* Application stored in and executes from internal flash*/
        //FLASH (RX) : origin = APP_BASE, length = APP_LENGTH
        /* Application uses internal RAM for data*/
        SRAMAPP (RWX) : origin = RAM_BASE, length = APP_LENGTH
        SRAM (RWX) : origin = SRAM_VTABLE, length = SRAM_VTABLE_LEN
    }
    
    
    
    /* System memory map */
    
    /*MEMORY
    {
        /* Application stored in and executes from internal flash
        FLASH (RX) : origin = APP_BASE, length = 0x00100000
        /* Application uses internal RAM for data
        SRAM (RWX) : origin = 0x20000000, length = 0x00040000
    }*/
    
    
    
    SECTIONS
    {
        .intvecs:   > RAM_BASE
        .text   :   > SRAMAPP
        .const  :   > SRAMAPP
        .cinit  :   > SRAMAPP
        .pinit  :   > SRAMAPP
        .init_array : > SRAMAPP
    
        .vtable :   > SRAM_VTABLE
        .data   :   > SRAM
        .bss    :   > SRAM
        .sysmem :   > SRAM
        .stack  :   > SRAM
    
    #ifdef  __TI_COMPILER_VERSION__
    #if     __TI_COMPILER_VERSION__ >= 15009000
        .TI.ramfunc : {} load=SRAMAPP, run=SRAM, table(BINIT)
    #endif
    #endif
    }
    
    
    
    /* 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
    #ifdef  __TI_COMPILER_VERSION__
    #if     __TI_COMPILER_VERSION__ >= 15009000
        .TI.ramfunc : {} load=FLASH, run=SRAM, table(BINIT)
    #endif
    #endif
    }*/
    
    __STACK_TOP = __stack + 512;
    

    Bootloaded.cmd 文件

    /******************************************************************************
     *
     * Medtronic-HHC-primary.cmd - CCS linker configuration file for medtronic primary.
     *
     * 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	0x00016000
    
    /* System memory map */
    
    MEMORY
    {
       /* Application stored in and executes from internal flash */
        FLASH (RX) : origin = APP_BASE, length = APP_LENGTH
        /* Application uses internal RAM for data */
        SRAM (RWX) : origin = RAM_BASE, length = 0x00040000
    }
    
    /* 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
    
    #ifdef  __TI_COMPILER_VERSION__
    #if     __TI_COMPILER_VERSION__ >= 15009000
        .TI.ramfunc : {} load=FLASH, run=SRAM, table(BINIT)
    #endif
    #endif
    }
    

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    请告诉我需要在此文件中进行任何编辑

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

     我目前在旅行。 当我在星期三回来的时候,我会回复你的帖子。 很抱歉给您带来不便。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    [报价 userid="524025" url="~/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1430254/tm4c1294ncpdt-regarding-firmware-upgrade "]

    以太网 引导加载程序将驻留在闪存中,但应用程序应直接需要使用引导加载程序在 RAM 中刷新,

    [报价]

    RAM 仅为256KB。 您的固件是否足够小能够适应此尺寸? 请注意、您不能将256k 完全用于固件、因为 RAM 也被用于运行时堆栈和堆内存。  

    [报价 userid="524025" url="~/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1430254/tm4c1294ncpdt-regarding-firmware-upgrade "]

    是否有任何直接 在 RAM (而不是闪存)中运行二进制文件的示例代码

    [报价]

    否、我们没有这样的示例。 您需要修改引导加载程序、以便将固件下载到 RAM 而不是 闪存。 RAM 是单周期访问存储器。 实际上、将您的固件编程到 RAM 更容易。 只需要写入 RAM。 将固件写入 RAM 后、您只需将程序计数器移动到 RAM 地址即可执行。  

    [报价 userid="524025" url="~/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1430254/tm4c1294ncpdt-regarding-firmware-upgrade "]

    我的第二个问题是没有 用于以太网数据包加密和解密的代码或示例项目   

    [报价]

    有一些加密和解密的 AES 示例。