Skip to content
This repository was archived by the owner on Oct 25, 2023. It is now read-only.

Commit 99a958e

Browse files
committed
Merge branch 'rx_development_202012.00' into 'rx_development_202012.00'
[Fix] Fix "illegal status" in OTA update demo See merge request products/common/rtos/amazon-freertos/amazon-freertos!32
2 parents 73a5870 + 14227fb commit 99a958e

File tree

33 files changed

+155
-323
lines changed

33 files changed

+155
-323
lines changed

projects/renesas/rx65n-rsk/e2studio-gcc/aws_demos/.project

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2137,7 +2137,7 @@
21372137
<locationURI>AWS_IOT_MCU_ROOT/vendors/renesas/rx_driver_package/v133/r_s12ad_rx/r_s12ad_rx_if.h</locationURI>
21382138
</link>
21392139
<link>
2140-
<name>vendors/renesas/rx_driver_package/v133/r_tsip/r_tsip_rx_if.h</name>
2140+
<name>vendors/renesas/rx_driver_package/v133/r_tsip_rx/r_tsip_rx_if.h</name>
21412141
<type>1</type>
21422142
<locationURI>AWS_IOT_MCU_ROOT/vendors/renesas/rx_driver_package/v133/r_tsip_rx/r_tsip_rx_if.h</locationURI>
21432143
</link>
@@ -2691,6 +2691,11 @@
26912691
<type>1</type>
26922692
<locationURI>AWS_IOT_MCU_ROOT/vendors/renesas/rx_driver_package/v133/r_flash_rx/src/flash_type_4/r_flash_type4_if.h</locationURI>
26932693
</link>
2694+
<link>
2695+
<name>vendors/renesas/rx_driver_package/v133/r_tsip_rx/lib/gcc/libr_tsip_rx65n_little.a</name>
2696+
<type>1</type>
2697+
<locationURI>AWS_IOT_MCU_ROOT/vendors/renesas/rx_driver_package/v133/r_tsip_rx/lib/gcc/libr_tsip_rx65n_little.a</locationURI>
2698+
</link>
26942699
<link>
26952700
<name>vendors/renesas/boards/rx65n-rsk-gcc/aws_demos/src/smc_gen/general/r_cg_hardware_setup.c</name>
26962701
<type>1</type>
@@ -2701,11 +2706,6 @@
27012706
<type>1</type>
27022707
<locationURI>SMC_GENERATED_LOC/general/r_cg_interrupt_handlers.h</locationURI>
27032708
</link>
2704-
<link>
2705-
<name>vendors/renesas/rx_driver_package/v133/r_tsip_rx/lib/gcc/libr_tsip_rx65n_little.a</name>
2706-
<type>1</type>
2707-
<locationURI>AWS_IOT_MCU_ROOT/vendors/renesas/rx_driver_package/v133/r_tsip_rx/lib/gcc/libr_tsip_rx65n_little.a</locationURI>
2708-
</link>
27092709
<link>
27102710
<name>vendors/renesas/boards/rx65n-rsk-gcc/aws_demos/src/smc_gen/general/r_cg_macrodriver.h</name>
27112711
<type>1</type>

projects/renesas/rx65n-rsk/e2studio-gcc/aws_demos/aws_demos.scfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1350,6 +1350,11 @@
13501350
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
13511351
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
13521352
</configuration>
1353+
<configuration inuse="true" name="r_tsip_rx">
1354+
<component description="Dependency : r_bsp version(s) 6.11&#10;Support functions: AES, GCM, CCM, CMAC, SHA, MD5, Triple-DES, ARC4, RSA, ECC, Random number generate, Key management, secure boot/secure firmware update.&#10;The &quot;.l&quot; in version number means library version." detailDescription="TSIP(Trusted Secure IP) driver." display="r_tsip_rx" id="r_tsip_rx1.14.l" version="1.14.l"/>
1355+
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
1356+
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
1357+
</configuration>
13531358
</tool>
13541359
<tool id="System">
13551360
<section id="ocd">

projects/renesas/rx65n-rsk/e2studio/aws_demos/.project

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2136,7 +2136,7 @@
21362136
<locationURI>AWS_IOT_MCU_ROOT/vendors/renesas/rx_driver_package/v133/r_s12ad_rx/r_s12ad_rx_if.h</locationURI>
21372137
</link>
21382138
<link>
2139-
<name>vendors/renesas/rx_driver_package/v133/r_tsip/r_tsip_rx_if.h</name>
2139+
<name>vendors/renesas/rx_driver_package/v133/r_tsip_rx/r_tsip_rx_if.h</name>
21402140
<type>1</type>
21412141
<locationURI>AWS_IOT_MCU_ROOT/vendors/renesas/rx_driver_package/v133/r_tsip_rx/r_tsip_rx_if.h</locationURI>
21422142
</link>
@@ -2685,20 +2685,15 @@
26852685
<type>1</type>
26862686
<locationURI>AWS_IOT_MCU_ROOT/vendors/renesas/rx_driver_package/v133/r_flash_rx/src/flash_type_4/r_flash_type4_if.h</locationURI>
26872687
</link>
2688-
<link>
2689-
<name>vendors/renesas/boards/rx65n-rsk/aws_demos/src/smc_gen/general/r_cg_hardware_setup.c</name>
2690-
<type>1</type>
2691-
<locationURI>AWS_IOT_MCU_ROOT/vendors/renesas/boards/rx65n-rsk/aws_demos/src/smc_gen/general/r_cg_hardware_setup.c</locationURI>
2692-
</link>
2693-
<link>
26942688
<link>
26952689
<name>vendors/renesas/rx_driver_package/v133/r_tsip_rx/lib/ccrx/r_tsip_rx65n_little.lib</name>
26962690
<type>1</type>
26972691
<locationURI>AWS_IOT_MCU_ROOT/vendors/renesas/rx_driver_package/v133/r_tsip_rx/lib/ccrx/r_tsip_rx65n_little.lib</locationURI>
26982692
</link>
2699-
<name>vendors/renesas/boards/rx65n-rsk/aws_demos/src/smc_gen/general/r_cg_macrodriver.h</name>
2693+
<link>
2694+
<name>vendors/renesas/boards/rx65n-rsk/aws_demos/src/smc_gen/general/r_cg_hardware_setup.c</name>
27002695
<type>1</type>
2701-
<locationURI>AWS_IOT_MCU_ROOT/vendors/renesas/boards/rx65n-rsk/aws_demos/src/smc_gen/general/r_cg_macrodriver.h</locationURI>
2696+
<locationURI>AWS_IOT_MCU_ROOT/vendors/renesas/boards/rx65n-rsk/aws_demos/src/smc_gen/general/r_cg_hardware_setup.c</locationURI>
27022697
</link>
27032698
<link>
27042699
<name>vendors/renesas/boards/rx65n-rsk/aws_demos/src/smc_gen/general/r_cg_userdefine.h</name>
@@ -2858,7 +2853,7 @@
28582853
<type>10</type>
28592854
<matcher>
28602855
<id>org.eclipse.ui.ide.multiFilter</id>
2861-
<arguments>1.0-name-matches-false-true-r_sci_rx|r_bsp|r_byteq|r_ether_rx|r_flash_rx|r_s12ad_rx|r_sci_rx</arguments>
2856+
<arguments>1.0-name-matches-false-true-r_sci_rx|r_bsp|r_byteq|r_ether_rx|r_flash_rx|r_s12ad_rx|r_sci_rx|r_tsip_rx|</arguments>
28622857
</matcher>
28632858
</filter>
28642859
</filteredResources>

projects/renesas/rx65n-rsk/e2studio/aws_demos/aws_demos.scfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1372,6 +1372,11 @@
13721372
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
13731373
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
13741374
</configuration>
1375+
<configuration inuse="true" name="r_tsip_rx">
1376+
<component description="Dependency : r_bsp version(s) 6.11&#10;Support functions: AES, GCM, CCM, CMAC, SHA, MD5, Triple-DES, ARC4, RSA, ECC, Random number generate, Key management, secure boot/secure firmware update.&#10;The &quot;.l&quot; in version number means library version." detailDescription="TSIP(Trusted Secure IP) driver." display="r_tsip_rx" id="r_tsip_rx1.14.l" version="1.14.l"/>
1377+
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
1378+
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
1379+
</configuration>
13751380
</tool>
13761381
<tool id="System">
13771382
<section id="ocd">

projects/renesas/rx65n-rsk/e2studio/boot_loader/.project

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<buildSpec>
88
<buildCommand>
99
<name>com.renesas.smc.ui.pgsupport.SCContentBuilder</name>
10+
<triggers></triggers>
1011
<arguments>
1112
</arguments>
1213
</buildCommand>

projects/renesas/rx72n-envision-kit-wifi/e2studio/boot_loader/.project

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<buildSpec>
88
<buildCommand>
99
<name>com.renesas.smc.ui.pgsupport.SCContentBuilder</name>
10+
<triggers></triggers>
1011
<arguments>
1112
</arguments>
1213
</buildCommand>

projects/renesas/rx72n-envision-kit/e2studio/boot_loader/.project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</buildCommand>
1414
<buildCommand>
1515
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
16-
<triggers>full,incremental,</triggers>
16+
<triggers></triggers>
1717
<arguments>
1818
</arguments>
1919
</buildCommand>

vendors/renesas/boards/rx65n-cloud-kit-uart-sx-ulpgn/ports/ota/aws_ota_pal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ OTA_Err_t prvPAL_ResetDevice( void )
615615
Then the boot loader will start and erase the image that failed to update. */
616616
set_psw(0);
617617
R_BSP_InterruptsDisable();
618-
R_FLASH_Control(FLASH_CMD_BANK_TOGGLE, NULL);
618+
//R_FLASH_Control(FLASH_CMD_BANK_TOGGLE, NULL);
619619
R_BSP_RegisterProtectDisable(BSP_REG_PROTECT_LPC_CGC_SWR);
620620
SYSTEM.SWRR = 0xa501;
621621
while(1); /* software reset */

vendors/renesas/boards/rx65n-gr-rose-gcc/ports/ota/aws_ota_pal.c

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -642,27 +642,14 @@ OTA_Err_t prvPAL_ResetDevice( void )
642642

643643
OTA_LOG_L1( "[%s] Resetting the device.\r\n", OTA_METHOD_NAME );
644644

645-
if ((eOTA_ImageState_Accepted == load_firmware_control_block.eSavedAgentState) ||
646-
(eOTA_ImageState_Testing == load_firmware_control_block.eSavedAgentState))
647-
{
648-
/* Software reset issued (Not swap bank) */
649-
R_BSP_SET_PSW(0);
650-
R_BSP_InterruptsDisable();
651-
R_BSP_RegisterProtectDisable(BSP_REG_PROTECT_LPC_CGC_SWR);
652-
SYSTEM.SWRR = 0xa501;
653-
while(1); /* software reset */
654-
}
655-
else
656-
{
657-
/* If the status is rejected, aborted, or error, swap bank and return to the previous image.
658-
Then the boot loader will start and erase the image that failed to update. */
659-
R_BSP_SET_PSW(0);
660-
R_BSP_InterruptsDisable();
661-
R_FLASH_Control(FLASH_CMD_BANK_TOGGLE, NULL);
662-
R_BSP_RegisterProtectDisable(BSP_REG_PROTECT_LPC_CGC_SWR);
663-
SYSTEM.SWRR = 0xa501;
664-
while(1); /* software reset */
665-
}
645+
/* If the status is rejected, aborted, or error, swap bank and return to the previous image.
646+
Then the boot loader will start and erase the image that failed to update. */
647+
R_BSP_SET_PSW(0);
648+
R_BSP_InterruptsDisable();
649+
//R_FLASH_Control(FLASH_CMD_BANK_TOGGLE, NULL);
650+
R_BSP_RegisterProtectDisable(BSP_REG_PROTECT_LPC_CGC_SWR);
651+
SYSTEM.SWRR = 0xa501;
652+
while(1); /* software reset */
666653

667654
/* We shouldn't actually get here if the board supports the auto reset.
668655
* But, it doesn't hurt anything if we do although someone will need to

vendors/renesas/boards/rx65n-gr-rose-uart-esp8266-gcc/ports/ota/aws_ota_pal.c

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -641,28 +641,14 @@ OTA_Err_t prvPAL_ResetDevice( void )
641641
DEFINE_OTA_METHOD_NAME("prvPAL_ResetDevice");
642642

643643
OTA_LOG_L1( "[%s] Resetting the device.\r\n", OTA_METHOD_NAME );
644-
645-
if ((eOTA_ImageState_Accepted == load_firmware_control_block.eSavedAgentState) ||
646-
(eOTA_ImageState_Testing == load_firmware_control_block.eSavedAgentState))
647-
{
648-
/* Software reset issued (Not swap bank) */
649-
set_psw(0);
650-
R_BSP_InterruptsDisable();
651-
R_BSP_RegisterProtectDisable(BSP_REG_PROTECT_LPC_CGC_SWR);
652-
SYSTEM.SWRR = 0xa501;
653-
while(1); /* software reset */
654-
}
655-
else
656-
{
657-
/* If the status is rejected, aborted, or error, swap bank and return to the previous image.
658-
Then the boot loader will start and erase the image that failed to update. */
659-
set_psw(0);
660-
R_BSP_InterruptsDisable();
661-
R_FLASH_Control(FLASH_CMD_BANK_TOGGLE, NULL);
662-
R_BSP_RegisterProtectDisable(BSP_REG_PROTECT_LPC_CGC_SWR);
663-
SYSTEM.SWRR = 0xa501;
664-
while(1); /* software reset */
665-
}
644+
/* If the status is rejected, aborted, or error, swap bank and return to the previous image.
645+
Then the boot loader will start and erase the image that failed to update. */
646+
set_psw(0);
647+
R_BSP_InterruptsDisable();
648+
//R_FLASH_Control(FLASH_CMD_BANK_TOGGLE, NULL);
649+
R_BSP_RegisterProtectDisable(BSP_REG_PROTECT_LPC_CGC_SWR);
650+
SYSTEM.SWRR = 0xa501;
651+
while(1); /* software reset */
666652

667653
/* We shouldn't actually get here if the board supports the auto reset.
668654
* But, it doesn't hurt anything if we do although someone will need to

vendors/renesas/boards/rx65n-gr-rose-uart-esp8266/ports/ota/aws_ota_pal.c

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -641,27 +641,14 @@ OTA_Err_t prvPAL_ResetDevice( void )
641641

642642
OTA_LOG_L1( "[%s] Resetting the device.\r\n", OTA_METHOD_NAME );
643643

644-
if ((eOTA_ImageState_Accepted == load_firmware_control_block.eSavedAgentState) ||
645-
(eOTA_ImageState_Testing == load_firmware_control_block.eSavedAgentState))
646-
{
647-
/* Software reset issued (Not swap bank) */
648-
set_psw(0);
649-
R_BSP_InterruptsDisable();
650-
R_BSP_RegisterProtectDisable(BSP_REG_PROTECT_LPC_CGC_SWR);
651-
SYSTEM.SWRR = 0xa501;
652-
while(1); /* software reset */
653-
}
654-
else
655-
{
656-
/* If the status is rejected, aborted, or error, swap bank and return to the previous image.
657-
Then the boot loader will start and erase the image that failed to update. */
658-
set_psw(0);
659-
R_BSP_InterruptsDisable();
660-
R_FLASH_Control(FLASH_CMD_BANK_TOGGLE, NULL);
661-
R_BSP_RegisterProtectDisable(BSP_REG_PROTECT_LPC_CGC_SWR);
662-
SYSTEM.SWRR = 0xa501;
663-
while(1); /* software reset */
664-
}
644+
/* If the status is rejected, aborted, or error, swap bank and return to the previous image.
645+
Then the boot loader will start and erase the image that failed to update. */
646+
set_psw(0);
647+
R_BSP_InterruptsDisable();
648+
//R_FLASH_Control(FLASH_CMD_BANK_TOGGLE, NULL);
649+
R_BSP_RegisterProtectDisable(BSP_REG_PROTECT_LPC_CGC_SWR);
650+
SYSTEM.SWRR = 0xa501;
651+
while(1); /* software reset */
665652

666653
/* We shouldn't actually get here if the board supports the auto reset.
667654
* But, it doesn't hurt anything if we do although someone will need to

vendors/renesas/boards/rx65n-gr-rose/ports/ota/aws_ota_pal.c

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -641,27 +641,14 @@ OTA_Err_t prvPAL_ResetDevice( void )
641641

642642
OTA_LOG_L1( "[%s] Resetting the device.\r\n", OTA_METHOD_NAME );
643643

644-
if ((eOTA_ImageState_Accepted == load_firmware_control_block.eSavedAgentState) ||
645-
(eOTA_ImageState_Testing == load_firmware_control_block.eSavedAgentState))
646-
{
647-
/* Software reset issued (Not swap bank) */
648-
set_psw(0);
649-
R_BSP_InterruptsDisable();
650-
R_BSP_RegisterProtectDisable(BSP_REG_PROTECT_LPC_CGC_SWR);
651-
SYSTEM.SWRR = 0xa501;
652-
while(1); /* software reset */
653-
}
654-
else
655-
{
656-
/* If the status is rejected, aborted, or error, swap bank and return to the previous image.
657-
Then the boot loader will start and erase the image that failed to update. */
658-
set_psw(0);
659-
R_BSP_InterruptsDisable();
660-
R_FLASH_Control(FLASH_CMD_BANK_TOGGLE, NULL);
661-
R_BSP_RegisterProtectDisable(BSP_REG_PROTECT_LPC_CGC_SWR);
662-
SYSTEM.SWRR = 0xa501;
663-
while(1); /* software reset */
664-
}
644+
/* If the status is rejected, aborted, or error, swap bank and return to the previous image.
645+
Then the boot loader will start and erase the image that failed to update. */
646+
set_psw(0);
647+
R_BSP_InterruptsDisable();
648+
//R_FLASH_Control(FLASH_CMD_BANK_TOGGLE, NULL);
649+
R_BSP_RegisterProtectDisable(BSP_REG_PROTECT_LPC_CGC_SWR);
650+
SYSTEM.SWRR = 0xa501;
651+
while(1); /* software reset */
665652

