こんにちは。NoMaYです。最近、以下のスレッドに関わったのですが、e2 studioの式ビューの表示が間違っていたので調べることにしました。__sectop(), __secend()でセンションの値を取得することができません。community-ja.renesas.com/cafe_rene/forums-groups/mcu-mpu/rl78/f/forum18/9544/__sectop-__secend/46666#46666以下、そのスレッドのe2 studioの画面コピーです。(e2 studio 2022-07+CC-RL V1.11+最適化無しでビルド)サンプルプログラムのe2 studio FWUpdateSample projectのフォルダr11an0227ej0312-rl78-lora/samples/project/e2studio/rl78g23-128pfpb_sx126x/FWUpdateSample/以下、同じくそのスレッドでe2 studioのDebugger Consoleで確認してみた時の値です。rl78-elf-gdb内では正しく認識されていますね。(高度に専門的な話になるけれども、rl78-elf-gdb側のMIコマンドの値返却処理がバグっている?、のかなぁ、、、)p dsec_table$2 = {{rom_sectop = 0x11e1 " ", <incomplete sequence \230>, rom_secend = 0x1506 " \006ク\004\061スク\002ィ\004\\\001\b\\\340\b1^", <incomplete sequence \230>, ram_sectop = 0xf4759 <R_RFD_Init> ""}, {rom_sectop = 0x1506 " \006ク\004\061スク\002ィ\004\\\001\b\\\340\b1^", <incomplete sequence \230>, rom_secend = 0x15b2 " \004\230\001掌", ram_sectop = 0xf4a7e <R_RFD_EraseCodeFlashReq> ""}, {rom_sectop = 0x15b2 " \004\230\001掌", rom_secend = 0x1709 <R_RFD_EraseDataFlashReq> " \004\230\001\360\f\020ク\002ネ", ram_sectop = 0xf4b2a <R_RFD_SetExtraBootAreaReq> ""}, {rom_sectop = 0xc96 "マx", rom_secend = 0x11e1 " ", <incomplete sequence \230>, ram_sectop = 0xf4c81 <R_CFlash_ResetFW> ""}}[関連リンク]RL78/G23, RL78/G14 Firmware Update over LoRaWAN® Sample ApplicationPDFwww.renesas.com/jp/ja/document/apn/firmware-update-over-lorawan-sample-application-rev312LoRa(R)-based Wireless Software Package(V3.12)ZIPwww.renesas.com/jp/ja/document/scd/lorar-based-wireless-software-packagev312
新規にプロジェクトを作成して、以下のようなソースを書いてみたところ、なんと、正しく表示されてしまいました。
const struct dsec_t { char __far *rom_sectop; /* start address of source section */ char __far *rom_secend; /* end address of source section +1 */ char __near *ram_sectop; /* start address of destination section */} dsec_table[ 4 ] = { { (char __far *)0x11e1, (char __far *)0x1506, (char __near *)0x4759 }, { (char __far *)0x1506, (char __far *)0x15b2, (char __near *)0x4a7e }, { (char __far *)0x15b2, (char __far *)0x1709, (char __near *)0x4b2a }, { (char __far *)0x0c96, (char __far *)0x11e1, (char __near *)0x4c81 },};void main(void){ while(1);}
以下、e2 studioの画面コピーです。