mirror of
https://github.com/Koenkk/Z-Stack-firmware.git
synced 2024-11-29 21:33:22 +01:00
3.0 KiB
3.0 KiB
CC2530, CC2530_CC2591, CC2530_CC2592, CC2531
Setup development environment
- Download and install Z-STACK-3.0.2.
- Download and install IAR Embedded Workbench for 8051.
NOTE: For IAR Embedded Workbench for 8051 you need either the full (paid) version or the 30-days evaluation version.
Compiling
- Copy
firmware_CC2531_CC2530.patch
toZ-Stack 3.0.2
- Open Git Bash, go to
Z-Stack 3.0.2
and apply the patch usinggit apply firmware_CC2531_CC2530.patch --ignore-space-change
. - Open
Z-Stack 3.0.2\Projects\zstack\ZNP\CC253x\znp.eww
with IAR Embedded workbench for 8051. - Select the correct target:
- For CC2531 select CC2531 - ZNP-with-SBL
- For CC2530, CC2530_CC2591, CC2530_CC2592 select CC2530 - ZNP-with-SBL
- If you want to compile the
.bin
firmware, select ZNP-without-SBL
- Right-click on your target and press options. Go to C/C++ compiler -> preprocessor. First remove all Defined symbols and depending on what you want to compile add one of the following:
- Device type:
FIRMWARE_CC2530
,FIRMWARE_CC2530_CC2591
,FIRMWARE_CC2531
orFIRMWARE_CC2530_CC2592
- If you chose for ZNP-without-SBL add
FIRMWARE_SBL
.
- Go to General Options -> Stack/Heap -> Stack sizes -> and change
XDATA
to0x400
. - Press OK.
- Right-click on your target and click Rebuild all.
- Once finished, you can find the
CC253(0|1)ZNP-Prod.(hex|bin)
file inZ-Stack 3.0.2\Projects\zstack\ZNP\CC253x\dev
.
CC2538_CC2592_MODKAMRU_V3
Setup development environment
- Download and install Z-STACK-3.0.2.
- Download and install IAR Embedded Workbench for ARM.
NOTE: For IAR Embedded Workbench for ARM you need either the full (paid) version or the 30-days evaluation version.
Compiling
- Copy
firmware_CC2538_CC2592_MODKAMRU_V3.patch
toZ-Stack 3.0.2
- Open Git Bash, go to
Z-Stack 3.0.2
and apply the patch using:git apply --reject --whitespace=fix firmware_CC2538_CC2592_MODKAMRU_V3.patch
- Open
Z-Stack 3.0.2\Projects\zstack\ZNP\CC2538\ZNP.eww
with IAR Embedded workbench for ARM. - Select
CC2538ZNP-Debug
target. - Right-click on your target and press options. Go to C/C++ compiler -> preprocessor. Depending on what you want to compile, correct the following symbols in Defined symbols:
- to use USB interface:
HAL_UART_USB
,xHAL_UART=TRUE
,xZNP_ALT
; - to use UART interface without flow control:
xHAL_UART_USB
,HAL_UART=TRUE
,ZNP_ALT
; - to use UART interface with flow control enabled:
xHAL_UART_USB
,HAL_UART=TRUE
,xZNP_ALT
.
- Go to Output Converter, check
Generate additional output
checkbox, selectIntel Extended hex
output format and uncheckOverride default
checkbox. - Press OK.
- Right-click on your target and click Rebuild all.
- Once finished, you can find the
ZNP.hex
file inZ-Stack 3.0.2\Projects\zstack\ZNP\CC2538\CC2538ZNP-Debug\Exe\
.