666653
/* We shouldn't actually get here if the board supports the auto reset.
667654
* But, it doesn't hurt anything if we do although someone will need to

vendors/renesas/boards/rx65n-rsk/aws_demos/config_files/core_mqtt_config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
#endif
4242

4343
#ifndef LIBRARY_LOG_LEVEL
44-
#define LIBRARY_LOG_LEVEL LOG_INFO
44+
#define LIBRARY_LOG_LEVEL LOG_NONE
4545
#endif
4646

4747
#include "logging_stack.h"

vendors/renesas/boards/rx65n-rsk/ports/ota/aws_ota_pal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ OTA_Err_t prvPAL_ResetDevice( void )
615615
Then the boot loader will start and erase the image that failed to update. */
616616
set_psw(0);
617617
R_BSP_InterruptsDisable();
618-
R_FLASH_Control(FLASH_CMD_BANK_TOGGLE, NULL);
618+
//R_FLASH_Control(FLASH_CMD_BANK_TOGGLE, NULL);
619619
R_BSP_RegisterProtectDisable(BSP_REG_PROTECT_LPC_CGC_SWR);
620620
SYSTEM.SWRR = 0xa501;
621621
while(1); /* software reset */

vendors/renesas/boards/rx671-rsk-gcc/aws_demos/flash_project/RX Group.fcf

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ Product Name=RX Group
99
Support FAW=FALSE
1010
Support AWPR=FALSE
1111
Support ESW=TRUE
12-
Memory Area Count=6
12+
Memory Area Count=4
1313
[Clock Info]
1414
Clock Mode=0
1515
Support Clock=
1616
OSC Frequency Range=16000000,16000000
1717
CPU Frequency Range=120000000,120000000
18-
SCI Frequency Range=0,16000000
18+
SCI Frequency Range=0,60000000
1919
CPU Ratio=
2020
SCI Ratio=
2121
[Memory Area 0]
@@ -27,38 +27,24 @@ Write Unit Size=0x00000080
2727
Attribute=0x00000002
2828
[Memory Area 1]
2929
Area Type=0x00000001
30-
Start Address=0xFFF00000
31-
Size=0x000F0000
32-
Erase Unit Size=0x00008000
33-
Write Unit Size=0x00000080
34-
Attribute=0x00000002
35-
[Memory Area 2]
36-
Area Type=0x00000001
37-
Start Address=0xFFEF0000
38-
Size=0x00010000
39-
Erase Unit Size=0x00002000
40-
Write Unit Size=0x00000080
41-
Attribute=0x00000002
42-
[Memory Area 3]
43-
Area Type=0x00000001
4430
Start Address=0xFFE00000
45-
Size=0x000F0000
31+
Size=0x001F0000
4632
Erase Unit Size=0x00008000
4733
Write Unit Size=0x00000080
4834
Attribute=0x00000002
49-
[Memory Area 4]
35+
[Memory Area 2]
5036
Area Type=0x00000010
5137
Start Address=0x00100000
5238
Size=0x00002000
5339
Erase Unit Size=0x00000040
5440
Write Unit Size=0x00000004
5541
Attribute=0x00000000
56-
[Memory Area 5]
42+
[Memory Area 3]
5743
Area Type=0x00010000
5844
Start Address=0xFE7F5D00
5945
Size=0x00000080
6046
Erase Unit Size=0x00000000
6147
Write Unit Size=0x00000010
6248
Attribute=0x00000000
6349
[Checksum]
64-
Checksum=0xEFDDF413
50+
Checksum=0x4B2D1FA6

0 commit comments

Comments
 (0)