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.

Compiling Simple BLE Peripheral

Other Parts Discussed in Thread: CC2540

Hello,

I have the CC2540 Mini Development Kit and version 7.51A of the IAR tools patched to the correct version (L I think).  I can program the mini dongle with the provided hex file (cc2540_ble1.0_slave_keyfob.hex) and have the system work as expected.

Now I want to use the provided source files for this hex file to add some of my own code to the application.  However, currently I cannot compile code that matches the hex file provided.  I am able to compile the code, however the resulting hex file is about half the size of the provided hex file.  I know I need a second output to generate the hex file, since IAR's default output is a .d51 file.  What settings should I use?

Also, is there any reason to believe that the IAR generated hex file will not work with the Smart RF Flash programmer?  If so, what was used to generate the provided hex file?

Thanks,

Marcie

  • I think there is a way to setup IAR.  But another way - would be to upload the HEX file from device using smart rf programmer. 

    -Greg

  • I downloaded the ble stack 1.1a and I rebuilt the provided simpleBLEPeripheral source code without any modifications. I used IAR to do so, but the output file I get is cc2540_ble1.1_keyfob_simpleBLEPeripheral.hex. I am using the smartRF05EB and this output file doesn't run on the board (the device can't be discovered). The cc2540_ble1.1_smartRF_simpleBLEPeripheral.hex file provided with the stack works perfectly, and I was wondering how I could get the source code or modify the current code to get the correct cc2540_ble1.1_smartRF_simpleBLEPeripheral.hex file?

  • Hi Lyne,

    You probably used the wrong build options. In IAR, you can set the build option in the drop-down list in the Workspace area (See attached picture). Please use the "CC2540 Slave" for CC2540EM. You'll find the hex in the C:\Texas Instruments\BLE-CC2540-1.1a\Projects\ble\SimpleBLEPeripheral\CC2540DB\CC2540 Slave\Exe.

    Br