PicoBlaze C Compiler (PBCCv1, 2010-02-15)

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.

Requirements

Download

Add-ons

Documentation

Known bugs

As the compiler still has many bugs and missing features, it is good to know them:

  • Global variables not supported yet (working on register allocation optimizations along with the support of global variables)
  • Optimized switch does not work (JUMPTABLE)
  • Missing: Get highest bit, get value at address, pointer set, address of (SDCC iCodes)
  • Inlining not supported yet

Code Examples

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;
}

License

  • Back-end part is under “Freeware” license (see EULA.txt in the package)
    • We are negotiating the use of some open source license with our partners at the moment.
  • Front-end part is inherited from SDCC as GPL version 2 (see COPYING in the package)

Author

projects/vlam/pbcc/pbcc20100215.txt · Last modified: 2011/02/08 13:27 by krivka
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 4.0 International
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki