debug_ll.h: add PUTS_LL() function
PATCH v2 1/2 debug_ll.h: add PUTS_LL() function
--- include/debug_ll.h | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-)
include/debug_ll.h +13 -0
@@ -35,9 +35,22 @@ ch = ((v >> (i*4 )) &0xf );\ ch += (ch >=10 ) ?'a' -10 :'0' ;\ PUTC_LL (ch); }}) + +static __inline__void PUTS_LL (char * str) +{ +while (*str) { +if (*str =='\n' ) { +PUTC_LL ('\r' ); + } +PUTC_LL (*str); + str++; + } +} +#else # define PUTC_LL (c) do {} while (0)# define PUTHEX_LL (v) do {} while (0) +# define PUTS_LL (c) do {} while (0)#endif
Signature · 7 lines
1.7.5.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH v2 2/2 startup.c: make DEBUG_LL output more useful
--- common/startup.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
common/startup.c +5 -1
@@ -134,13 +134,17 @@ void start_barebox (void)for (initcall = __barebox_initcalls_start; initcall < __barebox_initcalls_end; initcall++) { +PUTS_LL ("<<" );PUTHEX_LL (*initcall); -PUTC_LL ('\n' ); result = (*initcall)(); +PUTC_LL ('>' );if (result)hang (); +PUTS_LL (">\n" ); } +PUTS_LL ("initcalls done\n" ); +display_meminfo ();#ifdef CONFIG_ENV_HANDLING
Signature · 7 lines
1.7.5.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
2011/7/18 Antony Pavlov <[email protected]>
Quoted 36 lines
Signed-off-by Antony Pavlov <[email protected]>--- include/debug_ll.h | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-)include/debug_ll.h +13
-1@@ -35,9 +35,22 @@ ch = ((v >> (i*4 )) &0xf );\ ch += (ch >=10 ) ?'a' -10 :'0' ;\ PUTC_LL (ch); }}) + +static __inline__void PUTS_LL (char * str) +{ +while (*str) { +if (*str =='\n' ) { +PUTC_LL ('\r' ); + } +PUTC_LL (*str); + str++; + } +} +#else # define PUTC_LL (c) do {} while (0)# define PUTHEX_LL (v) do {} while (0) +# define PUTS_LL (c) do {} while (0)#endif --1.7.5.4
Quoted 4 lines
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Hello,
Could we add an entry for CONFIG_DEBUG_LL in the debugging menu (common/Kconfig) ?
This file makes barebox not compile if we are not on arm arch due to the <mach/debug_ll.h> inclusion.
I know it's not related to your patch :)
Franck.
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
On 15:26 Mon 18 Jul , Franck JULLIEN wrote:
Franck could you stop to post in HTML and port in text/plain
Best Regards,
J.
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
2011/7/18 Jean-Christophe PLAGNIOL-VILLARD <[email protected]>
Quoted 4 lines · Franck JULLIEN
Franck could you stop to post in HTML and port in text/plain
Sorry my bad. I know you already asked to Antony to do so and I thought I wasn't concerned :)
Quoted 2 lines
Best Regards,
J.
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Quoted 4 lines · Franck JULLIEN
2011/7/18 Antony Pavlov <[email protected]>
Quoted 8 lines
Hello,
Could we add an entry for
CONFIG_DEBUG_LLin the debugging menu (common/Kconfig) ?
This file makes barebox not compile if we are not on arm arch due to the <mach/debug_ll.h> inclusion.I know it's not related to your patch :)
Patches that make the lowlevel debug stuff more generally useful are very welcome. It's not nice to have to modify the code to make it work, but I couldn't find the energy to do something about it.
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
AppliedQuoted 1 line · Antony Pavlov
Signed-off-by Antony Pavlov <[email protected]>
Applied both to next.
Thanks
Sascha
Quoted 40 lines
--- include/debug_ll.h | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-)include/debug_ll.h +13
-0@@ -35,9 +35,22 @@ ch = ((v >> (i*4 )) &0xf );\ ch += (ch >=10 ) ?'a' -10 :'0' ;\ PUTC_LL (ch); }}) + +static __inline__void PUTS_LL (char * str) +{ +while (*str) { +if (*str =='\n' ) { +PUTC_LL ('\r' ); + } +PUTC_LL (*str); + str++; + } +} +#else # define PUTC_LL (c) do {} while (0)# define PUTHEX_LL (v) do {} while (0) +# define PUTS_LL (c) do {} while (0)#endif Signature · 7 lines
1.7.5.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
2011/7/18 Sascha Hauer <[email protected]>:
Quoted 37 lines · Antony Pavlov
Quoted 1 line
Signed-off-by Antony Pavlov <[email protected]>Applied both to next.
Thanks
SaschaQuoted 29 lines
---
include/debug_ll.h | 13 +++++++++++++1 files changed, 13 insertions(+), 0 deletions(-)include/debug_ll.h +13
-0@@ -35,9 +35,22 @@ ch = ((v >> (i*4)) & 0xf);\ ch += (ch >= 10) ? 'a' - 10 : '0';\ PUTC_LL (ch); }}) + +static __inline__void PUTS_LL (char * str) +{ + while (*str) { + if (*str == '\n') { + PUTC_LL('\r'); + } + PUTC_LL(*str); + str++; + } +} + #else # define PUTC_LL(c) do {} while (0) # define PUTHEX_LL(v) do {} while (0) +# define PUTS_LL (c) do {} while (0)
Quoted 2 lines
include/debug_ll.h line 56
Quoted 2 lines
include/debug_ll.h +0
-0#endif
Is there any reason for not using vsprintf in a printf_ll function which would use puts_ll / putc_ll ??
Franck.
Quoted 16 lines
Quoted 9 lines
--
1.7.5.4_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox--
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Quoted 5 lines
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Quoted 38 lines · Franck JULLIEN
2011/7/18 Sascha Hauer <[email protected]>:
Quoted 37 lines · Antony Pavlov
Quoted 1 line
Signed-off-by Antony Pavlov <[email protected]>Applied both to next.
Thanks
SaschaQuoted 29 lines
---
include/debug_ll.h | 13 +++++++++++++1 files changed, 13 insertions(+), 0 deletions(-)include/debug_ll.h +13
-0@@ -35,9 +35,22 @@ ch = ((v >> (i*4)) & 0xf);\ ch += (ch >= 10) ? 'a' - 10 : '0';\ PUTC_LL (ch); }}) + +static __inline__void PUTS_LL (char * str) +{ + while (*str) { + if (*str == '\n') { + PUTC_LL('\r'); + } + PUTC_LL(*str); + str++; + } +} + #else # define PUTC_LL(c) do {} while (0) # define PUTHEX_LL(v) do {} while (0) +# define PUTS_LL (c) do {} while (0)
Quoted 5 lines
Quoted 2 lines
include/debug_ll.h line 56
Quoted 2 lines
include/debug_ll.h +0
-0#endifIs there any reason for not using vsprintf in a
printf_llfunction which would useputs_ll/putc_ll??
You would at least need a writable string buffer. I'd rather like to keep the ll functions as simple as possible. Otherwise you end up debugging the debug functions while hunting some lowlevel problem.
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
2011/7/20 Sascha Hauer <[email protected]>:
Quoted 45 lines · Franck JULLIEN
Quoted 38 lines
2011/7/18 Sascha Hauer <[email protected]>:
Quoted 37 lines · Antony Pavlov
Quoted 1 line
Signed-off-by Antony Pavlov <[email protected]>Applied both to next.
Thanks
SaschaQuoted 29 lines
---
include/debug_ll.h | 13 +++++++++++++1 files changed, 13 insertions(+), 0 deletions(-)include/debug_ll.h +13
-0@@ -35,9 +35,22 @@ ch = ((v >> (i*4)) & 0xf);\ ch += (ch >= 10) ? 'a' - 10 : '0';\ PUTC_LL (ch); }}) + +static __inline__void PUTS_LL (char * str) +{ + while (*str) { + if (*str == '\n') { + PUTC_LL('\r'); + } + PUTC_LL(*str); + str++; + } +} + #else # define PUTC_LL(c) do {} while (0) # define PUTHEX_LL(v) do {} while (0) +# define PUTS_LL (c) do {} while (0)Quoted 5 lines
Quoted 2 lines
include/debug_ll.h line 56
Quoted 2 lines
include/debug_ll.h +0
-0#endifIs there any reason for not using vsprintf in a
printf_llfunction which would useputs_ll/putc_ll??
Quoted 4 lines
You would at least need a writable string buffer. I'd rather like to keep the ll functions as simple as possible. Otherwise you end up debugging the debug functions while hunting some lowlevel problem.
Ok I see, let's keep it like this. However, that's what I did in nios2/lib/early_printf.c and I never
had any problem using a static 50 bytes buffer.
Quoted 9 lines
Sascha
--
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox