Page 1 of 3

[Resolved] Development environment, toolchain and build instructions

Posted: Wed Jul 08, 2020 12:05 pm
by GM7WFT
Hi there,

Is there a guide to getting started developing and building the firmware images anywhere? From my first look I don't see anything but I could quite easily have missed it.

73 Gareth GM7WFT

Re: Development environment, toolchain and build instructions

Posted: Wed Jul 08, 2020 1:06 pm
by N1KY

Re: Development environment, toolchain and build instructions

Posted: Wed Jul 29, 2020 3:35 pm
by ok1pt
I'm also trying to compile the project and build my own firmware. I followed the steps in the Roger's introduction as closely as possible, but.. the IDE reported 3 configuration errors (bad MCU type and 2 errors with Clocks), I let it to "repair" the problems, then I built the firmware with 0 Errors and 0 Warnings, flashed the .sgl file to the radio, and... guess what ? It was a brick :-). Reflash with the latest "official" OpenGD-77 firmware revived the radio, so it's fine but I have to search what I did wrong. So, maybe, some supplementary questions:
- Where can we select the target of the firmware (i.e. for which radio type it has to be built)?
- My SDK is reported as 2.8.0, while the files in the git repository seem to come from 2.7.0 (I downloaded the latest SDK as advised in the building introduction).
The following files were modified by the IDE by "repairing problems":
patrol@virtdeb:~/git/OpenGD77$ git diff | grep "^+++"
+++ b/firmware/.cproject
+++ b/firmware/board/clock_config.c
+++ b/firmware/board/clock_config.h
+++ b/firmware/board/peripherals.c
+++ b/firmware/board/peripherals.h
+++ b/firmware/board/pin_mux.c
+++ b/firmware/board/pin_mux.h
... so I believe it was done wrong and resulted in the bricked firmware. I can reset the repository, no problem. I still didn't make any changes to the code, but how to prevent the IDE errors from reappearing?

Re: Development environment, toolchain and build instructions

Posted: Wed Jul 29, 2020 4:33 pm
by F1RMB
Hi,

I don't have much time to make a real answer about the IDE/SDK, but to reset the repo clone (from any location in the repo):
git reset --hard HEAD

then 'git status' will tell you if it's clean or not.


Cheers.
---
Daniel

Re: Development environment, toolchain and build instructions

Posted: Wed Jul 29, 2020 7:21 pm
by ok1pt
Hi Daniel,
yes I know git a bit as a stand-alone tool, and I did exactly this. I was a bit surprised that the IDE didn't detect this change and didn't show any errors (on the next start). So I built the firmware from Clean, and it booted! I also found some #ifdef's in the code which select the target platforms, for now I just don't know where to put appropriate #define's to set them properly (but it seems that for GD-77 platform it's not neccessary to set anything and that it works, so I probably don't need it now).
Thank you very much for your answer.
With regards, Pavel

Re: Development environment, toolchain and build instructions

Posted: Wed Jul 29, 2020 8:28 pm
by F1RMB
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.

Cheers.
---
Daniel

Re: Development environment, toolchain and build instructions

Posted: Thu Jul 30, 2020 3:53 am
by ok1pt
Hi Daniel,
thank you for this very valuable hint! You know, I'm not using such powerful IDEs in my routine programming life, I'm an "old school" Unix-like programmer and what I do best is the typical way of "configure && make && make install" (with eventual editing of the sources by vi :-) ).
So this is something really new for me and especially the MCU configuring parts (where the errors were found initially) is something really complicated - I also built some firmwares for various embedded systems in my history, but again, it was using just .h files for hardware configuration :-).
So, thanks again! I believe I'll train quickly and then maybe I can help with OpenGD-77 a bit I hope :-).
With regards,
Pavel

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

Posted: Tue Sep 08, 2020 1:28 am
by vk7js
Hi All,

I am a totally blind developer and am very new to the xpresso editor/IDE. I'm also having trouble with the firmware. I get no errors when building but when I upload the firmware the radio doesn't boot. I have reverted to the prior version of the firmware. Like the prior user, I also installed 2.8.2 sdk as the instructions said to do so.
.
An answer to the prior user was to click some graphic but I can't do that since I can't see the graphics. Is there a labelled menu item to do whatever clicking the graphic does?
I'm trying to modify the firmware to fix voice prompts when editing a channel name. I've modified the files I need but can't test the modifications.
It might be easier to remote into my system and adjust the IDE.
Plese contact me via my email joestephen@skymesh.com.au or skype me at joestephen.
Thanks
Joe
vk7js

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

Posted: Tue Sep 08, 2020 1:36 am
by vk7js
BTW I've attached my build log, and my modified files to this msg. The modified files do the following:
1. when arrowing left and right in the channel name field of the channgel details screen, read the char at the cursor rather than repeating the entire field.
2. when backspacing, read the char being backspaced.
3. When entering new text using the keypad, read the preview char and the char entered rather than repeating the entire field.
4. Preven the channel name from being repeated when editing the name.
Joe
vk7js

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

Posted: Tue Sep 08, 2020 5:52 am
by F1RMB
Hi,
vk7js wrote:
Tue Sep 08, 2020 1:36 am
BTW I've attached my build log, and my modified files to this msg. The modified files do the following:
1. when arrowing left and right in the channel name field of the channgel details screen, read the char at the cursor rather than repeating the entire field.
2. when backspacing, read the char being backspaced.
3. When entering new text using the keypad, read the preview char and the char entered rather than repeating the entire field.
4. Preven the channel name from being repeated when editing the name.
Joe
vk7js
I just quicky checked the files you sent, and I have doubts about the code you're using as it's not based on the latest development version.


Cheers.
---
Daniel