Espritmodel.com Telemetry Radio
Reply
Thread Tools
Old Mar 25, 2012, 01:54 PM
gytiswb
webe's Avatar
Lithuania, Kaunas
Joined May 2011
71 Posts
Quote:
Originally Posted by callelj View Post
I think the problem is that something is different in our setup. A different compiler could give these types of problems. The code do not work with the compiler used in WinAVR for instance. Since the code is very time critical even a small change can break it. I wish it was a bit more stable but right now it a bit shaky.

Could you compile a clean trunk build on your side and send me the whole G-OSD folder inside the cl-osd folder?
Hi callelj,

I've just done some research on the "strange, flickering GPS data" data problem.
I have lots of experience programming AVR uC's, but all my experience is using CodevisionAVR, so I'm not confident with GCC insides. I've pinpointed routine whitch messes things up, it's a static void calcHome(...). If I put return in the beginning - nothing changes, but if I comment out call to this function - GPS data mess stops. I'm almost sure that there's to few stack space and it messes up data structures passed to "calcHome". I've played with compiler and linker flags - nothing helped. Seems like I and few other who tried building code has some newer compiler and optimizations messes up RAM usage.

Here's my AVRStudio version (from About) window:


Atmel AVR Studio 5 (Version: 5.1.208)
© 2011 Atmel Corp.
All rights reserved.


OS Version: Microsoft Windows NT 5.1.2600 Service Pack 3
Platform: Win32NT


AVR Studio Assembler Language Service
Version: 1.0
Assembly: AVRAssemblyLanguage, Version=5.1.0.0, Culture=neutral, PublicKeyToken=d264112969646cc9
Package GUID: {f12744aa-40f9-4f9c-9e47-5278950de605}
Company: Atmel Corporation


AVR Studio Assembler Project
Version: 1.0
Assembly: Assembler, Version=5.1.0.0, Culture=neutral, PublicKeyToken=d264112969646cc9
Package GUID: {59b1d629-9dcc-43ed-a0fd-8ab0e4d622ab}
Company: Atmel Corporation


AVR Studio Device Service
Version: 1.0
Assembly: DeviceService, Version=5.1.0.0, Culture=neutral, PublicKeyToken=d264112969646cc9
Package GUID: {9a7a9659-4d19-49ce-9838-099ea5896b86}
Company: Atmel Corporation


AVR Studio GCC Language Service
Version: 1.0
Assembly: AvrGCCLanguage, Version=5.1.0.0, Culture=neutral, PublicKeyToken=d264112969646cc9
Package GUID: {2713c90c-7981-454a-aa3e-40ec5867c6fd}
Company: Atmel Corporation


AVR Studio GCC Project
Version: 1.0
Assembly: AvrGCC, Version=5.1.0.0, Culture=neutral, PublicKeyToken=d264112969646cc9
Package GUID: {dce6c7e3-ee26-4d79-826b-08594b9ad897}
Company: Atmel Corporation


AVR Studio Help About
Version: 1.0
Assembly: HelpAbout, Version=5.1.0.0, Culture=neutral, PublicKeyToken=d264112969646cc9
Package GUID: {2b78c895-5b97-4cfe-a33c-1448b2fe89f9}
Company: Atmel Corporation


AVR Studio Object File Debug Project
Version: 1.0
Assembly: ObjProjects, Version=5.1.0.0, Culture=neutral, PublicKeyToken=d264112969646cc9
Package GUID: {5f937198-b7ed-4d9c-af7b-084765938652}
Company: Atmel Corporation


AVR Studio Target Manager
Version: 1.0
Assembly: TargetService, Version=5.1.0.0, Culture=neutral, PublicKeyToken=d264112969646cc9
Package GUID: {862171d0-4dac-4e71-9205-7714a7992e1f}
Company: Atmel Corporation


AVR Studio Target View
Version: 1.0
Assembly: TargetView, Version=5.1.0.0, Culture=neutral, PublicKeyToken=d264112969646cc9
Package GUID: {e7a94af5-431f-41f2-9e51-7f923a6e4da4}
Company: Atmel Corporation


