[Resolved] Development environment, toolchain and build instructions

Discussions related to the firmware code development
User avatar
F1RMB
Posts: 2517
Joined: Sat Nov 16, 2019 5:42 am
Location: Grenoble, France

Re: [Resolved] Development environment, toolchain and build instructions

Post by F1RMB » Tue Sep 08, 2020 5:57 am

Also

Code: Select all

bool oldVal=nonVolatileSettings.audioPromptMode;
is wrong, audioPromptMode is an uint8_t, not a boolean.


Cheers.
---
Daniel

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

Re: [Resolved] Development environment, toolchain and build instructions

Post by F1RMB » Tue Sep 08, 2020 5:59 am

Again ;-)

Reading the log, I see git is not found on your system. If you have it installed (under Windows as far as I can see), you need to add its path to the global PATH envvar.


Cheers.
---
Daniel

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

Re: [Resolved] Development environment, toolchain and build instructions

Post by F1RMB » Tue Sep 08, 2020 6:14 am

About the boot problem, I don't see anything wrong, the IDE is building the firmware for a GD77. I don't know which HT you own.
When you are flashing that transceiver, are you uploading the "firmware/Debug_GD-77/OpenGD77.sgl" ?
Also, did you tried to clean the build and rebuild it (menu "Project" -> "Clean...") ?


Cheers.
---
Daniel

OK1TE
Posts: 58
Joined: Tue Sep 29, 2020 7:58 am

Re: Development environment, toolchain and build instructions

Post by OK1TE » Thu Oct 01, 2020 8:17 am

F1RMB wrote:
Wed Jul 29, 2020 8:28 pm
Hi,

You don't have to change the code to build a platform specific version. In the top button bar, one looks like a hammer (IIRC), click on the small arrow on the right, that will display all the platforms in a drop-down widget. Select the one you're interested in, then click the hammer icon, if needed.
Hi,
and how to use the "Release" configuration please? I can build all the debug platforms, but have compilation errors in the Release, mainly connected to GPIO and other definitions.

Thank you,
Jan OK1TE

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

Re: Development environment, toolchain and build instructions

Post by VK3KYY » Thu Oct 01, 2020 10:37 pm

OK1TE wrote:
Thu Oct 01, 2020 8:17 am
F1RMB wrote:
Wed Jul 29, 2020 8:28 pm
Hi,

You don't have to change the code to build a platform specific version. In the top button bar, one looks like a hammer (IIRC), click on the small arrow on the right, that will display all the platforms in a drop-down widget. Select the one you're interested in, then click the hammer icon, if needed.
Hi,
and how to use the "Release" configuration please? I can build all the debug platforms, but have compilation errors in the Release, mainly connected to GPIO and other definitions.

Thank you,
Jan OK1TE
The firmware won't run if you build in Release mode.

The "Debug" builds are effectively release, with the exception of a few files which must have optimisation disabled otherwise the firmware doesn't work.

Please feel free to try to make release build work, but IMO there appears to be a bug in the I2S SDK which prevents that system working correctly if compiled with -oS optimisation

OK1TE
Posts: 58
Joined: Tue Sep 29, 2020 7:58 am

Re: Development environment, toolchain and build instructions

Post by OK1TE » Fri Oct 02, 2020 1:35 pm

VK3KYY wrote:
Thu Oct 01, 2020 10:37 pm
The firmware won't run if you build in Release mode.

The "Debug" builds are effectively release, with the exception of a few files which must have optimisation disabled otherwise the firmware doesn't work.

Please feel free to try to make release build work, but IMO there appears to be a bug in the I2S SDK which prevents that system working correctly if compiled with -oS optimisation
Thanks Roger for explanation.
I'll give Google a try about possible bug in the I2S, but my intuition sugests there might be some variables which should be declared volatile.
Interesting problem, I've saved it in my stack, but now we have more important issues. `-)

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

Re: Development environment, toolchain and build instructions

Post by VK3KYY » Sun Oct 04, 2020 7:15 am

OK1TE wrote:
Fri Oct 02, 2020 1:35 pm
Thanks Roger for explanation.
I'll give Google a try about possible bug in the I2S, but my intuition sugests there might be some variables which should be declared volatile.
Interesting problem, I've saved it in my stack, but now we have more important issues. `-)
I googled for this already and saw the same response, but it does not really help.

AFIK all the variables are already marked as volatile.

Possibly the problem is that one of the internal SDK I2S data structs is being corrupted by something else in the firmware, but it will be a difficult and time consuming bug to track down, for very little gain.

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

Re: [Resolved] Development environment, toolchain and build instructions

Post by VK3KYY » Sun Oct 04, 2020 9:34 am

I've noticed that the Release build is actually useless, because it doesn't define a hardware target.

So I'm going to remove it, as the other option would be to make 4 Release build configuations, one of each of the 4 hardware target (radios), and none of those builds would work.

The Debug builds are a misnomer as well, as hardly any of the files are set to build with debug or even unoptimised, so I may rename them.

OK1TE
Posts: 58
Joined: Tue Sep 29, 2020 7:58 am

Re: Development environment, toolchain and build instructions

Post by OK1TE » Sat Feb 13, 2021 9:32 pm

VK3KYY wrote:
Thu Oct 01, 2020 10:37 pm
IMO there appears to be a bug in the I2S SDK which prevents that system working correctly if compiled with -oS optimisation
"I2S audio subsystem changed to use compiler optimisation"

Is this pre-release note related to this issue? Did you solve it? If yes, congrats! What was it? And do you have a clue how much space did that bring?

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

Re: Development environment, toolchain and build instructions

Post by VK3KYY » Sat Feb 13, 2021 11:06 pm

OK1TE wrote:
Sat Feb 13, 2021 9:32 pm
VK3KYY wrote:
Thu Oct 01, 2020 10:37 pm
IMO there appears to be a bug in the I2S SDK which prevents that system working correctly if compiled with -oS optimisation
"I2S audio subsystem changed to use compiler optimisation"

Is this pre-release note related to this issue? Did you solve it? If yes, congrats! What was it? And do you have a clue how much space did that bring?
I don't think there was a specific bug in I2S code.

When Kai (DG4KLU) wrote the original code, he made a mistake with some of the PLL settings in the MCU, and when I corrected these, but this caused timing problems with the DMR audio / compression pipeline, which I had to fix.

I then tried changing the optimisation on the I2S to see if any of my changes had helped with that problem, and I found that the changes had somehow allowed I2S.c to be optimised.

I also tried to enable optimisation on the codec interface code, however that didn't work, possibly because there is some conflict between, the assembler code in that file and the compiler optimisation setting.

i.e I don't know if you can enable optimisation on a file that contains inline assembler.

I presume you can, but perhaps there is a mistake in that code, which was written by Kai.

However, overall there is not much processing done in the codec interface, and optimisation would make very little difference to the code.

Post Reply