Xavier4.3, How can I debug with ttyTSH0 instead of ttyTCU0?

Hi,our machine is Xavier 4.3. It default used the ttyTCU0 for debug, and the tx,rx,gnd pin location is fixed in the board.
I want to use ttyTHS0 for debug because the pin of ttyTHS0 is not fixed.
How can I do it?
Thanks

Hi,
When the Xavier has brought up, it can send data to ttyTHS0,but when in the bringing up process of linux kernel and before, the ttyTHS0 has no output.
I have changed the bootargs to “root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyTHS0,115200n8 console=ttyTCU0,115200n8 fbcon=map:0 net.ifnames=0 rootfstype=ext4 video=tegrafb no_console_suspend=1 earlycon=tegra_comb_uart,mmio32,0x0c168000 gpt usbcore.old_scheme_first=1 tegraid=19.1.2.0.0 maxcpus=8 boot.slot_suffix= boot.ratchetvalues=0.4.2 vpr_resize sdhci_tegra.en_boot_part_access=1 quiet”, but it also has no action.
Thansk

hello tianyi2,

you could use J501, it’s a micro-USB connector provides access to the UART console.
please also access Jetson AGX Xavier Series Product Design Guide, and check chapter-13 for the [Figure 13-7. Jetson AGX Xavier UART Connections] for reference,
thanks

Hi,JerryChang,when link to [Jetson AGX Xavier Series Product Design Guide], come up the following page


Can you give me a valid page address?

please search the documentation via Jetson Download Center, [url]https://developer.nvidia.com/embedded/downloads[/url]

Hi,JerryChang,
The UART1 is OK when the xavier has started up.But it is not OK when kernel is in starting process and before, there is no output in the UART1. How can I modify the software to make UART1 OK in the starting process of kernel?
Thanks

hello tianyi2,

you mean bootloader logs? why don’t you connected to J501 to access the logs.

Hi, JerryChang,
The board is developed by ourself. There is no j501 on the board. Only uart1 is left. Do you have any idea to put bootloader logs to uart1?
Thanks

hello tianyi2,

there’s definition of UART controller used for combined UART by SPE,
please have a try to update spe_uart_instance in the $OUT/Linux_for_Tegra/bootloader/t186ref/BCT/tegra194-mb1-bct-misc-flash.cfg
thanks

Hi,JerryChang
Where can I find the definition of spe_uart_instance?
Thanks

hello tianyi2,

you may download Cboot Sources T194 via https://developer.nvidia.com/embedded/linux-tegra.
then you’re able to check below for definition.
i.e. $L4T_Sources/r32.6.1/Linux_for_Tegra/source/public/cboot/bootloader/partner/t19x/common/include/soc/t194/tegrabl_mb2_bct.h

Hi,JerryChang
There is only one position of spe_uart_instance, I can’t find it any another position.The only position is as following.

TEGRABL_PACKED(
struct tegrabl_mb2_bct {
uint32_t version;
uint32_t padding;

TEGRABL_DECLARE_ALIGNED(struct tegrabl_mb2_feature_fields feature_fields, 8);

/* offset in respective carveout where corresponding binary is loaded */
uint32_t cpubl_load_offset;
uint32_t ape_fw_load_offset;
uint32_t bpmp_fw_load_offset;
uint32_t sce_fw_load_offset;
uint32_t rce_fw_load_offset;

/* offset of binary entry point from the load address */
uint32_t cpubl_entry_offset;
uint32_t ape_fw_entry_offset;
uint32_t bpmp_fw_entry_offset;
uint32_t sce_fw_entry_offset;
uint32_t rce_fw_entry_offset;

/* VA of the carveout in correspodning AST */
uint32_t cpubl_carveout_ast_va;
uint32_t ape_carveout_ast_va;
uint32_t apr_carveout_ast_va;
uint32_t bpmp_carveout_ast_va;
uint32_t sce_carveout_ast_va;
uint32_t rce_carveout_ast_va;
uint32_t camera_task_carveout_ast_va;

/* SPE's UART instance */
uint32_t spe_uart_instance;

/* Enable encryption of OS managed memory */
uint32_t enable_os_mem_encryption;

/* Bit-vector representing which of the GSCs get used for encrypting OS managed memory */
uint32_t os_mem_encryption_gsc_list;

/* Ensure that the total size of structure is 1024 bytes */
uint8_t reserved[MB2_BCT_SIZE - 120];

}
);

