# Quick start of TI CC2530

**Download and install the following software：**

1. ZStack-CC2530-2.5.1a（Can go to google search to）
   * Assuming the default installation folder C:\Texas Instruments\ZStack-CC2530-2.5.1a
   * After installation is complete, go     [https://github.com/mark-legend/bpi\_g1\_zigbee\_patch](https://github.com/mark-legend/bpi_g1_zigbee_patch)     download hal\_lcd.c file and overwrite the folder C:\Texas     Instruments\ZStack-CC2530-2.5.1a\Components\hal\target\CC2530EB file with the same     name
2. IAR EW8051（The software is compiled BLE's IDE is the same, if you have installed, then the direct use, otherwise the installation yourself, we recommend using IAR EW8051 8.1)

**G1 connection BPI open debugger burn board**

![](https://3328098389-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2HWtR1ORXGh8cjr34f%2F-M2HWvRKw6XOIl6BxR3U%2F-M2HXLwOilr-K57HMX8E%2Fquick%202530%201.png?generation=1584080206287900\&alt=media)

**BPI open debugger check whether the software and hardware are connected**

BPI open debugger board connected to the PC, and check whether the drive is installed, if you can not identify, install SmartRF Studio，The software that comes with the driver. If you can identify that, please give G1 powered.

![](https://3328098389-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2HWtR1ORXGh8cjr34f%2F-M2HWvRKw6XOIl6BxR3U%2F-M2HXLwQ5Y05iy3RdA5g%2Fquick%202530%202.png?generation=1584080205278412\&alt=media)

If the drive is normal, then check the G1 and Open debugger connection is normal. After the G1 to power, press the CC Debugger interface open debuger reset button next.

![](https://3328098389-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2HWtR1ORXGh8cjr34f%2F-M2HWvRKw6XOIl6BxR3U%2F-M2HXLwSk3BKpJECsUKI%2Fquick%202530%203.png?generation=1584080205675961\&alt=media)

If the connection is normal, then the status light next to the CC Debugger interface will turn green, if it is red or other colors, please check whether it is normal or electricity on the G1 G1 is properly connected and Open Debugger.

**Modifications to adapt the code for G1**

1.  Open the file C:\Texas instruments\ZStack-CC2530-2.5.1a\Components\hal\target\CC2530EB\hal\_board\_cfg.h, jump to about 61 lines, will be as

    ![](https://3328098389-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2HWtR1ORXGh8cjr34f%2F-M2HWvRKw6XOIl6BxR3U%2F-M2HXLwUZ47_-zVczARi%2Fquick%202530%204.png?generation=1584080205961001\&alt=media)

    Modified to

    ![](https://3328098389-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2HWtR1ORXGh8cjr34f%2F-M2HWvRKw6XOIl6BxR3U%2F-M2HXLwWa4an5R4c_R5l%2Fquick%202530%205.png?generation=1584080206458777\&alt=media)
2.  Open the file C:\Texas Instruments\ZStack-CC2530-2.5.1a\Components\mac\low\_level\srf04\single\_chip\mac\_radio\_defs.c，jump to about 300 lines, will be as

    ![](https://3328098389-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2HWtR1ORXGh8cjr34f%2F-M2HWvRKw6XOIl6BxR3U%2F-M2HXLwYr5fnz_V7rNUk%2Fquick%202530%206.png?generation=1584080205971713\&alt=media)

    Modified to

    ![](https://3328098389-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2HWtR1ORXGh8cjr34f%2F-M2HWvRKw6XOIl6BxR3U%2F-M2HXLw_ueMV0gAxTDRH%2Fquick%202530%207.png?generation=1584080206252066\&alt=media)

**Compile, download and debug routines SampleApp**

The operation requires two BPI G1 development board, and you need two OLED screens.

1.  Start IAR EW8051 and open SampleApp project, select File> Open from the menu> Workspace

    ![](https://3328098389-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2HWtR1ORXGh8cjr34f%2F-M2HWvRKw6XOIl6BxR3U%2F-M2HXLwbrw6fc8nwBVVF%2Fquick%202530%208.png?generation=1584080205710492\&alt=media)
2.  Browse to C:\Texas Instruments\ZStack-CC2530-2.5.1a\Projects\zstack\Samples\SampleApp\CC2530DB and open SampleApp.eww

    ![](https://3328098389-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2HWtR1ORXGh8cjr34f%2F-M2HWvRKw6XOIl6BxR3U%2F-M2HXLwdVnGLg8KcD8X8%2Fquick%202530%209.png?generation=1584080205818886\&alt=media)
3.  Choose from the list of items CoordinatorEB.

    ![](https://3328098389-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2HWtR1ORXGh8cjr34f%2F-M2HWvRKw6XOIl6BxR3U%2F-M2HXLwfvs65iZG7zuC0%2Fquick%202530%2010.png?generation=1584080207093802\&alt=media)
4.  When debugging code must be downloaded to the device. Select Project> Options from the menu and select Debugger category. In this setup tab, select Texas Instruments as a driver, and then click OK. Figure

    ![](https://3328098389-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2HWtR1ORXGh8cjr34f%2F-M2HWvRKw6XOIl6BxR3U%2F-M2HXLwhRXVw6y3tY-Nj%2Fquick%202530%2011.png?generation=1584080205461376\&alt=media)
5.  Click on the icon to download the program debug button on the device and enter debug mode. Figure

    ![](https://3328098389-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2HWtR1ORXGh8cjr34f%2F-M2HWvRKw6XOIl6BxR3U%2F-M2HXLwjCX_JbcCj5d7i%2Fquick%202530%2012.png?generation=1584080205555250\&alt=media)
6.  Click Debug Step Out button on the column, enter the full speed

    ![](https://3328098389-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2HWtR1ORXGh8cjr34f%2F-M2HWvRKw6XOIl6BxR3U%2F-M2HXLwlaAg_mVIQDz4_%2Fquick%202530%2013.png?generation=1584080206386398\&alt=media)
7.  If there is no problem, a G1 should be is a good writer. Up and running in the following figure

    ![](https://3328098389-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2HWtR1ORXGh8cjr34f%2F-M2HWvRKw6XOIl6BxR3U%2F-M2HXLwnxgSY1OlRWJgr%2Fquick%202530%2014.png?generation=1584080206834164\&alt=media)
8.  Next, another a G1 programming development board. Choose from the list of items RouterEB

    ![](https://3328098389-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2HWtR1ORXGh8cjr34f%2F-M2HWvRKw6XOIl6BxR3U%2F-M2HXLwpBebSNtOgAcmy%2Fquick%202530%2015.png?generation=1584080206280296\&alt=media)
9. Another is a G1 and BPI OPENDEBUGGER connection. After connecting, click the CC Debugger interface again next reset button, look at the status light is green, if not green, check the power supply G1 or G1 with OPEN DEBUGGER the cable is properly
10. Click on the icon to download the program debug button on the device and enter debug mode. Figure

    ![](https://3328098389-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2HWtR1ORXGh8cjr34f%2F-M2HWvRKw6XOIl6BxR3U%2F-M2HXLwrsFOXL20BsL6J%2Fquick%202530%2016.png?generation=1584080206688006\&alt=media)
11. Click Debug Step Out button on the column, enter the full speed

    ![](https://3328098389-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2HWtR1ORXGh8cjr34f%2F-M2HWvRKw6XOIl6BxR3U%2F-M2HXLwtbXApmFE7hSVu%2Fquick%202530%2018.png?generation=1584080206839730\&alt=media)
12. If everything is normal, then the two G1 already up and running, you can see from the two G1 OLED screen they have connected to the

    ![](https://3328098389-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2HWtR1ORXGh8cjr34f%2F-M2HWvRKw6XOIl6BxR3U%2F-M2HXLwvOXgb5M9LDlQ3%2Fquick%202530%2017.png?generation=1584080206584003\&alt=media)
