こんにちは。NoMaYです。アセンブラソースでも以下のメッセージが表示されますけれども、これは消せないのかな?、、、W0511187:CC-RL V1のオプション"-Odefault"の評価期間の有効期限が切れています。暗黙に"-Olite"指定に変更します。引き続き"-Odefault"を利用したい場合は製品の購入を検討ください。明示的に"-Olite"か"-Onothing"を指定することで、この警告は消えます。以下、CS+の画面コピーです。
こんにちは。NoMaYです。リンクサイズ制限が無くなったということで、以下のサンプルプログラムをビルドしてみました。ビルド出来ましたね。Bluetooth® Low Energy プロトコルスタック BLE 仮想UARTアプリケーション Rev.1.20PDFwww.renesas.com/jp/ja/document/apn/bluetooth-low-energy-protocol-stack-ble-virtual-uart-application-rev120ZIPwww.renesas.com/jp/ja/document/scd/bluetooth-low-energy-protocol-stack-ble-virtual-uart-application-rev120-sample-code以下、CS+ for CC V8.09 + CC-RL V1.11 / CC-RL V1.12の画面コピーです。CC-RL V1.11ではビルド出来ませんでしたCC-RL V1.12ではビルド出来ました[関連リンク]RL78ファミリ用 Bluetooth® Low Energy プロトコルスタック 製品ページwww.renesas.com/jp/ja/software-tool/bluetooth-low-energy-protocol-stack-rl78-familyTB-RX23WでFreeRTOS+BLEを試していこうかと思います(でも本格的にやるのは夏ぐらいから?) ← 2年前ですcommunity-ja.renesas.com/cafe_rene/forums-groups/mcu-mpu/rx/f/forum5/7051/tb-rx23w-freertos-ble
こんにちは。NoMaYです。リンクサイズ制限が無くなったということで、もうひとつ無線規格のサンプルプログラムがあったような気がして探してみたところ、製品ページはあったのですけれども、サンプルプログラム等はウェブでは公開されていなかったのでした。Sub-GHz/Wi-SUN プロトコルスタック 製品ページwww.renesas.com/jp/ja/software-tool/sub-ghzwi-sun-protocol-stack
こんにちは。NoMaYです。CC-RL V1.12のC++14対応に関して、以下のCS+のオンラインヘルプには以下の通り記載されているのですけれども、実際に試してみると、C++ソースとしてでは無く、Cソースとして、コンパイルされているようですね。オンラインヘルプtool-support.renesas.com/autoupdate/support/onlinehelp/csp/V8.09.00/CS+.chm/Compiler-CCRL.chm/Output/ccrl02c0401y.html「2.4.1 Command line operationThe compilation driver (ccrl) identifies the extension of the input file, and then starts the compiler, assembler, and linker. Alphabetical extensions are not case sensitive.- If the input file has the extension .s or .asm, the compilation driver assumes it is an assembly language file, and starts the assembler.- If the input file has the extension .c, the compilation driver assumes it is a C source file, and starts the compiler.- If the input file has the extension .cpp, .cc, or .cp, the compilation driver assumes that it is a C++ source file, and starts the compiler.- If the input file has the extension .obj, the compilation driver assumes that it is an object file, and starts the linker.If the input file has an extension other than the above, the compilation driver assumes that the file is a C source file, and starts the compiler.You can specify the language standard of C source files and C++ source files by using the -lang option.」ソース: test20230502_1.cpp
#ifndef __cplusplus#error __cplusplus is not defined.#endif
コマンド: test20230502_1.bat
ccrl -cpu=S3 -Olite -c test20230502_1.cpp
エラーメッセージ:
test20230502_1.cpp(2):F0520035:#error 指令: __cplusplus is not defined.
こんにちは。NoMaYです。CC-RL V1.12のC++14対応に関して、以下のユーザーズマニュアルには以下の通り記載されているのですけれども、実際に試してみると、ユーザーズマニュアルの記載とは異なり、以下のマクロが定義されているようですね。ユーザーズマニュアルwww.renesas.com/us/en/document/mat/cc-rl-c14-technical-preview-version-users-manual#page=13「3.2.2 MacrosThe Table 6 shows the macros whose definitions differ along with the parameter given for the option -lang. Please also refer to “4.2.2 Macros” in the CC-RL Users’ Manual as well for detail of the other macros.Note that the values in the table are in decimal.Table 7 Macros
Name Definition when -lang=cpp14 is specified__cplusplus 201402L__clang__ 1__STDC_HOSTED__ 0__STDC__ 1__STDC_VERSION__ Undefined__STDC_IEC_559__ Undefined
」ソース: test20230502_2.cpp
#ifndef __cplusplus#error __cplusplus is not defined.#endif#ifdef __STDC_IEC_559__#error __STDC_IEC_559__ is defined.#endif
コマンド: test20230502_2.bat
ccrl -cpu=S3 -lang=cpp14 -Olite -c test20230502_2.cpp
W0519999:CC-RL V1.12.00の"-lang=cpp14"オプションはテクニカルプレビュー版になります。製品開発には使用できません。test20230502_2.cpp:5:2: error: __STDC_IEC_559__ is defined.#error __STDC_IEC_559__ is defined. ^1 error generated.
こんにちは。NoMaYです。CC-RL V1.12のC++14対応に関して、以下のユーザーズマニュアルには以下の通り記載されているのですけれども、実際に試してみると、ユーザーズマニュアルの記載とは異なり、幾つかはC++14モードでは機能が実装されていないようですね。ユーザーズマニュアルwww.renesas.com/us/en/document/mat/cc-rl-c14-technical-preview-version-users-manual#page=13「3.2 Language extension specifications3.2.1 Reserved wordsPlease refer to “4.2.1 Reserved words” in the CC-RL User’s Manual for detail of the keywords reserved by CC-RL.」ユーザーズマニュアルwww.renesas.com/us/en/document/mat/cc-rl-compiler-users-manual#page=334「4.2.1 Reserved wordsThe CC-RL adds the following characters as reserved words to implement the expanded function. These words are similar to the ANSI C keywords, and cannot be used as a label or variable name.Reserved words that are added by the CC-RL are listed below.Table 4.9 List of Reserved Words
Reserved Words Usage__saddr Allocating a static variable to the saddr area__callt Calling a function with the callt instruction__near Specifying memory allocation area__far Specifying memory allocation area__inline Specifying memory allocation area__sectop Section start address__secend Section end address + 1
All names that include two underscores (__) are also invalid as label or variable names.」ソース: test20230502_3.cpp
static __inline int language_extension_inline_in_cpp_file(void);static __inline int language_extension_inline_in_cpp_file(void){ return 0b10101010;}int /*__callt*/ language_extensions_in_cpp_file(void);int /*__callt*/ language_extensions_in_cpp_file(void){ static int /*__saddr*/ sv; static int __near nv; static int __far fv; /* int __far *pt = __sectop( ".bss" ); */ /* int __far *pe = __secend( ".bss" ); */ __nop(); return language_extension_inline_in_cpp_file() + sv + nv + fv /* + *pt + *pe */;}
コマンド: test20230502_3.bat
ccrl -cpu=S3 -lang=cpp14 -Olite -c test20230502_3.cpp
以下の修飾子や演算子をC++14モードで使用するとコンパイルエラーになる:
__callt__saddr__sectop()__secend()
NoMaYさん、中の人です。
CC-RL C++14テクニカルプレビュー版を試用していただきありがとうございます!
ご指摘いただいた点については、ユーザーズマニュアル(およびオンラインヘルプ)の不備になります。次のマニュアル改訂時に修正を検討しています。なお、C++14テクニカルプレビュー版へのフィードバックはこちらのアンケートからも承っています!Renesas Electronics CC-RLコンパイラ C++14テクニカルプレビュー版に関するアンケート (office.com)よろしくお願いいたします!
aduさん、こんにちは。NoMaYです。リプライどうもありがとうございました。
こんにちは。NoMaYです。こういうリポジトリがGitHubにありました。こういう大きなROMを必要とするものも、無償評価版のCC-RL V1.12でビルド可能ですね。(ちなみに、e2 studio 2023-01でGCC for Renesas RL78がDepricatedになってしまっていますね。)TOPPERS/ASP for RTK5RLG140C00000BJgithub.com/RyutaroMorita/asp_rl78_gcc「TOPPERS/ASPカーネル(以下,ASPカーネル)は,TOPPERS新世代カーネルの基盤となるものとして,TOPPERSプロジェクトにおいて開発したリアルタイムカーネルです.μITRON4.0仕様のスタンダードプロファイル準拠のリアルタイムカーネルであるTOPPERS/JSPカーネルを拡張・改良する形で開発しました.」TOPPERS/ASP - RL78版qiita.com/RyutaroMorita/items/9b532bd7bcd53f53d299「他の型番への移植も可能ですが、TOPPERS/ASPを搭載して動作させるならROM:128KB/RAM:8KB以上の容量を持つ型番を選びましょう。」[追記]技術論的には、RTOSカーネルのようなものをGCC for Renesas RL78からCC-RLへ移植する場合に、64Kバイト以上のROMに対応しようとすると、前者のGCC for Renesas RL78では下記スレッドで話題にしたPLTと呼ばれる機構により関数ポインタサイズ=変数ポインタサイズであったことが、後者のCC-RLでは関数ポインタサイズ≠変数ポインタサイズとなってしまうことに、RTOSカーネルのソースが対応出来ているかどうか、というのが気になるところです。C言語からのアセンブラ関数呼び出しについてcommunity-ja.renesas.com/cafe_rene/forums-groups/beginners/f/002-2095199602/9532/c/46587#46587
こんにちは。NoMaYです。こういうリポジトリもGitHubにありました。micro T-Kernel 3.0 for RL78github.com/yuji-katori/RL78-mtkernel_3「RL78対応 μT-Kernel3.0トロンフォーラムより公開されているμT-Kernel3.0をルネサスエレクトロニクス社のRL78(S3コア)用にポーティングしたソースコードです。・ ターゲットボードはマルツエレック社のC-First(RL78/G14:R5F104LE搭載)です。・ 開発環境はルネサスエレクトロニクス社のCS+、コンパイラはCC-RLです。・ スタック見積もりツールにより、各種スタックサイズの算出を簡単に行えます。・ パートナーOS対応デバッグプラグインによりカーネルオブジェクトの状態参照が可能です。」[関連リンク]micro T-Kernel 3.0 for RXgithub.com/yuji-katori/RX-mtkernel_3「RX対応 μT-Kernel3.0トロンフォーラムより公開されているμT-Kernel3.0をルネサスエレクトロニクス社のRX(RXv1~RXv3コア)用にポーティングしたソースコードです。■ ターゲットボードは以下の9製品をサポートしています。GR-SAKURA(ルネサスエレクトロニクス社、RX63N(RXv1コア):R5F563NBD搭載)AP-RX63N-0A (アルファプロジェクト社、RX63N(RXv1コア):R5F563NED搭載)AP-RX65N-0A (アルファプロジェクト社、RX65N(RXv2コア):R5F565N9B搭載)AP-RX72N-0A (アルファプロジェクト社、RX72N(RXv3コア):R5F572NND搭載)TB-RX231 (ルネサスエレクトロニクス社、RX231(RXv2コア):R5F52318A搭載)TB-RX23W (ルネサスエレクトロニクス社、RX23W(RXv2コア):R5F523W8A搭載)TB-RX65N (ルネサスエレクトロニクス社、RX65N(RXv2コア):R5F565NED搭載)TB-RX660 (ルネサスエレクトロニクス社、RX660(RXv3コア):R5F56609B搭載)TB-RX66N (ルネサスエレクトロニクス社、RX66N(RXv3コア):R5F566NNH搭載)■ 開発環境はルネサスエレクトロニクス社のCS+、コンパイラはCC-RXです。■ RXv1~RXv3コア、Little/Big Endianに対応しており、他の品種へのポーティングも容易です。■ RXv3コアは倍精度浮動小数点、割込みのレジスタバンクに対応しています。■ スタック見積もりツールにより、各種スタックサイズの算出を簡単に行えます。■ パートナーOS対応デバッグプラグインによりカーネルオブジェクトの状態参照が可能です。■ TCP/IPプロトコルスタック[M3S-T4-Tiny]を利用したイーサネット通信をサポートしました。■ FatFsを利用したファイルシステムをサポートしました。■ メモリデバイスとしてRAMディスクとSDカードをサポートしました。」
こんにちは。NoMaYです。ふと、別スレッドにて、思い浮かんだのですけれども、CC-RL V1.12でC++14で固定少数点数クラス、とか、、、Google検索: C++ 固定小数点数クラスwww.google.com/search?q=C+++固定小数点数クラスGoogle検索: C++ 固定小数点数クラス MATLABwww.google.com/search?q=C+++固定小数点数クラス+MATLAB