OpenGD77/BUILD.md

3.0 KiB

Toolchain Installation

This project uses the MCUXpresso IDE and the NXP MK22 SDK. Both can be downloaded free of charge, but registration is required.

1) Download the IDE

http://www.nxp.com/mcuxpresso/ide

Click on the "Downloads" tab and then the "DOWNLOAD" button beside "MCUXpresso Integrated Development Environment (IDE)", login or register, and download the current version of the MCUXpresso IDE.

2) Download the SDK

https://mcuxpresso.nxp.com/en/select

Enter "mk22fn512" in the search bar and press enter. Scroll down in the search results and select MK22FN512xxx12 in the "Processors" section. Click "Build MCUXpresso SDK" on the right pane.

On the next page select your operating system and toolchain (MCUXpresso IDE icon "X IDE"). Then click "Download SDK" in the right pane.

Agree to the EULA to download the zip file.

3) Install the IDE

Run the MCUXpresso IDE installer and follow the instructions to complete the installation.

4) Install the SDK

Start the MCUXpresso IDE and drag the SDK .zip file into the "Installed SDKs" panel at the bottom of the IDE. The IDE will ask "Are you sure you want to import the following SDK in the common mcuxpresso' folder?" and display the full path of the .zip file. Click "OK."

Generate the binary data sections from the official firmware

The OpenGD77 firmware uses two binary sections of the official firmware version 3.1.1 which contain the DMR codec (decoder and encoder). These files can not be included as part of the source code repository for licensing reasons. They need to either be manually created or generated by the codec_dat_files_creator.exe windows utility. Details can be found in the linkerdata folder.

Two files will be created in the linkerdata folder, codec_bin_section_1.bin and codec_bin_section_2.bin.

Note: The compiled codec_dat_files_creator.exe attempts to download generic_dmr_codec.bin from a repository that no longer exists. A new approach to obtaining and using this code is required. If you are able to obtain the two .bin files from another source, or have them from a previous build, you can place them in the linkerdata folder and proceed to build the firmware.

Build the firmware

Once the codec data sections have been extracted and decrypted by the utility, open the project in the IDE using "File" - "Open Projects from File System...". Select your OpenGD77 folder.

The project can be built by using the "Project" - "Clean..." menu in the IDE.

When the build is complete, both the raw binary and encrypted firmware files will be created in the Debug_GD-77 folder. There is no point attempting to select a Release build. It will result in the same firmware.

To build for other radios, select "Project" from the IDE menu, then "Build Configurations", "Set Active", and your radio of choice. "Project" -> "Clean..." from the IDE menu will build the firmware. Note the the output folder will be Debug_[radioname].

The .sgl file can be uploaded to the GD-77 using the official firmware loader from Radioddity or using the Windows uploader tool in the tools folder.