ProcyonライブラリをAVRStudio6でコンパイルするのに問題があります。使用しているコードはAVRStudio4で完全に機能します。
次の行は、この共通ライブラリでのコンパイルに失敗します。
//! prints a string stored in program rom
/// \note This function does not actually store your string in
/// program rom, but merely reads it assuming you stored it properly.
void rprintfProgStr(const prog_char str[]);
エラーが発生します:
Error 1 unknown type name 'prog_char' D:\AVRTests\ProcyonLibTest\ProcyonLibTest\rprintf.h 85 1 ProcyonLibTest
この機能の減速に関係する別のエラーもあります。次は:
// use this to store hex conversion in RAM
//static char HexChars[] = "0123456789ABCDEF";
// use this to store hex conversion in program memory
//static prog_char HexChars[] = "0123456789ABCDEF";
static char __attribute__ ((progmem)) HexChars[] = "0123456789ABCDEF";
エラーが発生します:
Error 2 variable 'HexChars' must be const in order to be put into read-only section by means of '__attribute__((progmem))' D:\AVRTests\ProcyonLibTest\ProcyonLibTest\rprintf.c 45 39 ProcyonLibTest
これは、研究から誰もが働いているように見える標準ライブラリを使用しています。なぜこれが起こっているのかについてのアイデアはありますか?