Recompiling KeyFobDemo with IAR

279 views Asked by At

I have the CC2540 Keyfob Development Kit and I have established connections between the bluetooth dongle and the Keyfob and have been able to do simple read writes. Then I connected the CC Debugger and download the SmartRF Flash Programmer and the IAR Workbench. All I want to do is change a few values in the firmware so that it broadcasts indefinitely and so that I can change the name it advertises with. I have read the Getting started docs and the sample applications docs but the problem is I don't know how to edit/compile these files so I can upload it to the device with the SmartRF flash programmer. Is there any documents or tutorials or are there steps to do this? Thank you! Let me know if I can answer any other questions

1

There are 1 answers

0
Osman Esen On BEST ANSWER

All you have to do is:

  1. Download the BLE stack from Texas Instruments website:

http://www.ti.com/tool/ble-stack

Then in the stack, open Projects\ble\KeyFob\CC2540DB\KeyFobDemo.eww file.

  1. Programming CC2540 kit requires an IDE named IAR Embedded Workbench. You can download it and get access with 30-days trial:

http://www.iar.com/Products/IAR-Embedded-Workbench/8051/

  1. Then open the project and find the keyfobdemo.c file in the APP folder. From line 200-213 there is a char array named deviceName[], which actually defines the advertising name as "Keyfobdemo". You just have to change that with correct hex values, and the length of the array as well.

Then in line 236, you have to change attDeviceName[] array as well, since this parameter defines the name of your device, when it is in connected state.