Closed mithro closed 7 years ago
Use grep '[^ wvs(]printf' * and grep '[^ w]puts' *
grep '[^ wvs(]printf' *
grep '[^ w]puts' *
The only places printf should be used directly is;
ether*.{c,h}
telnet.{c,h}
stdio_wrap.h
main.c
(H2U P=opsis T=video R=nextgen) tansell@tansell-x1c:~/foss/timvideos/lite/opsis-soc/firmware$ grep '[^ wvs(]printf' * ci.c: printf("%X\r\n", (int)cas_switches_in_read()); encoder.c: printf("Unsupported encoder quality (50, 75, 85 or 100)\r\n"); etherbone.c: printf("Etherbone listening on port %d\n", ETHERBONE_PORT); ethernet.c: printf("uIP init done with ip %d.%d.%d.%d\n", ip_addr[0], ip_addr[1], ip_addr[2], ip_addr[3]); fx2.c: printf("fx2: Read from invalid address %02X (end: %02X)\r\n", addr, end_addr); fx2.c: printf("fx2: Waiting for FX2 to load firmware.\r\n"); fx2.c: printf("fx2: Waiting at %02X (end: %02X)\r\n", next_read_addr, end_addr); fx2.c: printf("fx2: Timeout loading!\r\n"); fx2.c: printf("fx2: Booted.\r\n"); fx2.c: printf("fx2: read %02X (end: %02X)\r\n", next_read_addr, end_addr); fx2.c: printf("fx2: Finished loading firmware.\r\n"); fx2.c: printf("fx2: Bad status %02X\r\n", status); fx2.c: printf("fx2: Turning off.\r\n"); fx2.c: printf("fx2: Turning on.\r\n"); fx2.c: printf("Possible FX2 Firmware:\r\n"); fx2.c: printf(" [%s] usbjtag (%02X) (IXO USB JTAG Mode)\r\n", fx2_fw_active == FX2FW_USBJTAG ? "*" : " ", FX2_MBFW_USBJTAG_END); fx2.c: printf(" [%s] hdmi2usb (%02X) (HDMI2USB Video Capture Mode)\r\n", fx2_fw_active == FX2FW_HDMI2USB ? "*" : " ", FX2_MBFW_HDMI2USB_END); hdmi_in0.c: printf("dvisampler0: slot0: stray DMA\r\n"); hdmi_in0.c: printf("dvisampler0: slot1: stray DMA\r\n"); hdmi_in0.c: printf("dvisampler0: slot0: unexpected frame length: %d\r\n", length); hdmi_in0.c: printf("dvisampler0: slot1: unexpected frame length: %d\r\n", length); hdmi_in0.c: printf("dvisampler0: ph:%4d %4d %4d // charsync:%d%d%d [%d %d %d] // WER:%3d %3d %3d // chansync:%d // res:%dx%d\r\n", hdmi_in0.c: printf("dvisampler0: IDELAY busy timeout\r\n"); hdmi_in0.c: printf("dvisampler0: delays calibrated\r\n"); hdmi_in0.c: printf("dvisampler0: phase init OK\r\n"); hdmi_in0.c: printf("dvisampler0: phase init failed\r\n"); hdmi_in0.c: printf("dvisampler0: giving up\r\n"); hdmi_in0.c: printf("dvisampler0: FIFO overflow\r\n"); hdmi_in0.c: printf("dvisampler0: disconnected\r\n"); hdmi_in0.c: printf("dvisampler0: lost PLL lock\r\n"); hdmi_in0.c: printf("dvisampler0: PLL locked\r\n"); hdmi_in0.c: printf("dvisampler0: connected\r\n"); hdmi_in1.c: printf("dvisampler1: slot0: stray DMA\r\n"); hdmi_in1.c: printf("dvisampler1: slot1: stray DMA\r\n"); hdmi_in1.c: printf("dvisampler1: slot0: unexpected frame length: %d\r\n", length); hdmi_in1.c: printf("dvisampler1: slot1: unexpected frame length: %d\r\n", length); hdmi_in1.c: printf("dvisampler1: ph:%4d %4d %4d // charsync:%d%d%d [%d %d %d] // WER:%3d %3d %3d // chansync:%d // res:%dx%d\r\n", hdmi_in1.c: printf("dvisampler1: IDELAY busy timeout\r\n"); hdmi_in1.c: printf("dvisampler1: delays calibrated\r\n"); hdmi_in1.c: printf("dvisampler1: phase init OK\r\n"); hdmi_in1.c: printf("dvisampler1: phase init failed\r\n"); hdmi_in1.c: printf("dvisampler1: giving up\r\n"); hdmi_in1.c: printf("dvisampler1: FIFO overflow\r\n"); hdmi_in1.c: printf("dvisampler1: disconnected\r\n"); hdmi_in1.c: printf("dvisampler1: lost PLL lock\r\n"); hdmi_in1.c: printf("dvisampler1: PLL locked\r\n"); hdmi_in1.c: printf("dvisampler1: connected\r\n"); grep: libuip: Is a directory pll.c: printf("Frequency too low for PLLs\r\n"); pll.c: printf("Frequency too high for PLLs\r\n"); pll.c: printf("framebuffer PLL:\r\n"); pll.c: printf("%04x ", hdmi_out0_driver_clocking_pll_dat_r_read()); pll.c: printf("\r\n"); pll.c: printf("dvisampler0 PLL:\r\n"); pll.c: printf("%04x ", hdmi_in0_clocking_pll_dat_r_read()); pll.c: printf("\r\n"); pll.c: printf("dvisampler1 PLL:\r\n"); pll.c: printf("%04x ", hdmi_in1_clocking_pll_dat_r_read()); pll.c: printf("\r\n"); grep: __pycache__: Is a directory telnet.c: printf("Telnet listening on port %d\n", TELNET_PORT); telnet.c: printf("\nTelnet connected.\n"); telnet.c: printf("\nTelnet disconnected.\n"); telnet.c:int telnet_printf(const char *fmt, ...) telnet.c: len = vscnprintf(outbuf, sizeof(outbuf), fmt, args); telnet.h:int telnet_printf(const char *fmt, ...) __attribute__((format(printf, 1, 2))); grep: uip: Is a directory (H2U P=opsis T=video R=nextgen) tansell@tansell-x1c:~/foss/timvideos/lite/opsis-soc/firmware$
Fixed in https://github.com/timvideos/HDMI2USB-misoc-firmware/commit/99eb2a3e691553279c18e75195adaf7033774172
Use
grep '[^ wvs(]printf' *
andgrep '[^ w]puts' *
The only places printf should be used directly is;
ether*.{c,h}
telnet.{c,h}
stdio_wrap.h
main.c
before Ethernet is initialized