Build assistance

Discussions related to the firmware code development
VE3XEJ
Posts: 11
Joined: Sun Jun 07, 2020 3:10 pm

Build assistance

Post by VE3XEJ » Fri Jun 04, 2021 2:20 am

I'm very happy to see that this project continue. Being able to compile my own firmware and experiment with it is awesome.

I just downloaded the latest code (29 May 2021) and it won't build. It still seems to be looking for two binary files, but I understand from the forum that the binary no longer contains the CODEC. Any hints on how to proceed?

(Just to be clear, I'm building for my personal use, not for distribution.)

Code: Select all

Invoking: MCU C Compiler
../source/dmr_codec/codec_bin.S: Assembler messages:
../source/dmr_codec/codec_bin.S:28: Error: file not found: ../linkerdata/codec_bin_section_1.bin
../source/dmr_codec/codec_bin.S:31: Error: file not found: ../linkerdata/codec_bin_section_2.bin
arm-none-eabi-gcc -DSDK_DEBUGCONSOLE=0 -DCR_INTEGER_PRINTF -DPRINTF_FLOAT_ENABLE=0 -DFSL_RTOS_FREE_RTOS -DSDK_OS_FREE_RTOS -DCPU_MK22FN512VLL12 -DCPU_MK22FN512VLL12_cm4 -D__MCUXPRESSO -D__USE_CMSIS -DNDEBUG -D__REDLIB__ -DPLATFORM_GD77 -I../board -I../include -I../include/usb -I../source -I../ -I../amazon-freertos/include -I../amazon-freertos/FreeRTOS/portable -I../drivers -I../device -I../CMSIS -I../usb/device/class -I../usb/device/source -I../usb/device/include -I../usb/device/source/ehci -I../usb/device/source/khci -I../usb/device/source/lpcip3511 -I../usb/include -I../usb/phy -I../osa -O0 -fno-common -g3 -Wall -c -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -fmerge-constants -fmacro-prefix-map="../source/SeggerRTT/RTT/"=. -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -D__REDLIB__ -fstack-usage -specs=redlib.specs -MMD -MP -MF"source/SeggerRTT/RTT/SEGGER_RTT.d" -MT"source/SeggerRTT/RTT/SEGGER_RTT.o" -MT"source/SeggerRTT/RTT/SEGGER_RTT.d" -o "source/SeggerRTT/RTT/SEGGER_RTT.o" "../source/SeggerRTT/RTT/SEGGER_RTT.c"
 
make: *** [source/dmr_codec/subdir.mk:31: source/dmr_codec/codec_bin.o] Error 1
make: *** Waiting for unfinished jobs....
Finished building: ../source/functions/voicePrompts.c

User avatar
F1RMB
Posts: 2518
Joined: Sat Nov 16, 2019 5:42 am
Location: Grenoble, France

Re: Build assistance

Post by F1RMB » Fri Jun 04, 2021 2:48 am

Hi,
VE3XEJ wrote:
Fri Jun 04, 2021 2:20 am
I'm very happy to see that this project continue. Being able to compile my own firmware and experiment with it is awesome.

I just downloaded the latest code (29 May 2021) and it won't build. It still seems to be looking for two binary files, but I understand from the forum that the binary no longer contains the CODEC. Any hints on how to proceed?

(Just to be clear, I'm building for my personal use, not for distribution.)

Code: Select all

Invoking: MCU C Compiler
../source/dmr_codec/codec_bin.S: Assembler messages:
../source/dmr_codec/codec_bin.S:28: Error: file not found: ../linkerdata/codec_bin_section_1.bin
../source/dmr_codec/codec_bin.S:31: Error: file not found: ../linkerdata/codec_bin_section_2.bin
arm-none-eabi-gcc -DSDK_DEBUGCONSOLE=0 -DCR_INTEGER_PRINTF -DPRINTF_FLOAT_ENABLE=0 -DFSL_RTOS_FREE_RTOS -DSDK_OS_FREE_RTOS -DCPU_MK22FN512VLL12 -DCPU_MK22FN512VLL12_cm4 -D__MCUXPRESSO -D__USE_CMSIS -DNDEBUG -D__REDLIB__ -DPLATFORM_GD77 -I../board -I../include -I../include/usb -I../source -I../ -I../amazon-freertos/include -I../amazon-freertos/FreeRTOS/portable -I../drivers -I../device -I../CMSIS -I../usb/device/class -I../usb/device/source -I../usb/device/include -I../usb/device/source/ehci -I../usb/device/source/khci -I../usb/device/source/lpcip3511 -I../usb/include -I../usb/phy -I../osa -O0 -fno-common -g3 -Wall -c -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -fmerge-constants -fmacro-prefix-map="../source/SeggerRTT/RTT/"=. -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -D__REDLIB__ -fstack-usage -specs=redlib.specs -MMD -MP -MF"source/SeggerRTT/RTT/SEGGER_RTT.d" -MT"source/SeggerRTT/RTT/SEGGER_RTT.o" -MT"source/SeggerRTT/RTT/SEGGER_RTT.d" -o "source/SeggerRTT/RTT/SEGGER_RTT.o" "../source/SeggerRTT/RTT/SEGGER_RTT.c"
 
make: *** [source/dmr_codec/subdir.mk:31: source/dmr_codec/codec_bin.o] Error 1
make: *** Waiting for unfinished jobs....
Finished building: ../source/functions/voicePrompts.c
execute "codec_cleaner -C", it create the two files (move them to the correct location).


Cheers.
---
Daniel

VK3KYY
Posts: 7478
Joined: Sat Nov 16, 2019 3:25 am
Location: Melbourne, Australia

Re: Build assistance

Post by VK3KYY » Fri Jun 04, 2021 7:09 am

The readme in the linkerdata will be updated in the next release, with instructions about this, i.e use the codec cleaner.

It was an oversight on my part not to include information on how to create these files which are filled with 0xFF, as placeholders for the codec sections in the official firmware when its merged by the CPS or standalone loader

G4EML
Posts: 919
Joined: Sat Nov 16, 2019 10:01 am

Re: Build assistance

Post by G4EML » Fri Jun 04, 2021 9:13 am

As far as I can see there is no longer any need to require people to create the two files after downloading.
That used to be necessary when they contained the codec but as they are now just two empty files why not just keep it simple and include them with the download?

VK3KYY
Posts: 7478
Joined: Sat Nov 16, 2019 3:25 am
Location: Melbourne, Australia

Re: Build assistance

Post by VK3KYY » Fri Jun 04, 2021 10:05 am

G4EML wrote:
Fri Jun 04, 2021 9:13 am
As far as I can see there is no longer any need to require people to create the two files after downloading.
That used to be necessary when they contained the codec but as they are now just two empty files why not just keep it simple and include them with the download?
We've never included those files because anyone who upload via SWD debugger needs to have the actual codec sections in that folder.
This includes me and Kai and Alex and possibly some other people.

However when I zip the folder those files would need to be replace by the blank files.

It could be done, but its no different from what we've done in the past, apart from I forgot to write into the readme file how to create the files for this version

User avatar
F1RMB
Posts: 2518
Joined: Sat Nov 16, 2019 5:42 am
Location: Grenoble, France

Re: Build assistance

Post by F1RMB » Fri Jun 04, 2021 4:15 pm

Hi,

Just my 2 cents.

There is no need to put "dummy" binary files inside the source zip file, as it just increase its size, and sources are sources.

If someone is able to install MCUXpresso, the SDK, and unzip the source and the buildtool zip, he can also execute a simple command to create those two files.

Of course, with the current source zip file, the instruction is missing. But that will be solved in the next release.


Cheers.
---
Daniel

G4EML
Posts: 919
Joined: Sat Nov 16, 2019 10:01 am

Re: Build assistance

Post by G4EML » Fri Jun 04, 2021 4:57 pm

I am happy either way. It just seems like an unnecessary complication that could easily be avoided.

User avatar
F1RMB
Posts: 2518
Joined: Sat Nov 16, 2019 5:42 am
Location: Grenoble, France

Re: Build assistance

Post by F1RMB » Fri Jun 04, 2021 5:17 pm

Hi Colin,
G4EML wrote:
Fri Jun 04, 2021 4:57 pm
I am happy either way. It just seems like an unnecessary complication that could easily be avoided.
Maybe we can add a batch + shell script files, in the topdir, called lets say "prepare", that just execute the right command from the right place.
I don't know what Roger think about this.


Cheers.
---
Daniel

VE3XEJ
Posts: 11
Joined: Sun Jun 07, 2020 3:10 pm

Re: Build assistance

Post by VE3XEJ » Sat Jun 05, 2021 1:48 am

F1RMB wrote:
Fri Jun 04, 2021 2:48 am
execute "codec_cleaner -C", it create the two files (move them to the correct location).
Thank you very much!

VE3XEJ
Posts: 11
Joined: Sun Jun 07, 2020 3:10 pm

Re: Build assistance

Post by VE3XEJ » Sat Jun 05, 2021 1:53 am

Thank you -- I'm fine with creating the files.

I also had to drop the "tools" directory from OpenGD77_buildtools into /firmware so that the post-build step would complete and create OpenGD77.bin

Is that last step required now, or should I just be using firmware.bin?

Post Reply