Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3D440C433EF for ; Wed, 22 Dec 2021 06:40:46 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4BB2482F8E; Wed, 22 Dec 2021 07:40:44 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=etri.re.kr Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=dooray.com header.i=@dooray.com header.b="HpX2z8NR"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 21E2B82FB5; Wed, 22 Dec 2021 07:40:43 +0100 (CET) Received: from mscreen.etri.re.kr (mscreen.etri.re.kr [129.254.9.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 921DA80FD2 for ; Wed, 22 Dec 2021 07:40:38 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=etri.re.kr Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ckim@etri.re.kr Received: from unknown (HELO send001-relay.gov-dooray.com) (211.180.235.152) by 129.254.9.16 with ESMTP; 22 Dec 2021 15:40:34 +0900 X-Original-SENDERIP: 211.180.235.152 X-Original-MAILFROM: ckim@etri.re.kr X-Original-RCPTTO: u-boot@lists.denx.de Received: from [10.162.225.112] (HELO smtp002-imp.gov-dooray.com) ([10.162.225.112]) by send001-relay.gov-dooray.com with SMTP id c867ee0761c2c862; Wed, 22 Dec 2021 15:40:34 +0900 DKIM-Signature: a=rsa-sha256; b=HpX2z8NR1GS3Osk6qKdXCtk5dC1/KYtirRFr8dx43lRfYCjNq9otzXCxIV5JvQ7Qu4j63VHGQU 3rmApAx0DJs/qzGAg/GHCjPrQS+CSZX90nM6xuHTl90GyLghrXJcrGN+jb0EfA9u+ehUiH8JdqKs 8PaK3Le6QfWg0Fyj2mxn0BsxTgZHGGFdTcuWgkhziSPC+R+zJ+iFb1Ng3IqJkJ6G3PXlebAX9vVN l2o0AI8KLi7vmCwtly9y/V8DKoe/lN1z8H9BN35B0gQX0Tn2TmUF6rUzBeaktJjyfwdrxUwV1YAD 6l/coJlRrXtv6XnkX5+WHfyVnYVmJ5OsEwZnF0tg==; c=relaxed/relaxed; s=selector; d=dooray.com; v=1; bh=v9OJ3gg7kZUoVyZfHg9FlkJXz5JZWPN9leRYJyltif4=; h=From:To:Subject:Message-ID; Received: from [129.254.29.8] (HELO DESKTOPEIC8VM5) ([129.254.29.8]) by smtp002-imp.gov-dooray.com with SMTP id c231f25e61c2c862; Wed, 22 Dec 2021 15:40:34 +0900 From: To: "'U-Boot Mailing List'" References: <097b01d7f6fb$09284fe0$1b78efa0$@etri.re.kr> In-Reply-To: <097b01d7f6fb$09284fe0$1b78efa0$@etri.re.kr> Subject: RE: printf works but how can I make debug() printed to serial port console? Date: Wed, 22 Dec 2021 15:40:34 +0900 Message-ID: <035701d7f6fe$d28c11c0$77a43540$@etri.re.kr> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Content-Language: ko Thread-Index: AQJQRGwu9DGe+SUB9HD7xQU2OeKcMatNdHkA X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean As the document said, I tried added "#define DEBUG" in each file but it doesn't work. If I add "#define debug printf" then, of course debug() is printed. -----Original Message----- From: U-Boot On Behalf Of Chan Kim Sent: Wednesday, December 22, 2021 3:13 PM To: U-Boot Mailing List Subject: printf works but how can I make debug() printed to serial port console? Hello all, I'm trying to boot from RAM using SPL only. (Another scp processor loads the FIT image to the SDRAM before starting u-boot-spl is started) Since the debugger doesn't work yet, I have to rely on prints to debug. The printf works fine (I once asked about initializing serial port here, and later found serial_init is done in board_init_f ). I tried to make debug(xxx) printed to serial port but couldn't figure out how to do it. I tried 1. Adding #define DEBUG to the relevant source file 2. Giving DEBUG=1 in the make command (or CFLAGS=-DDEBUG) But it doesn't work (of course I can change debug to printf to see it). How can I make debug( ) macro output to the serial port? Thank you! Chan Kim