AVR Studio Tool Service
Version: 1.0
Assembly: ToolService, Version=5.1.0.0, Culture=neutral, PublicKeyToken=d264112969646cc9
Package GUID: {ad6d263d-0182-455b-a746-32a8d3a1da72}
Company: Atmel Corporation


Status Service
Version: 1.0.0
Assembly: StatusService, Version=5.1.0.0, Culture=neutral, PublicKeyToken=d264112969646cc9
Package GUID: {4c8f49c3-1a58-4949-86b2-a5223c13a068}
Company: Atmel Corporation


Text
Version: 1.0
Assembly: Microsoft.VisualStudio.Editor.Implementation, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Package GUID: {e269b994-ef71-4ce0-8bcd-581c217372e8}
Company: Microsoft


Visual Assist X
Version: 1.0
Package GUID: {44630d46-96b5-488c-8df9-26e21db8c1a3}
Company: Whole Tomato Software, Inc.


Visual Studio Debugger Managed Package
Version: 10.0
Assembly: VsDebugPresentationPackage
Package GUID: {BEB01DDF-9D2B-435B-A9E7-76557E2B6B52}
Company: Microsoft




ASF
Version: 2.11.1
Package GUID: 519cc26f-02f6-4ace-8bf7-30c1cdea1f02
Company: Atmel
HelpUrl: http://asf.atmel.com/2.11.1

ASF
Version: 2.10.0
Package GUID: 519cc26f-02f6-4ace-8bf7-30c1cdea1f02
Company: Atmel
HelpUrl: http://asf.atmel.com/2.10.0

ASF
Version: 2.9.0
Package GUID: 519cc26f-02f6-4ace-8bf7-30c1cdea1f02
Company: Atmel
HelpUrl: http://asf.atmel.com/2.9.0

ASF
Version: 2.8.1
Package GUID: 519cc26f-02f6-4ace-8bf7-30c1cdea1f02
Company: Atmel
HelpUrl: http://asf.atmel.com/2.8.1

ASF
Version: 2.7.0
Package GUID: 519cc26f-02f6-4ace-8bf7-30c1cdea1f02
Company: Atmel
HelpUrl: http://asf.atmel.com/2.7.0

ASF
Version: 2.6.1
Package GUID: 519cc26f-02f6-4ace-8bf7-30c1cdea1f02
Company: Atmel
HelpUrl: http://asf.atmel.com/2.6.1

ASF
Version: 2.5.1
Package GUID: 519cc26f-02f6-4ace-8bf7-30c1cdea1f02
Company: Atmel
HelpUrl: http://asf.atmel.com/2.5.1



AVRAssembler
Version: 2.1.51.17
Package GUID: 4ef81ed0-2355-4ec8-98b8-f72b79ee5d72
Company: Atmel


AVRGCC
Version: 3.3.1.27
Package GUID: a3796ad3-98fe-4e60-bd15-57100d343560
Company: Atmel


Visual Assist X for AVR Studio
Version: 10.6.1859.5
Package GUID: 7997A33C-B154-4b75-B2AC658CD58C9510
Company: Whole Tomato Software
webe is online now Find More Posts by webe
Reply With Quote
Sign up now
to remove ads between posts
Old Mar 25, 2012, 02:00 PM
Youtube: TomRi25
Dr.Tom's Avatar
Croatia, City of Zagreb, Zagreb
Joined Aug 2010
686 Posts
Quote:
Originally Posted by callelj View Post
I think the problem is that something is different in our setup.

Could you compile a clean trunk build on your side and send me the whole G-OSD folder inside the cl-osd folder?

Thank you for your will to help,

here is the whole G-osd folder, after compiling UNTOUCHED version(freshly downloaded via tortoise VSN app)
Dr.Tom is offline Find More Posts by Dr.Tom
Reply With Quote
Old Mar 25, 2012, 02:24 PM
CL-OSD developer
Sverige, Östergötlands Län, Linköping
Joined Apr 2011
279 Posts
webe and Dr.Tom: Thanks for your help!
It seems as you are right about the stack webe, I can see some differences that might have to do with this.