may I know what’s the results if you configure spe_uart_instance=1 in the $OUT/Linux_for_Tegra/bootloader/t186ref/BCT/tegra194-mb1-bct-misc-flash.cfg

Hi,JerryChang
When I set spe_uart_instance=1, and then run sudo ./flash.sh jetson-xavier mmcblk0p1,the flash.sh operation stop at “tegrarcm_v2 --ismb2”.The log is as following:
[ 7.1359 ] Assuming zero filled SBK key
[ 7.1370 ]
[ 7.1407 ] tegrahost_v2 --chip 0x19 0 --updatesigheader blob_nvtboot_recovery_t194_sigheader.bin.encrypt blob_nvtboot_recovery_t194_sigheader.bin.hash zerosbk
[ 7.1483 ]
[ 7.1511 ] tegrahost_v2 --chip 0x19 --align blob_preboot_c10_prod_cr.bin
[ 7.1535 ]
[ 7.1559 ] tegrahost_v2 --chip 0x19 0 --magicid MTSP --appendsigheader blob_preboot_c10_prod_cr.bin zerosbk
[ 7.1581 ] Header already present for blob_preboot_c10_prod_cr.bin
[ 7.1594 ]
[ 7.1623 ] tegrasign_v2 --key None --list blob_preboot_c10_prod_cr_sigheader.bin_list.xml --pubkeyhash pub_key.key
[ 7.1645 ] Assuming zero filled SBK key
[ 7.1652 ]
[ 7.1689 ] tegrahost_v2 --chip 0x19 0 --updatesigheader blob_preboot_c10_prod_cr_sigheader.bin.encrypt blob_preboot_c10_prod_cr_sigheader.bin.hash zerosbk
[ 7.1725 ]
[ 7.1755 ] tegrahost_v2 --chip 0x19 --align blob_mce_c10_prod_cr.bin
[ 7.1781 ]
[ 7.1806 ] tegrahost_v2 --chip 0x19 0 --magicid MTSM --appendsigheader blob_mce_c10_prod_cr.bin zerosbk
[ 7.1828 ] Header already present for blob_mce_c10_prod_cr.bin
[ 7.1884 ]
[ 7.1914 ] tegrasign_v2 --key None --list blob_mce_c10_prod_cr_sigheader.bin_list.xml --pubkeyhash pub_key.key
[ 7.1936 ] Assuming zero filled SBK key
[ 7.1949 ]
[ 7.1983 ] tegrahost_v2 --chip 0x19 0 --updatesigheader blob_mce_c10_prod_cr_sigheader.bin.encrypt blob_mce_c10_prod_cr_sigheader.bin.hash zerosbk
[ 7.2064 ]
[ 7.2093 ] tegrahost_v2 --chip 0x19 --align blob_mts_c10_prod_cr.bin
[ 7.2121 ]
[ 7.2146 ] tegrahost_v2 --chip 0x19 0 --magicid MTSB --appendsigheader blob_mts_c10_prod_cr.bin zerosbk
[ 7.2168 ] adding BCH for blob_mts_c10_prod_cr.bin
[ 7.3049 ]
[ 7.3059 ] tegrasign_v2 --key None --list blob_mts_c10_prod_cr_sigheader.bin_list.xml --pubkeyhash pub_key.key
[ 7.3066 ] Assuming zero filled SBK key
[ 7.3094 ]
[ 7.3105 ] tegrahost_v2 --chip 0x19 0 --updatesigheader blob_mts_c10_prod_cr_sigheader.bin.encrypt blob_mts_c10_prod_cr_sigheader.bin.hash zerosbk
[ 7.3422 ]
[ 7.3431 ] tegrahost_v2 --chip 0x19 --align blob_bpmp_t194.bin
[ 7.3437 ]
[ 7.3444 ] tegrahost_v2 --chip 0x19 0 --magicid BPMF --appendsigheader blob_bpmp_t194.bin zerosbk
[ 7.3450 ] adding BCH for blob_bpmp_t194.bin
[ 7.3602 ]
[ 7.3611 ] tegrasign_v2 --key None --list blob_bpmp_t194_sigheader.bin_list.xml --pubkeyhash pub_key.key
[ 7.3616 ] Assuming zero filled SBK key
[ 7.3625 ]
[ 7.3635 ] tegrahost_v2 --chip 0x19 0 --updatesigheader blob_bpmp_t194_sigheader.bin.encrypt blob_bpmp_t194_sigheader.bin.hash zerosbk
[ 7.3723 ]
[ 7.3732 ] tegrahost_v2 --chip 0x19 --align blob_tegra194-a02-bpmp-p2888-a04.dtb
[ 7.3739 ]
[ 7.3745 ] tegrahost_v2 --chip 0x19 0 --magicid BPMD --appendsigheader blob_tegra194-a02-bpmp-p2888-a04.dtb zerosbk
[ 7.3751 ] adding BCH for blob_tegra194-a02-bpmp-p2888-a04.dtb
[ 7.3839 ]
[ 7.3848 ] tegrasign_v2 --key None --list blob_tegra194-a02-bpmp-p2888-a04_sigheader.dtb_list.xml --pubkeyhash pub_key.key
[ 7.3854 ] Assuming zero filled SBK key
[ 7.3859 ]
[ 7.3868 ] tegrahost_v2 --chip 0x19 0 --updatesigheader blob_tegra194-a02-bpmp-p2888-a04_sigheader.dtb.encrypt blob_tegra194-a02-bpmp-p2888-a04_sigheader.dtb.hash zerosbk
[ 7.3921 ]
[ 7.3929 ] tegrahost_v2 --chip 0x19 --align blob_spe_t194.bin
[ 7.3936 ]
[ 7.3942 ] tegrahost_v2 --chip 0x19 0 --magicid SPEF --appendsigheader blob_spe_t194.bin zerosbk
[ 7.3949 ] adding BCH for blob_spe_t194.bin
[ 7.3970 ]
[ 7.3981 ] tegrasign_v2 --key None --list blob_spe_t194_sigheader.bin_list.xml --pubkeyhash pub_key.key
[ 7.3989 ] Assuming zero filled SBK key
[ 7.3992 ]
[ 7.4004 ] tegrahost_v2 --chip 0x19 0 --updatesigheader blob_spe_t194_sigheader.bin.encrypt blob_spe_t194_sigheader.bin.hash zerosbk
[ 7.4021 ]
[ 7.4028 ] tegrahost_v2 --chip 0x19 --align blob_tos-trusty_t194.img
[ 7.4035 ]
[ 7.4042 ] tegrahost_v2 --chip 0x19 0 --magicid TOSB --appendsigheader blob_tos-trusty_t194.img zerosbk
[ 7.4048 ] adding BCH for blob_tos-trusty_t194.img
[ 7.4105 ]
[ 7.4114 ] tegrasign_v2 --key None --list blob_tos-trusty_t194_sigheader.img_list.xml --pubkeyhash pub_key.key
[ 7.4120 ] Assuming zero filled SBK key
[ 7.4124 ]
[ 7.4133 ] tegrahost_v2 --chip 0x19 0 --updatesigheader blob_tos-trusty_t194_sigheader.img.encrypt blob_tos-trusty_t194_sigheader.img.hash zerosbk
[ 7.4170 ]
[ 7.4177 ] tegrahost_v2 --chip 0x19 --align blob_eks.img
[ 7.4184 ]
[ 7.4191 ] tegrahost_v2 --chip 0x19 0 --magicid EKSB --appendsigheader blob_eks.img zerosbk
[ 7.4198 ] adding BCH for blob_eks.img
[ 7.4200 ]
[ 7.4208 ] tegrasign_v2 --key None --list blob_eks_sigheader.img_list.xml --pubkeyhash pub_key.key
[ 7.4214 ] Assuming zero filled SBK key
[ 7.4215 ]
[ 7.4226 ] tegrahost_v2 --chip 0x19 0 --updatesigheader blob_eks_sigheader.img.encrypt blob_eks_sigheader.img.hash zerosbk
[ 7.4233 ]
[ 7.4241 ] tegrahost_v2 --chip 0x19 --align blob_tegra194-p2888-0001-p2822-0000.dtb
[ 7.4247 ]
[ 7.4254 ] tegrahost_v2 --chip 0x19 0 --magicid CDTB --appendsigheader blob_tegra194-p2888-0001-p2822-0000.dtb zerosbk
[ 7.4260 ] adding BCH for blob_tegra194-p2888-0001-p2822-0000.dtb
[ 7.4311 ]
[ 7.4321 ] tegrasign_v2 --key None --list blob_tegra194-p2888-0001-p2822-0000_sigheader.dtb_list.xml --pubkeyhash pub_key.key
[ 7.4328 ] Assuming zero filled SBK key
[ 7.4332 ]
[ 7.4342 ] tegrahost_v2 --chip 0x19 0 --updatesigheader blob_tegra194-p2888-0001-p2822-0000_sigheader.dtb.encrypt blob_tegra194-p2888-0001-p2822-0000_sigheader.dtb.hash zerosbk
[ 7.4374 ]
[ 7.4383 ] tegrahost_v2 --chip 0x19 --generateblob blob.xml blob.bin
[ 7.4389 ] number of images in blob are 11
[ 7.4392 ] blobsize is 5976744
[ 7.4394 ] Added binary blob_nvtboot_recovery_cpu_t194_sigheader.bin.encrypt of size 256592
[ 7.4416 ] Added binary blob_nvtboot_recovery_t194_sigheader.bin.encrypt of size 129936
[ 7.4421 ] Added binary blob_preboot_c10_prod_cr_sigheader.bin.encrypt of size 23968
[ 7.4426 ] Added binary blob_mce_c10_prod_cr_sigheader.bin.encrypt of size 144144
[ 7.4432 ] Added binary blob_mts_c10_prod_cr_sigheader.bin.encrypt of size 3372048
[ 7.4437 ] Added binary blob_bpmp_t194_sigheader.bin.encrypt of size 853856
[ 7.4443 ] Added binary blob_tegra194-a02-bpmp-p2888-a04_sigheader.dtb.encrypt of size 500672
[ 7.4449 ] Added binary blob_spe_t194_sigheader.bin.encrypt of size 94960
[ 7.4453 ] Added binary blob_tos-trusty_t194_sigheader.img.encrypt of size 324608
[ 7.4458 ] Added binary blob_eks_sigheader.img.encrypt of size 5136
[ 7.4461 ] Added binary blob_tegra194-p2888-0001-p2822-0000_sigheader.dtb.encrypt of size 270640
[ 7.4478 ]
[ 7.4478 ] Sending bootloader and pre-requisite binaries
[ 7.4485 ] tegrarcm_v2 --download blob blob.bin
[ 7.4491 ] Applet version 01.00.0000
[ 7.4673 ] Sending blob
[ 7.4676 ] […] 100%
[ 8.2880 ]
[ 8.2909 ] tegrarcm_v2 --boot recovery
[ 8.2935 ] Applet version 01.00.0000
[ 8.3148 ]
[ 9.3172 ] tegrarcm_v2 --isapplet
[ 9.3182 ] USB communication failed.Check if device is in recovery
[ 9.3422 ]
[ 9.3460 ] tegrarcm_v2 --ismb2
[ 1016.2011 ]
[ 1016.7972 ] tegradevflash_v2 --iscpubl
Thanks

hello tianyi2,

this looks like USB connection issue while image flashing, are you using a virtual box or usb-hubs?

Hi,JerryChang
The usb is directly connect to the back of the computer box. And the system is Ubuntu 16.04, not a virtual box.
Thanks

hello tianyi2,

please have a try to keep default spe_uart_instance settings for flashing the board.
and, you may update the configure file by using console=ttyS0, 115200n8.
thanks

Hi,JerryChang
I have already try it that keeping default spe_uart_instance and using console=ttyS0, 115200n8.But it has no action and leads to uncompleted log.
Thanks.

hello tianyi2,

Xavier is using combined uart to output logs all together,
could you please attach the logs you’ve seen for reference,
thanks

Hi,JerryChang
The cmdline is as follwoing.

root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=tty0 fbcon=map:0 net.ifnames=0 rootfstype=ext4 video=tegrafb no_console_suspend=1 earlycon=tegra_comb_uart,mmio32,0x0c168000 gpt usbcore.old_scheme_first=1 tegraid=19.1.2.0.0 maxcpus=8 boot.slot_suffix= boot.ratchetvalues=0.4.2 vpr_resize sdhci_tegra.en_boot_part_access=1 quiet

The uncompleted log is the picture as following.


Thanks