mirror of
https://github.com/Koenkk/Z-Stack-firmware.git
synced 2025-02-17 01:31:49 +01:00
Add all MAX_STABILITY firmwares and restructure repo.
This commit is contained in:
parent
694116f99c
commit
e98e0e8c2b
@ -3,10 +3,3 @@ This reposistory contains:
|
||||
- Compiled Z-Stack firmwares (`.hex` files)
|
||||
- If you want to use these to flash to your CC253X (using the [Flash Programmer (not v2)](http://www.ti.com/tool/FLASH-PROGRAMMER) for example), make sure you save the __`raw`__ file (`.hex` file should be around 600kb when saved, not 3.5mb)
|
||||
- Instructions on how to compile them
|
||||
|
||||
### Instructions
|
||||
- Download and install [Z-STACK-HOME 1.2.2a](http://www.ti.com/tool/z-stack-archive).
|
||||
- Download and install [IAR Embedded Workbench for 8051](https://www.iar.com/iar-embedded-workbench/#!?architecture=8051).
|
||||
- Follow instructions from firmware folder.
|
||||
|
||||
*NOTE: For IAR Embedded Workbench for 8051 you need either the full (paid) version or the 30-days evaluation version.*
|
||||
|
@ -1,17 +0,0 @@
|
||||
# CC2530 coordinator firmware
|
||||
1. Copy `..\firmware.patch` to `Z-Stack Home 1.2.2a.44539`
|
||||
2. Open Git Bash, go to `Z-Stack Home 1.2.2a.44539` and apply the patch using `git apply firmware.patch`.
|
||||
3. Open `Z-Stack Home 1.2.2a.44539\Projects\zstack\ZNP\CC253x\znp.eww` with IAR Embedded workbench for 8051.
|
||||
4. You will get a warning: *The project file 'CC253(0/1).ewp' is in an old format. Would you like to convert it for use with this version?*. Press **yes** for both.
|
||||
5. In the dropdown, set target to *CC2530 - ProdHex*.
|
||||
![Target](images/target.PNG)
|
||||
6. Right-click on *CC2530 - ProdHex** (or *CC2530 - ProdSBL for SBL) and press options. Go to C/C++ compiler -> preprocessor. Change the *Defined symbols* to:
|
||||
```c
|
||||
FIRMWARE_CC2530_DEFAULT
|
||||
|
||||
// Uncomment this if you want to compile the SBL (.bin) firmware:
|
||||
// FIRMWARE_SBL
|
||||
```
|
||||
7. Press OK.
|
||||
8. Right-click on *CC2530 - ProdHex** (or *CC2530 - ProdSBL for SBL) and click *Rebuild all*.
|
||||
9. Once finished, you can find the `CC2530ZNP-Prod.hex` file in `Z-Stack Home 1.2.2a.44539\Projects\zstack\ZNP\CC253x\dev`.
|
Binary file not shown.
Before Width: | Height: | Size: 9.1 KiB |
@ -1,19 +0,0 @@
|
||||
# CC2530_CC2591 coordinator firmware
|
||||
1. Copy `..\firmware.patch` to `Z-Stack Home 1.2.2a.44539`
|
||||
2. Open Git Bash, go to `Z-Stack Home 1.2.2a.44539` and apply the patch using `git apply firmware.patch`.
|
||||
3. Open `Z-Stack Home 1.2.2a.44539\Projects\zstack\ZNP\CC253x\znp.eww` with IAR Embedded workbench for 8051.
|
||||
4. You will get a warning: *The project file 'CC253(0/1).ewp' is in an old format. Would you like to convert it for use with this version?*. Press **yes** for both.
|
||||
5. In the dropdown, set target to *CC2530 - ProdHex*.
|
||||
![Target](images/target.png)
|
||||
6. Right-click on *CC2530 - ProdHex** (or *CC2530 - ProdSBL for SBL) and press options. Go to C/C++ compiler -> preprocessor. Change the *Defined symbols* to:
|
||||
```c
|
||||
FIRMWARE_CC2530_CC2591_DEFAULT
|
||||
|
||||
// Uncomment this if you want to compile the SBL (.bin) firmware:
|
||||
// FIRMWARE_SBL
|
||||
```
|
||||
7. Press OK.
|
||||
8. Right-click on *CC2530 - ProdHex** (or *CC2530 - ProdSBL for SBL) and click *Rebuild all*.
|
||||
9. Once finished, you can find the `CC2530ZNP-Prod.hex` file in `Z-Stack Home 1.2.2a.44539\Projects\zstack\ZNP\CC253x\dev`.
|
||||
|
||||
**NOTE:** This Firmware is also compatible with CC2530 + RFX2401 Device like the GBA GB2530S Zigbee USB-Stick.
|
Binary file not shown.
Before Width: | Height: | Size: 9.1 KiB |
@ -1,17 +0,0 @@
|
||||
# CC2531 coordinator firmware
|
||||
1. Copy `..\firmware.patch` to `Z-Stack Home 1.2.2a.44539`
|
||||
2. Open Git Bash, go to `Z-Stack Home 1.2.2a.44539` and apply the patch using `git apply firmware.patch`.
|
||||
3. Open `Z-Stack Home 1.2.2a.44539\Projects\zstack\ZNP\CC253x\znp.eww` with IAR Embedded workbench for 8051.
|
||||
4. You will get a warning: *The project file 'CC253(0/1).ewp' is in an old format. Would you like to convert it for use with this version?*. Press **yes** for both.
|
||||
5. In the dropdown, set target to *CC2531 - ProdHex*.
|
||||
![Target](images/target.png)
|
||||
6. Right-click on *CC2531 - ProdHex** (or *CC2531 - ProdSBL for SBL) and press options. Go to C/C++ compiler -> preprocessor. Change the *Defined symbols* to:
|
||||
```c
|
||||
FIRMWARE_CC2531_DEFAULT
|
||||
|
||||
// Uncomment this if you want to compile the SBL (.bin) firmware:
|
||||
// FIRMWARE_SBL
|
||||
```
|
||||
7. Press OK.
|
||||
8. Right-click on *CC2531 - ProdHex** (or *CC2531 - ProdSBL for SBL) and click *Rebuild all*.
|
||||
9. Once finished, you can find the `CC2531ZNP-Prod.hex` file in `Z-Stack Home 1.2.2a.44539\Projects\zstack\ZNP\CC253x\dev`.
|
@ -1,6 +0,0 @@
|
||||
# Max Devices Alternative Build
|
||||
|
||||
This build makes some alterations in order to support 44 devices and 1 router on a single CC2531 device instead of the typical ~16 devices and ~16 routers.
|
||||
|
||||
To build this version, follow the exact same instructions at `../../README.md` except:
|
||||
- For step 6. Use `FIRMWARE_CC2531_MAX_DEVICES` instead of `FIRMWARE_CC2531_DEFAULT` and go to General Options -> Stack/Heap -> Stack sizes -> and change `XDATA` to `0X300`.
|
@ -1,3 +1,7 @@
|
||||
# 20190315
|
||||
- Restructured repo
|
||||
- Added `MAX_STABILITY` firmware
|
||||
|
||||
# 20190223
|
||||
- Reduced memory footprint
|
||||
- Increased number of routes to remember to 40
|
||||
|
36
coordinator/COMPILE.md
Normal file
36
coordinator/COMPILE.md
Normal file
@ -0,0 +1,36 @@
|
||||
# Compiling the firmware
|
||||
|
||||
## Setup development environment
|
||||
1. Download and install [Z-STACK-HOME 1.2.2a](http://www.ti.com/tool/z-stack-archive).
|
||||
2. Download and install [IAR Embedded Workbench for 8051](https://www.iar.com/iar-embedded-workbench/#!?architecture=8051).
|
||||
|
||||
*NOTE: For IAR Embedded Workbench for 8051 you need either the full (paid) version or the 30-days evaluation version.*
|
||||
|
||||
## Compiling
|
||||
1. Copy `firmware.patch` to `Z-Stack Home 1.2.2a.44539`
|
||||
2. Open Git Bash, go to `Z-Stack Home 1.2.2a.44539` and apply the patch using `git apply firmware.patch`.
|
||||
3. Open `Z-Stack Home 1.2.2a.44539\Projects\zstack\ZNP\CC253x\znp.eww` with IAR Embedded workbench for 8051.
|
||||
4. You will get a warning: *The project file 'CC253(0/1).ewp' is in an old format. Would you like to convert it for use with this version?*. Press **yes** for both.
|
||||
5. Select the correct target:
|
||||
- For CC2531 select *CC2531 - X*
|
||||
- For CC2530 or CC2530_CC2591 select *CC2530 - X*
|
||||
- Depending if you want to compile the `.hex` or SBL firmware select *- ProdHex* or *- ProdSBL*
|
||||
|
||||
![Target](images/target.png)
|
||||
|
||||
6. Right-click on your target and press options. Go to C/C++ compiler -> preprocessor. Depending on what you want to compile, add the following symbols to *Defined symbols*:
|
||||
- Device type: `FIRMWARE_CC2530`, `FIRMWARE_CC2530_CC2531` or `FIRMWARE_CC2531`.
|
||||
- Firmware type: `FIRMWARE_DEFAULT`, `FIRMWARE_MAX_STABILITY` or `FIRMWARE_MAX_DEVICES`.
|
||||
- In case you want to compile the SBL firmware, also add `FIRMWARE_SBL`.
|
||||
|
||||
To compile e.g the default CC2531 firmware, use:
|
||||
```c
|
||||
FIRMWARE_CC2531
|
||||
FIRMWARE_DEFAULT
|
||||
```
|
||||
|
||||
*NOTE: `FIRMWARE_MAX_DEVICES` is only available in combination with `FIRMWARE_CC2531`.*
|
||||
|
||||
7. Press OK.
|
||||
8. Right-click on your target and click *Rebuild all*.
|
||||
9. Once finished, you can find the `CC253(0|1)ZNP-Prod.(hex|bin)` file in `Z-Stack Home 1.2.2a.44539\Projects\zstack\ZNP\CC253x\dev`.
|
@ -1,12 +1,28 @@
|
||||
# Z-Stack coordinator firmware
|
||||
Relative to the default Z-Stack coordinator, the firmware has the following modifications:
|
||||
- Increased memory heap for improved stability.
|
||||
- Improved configuration parameters for larger Zigbee networks.
|
||||
- Increased number of devices that can directly be connected to the coordinator.
|
||||
- Forwarding of all Zigbee group messages, even when the coordinator is not in the group.
|
||||
- Forwarding of Zigbee messages to endpoint 10 and 11 to 1. (required for zigbee-shepherd).
|
||||
- Disabled multicasting to properly address Zigbee groups.
|
||||
- Increased data buffer sizes.
|
||||
- Increased transmit power for CC2530 + CC2591.
|
||||
- Versioning (revision number).
|
||||
- Changes to properly use a CC2530 or CC2530 + CC2591 via UART.
|
||||
# Z-Stack 1.2.2.a.44539 coordinator firmwares
|
||||
This directory contains various CC2530, CC2530_CC2591 and CC2531 coordinator firmwares. There are 3 flavours available: `DEFAULT`, `MAX_DEVICES` and `MAX_STABILITY`.
|
||||
|
||||
## What firmware to choose?
|
||||
As mentioned above, there are 3 different kind of flavours to choose from. What firmware to choose highly depends on what Zigbee network you are planning to use it with. If you don't know what to choose, it's good to start with the `DEFAULT` firmware. Later you can always reflash your device with a different firmware.
|
||||
|
||||
In order to make a good choice, it's recommended to first read [the Zigbee2mqtt FAQ about device limit](http://www.zigbee2mqtt.io/information/FAQ.html#i-read-that-zigbee2mqtt-has-a-limit-of-15-devices-is-this-true) and [Zigbee network](http://www.zigbee2mqtt.io/information/zigbee_network.html).
|
||||
|
||||
### Default
|
||||
- Allows for 15 **directly** connected devices to the coordinator
|
||||
- Should be fine for networks till +- 30/35 devices.
|
||||
|
||||
### Max stability
|
||||
- Allows for 5 **directly** connected devices to the coordinator
|
||||
- Reported to work fine for 50+ devices (limit not known yet)
|
||||
- Should be used when experiencing stability issues with the `DEFAULT` firmware.
|
||||
|
||||
### Max devices
|
||||
- Allows for 44 **directly** connected devices to the coordinator
|
||||
- Should only be used when:
|
||||
- All devices will be in close range of the coordinator
|
||||
- You won't have routers in your network (or almost none)
|
||||
|
||||
## Compiling the firmware
|
||||
In case you want to compile the firmware yourself, read [COMPILE.md](./COMPILE.md).
|
||||
|
||||
## Notes
|
||||
- The CC2530_CC2591 firmware is also compatible with CC2530 + RFX2401 devices like the GBA GB2530S Zigbee USB-Stick.
|
||||
|
@ -1,12 +1,12 @@
|
||||
diff --git a/Components/mt/MT_SYS.c b/Components/mt/MT_SYS.c
|
||||
index 35aae57..176a2ae 100644
|
||||
index 35aae57..a74d800 100644
|
||||
--- a/Components/mt/MT_SYS.c
|
||||
+++ b/Components/mt/MT_SYS.c
|
||||
@@ -2141,6 +2141,21 @@ static void MT_SysSnifferParameters( uint8 *pBuf )
|
||||
*****************************************************************************/
|
||||
static void powerOffSoc(void)
|
||||
{
|
||||
+#if defined(FIRMWARE_CC2530_DEFAULT) || defined(FIRMWARE_CC2530_CC2591_DEFAULT)
|
||||
+#if defined(FIRMWARE_CC2530) || defined(FIRMWARE_CC2530_CC2591)
|
||||
+ HAL_DISABLE_INTERRUPTS();
|
||||
+ STIF = 0; //HAL_SLEEP_TIMER_CLEAR_INT;
|
||||
+ if (ZNP_CFG1_UART == znpCfg1)
|
||||
@ -34,11 +34,11 @@ index 35aae57..176a2ae 100644
|
||||
|
||||
diff --git a/Components/mt/revision_info.h b/Components/mt/revision_info.h
|
||||
new file mode 100644
|
||||
index 0000000..4edc622
|
||||
index 0000000..ca3db55
|
||||
--- /dev/null
|
||||
+++ b/Components/mt/revision_info.h
|
||||
@@ -0,0 +1 @@
|
||||
+#define CODE_REVISION_NUMBER 20190223
|
||||
+#define CODE_REVISION_NUMBER 20190315
|
||||
\ No newline at end of file
|
||||
diff --git a/Components/stack/af/AF.c b/Components/stack/af/AF.c
|
||||
index c6183b6..2b885b6 100644
|
||||
@ -94,19 +94,28 @@ index 242be04..cca4781 100644
|
||||
|
||||
/*********************************************************************
|
||||
diff --git a/Projects/zstack/ZMain/TI2530ZNP/OnBoard.c b/Projects/zstack/ZMain/TI2530ZNP/OnBoard.c
|
||||
index 7c6c77e..b49a5ca 100644
|
||||
index 7c6c77e..c99b840 100644
|
||||
--- a/Projects/zstack/ZMain/TI2530ZNP/OnBoard.c
|
||||
+++ b/Projects/zstack/ZMain/TI2530ZNP/OnBoard.c
|
||||
@@ -24,7 +24,7 @@
|
||||
its documentation for any purpose.
|
||||
|
||||
YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
|
||||
- PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
|
||||
+ PROVIDED �AS IS� WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
|
||||
INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
|
||||
NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
|
||||
TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
|
||||
@@ -144,8 +144,17 @@ void InitBoard( uint8 level )
|
||||
|
||||
#if defined CC2531ZNP
|
||||
znpCfg1 = ZNP_CFG1_UART;
|
||||
+#elif defined FIRMWARE_CC2530_CC2591_DEFAULT
|
||||
+#elif defined FIRMWARE_CC2530_CC2591
|
||||
+ znpCfg1 = ZNP_CFG1_UART;
|
||||
+ znpCfg0 = ZNP_CFG0_32K_OSC;
|
||||
#elif defined CC2530_MK
|
||||
+
|
||||
+ #if defined FIRMWARE_CC2530_DEFAULT
|
||||
+ #if defined FIRMWARE_CC2530
|
||||
+ znpCfg1 = ZNP_CFG1_UART;
|
||||
+ #else
|
||||
znpCfg1 = ZNP_CFG1_SPI;
|
||||
@ -117,10 +126,10 @@ index 7c6c77e..b49a5ca 100644
|
||||
znpCfg1 = P2_0;
|
||||
diff --git a/Projects/zstack/ZNP/CC253x/Source/preinclude.h b/Projects/zstack/ZNP/CC253x/Source/preinclude.h
|
||||
new file mode 100644
|
||||
index 0000000..60cdc2d
|
||||
index 0000000..f1a30c7
|
||||
--- /dev/null
|
||||
+++ b/Projects/zstack/ZNP/CC253x/Source/preinclude.h
|
||||
@@ -0,0 +1,82 @@
|
||||
@@ -0,0 +1,115 @@
|
||||
+// Shared accross all firmwares
|
||||
+#define ASSERT_RESET
|
||||
+
|
||||
@ -164,36 +173,69 @@ index 0000000..60cdc2d
|
||||
+#define HAL_LCD FALSE
|
||||
+#define HAL_ADC FALSE
|
||||
+
|
||||
+#if defined FIRMWARE_CC2531_DEFAULT
|
||||
+/**
|
||||
+ * CC2531
|
||||
+ */
|
||||
+#if defined FIRMWARE_CC2531
|
||||
+ #define CC2531ZNP
|
||||
+ #define NWK_MAX_DEVICE_LIST 15
|
||||
+ #define MAXMEMHEAP 3029
|
||||
+ #define OPTIMIZE_LARGE_NETWORK
|
||||
+
|
||||
+#elif defined FIRMWARE_CC2531_MAX_DEVICES
|
||||
+ #define CC2531ZNP
|
||||
+ #define NWK_MAX_DEVICE_LIST 43
|
||||
+ #define MAXMEMHEAP 3199
|
||||
+ #define MAX_NEIGHBOR_ENTRIES 1
|
||||
+ #if defined FIRMWARE_DEFAULT
|
||||
+ #define NWK_MAX_DEVICE_LIST 15
|
||||
+ #define MAXMEMHEAP 3029
|
||||
+ #define OPTIMIZE_LARGE_NETWORK
|
||||
+
|
||||
+#elif defined FIRMWARE_CC2530_DEFAULT
|
||||
+ #elif defined FIRMWARE_MAX_STABILITY
|
||||
+ #define NWK_MAX_DEVICE_LIST 5
|
||||
+ #define MAXMEMHEAP 3309
|
||||
+ #define OPTIMIZE_LARGE_NETWORK
|
||||
+
|
||||
+ #elif defined FIRMWARE_MAX_DEVICES
|
||||
+ #define NWK_MAX_DEVICE_LIST 43
|
||||
+ #define MAXMEMHEAP 3199
|
||||
+ #define MAX_NEIGHBOR_ENTRIES 1
|
||||
+
|
||||
+ #endif
|
||||
+
|
||||
+/**
|
||||
+ * CC2530
|
||||
+ */
|
||||
+#elif defined FIRMWARE_CC2530
|
||||
+ #define HAL_UART_DMA_RX_MAX 128
|
||||
+ #define NWK_MAX_DEVICE_LIST 15
|
||||
+ #define MAXMEMHEAP 2909
|
||||
+ #define OPTIMIZE_LARGE_NETWORK
|
||||
+ #define ENABLE_MT_SYS_RESET_SHUTDOWN
|
||||
+ #define ZTOOL_P1
|
||||
+ #define CC2530_MK
|
||||
+ #define OPTIMIZE_LARGE_NETWORK
|
||||
+
|
||||
+#elif defined FIRMWARE_CC2530_CC2591_DEFAULT
|
||||
+ #define NWK_MAX_DEVICE_LIST 15
|
||||
+ #define MAXMEMHEAP 2907
|
||||
+ #if defined FIRMWARE_DEFAULT
|
||||
+ #define NWK_MAX_DEVICE_LIST 15
|
||||
+ #define MAXMEMHEAP 2909
|
||||
+
|
||||
+ #elif defined FIRMWARE_MAX_STABILITY
|
||||
+ #define NWK_MAX_DEVICE_LIST 5
|
||||
+ #define MAXMEMHEAP 3189
|
||||
+
|
||||
+ #endif
|
||||
+
|
||||
+/**
|
||||
+ * CC2530 + CC2591
|
||||
+ */
|
||||
+#elif defined FIRMWARE_CC2530_CC2591
|
||||
+ #define ENABLE_MT_SYS_RESET_SHUTDOWN
|
||||
+ #define ZTOOL_P1
|
||||
+ #define HAL_UART_DMA_RX_MAX 128
|
||||
+ #define HAL_PA_LNA
|
||||
+ #define OPTIMIZE_LARGE_NETWORK
|
||||
+
|
||||
+ #if defined FIRMWARE_DEFAULT
|
||||
+ #define NWK_MAX_DEVICE_LIST 15
|
||||
+ #define MAXMEMHEAP 2907
|
||||
+
|
||||
+ #elif defined FIRMWARE_MAX_STABILITY
|
||||
+ #define NWK_MAX_DEVICE_LIST 5
|
||||
+ #define MAXMEMHEAP 3187
|
||||
+
|
||||
+ #endif
|
||||
+
|
||||
+#endif
|
||||
+
|
||||
+#if defined OPTIMIZE_LARGE_NETWORK
|
||||
@ -219,7 +261,7 @@ index 7e524a9..6326400 100644
|
||||
+--preinclude=preinclude.h
|
||||
\ No newline at end of file
|
||||
diff --git a/Projects/zstack/ZNP/Source/znp_app.c b/Projects/zstack/ZNP/Source/znp_app.c
|
||||
index 470ff12..d8ff88e 100644
|
||||
index 470ff12..c646a87 100644
|
||||
--- a/Projects/zstack/ZNP/Source/znp_app.c
|
||||
+++ b/Projects/zstack/ZNP/Source/znp_app.c
|
||||
@@ -390,12 +390,23 @@ static void npInit(void)
|
||||
@ -227,14 +269,14 @@ index 470ff12..d8ff88e 100644
|
||||
|
||||
uartConfig.configured = TRUE;
|
||||
+
|
||||
+#if defined(FIRMWARE_CC2530_DEFAULT) || defined(FIRMWARE_CC2530_CC2591_DEFAULT)
|
||||
+#if defined(FIRMWARE_CC2530) || defined(FIRMWARE_CC2530_CC2591)
|
||||
+ uartConfig.baudRate = HAL_UART_BR_115200;
|
||||
+#else
|
||||
uartConfig.baudRate = ZNP_UART_BAUD;
|
||||
-#ifdef ZNP_ALT
|
||||
+#endif
|
||||
+
|
||||
+#if defined(FIRMWARE_CC2530_DEFAULT) || defined(FIRMWARE_CC2530_CC2591_DEFAULT)
|
||||
+#if defined(FIRMWARE_CC2530) || defined(FIRMWARE_CC2530_CC2591)
|
||||
uartConfig.flowControl = FALSE;
|
||||
#else
|
||||
+ #ifdef ZNP_ALT
|
||||
@ -252,7 +294,7 @@ index 470ff12..d8ff88e 100644
|
||||
HalUARTOpen(HAL_UART_PORT, &uartConfig);
|
||||
MT_UartRegisterTaskID(znpTaskId);
|
||||
+
|
||||
+#if defined FIRMWARE_CC2530_CC2591_DEFAULT
|
||||
+#if defined FIRMWARE_CC2530_CC2591
|
||||
+ //Add TX Setting
|
||||
+ #ifdef HAL_PA_LNA
|
||||
+ ZMacSetTransmitPower(TX_PWR_PLUS_19);
|
||||
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user