pico编译器c语言,PicoBlaze 有没有C编译器??

PicoBlaze FAQ – Is there a C-Compiler?

There is no official C compiler currently available (September 2007). There have been independent offerings which have been made available to the PicoBlaze community but to my knowledge nothing has been professionally developed or made consistently available. Of course something my have been released since posting this message so please do add any updates that you are aware of to this thread.

Whilst on the subject of compilers it is worth considering if they are really suitable for PicoBlaze anyway. Please understand that I am not against having a compiler but we should keep in mind that it does only support a program space of 1024 instructions and has a scratch pad memory of only 64-bytes. There are micro controllers on the market with less or similar resources to PicoBlaze for which compilers are available. However, we must also recognise that such small micro controllers are quite physically constrained as to what applications they can be used for and consequently the compilers have generally been highly optimised to suit those classes of application. Likewise it is reasonable to expect such a compiler to constrain you to using 8-bit or 16-bit integer math’s rather than IEEE 32-bit floating point ‘real’ numbers and with such a constraint it really isn’t so different to writing assembler which actually provides you the flexibility to implement the precision you require for each variable.

The question you should also ask yourself is even if there were a C compiler, would PicoBlaze be viable? Remember it is an 8-bit processor with 1K-instruction space so are you looking at the size of code that will fit? May be you actually need to look at MicroBlaze with its comprehensive set of tools (EDK) where the C language is the standard coding method.

Assuming PicoBlaze is viable for your application then writing at the assembler level is not so difficult given the maximum size of the programs. Very often PicoBlaze is used to control hardware and working at the assembler level combined with a processor which always executes every instruction in 2 clock cycles leads to 100% predictable timing if and when you need that ultimate control. The architecture and instruction set of KCPSM3 was also created with the ease of assembly programming in mind. Having 16 registers which can be used in all instructions without restrictions makes handling of local variables very easy to manage. The automatic call/return stack enables subroutines to be nested to a depth of 31 levels and is something you can take it for granted. In contrast, if you used a processor without an automatic stack then you would definitely feel the need to have a compiler which would manage (hide) the details of implementing a software stack for you. All I ask is that you give it a try; my only warning being that it is often such fun that it becomes addictive!

Regards,

Ken Chapman

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值