5. 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:
3. Open `Z-Stack 3.0.2\Projects\zstack\ZNP\CC2538\ZNP.eww` with IAR Embedded workbench for ARM.
4. Select `CC2538ZNP-Debug` target.
5. 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`.
6. Go to Output Converter, check `Generate additional output` checkbox, select `Intel Extended hex` output format and uncheck `Override default` checkbox.
7. Press OK.
8. Right-click on your target and click *Rebuild all*.
9. Once finished, you can find the `ZNP.hex` file in `Z-Stack 3.0.2\Projects\zstack\ZNP\CC2538\CC2538ZNP-Debug\Exe\`.