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.

DK-TM4C129X: Bootloader for dk-tm4c129x

Part Number: DK-TM4C129X

Hi,

I was trying to create a flash based bootloader for TM4C129 microcontroller (UART0 Bootloader).... I have used files from thread https://e2e.ti.com/support/microcontrollers/tiva_arm/f/908/t/366681 ....

After importing project I am unable to find *.c file to build the project... in the folder I could find a bl_config.h....

In folder /boot_loader there is a bl_main.c file which I tried to add and compile but met with errors....Pls provide  source for creating flash based bootloader....or let me know files to be added to...

Also once I create and program a bootloader file..... What are the modification needed on application project?? Does the linker file be different from the once used normally(ICDI) ??

  • Hi Rakesh,

    I will suggest you start with the flash based bootloader example that comes with the TivaWare package. Please go <TivaWare_installation>\examples\boards\ek-tm4c1294xl\boot_serial.

    Please also reference the bootloader userguide in <TivaWare_installation>\docs\SW_TM4C_BOOTLDR-UG-2.1.4.178.pdf.
  • Hi,

    As suggested I tried boot_serial (ek-tm4c1294xl) and yes I could build the project.....

    Now I ported the bl_config.h to TM4C129 project....added the flies (link) as required to \boot_loader folder.... edited the pre-processor as in image 1.jpg

    Alas I could build the project.....Using JTAG I run the *.out file and try to use LM Flash programmer I get an error msg as shown.....

    When I reset the device and try to use LM Flash programmer I get 3.jpg.... Other that changing Preprocessor definitions what other changes to be done to port to TM4C129XNCZAD??

  • Hi,
    Link e2e.ti.com/.../85249 was helpful to load the boot loader....Now i am able to dump ""blinky.bin"" on to board @ location 0X1000 onwards.....The programmer displays "Program complete 1828 Bytes Programmed"".....I have defined
    #define APP_START_ADDRESS 0x1000
    #define VTABLE_START_ADDRESS 0x1000

    boot_serial.bin size is 2kbytes which is within the range of 0x1000 (4kbytes)....

    But after dumping the bin file i apply reset but could not see the blinky.bin work...if i dump the same blinky file using ICDI the program works...Pls let be know the issue ??.....

    programmer config
    UART Speed 1152
    Transfer 8

    Program address offset 0x1000
  • Hi,
    Can you please start your application at 16k boundary (0x4000) because each erasable sector is 16kB in TM4C129?
  • Hi,

    I configured start address for 0x4000

    But while i tried to configure LM flash programmer to 0x4000 and program it returns

    **ERROR**: Failed to get download command! Return code: 0043
    **ERROR**: Failed to send download command!
    **ERROR**: Failed to program/update the board!

    In LM flash programmers help sheet ""When a flash-based boot loader is present, the boot loader itself is flashed at address 0x0 and the main application image is flashed at a higher address, typically 0x800, 0x1000 or 0x1800 depending upon the specific boot loader in use."" ....

    I am able to load the program to 0x1000 which doesnot make sense as it erases the bootloader itself.....

    does this have anything to do with #define FLASH_PAGE_SIZE         0x00000400??

    PLs let me know

  • 4331.bl_config.hHi,

    Using ICDI i flashed Boot_loader.bin(start addr 0x0000) and blinky.bin ((offset) 0x4000)...... even this didnot yield any result ....I am attaching flash content for this combined .... any issue with my boot loader i am attaching my bl_config.h 

  • My LM Flash programmer version is 1613  .... attaching flash_content_dump attached as *.txt

    0 U��� � � �� � � � -��OuJwLuIwM��ܱwNxOO��3O�C
    �#`�F`M!�iF���(@�ЀjHh#hx 8�ŀ@t�����@E�@�@�@𨀡�O�@�� �` E����)h�����`��hh@� O�D8`�8h�R�B��VHh�h���"��F@FF�Ghh@��#h:hF�!`:`�D |���z��?��(#����J����	 `I	�a�B��#�>M��! ��� h)`!)`�G8IHFm(`����S�B <��	(2�@ 0p���� `����F h9`���" h9h�`A�B�	��1�
    E����*h���I��`��hh@�0x@(��D ����B 0p"�����A 0p�������IHF`�����0F!�?��@ 0p���Hh$��F�   $ �@B�, ( ,�@�`����+L h@� ` h � `O� ��O�`d$H$I`c���@�"J������@����h@�`��@������ �������@����h@�`��@������ �������@����
     `$ P`p �`@�0�`��F|�@0� D@$�@� 0  !��_� P�;A�;�B�� _�  A��B��N�P��!��`N�^pGN��P��hA�p`���������o���g�A�N�Q��`���@hG���� �����U�������@��pG��"F
    FFq���*��������*�q���A�!*�A�A*�F*�F
    F���r�;����B���@��� ���pq�|�%FF�hF!���(�Ѐ�!���� h�B�0F���0F������B�����(F!`|�@�!0F�j��(��O��0|��F��o����!�hF�E�!��A�� F��<�$��!�H��(���(�O��0 �O�Qh���?���_�Hh���?�o�S(� pG pG	Jh���_O�BO�RO��c���Q�B(�"FpG��@F	�I9�i�	���;@`�����F�@F	�I9�i[	��h@�;��pG�@FF! ��;@D����pGIh
    ��h	��pG�@H!��Ŀ� H!����� �� F!�����pG@pG�3]� �� �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� ��������������������������������������������������������������������������������������������������������������������������FF O�%��B����?F��C���?���O��A�@#C���?@(��P'���C���C���'���C���C���'���C���C��	'���C���C��P	'���<C��<�C��<x'���C���C���'���C���C���'���C���C��8	'���C���C���
    '���DC��D�C�@��D���@C��@�C/��@���( ���(C��(��*J�_��у"�*�p�:x�x�:��p�28�*,�*�*$��������*В"�xpI@R"Ћ���у�����C���
    ��p
    Cp
    �p
    �p���xpI@R��`FpG��H�����?����MH�B�HL�B�<�T�xU�! ah@�G���y�
    ML�B��T��G�B�Ѱ��F����$���F@��t�;"�H@�[�[�����R[*��X����[����/E���k0
    $��`����B����|�L F��� F��(��N�!0F���L%�!0F
    F�����B�0F�!*F�����B���@����@����F�`@@
    N��Q��hO��@�@`H�FH�DoF �C�F
    HoF`������(���E��� �����F  �pG�������8�
    LF�h �H���?ЀG
    Hh�G`h�F(F�G h��GHh�G����8��F ����  ��FMOs�$���2Qh�h�hR��B�
    xU�" FIFF�G�����s�d���B����J���#��Q����01�!�~AA�qA�A�ph � pG�F�@J���#��Q����P1�!�~AA�q"A�A�p`pG�F�@S'���4C��4�C���4'��� $
    C�� $�C�� $pG8�"FF#����!F(F����8���I���?�!h	�������I`pGI	`pGpG �� �FF��$�@�! pG���pG pG��pGpG5��31��A� �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������