DeBesten / opentx

Automatically exported from code.google.com/p/opentx
0 stars 0 forks source link

OpenTx does not work in version r2434 #44

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Which board (stock / gruvin9x / sky9x / Taranis) are you using?

Stock Flysky TH9X

What is your openTx FW version?

r2434, r2435

What is your openTx EEPROM version?

213-1

What steps will reproduce the problem?
1. Compile OpenTx from SVN sorces
2. Flash to TH9X

What is the expected output? 

Main screen.

What do you see instead?

Blinking Splash screen.

Please provide any additional information below.

OpenTx does not work in version r2434 and r2435 at all. After the flashing 
stops responding T9X a rate of about 2 Hz flashing logo.

My r2413 (also translated from SVN sources) does not do such things.

Original issue reported on code.google.com by ztrojanek on 2 Jun 2013 at 12:41

GoogleCodeExporter commented 8 years ago
Versions <= r2433 do not suffer from this problem.

Original comment by ztrojanek on 2 Jun 2013 at 2:09

GoogleCodeExporter commented 8 years ago
Which is your compile command?

Original comment by bson...@gmail.com on 2 Jun 2013 at 7:11

GoogleCodeExporter commented 8 years ago
I might have the same bug on trunk rev 2435

On a Turnigy 9XR the screen blinks after the "switch warning" has been "skipped"
The unit turns unresponsive after that.

tags/release-2413 does not have this issue

They both have THR and AIL stuck on, but that is probably a different bug 
report :)

The "switch warning" screen in r2435 responds normally apart from the stuck 
switches.

I have attached the svn diff for my Makefile

Original comment by dkta...@gmail.com on 2 Jun 2013 at 2:27

Attachments:

GoogleCodeExporter commented 8 years ago
P.S. I'm compiling under Debian and the following version information was 
obtained from avr-gcc:

avr-gcc -v
Using built-in specs.
COLLECT_GCC=avr-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/avr/4.7.2/lto-wrapper
Target: avr
Configured with: ../src/configure -v --enable-languages=c,c++ --prefix=/usr/lib 
--infodir=/usr/share/info --mandir=/usr/share/man --bindir=/usr/bin 
--libexecdir=/usr/lib --libdir=/usr/lib --enable-shared --with-system-zlib 
--enable-long-long --enable-nls --without-included-gettext --disable-libssp 
--build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=avr
Thread model: single
gcc version 4.7.2 (GCC)

Original comment by dkta...@gmail.com on 2 Jun 2013 at 2:33

GoogleCodeExporter commented 8 years ago
Would you try to revert the changes here (from r2434):

https://code.google.com/p/opentx/source/diff?spec=svn2434&r=2434&format=side&pat
h=/trunk/src/targets/stock/board_stock.cpp

Do you have either AUDIO or VOICE enabled?

Original comment by bson...@gmail.com on 2 Jun 2013 at 2:53

GoogleCodeExporter commented 8 years ago
I tried it with both my own setting and with the original Makefile from SVN.
The result is the same - dysfunctional TH9X.

I have downloaded  the full SVN into new directory.

# svn checkout https://openTx.googlecode.com/svn/trunk/@2433 ~/openTx

Then I started "

# make clean
# make all
# make simu

Attached is a screen recording of "make all" and my Makefile.

Then I started companion9x and flash files opentx.hex to TH9X.

Original comment by ztrojanek on 2 Jun 2013 at 8:02

Attachments:

GoogleCodeExporter commented 8 years ago
AVR GCC Version 4.5.3 ???

You need the version 4.7 or 4.8!

Original comment by bson...@gmail.com on 2 Jun 2013 at 8:28

GoogleCodeExporter commented 8 years ago
dktalpa seems compiling on the right avr-gcc, I let the issue opened!

Original comment by bson...@gmail.com on 2 Jun 2013 at 8:35

GoogleCodeExporter commented 8 years ago
i use stock board + frsky and compiling with avr-gcc 4.7.1 and no issue here.
tested r2436

Original comment by gbir...@gmail.com on 2 Jun 2013 at 10:25

GoogleCodeExporter commented 8 years ago
What if you compile without AUDIO and without VOICE?

Original comment by bson...@gmail.com on 3 Jun 2013 at 5:09

GoogleCodeExporter commented 8 years ago
without AUDIO it is frozen after startup. 

Original comment by gbir...@gmail.com on 3 Jun 2013 at 4:37

GoogleCodeExporter commented 8 years ago
this patch helped.

Original comment by gbir...@gmail.com on 3 Jun 2013 at 5:03

Attachments:

GoogleCodeExporter commented 8 years ago
Would you try this code:

#if defined(AUDIO) || defined(VOICE)
  SET_TIMER_AUDIO_CTRL();
  #if !defined(CPUM2561)
    TIMSK |= (1<<OCIE0) | (1<<TOIE0) | (1<<TOIE2); // Enable Output-Compare and Overflow interrrupts
  #endif
#elif defined(PWM_BACKLIGHT)
  /** Smartieparts LED Backlight is connected to PORTB/pin7, which can be used as pwm output of timer2 **/
  #if defined(SP22)
    TCCR2  = (0b011 << CS20)|(1<<WGM20)|(1<<COM21)|(1<<COM20); // inv. pwm mode, clk/64
  #else
    TCCR2  = (0b011 << CS20)|(1<<WGM20)|(1<<COM21); // pwm mode, clk/64
  #endif
  #if !defined(CPUM2561)
    TIMSK |= (1<<OCIE0) | (1<<TOIE0); // Enable Output-Compare and Overflow interrrupts
  #endif
#else
  #if !defined(CPUM2561)
    TIMSK |= (1<<OCIE0) | (1<<TOIE0); // Enable Output-Compare and Overflow interrrupts
  #endif
#endif

Original comment by bson...@gmail.com on 3 Jun 2013 at 5:46

GoogleCodeExporter commented 8 years ago
I commited my proposal above. It should fix things. Please tell-me if I am 
wrong!

Original comment by bson...@gmail.com on 3 Jun 2013 at 6:59

GoogleCodeExporter commented 8 years ago
you are right! 
i forgot the pwm_backlight fix
tested and it is ok.

Original comment by gbir...@gmail.com on 3 Jun 2013 at 8:45

GoogleCodeExporter commented 8 years ago
Good work, it all works. Good work, it all works. Thank you all and return 
(temporarily) to the latest version of companion9x, as recommended by Romolo :).

Original comment by ztrojanek on 3 Jun 2013 at 11:04