[User built own firmware using incorrect libraries] cannot boot DM-1801 R2022022801 with GD-77_V4.3.6.sgl
[User built own firmware using incorrect libraries] cannot boot DM-1801 R2022022801 with GD-77_V4.3.6.sgl
Hi,
I am trying R2022022801 pre-built binary (OpenDM1801.bin and OpenDM1801_JA.bin)
on my DM-1801 but it cannot boot with DMR support by GD-77_V4.3.6.sgl.
Simply program R202202280 only (without DMR support) booted.
And I built R2022022801 from source code on some Linux distros, using
binary-packaged arm-none-eabi toolchain (not MCUXpresso).
The object booted whether DMR blob was installed or not.
But there is no sound when transmitting DMR.
I tested following things, all reproduced the problem.
1. firmware programming tool
- FirmwareLoader.exe (on Windows)
- gd-77_firmware_loader.py (on Linux)
2. Debug/Release build (R2022022801)
3. Linux distro/Compiler version
- Debian-11.2 (arm-none-eabi-gcc-8.3.1)
- void Linux (arm-none-eabi-gcc-9.3.0)
- Arch Linux (arm-none-eabi-gcc-11.2.0)
There is no problem to use with original BF-1801_V2.2.5.sgl firmware,
so I think DM-1801 hardware itself has no problem.
Does anyone have a good idea to shoot this trobule?
I think a small problem prevents to work OpenDM1801 properly.
I am trying R2022022801 pre-built binary (OpenDM1801.bin and OpenDM1801_JA.bin)
on my DM-1801 but it cannot boot with DMR support by GD-77_V4.3.6.sgl.
Simply program R202202280 only (without DMR support) booted.
And I built R2022022801 from source code on some Linux distros, using
binary-packaged arm-none-eabi toolchain (not MCUXpresso).
The object booted whether DMR blob was installed or not.
But there is no sound when transmitting DMR.
I tested following things, all reproduced the problem.
1. firmware programming tool
- FirmwareLoader.exe (on Windows)
- gd-77_firmware_loader.py (on Linux)
2. Debug/Release build (R2022022801)
3. Linux distro/Compiler version
- Debian-11.2 (arm-none-eabi-gcc-8.3.1)
- void Linux (arm-none-eabi-gcc-9.3.0)
- Arch Linux (arm-none-eabi-gcc-11.2.0)
There is no problem to use with original BF-1801_V2.2.5.sgl firmware,
so I think DM-1801 hardware itself has no problem.
Does anyone have a good idea to shoot this trobule?
I think a small problem prevents to work OpenDM1801 properly.
Re: cannot boot DM-1801 R2022022801 with GD-77_V4.3.6.sgl
Hi,
You can't build the firmware with non MCU-Xpresso GCC anymore, as newlib is way too big to fit, redlib has to be used.
About the other problem, did you followed the procedure ?:
viewtopic.php?f=5&t=1770
Under Linux, if you don't want to use Mono, you can use the python script (you need to specify the location of the official firmware, using "-s" command line option, at least once, as the python script store that location for futur usage).
Cheers.
---
Daniel
You can't build the firmware with non MCU-Xpresso GCC anymore, as newlib is way too big to fit, redlib has to be used.
About the other problem, did you followed the procedure ?:
viewtopic.php?f=5&t=1770
Under Linux, if you don't want to use Mono, you can use the python script (you need to specify the location of the official firmware, using "-s" command line option, at least once, as the python script store that location for futur usage).
Cheers.
---
Daniel
Re: cannot boot DM-1801 R2022022801 with GD-77_V4.3.6.sgl
I built R2022022801 code with MCUXpresso 11.5.0 on Debian-11.2/am64.
The object works on my DM-1801 without problem. Very good.
Of course I use python script (gd-77_firmware_loader.py), so there is
no problem about programming tool.
But why official released binary could not work on my DM-1801?
Is there any differences between MCUXpresso?
And why newlib-nano based binary works?
You said that newlib (maybe newlib-nano) is too big to fit,
but actually I obtained working object with a minor problem.
The problem is already I wrote --- simply no sound on DMR Tx.
I found that sound level meter shows zero when pushing PTT switch.
I added a code and checked eDMA works. I think there is something wrong
between microphone and I2S-DAC path.
I replaced newlib-nano to picolibc (https://github.com/picolibc/picolibc)
but same problem have occured.
You think "no need to support other (non-MCUXpresso) build tool",
but how about to use other tools to find hidden problems?
I hope my trial improves the quality of OpenGD77 project.
Here are binaries that I built with redlib(MCUXpresso), newlib-nano and picolibc.
http://uaa.org.uk/gomitext/2022/20220313/
The object works on my DM-1801 without problem. Very good.
Of course I use python script (gd-77_firmware_loader.py), so there is
no problem about programming tool.
But why official released binary could not work on my DM-1801?
Is there any differences between MCUXpresso?
And why newlib-nano based binary works?
You said that newlib (maybe newlib-nano) is too big to fit,
but actually I obtained working object with a minor problem.
The problem is already I wrote --- simply no sound on DMR Tx.
I found that sound level meter shows zero when pushing PTT switch.
I added a code and checked eDMA works. I think there is something wrong
between microphone and I2S-DAC path.
I replaced newlib-nano to picolibc (https://github.com/picolibc/picolibc)
but same problem have occured.
You think "no need to support other (non-MCUXpresso) build tool",
but how about to use other tools to find hidden problems?
I hope my trial improves the quality of OpenGD77 project.
Here are binaries that I built with redlib(MCUXpresso), newlib-nano and picolibc.
http://uaa.org.uk/gomitext/2022/20220313/
Re: cannot boot DM-1801 R2022022801 with GD-77_V4.3.6.sgl
Which release doesn't boot ?
I just flashed my DM-1801 with the stable release of Feb 28th (using the Python script), and it works.
You're talking about XPresso, what about NXP SDK version ?
About my comment about newlib, that was about external build process, using Makefile.
We are using redlib because it's small, really small, and the remaining space is getting tight.
You can do whatever you want, but don't expect any support from us if you're not following the only guaranteed way to compile the firmware.
EDIT: I just recompiled a firmware for the DM-1801, using the latest released source files, then flashed. It works as expected.
EDIT 2: I've done the same with the Japanese version, and it work as well.
Thanks.
---
Daniel
I just flashed my DM-1801 with the stable release of Feb 28th (using the Python script), and it works.
You're talking about XPresso, what about NXP SDK version ?
About my comment about newlib, that was about external build process, using Makefile.
We are using redlib because it's small, really small, and the remaining space is getting tight.
You can do whatever you want, but don't expect any support from us if you're not following the only guaranteed way to compile the firmware.
EDIT: I just recompiled a firmware for the DM-1801, using the latest released source files, then flashed. It works as expected.
EDIT 2: I've done the same with the Japanese version, and it work as well.
Thanks.
---
Daniel
Re: cannot boot DM-1801 R2022022801 with GD-77_V4.3.6.sgl
I used official release R2022022801 at
downloads/releases/R2022022801/firmware/
and MD5 hashes are:
MD5 (OpenDM1801.zip) = 66f5ce5ba8e9c3be53a64e80e509c71c
MD5 (OpenDM1801.bin) = 8abe6811362313395e21397cd2881e22
MD5 (OpenDM1801_JA.zip) = 5f58c1e19a657a2d115bb8277a7ecd96
MD5 (OpenDM1801_JA.bin) = 2baf2e8ffc71bad4ec37656dda3eacd4
No need to show the hash value of GD-77_V4.3.6.sgl because
gd-77_firmware_loader.py calculates SHA256 internally to check the file
integrity.
Flash with OpenDM1801.bin + GD-77_V4.3.6.sgl,
and OpenDM1801_JA.bin + GD-77_V4.3.6.sgl, my DM-1801 could not booted.
No DMR support, that is simply flash OpenDM1801.bin or OpenDM1801_JA.bin,
DM-1801 booted without any problem.
I doubt my DM-1801 is corrupted. But original DM-1801 firmware and
built-from-source-code binary works, so I think this is not hardware
trouble.
To build OpenGD77 from released source code, I simply installed MCUXpresso
11.5.0 (build 7232) on Debian-11.2/amd64 and no extra SDK.
How do I check the version of NXP SDK?
downloads/releases/R2022022801/firmware/
and MD5 hashes are:
MD5 (OpenDM1801.zip) = 66f5ce5ba8e9c3be53a64e80e509c71c
MD5 (OpenDM1801.bin) = 8abe6811362313395e21397cd2881e22
MD5 (OpenDM1801_JA.zip) = 5f58c1e19a657a2d115bb8277a7ecd96
MD5 (OpenDM1801_JA.bin) = 2baf2e8ffc71bad4ec37656dda3eacd4
No need to show the hash value of GD-77_V4.3.6.sgl because
gd-77_firmware_loader.py calculates SHA256 internally to check the file
integrity.
Flash with OpenDM1801.bin + GD-77_V4.3.6.sgl,
and OpenDM1801_JA.bin + GD-77_V4.3.6.sgl, my DM-1801 could not booted.
No DMR support, that is simply flash OpenDM1801.bin or OpenDM1801_JA.bin,
DM-1801 booted without any problem.
I doubt my DM-1801 is corrupted. But original DM-1801 firmware and
built-from-source-code binary works, so I think this is not hardware
trouble.
To build OpenGD77 from released source code, I simply installed MCUXpresso
11.5.0 (build 7232) on Debian-11.2/amd64 and no extra SDK.
How do I check the version of NXP SDK?
Re: cannot boot DM-1801 R2022022801 with GD-77_V4.3.6.sgl
Yep, the FW bin is fine: OpenDM1801.bin = 8abe6811362313395e21397cd2881e22jg1uaa wrote: ↑Wed Mar 16, 2022 12:48 pmI used official release R2022022801 at
downloads/releases/R2022022801/firmware/
and MD5 hashes are:
MD5 (OpenDM1801.zip) = 66f5ce5ba8e9c3be53a64e80e509c71c
MD5 (OpenDM1801.bin) = 8abe6811362313395e21397cd2881e22
MD5 (OpenDM1801_JA.zip) = 5f58c1e19a657a2d115bb8277a7ecd96
MD5 (OpenDM1801_JA.bin) = 2baf2e8ffc71bad4ec37656dda3eacd4
No need to show the hash value of GD-77_V4.3.6.sgl because
gd-77_firmware_loader.py calculates SHA256 internally to check the file
integrity.
And yes, the CPS is checking the sgl checksum.
Not using the SDK is a real bad idea, but it's up to youjg1uaa wrote: ↑Wed Mar 16, 2022 12:48 pmFlash with OpenDM1801.bin + GD-77_V4.3.6.sgl,
and OpenDM1801_JA.bin + GD-77_V4.3.6.sgl, my DM-1801 could not booted.
No DMR support, that is simply flash OpenDM1801.bin or OpenDM1801_JA.bin,
DM-1801 booted without any problem.
I doubt my DM-1801 is corrupted. But original DM-1801 firmware and
built-from-source-code binary works, so I think this is not hardware
trouble.
To build OpenGD77 from released source code, I simply installed MCUXpresso
11.5.0 (build 7232) on Debian-11.2/amd64 and no extra SDK.
How do I check the version of NXP SDK?
The installed SDK is listed in MCUXpresso, in a tab next to .../Tasks/Console/Progress/... ones
BTW, which software are you using to flash the firmware ?
Cheers.
---
Daniel
Re: cannot boot DM-1801 R2022022801 with GD-77_V4.3.6.sgl
I checked there is no SDK version, because I have not installed any SDK yet.
I will install current (newest) version of NXP SDK and it will be help
to write a code for K22 or other MCUs.
But will installing SDK be a hint for solve current my problem?
At least I could obtain good OpenDM1801.bin from released zipball without SDK
on MCUXpresso. Partially work binary can be produced by generic
arm-none-eabi toolchain and Makefile.
The archive contains whole sourcecode to build. Only needs C library,
redlib or (not-recommended) newlib-nano/picolibc.
If it is needed to check using SDK version, we have to check source code
in zipball I think...
And I use both FirmwareLoader.exe (for Windows) and gd-77_firmware_loader.py
(for Linux) to program DM-1801 from downloads/releases/R2022022801/sources_ ... oaders.zip,
the result is no difference. FirmwareLoader-Linux.exe did not work but it is enough to
use Python script.
To check what (patched binary) will be programmed to the transceiver,
I modified gd-77_firmware_loader.py as follows:
Comparing the result of OpenGD77-CPS "Backup MCU ROM", address 0x00004000~
480kbyte region is same as patched binary to be programmed.
I don't know what is programmed when official released binary (at least it
is not work on my GD-1801), but released OpenGD77 programmer for Windows
and Linux(Python script) works completely.
I will install current (newest) version of NXP SDK and it will be help
to write a code for K22 or other MCUs.
But will installing SDK be a hint for solve current my problem?
At least I could obtain good OpenDM1801.bin from released zipball without SDK
on MCUXpresso. Partially work binary can be produced by generic
arm-none-eabi toolchain and Makefile.
The archive contains whole sourcecode to build. Only needs C library,
redlib or (not-recommended) newlib-nano/picolibc.
If it is needed to check using SDK version, we have to check source code
in zipball I think...
And I use both FirmwareLoader.exe (for Windows) and gd-77_firmware_loader.py
(for Linux) to program DM-1801 from downloads/releases/R2022022801/sources_ ... oaders.zip,
the result is no difference. FirmwareLoader-Linux.exe did not work but it is enough to
use Python script.
To check what (patched binary) will be programmed to the transceiver,
I modified gd-77_firmware_loader.py as follows:
Code: Select all
--------
--- gd-77_firmware_loader.py.orig 2022-03-07 22:23:01.078731385 +0900
+++ gd-77_firmware_loader.py.new 2022-03-07 22:23:01.354696415 +0900
@@ -3601,6 +3601,11 @@
print("Error. Firmware file too large.")
sys.exit(-4)
+ f_temp = open("temp.bin", "wb")
+ print(type(decrypted))
+ f_temp.write(bytearray(decrypted))
+ f_temp.close()
+
if (sendInitialCommands(dev, encodeKey) == True):
if (sendFileData(fileBuf, dev) == True):
print("Firmware update complete. Please reboot the {}.".format(outputModes[int(outputFormat)]))
--------
480kbyte region is same as patched binary to be programmed.
I don't know what is programmed when official released binary (at least it
is not work on my GD-1801), but released OpenGD77 programmer for Windows
and Linux(Python script) works completely.
Re: cannot boot DM-1801 R2022022801 with GD-77_V4.3.6.sgl
Hi
It looks like you have a problem to read what I wrote, or that I have trouble making myself understood.
NON MCUXPRESSO WITH SDK BUILDS WON'T WORK.
Is it clear now ?
Hmmm, a 2 seconds check would have told you that FirmwareLoader-Linux.exe is a .Net sotware, requiring Mono on Linux.
EDIT: are you using the latest released flashing tools, and not an older version ?
Cheers.
---
Daniel
Hi,jg1uaa wrote: ↑Sun Mar 20, 2022 9:03 pmI checked there is no SDK version, because I have not installed any SDK yet.
I will install current (newest) version of NXP SDK and it will be help
to write a code for K22 or other MCUs.
But will installing SDK be a hint for solve current my problem?
At least I could obtain good OpenDM1801.bin from released zipball without SDK
on MCUXpresso. Partially work binary can be produced by generic
arm-none-eabi toolchain and Makefile.
The archive contains whole sourcecode to build. Only needs C library,
redlib or (not-recommended) newlib-nano/picolibc.
If it is needed to check using SDK version, we have to check source code
in zipball I think...
It looks like you have a problem to read what I wrote, or that I have trouble making myself understood.
NON MCUXPRESSO WITH SDK BUILDS WON'T WORK.
Is it clear now ?
jg1uaa wrote: ↑Sun Mar 20, 2022 9:03 pm
And I use both FirmwareLoader.exe (for Windows) and gd-77_firmware_loader.py
(for Linux) to program DM-1801 from downloads/releases/R2022022801/sources_ ... oaders.zip,
the result is no difference. FirmwareLoader-Linux.exe did not work but it is enough to
use Python script.
Hmmm, a 2 seconds check would have told you that FirmwareLoader-Linux.exe is a .Net sotware, requiring Mono on Linux.
Code: Select all
~ $ file FirmwareLoader-Linux.exe
FirmwareLoader-Linux.exe: PE32 executable (console) Intel 80386 Mono/.Net assembly, for MS Windows
All the provided flashing tools works, under Linux and Windows, I don't know what you are trying to do. If you are a software dev, I guess reading the Python code will tell you everything.
EDIT: are you using the latest released flashing tools, and not an older version ?
Cheers.
---
Daniel
Re: cannot boot DM-1801 R2022022801 with GD-77_V4.3.6.sgl
Hello,
I think that "official released OpenGD1801.bin does not work on my DM-1801" is the problem, it should be fixed if other person reports same issue.
To check OpenGD77 code is sane, I tried to build OpenDM1801.bin with "mandatory" MCUXpresso and it works fine.
This is no problem.
I also tried "not recommended" arm-none-eabi generic toolchain, it looks work but no transmit sound on DMR.
This might be a minor problem, but I treat as no problem because you do not want to support not-MCUXpresso build (yes I know!).
But I hope this information improves a quality of OpenGD77, if any bug is hidden.
But something goes wrong, so I abondoned use mono app. Python script is good enough to use.
Best regards,
Sorry for my poor English, but please read carefully that I wrote.
I think that "official released OpenGD1801.bin does not work on my DM-1801" is the problem, it should be fixed if other person reports same issue.
To check OpenGD77 code is sane, I tried to build OpenDM1801.bin with "mandatory" MCUXpresso and it works fine.
This is no problem.
I also tried "not recommended" arm-none-eabi generic toolchain, it looks work but no transmit sound on DMR.
This might be a minor problem, but I treat as no problem because you do not want to support not-MCUXpresso build (yes I know!).
But I hope this information improves a quality of OpenGD77, if any bug is hidden.
Of course I know. I ran FirmwareLoader-Linux.exe with mono on Debian-11.2.
But something goes wrong, so I abondoned use mono app. Python script is good enough to use.
Yes, the flash tools (OpenGD77_FirmwareLoaders.zip) comes from downloads/releases/R2022022801/sources_and_tools/ , latest release.
Best regards,
Re: cannot boot DM-1801 R2022022801 with GD-77_V4.3.6.sgl
Hi,
Have you installed the udev rules ?
Cheers.
---
Daniel
Have you installed the udev rules ?
Cheers.
---
Daniel