Top Banner
www.renesas.com User’s Manual 本資料に記載の全ての情報は発行時点のものであり、ルネサス エレクトロニクスは、 予告なしに、本資料に記載した製品または仕様を変更することがあります。 ルネサス エレクトロニクスのホームページなどにより公開される最新情報をご確認ください。 CC-RX コンパイラ ユーザーズマニュアル 対象デバイス RX ファミリ Rev.1.08 2019.04
880

CC-RX コンパイラ ユーザーズマニュアル · このマニュアルの使い方...

Sep 01, 2019

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • www.renesas.com

    Users M

    anual

    CC-RX

    RX

    Rev.1.08 2019.04

  • 2019 Renesas Electronics Corporation. All rights reserved.

    1.

    2.

    3. 4.

    5.

    OA AV

    Harsh environment

    6.

    7. Harsh environment

    8. RoHS

    9.

    10. 11. 12. 1.

    2. 1

    (Rev.4.0-1 2017.11)

    135-0061 3-2-24

    www.renesas.com

    www.renesas.com/contact/

  • RX CC-RX

    CC-RX

    CC-RX

    1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. A.

    XXX 10 ... XXXX

    16 ... 0xXXXX

  • 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

    1.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

    1.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

    1.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

    1.4.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

    1.4.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

    1.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

    1.6 standard professional . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

    1.7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

    2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

    2.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

    2.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

    2.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

    2.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

    2.5.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

    2.5.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167

    2.5.3 rlink . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212

    2.5.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297

    3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3113.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311

    3.1.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311

    3.1.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312

    3.1.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314

    3.1.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314

    3.1.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314

    3.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315

    3.2.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315

    3.2.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315

    3.2.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316

    3.2.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316

    3.2.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317

    3.2.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319

    3.2.7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319

    3.2.8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320

  • 3.2.9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320

    3.2.10 CRC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320

    3.2.11 CFI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321

    3.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321

    3.3.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321

    3.3.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322

    3.3.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322

    3.3.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322

    3.3.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323

    3.4 S HEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324

    3.4.1 S . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324

    3.4.2 HEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326

    4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3284.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328

    4.1.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328

    4.1.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328

    4.1.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330

    4.1.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337

    4.1.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350

    4.1.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351

    4.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352

    4.2.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352

    4.2.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354

    4.2.3 #pragma . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354

    4.2.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356

    4.2.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369

    4.2.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370

    4.2.7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405

    5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4065.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406

    5.1.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406

    5.1.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406

    5.1.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407

    5.1.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407

    5.1.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408

    5.1.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414

    5.1.7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416

    5.1.8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416

    5.1.9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422

    5.1.10 PID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423

    5.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424

  • 5.2.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424

    5.2.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425

    5.2.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426

    5.2.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428

    5.2.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435

    5.2.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443

    5.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443

    5.3.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443

    5.3.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443

    5.3.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444

    5.3.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445

    5.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449

    5.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 450

    6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4516.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451

    6.1.1 C/C++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451

    6.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455

    6.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456

    7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4587.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458

    7.1.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458

    7.1.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460

    7.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461

    7.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462

    7.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4697.4.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469

    7.4.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469

    7.4.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470

    7.4.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476

    7.4.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478

    7.4.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479

    7.4.7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 480

    7.4.8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504

    7.4.9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513

    7.4.10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 514

    7.4.11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 516

    7.4.12 < stdlib.h> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 542

    7.4.13 < string.h>. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552

    7.4.14 < complex.h> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 560

    7.4.15 < fenv.h> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 568

    7.4.16 < inttypes.h> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 573

  • 7.4.17 < iso646.h>. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 576

    7.4.18 < stdbool.h> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 576

    7.4.19 < stdint.h> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 576

    7.4.20 < tgmath.h>. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 577

    7.4.21 < wchar.h> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 579

    7.5 EC++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 597

    7.5.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 597

    7.5.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 631

    7.5.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 633

    7.5.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 651

    7.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 672

    8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6738.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 673

    8.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 673

    8.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 673

    8.3.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 674

    8.3.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 674

    8.3.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 677

    8.3.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 678

    8.3.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 696

    8.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 698

    8.5 PIC/PID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 710

    8.5.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 710

    8.5.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 711

    8.5.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 711

    8.5.4 PIC/PID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 711

    8.5.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 712

    8.5.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 713

    8.5.7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 713

    9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7179.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 717

    9.1.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 717

    9.1.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 718

    9.1.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 719

    9.1.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 721

    9.1.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 722

    9.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 723

    9.2.1 C/C++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 723

    9.2.2 C/C++ ( C ) . . . . . . . . . . . . . . . 724

    9.2.3 C++ ( ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 724

  • 10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72510.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 725

    10.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 725

    10.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 725

    10.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 725

    10.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 726

    10.5.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 726

    10.5.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 727

    10.5.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 793

    10.5.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 803

    10.5.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 807

    10.5.6 C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 829

    11. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83111.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 831

    11.2 C C++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 835

    11.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 836

    11.4 E0562330 . . . . . . . . . . . . . . . . . . . 836

    11.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 838

    11.5.1 V.1.01 V.1.00 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 838

    11.5.2 V2.00 V.1.00 V.1.02 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 840

    11.5.3 V2.03 V1.00 V2.02 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 841

    11.5.4 V2.06 V2.05 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 841

    11.5.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 842

    A. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 843A.1 (C ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 843

    A.1.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 843

    A.1.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 844

    A.1.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 844

    A.1.4 const . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 845

    A.1.5 const . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 845

    A.1.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 846

    A.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 846

    A.2.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 846

    A.2.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 847

    A.2.3 ( ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 847

    A.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 848

    A.3.1 C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 848

    A.3.2 C CPU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 848

    A.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 850

    A.4.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 850

  • A.4.2 const . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 850

    A.4.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 850

    A.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 851

    A.5.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 851

    A.5.2 RAM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 851

    A.5.3 ROM RAM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 851

    A.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 852

    A.6.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 852

    A.6.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 853

    A.6.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 854

    A.6.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 855

    A.6.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 856

    A.6.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 858

    A.6.7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 859

    A.7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 860

    A.7.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 860

    A.7.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 862

    A.7.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 863

    A.7.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 864

    A.7.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 866

    A.7.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 867

    A.8 C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 869

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C - 1

  • CC-RX 1.

    R20UT3248JJ0108 Rev.1.08 Page 10 of 8802019.04.01

    1. RX C/C++

    1.1 CC-RXGUI

    CC-RX (1) ccrx: (2) asrx: (3) rlink: (4) lbgrx:

  • R20UT3248JJ0108 Rev.1.08 Page 11 of 8802019.04.01

    CC-RX 1.

    1.1

    C/C99 (.c)

    C++ (.cpp, .cc, .cp)

    (.src)

    (.obj)

    (.abs)

    (.p, .pp)

    rcfrt, rcbackrx

    ccrx

    lbgrx

    (.lib)

    (.lib)

    rlink

    rlink

    (.sni)

    S (.mot)

    HEX (.hex)

    (.bin)

    CallWalker

    (.src)

    (.obj)

    asrx

  • CC-RX 1.

    R20UT3248JJ0108 Rev.1.08 Page 12 of 8802019.04.01

    1.2 LLVM Release License LLVM

    1.3 RX C/C++ (CC-RX)

    (1) ANSI C,C99,C++ ANSI C K&R

    (2)

    (3)

    (4) CC-RX DWARF2/3

    ==============================================================================LLVM Release License==============================================================================University of Illinois/NCSAOpen Source License

    Copyright (c) 2003-2016 University of Illinois at Urbana-Champaign.All rights reserved.

    Developed by:

    LLVM Team

    University of Illinois at Urbana-Champaign

    http://llvm.org

    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal with the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

    * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimers.

    * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimers in the documentation and/or other materials provided with the distribution.

    * Neither the names of the LLVM Team, University of Illinois at Urbana-Champaign, nor the names of its contributors may be used to endorse or promote products derived from this Software without specific prior written permission.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESSFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THECONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THESOFTWARE.

  • R20UT3248JJ0108 Rev.1.08 Page 13 of 8802019.04.01

    CC-RX 1.

    1.4

    1.4.1

    1.1

    No.

    1 define ( )

    2 (OS )

    3

    1 32768

    4 1 ( )

    5 ( )

    6

    #include ( )

    7 #define ( )

    8 ( )

    9 ( )

    10 ( )

    11 #if, #elif ( )

    12 ( )

    13 ( ) ( )

    14 1 ( ) ( )

    15 16

    16 6

    17 2147483647

    18 ( )

    19 (while do for ) (if switch )

    4096

    20 1 2048

    21 1 goto 2147483646

    22 switch 2048

    23 switch 2048

    24 switch case 2147483646

    25 for 2048

    26 32766

    27 2147483646

    28 1 500

    29

    open *1

  • CC-RX 1.

    R20UT3248JJ0108 Rev.1.08 Page 14 of 8802019.04.01

    1. 8.3.2

    2. 1 #pragma section section

    1.4.2

    1.2

    1.

    1.5 standard professional standard professional 1.6 standard professional 1.7

    CC-RX V2.06 V2.00

    1.6 standard professional standard professional 2

    30 *2 8146

    31 1#pragma section

    2045

    32 4294967295

    33

    1 8190

    1 1 32760

    2 1 *1

    3 ( )

    4 ( )

    5 ( )

    6 0FFFFFFFFH

    7 65265 ( )65274 ( )

    8 30

    9 1 *1

    10 1 *1

    11 2048

    12 65535

    No.

  • R20UT3248JJ0108 Rev.1.08 Page 15 of 8802019.04.01

    CC-RX 1.

    standard ANSI C

    professional standard

    professional #pragma professional 2.5 professional

    #pragma 4.2.3 #pragma

    1.7 60 professional

    professional

    - ROM 128K 128K

    W V

    - Renesas Optimizing Linker W1.01.01 [25 Apr 2014]

    - Renesas Optimizing Linker V1.01.01 [25 Apr 2014]

    -

    -

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 16 of 8802019.04.01

    2.

    2.1 RX C/C++ C C99 C++

    RX C/C++ 1

    (1) C

    (2) P

    (3) C

    (4) C

    (5)

    (6)

    (7)

    2.2 RX C/C++

    2.1 RX C/C++

    C

    .c C C99

    C++

    .cpp

    .cc

    .cp

    C++

    C C99 C++

    C

    .p C C99 -output=prep

    C++

    .pp C++ ASCII -output=prep

  • R20UT3248JJ0108 Rev.1.08 Page 17 of 8802019.04.01

    CC-RX 2.

    .src C,C99 C++

    .src

    .lst -listfile -show

    .obj ELF

    .abs ELF

    .map -list -show

    .lib

    .lbp -list -show

    .lbk

    S

    .mot S

    HEX

    .hex HEX

    .bin

    .sni -stack

    .dbg -sdebug

    td

    .rti td

    .cal CallWalker

    .bls -map

    .bls -map

    .jmp -jump_entries_for_pic

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 18 of 8802019.04.01

    2.3

    2.2

    .fsy -fsymbol

    C++

    .td,.ti,.pi,.ii C++

    No.

    1 path

    2 BIN_RX ccrx

    ccrx lbgrx

    3 ISA_RX *1 < > RXV1 RXV2 RXV3 V3.00.00

    4 INC_RX

    ccrx \..\include

    5 INC_RXA

    6 TMP_RX

    ccrx %TEMP%

    7 HLNK_LIBRARY1 HLNK_LIBRARY2 HLNK_LIBRARY3

    library 1,2,3

    8 HLINK_TMP

  • R20UT3248JJ0108 Rev.1.08 Page 19 of 8802019.04.01

    CC-RX 2.

    *1) ISA_RX CPU_RX ISA_RX

    2.4 RX C/C++

    ( )

    (1)

    (a) ccrxccrx

    - .s.src.S.SRC- .c.C C - .cpp.CPP.cc.CC.cp.CP C++ C

    C/C++

    [ ] [ ] ... [ ] { } | 1

    (b) asrxasrx

    9 HLINK_DIR input library HLNK_DIR

    10 CPU_RX *1 CPU RX600 RX200

    ccrx [ ][ [ ] ] -[=[=]][,]

    asrx [ ][ [ ] ] -[=][,]

    No.

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 20 of 8802019.04.01

    (c) rlinkrlink

    -

    -

    - S HEX

    (d) lbgrxlbgrx

    (2)

    (a) 1 1

    - C/C++ tp1.c tp2.c ccrx

    - asrx

    - rlink tp.abs

    1. output "-output=sty" S

    2. output

    3. ccrx -asmcmd -lnkcmd -asmopt -lnkopt

    4. 0 -lnkcmd -lnkopt

    (b) 1 1 tp.abs

    - C/C++ tp1.c tp2.c ccrx

    - asrx tp1.obj, tp2.obj

    rlink [ ][ [ ] ] -[=][,]

    lbgrx [ ] -[=][,]

    ccrx -isa=rxv1 -output=abs=tp.abs tp1.c tp2.c

    ccrx -isa=rxv1 -output=obj tp1.c tp2.crlink -form=abs -output=tp.abs -subcommand=cmd.sub tp1.obj tp2.obj

  • R20UT3248JJ0108 Rev.1.08 Page 21 of 8802019.04.01

    CC-RX 2.

    1. ccrx "-output=obj" ccrx

    2. ccrx C/C++

    3. rlink form "-form=sty" S

    (c) 1

    - C/C++ tp1.c tp2.c ccrx tp1.src, tp2.src

    - tp1.src, tp2.src asrx tp1.obj, tp2.obj

    - tp1.obj, tp2.obj rlink tp.abs

    ccrx "-output=src" ccrx

    (d) 1 1

    - tp1.src, tp2.src asrx

    - rlink tp.abs

    0 -lnkcmd -lnkopt

    (e) 1

    - tp1.src, tp2.src asrx tp1.obj, tp2.obj

    - tp1.obj, tp2.obj rlink tp.abs

    1

    2

    ccrx -isa=rxv1 -output=src tp1.c tp2.casrx tp1.src tp2.srcrlink -form=abs -output=tp.abs -subcommand=cmd.sub tp1.obj tp2.obj

    ccrx -isa=rxv1 -output=abs=tp.abs tp1.src tp2.src

    ccrx -isa=rxv1 -output=obj tp1.src tp2.srcrlink -form=abs -output=tp.abs -subcommand=cmd.sub tp1.obj tp2.obj

    asrx -isa=rxv1 tp1.src tp2.srcrlink -form=abs -output=tp.abs -subcommand=cmd.sub tp1.obj tp2.obj

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 22 of 8802019.04.01

    (f)

    - lib1.lib (lib1.lbp)

    2.5 RX C/C++ 2.5.1 2.5.2 2.5.3 rlink2.5.4

    2.5.1

    rlink -form=library -list -library=lib1.lib

  • R20UT3248JJ0108 Rev.1.08 Page 23 of 8802019.04.01

    CC-RX 2.

    -lang

    -include

    -preinclude

    -define

    -undefine

    -message

    -nomessage

    -change_message

    -no_warning V2.08.00

    -file_inline_path ( ) V2.00 V.1.02

    -comment /* */

    -truncated_address_initializer V3.01.00

    C 1, 2

    -check M16C(R8C),H8(H8S,H8SX),SuperH

    -misra2004 Professional

    MISRA-C:2004

    -misra2012 Professional V2.04.00

    MISRA-C:2012

    -ignore_files_misra Professional

    MISRA-C:2004MISRA-C:2012

    -check_language_extension Professional

    MISRA-C:2004 MISRA-C:2012

    -misra_intermodule Professional V3.01.00

    MISRA-C:2012

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 24 of 8802019.04.01

    -output

    -noline #line

    -debug

    -nodebug

    -section

    -stuff

    -nostuff

    -instalign4 4

    -instalign8 8

    -noinstalign

    -nouse_div_inst DIV,DIVU,FDIV,DDIV

    -create_unfilled_area .OFFSET

    -stack_protector/-stack_protector_all Professional V2.04.00

    -avoid_cross_boundary_prefetch V2.07.00

    4

    -insert_nop_with_label V2.08.00

    nop

    -control_flow_integrity Professional V2.08.00

    -listfile

    -nolistfile

    -show

  • R20UT3248JJ0108 Rev.1.08 Page 25 of 8802019.04.01

    CC-RX 2.

    (1/2)

    -optimize

    -goptimize

    -speed

    -size

    -loop

    -inline

    -noinline

    -file_inline ( ) V2.00 V.1.02

    -case switch

    -volatile volatile

    -novolatile volatile

    -const_copy const

    -noconst_copy const

    -const_div

    -noconst_div

    -library

    -scope

    -noscope

    -schedule

    -noschedule

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 26 of 8802019.04.01

    (2/2)

    -map

    -smap

    -nomap

    -approxdiv

    -enable_register ( ) V2.00 V.1.02 register

    -simple_float_conv

    -fpu

    -nofpu

    -dpfpu V3.01.00

    -nodpfpu V3.01.00

    -tfu V3.01.00

    -alias

    -float_order ( ) V2.00 V.1.02

    -ip_optimize

    -merge_files

    -whole_program

  • R20UT3248JJ0108 Rev.1.08 Page 27 of 8802019.04.01

    CC-RX 2.

    -isa

    -cpu

    -endian

    -round

    -denormalize

    -dbl_size double long double

    -int_to_short int short unsigned int unsigned short

    -signed_char char signed char

    -unsigned_char char unsigned char

    -signed_bitfield signed

    -unsigned_bitfield unsigned

    -auto_enum

    -bit_order

    -pack 1

    -unpack

    -exception

    -noexception

    -rtti C++ dynamic_casttypeid

    -fint_register

    -branch

    -base ROM,RAM

    -patch CPU

    -pic PIC

    -pid PID

    -nouse_pid_register PID

    -save_acc

    -asmcmd asrx

    -lnkcmd rlink

    -asmopt asrx

    -lnkopt rlink

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 28 of 8802019.04.01

    -logo

    -nologo

    -euc EUC

    -sjis SJIS

    -latin1 ISO-Latin1

    -utf8 UTF-8

    -big5 BIG5

    -gb2312 GB2312

    -outcode

    -subcommand

  • R20UT3248JJ0108 Rev.1.08 Page 29 of 8802019.04.01

    CC-RX 2.

    /

    - -lang

    - -include

    - -preinclude

    - -define

    - -undefine

    - -message

    - -nomessage

    - -change_message

    - -no_warning V2.08.00

    - -file_inline_path (*) - -comment

    - -truncated_address_initializer V3.01.00 - -check

    - -misra2004 Professional

    - -misra2012 Professional V2.04.00

    - -ignore_files_misra Professional

    - -check_language_extension Professional

    - -misra_intermodule Professional V3.01.00

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 30 of 8802019.04.01

    -lang

    /

    - cppcccp C++ CC89 srcs

    -

    - lang=c C C89

    - lang=cpp C++

    - lang=ecpp Embedded C++

    - lang=c99 C C99

    - Embedded C++ catchconst_castdynamic_castexplicitmutablenamespacereinterpret_caststatic_casttemplatethrowtrytypeidtypenameusing

    - EC++ lang=ecpp

    - ( C/C++ ) C/C++ C/C++

    -lang= { c| cpp| ecpp| c99 }

  • R20UT3248JJ0108 Rev.1.08 Page 31 of 8802019.04.01

    CC-RX 2.

    -include

    /

    -

    - ,

    -include INC_RX

    -""#include include INC_RX

    - include ( )

    -include = [,]

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 32 of 8802019.04.01

    -preinclude

    /

    -

    - ,

    - preinclude

    -

    -preinclude = [,]

  • R20UT3248JJ0108 Rev.1.08 Page 33 of 8802019.04.01

    CC-RX 2.

    -define

    /

    - #define

    - < >=< > < >

    - < >

    - < >

    - #define #define

    -

    -define = [,] [= ]

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 34 of 8802019.04.01

    -undefine

    /

    -

    - ,

    -

    -

    -undefine = [,]

  • R20UT3248JJ0108 Rev.1.08 Page 35 of 8802019.04.01

    CC-RX 2.

    -message

    /

    -

    -

    -

    - lnkcmd message nomessage

    -message

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 36 of 8802019.04.01

    -nomessage

    /

    -

    -

    - ,

    - < >-< > -

    - M ( ) 5 ) M0523009 -nomessage=23009

    -

    - lnkcmd message nomessage

    - nomessage

    - ( ) 0510000 0549999

    - 0520000 0529999 -change_message

    -nomessage[= [- ][,]

  • R20UT3248JJ0108 Rev.1.08 Page 37 of 8802019.04.01

    CC-RX 2.

    -change_message

    /

    -

    - ,

    - MW ( ) 5 ) M0523009 -change_message=error=23009

    -

    -

    -

    -

    -

    -

    - nomessage

    -

    -change_message= [,] : [=[- ][,]] : { information | warning | error }

    change_message=information=

    change_message=warning=

    change_message=error=

    change_message=information

    change_message=warning

    change_message=error

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 38 of 8802019.04.01

    - lnkcmd message nomessage

    -

    -

    - misra2004 MISRA (M)

    - (E) (W) ( )

  • R20UT3248JJ0108 Rev.1.08 Page 39 of 8802019.04.01

    CC-RX 2.

    -no_warning V2.08.00

    /

    -

    -

    - ,

    -

    -

    - 5

    - 0 99999 51000 54999

    - -change_message=error

    - -nomessage

    -no_warning={|-}[,]

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 40 of 8802019.04.01

    -file_inline_path

    /

    - V2.00

    -file_inline_path= [,]

  • R20UT3248JJ0108 Rev.1.08 Page 41 of 8802019.04.01

    CC-RX 2.

    -comment

    /

    - comment=nonest

    - comment=nest

    - comment=nonest

    - comment=nest comment=nonest [1]

    -comment = { nest | nonest }

    /* This is an example of /* nested */ comment */ [1]

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 42 of 8802019.04.01

    -truncated_address_initializer V3.01.00

    /

    - C 1, 2 E0520069 W0520069

    - 0

    - 1, 2

    -

    - C++ Embedded C++

    -truncated_address_initializer

  • R20UT3248JJ0108 Rev.1.08 Page 43 of 8802019.04.01

    CC-RX 2.

    -check

    /

    - R8C,M16C C H8, H8S, H8SX C/C++ SuperH C/C++ C/C++

    - check=nc R8C,M16C C

    - signed_char, signed_bitfield, bit_order=left, endian=big, dbl_size=4

    - inlineenum #pragma BITADDRESS#pragma ROM#pragma PARAMETERasm()

    - -int_to_short signed short int,signed int unsigned short int unsigned int

    - signed short, unsigned short long, long long

    - signed short int, short, char char

    - check=ch38 H8,H8S,H8S C/C++

    - unsigned_char, unsigned_bitfield, bit_order=right, endian=little, dbl_size=4

    - __asm#pragma unpack

    - signed long

    - -int_to_short signed short int,signed int unsigned short int unsigned int

    - signed short, unsigned short long, long long

    - signed short int, short, char char

    - check=shc SuperH C/C++

    - unsigned_char, unsigned_bitfield, bit_order=right, endian=little, dbl_size=4 , round=nearest- #pragma unpack

    - volatile

    -

    -

    -

    - dbl_size=4 R8C, M16C C H8, H8S, H8SX C/C++ SuperH C/C++ / dbl_size=4 double long double 32 R8C, M16C C fdouble_32H8, H8S, H8SX C/C++ double=float SuperH C/C++ double=floatdouble 32

    -check = { nc | ch38 | shc}

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 44 of 8802019.04.01

    - unsigned int long SuperH C/C++ unsigned long SuperH C/C++ strict_ansi signed long long

    - volatile SuperH C/C++ volatile SuperH C/C++

    -

    - R8C, M16C C fextend_to_int

  • R20UT3248JJ0108 Rev.1.08 Page 45 of 8802019.04.01

    CC-RX 2.

    -misra2004 Professional

    /

    - MISRA-C:2004

    - misra2004=all

    - misra2004=apply=< >[,< >,...]

    - misra2004=ignore=< >[,< >,...]

    - misra2004=required required

    - misra2004=required_add=< >[,< >,...] required

    - misra2004=required_remove=< >[,< >,...] required

    - misra2004 =< > 1 1

    - 10 .

    - MISRA-C:2004 : M0523028 Rule :

    - misra2004=< >

    - misra2004 ( )... -misra2004=ignore=2.2 -misra2004=apply=2.3-misra2004=required_add=4.1 -misra2004=apply=4.2-misra2004=apply=5.2 ...ignore, apply, required_add 3 misra2004 2 apply 4.2 5.2

    - < > F0523031

    - misra2004=< > F0523029 F0523030

    -misra2004= { all | apply=[,...] | ignore=[,...] | required | required_add=[,...] | required_remove=[,...] | }

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 46 of 8802019.04.01

    - lang cpp,c99 ecpp

    - output=prep

    - MISRA-C:2004

    [required ]2.2 2.34.1 4.25.2 5.3 5.46.1 6.2 6.4 6.57.18.1 8.2 8.3 8.5 8.6 8.7 8.11 8.129.1 9.2 9.310.1 10.2 10.3 10.4 10.5 10.611.1 11.2 11.512.3 12.4 12.5 12.7 12.8 12.9 12.10 12.1213.1 13.3 13.414.2 14.3 14.4 14.5 14.6 14.7 14.8 14.9 14.1015.1 15.2 15.3 15.4 15.516.1 16.3 16.5 16.6 16.918.1 18.419.3 19.6 19.8 19.11 19.14 19.1520.4 20.5 20.6 20.7 20.8 20.9 20.10 20.11 20.12

    [required ]5.5 5.66.311.3 11.412.1 12.6 12.11 12.1313.217.519.7 19.13

    - #pragma check_language_extension

    - misra2004 MISRA change_message

    - MISRA-C:2012

  • R20UT3248JJ0108 Rev.1.08 Page 47 of 8802019.04.01

    CC-RX 2.

    -misra2012 Professional V2.04.00

    /

    - MISRA-C:2012

    - misra2012=all

    - misra2012=apply=< >[,< >,...]

    - misra2012=ignore=< >[,< >,...]

    - misra2012=required mandatory required

    - misra2012=required_add=< >[,< >,...] mandatory required

    - misra2012=required_remove=< >[,< >,...] required

    - misra2012 =< > 1 1

    - 10 .

    - MISRA-C:2012 : M0523086 Rule :

    - misra2012=< >

    - misra2012 ( )... -misra2012=ignore=3.1-misra2012=required_add=4.1 -misra2012=apply=4.2-misra2012=apply=5.2 ...ignore, apply, required_add 3 -misra2012 2 apply 4.2 5.2

    - < > F0523031

    -misra2012= { all | apply=[,...] | ignore=[,...] | required | required_add=[,...] | required_remove=[,...] | }

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 48 of 8802019.04.01

    - misra2012=< > F0523029 F0523030

    - lang cpp ecpp

    - output=prep

    - V2.07.00 MISRA-C:2012 2.2 2.6 2.73.1 3.24.1 4.25.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.96.1 6.27.1 7.2 7.3 7.48.1 8.2 8.3 8.4 8.8 8.9 8.11 8.12 8.149.1 9.2 9.3 9.4 9.510.1 10.2 10.3 10.4 10.5 10.6 10.7 10.811.1 11.2 11.3 11.4 11.5 11.6 11.7 11.8 11.912.1 12.2 12.3 12.4 12.513.1 13.2 13.3 13.4 13.5 13.614.415.1 15.2 15.3 15.4 15.5 15.6 15.716.1 16.2 16.3 16.4 16.5 16.6 16.717.1 17.3 17.4 17.5 17.6 17.7 17.818.4 18.5 18.719.220.1 20.2 20.3 20.4 20.5 20.6 20.7 20.8 20.9 20.10 20.11 20.12 20.13 20.1421.1 21.2 21.3 21.4 21.5 21.6 21.7 21.8*1 21.9 21.10 21.11 21.12 21.13 21.15 21.16(*1) MISRA C:2012 Amendment 1 getenv

    - #pragma check_language_extension

    - misra2012 MISRA change_message

    - MISRA-C:2004

  • R20UT3248JJ0108 Rev.1.08 Page 49 of 8802019.04.01

    CC-RX 2.

    -ignore_files_misra Professional

    /

    - MISRA-C:2004 MISRA-C:2012

    -

    - misra2004 misra2012

    -

    -ignore_files_misra=[,,...]

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 50 of 8802019.04.01

    -check_language_extension Professional

    /

    - C MISRA2004 MISRA2012

    - misra2004 misra2012 misra2004 misra2012 check_language_extension

    - MISRA-C:2004 8.1MISRA-C:2012 8.4 #pragma entry #pragma interrupt

    - vfunc #pragma interrupt -check_language_extension 8.1

    - misra2004 misra2012

    -check_language_extension

    #pragma interrupt vfuncextern void service(void);void vfunc(void){ service();}

  • R20UT3248JJ0108 Rev.1.08 Page 51 of 8802019.04.01

    CC-RX 2.

    -misra_intermodule Professional V3.01.00

    /

    - MISRA-C:2012

    - < > MISRA-C:2012 < > < >

    - -misra2012 -misra2012

    - < >

    - MISRA-C:2012

    5.1 5.6 5.7 5.8 5.98.3 8.5 8.6

    - a.cb.cc.c MISRA-C:2012

    - < > .{c|a|f} < >

    - < >

    - < > < > < > < > MISRA-C:2012

    - Standard

    -misra_intermodule=

    > ccrx -isa=rxv3 -misra2012=all -misra_intermodule=test.mi a.c b.c c.c

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 52 of 8802019.04.01

    /

    - -output

    - -noline

    - -debug

    - -nodebug

    - -section

    - -stuff

    - -nostuff

    - -instalign4

    - -instalign8

    - -noinstalign

    - -nouse_div_inst

    - -create_unfilled_area

    - -stack_protector/-stack_protector_all Professional V2.04.00

    - -avoid_cross_boundary_prefetch V2.07.00

    - -insert_nop_with_label V2.08.00

    - -control_flow_integrity Professional V2.08.00

  • R20UT3248JJ0108 Rev.1.08 Page 53 of 8802019.04.01

    CC-RX 2.

    -output

    /

    - output=obj

    -

    -

    - < >

    2.3

    HEX S

    -

    -output = [=] : { prep | src | obj | abs | hex | sty }

    prep CC89, C99pC++ pp

    src src

    obj obj

    abs abs

    hex HEX hex

    sty S mot

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 54 of 8802019.04.01

    -noline

    /

    - #line

    - output=prep

    -noline

  • R20UT3248JJ0108 Rev.1.08 Page 55 of 8802019.04.01

    CC-RX 2.

    -debug

    /

    - -nodebug

    - debug C

    - debug

    -debug

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 56 of 8802019.04.01

    -nodebug

    /

    - -nodebug

    - nodebug

    -nodebug

  • R20UT3248JJ0108 Rev.1.08 Page 57 of 8802019.04.01

    CC-RX 2.

    -section

    /

    - section=P=P,C=C,D=D,B=B,L=L,W=W

    -

    - section=P =< >

    - section=C =< >

    - section=D =< >

    - section=B =< >

    - section=L =< >

    - section=W=< > switch

    - < > _ $

    - V.1.00 L C section=L=C

    - L C

    -

    -section = [,] : { P = | C = | D = | B = | L = | W = }

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 58 of 8802019.04.01

    -stuff

    /

    - stuff 4 2 1 2.4

    -V3.01.00 dpfpu double long double 8

    2.4 stuff

    1. double/long double dpfpu

    2. 1.

    - CDB section #pragma section

    - W section

    -

    -stuff

    const 4 C_8*1

    C*2

    2 C_2

    1 C_1

    4 D_8*1

    D*2

    2 D_2

    1 D_1

    4 B_8*1

    B*2

    2 B_2

    1 B_1

    switch 4 W

    2 W_2

    1 W_1

  • R20UT3248JJ0108 Rev.1.08 Page 59 of 8802019.04.01

    CC-RX 2.

    - - sutff B,D,C W

    int a;char b=0;const short c=0;struct { char x; char y;} ST;

    .SECTION C_2,ROMDATA,ALIGN=2 .glb _c_c: .word 0000H .SECTION D_1,ROMDATA .glb _b_b: .byte 00H .SECTION B,DATA,ALIGN=4 .glb _a_a: .blkl 1 .SECTION B_1,DATA .glb _ST_ST: .blkb 2

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 60 of 8802019.04.01

    -nostuff

    /

    - nostuff < > 4

    - < >

    - CDB section #pragma section

    - W section

    -

    - nostuff B,D,C W

    -nostuff [= [,]] { B | D | C | W}

    int a;char b=0;const short c=0;struct { char x; char y;} ST;

    .SECTION C,ROMDATA,ALIGN=4 .glb _c_c: .word 0000H .SECTION D,ROMDATA,ALIGN=4 .glb _b_b: .byte 00H .SECTION B,DATA,ALIGN=4 .glb _a_a: .blkl 1 .glb _ST_ST .blkb 2

  • R20UT3248JJ0108 Rev.1.08 Page 61 of 8802019.04.01

    CC-RX 2.

    -instalign4

    /

    -

    -

    - instalign4 4

    - -instalign4 4*1

    - -instalign4 3 *2

    - : switch case default

    - inmostloop: switch case default

    - loop: switch case default

    - 1 4

    - RX CPU

    -

    - instalign4 32 CPU RX200

    1. 2

    2. loop if

    - W0561322

    -instalign4[={loop|inmostloop}]

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 62 of 8802019.04.01

    -instalign8

    /

    -

    -

    - instalign8 8

    - -instalign8 8*1

    - -instalign8 3 *2

    - : switch case default

    - inmostloop: switch case default

    - loop: switch case default

    - 1 8

    - RX CPU

    -

    - instalign8 64 CPU RX600

    1. 2

    2. loop if

    - W0561322

    - C

    -instalign8[={loop|inmostloop}]

    long a;int f1(int num){ return (num+1);}void f2(void){ a = 0;}void f3(void){}

  • R20UT3248JJ0108 Rev.1.08 Page 63 of 8802019.04.01

    CC-RX 2.

    - [-instalign8 ]8 8 8 f2

    .SECTION P,CODE,ALIGN=8 .INSTALIGN 8_f1: ; f1 =0000H ADD #01H,R1 ; 2 RTS ; 1 .INSTALIGN 8_f2: ; f2 =0008H * ; 0003H 68 ; MOV.L #_a,R4 ; 6 MOV.L #0,[R4] ; 3 RTS ; 1 .INSTALIGN 8_f3: ; f3 =0012H RTS .END

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 64 of 8802019.04.01

    -noinstalign

    /

    -

    -noinstalign

  • R20UT3248JJ0108 Rev.1.08 Page 65 of 8802019.04.01

    CC-RX 2.

    -nouse_div_inst

    /

    - DIV DIVU FDIV DDIV

    - DIV,DIVU,FDIV DDIV

    - ROM

    -nouse_div_inst

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 66 of 8802019.04.01

    -create_unfilled_area

    /

    - S ( .mot) ( .hex) .OFFSET

    - rlink S ccrx asrx ( .obj)

    - .OFFSET (*1) ___$___s__unfilled_area ___$___e__unfilled_area 1

    1.

    -create_unfilled_area

  • R20UT3248JJ0108 Rev.1.08 Page 67 of 8802019.04.01

    CC-RX 2.

    -stack_protector/-stack_protector_all Professional V2.04.00

    /

    - 3

    (1) 0xFFFFFFFF 4 < > (2) < > 4 (3) (2) __stack_chk_fail

    - < > 0 4294967295 10 16 < >

    - __stack_chk_fail

    - __stack_chk_fail

    - void

    -

    - __stack_chk_fail -stack_protector-stack_protector_all #pragma stack_protector

    - C++ __stack_chk_fail extern "C"

    - abort()

    - __stack_chk_fail static

    - -stack_protector 8 -stack_protector_all

    - #pragma stack_protector #pragma stack_protector

    - #pragma #pragma inline#pragma inline_asm#pragma entry#pragma no_stack_protector

    -stack_protector[=]-stack_protector_all[=]

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 68 of 8802019.04.01

    - C

    #include #include

    void f1() // { volatile char str[10]; int i; for (i = 0; i

  • R20UT3248JJ0108 Rev.1.08 Page 69 of 8802019.04.01

    CC-RX 2.

    - -stack_protector=0

    .glb _test .glb ___stack_chk_fail .glb _printf .glb _abort .SECTION P,CODE_test: .STACK _test=20 MOV.L #00000000H, R14 ; 0 PUSH.L R14 SUB #0CH, R0 MOV.L #00000000H, R14 MOV.L #0000000BH, R15 ADD #02H, R0, R5L12: ; parse_bb MOV.B R14, [R5+] ADD #01H, R14 SUB #01H, R15 BNE L12L13: ; return MOV.L 0CH[R0], R14 ; CMP #00H, R14 ; 0 BNE L15 ; L15L14: ; return RTSD #10HL15: ; return BRA ___stack_chk_fail ; __stack_chk_fail

    ___stack_chk_fail: .STACK ___stack_chk_fail=8 SUB #04H, R0 MOV.L #_L10, R14 MOV.L R14, [R0] BSR _printf ADD #04H, R0 BRA _abort

    .SECTION L,ROMDATA,ALIGN=4_L10: .byte "stack is broken!" .byte 00H .END

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 70 of 8802019.04.01

    -avoid_cross_boundary_prefetch V2.07.00

    /

    - 2 4 4

    - memchr()strlen()strcpy()strncpy()strcmp()strncmp()strcat()strncat()

    - library=intrinsic

    - 4

    - memchr()strlen()strcpy()strncpy()strcmp()strncmp()strcat()strncat() library=intrinsic

    - memchr()strlen()strcpy()strncpy()strcmp()strncmp()strcat() strncat()2 4 4

    -avoid_cross_boundary_prefetch

  • R20UT3248JJ0108 Rev.1.08 Page 71 of 8802019.04.01

    CC-RX 2.

    -insert_nop_with_label V2.08.00

    /

    - nop

    - nop

    - -debug

    - CS+ e2studio

    -insert_nop_with_label=,,

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 72 of 8802019.04.01

    -control_flow_integrity Professional V2.08.00

    /

    -

    - C/C++

    (1) __control_flow_integrity (2) __control_flow_chk_fail

    Control Flow IntegrityCFI

    - void __control_flow_integrity(void *addr);

    - C/C++ -cfi 2.5.3 rlink

    - __control_flow_chk_fail __control_flow_chk_fail

    - void

    - static

    -

    - __control_flow_chk_fail

    - __control_flow_chk_fail abort()

    - C++ __control_flow_chk_fail extern "C"

    - pic

    -control_flow_integrity

  • R20UT3248JJ0108 Rev.1.08 Page 73 of 8802019.04.01

    CC-RX 2.

    - C

    #include

    int glb;

    void __control_flow_chk_fail(void){ abort();}

    void func1(void) // { ++glb;}

    void func2(void) // { --glb;}

    void (*pf)(void) = func1;

    void main(void){ pf(); // func1 func2();}

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 74 of 8802019.04.01

    - -isa=rxv2 -output=src -control_flow_integrity

    ___control_flow_chk_fail: .STACK ___control_flow_chk_fail=4 BRA _abort_func1: .STACK _func1=4 MOV.L #_glb, R14 MOV.L [R14], R15 ADD #01H, R15 MOV.L R15, [R14] RTS_func2: .STACK _func2=4 MOV.L #_glb, R14 MOV.L [R14], R15 SUB #01H, R15 MOV.L R15, [R14] RTS_main: .STACK _main=8 PUSH.L R6 MOV.L #_pf, R6 MOV.L [R6], R1 BSR ___control_flow_integrity ; MOV.L [R6], R14 JSR R14 ; func1 BSR _func2 ; func2 RTSD #04H, R6-R6 .SECTION D,ROMDATA,ALIGN=4_pf: .lword _func1 .SECTION B,DATA,ALIGN=4_glb: .blkl 1 .END

  • R20UT3248JJ0108 Rev.1.08 Page 75 of 8802019.04.01

    CC-RX 2.

    /

    - -listfile

    - -nolistfile

    - -show

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 76 of 8802019.04.01

    -listfile

    /

    - lst

    - listfile

    - < > < > .lst < >

    -

    - lnkcmd list

    -

    -

    - < > listfile < > < >

    -listfile[={|}]

  • R20UT3248JJ0108 Rev.1.08 Page 77 of 8802019.04.01

    CC-RX 2.

    -nolistfile

    /

    -

    -nolistfile

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 78 of 8802019.04.01

    -show

    /

    -

    -

    2.5

    - listfile

    -

    -show=[,] : { source | conditionals | definitions | expansions }

    source C/C++

    conditionals

    definitions .DEFINE

    expansions

  • R20UT3248JJ0108 Rev.1.08 Page 79 of 8802019.04.01

    CC-RX 2.

    /

    - -optimize

    - -goptimize

    - -speed

    - -size

    - -loop

    - -inline

    - -noinline

    - -file_inline (*) - -case

    - -volatile

    - -novolatile

    - -const_copy

    - -noconst_copy

    - -const_div

    - -noconst_div

    - -library

    - -scope

    - -noscope

    - -schedule

    - -noschedule

    - -map

    - -smap

    - -nomap

    - -approxdiv

    - -enable_register (*) - -simple_float_conv

    - -fpu

    - -nofpu

    - -dpfpu V3.01.00

    - -nodpfpu V3.01.00

    - -tfu V3.01.00 - -alias

    - -float_order (*) - -ip_optimize

    - -merge_files

    - -whole_program

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 80 of 8802019.04.01

    -optimize

    /

    - -optimize=2

    -

    - optimize=0

    - optimize=1 optimize=0

    - optimize=2 size/speed

    - optimize=max speed speed

    - optimize speed, size

    - speed, size

    -optimize = { 0 | 1 | 2 | max }

  • R20UT3248JJ0108 Rev.1.08 Page 81 of 8802019.04.01

    CC-RX 2.

    -goptimize

    /

    -

    -

    -goptimize

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 82 of 8802019.04.01

    -speed

    /

    -

    - speed

    - speed optimize

    - optimize

    optimize=max

    C/C++ output=abs mot map nomap

    optimize=2

    optimize=0 optimize=1

    -speed

    const

    speed loop=8 inline=250 const_div schedule const_copy noscope map nomap

    alias=ansi

    const

    speed loop=2 inline=100 const_div schedule const_copy scope nomap alias=noansi

    const

    speed loop=1 noinline const_div noschedule

    noconst_copy scope nomap alias=noansi

  • R20UT3248JJ0108 Rev.1.08 Page 83 of 8802019.04.01

    CC-RX 2.

    -size

    /

    -

    - size

    - size optimize

    - optimize

    optimize=max

    C/C++ output=abs mot map nomap

    optimize=2

    optimize=0 optimize=1

    -size

    const

    size loop=1 inline=0 noconst_div schedule const_copy noscope map nomap

    alias=ansi

    const

    size loop=1 noinline noconst_div schedule const_copy scope nomap alias=noansi

    const

    size loop=1 noinline noconst_div noschedule

    noconst_copy

    scope nomap alias=noansi

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 84 of 8802019.04.01

    -loop

    /

    - loop=2

    -

    - loop for, while, do-while

    - < > < > 1 32 < > 2

    - optimize speed, size speed, size

    - optimize=0 optimize=1

    -loop[=]

  • R20UT3248JJ0108 Rev.1.08 Page 85 of 8802019.04.01

    CC-RX 2.

    -inline

    /

    - inline=100

    -

    - < > 0 65535

    - inline #pragma noinline

    - < > % inline=100 100% 2

    - optimize speed, size speed, size

    - #pragma inline inline

    - #pragma inline

    - inline

    -inline[=]

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 86 of 8802019.04.01

    -noinline

    /

    -

    - #pragma inline inline

    -noinline

  • R20UT3248JJ0108 Rev.1.08 Page 87 of 8802019.04.01

    CC-RX 2.

    -file_inline

    /

    - V2.00

    - C(C99) -merge_files -file_inline (-file_inline_path )

    - -merge_files -merge_files [ ]

    -file_inline=[,]

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 88 of 8802019.04.01

    -case

    /

    - case=auto

    - switch

    - case=ifthen switch if_then if_then switch case case case switch case

    - case=table switch case 1 switch case switch case switch

    - case=auto if_then

    - case=table nostuff W nostuff switch WW_2 W_1

    -case= { ifthen | table | auto }

  • R20UT3248JJ0108 Rev.1.08 Page 89 of 8802019.04.01

    CC-RX 2.

    -volatile

    /

    - volatile volatile C/C++

    - volatile RX

    -volatile

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 90 of 8802019.04.01

    -novolatile

    /

    - novolatile volatile C/C++

    -novolatile

  • R20UT3248JJ0108 Rev.1.08 Page 91 of 8802019.04.01

    CC-RX 2.

    -const_copy

    /

    - optimize=2 optimize=max const_copy

    - const_copy const

    - C++ const

    -const_copy

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 92 of 8802019.04.01

    -noconst_copy

    /

    - optimize=1 optimize=0 noconst_copy

    - noconst_copy const

    - C++ const

    -noconst_copy

  • R20UT3248JJ0108 Rev.1.08 Page 93 of 8802019.04.01

    CC-RX 2.

    -const_div

    /

    - speed const_div

    - const_div ( )

    - const_div

    -const_div

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 94 of 8802019.04.01

    -noconst_div

    /

    - size noconst_div

    - noconst_div (2 )

    - noconst_div

    -noconst_div

  • R20UT3248JJ0108 Rev.1.08 Page 95 of 8802019.04.01

    CC-RX 2.

    -library

    /

    - library=intrinsic

    - -library=function

    - -library=intrinsic RX

    - abs

    - fabsf/fabs*1/fabsl*1

    - sqrtf*2/sqrt*3/sqrtl*3

    - memchr/strlen/strcpy/strncpy/strcmp/strncmp/strcat/strncat

    1. -dbl_size=4 -dpfpu

    2. -isa rxv1 -fpu

    3. -isa rxv1 -fpu -dbl_size=4 -dpfpu

    - errno

    -library = { function | intrinsic }

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 96 of 8802019.04.01

    -scope

    /

    - optimize=max scope

    - scope

    -

    -scope

  • R20UT3248JJ0108 Rev.1.08 Page 97 of 8802019.04.01

    CC-RX 2.

    -noscope

    /

    - optimize=max noscope

    - noscope

    -

    -noscope

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 98 of 8802019.04.01

    -schedule

    /

    - optimize=2 optimize=max schedule

    - schedule

    -schedule

  • R20UT3248JJ0108 Rev.1.08 Page 99 of 8802019.04.01

    CC-RX 2.

    -noschedule

    /

    - optimize=1 optimize=0 noschedule

    - noschedule C/C++

    -noschedule

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 100 of 8802019.04.01

    -map

    /

    - optimize=max map

    -

    -

    - map output

    -output=absoutput=mot output=hex map 2 output=absoutput=mot output=hex optimize=max map

    -output=obj map=< > ccrx map=< >

    - C

    -

    - map 1

    - C/C++ output=src

    -map[=]

    long A,B,C;void func(){ A = 1; B = 2; C = 3;}

    _func: MOV.L #_A,R4 ; A MOV.L #1,[R4] MOV.L #2,4[R4] ; A B MOV.L #3,8[R4] ; A C

  • R20UT3248JJ0108 Rev.1.08 Page 101 of 8802019.04.01

    CC-RX 2.

    - map smap map

    -

    -

    -

    - P 0x100 C1,C2 P C3 0x400

    - P C1,C2 C2 C3

    P C1 C2 C3

    0x100 0x400

    P C1C2C3

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 102 of 8802019.04.01

    -smap

    /

    -

    - C

    -

    - C/C++

    - map smap map

    -smap

    long A,B,C;void func(){ A = 1; B = 2; C = 3;}

    _func: MOV.L #_A,R4 ; A MOV.L #1,[R4] MOV.L #2,4[R4] ; A B MOV.L #3,8[R4] ; A C

  • R20UT3248JJ0108 Rev.1.08 Page 103 of 8802019.04.01

    CC-RX 2.

    -nomap

    /

    - optimize=0optimize=1 optimize=2 nomap

    - nomap

    - C

    -

    -nomap

    long A,B,C;void func(){ A = 1; B = 2; C = 3;}

    _func: MOV.L #_A,R4 MOV.L #1,[R4] MOV.L #_B,R4 MOV.L #2,[R4] MOV.L #_C,R4 MOV.L #3,[R4]

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 104 of 8802019.04.01

    -approxdiv

    /

    -

    -

    -

    -approxdiv

  • R20UT3248JJ0108 Rev.1.08 Page 105 of 8802019.04.01

    CC-RX 2.

    -enable_register

    /

    - V2.00

    -enable_register

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 106 of 8802019.04.01

    -simple_float_conv

    /

    -

    - a) 32bit b) 32bit c) 32bit 64bit

    a) 32bit -fpu

    -simple_float_conv

    unsigned long func1(float f){ return ((unsigned long)f);}

    _func1: FCMP #4F000000H,R1 BLT L12 FADD #0CF800000H,R1 L12: FTOI R1,R1 RTS

    _func1: FTOI R1,R1 RTS

  • R20UT3248JJ0108 Rev.1.08 Page 107 of 8802019.04.01

    CC-RX 2.

    b) 32bit -fpu

    c) 32bit 64bit -dbl_size=8

    - C,C++

    - -optimize=0 c)

    float func2(unsigned long u){ return ((float)u);}

    _func2: BTST #31,R1 BEQ L15 SHLR #1,R1,R14 AND #1,R1 OR R14,R1 ITOF R1,R1 FADD R1,R1 BRA L16 L15: ITOF R1,R1 L16: RTS

    _func2: ITOF R1,R1 RTS

    double func3(long l) { return (double)(float)l; }_func3: ITOF R1,R1 BRA __COM_CONVfd

    BRA __COM_CONV32sd

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 108 of 8802019.04.01

    -fpu

    /

    - ISA*1 fpu CPU RX200 *2 nofpu fpu

    *1) isa ISA_RX *2) cpu CPU_RX

    - fpu

    - RX

    - CPU RX200 fpu

    -fpu

  • R20UT3248JJ0108 Rev.1.08 Page 109 of 8802019.04.01

    CC-RX 2.

    -nofpu

    /

    - ISA*1 fpu CPU RX200 *1 nofpu fpu

    *1) isa ISA_RX *2) cpu CPU_RX

    - nofpu

    -nofpu

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 110 of 8802019.04.01

    -dpfpu V3.01.00

    /

    - nodpfpu

    - dpfpu

    - RX

    - CPU*1 ISA*2 RXv1 RXv2 dpfpu

    - nofpu dpfpu

    *1cpu CPU_RX *2isa ISA_RX

    -dpfpu

  • R20UT3248JJ0108 Rev.1.08 Page 111 of 8802019.04.01

    CC-RX 2.

    -nodpfpu V3.01.00

    /

    - nodpfpu

    - nodpfpu

    -nodpfpu

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 112 of 8802019.04.01

    -tfu V3.01.00

    /

    - -tfu=intrinsic

    - __sincosf

    - __atan2hypotf

    - __init_tfu

    4.2.6

    - -tfu=intrinsic,mathlib

    - sinf / sin*1 / sinl*1

    - cosf / cos*1 / cosl*1

    - atan2f / atan2*1 / atan2l*1

    - hypotf / hypot*1 / hypotl*1

    *1) -dbl_size=4

    -

    - -tfu=intrinsic,mathlib

    - errno

    -

    - __init_tfu()

    -

    -tfu=intrinsic[,mathlib]

  • R20UT3248JJ0108 Rev.1.08 Page 113 of 8802019.04.01

    CC-RX 2.

    -alias

    /

    - alias=noansi optimize=max alias=ansi

    -

    - alias=ansi ANSI alias=noansi alias=ansi alias=noansi

    - alias=noansi V.1.00 ANSI

    - alias=noansi *ps = 2; n A n

    - alias=ansi *ps n *ps = 2; n B n = 1 *ps = 2; n

    -alias = { noansi | ansi }

    long x;long n;void func(short * ps){ n = 1; *ps = 2; x = n;}

    _func: MOV.L #_n,R4 MOV.L #1,[R4] ; n = 1; MOV.W #2,[R1] ; *ps = 2; MOV.L [R4],R5 ; A n MOV.L #_x,R4 MOV.L R5,[R4] RTS

    _func: MOV.L #_n,R4 MOV.L #1,[R4] ; n = 1; MOV.W #2,[R1] ; *ps = 2; MOV.L #_x,R4 MOV.L #1,[R4] ; B n = 1 RTS

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 114 of 8802019.04.01

    - optimize=0 optimize=1 alias alias=ansi alias=noansi

  • R20UT3248JJ0108 Rev.1.08 Page 115 of 8802019.04.01

    CC-RX 2.

    -float_order

    /

    -

    - V2.00

    -float_order

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 116 of 8802019.04.01

    -ip_optimize

    /

    -

    -

    -

    1.

    - C

    -

    -

    -ip_optimize

    static int func1(int *a, int *b) { *a=0; *b=1; return *a;}int x[2];int func2() { return func1(x, x+1);}

    ; -optimize=2 -size__$func1: MOV.L #00000000H, [R1] MOV.L #00000001H, [R2] MOV.L [R1], R1 RTS

    _func2: MOV.L #_x, R1 ADD #04H, R1, R2 BRA __$func1

    ; -optimize=2 -size

    __$func1: MOV.L #00000000H, [R1] MOV.L #00000001H, [R2] MOV.L #00000000H, R1 RTS

    _func2: MOV.L #_x, R1 ADD #04H, R1, R2 BRA __$func1

  • R20UT3248JJ0108 Rev.1.08 Page 117 of 8802019.04.01

    CC-RX 2.

    2.

    - C

    -

    -

    - merge_files

    static int func(int x, int y, int z) { return x-y+z;}int func2() { return func(3,4,5);}

    ; -optimize=2 -size

    __$func: ADD R3, R1 SUB R2, R1 RTS_func2: MOV.L #00000005H, R3 MOV.L #00000004H, R2 MOV.L #00000003H, R1 BRA __$func

    ; -optimize=2 -size

    __$func: MOV.L #00000004H, R1 RTS_func2: MOV.L #00000005H, R3 MOV.L #00000004H, R2 MOV.L #00000003H, R1 BRA __$func

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 118 of 8802019.04.01

    -merge_files

    /

    - C 1

    - output

    - output src obj

    files.obj file1.objfile2.objfile3.obj

    - 1

    - output prep

    - inline

    - C++ EC++

    - static static

    - static

    - static rlink

    - (.map) static static

    - ( )

    - -delete, -rename, -replace

    -merge_files

    ccrx -merge_files -output=obj=files.obj file1.c file2.c file3.c

  • R20UT3248JJ0108 Rev.1.08 Page 119 of 8802019.04.01

    CC-RX 2.

    -whole_program

    /

    -

    - C++

    - -lang=cpp -lang=ecpp

    - ip_optimize merge_files

    - - extern -

    -whole_program

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 120 of 8802019.04.01

    [wp.c]extern void g(void);int func(void){ static int a = 0; a++; // (1) a g(); // (2) g() return a; // (3) a}

    [whole_program ] g() func()(2) a(3) a_func: PUSH.L R6 MOV.L #__$a$1,R6 MOV.L [R6],R14 ADD #1,R14 MOV.L R14,[R6] ; (1) BSR _g ; (2) MOV.L [R6],R1 ; (3) RTSD #4,R6-R6

    [whole_program ] g() func()(2) a(3) a (1) a_func: PUSH.L R6 MOV.L #__$a$1,R14 MOV.L [R14],R6 ADD #1,R6 MOV.L R6,[R14] ; (1) BSR _g ; (2) MOV.L R6,R1 ; (3) RTSD #4,R6-R6

  • R20UT3248JJ0108 Rev.1.08 Page 121 of 8802019.04.01

    CC-RX 2.

    /

    - -isa

    - -cpu

    - -endian

    - -round

    - -denormalize

    - -dbl_size

    - -int_to_short

    - -signed_char

    - -unsigned_char

    - -signed_bitfield

    - -unsigned_bitfield

    - -auto_enum

    - -bit_order

    - -pack

    - -unpack

    - -exception

    - -noexception

    - -rtti

    - -fint_register

    - -branch

    - -base

    - -patch

    - -pic

    - -pid

    - -nouse_pid_register

    - -save_acc

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 122 of 8802019.04.01

    -isa

    /

    - ISA_RX

    -

    - -nofpu -fpu -fpu

    - -cpu CPU_RX ISA_RX

    - -cpu

    -isa={ rxv1 | rxv2 | rxv3 }

  • R20UT3248JJ0108 Rev.1.08 Page 123 of 8802019.04.01

    CC-RX 2.

    -cpu

    /

    - CPU_RX

    -

    - cpu=rx600 RX600

    - cpu=rx200 RX200

    -

    - RX -cpu -isa -isa

    - -cpu -isa -fpu,-nofpu *1

    - -cpu=rx600 -isa=rxv1 -fpu

    - -cpu=rx200 -isa=rxv1 -nofpu

    - -cpu=rx200 -nofpu

    - -cpu=rx200 fpu

    - -nofpu fpu -cpu=rx600 -fpu

    - - cpu -isa CPU_RX ISA_RX

    - -isa

    - *1) __RX200__RX600

    -cpu={ rx600 | rx200 }

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 124 of 8802019.04.01

    -endian

    /

    - endian=little

    - endian=big big endian

    - endian=little little endian

    - #pragma endian #pragma #pragma

    -endian={ big | little }

  • R20UT3248JJ0108 Rev.1.08 Page 125 of 8802019.04.01

    CC-RX 2.

    -round

    /

    - round=nearest

    -

    - round=zero round to zero

    - round=nearest round to nearest

    -

    - fpu, nofpu

    -round={ zero | nearest }

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 126 of 8802019.04.01

    -denormalize

    /

    - denormalize=off

    -

    - denormalize=off 0

    - denormalize=on

    -

    - fpu, nofpu

    -denormalize={ off | on }

  • R20UT3248JJ0108 Rev.1.08 Page 127 of 8802019.04.01

    CC-RX 2.

    -dbl_size

    /

    - dpfpu dbl_size=8 dbl_size=4

    - double long double float dbl_size=4 float dbl_size=8 float

    - dbl_size=4 mathf.h math.h : sqrtf sqrt dbl_size=4 mathf.h sqrtfRX sqrtf math.h sqrt

    -dbl_size={4 | 8}

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 128 of 8802019.04.01

    -int_to_short

    /

    - int short unsigned int unsigned short

    - int short unsigned int unsigned short

    - limits.h INT_MAXINT_MIN UINT_MAX

    - C++ EC++ C++EC++ C W0523041

    - C int_to_short C++ EC++ W0523041

    - C C++EC++int long short

    - scanf %d %u long unsigned long long int unsigned

    -int_to_short

  • R20UT3248JJ0108 Rev.1.08 Page 129 of 8802019.04.01

    CC-RX 2.

    -signed_char

    /

    - char

    - char

    - char signed_bitfield unsigned_bitfield

    -signed_char

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 130 of 8802019.04.01

    -unsigned_char

    /

    - char

    - char

    - char signed_bitfield unsigned_bitfield

    -unsigned_char

  • R20UT3248JJ0108 Rev.1.08 Page 131 of 8802019.04.01

    CC-RX 2.

    -signed_bitfield

    /

    -

    -

    -signed_bitfield

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 132 of 8802019.04.01

    -unsigned_bitfield

    /

    -

    -

    -unsigned_bitfield

  • R20UT3248JJ0108 Rev.1.08 Page 133 of 8802019.04.01

    CC-RX 2.

    -auto_enum

    /

    - signed long

    - enum

    -

    2.6

    *1) -int_to_short 4

    -auto_enum

    -unsigned_char -signed_char

    -128 127 signed char char

    0 255 char unsigned char

    -32768 32767 signed short signed short

    0 65535 unsigned short unsigned short

    int *1 int *1

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 134 of 8802019.04.01

    -bit_order

    /

    - bit_order=right

    -

    - bit_order=left

    - bit_order=right

    - #pragma bit_order #pragma

    -bit_order = { left | right }

  • R20UT3248JJ0108 Rev.1.08 Page 135 of 8802019.04.01

    CC-RX 2.

    -pack

    /

    -

    -

    - #pragma pack #pragma #pragma

    -

    2.7 pack

    int_to_short short

    -pack

    pack

    (signed) char 1 1

    (unsigned) short 1 2

    (unsigned) int , (unsigned) long, (unsigned) long long, , 1 4

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 136 of 8802019.04.01

    -unpack

    /

    -

    -

    -

    -

    2.8 unpack

    int_to_short short

    -unpack

    unpack

    (signed) char 1 1

    (unsigned) short 2 2

    (unsigned) int , (unsigned) long, (unsigned) long long, , 4 4

  • R20UT3248JJ0108 Rev.1.08 Page 137 of 8802019.04.01

    CC-RX 2.

    -exception

    /

    - C++ try, catch, throw

    - C++ try, catch, throw

    -

    -

    - rtti=on

    - noprelink

    - exception C++ lang=cpp .c .p exception

    -exception

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 138 of 8802019.04.01

    -noexception

    /

    - C++ try, catch, throw

    - C++ try, catch, throw

    -

    - rtti=on

    - noprelink

    - noexception C++ lang=cpp .c .p noexception

    -noexception

  • R20UT3248JJ0108 Rev.1.08 Page 139 of 8802019.04.01

    CC-RX 2.

    -rtti

    /

    - rtti=off

    - /

    - rtti=on dynamic_casttypeid

    - rtti=off dynamic_casttypeid

    - .obj.rel

    - rtti=on C++ lang=cpp .c .p rtti=on

    -rtti={ on | off }

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 140 of 8802019.04.01

    -fint_register

    /

    - fint_register=0

    - #pragma interrupt fint

    -

    2.9

    - base

    -fint_register = {0 | 1 | 2 | 3 | 4 }

    fint_register=0

    fint_register=1 R13

    fint_register=2 R12, R13

    fint_register=3 R11, R12, R13

    fint_register=4 R10, R11, R12, R13

  • R20UT3248JJ0108 Rev.1.08 Page 141 of 8802019.04.01

    CC-RX 2.

    -branch

    /

    - branch=24

    -

    - branch =16 16bit

    - branch =24 24bit

    - branch =32

    -branch = { 16 | 24 | 32 }

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 142 of 8802019.04.01

    -base

    /

    -

    - base=rom=< A> const A 0 0xFFFFFFFF 64KB 256KB(*1) ( ) C_1, C_2, C, C_8, C$VECT, C$INIT, C$VTBL, W, W_1, W_2, L

    - base=ram=< B> B RAM 0 0xFFFFFFFF 64KB 256KB(*1) RAM ( ) D_1, D_2, D, D_8, B_1, B_2, B, B_8

    - < >=< C> 64KB 256KB*1 C

    *1 64KB 256KB

    -

    - 1 fint_register

    - pid base=rom=< > W0551149 base=rom=< >

    -base = { rom= | ram= | = } := {R8 R13}

  • R20UT3248JJ0108 Rev.1.08 Page 143 of 8802019.04.01

    CC-RX 2.

    -patch

    /

    - CPU

    - -patch=rx610 RX610 MVTIPL

    - -patch=rx610 set_ipl MVTIPL

    -patch ={rx610 }

  • CC-RX 2.

    R20UT3248JJ0108 Rev.1.08 Page 144 of 8802019.04.01

    -pic

    /

    - PIC

    - PIC

    - PIC BSR BRA PC PIC

    - branch=32

    -pic

    void func(){ sub();}

    [-pic ]_func: MOV.L #_sub,R14 JMP R14

    [-pic ]_func: MOV.L #_sub-L11,R14L11: BRA R14

  • R20UT3248JJ0108 Rev.1.08 Page 145 of 8802019.04.01

    CC-RX 2.

    -

    - C++ EC++ pic W0511171 pic

    - PIC E0523026

    - PIC :

    - PIC

    - PIC PIC/PID

    void func1(void);void (*f_ptr)(void);void func2(void){ f_ptr = func1;}

    [-pic ]_func2: MOV.L #_f_ptr,R4 MOV.L #_func1,[R4] RTS

    [-pic ]_func2: MOV.L #_f_ptr,R4L11: MVFC PC,R14 ADD #_func1-L11,R14 MOV.L R14,[R4] RTS

    void pic_func1(void), pic_func2(int), pic_func3(int); /* PIC */void (*fptr1_for_pic) = pic_func1; /* PIC : */struct PIC_funcs{ int code; void (*fptr)(int); };struct PIC_funcs pic_funcs[] = { { 2, pic_func2 }, /* PIC : */ { 3, pic_func3 },