From mboxrd@z Thu Jan 1 00:00:00 1970 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 72DF5C433EF for ; Wed, 22 Dec 2021 06:13:47 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 477A682F8E; Wed, 22 Dec 2021 07:13: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=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=dooray.com header.i=@dooray.com header.b="SAZTKZkE"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A6FBB82F8E; Wed, 22 Dec 2021 07:13:42 +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 54AB882FB5 for ; Wed, 22 Dec 2021 07:13:32 +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:13:29 +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 17b497ce61c2c209; Wed, 22 Dec 2021 15:13:29 +0900 DKIM-Signature: a=rsa-sha256; b=SAZTKZkESCNOSbVyVxGpZLYU1jYJ9UtwfxYI3/jYOZl3pdCAUR0N/plCaYZL5ev4oUarRuaP+o 0zyg/hvr+o64rVLHTzd3Fk/3oGYYa35BNKeo/NfqM3otMyS+KOIqlJGZZEGpda72Dox6ATmT65kP fHjSuGcbgWAeZF974Dgk3Xs2sv9yiV15Tb5yQOIE4h5z1YVaXcH3rBHjFLVsp3zu6g5GnNFTjmhP JR+Q0h9mZLqMhcttXI+UWSc4eRHAtA/6y21yI80efAmGiFL2RfEJZi4nBXvdY3eVBbl+hykyZpiJ gS+h/MLIB8Nb2G8H1RGmuwehcIYHbbJn71YdP3RA==; c=relaxed/relaxed; s=selector; d=dooray.com; v=1; bh=bd+ItCs9ArF+N4XYrMTl6HhWIclY8bzQgYnHG4+UTeI=; h=From:To:Subject:Message-ID; Received: from [129.254.132.39] (HELO CHANKIMPC) ([129.254.132.39]) by smtp002-imp.gov-dooray.com with SMTP id 9a39babd61c2c208; Wed, 22 Dec 2021 15:13:29 +0900 From: "Chan Kim" To: "U-Boot Mailing List" Subject: printf works but how can I make debug() printed to serial port console? Date: Wed, 22 Dec 2021 15:13:27 +0900 Message-ID: <097b01d7f6fb$09284fe0$1b78efa0$@etri.re.kr> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: Adf2+wbJRy51rYB4R7OgUsAhmyTn0Q== Content-Language: ko Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.38 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 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