Skip to content

Commit

Permalink
Merge pull request #426 from alibaba/update_1.3.1
Browse files Browse the repository at this point in the history
Update 1.3.1
  • Loading branch information
Cheng-SG authored Jul 18, 2018
2 parents fc4a1bc + b02fd94 commit ed7b2c9
Show file tree
Hide file tree
Showing 96 changed files with 11,984 additions and 46,344 deletions.
256 changes: 250 additions & 6 deletions board/esp8266/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@

#include "esp_system.h"

/* Logic partition on flash devices */
const hal_logic_partition_t hal_partitions[] =
/* Logic partition on flash devices for 4M bytes 1024*1024 */
const hal_logic_partition_t hal_partitions_4M_1024x1024[] =
{
[HAL_PARTITION_BOOTLOADER] =
{
.partition_owner = HAL_FLASH_EMBEDDED,
.partition_description = "Bootloader",
.partition_start_addr = 0x1000,
.partition_length = 0x7000, //28k bytes
.partition_start_addr = 0x0000,
.partition_length = 0x1000, //4k bytes
.partition_options = PAR_OPT_READ_EN | PAR_OPT_WRITE_DIS,
},
[HAL_PARTITION_PARAMETER_1] =
Expand All @@ -39,15 +39,15 @@ const hal_logic_partition_t hal_partitions[] =
{
.partition_owner = HAL_FLASH_EMBEDDED,
.partition_description = "Application",
.partition_start_addr = 0x10000,
.partition_start_addr = 0x1000,
.partition_length = 0x100000, //1MB bytes
.partition_options = PAR_OPT_READ_EN | PAR_OPT_WRITE_EN,
},
[HAL_PARTITION_OTA_TEMP] =
{
.partition_owner = HAL_FLASH_EMBEDDED,
.partition_description = "OTA Storage",
.partition_start_addr = 0x110000,
.partition_start_addr = 0x101000,
.partition_length = 0x100000, //1MB bytes
.partition_options = PAR_OPT_READ_EN | PAR_OPT_WRITE_EN,
},
Expand All @@ -69,6 +69,250 @@ const hal_logic_partition_t hal_partitions[] =
},
};

/* Logic partition on flash devices for 2M bytes 1024*1024 */
const hal_logic_partition_t hal_partitions_2M_1024x1024[] =
{
[HAL_PARTITION_BOOTLOADER] =
{
.partition_owner = HAL_FLASH_EMBEDDED,
.partition_description = "Bootloader",
.partition_start_addr = 0x0000,
.partition_length = 0x1000, //4k bytes
.partition_options = PAR_OPT_READ_EN | PAR_OPT_WRITE_DIS,
},
[HAL_PARTITION_PARAMETER_1] =
{
.partition_owner = HAL_FLASH_EMBEDDED,
.partition_description = "PARAMETER1",
.partition_start_addr = 0x1f6000,
.partition_length = 0x1000, // 4k bytes
.partition_options = PAR_OPT_READ_EN | PAR_OPT_WRITE_EN,
},
[HAL_PARTITION_PARAMETER_2] =
{
.partition_owner = HAL_FLASH_EMBEDDED,
.partition_description = "PARAMETER2",
.partition_start_addr = 0x1f7000,
.partition_length = 0x2000, //8k bytes
.partition_options = PAR_OPT_READ_EN | PAR_OPT_WRITE_EN,
},
[HAL_PARTITION_APPLICATION] =
{
.partition_owner = HAL_FLASH_EMBEDDED,
.partition_description = "Application",
.partition_start_addr = 0x1000,
.partition_length = 0xF4000, //976 bytes
.partition_options = PAR_OPT_READ_EN | PAR_OPT_WRITE_EN,
},
[HAL_PARTITION_OTA_TEMP] =
{
.partition_owner = HAL_FLASH_EMBEDDED,
.partition_description = "OTA Storage",
.partition_start_addr = 0x101000,
.partition_length = 0xF4000, //976 bytes
.partition_options = PAR_OPT_READ_EN | PAR_OPT_WRITE_EN,
},
[HAL_PARTITION_PARAMETER_3] =
{
.partition_owner = HAL_FLASH_EMBEDDED,
.partition_description = "PARAMETER3",
.partition_start_addr = 0x1f9000,
.partition_length = 0x1000, //4k bytes
.partition_options = PAR_OPT_READ_EN | PAR_OPT_WRITE_EN,
},
[HAL_PARTITION_PARAMETER_4] =
{
.partition_owner = HAL_FLASH_EMBEDDED,
.partition_description = "PARAMETER4",
.partition_start_addr = 0x1FA000,
.partition_length = 0x1000, //4k bytes
.partition_options = PAR_OPT_READ_EN | PAR_OPT_WRITE_EN,
},
};

/* Logic partition on flash devices for 1M bytes 512*512 */
const hal_logic_partition_t hal_partitions_1M_512x512[] =
{
[HAL_PARTITION_BOOTLOADER] =
{
.partition_owner = HAL_FLASH_EMBEDDED,
.partition_description = "Bootloader",
.partition_start_addr = 0x0000,
.partition_length = 0x1000, //4k bytes
.partition_options = PAR_OPT_READ_EN | PAR_OPT_WRITE_DIS,
},
[HAL_PARTITION_PARAMETER_1] =
{
.partition_owner = HAL_FLASH_EMBEDDED,
.partition_description = "PARAMETER1",
.partition_start_addr = 0xF6000,
.partition_length = 0x1000, // 4k bytes
.partition_options = PAR_OPT_READ_EN | PAR_OPT_WRITE_EN,
},
[HAL_PARTITION_PARAMETER_2] =
{
.partition_owner = HAL_FLASH_EMBEDDED,
.partition_description = "PARAMETER2",
.partition_start_addr = 0xF7000,
.partition_length = 0x2000, //8k bytes
.partition_options = PAR_OPT_READ_EN | PAR_OPT_WRITE_EN,
},
[HAL_PARTITION_APPLICATION] =
{
.partition_owner = HAL_FLASH_EMBEDDED,
.partition_description = "Application",
.partition_start_addr = 0x1000,
.partition_length = 0x75000, //468 bytes
.partition_options = PAR_OPT_READ_EN | PAR_OPT_WRITE_EN,
},
[HAL_PARTITION_OTA_TEMP] =
{
.partition_owner = HAL_FLASH_EMBEDDED,
.partition_description = "OTA Storage",
.partition_start_addr = 0x81000,
.partition_length = 0x75000, //468 bytes
.partition_options = PAR_OPT_READ_EN | PAR_OPT_WRITE_EN,
},
[HAL_PARTITION_PARAMETER_3] =
{
.partition_owner = HAL_FLASH_EMBEDDED,
.partition_description = "PARAMETER3",
.partition_start_addr = 0xF9000,
.partition_length = 0x1000, //4k bytes
.partition_options = PAR_OPT_READ_EN | PAR_OPT_WRITE_EN,
},
[HAL_PARTITION_PARAMETER_4] =
{
.partition_owner = HAL_FLASH_EMBEDDED,
.partition_description = "PARAMETER4",
.partition_start_addr = 0xFA000,
.partition_length = 0x1000, //4k bytes
.partition_options = PAR_OPT_READ_EN | PAR_OPT_WRITE_EN,
},
};

/* Logic partition on flash devices for 2M bytes 512*512 */
const hal_logic_partition_t hal_partitions_2M_512x512[] =
{
[HAL_PARTITION_BOOTLOADER] =
{
.partition_owner = HAL_FLASH_EMBEDDED,
.partition_description = "Bootloader",
.partition_start_addr = 0x0000,
.partition_length = 0x1000, //4k bytes
.partition_options = PAR_OPT_READ_EN | PAR_OPT_WRITE_DIS,
},
[HAL_PARTITION_PARAMETER_1] =
{
.partition_owner = HAL_FLASH_EMBEDDED,
.partition_description = "PARAMETER1",
.partition_start_addr = 0x1F6000,
.partition_length = 0x1000, // 4k bytes
.partition_options = PAR_OPT_READ_EN | PAR_OPT_WRITE_EN,
},
[HAL_PARTITION_PARAMETER_2] =
{
.partition_owner = HAL_FLASH_EMBEDDED,
.partition_description = "PARAMETER2",
.partition_start_addr = 0x1F7000,
.partition_length = 0x2000, //8k bytes
.partition_options = PAR_OPT_READ_EN | PAR_OPT_WRITE_EN,
},
[HAL_PARTITION_APPLICATION] =
{
.partition_owner = HAL_FLASH_EMBEDDED,
.partition_description = "Application",
.partition_start_addr = 0x1000,
.partition_length = 0x7B000, //492 bytes
.partition_options = PAR_OPT_READ_EN | PAR_OPT_WRITE_EN,
},
[HAL_PARTITION_OTA_TEMP] =
{
.partition_owner = HAL_FLASH_EMBEDDED,
.partition_description = "OTA Storage",
.partition_start_addr = 0x81000,
.partition_length = 0x7B000, //492 bytes
.partition_options = PAR_OPT_READ_EN | PAR_OPT_WRITE_EN,
},
[HAL_PARTITION_PARAMETER_3] =
{
.partition_owner = HAL_FLASH_EMBEDDED,
.partition_description = "PARAMETER3",
.partition_start_addr = 0x1F9000,
.partition_length = 0x1000, //4k bytes
.partition_options = PAR_OPT_READ_EN | PAR_OPT_WRITE_EN,
},
[HAL_PARTITION_PARAMETER_4] =
{
.partition_owner = HAL_FLASH_EMBEDDED,
.partition_description = "PARAMETER4",
.partition_start_addr = 0x1FA000,
.partition_length = 0x1000, //4k bytes
.partition_options = PAR_OPT_READ_EN | PAR_OPT_WRITE_EN,
},
};

/* Logic partition on flash devices for 4M bytes 512*512 */
const hal_logic_partition_t hal_partitions_4M_512x512[] =
{
[HAL_PARTITION_BOOTLOADER] =
{
.partition_owner = HAL_FLASH_EMBEDDED,
.partition_description = "Bootloader",
.partition_start_addr = 0x0000,
.partition_length = 0x1000, //4k bytes
.partition_options = PAR_OPT_READ_EN | PAR_OPT_WRITE_DIS,
},
[HAL_PARTITION_PARAMETER_1] =
{
.partition_owner = HAL_FLASH_EMBEDDED,
.partition_description = "PARAMETER1",
.partition_start_addr = 0x3F6000,
.partition_length = 0x1000, // 4k bytes
.partition_options = PAR_OPT_READ_EN | PAR_OPT_WRITE_EN,
},
[HAL_PARTITION_PARAMETER_2] =
{
.partition_owner = HAL_FLASH_EMBEDDED,
.partition_description = "PARAMETER2",
.partition_start_addr = 0x3F7000,
.partition_length = 0x2000, //8k bytes
.partition_options = PAR_OPT_READ_EN | PAR_OPT_WRITE_EN,
},
[HAL_PARTITION_APPLICATION] =
{
.partition_owner = HAL_FLASH_EMBEDDED,
.partition_description = "Application",
.partition_start_addr = 0x1000,
.partition_length = 0x7B000, //492 bytes
.partition_options = PAR_OPT_READ_EN | PAR_OPT_WRITE_EN,
},
[HAL_PARTITION_OTA_TEMP] =
{
.partition_owner = HAL_FLASH_EMBEDDED,
.partition_description = "OTA Storage",
.partition_start_addr = 0x81000,
.partition_length = 0x7B000, //492 bytes
.partition_options = PAR_OPT_READ_EN | PAR_OPT_WRITE_EN,
},
[HAL_PARTITION_PARAMETER_3] =
{
.partition_owner = HAL_FLASH_EMBEDDED,
.partition_description = "PARAMETER3",
.partition_start_addr = 0x3F9000,
.partition_length = 0x1000, //4k bytes
.partition_options = PAR_OPT_READ_EN | PAR_OPT_WRITE_EN,
},
[HAL_PARTITION_PARAMETER_4] =
{
.partition_owner = HAL_FLASH_EMBEDDED,
.partition_description = "PARAMETER4",
.partition_start_addr = 0x3FA000,
.partition_length = 0x1000, //4k bytes
.partition_options = PAR_OPT_READ_EN | PAR_OPT_WRITE_EN,
},
};

uint32_t user_rf_cal_sector_set(void)
{
flash_size_map size_map = system_get_flash_size_map();
Expand Down
3 changes: 3 additions & 0 deletions board/esp8266/k_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
#ifndef RHINO_CONFIG_MM_BLK
#define RHINO_CONFIG_MM_BLK 1
#endif
#ifndef RHINO_CONFIG_MM_BLK_SIZE
#define RHINO_CONFIG_MM_BLK_SIZE 16
#endif
#ifndef RHINO_CONFIG_MM_TLF
#define RHINO_CONFIG_MM_TLF 1
#endif
Expand Down
30 changes: 16 additions & 14 deletions framework/connectivity/coap/iotx_product_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

#include "iot_export.h"

#define IOTX_PRODUCT_KEY "vtkkbrpmxmF"
#define IOTX_DEVICE_NAME "IoTxCoAPTestDev"
#define IOTX_DEVICE_SECRET "Stk4IUErQUBc1tWRWEKWb5ACra4hFDYF"
#define IOTX_DEVICE_ID "IoTxCoAPTestDev.1"
#define IOTX_PRODUCT_KEY "vtkkbrpmxmF"
#define IOTX_DEVICE_NAME "IoTxCoAPTestDev"
#define IOTX_DEVICE_SECRET "Stk4IUErQUBc1tWRWEKWb5ACra4hFDYF"
#define IOTX_DEVICE_ID "IoTxCoAPTestDev.1"

int iotx_set_devinfo(iotx_deviceinfo_t *p_devinfo)
{
Expand All @@ -20,16 +20,18 @@ int iotx_set_devinfo(iotx_deviceinfo_t *p_devinfo)
}

memset(p_devinfo, 0x00, sizeof(iotx_deviceinfo_t));
strncpy(p_devinfo->device_id, IOTX_DEVICE_ID, IOTX_DEVICE_ID_LEN);
strncpy(p_devinfo->product_key, IOTX_PRODUCT_KEY, IOTX_PRODUCT_KEY_LEN);
strncpy(p_devinfo->device_secret, IOTX_DEVICE_SECRET, IOTX_DEVICE_SECRET_LEN);
strncpy(p_devinfo->device_name, IOTX_DEVICE_NAME, IOTX_DEVICE_NAME_LEN);

fprintf(stderr, "*****The Product Key : %s *****\r\n", p_devinfo->product_key);
fprintf(stderr, "*****The Device Name : %s *****\r\n", p_devinfo->device_name);
fprintf(stderr, "*****The Device Secret: %s *****\r\n", p_devinfo->device_secret);
fprintf(stderr, "*****The Device ID : %s *****\r\n", p_devinfo->device_id);
strncpy(p_devinfo->device_id, IOTX_DEVICE_ID, IOTX_DEVICE_ID_LEN);
strncpy(p_devinfo->product_key, IOTX_PRODUCT_KEY, IOTX_PRODUCT_KEY_LEN);
strncpy(p_devinfo->device_secret, IOTX_DEVICE_SECRET,
IOTX_DEVICE_SECRET_LEN);
strncpy(p_devinfo->device_name, IOTX_DEVICE_NAME, IOTX_DEVICE_NAME_LEN);

fprintf(stderr, "*****The Product Key : %s *****\r\n",
p_devinfo->product_key);
fprintf(stderr, "*****The Device Name : %s *****\r\n",
p_devinfo->device_name);
fprintf(stderr, "*****The Device ID : %s *****\r\n",
p_devinfo->device_id);

return IOTX_SUCCESS;
}

Loading

0 comments on commit ed7b2c9

Please sign in to comment.