github.com/usbarmory/tamago@v0.0.0-20240508072735-8612bbe1e454/board/nxp/mx6ullevk/console.go (about)

     1  // MCIMX6ULL-EVK support for tamago/arm
     2  // https://github.com/usbarmory/tamago
     3  //
     4  // Copyright (c) WithSecure Corporation
     5  // https://foundry.withsecure.com
     6  //
     7  // Use of this source code is governed by the license
     8  // that can be found in the LICENSE file.
     9  
    10  //go:build !linkprintk
    11  // +build !linkprintk
    12  
    13  package mx6ullevk
    14  
    15  import (
    16  	_ "unsafe"
    17  
    18  	"github.com/usbarmory/tamago/soc/nxp/imx6ul"
    19  )
    20  
    21  // On the MCIMX6ULL-EVK the serial console is UART1, therefore standard
    22  // output is redirected there.
    23  
    24  //go:linkname printk runtime.printk
    25  func printk(c byte) {
    26  	imx6ul.UART1.Tx(c)
    27  }