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.

TM4C1290NCZAD: Problem in the changing in start address of the application with TM4C1290nczad to get a USB Host to firmware update via read a binary file from a USB memory

Part Number: TM4C1290NCZAD
Other Parts Discussed in Thread: UNIFLASH,

Tool/software:

I'm trying to change the start address of my application on the customer board, as mentioned in the C:\ti\TivaWare_C_Series-2.2.0.295\examples\boards\dk-tm4c129x\usb_stick_demo\usb_stick_demo_ccs.cmd File (#define APP_BASE 0X0008000), but when I use Uniflash or LM Flash Programmer and set the Program Address Offset to 0x8000, it doesn't program the code on the customer board as it usually does. I've tried changing #define APP_BASE 0X0008000 in the ..._ccs.cmd File to other addresses and haven't had success. When I change this APP_BASE 0X0008000, it simply doesn't work. Do I need to change an attribute like erase/write, and where is it modified? Or is it necessary to restructure the _ccs.cmd File? How can I change _ccs.cmd and name_ccs.map?

This question concerns a firmware update by reading a binary file from a USB memory. The customer boar has the microcontroller TM4C1290NCZAD.

TM4C1297NCZAD: TM4C1297nczadi3 as a USB Host - firmware update via read a binary file from a USB memory - Arm-based microcontrollers forum - Arm-based microcontrollers - TI E2E support forums

name_ccs.map

MEMORY CONFIGURATION

name origin length used unused attr fill
---------------------- -------- --------- -------- -------- ---- --------
FLASH 00000000 00100000 00035892 000ca76e RW X
SRAM 20000000 00040000 00012ce4 0002d31c RW X


SEGMENT ALLOCATION MAP

run origin load origin length init length attrs members
---------- ----------- ---------- ----------- ----- -------
00000000 00000000 00035898 00035898 r-x
00000000 00000000 00000200 00000200 r-- .intvecs
00000200 00000200 00020aea 00020aea r-x .text
00020cf0 00020cf0 00011158 00011158 r-- .const
00031e48 00031e48 00003a50 00003a50 r-- .cinit
20000000 20000000 00009b98 00000000 rw-
20000000 20000000 00009b98 00000000 rw- .data
20009c00 20009c00 00009150 00000000 rw-
20009c00 20009c00 00007d4c 00000000 rw- .bss
20011950 20011950 00000c00 00000000 rw- .stack
20012550 20012550 00000800 00000000 rw- .sysmem

  • I'm trying to change the start address of my application on the customer board, as mentioned in the C:\ti\TivaWare_C_Series-2.2.0.295\examples\boards\dk-tm4c129x\usb_stick_demo\usb_stick_demo_ccs.cmd File (#define APP_BASE 0X0008000), but when I use Uniflash or LM Flash Programmer and set the Program Address Offset to 0x8000, it doesn't program the code on the customer board as it usually does. I've tried changing #define APP_BASE 0X0008000 in the ..._ccs.cmd File to other addresses and haven't had success. When I change this APP_BASE 0X0008000, it simply doesn't work. Do I need to change an attribute like erase/write, and where is it modified? Or is it necessary to restructure the _ccs.cmd File? How can I change _ccs.cmd and name_ccs.map?

    Can you answer a few questions?

    - Do you already have the usb_stick_update loaded at 0x0 through JTAG?

    - Are you trying to load usb_stick_demo using JTAG?

    The answer to the above two questions are important. usb_stick_update must already reside in the flash at 0x0 and running. The usb_stick_demo is an application that should be on your usb stick. Once you plug the usb_stick to the USB port, the usb_stick_update (bootloader) will load the usb_stick_demo (application) from your usb stick drive. 

     If you try to load usb_stick_demo using JTAG as you mentioned above where you said you use LM flash programmer or Uniflash to load the code then it will not work f

      - First, as soon as you load usb_stick_demo using LM flash programmer through JTAG, it will overwrite the bootloader that resides at 0x0 although you specify the offset to 0x8000. The LM flash program and Uniflash will normally erase the entire the flash before loading new code. Therefore, once you load usb_stick_demo, the usb_stick_update is gone. After a reset the processor finds nothing at 0x0 and 0x4 (the stack pointer and reset vector) and will just hang. Without a valid bootloader at 0x0, it will not jump to the application even if the application is loaded at 0x8000. You can use the memory browser to see if 0x0 is empty and your application is at 0x8000. If you really want to load both usb_stick_update and usb_stick_demo at the same time using Uniflash through JTAG interface, you can follow the below method. However, ultimately, the usb_stick_demo is meant to be an application that should reside on your usb stick drive to be load through the USB interface, not JTAG. 

  • 1. Do you already have the usb_stick_update loaded at 0x0 using JTAG?

    • Yes, that's how I have done it.

    2. Are you trying to load usb_stick_demo using JTAG?

    • I have also done it this way. Now I understand that loading usb_stick_demo using JTAG is NOT recommended. The most appropriate approach is to place usb_stick_demo solely on the USB memory.

    To replace usb_stick_demo with my application on the customer board, should it work by defining APP_BASE with the same start address (#define APP_BASE 0x8000)?. shouldn't I need to do anything else to set APP_BASE to 0x8000 for my application to function correctly? No adjustments to attributes or segmentation of the Flash memory banks should be necessary?

  • There is nothing else to do for your custom application if you reuse the same .cmd from the example. If you want to map the application to other addresses like 0xC000 or 0x10000 you may do so. You also need to update the bootloader usb_ application starting address accordingly like I mentioned in the other post.