Skip to content

Commit

Permalink
Merge pull request #39 from nam-ng/6.2.1-rx-1.0.0-final
Browse files Browse the repository at this point in the history
Update for v6.2.1_rel-rx-1.0.0 final
  • Loading branch information
HirokiIshiguro authored Apr 20, 2023
2 parents 78e9994 + 33261e3 commit 925ff1b
Show file tree
Hide file tree
Showing 30 changed files with 115 additions and 116 deletions.
40 changes: 14 additions & 26 deletions configuration/azure-rtos.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1111,13 +1111,9 @@
<board>CK-RX65N</board>
<board>RSKRX65N-2MB</board>
<board>RSKRX65N-2MB(TSIP)</board>
<file>configuration/samples/iot_adu/ck-rx65n/ether/src/main.c</file>
<path>src</path>
</impdir>
<impdir>
<board>RX72NEnvisionKit</board>
<board>EnvisionKitRX72N</board>
<file>configuration/samples/iot_adu/rx72n-envision-kit/src/main.c</file>
<file>configuration/samples/iot_adu/ether/main.c</file>
<path>src</path>
</impdir>
<impdir>
Expand Down Expand Up @@ -1170,9 +1166,9 @@
<board>RX65NCloudKit</board>
<board>CloudKitRX65N</board>
<board>RSKRX671</board>
<file>configuration/samples/iot_adu/rx65n-cloudkit/src/main.c</file>
<file>configuration/samples/iot_adu/rx65n-cloudkit/src/nx_driver_rx_wifi.c</file>
<file>configuration/samples/iot_adu/rx65n-cloudkit/src/nx_driver_rx_wifi.h</file>
<file>configuration/samples/iot_adu/wifi/main.c</file>
<file>configuration/samples/iot_adu/wifi/nx_driver_rx_wifi.c</file>
<file>configuration/samples/iot_adu/wifi/nx_driver_rx_wifi.h</file>
<path>src</path>
</impdir>
<impdir>
Expand Down Expand Up @@ -1700,13 +1696,9 @@
<board>CK-RX65N</board>
<board>RSKRX65N-2MB</board>
<board>RSKRX65N-2MB(TSIP)</board>
<file>configuration/samples/iot_adu/ck-rx65n/ether/src/main.c</file>
<path>src</path>
</impdir>
<impdir>
<board>RX72NEnvisionKit</board>
<board>EnvisionKitRX72N</board>
<file>configuration/samples/iot_adu/rx72n-envision-kit/src/main.c</file>
<file>configuration/samples/iot_adu/ether/main.c</file>
<path>src</path>
</impdir>
<impdir>
Expand Down Expand Up @@ -1761,9 +1753,9 @@
<board>RX65NCloudKit</board>
<board>CloudKitRX65N</board>
<board>RSKRX671</board>
<file>configuration/samples/iot_adu/rx65n-cloudkit/src/main.c</file>
<file>configuration/samples/iot_adu/rx65n-cloudkit/src/nx_driver_rx_wifi.c</file>
<file>configuration/samples/iot_adu/rx65n-cloudkit/src/nx_driver_rx_wifi.h</file>
<file>configuration/samples/iot_adu/wifi/main.c</file>
<file>configuration/samples/iot_adu/wifi/nx_driver_rx_wifi.c</file>
<file>configuration/samples/iot_adu/wifi/nx_driver_rx_wifi.h</file>
<path>src</path>
</impdir>
<impdir>
Expand Down Expand Up @@ -2103,7 +2095,7 @@
<impdir>
<board>CK-RX65N</board>
<folder>configuration/samples/iot_sdk_ewf/ck-rx65n/src/smc_gen/r_pincfg</folder>
<path>src/smc_gen</path>
<path>src/smc_gen/r_pincfg</path>
</impdir>
<impdir>
<toolchain>GNURX</toolchain>
Expand Down Expand Up @@ -2286,13 +2278,9 @@
<board>CK-RX65N</board>
<board>RSKRX65N-2MB</board>
<board>RSKRX65N-2MB(TSIP)</board>
<file>configuration/samples/iot_adu/ck-rx65n/ether/src/main.c</file>
<path>src</path>
</impdir>
<impdir>
<board>RX72NEnvisionKit</board>
<board>EnvisionKitRX72N</board>
<file>configuration/samples/iot_adu/rx72n-envision-kit/src/main.c</file>
<file>configuration/samples/iot_adu/ether/main.c</file>
<path>src</path>
</impdir>
<impdir>
Expand Down Expand Up @@ -2347,9 +2335,9 @@
<board>RX65NCloudKit</board>
<board>CloudKitRX65N</board>
<board>RSKRX671</board>
<file>configuration/samples/iot_adu/rx65n-cloudkit/src/main.c</file>
<file>configuration/samples/iot_adu/rx65n-cloudkit/src/nx_driver_rx_wifi.c</file>
<file>configuration/samples/iot_adu/rx65n-cloudkit/src/nx_driver_rx_wifi.h</file>
<file>configuration/samples/iot_adu/wifi/main.c</file>
<file>configuration/samples/iot_adu/wifi/nx_driver_rx_wifi.c</file>
<file>configuration/samples/iot_adu/wifi/nx_driver_rx_wifi.h</file>
<path>src</path>
</impdir>
<impdir>
Expand Down Expand Up @@ -2701,7 +2689,7 @@
<impdir>
<board>CK-RX65N</board>
<folder>configuration/samples/iot_sdk_ewf/ck-rx65n/src/smc_gen/r_pincfg</folder>
<path>src/smc_gen</path>
<path>src/smc_gen/r_pincfg</path>
</impdir>
<impdir>
<toolchain>GNURX</toolchain>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
<sections name="R_2"/>
<sections name="B"/>
<sections name="R"/>
<sections name="RPFRAM"/>
<sections name="RPFRAM2"/>
<sections name="BEXRAM_1">
<sectionAddress xsi:type="com.renesas.linkersection.model:FixedAddress" fixedAddress="8388608"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
* PEM-encoded code signer public key.
*
* Must include the PEM header and footer:
* "-----BEGIN CERTIFICATE-----\n"\
* "...base64 data...\n"\
* "-----BEGIN CERTIFICATE-----"\
* "...base64 data..."\
* "-----END CERTIFICATE-----"
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
<sections name="R_2"/>
<sections name="B"/>
<sections name="R"/>
<sections name="RPFRAM"/>
<sections name="RPFRAM2"/>
<sections name="BEXRAM_1">
<sectionAddress xsi:type="com.renesas.linkersection.model:FixedAddress" fixedAddress="8388608"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<sections name="R"/>
<sections name="B_8"/>
<sections name="R_8"/>
<sections name="RPFRAM"/>
<sections name="RPFRAM2"/>
<sections name="BEXRAM_1">
<sectionAddress xsi:type="com.renesas.linkersection.model:FixedAddress" fixedAddress="8388608"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
<gridItem id="BSP_CFG_ISTACK_BYTES" selectedIndex="0x800"/>
<gridItem id="BSP_CFG_HEAP_BYTES" selectedIndex="0x800"/>
<gridItem id="BSP_CFG_USER_CHARPUT_ENABLED" selectedIndex="1"/>
<gridItem id="BSP_CFG_SWINT_UNIT2_ENABLE" selectedIndex="1"/>
</component>
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
<sections name="R_2"/>
<sections name="B"/>
<sections name="R"/>
<sections name="RPFRAM"/>
<sections name="RPFRAM2"/>
<sections name="FREEMEM"/>
<sections name="D_CONNECT_INFO_1">
Expand Down
1 change: 0 additions & 1 deletion configuration/samples/iot_adu/common/demo_printf.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#define LOG_TERMINAL demo_printf

void demo_printf_init(void);

void demo_printf(char *format, ...);

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,20 @@
/* */
/**************************************************************************/

#include "nx_azure_iot_adu_agent.h"
#include <r_flash_rx_if.h>
#include <stdio.h>
#include "nx_azure_iot_adu_agent.h"
#include "r_flash_rx_if.h"
#include "r_fwup_if.h"
#include "r_bsp_config.h"
#include "demo_printf.h"

/*
#define ENABLE_SECURE_BOOT
*/
#if (BSP_CFG_CODE_FLASH_BANK_MODE != 0)
#error "Error! Please set a device as dual bank device on the Smart Configurator."
#endif


#if ((BSP_CFG_CODE_FLASH_BANK_MODE != 0) && !defined(DISABLE_ADU_SAMPLE))
#error "Error! Need to define Dual mode in the bank mode of dual-bank function"
#if (BSP_CFG_RTOS_USED != 5)
#error "Error! Need to define Azure RTOS in BSP configuration"
#endif

void nx_azure_iot_adu_agent_driver(NX_AZURE_IOT_ADU_AGENT_DRIVER *driver_req_ptr);
Expand Down
8 changes: 0 additions & 8 deletions configuration/samples/iot_adu/ether/hardware_setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,10 @@
#ifndef HARDWARE_SETUP_H
#define HARDWARE_SETUP_H

/* Wi-Fi is used to connect Azure cloud.*/
/*
#define ENABLE_WIFI
*/

/* Ether is used to connect Azure cloud.*/
#define ENABLE_ETHER

#if (BSP_CFG_RTOS_USED != 5)
#error "Error! Need to define Azure RTOS in BSP configuration"
#endif

#ifndef MAC_ADDRESS
#define MAC_ADDRESS {0x0,0x04,0x00,0x00,0x00,0x00}
#endif
Expand Down
15 changes: 4 additions & 11 deletions configuration/samples/iot_adu/ether/nx_driver_rx_fit.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@ static netx_driver_rx_fit_data_t netx_driver_rx_fit_data[1];
initializing the driver by calling 'nx_ip_interface_physical_address_set()'
otherwise the default address will be used.*/
extern uint8_t df__netx_driver_rx_fit_mac_address[6];
uint8_t _netx_driver_rx_fit_mac_address[6];


VOID nx_driver_rx_fit(NX_IP_DRIVER *driver_req_ptr)
{
Expand Down Expand Up @@ -191,16 +189,11 @@ static VOID _netx_driver_initialize(NX_IP_DRIVER *driver_req_ptr)
netx_driver_rx_fit_data[chan].deferred_events_flags = 0u;

/* Save the MAC address. */
for (UINT i = 0; i < NX_DRIVER_PHYSICAL_ADDRESS_SIZE ; i++)
{
_netx_driver_rx_fit_mac_address[i] = df__netx_driver_rx_fit_mac_address[i];
}

interface_ptr->nx_interface_physical_address_msw =
(ULONG)((_netx_driver_rx_fit_mac_address[0] << 8) | (_netx_driver_rx_fit_mac_address[1]));
(ULONG)((df__netx_driver_rx_fit_mac_address[0] << 8) | (df__netx_driver_rx_fit_mac_address[1]));
interface_ptr->nx_interface_physical_address_lsw =
(ULONG)((_netx_driver_rx_fit_mac_address[2] << 24) | (_netx_driver_rx_fit_mac_address[3] << 16) |
(_netx_driver_rx_fit_mac_address[4] << 8) | (_netx_driver_rx_fit_mac_address[5]));
(ULONG)((df__netx_driver_rx_fit_mac_address[2] << 24) | (df__netx_driver_rx_fit_mac_address[3] << 16) |
(df__netx_driver_rx_fit_mac_address[4] << 8) | (df__netx_driver_rx_fit_mac_address[5]));

/* Indicate to the IP software that IP to physical mapping
is required. */
Expand Down Expand Up @@ -259,7 +252,7 @@ static VOID _netx_driver_enable(NX_IP_DRIVER *driver_req_ptr)

/* Open the Ethernet channel.
Note that the API function R_ETHER_Initial must be called in advance. */
rx_ether_ret = R_ETHER_Open_ZC2(chan, _netx_driver_rx_fit_mac_address, ETHER_FLAG_OFF);
rx_ether_ret = R_ETHER_Open_ZC2(chan, df__netx_driver_rx_fit_mac_address, ETHER_FLAG_OFF);
if(rx_ether_ret != ETHER_SUCCESS) {
driver_req_ptr->nx_ip_driver_status = NX_DRIVER_ERROR;
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,26 @@
#define SAMPLE_COMMAND_SUCCESS_STATUS (200)
#define SAMPLE_COMMAND_ERROR_STATUS (500)

#define SAMPLE_PNP_MODEL_ID "dtmi:com:example:Thermostat;3"
#define SAMPLE_PNP_MODEL_ID "dtmi:com:example:Thermostat;4"
#define SAMPLE_PNP_DPS_PAYLOAD "{\"modelId\":\"" SAMPLE_PNP_MODEL_ID "\"}"

/* Credential Information on DataFlash */
#ifndef ENABLE_DPS_SAMPLE
extern volatile const uint8_t df_host_name;
extern volatile const uint8_t df_device_id;

#else /* !ENABLE_DPS_SAMPLE */

extern volatile const uint8_t df_endpoint;
extern volatile const uint8_t df_id_scope;
extern volatile const uint8_t df_registration_id;
#endif /* ENABLE_DPS_SAMPLE */
extern volatile const uint8_t df_device_symmetric_key;
extern volatile const uint8_t df_module_id;
#if (USE_DEVICE_CERTIFICATE == 1)
extern volatile const uint8_t df_device_cert;
extern volatile const uint8_t df_device_private_key;
#endif /* USE_DEVICE_CERTIFICATE */

/* Generally, IoTHub Client and DPS Client do not run at the same time, user can use union as below to
share the memory between IoTHub Client and DPS Client.
Expand Down Expand Up @@ -389,6 +403,9 @@ UCHAR *iothub_device_id = (UCHAR *)&df_device_id;
UINT iothub_hostname_length = strlen( (const char *)&df_host_name );
UINT iothub_device_id_length = strlen( (const char *)&df_device_id );
#endif /* ENABLE_DPS_SAMPLE */
UCHAR *iothub_module_id = (UCHAR *)&df_module_id;
UINT iothub_module_id_length = strlen( (const char *)&df_module_id );


#ifdef ENABLE_DPS_SAMPLE

Expand All @@ -408,7 +425,7 @@ UINT iothub_device_id_length = strlen( (const char *)&df_device_id );
if ((status = nx_azure_iot_hub_client_initialize(iothub_client_ptr, &nx_azure_iot,
iothub_hostname, iothub_hostname_length,
iothub_device_id, iothub_device_id_length,
(const UCHAR *)MODULE_ID, sizeof(MODULE_ID) - 1,
iothub_module_id, iothub_module_id_length,
_nx_azure_iot_tls_supported_crypto,
_nx_azure_iot_tls_supported_crypto_size,
_nx_azure_iot_tls_ciphersuite_map,
Expand Down Expand Up @@ -842,13 +859,22 @@ static UINT sample_dps_entry(NX_AZURE_IOT_PROVISIONING_CLIENT *prov_client_ptr,
{
UINT status;

UCHAR *iothub_endpoint = (UCHAR *)&df_endpoint;
UCHAR *iothub_id_scope = (UCHAR *)&df_id_scope;
UCHAR *iothub_registration_id = (UCHAR *)&df_registration_id;

UINT iothub_endpoint_len = strlen( (const char *)&df_endpoint );
UINT iothub_id_scope_id_len = strlen( (const char *)&df_id_scope );
UINT iothub_registration_id_len = strlen( (const char *)&df_registration_id );


LOG_TERMINAL("Start Provisioning Client...\r\n");

/* Initialize IoT provisioning client. */
if ((status = nx_azure_iot_provisioning_client_initialize(prov_client_ptr, &nx_azure_iot,
(UCHAR *)ENDPOINT, sizeof(ENDPOINT) - 1,
(UCHAR *)ID_SCOPE, sizeof(ID_SCOPE) - 1,
(UCHAR *)REGISTRATION_ID, sizeof(REGISTRATION_ID) - 1,
iothub_endpoint, iothub_endpoint_len,
iothub_id_scope, iothub_id_scope_id_len,
iothub_registration_id, iothub_registration_id_len,
_nx_azure_iot_tls_supported_crypto,
_nx_azure_iot_tls_supported_crypto_size,
_nx_azure_iot_tls_ciphersuite_map,
Expand Down Expand Up @@ -892,8 +918,8 @@ UINT status;
#else

/* Set symmetric key. */
else if ((status = nx_azure_iot_provisioning_client_symmetric_key_set(prov_client_ptr, (UCHAR *)DEVICE_SYMMETRIC_KEY,
sizeof(DEVICE_SYMMETRIC_KEY) - 1)))
else if ((status = nx_azure_iot_provisioning_client_symmetric_key_set(prov_client_ptr, (UCHAR *)&df_device_symmetric_key,
strlen( (const char *)&df_device_symmetric_key ))))
{
LOG_TERMINAL("Failed on nx_azure_iot_hub_client_symmetric_key_set!: error code = 0x%08x\r\n", status);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
<gridItem id="BSP_CFG_ISTACK_BYTES" selectedIndex="0x800"/>
<gridItem id="BSP_CFG_HEAP_BYTES" selectedIndex="0x800"/>
<gridItem id="BSP_CFG_USER_CHARPUT_ENABLED" selectedIndex="1"/>
<gridItem id="BSP_CFG_SWINT_UNIT2_ENABLE" selectedIndex="1"/>
</component>
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
</configuration>
Expand Down Expand Up @@ -49,9 +48,9 @@
<gridItem id="USE_NX_AZURE_IOT_HUB_CLIENT_USER_AGENT_DEVICE_TYPE" selectedIndex="1"/>
<gridItem id="NX_AZURE_IOT_HUB_CLIENT_USER_AGENT_DEVICE_TYPE" selectedIndex="&quot;RX65N-RSK&quot;"/>
<gridItem id="SAMPLE_DEVICE_MANUFACTURER" selectedIndex="&quot;RENESAS&quot;"/>
<gridItem id="SAMPLE_DEVICE_MODEL" selectedIndex="&quot;RSK-RX65N&quot;"/>
<gridItem id="SAMPLE_DEVICE_MODEL" selectedIndex="&quot;RX65N-RSK&quot;"/>
<gridItem id="SAMPLE_LEAF_DEVICE_MANUFACTURER" selectedIndex="&quot;RENESAS&quot;"/>
<gridItem id="SAMPLE_LEAF_DEVICE_MODEL" selectedIndex="&quot;RSK-RX65N-Leaf&quot;"/>
<gridItem id="SAMPLE_LEAF_DEVICE_MODEL" selectedIndex="&quot;RX65N-RSK-Leaf&quot;"/>
</component>
<source description="Code generator for Real-time OS" display="RTOS Configurator" id="com.renesas.smc.tools.swcomponent.rtosconfigurator.source"/>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
<sections name="R_2"/>
<sections name="B"/>
<sections name="R"/>
<sections name="RPFRAM"/>
<sections name="RPFRAM2"/>
<sections name="FREEMEM"/>
<sections name="D_CONNECT_INFO_1">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<gridItem id="BSP_CFG_HEAP_BYTES" selectedIndex="0x800"/>
<gridItem id="BSP_CFG_USER_CHARPUT_ENABLED" selectedIndex="1"/>
<gridItem id="BSP_CFG_ROM_CACHE_ENABLE" selectedIndex="0"/>
<gridItem id="BSP_CFG_SWINT_UNIT2_ENABLE" selectedIndex="1"/>
</component>
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
</configuration>
Expand Down Expand Up @@ -50,9 +49,9 @@
<gridItem id="USE_NX_AZURE_IOT_HUB_CLIENT_USER_AGENT_DEVICE_TYPE" selectedIndex="1"/>
<gridItem id="NX_AZURE_IOT_HUB_CLIENT_USER_AGENT_DEVICE_TYPE" selectedIndex="&quot;RX671-RSK&quot;"/>
<gridItem id="SAMPLE_DEVICE_MANUFACTURER" selectedIndex="&quot;RENESAS&quot;"/>
<gridItem id="SAMPLE_DEVICE_MODEL" selectedIndex="&quot;RSK-RX671&quot;"/>
<gridItem id="SAMPLE_DEVICE_MODEL" selectedIndex="&quot;RX671-RSK&quot;"/>
<gridItem id="SAMPLE_LEAF_DEVICE_MANUFACTURER" selectedIndex="&quot;RENESAS&quot;"/>
<gridItem id="SAMPLE_LEAF_DEVICE_MODEL" selectedIndex="&quot;RSK-RX671-Leaf&quot;"/>
<gridItem id="SAMPLE_LEAF_DEVICE_MODEL" selectedIndex="&quot;RX671-RSK-Leaf&quot;"/>
<gridItem id="USE_NX_AZURE_IOT_ADU_AGENT_HTTP_WINDOW_SIZE" selectedIndex="1"/>
<gridItem id="NX_AZURE_IOT_ADU_AGENT_HTTP_WINDOW_SIZE" selectedIndex="10*1024"/>
<gridItem id="USE_NX_AZURE_IOT_ADU_AGENT_HTTP_CONNECT_TIMEOUT" selectedIndex="1"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<sections name="R"/>
<sections name="B_8"/>
<sections name="R_8"/>
<sections name="RPFRAM"/>
<sections name="RPFRAM2"/>
<sections name="FREEMEM"/>
<sections name="D_CONNECT_INFO_1">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
<gridItem id="BSP_CFG_ISTACK_BYTES" selectedIndex="0x800"/>
<gridItem id="BSP_CFG_HEAP_BYTES" selectedIndex="0x800"/>
<gridItem id="BSP_CFG_USER_CHARPUT_ENABLED" selectedIndex="1"/>
<gridItem id="BSP_CFG_SWINT_UNIT2_ENABLE" selectedIndex="1"/>
</component>
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
</configuration>
Expand Down
Loading

0 comments on commit 925ff1b

Please sign in to comment.