Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  Easy way to output some text in a codec?
« previous next »
  • Print
Pages: [1]

Author Topic: Easy way to output some text in a codec?  (Read 2666 times)

Offline dryrock

  • Member
  • *
  • Posts: 12
Easy way to output some text in a codec?
« on: January 13, 2011, 10:23:31 AM »
I have been banging my head on my desk here...

In order to do some simple troubleshooting in some codec changes I just want to display some text on the screen when certain conditions are met (might happen once per song, we're not talking copious output here). Something like the splash() function you can use in a plugin would be ideal.

How can I do something like this in a codec though?

I also tried logging text with LOGF (configured my build with logf enabled) but I am not getting anything showing up in the log (debug menu) so I'm not sure if I am missing something else there. I'd prefer to see it in realtime though.


Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Easy way to output some text in a codec?
« Reply #1 on: January 13, 2011, 11:38:46 AM »
Quote from: dryrock on January 13, 2011, 10:23:31 AM
In order to do some simple troubleshooting in some codec changes I just want to display some text on the screen when certain conditions are met (might happen once per song, we're not talking copious output here). Something like the splash() function you can use in a plugin would be ideal.

Unless you're writing assembly, its easiest to work in the sim and use DEBUGF.

Quote from: dryrock on January 13, 2011, 10:23:31 AM
I also tried logging text with LOGF (configured my build with logf enabled) but I am not getting anything showing up in the log (debug menu) so I'm not sure if I am missing something else there. I'd prefer to see it in realtime though.

Additionally theres a define you have to add to each file where logf should be enabled, otherwise you'd get swamped with a thousand irrelevent logf messages from all over rockbox.  IIRC its pretty clear if you look at logf.h

That said doing codec work on device is absolutely terrible.  Almost all the codec stuff I've done was written for the sim first. 
Logged

Offline dryrock

  • Member
  • *
  • Posts: 12
Re: Easy way to output some text in a codec?
« Reply #2 on: January 13, 2011, 01:10:03 PM »
Quote from: saratoga on January 13, 2011, 11:38:46 AM

Unless you're writing assembly, its easiest to work in the sim and use DEBUGF.


I figured (it's also 100 times quicker to test changes), but when I try to build for the simulator I get an error:

/home/user/rockbox/sim-fuzev2/apps/codecs/libcodec.a(fixedpoint.o)(.text.fp_sqrt+0x24): In function `isqrt':
/home/user/rockbox/apps/fixedpoint.c:112: undefined reference to `__builtin_clzl'

Looks like I can fake out make to get past the plugins and codecs that won't compile (they're not relevant to this test).

Quote from: dryrock on January 13, 2011, 10:23:31 AM
I also tried logging text with LOGF (configured my build with logf enabled) but I am not getting anything showing up in the log (debug menu) so I'm not sure if I am missing something else there. I'd prefer to see it in realtime though.

Additionally theres a define you have to add to each file where logf should be enabled, otherwise you'd get swamped with a thousand irrelevent logf messages from all over rockbox.  IIRC its pretty clear if you look at logf.h

[/quote]

Yeah, I #defined LOGF_ENABLE in my source file. Perhaps it doesn't work properly on the fuze v2. I'll concentrate on getting the sim working for now.
Logged

Offline gevaerts

  • Administrator
  • Member
  • *
  • Posts: 1053
Re: Easy way to output some text in a codec?
« Reply #3 on: January 13, 2011, 01:55:43 PM »
Quote from: dryrock on January 13, 2011, 01:10:03 PM
Yeah, I #defined LOGF_ENABLE in my source file. Perhaps it doesn't work properly on the fuze v2. I'll concentrate on getting the sim working for now.

Did you define it before the #include "logf.h"?
Logged

Offline dryrock

  • Member
  • *
  • Posts: 12
Re: Easy way to output some text in a codec?
« Reply #4 on: January 13, 2011, 04:30:21 PM »
Quote from: gevaerts on January 13, 2011, 01:55:43 PM
Quote from: dryrock on January 13, 2011, 01:10:03 PM
Yeah, I #defined LOGF_ENABLE in my source file. Perhaps it doesn't work properly on the fuze v2. I'll concentrate on getting the sim working for now.

Did you define it before the #include "logf.h"?

Well, there's no #include "logf.h" but I defined it first. And I also tried using ci->logf() directly and it makes no difference.

But the good news is that after updating my build environment from the old debian based vmware VM to the newer Ubuntu-based xvm vm, I can build and run the simulator without problem and see the DEBUGF output. So that will suit my needs just fine.

And as it turns out, once I did a clean build in the new environment, LOGF output is coming out as well. Woohoo!

Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  Easy way to output some text in a codec?
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.074 seconds with 15 queries.