Skip to contentSkip to conversation

debug in PBL

DISCUSSION Alexander Shiyan 3 participants 5 messages Mar 5, 2013

lore
Share & tools
lore
#0 lore raw

Hello All.

I tried to compile latest bb.
pcm038 + pbl + debug level 7

Compilation failed with following error:
LD arch/arm/pbl/zbarebox
arch/arm/mach-imx/built-in-pbl.o: In function `imx_nand_load_image':
/home/git/bb-mar05/arch/arm/mach-imx/external-nand-boot.c:232: undefined reference to `printf'

How we should handle debug messages in PBL in this case? Thanks.

---
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#1 lore raw
Quoted 11 lines · Alexander Shiyan

Hello All.

I tried to compile latest bb.
pcm038 + pbl + debug level 7

Compilation failed with following error:
LD arch/arm/pbl/zbarebox
arch/arm/mach-imx/built-in-pbl.o: In function `imx_nand_load_image':
/home/git/bb-mar05/arch/arm/mach-imx/external-nand-boot.c:232: undefined reference to `printf'

How we should handle debug messages in PBL in this case?

you can not use the printf in the pbl you need to yse debug_ll

Best Regards,
J.

Quoted 7 lines

Thanks.

---
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#2 lore raw
In reply to Alexander Shiyan
Quoted 11 lines · Alexander Shiyan

Hello All.

I tried to compile latest bb.
pcm038 + pbl + debug level 7

Compilation failed with following error:
LD arch/arm/pbl/zbarebox
arch/arm/mach-imx/built-in-pbl.o: In function `imx_nand_load_image':
/home/git/bb-mar05/arch/arm/mach-imx/external-nand-boot.c:232: undefined reference to `printf'

How we should handle debug messages in PBL in this case?

Until recently the debug macro was defined empty, now it expands to printf and only compiled away when the debug level is lower. It seems we have to either drop the debug() calls in the pbl or add an empty printf implementation.

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
#3 lore raw
Quoted 11 lines · Alexander Shiyan
Quoted 10 lines

Hello All.

I tried to compile latest bb.
pcm038 + pbl + debug level 7

Compilation failed with following error:
LD arch/arm/pbl/zbarebox
arch/arm/mach-imx/built-in-pbl.o: In function `imx_nand_load_image':
/home/git/bb-mar05/arch/arm/mach-imx/external-nand-boot.c:232: undefined reference to `printf'

Quoted 6 lines
Quoted 1 line

How we should handle debug messages in PBL in this case?

Until recently the debug macro was defined empty, now it expands to printf and only compiled away when the debug level is lower. It seems we have to either drop the debug() calls in the pbl or add an empty printf implementation.

As far i understand "__PBL__" condition should be used for this?

---
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#4 lore raw
Quoted 11 lines · Alexander Shiyan
Quoted 11 lines · Alexander Shiyan
Quoted 10 lines

Hello All.

I tried to compile latest bb.
pcm038 + pbl + debug level 7

Compilation failed with following error:
LD arch/arm/pbl/zbarebox
arch/arm/mach-imx/built-in-pbl.o: In function `imx_nand_load_image':
/home/git/bb-mar05/arch/arm/mach-imx/external-nand-boot.c:232: undefined reference to `printf'

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

How we should handle debug messages in PBL in this case?

Until recently the debug macro was defined empty, now it expands to printf and only compiled away when the debug level is lower. It seems we have to either drop the debug() calls in the pbl or add an empty printf implementation.

As far i understand "__PBL__" condition should be used for this?

yes __PBL__ indicate you are compiled for the pbl target

Best Regards,
J.

Quoted 6 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