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.

Urgent ! CC26xx SimpleBLEPehripheral ext flash OAD sample works only under CCS debug conditions, not in stand alone.

Other Parts Discussed in Thread: CC2640

Hi there,


I have taken the SimpleBLEPeripheral ext flash OAD sample and modified it to my needs, it worked fine under debug conditions in CCS on the SensorTag hardware.

Then, when disconnecting the debugger, nothing worked in stand alone.

I went back to the unmodified project, set up for ext flash OAD. The same, works fine under debug conditions, doesn't work in stand alone.

What do I oversee ?

Ralph

  • Hello Ralph,
    Have you tried to use a fresh battery?
  • of course, in between I flashed the SensorTag hex and hardware works fine, new battery, all fine
  • What are the symptoms? Nothing is working on the sensortag at all?
  • device doesn't enter any BLE advertising. However the red LED starts glowing
  • Hello,
    I made it work by removing the debugger from the SensorTag when running stand alone.

    DevPack rev 1.2
    SensorTag rev 1.2
    Chip Revision: 2.2
  • Noop, not here don't forget that the firmware should be flashed using FlashProgrammer 2. I tried this as well, taking away the debugger ... nothing then a glowing red LED

    Do I miss a module? How about the BIM ? The application is complete with app and stack ? or do I need to add the BIM project ?
  • You need the BIM! Please refer to the Building the Firmware section of the SensorTag User's Guide, available on the TI BLE Wiki.


    Best wishes

  • yepp, works, however, I tried merging the three .hex images using hexmate.exe and got an error saying first character in BIM_extFlash.hex

    When I checked the files I found that BIM_ExtFlash.hex starts with '%' each line while the other start with a ':' each line.

    Why? is it relative to something while ':' means absolute or similar ?

    Thank you !
  • Hi Ralph,

    : is a start of line indication in intel hex format. When using SimpleBLEPeripheral, you should follow our OAD Users guide. It uses this tool(pypi.python.org/.../2.0) to merge the hex files.
  • so why does the BIM_ExtFlash.hex file lines start with a '%' using same CCS, same compiler and same hex tool ?

    That would answer my question.

    AND this python script DOESN'T WORK AT ALL !!!!

  • C:\ti\simplelink\ble_cc26xx_2_01_00_44423\Documents\CC2640 BLE OAD User's Guide.pdf Section 9 shows how to use the above python script with CCS to build a hex image.
  • Sean, it does not work ! as descriped. Copying the folders is not enough. Python misses a module called IntelHex.
    newest(latest) Python2.7 with latest version of hex_merge.py downloaded from given link.

    Your colleague seem to use different tools for that reason as well.

    Hexmate is provided by Microchip IDE and a tool that works.

    I just would have to know why in the lines in BIM_ExtFlash.hex start with '%' and not with ':' as in all other .hex files created with CCS

    Why does CCS put '%' at line start in BIM_ExtFlash project ?

    Thanks to anybody who can tell.
  • Ralph, you are seeing this error because you have not installed the intel hex module that is included for download at the link that I have provided. Please install the module as per the documentation at the link provided.

    I am not sure why you are seeing % at each newline try to add "${CG_TOOL_HEX}" -order MS --memwidth=8 --romwidth=8 --intel -o "${ProjName}.hex" "${ProjName}.out" as a post build script step in CCS. This  yields a BIM_extFlash.hex that starts with : at each line. 

  • Sean,

    it DOES HAPPEN IF you use the ARM hex utility in the IDE if you just activate it not giving any parameters. I have overseen that the other hex files are created with the post build tool and activated the ARM hex utility.

    It is nowhere mentioned that the BIM_ExtFlash project has this post step not defined by default.

    And I totally disagree with 'described in great details' about the hexmerge script. All you say there is that the hexmerge.py is expected under ---/scripts in the Python install dir. It is not mentioned that you have to copy some folders to there. hexmerge.py is found and starts running through's then however an error 'missing module IntelHex'

    see build log

    c:/Python27/python "C:/Python27/Scripts/hexmerge.py" -o "C:/Users/start/Dropbox/CCS workspace stack 2.1/SimpleBLEPeripheral/FlashOnly_ST_OAD_ExtFlash/OAD_IMAGE_FULL.hex" -r "1000:1CFFF" --overlap=error "C:/Users/start/Dropbox/CCS workspace stack 2.1/SimpleBLEPeripheral/FlashOnly_ST_OAD_ExtFlash/SimpleBLEPeripheral.hex":1000:EFFF "C:/Users/start/Dropbox/CCS workspace stack 2.1/SimpleBLEPeripheral/../SimpleBLEPeripheralStack/FlashROM/SimpleBLEPeripheralStack.hex":F000:1CFFF
    Traceback (most recent call last):
      File "C:/Python27/Scripts/hexmerge.py", line 178, in <module>
        sys.exit(main())
      File "C:/Python27/Scripts/hexmerge.py", line 139, in main
        import intelhex
    ImportError: No module named intelhex
    gmake[1]: [post-build] Error 1 (ignored)

    Note that the whole intelhex-2.0.zip does not include any file named intehex what ever. So the OAD guide is far from a great description on Python.

    Note also, that this is the original post build command, untouched, from the TI resource viewer AND IT DOES NOT MERGE THE BIM HEX. what guided me to this thread and problem.


    I find it a bit sharp that I have to install python environment to run a simple script.


    I use successfully hexmate.exe what you can download here  

    Thanks for your help

  • Hi Ralph,

    Thanks for the tip on Hexmate. In general, as you have shown, you can use any tool to merge hex files that conforms to the respective hex format standard (in this case, Intel hex). In some setups, the IntelHex tool requires a registry edit to make it work, that should be documented on the respective tool webpage. Again, this is not a TI developed or supported tool.

    Regarding the Intel hex output in CCS, I was able to generate the ":" format by enabling intel hex in the Proj Properties, ARM Hex Utility -> Output Options -> Output Format: --intel, -i. This required first enabling the ARM Hex Utility from the top menu. The settings that Sean provided has this switch as well. Hopefully you are producing the proper hex format now.

    Best wishes
  • Ralph,

    Apologies about any misunderstanding we may have had. Thank you for your feedback. We will incorporate it in the next revision of the OAD users guide, hopefully making it easier to use.
  • Anyhow,
    which files should we copy to the "c:/Python27/Scripts" folder to be able to run the hexmerge.py?