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: programming custom board for first time(tm4c1294ncpdt)

Part Number: TM4C1294NCPDT
Other Parts Discussed in Thread: EK-TM4C1294XL, MOTORWARE, TM4C1294KCPDT

Respected sir/madam,

               First of all i am really sorry for asking same question again and again. But i am really stuck here. Previous threads are locked so i have to create new .

             Finally i have got my custom board and i am trying to program it for first time. The things i have done so for are

1. I populated  part of my custom board required for programming.

2. Checked all power and ground pins for proper supply.

3.I am trying to program boot_demo1.c example and i changed the pins (switch and led) according to my board.

4. I did manual configuration of LM flash programmer for UART as shown in attached snap and tried to program the board using boot_demo1.bin file.

5. But i am getting error as shown in attached snap.

So please tell me what is the problem or am i missing any step??

Regards,

Digvijay

  • Are you using a 25MHz crystal? Sometimes the bootloader gets confused if you do not have a resistor of 4.89K between RBIAS and GND.
  • May I note that - for (any) "First Time Deployed" NEW BOARD -  "Bringing it up"  via  "JTAG/SWD" -  proves,  "SO VERY MUCH PREFERRED!"

    KISS dictates:  "Simple, Limited, Focused"  FIRST STEPS.     Any bootloader - by definition - proves MASSIVELY in Violation!      Note that for (any) "New Board" - issues could be "Anywhere!"    Thus the value of the tightly focused, measured, KISS-dictated approach!

    It is hoped that the (Normal/Customary)  "Provisioning of JTAG/SWD" - was included on poster's (custom) board.   (as that ALWAYS proves wise/SAVING)

    As always - use of the smallest/simplest program (i.e. "blinky") - should be the first "Program Load" attempted.      (and that - via JTAG/SWD)    

    Only after that  "JTAG/SWD Success" - should any more ambitious  "Programming Attempt"  - be launched...

  • respected sir,

    Bob Crosby said:
    Are you using a 25MHz crystal?

                    Yes i am using 25 Mhz crystal.

    Bob Crosby said:
    Sometimes the bootloader gets confused if you do not have a resistor of 4.89K between RBIAS and GND.

    There is 4.7k resistor between Rbais and GND which gives value of 4.529 K on DMM.

    Another question is can i boot load without using external crystal at all (using internal oscillator to reduce probability of error)??   If yes, what are the changes i have to make in boot_demo1 and boot_serial example or  changes in other places??

     

    regards,

    digvijay

  • hi

    Please Can anybody help me with this??

    Regards,

    Digvijay

  • digvijay khambe said:
    Please Can anybody help me with this??

    Was not "such help" - earlier offered up (28 April) - resulting in (only) silence?      That's NOT especially encouraging to others here - and (just may) explain your (on-going) plight...

    "Your way" - and "your way only" - presents 'SO MANY 'UNKNOWNS' - adding great complications!        A far simpler (more CLASSICALLY EMPLOYED & PROVEN METHOD) remains, "Cast  Aside" - for unstated reason!     Perhaps ...  NOT the best means - to compel volunteer HELP!

  • Hi cb1_mobile

             I have already replied on 30 April and after that it went silent.

            And I started with the method I know. If there are better and simpler methods I am always open to it.  I did not focused on JTAG because right now I don't have debugger with me and I am not familiar with the process at all.

    Regards,

    Digvijay

  • digvijay khambe said:
    I am not familiar with the process at all


    Do you mean to say you are unfamiliar with JTAG or are you unfamiliar with embedded development in general?

    I ask because if you are not new, I would be genuinely curious what your plan is. What is this method you mentioned, and have you had success in the past? I can not fathom development without a debugger.

    My initial recommendation is to run the dbgjtag utility, but this requires JTAG. Are your soldering skills proficient to solder a header to the JTAG pins? The pins are tiny. I would not attempt this without a microscope.

  • Yes, if the part is erased, the boot loader should work. Have you verified with a scope that the serial TX signal from the PC is getting properly to UART0RX pin PA0? Typically that requires an RS232 transceiver chip in the path.
  • The TivaWare Boot Loader User's Guide may be helpful: www.ti.com/.../spmu301d.pdf
  • Or one can also use EK-XL launch pad as a JTAG, remove 0R's 6,7,8,10,11,16,40, TP7 for shared GND. Then X11 (TXD/RXD) holes cross wire (X) into custom PCB UART (RXD/TXD). Also can use launch pads J6 JTAG header via ribbon cable or jumper wires into custom PCB JTAG header, not crossing wires. Do agree CB1 100%, Blinky can be rewritten to blink specific board LEDS via PIOSC or MOSC but it took awhile to figure out the wacky ass GPIO pin shifting only worked for one LED. Now my new (Blinky.bin) sports flip flopping LED'S. Will post it here if asked, let me know the LED's to blink..

    This works even better than XDS100 since it creates CMD virtual link for LM Flash and CCS debug checks, virtual COM ports for debug listing etc..

  • Respected sir,

                        As suggested  above i tried debugging using JTAG and it worked fine. I was able to download boot_demo1 and uart_echo example. In uart_echo example i was able to transmit and receive data using terminal and uart0 module. So i can conclude that my power lines, crystal, uart0 section is working fine. But still i am not able to download the boot_demo1 example using UART and LM FLASH programmer. I have changed the pins(switch and led) used in boot_demo1 example according to my board and this is the only change. But still i am getting the same error as original post. So do i need to do some process/step before trying to download boot_demo1 example?? or is there something else missing??

    regards,

    digvijay

  • Do you have "boot_serial" programmed into the flash? The three example projects "boot_serial", "boot_demo1" and "boot_demo2" are used together to demonstrate a flash based bootloader. The steps are to program "boot_serial" into the flash. If the flash is empty, you can do this with the ROM based boot loader over the serial port, but if the flash is not empty, you might be required to do this with the JTAG connection. Now that "boot_serial" is programmed and running, you should be able to use it to program "boot_demo1" over the serial port using LM flash programmer. Now after a reset, execution transfers to "boot_demo1". If properly modified, you should see your LED blink. When pressing your switch, "boot_demo1" will transfer execution back to "boot_serial" and allow another program to be loaded. Loading a program that is linked to address 0-0x4000 will overwrite "boot_serial".

    You might want to try this sequence on an EK-TM4C1294XL evaluation kit with unmodified examples.
  • Bob Crosby said:
    You might want to try this sequence on an EK-TM4C1294XL evaluation kit with unmodified examples.

    To me - the above is an excellent suggestion.     I failed to detect the "MEANS" by which this poster is "Connecting" to the UART - on his "New/Custom board."    That's of (some) importance - is it not?

    The vendor KIT employs the ICDI MCU to manage the Serial Transfer into UART - although not having that Kit - I'm on (not too steady) ground.    

    This "Method of Connection" to the various MCU UARTS - to my mind - ALWAYS BEARS IMPROVED EXPLANATION!     (i.e. too often ... even SOME explanation...)

    Poster should identify his: 

    • Serial Signal Source
    • the signal levels employed (the MCU's UART is restricted to CMOS/TTL signal levels)
    • and the fact that the Signal Source properly MATES - (signal level wise) - with his MCU's 'restricted' input signal levels.

    Poster has (just mentioned) some success via JTAG - such would have been (more) helpful - arriving earlier.    Indeed it establishes (some) level of board operation - always GOOD!

  • EK_TM4C1294XL.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    /*
    * Copyright (c) 2016, Texas Instruments Incorporated
    * All rights reserved.
    *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
    * are met:
    *
    * * Redistributions of source code must retain the above copyright
    * notice, this list of conditions and the following disclaimer.
    *
    * * Redistributions in binary form must reproduce the above copyright
    * notice, this list of conditions and the following disclaimer in the
    * documentation and/or other materials provided with the distribution.
    *
    * * Neither the name of Texas Instruments Incorporated nor the names of
    * its contributors may be used to endorse or promote products derived
    * from this software without specific prior written permission.
    *
    * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
    * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
    * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
    * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
    * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
    * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
    * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
    * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
    * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    */
    /*
    * ======== EK_TM4C1294XL.cmd ========
    * Define the memory block start/length for the EK_TM4C1294XL M4
    */
    --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 0x00004000
    #define RAM_BASE 0x20000000
    /* System memory map */
    MEMORY
    {
    /* Application stored in and executes from internal flash */
    FLASH (RX) : origin = APP_BASE, length = 0x000fc000
    /* Application uses internal RAM for data */
    SRAM (RWX) : origin = 0x20000000, length = 0x00040000
    }
    /* Section allocation in memory */
    SECTIONS
    {
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    gpiointerrupt (2).txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    /*
    * Copyright (c) 2015-2016, Texas Instruments Incorporated
    * All rights reserved.
    *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
    * are met:
    *
    * * Redistributions of source code must retain the above copyright
    * notice, this list of conditions and the following disclaimer.
    *
    * * Redistributions in binary form must reproduce the above copyright
    * notice, this list of conditions and the following disclaimer in the
    * documentation and/or other materials provided with the distribution.
    *
    * * Neither the name of Texas Instruments Incorporated nor the names of
    * its contributors may be used to endorse or promote products derived
    * from this software without specific prior written permission.
    *
    * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
    * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
    * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
    * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
    * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
    * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
    * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
    * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
    * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    */
    /* ================ Clock configuration ================ */
    var Clock = xdc.useModule('ti.sysbios.knl.Clock');
    /*
    * Default value is family dependent. For example, Linux systems often only
    * support a minimum period of 10000 us and multiples of 10000 us.
    * TI platforms have a default of 1000 us.
    */
    Clock.tickPeriod = 1000;
    /* ================ Defaults (module) configuration ================ */
    var Defaults = xdc.useModule('xdc.runtime.Defaults');
    /*
    * A flag to allow module names to be loaded on the target. Module name
    * strings are placed in the .const section for debugging purposes.
    *
    * Pick one:
    * - true (default)
    * Setting this parameter to true will include name strings in the .const
    * section so that Errors and Asserts are easier to debug.
    * - false
    * Setting this parameter to false will reduce footprint in the .const
    * section. As a result, Error and Assert messages will contain an
    * "unknown module" prefix instead of the actual module name.
    */
    Defaults.common$.namedModule = true;
    //Defaults.common$.namedModule = false;
    /* ================ Error configuration ================ */
    var Error = xdc.useModule('xdc.runtime.Error');
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    gpiointerrupt.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    /*
    * Copyright (c) 2015, Texas Instruments Incorporated
    * All rights reserved.
    *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
    * are met:
    *
    * * Redistributions of source code must retain the above copyright
    * notice, this list of conditions and the following disclaimer.
    *
    * * Redistributions in binary form must reproduce the above copyright
    * notice, this list of conditions and the following disclaimer in the
    * documentation and/or other materials provided with the distribution.
    *
    * * Neither the name of Texas Instruments Incorporated nor the names of
    * its contributors may be used to endorse or promote products derived
    * from this software without specific prior written permission.
    *
    * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
    * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
    * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
    * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
    * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
    * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
    * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
    * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
    * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    */
    /*
    * ======== gpiointerrupt.c ========
    */
    /* XDCtools Header files */
    #include <xdc/std.h>
    #include <xdc/runtime/System.h>
    /* BIOS Header files */
    #include <ti/sysbios/BIOS.h>
    #include <ti/sysbios/knl/Task.h>
    /* TI-RTOS Header files */
    #include <ti/drivers/GPIO.h>
    /* Example/Board Header files */
    #include "Board.h"
    #include <stdbool.h>
    #include <stdint.h>
    #include "inc/hw_types.h"
    #include "inc/hw_memmap.h"
    #include "inc/hw_nvic.h"
    #include "inc/hw_sysctl.h"
    #include "inc/hw_gpio.h"
    #include "driverlib/interrupt.h"
    #include "driverlib/flash.h"
    #include "driverlib/uart.h"
    #include "driverlib/gpio.h"
    #include "driverlib/rom.h"
    #include "driverlib/sysctl.h"
    #include "driverlib/pin_map.h"
    #include <ti/sysbios/knl/Semaphore.h>
    /* variable to be read by GUI Composer */
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    Respected sir,

                    As u suggested When i program boot_serial first then it works. But i still have some doubts .

    1. Why i cant use boot_serial from ROM?? When product is in production stage jtag is not feasible option.

    2. I tried to add boot loader to gpiointerrupt example. But i am getting folloing error

    entered interrupt count=0

    FSR = 0x0000

    HFSR = 0x40000000

    DFSR = 0x00000001

    MMAR = 0xe000ed34

    BFAR = 0xe000ed38

    AFSR = 0x00000000

    Terminating execution...

    The related code have been attached.

    Regards

    digvijay

  • digvijay khambe said:
    1. Why i cant use boot_serial from ROM?? When product is in production stage jtag is not feasible option

    Nice thing is with JTAG you can bulk erase the flash and trouble shoot the ROM boot loaders failure. Please review the BOOTCFG register 52 in datasheet for the default POR behavior. The BOOTCFG text is located throughout several sections, use CTRL-F search.  

    Noticed your LM Flash posted above was loading offset 0x4000, that is your application? The serial boot loader has to be loaded to offset 0x0, it then copies starting from 0x4000 (application) into SRAM and executes it from SRAM. That may be a draw back to execution speed if the application is using DMA, is very large or has several memory related functions.  

  • Respected sir,
    Your answer is not clear to me. I have two objectives
    1. To program the controller without using JTAG at all. As suggested by Mr. Bob I need to use JTAG for downloading boot_serial example and then I can use Uart. But in case of mass production I can not use JTAG. So how to use boot loader which is already stored in ROM of new controller so that I don't have to use JTAG??

    2. I want program the TI-RTOS based system. I am trying to program gpiointerrupt example of rtos. I have attached the file in above reply. While programming rtos application I am getting messages in console as shown in the above same reply. So how to add boot loader to TI-RTOS application??

    Regards,
    Digvijay
  • In regards to your second topic/question, adding the boot loader to a TI-RTOS app is only meaningful if you intend to upgrade the firmware sometime after the initial production programming. Is this truly your goal? If so, you can call the ROM boot loader functions from the RTOS or call a customized boot loader vector. ROM source code is available. You can do whatever you want with the application code! There are many options for upgrading with a bootloader added to an RTOS application (UART, USB, Ethenet, etc).

    This deserves its own post (in my opinion). You may distract help from your original programming problem.

  • Peter Borenstein said:
    You may distract help from your original programming problem.

    Well said - friend Peter.   

    That said - it is my belief - not confined to 'just this poster' - that too often the, "Premature Rush to the Boot-Loader" (so long before the Final Application is "Fully & Properly" Tested/Verified) - almost GUARANTEES that the Project will wind up ... abandoned!      As this struggling poster admits (he has been "STUCK at this"  SO LONG - w/ SO LITTLE Success) - the drive to continue - just HAS TO  be reduced!

    May it be asked,  "Just how many MORE - FAILED ATTEMPTS w/the Bootloader - must land here ...  prior to "Calling the Slaughter Rule?     Should its (attempted) use - perhaps - be ordered "BACK" - w/in the MCU Development Process?     This "Bootload Push-Back" method  - at minimum - builds Client-User skill, experience & confidence - before encountering & engaging,  "THE Challenge!"

    Has it not been very well established - that he/she,  "First to Market - Reaps (by far) the highest Profit Margin!"     And yet - the (barely justified)  "Drive to Bootload" -  DEVOURS:  "Time, Energy, Funds & Morale!"   (while exhausting the "Crack Helper Crüe" ... (as is that matters!))

    The boot-loader is - most always - something  to be deployed AFTER the Application has been PROVEN - and (some) Market Potential  has been confirmed.

    Minus that - just as poster Peter has  well noted - the Premature Rush to 'Bootload'  tends to 'SABOTAGE - NOT ENHANCE'  far too many projects!     (which - should they arrive - land SO LATE - that  profit potential  - far too often ... has,  Left the Building!)

  • Respected sir,

    Peter Borenstein said:
    In regards to your second topic/question, adding the boot loader to a TI-RTOS app is only meaningful if you intend to upgrade the firmware sometime after the initial production programming. Is this truly your goal?

    Yes , i need to upgrade the firmware after the initial production programming for example when product is in field. That is the reason i can not use jtag and i have to strictly stick to UART serial programming.

    Peter Borenstein said:
    If so, you can call the ROM boot loader functions from the RTOS or call a customized boot loader vector.

    I tried calling boot loader by modifying gpiointerrupt  example. But it is terminating the execution by giving message as shown in above reply. I have attached modified code to the same reply.

    Regards,

    digvijay

     

  • Dear cb1_mobile,

                             

    cb1_mobile said:
    so long before the Final Application is "Fully & Properly" Tested/Verified)

     Application has been completed in TI-RTOS and verified using launch pad. So only boot loading part is remaining

                               

    cb1_mobile said:
    You may distract help from your original programming problem.

    Boot loading the TI-RTOS application using UART serial at any time without JTAG is the main objective all along. So i think i am not deviating from my objective.

                              

    cb1_mobile said:
    May it be asked,  "Just how many MORE - FAILED ATTEMPTS w/the Bootloader - must land here ...  prior to "Calling the Slaughter Rule?

    I know that i am pushing hard. My 80 percent work is done so i dont want to give in now. And the information related to my problems is not in the documents. So i have to come to you guys for help.

    Regards,

    Digvijay

  • The bulk of my 05 May (7:09/19:09) post - was a general, "Statement of Fact" - only partially directed to you.    (yet still - I believe - applicable.)

    By employing the Forum's Search Box (atop this page) you cannot help but note the LARGE NUMBER of Client-Posters - Struggling w/ these bootloaders.     That signals something - does it not?

    If we assume that you have (some) commercial motivation - has this SIGNIFICANT DELAY - not INJURED your Profit-Seeking?      In my firm's case - should we be so delayed - 'Heads would ROLL!'     You are UNLIKELY to RECOVER these financial losses!    

    There IS an alternative to the bootloader - that would see your shipping a 2nd device - w/your additions (likely corrections) to the client - crediting that client upon the original device's return.    This method is not at all uncommon - and - adds SECURITY to your design.     (Any bootloader provides (EASED) "back-door" entry to your code)

    No one here wants to see you SO Struggle - it appears that (something) is not 'quite right' - w/SO MANY - just like you - Struggling in this effort...

  • Dear cb1_mobile

     So is there solution to it or not??  I really need it .

    Regards,

    Digvijay

  • digvijay khambe said:
    While programming rtos application I am getting messages in console as shown in the above same reply. So how to add boot loader to TI-RTOS application??

    You remain silent as to how custom PCB UART0 is being connected into PC, e.g, no posted schematic or answer to Bob's or CB1's very same question.

    Q: The custom PCB UART0 connection has been (Verified) both TXD / RXD data into Windows console using a virtual COM port in echo mode?

    Should custom PCB UART0 path into windows not be configured (full duplex) the ROM boot loader will likely fail! 

    You are aware the ROMBL is embedded into the MCU at the factory so you don't need to flash the Serial BL?

    We mostly need to verify why ROMBL struggles to find a COM path or halts/faults the MCU after POR. Please elaborate how the custom PCB is reacting to the UART's connection via CCS debug viewing registers as described below. 

    One must configure CCS XML file to NOT load an application on launch into debug. Once in CCS debug, refresh continuous and peek the UART0 registers. Then establish a console connection to custom PCB UART0 via the virtual COM port inside CCS debug. Do you see any activity in the UART registers or console window?

  • ***  LIKE  ***      Poster's (selective) responses - add to his delay & frustration...

    Very nice detail - one (hopes) it will be appreciated.

  • digvijay khambe said:
    So is there solution to it or not??  I really need it .

    That's a COMMAND - is it not?      Not especially recognized as, 'DRAWING OTHERS' - to your AID!       Allowing your frustration to 'overflow' upon others (who devote time/effort - in YOUR Behalf) displays immaturity...    NONE HERE - by any means - caused YOUR ONGOING PLIGHT!

    My recent post - argued that (it is likely) that Vendor must provide "EVEN FURTHER DETAIL" - as MANY (not just you) appear 'Over-Challenged'  - by the (multiple) demands - imposed by the bootloader(s).   

    As to solution - 'IF and UNTIL you can 'Master the bootloader' - a PROVEN ALTERNATIVE - WAS PRESENTED!     (Despite your frustration's speaking - myself/others - DO HOPE that you (finally) succeed.)

  • It is possible to use the ROM based bootloader to reprogram a device. The application must disable all interrupts before calling the ROM based bootloader. It is always best to develop your code that calls or uses a bootloader on a board with JTAG access so that you can debug it during the development process.
  • Bob Crosby said:
    It is possible to use the ROM based boot loader to reprogram a device. The application must disable all interrupts before calling the ROM based boot loader

    How is that possible if the flash must be erased in order ROM boot loader to see 0xFFFF.FFFF at address 0x4?

    Does the embedded ROM-BL have a similar flash erase function and it clears the EN bit of BOOTCFG?

    If so that is great news for existing applications that in the past called firmware update function via the serial boot loader.

  • The application would configure UART0 and then call "ROM_UpdateUART()" which is declared in rom.h. This entry point into the ROM based bootloader bypasses the check for blank flash at the first 8 bytes and the uart configuration.
  • That is - without doubt - simply 'wonderful detail.'      That said - is this info well marked - even highlighted - anywhere else?     Clearly long-time poster/user BP101 - had 'No Such Knowledge!"

    Surely, 'Not your Job' - yet does this not further, "MAKE THE CASE" for "EVEN FURTHER EXPLANATORY DETAIL" - SUCH AS  THAT YOU'VE JUST REVEALED?    

    The fact that SO MANY - Stumble & Struggle w/ANY/ALL of the bootloaders - strongly points to the, "SERIOUS REQUIREMENT FOR ADDED DETAIL!"     (And that - beyond the often VITAL, "Bits & Pieces" (such as your post above) which will soon, "Rotate into Forum Oblivion!")     (and only rarely - if ever -  be  viewed again...)

  • CB1,
    You are correct. The ROM bootloader does need to be better documented. Since we have more documentation and examples on the flash based bootloader, people may think that it is required to use a flash based bootloader to reprogram code. I will add this to my ever growing list of things that needs more attention.
  • I believe the blank check Bob is referring to is in bl_check.c which is called from bl_startup_ccs.s which appears to be in all boot loader examples:

    uint32_t
    CheckForceUpdate(void)
    {
    #ifdef CHECK_CRC
        uint32_t ui32Retcode;
    #endif
    
    #ifdef BL_CHECK_UPDATE_FN_HOOK
        //
        // If the update check function is hooked, call the application to determine
        // how to proceed.
        //
        return(BL_CHECK_UPDATE_FN_HOOK());
    #else
        uint32_t *pui32App;
    
    #ifdef ENABLE_UPDATE_CHECK
        g_ui32Forced = 0;
    #endif
    
        //
        // See if the first location is 0xfffffffff or something that does not
        // look like a stack pointer, or if the second location is 0xffffffff or
        // something that does not look like a reset vector.
        //
        pui32App = (uint32_t *)APP_START_ADDRESS;
        if((pui32App[0] == 0xffffffff) ||
           ((pui32App[0] & 0xfff00000) != 0x20000000) ||
           (pui32App[1] == 0xffffffff) ||
           ((pui32App[1] & 0xfff00001) != 0x00000001))
        {
            return(1);
        }

  • Bob,

    Thank you - much appreciated.     As a (past) tech writer (one of several 'hats') at another semi 'giant' - I realize that the "documentation is (never) - REALLY DONE!"     Yet - as you and numerous (vendor & client-user) others MUST have noted - a "Far too high" percentage of  users - FAIL (and badly)  when they attempt to employ the  bootloader.     It is good to know  such HAS been NOTED - and has 'landed' upon (some) list...

    To Peter - you don't really expect - each/every client-user - to resort to "Digging Thru" every single source file - to ONLY THEN (maybe) "DISCOVER" - vitally needed data.

    I'm suggesting - instead - that  far clearer & further detailed, "Bootloader Specifc Instructions" be introduced.      

    Such AVOIDS - the PAINFULLY OBSCURED method - which you (somehow) appear to suggest!     (Even though - and especially though - you note '(that) code - appears in all bootloader manifestations!')    Has it not  been MISSED - by  both outside posters - herein?    (thread author & BP101)    That  IS a 100%  MISS-RATE - is it not?     

    Are you arguing instead - that, "NO Such Improved/Extended - Descriptive/Guiding - Superior Bootloader Effort be launched?"      Really?

  • I would not say source is a substitute for documentation. My intent is to be helpful in small amounts and expand my own understanding.

    I share some gripes on documentation. In this case, bl_check.c is documented in section 9.11 of the TivaWare Boot Loader guide (SPMU301D). The shortcoming is knowing if the ROM_ API calls this function.

    Note the words "I believe". Its a guess! TI would get immediate value with little effort by specifying the source code projects used to make the ROM functions. This would take less time than comprehensive documentation. It would be difficult to comb through as you say, but not impossible. There is merit to source.

    As it stands, some questions are only possible to answer if a TI employee takes the time to answer. I do not think BP101's question could be answered given infinite time. Another example of a related impossible question is here: e2e.ti.com/.../301719

    As you state in the thread, The "verified" answer appears to me to be just, "pencil verified."

    Another gripe, the documentation is scattered. Answers come from source code, cdoc, pdfs, and the wiki. A diligent engineer has to comb through all these sources to reach the point of requesting help. This incentivizes poor integrity. Should I spend time looking for answers that may not exist, or should I be lazy and post a new thread?

    To give credit to TI, many questions I see posted could be answered by opening up the docs/ folder of a TivaWare install. I have respect for the work done.

  • You are NOT alone in having respect for the work done.    However - even 'work done' - as daily proven here - can be improved!     (And in proportion to the volume of Failures - Bootloader surely warrants (further) attention...)

  • Bob Crosby said:
    The application would configure UART0 and then call "ROM_UpdateUART()" which is declared in rom.h

    So your saying ROMBL clears the BOOTCFG register EN bit inside the embedded function "ROM_UpdateUART()" and is a high level device class call in rom.h.

    Similarly Piccolo makes use of pre-written library class calls to invoke embedded motorware functions in several different MCU's. The motorware InstaSpin functions for one and later ROM class calls to invoke FOC spin algorithms, more specifically without InstaSpin library calls. It was hard to first grasp not all F286x MCU had the embedded InstaSpin class calls but make use of class calls to FOC spin algorithms all F286x are said to include.   

    Perhaps the ROM embedded device class calls might be key to creating a simple PDF or (rombl.c) for access to all the embedded functions. 

    Thanks Bob for needed clarification! :) 

  • BP101 said:
    So your saying ROMBL clears the BOOTCFG register EN bit inside the embedded function "ROM_UpdateUART()"

    No, what I am trying to say is that there are three ways to call the ROM bootloader.

    1. If the first 8 bytes of the flash are blank (0xFF), the ROM bootloader runs and loops checking the different peripherals for connection to a device that establishes the boot loading protocol.

    2. If the boot configuration non-volatile register is programmed to select a GPIO pin for boot loader activation and that GPIO pin is in the state selected when reset is released, then the ROM bootloader runs.

    3. If the application makes a specific call to one of the bootloader update functions in ROM, such as "ROM_UpdateUART()". In this case the peripheral must be initialized by the application before calling the ROM_Updatexxxx function.

    It is this third method that I was referring to in my earlier post.

  • Bob Crosby said:
    1. If the first 8 bytes of the flash are blank (0xFF), the ROM bootloader runs and loops checking the different peripherals for connection to a device that establishes the boot loading protocol.

    Oddly datasheet ROM boot loader BOOTCFG register text states it only checks location (0x4) for 0xFF.

    Bob Crosby said:
    2. If the boot configuration non-volatile register is programmed to select a GPIO pin for boot loader activation and that GPIO pin is in the state selected when reset is released, then the ROM bootloader runs.

    It was not made very clear in datasheet Port H pins being set bypasses the blank check via EN pin of BOOTCFG register, good to know flash erase is not required. 

    Bob Crosby said:
    3. If the application makes a specific call to one of the bootloader update functions in ROM, such as "ROM_UpdateUART()". In this case the peripheral must be initialized by the application before calling the ROM_Updatexxxx function.

    Tested this method yesterday calling ROM_UpdateEMAC(120000000). Typically we call serial boot loader via INT 0x02 to upload *.bin to the target from TFTP server. The Apps update call to ROM_update EMAC() turns off flashing LEDS, clears NVIC interrupts, disables watchdog then faulted the MCU while the client posted a message "Can not find the BootP server." EMAC0 was being used by the application telnet port that uploads (*.bin) from the GUI embedded TFTP server to the target. Not sure what is faulting the MCU but suspect the call semaphore for target Bootp server wrapper is bugged.

    Also tested ROM_UpdateUART() (TM4C1294KCPDT) but use UART3 for virtual COM via TM4C123 ICDI and it too faulted the MCU. Even had LM Flash set up for the virtual COM port and posted similar message. May later test this again but find the Tivaware ROM  PDF is highly lacking any details relative to the embedded functions steps of execution.

  • As an after thought why MUC faulting ; Wonder if the ROM calls expect an application has (not) been previously flashed offset 0x0? Perhaps expects UART/EMAC vector tables exists above 0x0 at offset 0x0000.4000 and overwrites the current vector table configuration in the process of update?

    That would be a deal breaker if ROM update expects (0x0000.4000) offset vector table. In my mind that defeats the idea of an ROM embedded flash utility, so we do not have to offset the application to 0x0000.4000 to make space for serial boot loafers vector table.

  • Hello Digvijay Khambe,
    There has been a lot of discussion on this thread, but I have not heard back from you. Has your question been answered?
  • respected sir,
    Because of other urgent work i have not implemented the changes yet. i will get back to you within two days. So please do not close the thread. Otherwise unnecessarily i have to create new thread which i dont want to do.

    Regards,
    Digvijay.
  • Thank you for the reply. That is not a problem. I will not close the thread and it can stay open for 30 days after the last reply before it will be automatically closed.
  • Respected sir,

             

    BP101 said:
    You remain silent as to how custom PCB UART0 is being connected into PC, e.g, no posted schematic or answer to Bob's or CB1's very same question.

             I am using  UART circuitry which used for general communication. I have tested it for transmit and receive operation. I have boot loaded the embedded firmware using UART0. So uart circuitry is not a problem. Problem is with TI-RTOS application. I am not able to call update (boot loader) function from TI-RTOS application.

  • Respected sir,

                Thanks for the simple explanation like this.

           

    Bob Crosby said:

    If the boot configuration non-volatile register is programmed to select a GPIO pin for boot loader activation and that GPIO pin is in the state selected when reset is released, then the ROM bootloader runs.

         As you suggested in the second option I tried to configure the GPIO pin for bootloader activation. but what I found is that i can select the GPIO pins from particular ports only. And port i have selected is not from those particular ports given in bootloader. I have kept some free GPIO pins but for my amazement all are useless. So I am unable to implement this option. So i am left with the third option only.

    Bob Crosby said:
    3. If the application makes a specific call to one of the bootloader update functions in ROM, such as "ROM_UpdateUART()". In this case the peripheral must be initialized by the application before calling the ROM_Updatexxxx function

                    From all information gathered till now, i can conclude that to implement this third option i have to add some intelligence (like gpio interrupt) in my TI-RTOS application to call the function  "ROM_UpdateUART()".  After calling this function the controller will go into update mode (hopefully without any fault). Please correct me if i am wrong.

                  Also BP101 has mentioned that by keeping 0x0000.4000 as offset leads to the fault condition.   So which offset should i  keep 0x0000.0000 or 0x0000.4000??

     

    regards,

    digvijay

  • The 0x4000 address is cited because the chip deletes flash in 16kB sectors. Section 8.2.3.10 of the datasheet says this. 0x4000 is the first 16kB boundary after 0. Most bootloaders will fit in 16kB so most applications with a flash based bootloader would start a the first boundary and the vector table is the first thing. Suppose your boot loader is 17kB; you would want to preserve the first 2 16kB sectors, so your app would start at address 0x8000.

    The processor uses 4 byte words so you can't start at an odd address. You can start forward of a 16kB boundary, but you would be wasting memory.

    This offset is used by flash based bootloaders as APP_START_ADDRESS (as seen in my cited code). It is not clear to me what the ROM bootloader uses as APP_START_ADDRESS hence BP101's question. I assume it expects the vector table at 0.

    I am also open to corrections.

    Edit: by vector table, I mean interrupt and reset vector table. The ROM functions are in a ROM based vector table.

  • Respected sir,

                    Thanks for quick reply.  The flash boot loader has the boot loader placed at 0x0000.0000 and application at 0x0000.4000 but in ROM boot loader there is no boot loader placed at 0x0000.0000. So if we keep app at 0x0000.4000 the memory between 0x0000.0000 and 0x0000.4000 is empty. And i think this is the reason it gives fault.  I need to check it in lab. Anyway am i write about the steps to update TI-RTOS application except for the offset part??

    Regards,

    Digvijay

  • I assume the ROM bootloader places everything at address 0. You might be able to tell it an offset. The RTOS itself expects the vector table at a certain address as specified in the HWI module.

    Try changing everything to start at address 0 and see if it works. I don't think you need to leave 0 through 0x4000 empty when using a ROM bootloader.
  • Yes, for the ROM bootloader your application code starts at location 0x00000000 with a stack pointer and a reset vector, just like when not using a bootloader. Remember to disable all interrupts and to configure UART0 before calling ROM_UpdateUART().
  • Hi Digvijay,

    It was 3rd option I tested with ROM_EMAC(120000000) with application offset 0x0. The target after MCU fault then posted message "Can not find Bootp server". Please let us know if you too receive this same message or not. The other call ROM_UART() only supports UART0 typical RTOS device, simply call Board_initUART(); ,, recall the interrupt was part of the load loggers configuration. 

    Also expected to use Option 2 - GPIO pin H3 since it is the last pin on port H regardless BOOTCFG register default of pin 7, it too is last pin. GPIO with 8 pins must have been for another MCU.

  • Respected sir,

                      I tried boot loading using third method but it did not work. In debugger control goes up to ROM_UpdateUART() but can not track after that. I think i am not able to access ROM functions. I have attached code, LM FLASH programmer configuration and error snap in zip file.

    5504.bootloader.zip

    Regards ,

    Digvijay

  • I am not sure why you would have problems with method 3, calling "ROM_UpdateUART()". That function only supports update by UART0. I have created two simple CCS projects that will run on an EK-TM4C1294XL launchpad and attached them in a single zip file. Project "EK-blinky-ROM_bootloader1" simply flashes alternately LED1 and LED2. If you press and hold user switch 1 until the LEDs stop blinking, you can connect with LM Flash Programmer on the COM port which connects to the launchpad UART0 and reprogram the device. The project "EK-blinky-ROM_bootloader2" is similar, but both LEDS flash simultaneously. You can use LM Flash Programmer to alternate between these two projects.

    /cfs-file/__key/communityserver-discussions-components-files/908/EK_2D00_blinky_5F00_ROM_5F00_bootloader.zip