New version PBCCv2 is here! This article is just a history.
PicoBlaze C Compiler (PBCC) is a cross-compiler of C language for 8-bit soft-core Xilinx PicoBlaze-3 processor. PBCC is based on Small Device C Compiler (SDCC) front-end and back-end written in Pharo Smalltalk. The current version is possible to run on Windows 32-bit platform, but we are working on the portability to Unix-based systems.
As the compiler still has many bugs and missing features, it is good to know them:
To make better overview what can be used in C language and validly processed by PBCC, see following code examples:
void __port_write(volatile char port, volatile char arg) { unsigned volatile char p; unsigned volatile char a; p = port; a = arg; __asm OUTPUT _a, _p __endasm; } #define LCD_wr(arg) __port_write(0x40, (arg));__port_write(0x41, 01) int main(void) { char ch = 0x41; LCD_wr(ch); return 0; }