I'm using 5.1.148 and the problem seems to have started in version 5.1.208.

So the quick fix is to revert you avr studio to a lower version (5.1.148 for ex).

I will try to have a look at what exactly is the problem.

Edit: The only difference in the hex is one byte... :-)
callelj is offline Find More Posts by callelj
Reply With Quote
Old Mar 25, 2012, 02:30 PM
Youtube: TomRi25
Dr.Tom's Avatar
Croatia, City of Zagreb, Zagreb
Joined Aug 2010
686 Posts
thnx,

it would be great if only the avr version is causing all those problems.
it's no problem for me to install older one

will try this(google found it) one then, as you suggested, then report back if it works
http://www.atmel.com/dyn/resources/p....beta-full.exe
Dr.Tom is offline Find More Posts by Dr.Tom
Reply With Quote
Old Mar 25, 2012, 02:37 PM
gytiswb
webe's Avatar
Lithuania, Kaunas
Joined May 2011
71 Posts
Quote:
Originally Posted by callelj View Post
webe and Dr.Tom: Thanks for your help!
It seems as you are right about the stack webe, I can see some differences that might have to do with this.

I'm using 5.1.148 and the problem seems to have started in version 5.1.208.

So the quick fix is to revert you avr studio to a lower version (5.1.148 for ex).

I will try to have a look at what exactly is the problem.

Edit: The only difference in the hex is one byte... :-)
Callelj,

can you pinpoint that different byte in dissasembly file? Looks very interesting
If you are not confident with assembly, just send me your default trunk versions build output folder - I'll look at assembly and try to find the difference.

/me Gone looking for older AvrStudio version...
webe is online now Find More Posts by webe
Reply With Quote
Old Mar 25, 2012, 02:41 PM
CL-OSD developer
Sverige, Östergötlands Län, Linköping
Joined Apr 2011
279 Posts
I think I may have found a solution but I don't have my osd setup right now.
Could any of you try this:
Go to Project->cl-osd Properties...
And then Toolchain->Avr/GNU C Linker->Memory Settings
And in "Initial Stack Address (hex)" clear that box.
Clean and compile, flash and test. :-)
callelj is offline Find More Posts by callelj
Reply With Quote
Old Mar 25, 2012, 02:44 PM
CL-OSD developer
Sverige, Östergötlands Län, Linköping
Joined Apr 2011
279 Posts
Quote:
Originally Posted by webe View Post
Callelj,

can you pinpoint that different byte in dissasembly file? Looks very interesting
If you are not confident with assembly, just send me your default trunk versions build output folder - I'll look at assembly and try to find the difference.

/me Gone looking for older AvrStudio version...
I know some assembly but not enough. The difference is at the end of line 10 of the hex file (42->60).
callelj is offline Find More Posts by callelj
Reply With Quote
Old Mar 25, 2012, 02:47 PM
gytiswb
webe's Avatar
Lithuania, Kaunas
Joined May 2011
71 Posts
Quote:
Originally Posted by callelj View Post
I think I may have found a solution but I don't have my osd setup right now.
Could any of you try this:
Go to Project->cl-osd Properties...
And then Toolchain->Avr/GNU C Linker->Memory Settings
And in "Initial Stack Address (hex)" clear that box.
Clean and compile, flash and test. :-)
Yep! That fixed the problem!

Damn, I've seen that number, but for me it looked just right - stack starts at the end of SRAM and grows down...
webe is online now Find More Posts by webe
Reply With Quote
Old Mar 25, 2012, 02:49 PM
CL-OSD developer
Sverige, Östergötlands Län, Linköping
Joined Apr 2011
279 Posts
Quote:
Originally Posted by webe View Post
Yep! That fixed the problem!

