This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Bootloader compliance hex code for C8051F320

Hi, I have CC1101DK433 development board from Texas Instruments which has C8051F320 USB MCU microcontroller. Currently, I don't have a Silabs EC2 Serial Adapter and am using bootloader to program the MCU via USB interface. I'm using Keil uvision 5 (compiler C51 v9.54) for debugging the source code and generating the hex file. I have made the changes in STARTUP.A51 file as prescribed by the TI documentation. But still for the same source code, the hex code that I generate is completely different from the hex file provided by the example library. The hex file generated by my own seems to overwrite the bootloader and Flash Programmer doesn't allow me to upload the hex file into the MCU. Please suggest what could be the reason behind this issue.

Thanks,
Vignesh

  • How have you instructed the linker where to place your code, so the linker knows about the address space already consumed by the boot loader?

  • The following were the guidelines given in the CC1100/CC1150DK, CC1101DK, and C2500/CC2550DK
    Development Kit User Manual Rev. 1.4

    All the example code provided from Chipcon in source code form is for both stand-alone use
    and for use together with the bootloader. It is possible for the user to write applications that are compliant with the SmartRF®04EB bootloader by following the steps below:
    • Target Options
    In the C51 tab: Move the reset vectors to address 0x0800
    • startup.a51
    Either copy startup.a51 from another bootloader compliant application, or make the
    following modifications manually before adding it to the project:
    Move the reset address to 0x0800:
    CSEG AT 0x0800
    ?C_STARTUP: LJMP STARTUP1
    Remove the startup code that clears the internal data memory - at least the
    parts that are used by the bootloader:
    SWRU40C Page 20 of 32
    IF IDATALEN <> 0
    MOV R0,#IDATALEN - 1
    CLR A
    IDATALOOP: MOV @R0,A
    DJNZ R0,IDATALOOP
    ENDIF
    • Add the file bootloader_reservations.c to the project. This file can be found in the
    folder: ..\LIB\Chipcon\srf04\bootloader_reservation
    • Add the file app_descriptor.a51 to the project. This file can be found in the folder:
    ..\INC\CHIPCON\srf04
    • CLOCK_INIT() and IO_PORT_INIT() macros should NOT be included in the
    application code, as this is taken care of by the bootloader
    • Add ebsrf04_bootloader.LIB and/or halsrf04_bootloader.LIB as needed, instead of
    ebsrf04.LIB / halsrf04.LIB.

  • And your next step was to look at the map file and check what address range your created binary makes use of?

  • Hi, Can you please suggest how to do that. I am new to 8051 controllers and using keil software...

    Thanks,
    vignesh

  • Have you spent any time with Keils documentation? Or did you come directly to the forum before checking yourself about the possibility to get map files from the linker?

    Your post came 2 minutes after my post, which doesn't give you much time to try yourself...