Debugging Cypress FX2LP Firmware

Posted in FX2LP on 2012-05-05 at 17:20:36 by Chris – 1 Comment

I added a software USART to FPGALink's FX2LP firmware, to facilitate firmware debugging. The code is here. By default it uses PD7 to output debug messages. I wired my FX2FPGA board up with a SAVR:Serial thus:

To enable it, just uncomment the #define DEBUG in firmware/debug.h and run sudo minicom with this config:

chris@wotan$ cat /etc/minicom/minirc.dfl
pu port        /dev/ttyS0
pu baudrate    115200
pu bits        8
pu parity      N
pu stopbits    1
pu rtscts      No
pu addlinefeed Yes

You can now send debug messages to minicom from the FX2 firmware:

void usartInit(void);
void usartSendByte(uint8 c);
void usartSendByteHex(uint8 byte);
void usartSendWordHex(uint16 word);
void usartSendLongHex(uint32 word);
void usartSendString(const char *s);

One Comment

Cool mate. Cool....


Leave a Reply

You may use TWiki syntax in your comment. Your email address will not be published.

| Home | About |

Powered by WordPress & MakeStuff theme, with Silk icons