Damn, I've seen that number, but for me it looked just right - stack starts at the end of SRAM and grows down...
Great!
Yes it looks right, I wonder where the stack is placed?
callelj is offline Find More Posts by callelj
Reply With Quote
Old Mar 25, 2012, 02:57 PM
gytiswb
webe's Avatar
Lithuania, Kaunas
Joined May 2011
71 Posts
Quote:
Originally Posted by callelj View Post
Great!
Yes it looks right, I wonder where the stack is placed?
Truth lies somethere in between

Noticed one more flaw:
gAlarmRssi = calcRssiLevel(ANALOG_IN_2) < ALARM_RSSI_LOW;

There's no such function as "calcRssiLevel". Do you happen to still have it's source?
webe is online now Find More Posts by webe
Reply With Quote
Old Mar 25, 2012, 03:04 PM
CL-OSD developer
Sverige, Östergötlands Län, Linköping
Joined Apr 2011
279 Posts
Quote:
Originally Posted by webe View Post
Truth lies somethere in between

Noticed one more flaw:
gAlarmRssi = calcRssiLevel(ANALOG_IN_2) < ALARM_RSSI_LOW;

There's no such function as "calcRssiLevel". Do you happen to still have it's source?
Must be some old code or a part I didn't finish. This should be the correct line:
gAlarmRssi = gSensorRssi < ALARM_RSSI_LOW
callelj is offline Find More Posts by callelj
Reply With Quote
Old Mar 25, 2012, 03:07 PM
gytiswb
webe's Avatar
Lithuania, Kaunas
Joined May 2011
71 Posts
Quote:
Originally Posted by callelj View Post
Must be some old code or a part I didn't finish. This should be the correct line:
gAlarmRssi = gSensorRssi < ALARM_RSSI_LOW
Thanks! I'll try that later... Now I'm trying to get RSSI from OpenLRS displayed correctly.
webe is online now Find More Posts by webe
Reply With Quote
Old Mar 25, 2012, 04:19 PM
Youtube: TomRi25
Dr.Tom's Avatar
Croatia, City of Zagreb, Zagreb
Joined Aug 2010
686 Posts
Quote:
Originally Posted by callelj View Post
I think I may have found a solution but I don't have my osd setup right now.
Could any of you try this:
Go to Project->cl-osd Properties...
And then Toolchain->Avr/GNU C Linker->Memory Settings
And in "Initial Stack Address (hex)" clear that box.
Clean and compile, flash and test. :-)

Thank you 100 times
it seems to work on newer versions of AVR, no need to install older ones
you could put your info in the first post of this thread and on google.code site maybe(under instructions how to compile)

in case someone likes pictures better:




now I can make minor changes to layout to suit GoPro camera better,

if someone else needs it, here it is,
PAL
GOSD2 GPS bugfix
2HZ update OSD
numbers moved closer to edges of the screen(top+bottom)

thank you one more time callelj
Dr.Tom is offline Find More Posts by Dr.Tom
Reply With Quote
Old Mar 25, 2012, 04:55 PM
Registered User
RocketMouse's Avatar
Joined May 2011
369 Posts
That's cool!
But can now someone please explain, how does Auto set home position work?
Or it does not?
RocketMouse is offline Find More Posts by RocketMouse
Reply With Quote
Old Mar 25, 2012, 08:59 PM
Registered User
Israel, Adi
Joined May 2006
115 Posts
Hi
is there any way to get the original firmware of the G-OSD??
guytzoler is offline Find More Posts by guytzoler
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Build Log Super OSD ($90): Open Source Graphic OSD: Vario, 6xADC, Games, Datalog, Dual Video tom66 FPV Equipment 1928 May 24, 2014 11:07 AM
Discussion Open Source Remote Control System (OSRC) Gizmoman31 Radios 152 Apr 24, 2012 06:01 PM
Discussion Open source OSD for FPV UFO_MAN FPV Talk 75 Sep 07, 2011 02:03 PM
Question Open Source Octo Design Available...Looking for someonw who can cut a copy for me... Schatham421 Multirotor Talk 14 Apr 12, 2011 05:22 PM