Merge branch 'Test_Firmware_WINC_1.4.2'
This commit is contained in:
commit
44ecb553af
@ -1,6 +1,6 @@
|
||||
#include "WiFiCtrl.h"
|
||||
#include "string.h"
|
||||
#include "driver/source/nmasic.h"
|
||||
#include "driver/include/nmasic.h"
|
||||
#include <stdint.h>
|
||||
//#include "socket/include/socket.h"
|
||||
#include "define.h"
|
||||
@ -155,7 +155,7 @@ static void socket_cb(SOCKET sock, uint8 u8Msg, void *pvMsg)
|
||||
SendTerminalData("Bienvenue au chalet!\nLe chalet parle en anglais comme Mr. Pepin\nIf you need help... type help\n\n",strlen("Bienvenue au chalet!\nLe chalet parle en anglais comme Mr. Pepin\nIf you need help... type help\n\n"));
|
||||
// SendSyslogData("Terminal client connected\n",strlen("Terminal client connected\n"));
|
||||
printf("Terminal client connected\n");
|
||||
// m2m_periph_gpio_set_val(M2M_PERIPH_GPIO4,1);
|
||||
m2m_periph_gpio_set_val(M2M_PERIPH_GPIO4,1);
|
||||
}
|
||||
else if(sock == SyslogServerSocket)
|
||||
{
|
||||
@ -236,7 +236,7 @@ static void socket_cb(SOCKET sock, uint8 u8Msg, void *pvMsg)
|
||||
TerminalSocket = -1;
|
||||
// SendSyslogData("Terminal client disconnected\n",strlen("Terminal client disconnected\n"));
|
||||
printf("Terminal client disconnected\n");
|
||||
// m2m_periph_gpio_set_val(M2M_PERIPH_GPIO4,0);
|
||||
m2m_periph_gpio_set_val(M2M_PERIPH_GPIO4,0);
|
||||
}
|
||||
else if(sock == SyslogSocket)
|
||||
{
|
||||
@ -277,7 +277,7 @@ static void set_dev_name_to_mac(uint8 *name, uint8 *mac_addr)
|
||||
/* Name must be in the format WINC1500_00:00 */
|
||||
uint16 len;
|
||||
|
||||
len = m2m_strlen(name);
|
||||
// len = m2m_strlen(name);
|
||||
if (len >= 5) {
|
||||
name[len - 1] = MAIN_HEX2ASCII((mac_addr[5] >> 0) & 0x0f);
|
||||
name[len - 2] = MAIN_HEX2ASCII((mac_addr[5] >> 4) & 0x0f);
|
||||
@ -304,7 +304,7 @@ static void wifi_cb(uint8 u8MsgType, void *pvMsg)
|
||||
printf("Wi-Fi connected\r\n");
|
||||
|
||||
#ifndef USE_STATIC_IP
|
||||
m2m_wifi_request_dhcp_client();
|
||||
// m2m_wifi_request_dhcp_client();
|
||||
#else
|
||||
m2m_wifi_set_static_ip(&mModuleIPConfig);
|
||||
gbConnectedWifi = true;
|
||||
@ -326,7 +326,7 @@ static void wifi_cb(uint8 u8MsgType, void *pvMsg)
|
||||
|
||||
case M2M_WIFI_REQ_DHCP_CONF:
|
||||
{
|
||||
mCurIPAddress = *(uint32*)pvMsg;
|
||||
// mCurIPAddress = *(uin32*)pvMsg;
|
||||
|
||||
// unsigned char ip1,ip2,ip3,ip4;
|
||||
// ip1 = IPV4_BYTE(pu8IPAddress,0);
|
||||
@ -432,11 +432,11 @@ int InitWiFi()
|
||||
mModuleIPConfig.u32SubnetMask = IP_TO_U32(SUBNET_MASK_1,SUBNET_MASK_2,SUBNET_MASK_3,SUBNET_MASK_4);
|
||||
|
||||
/* Initialize the BSP. */
|
||||
nm_bsp_init();
|
||||
// nm_bsp_init();
|
||||
/* Initialize Wi-Fi parameters structure. */
|
||||
memset((uint8_t *)¶m, 0, sizeof(tstrWifiInitParam));
|
||||
/* Initialize Wi-Fi driver with data and status callbacks. */
|
||||
param.pfAppWifiCb = wifi_cb;
|
||||
param.pfAppWifiCb = (void*) &wifi_cb;
|
||||
ret = m2m_wifi_init(¶m);
|
||||
if (M2M_SUCCESS != ret)
|
||||
{
|
||||
@ -466,7 +466,7 @@ int InitWiFi()
|
||||
//Use the MAC to define the SSID of the module
|
||||
set_dev_name_to_mac((uint8 *)gstrM2MAPConfig.au8SSID, gau8MacAddr);
|
||||
|
||||
m2m_wifi_set_device_name((uint8 *)gacDeviceName, (uint8)m2m_strlen((uint8 *)gacDeviceName));
|
||||
// m2m_wifi_set_device_name((uint8 *)gacDeviceName, (uint8)m2m_strlen((uint8 *)gacDeviceName));
|
||||
|
||||
#ifdef USE_STATIC_IP
|
||||
//Use static ip --> disable dhcp client before connecting
|
||||
@ -581,7 +581,7 @@ void TickWiFi()
|
||||
|
||||
// if(IsTimerExpired(WIFI_TICK_TIMER))
|
||||
// {
|
||||
m2m_wifi_handle_events(NULL);
|
||||
m2m_wifi_handle_events();
|
||||
// TimerStart(WIFI_TICK_TIMER,1);
|
||||
// }
|
||||
|
||||
|
||||
@ -11,6 +11,67 @@
|
||||
#include "driver/include/m2m_wifi.h"
|
||||
#include "socket/include/socket.h"
|
||||
|
||||
/*!
|
||||
* Used for code portability.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* @typedef void (*tpfNmBspIsr) (void);
|
||||
* @brief Pointer to function.\n
|
||||
* Used as a data type of ISR function registered by \ref nm_bsp_register_isr
|
||||
* @return None
|
||||
*/
|
||||
typedef void (*tpfNmBspIsr)(void);
|
||||
|
||||
/*!
|
||||
* @ingroup DataTypes
|
||||
* @typedef unsigned char uint8;
|
||||
* @brief Range of values between 0 to 255
|
||||
*/
|
||||
typedef unsigned char uint8;
|
||||
|
||||
/*!
|
||||
* @ingroup DataTypes
|
||||
* @typedef unsigned short uint16;
|
||||
* @brief Range of values between 0 to 65535
|
||||
*/
|
||||
typedef unsigned short uint16;
|
||||
|
||||
/*!
|
||||
* @ingroup Data Types
|
||||
* @typedef unsigned long uint32;
|
||||
* @brief Range of values between 0 to 4294967295
|
||||
*/
|
||||
typedef unsigned long uint32;
|
||||
|
||||
|
||||
/*!
|
||||
* @ingroup Data Types
|
||||
* @typedef signed char sint8;
|
||||
* @brief Range of values between -128 to 127
|
||||
*/
|
||||
typedef signed char sint8;
|
||||
|
||||
/*!
|
||||
* @ingroup DataTypes
|
||||
* @typedef signed short sint16;
|
||||
* @brief Range of values between -32768 to 32767
|
||||
*/
|
||||
typedef signed short sint16;
|
||||
|
||||
/*!
|
||||
* @ingroup DataTypes
|
||||
* @typedef signed long sint32;
|
||||
* @brief Range of values between -2147483648 to 2147483647
|
||||
*/
|
||||
|
||||
typedef signed long sint32;
|
||||
//@}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
int InitWiFi();
|
||||
void TickWiFi();
|
||||
@ -120,7 +181,7 @@ int IsBootloaderClientConnected();
|
||||
#define STATIC_IP_ADDRESS_1 192
|
||||
#define STATIC_IP_ADDRESS_2 168
|
||||
#define STATIC_IP_ADDRESS_3 30
|
||||
#define STATIC_IP_ADDRESS_4 125
|
||||
#define STATIC_IP_ADDRESS_4 127
|
||||
|
||||
#define GATEWAY_ADDRESS_1 192
|
||||
#define GATEWAY_ADDRESS_2 168
|
||||
@ -188,7 +249,7 @@ static tstrM2MAPConfig gstrM2MAPConfig = {MAIN_M2M_SSID,
|
||||
MAIN_M2M_AP_SSID_MODE,
|
||||
MAIN_M2M_DHCP_SERVER_IP};
|
||||
|
||||
static CONST char gacHttpProvDomainName[] = MAIN_HTTP_PROV_SERVER_DOMAIN_NAME;
|
||||
static const char gacHttpProvDomainName[] = MAIN_HTTP_PROV_SERVER_DOMAIN_NAME;
|
||||
|
||||
static uint8 gau8MacAddr[] = MAIN_MAC_ADDRESS;
|
||||
static sint8 gacDeviceName[] = MAIN_M2M_SSID;
|
||||
|
||||
@ -100,7 +100,7 @@ enum eWiFiState
|
||||
|
||||
#define WIFI_MODULE_SPI_BAUDRATE 15000000
|
||||
|
||||
#define WIFI_CONNECT_TIMEOUT 5000 //The delay we allow the module to establish a connection.
|
||||
#define WIFI_CONNECT_TIMEOUT 10000 //The delay we allow the module to establish a connection.
|
||||
|
||||
/* ************************************************************************** */
|
||||
/* Defines */
|
||||
|
||||
@ -14,6 +14,9 @@
|
||||
Change description.
|
||||
*/
|
||||
|
||||
//JFM WINC TODO
|
||||
|
||||
|
||||
#include "define.h"
|
||||
|
||||
|
||||
@ -137,7 +140,9 @@ int main(void)
|
||||
|
||||
#ifndef NO_WIFI
|
||||
InitTerminal();
|
||||
|
||||
InitWiFi();
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
85
ChaletLora.X/Source/winc3400_142/bsp/include/nm_bsp.h
Normal file
85
ChaletLora.X/Source/winc3400_142/bsp/include/nm_bsp.h
Normal file
@ -0,0 +1,85 @@
|
||||
/*******************************************************************************
|
||||
File Name:
|
||||
nm_common.h
|
||||
|
||||
Summary:
|
||||
This module contains WINC3400 BSP APIs declarations.
|
||||
|
||||
Description:
|
||||
This module contains WINC3400 BSP APIs declarations.
|
||||
*******************************************************************************/
|
||||
|
||||
//DOM-IGNORE-BEGIN
|
||||
/*******************************************************************************
|
||||
* Copyright (C) 2021 Microchip Technology Inc. and its subsidiaries.
|
||||
*
|
||||
* Subject to your compliance with these terms, you may use Microchip software
|
||||
* and any derivatives exclusively with Microchip products. It is your
|
||||
* responsibility to comply with third party license terms applicable to your
|
||||
* use of third party software (including open source software) that may
|
||||
* accompany Microchip software.
|
||||
*
|
||||
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
|
||||
* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
|
||||
* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
|
||||
* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
|
||||
* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
|
||||
* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
|
||||
* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
|
||||
* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
|
||||
* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
|
||||
*******************************************************************************/
|
||||
//DOM-IGNORE-END
|
||||
|
||||
/** @defgroup nm_bsp BSP
|
||||
@brief
|
||||
Description of the BSP (<strong>B</strong>oard <strong>S</strong>upport <strong>P</strong>ackage) module.
|
||||
@{
|
||||
@defgroup DataT Data Types
|
||||
@defgroup BSPDefine Defines
|
||||
@defgroup BSPAPI Functions
|
||||
@brief
|
||||
Lists the available BSP (<strong>B</strong>oard <strong>S</strong>upport <strong>P</strong>ackage) APIs.
|
||||
@}
|
||||
*/
|
||||
|
||||
/**@addtogroup BSPDefine
|
||||
@{
|
||||
*/
|
||||
#ifndef _NM_BSP_H_
|
||||
#define _NM_BSP_H_
|
||||
|
||||
#define BSP_MIN(x,y) ((x)>(y)?(y):(x))
|
||||
/*!<
|
||||
* Computes the minimum value between \b x and \b y.
|
||||
*/
|
||||
/**@}*/ //BSPDefine
|
||||
|
||||
/**
|
||||
* @addtogroup BSPDefine
|
||||
* @{
|
||||
*/
|
||||
|
||||
#ifdef _NM_BSP_BIG_END
|
||||
/*! Switch endianness of 32bit word (In the case that Host is BE) */
|
||||
#define NM_BSP_B_L_32(x) \
|
||||
((((x) & 0x000000FF) << 24) + \
|
||||
(((x) & 0x0000FF00) << 8) + \
|
||||
(((x) & 0x00FF0000) >> 8) + \
|
||||
(((x) & 0xFF000000) >> 24))
|
||||
/*! Switch endianness of 16bit word (In the case that Host is BE) */
|
||||
#define NM_BSP_B_L_16(x) \
|
||||
((((x) & 0x00FF) << 8) + \
|
||||
(((x) & 0xFF00) >> 8))
|
||||
#else
|
||||
/*! Retain endianness of 32bit word (In the case that Host is LE) */
|
||||
#define NM_BSP_B_L_32(x) (x)
|
||||
/*! Retain endianness of 16bit word (In the case that Host is LE) */
|
||||
#define NM_BSP_B_L_16(x) (x)
|
||||
#endif
|
||||
/**@}*/ //BSPDefine
|
||||
|
||||
#endif /*_NM_BSP_H_*/
|
||||
172
ChaletLora.X/Source/winc3400_142/common/include/nm_common.h
Normal file
172
ChaletLora.X/Source/winc3400_142/common/include/nm_common.h
Normal file
@ -0,0 +1,172 @@
|
||||
/*******************************************************************************
|
||||
File Name:
|
||||
nm_common.h
|
||||
|
||||
Summary:
|
||||
This module contains common APIs declarations.
|
||||
|
||||
Description:
|
||||
This module contains common APIs declarations.
|
||||
*******************************************************************************/
|
||||
|
||||
//DOM-IGNORE-BEGIN
|
||||
/*******************************************************************************
|
||||
* Copyright (C) 2021 Microchip Technology Inc. and its subsidiaries.
|
||||
*
|
||||
* Subject to your compliance with these terms, you may use Microchip software
|
||||
* and any derivatives exclusively with Microchip products. It is your
|
||||
* responsibility to comply with third party license terms applicable to your
|
||||
* use of third party software (including open source software) that may
|
||||
* accompany Microchip software.
|
||||
*
|
||||
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
|
||||
* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
|
||||
* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
|
||||
* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
|
||||
* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
|
||||
* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
|
||||
* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
|
||||
* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
|
||||
* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
|
||||
*******************************************************************************/
|
||||
//DOM-IGNORE-END
|
||||
|
||||
/** @defgroup COMMON Common
|
||||
@{
|
||||
@defgroup COMMONDEF Defines
|
||||
@defgroup COMMONAPI Functions
|
||||
@}
|
||||
*/
|
||||
|
||||
#ifndef _NM_COMMON_H_
|
||||
#define _NM_COMMON_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include "define.h"
|
||||
#include "nm_bsp.h"
|
||||
#include "nm_debug.h"
|
||||
|
||||
/**@addtogroup COMMONDEF
|
||||
* @{
|
||||
*/
|
||||
|
||||
/*states*/
|
||||
#define M2M_SUCCESS ((int8_t)0)
|
||||
#define M2M_ERR_SEND ((int8_t)-1)
|
||||
#define M2M_ERR_RCV ((int8_t)-2)
|
||||
#define M2M_ERR_MEM_ALLOC ((int8_t)-3)
|
||||
#define M2M_ERR_TIME_OUT ((int8_t)-4)
|
||||
#define M2M_ERR_INIT ((int8_t)-5)
|
||||
#define M2M_ERR_BUS_FAIL ((int8_t)-6)
|
||||
#define M2M_NOT_YET ((int8_t)-7)
|
||||
#define M2M_ERR_FIRMWARE ((int8_t)-8)
|
||||
#define M2M_SPI_FAIL ((int8_t)-9)
|
||||
#define M2M_ERR_FIRMWARE_bURN ((int8_t)-10)
|
||||
#define M2M_ACK ((int8_t)-11)
|
||||
#define M2M_ERR_FAIL ((int8_t)-12)
|
||||
#define M2M_ERR_FW_VER_MISMATCH ((int8_t)-13)
|
||||
#define M2M_ERR_SCAN_IN_PROGRESS ((int8_t)-14)
|
||||
#define M2M_ERR_INVALID_ARG ((int8_t)-15)
|
||||
|
||||
#define NBIT31 (0x80000000)
|
||||
#define NBIT30 (0x40000000)
|
||||
#define NBIT29 (0x20000000)
|
||||
#define NBIT28 (0x10000000)
|
||||
#define NBIT27 (0x08000000)
|
||||
#define NBIT26 (0x04000000)
|
||||
#define NBIT25 (0x02000000)
|
||||
#define NBIT24 (0x01000000)
|
||||
#define NBIT23 (0x00800000)
|
||||
#define NBIT22 (0x00400000)
|
||||
#define NBIT21 (0x00200000)
|
||||
#define NBIT20 (0x00100000)
|
||||
#define NBIT19 (0x00080000)
|
||||
#define NBIT18 (0x00040000)
|
||||
#define NBIT17 (0x00020000)
|
||||
#define NBIT16 (0x00010000)
|
||||
#define NBIT15 (0x00008000)
|
||||
#define NBIT14 (0x00004000)
|
||||
#define NBIT13 (0x00002000)
|
||||
#define NBIT12 (0x00001000)
|
||||
#define NBIT11 (0x00000800)
|
||||
#define NBIT10 (0x00000400)
|
||||
#define NBIT9 (0x00000200)
|
||||
#define NBIT8 (0x00000100)
|
||||
#define NBIT7 (0x00000080)
|
||||
#define NBIT6 (0x00000040)
|
||||
#define NBIT5 (0x00000020)
|
||||
#define NBIT4 (0x00000010)
|
||||
#define NBIT3 (0x00000008)
|
||||
#define NBIT2 (0x00000004)
|
||||
#define NBIT1 (0x00000002)
|
||||
#define NBIT0 (0x00000001)
|
||||
|
||||
#ifndef BIG_ENDIAN
|
||||
/*! Most significant byte of 32bit word (LE) */
|
||||
#define BYTE_0(word) ((uint8_t)(((word) >> 0) & 0x000000FFUL))
|
||||
/*! Second most significant byte of 32bit word (LE) */
|
||||
#define BYTE_1(word) ((uint8_t)(((word) >> 8) & 0x000000FFUL))
|
||||
/*! Third most significant byte of 32bit word (LE) */
|
||||
#define BYTE_2(word) ((uint8_t)(((word) >> 16) & 0x000000FFUL))
|
||||
/*! Least significant byte of 32bit word (LE) */
|
||||
#define BYTE_3(word) ((uint8_t)(((word) >> 24) & 0x000000FFUL))
|
||||
#else
|
||||
/*! Most significant byte of 32bit word (BE) */
|
||||
#define BYTE_0(word) ((uint8_t)(((word) >> 24) & 0x000000FFUL))
|
||||
/*! Second most significant byte of 32bit word (BE) */
|
||||
#define BYTE_1(word) ((uint8_t)(((word) >> 16) & 0x000000FFUL))
|
||||
/*! Third most significant byte of 32bit word (BE) */
|
||||
#define BYTE_2(word) ((uint8_t)(((word) >> 8) & 0x000000FFUL))
|
||||
/*! Least significant byte of 32bit word (BE) */
|
||||
#define BYTE_3(word) ((uint8_t)(((word) >> 0) & 0x000000FFUL))
|
||||
#endif
|
||||
/**@}*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*!
|
||||
* @ingroup COMMONAPI
|
||||
* @fn int8_t hexstr_2_bytes(uint8_t *pu8Out, uint8_t *pu8In, uint8_t u8SizeOut);
|
||||
* @brief Converts a string of hex characters to bytes.
|
||||
* @param[out] pu8Out
|
||||
* Output buffer (eg {0x11, 0x12, 0x13,...})
|
||||
* @param[in] pu8In
|
||||
* Input buffer (eg {0x31, 0x31, 0x31, 0x32, 0x31, 0x33, ...})
|
||||
* @param[in] u8SizeOut
|
||||
* Length of output buffer (should be half of the length of the input buffer).
|
||||
* @return @ref M2M_SUCCESS if successful, M2M_ERR_INVALID_ARG otherwise (eg unrecognised hexchar in input).
|
||||
*/
|
||||
int8_t hexstr_2_bytes(uint8_t *pu8Out, uint8_t *pu8In, uint8_t u8SizeOut);
|
||||
|
||||
/*!
|
||||
* @fn void nm_sleep(uint32_t u32TimeMsec);
|
||||
* @brief Used to put the host to sleep for the specified duration (in milliseconds).
|
||||
* Forcing the host to sleep for extended period may lead to host not being able to respond
|
||||
* to WINC board events. It is important to be considerate while choosing the sleep period.
|
||||
* @param [in] u32TimeMsec
|
||||
* Time unit in milliseconds.
|
||||
* @pre Initialize @ref nm_bsp_init first.
|
||||
* @note Implementation of this function is host dependent.
|
||||
* @warning Maximum value must nor exceed 4294967295 milliseconds which is equal to 4294967.295 seconds.
|
||||
* @see nm_bsp_init
|
||||
* @return None
|
||||
*/
|
||||
void nm_sleep(uint32_t u32TimeMsec);
|
||||
|
||||
/*!
|
||||
* @ingroup COMMONAPI
|
||||
* @fn nm_reset
|
||||
* @brief Reset NMC3400 SoC by setting CHIP_EN and RESET_N signals low,
|
||||
* CHIP_EN high then RESET_N high
|
||||
*/
|
||||
void nm_reset(void);
|
||||
/**@}*/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /*_NM_COMMON_H_*/
|
||||
60
ChaletLora.X/Source/winc3400_142/common/include/nm_debug.h
Normal file
60
ChaletLora.X/Source/winc3400_142/common/include/nm_debug.h
Normal file
@ -0,0 +1,60 @@
|
||||
/*******************************************************************************
|
||||
File Name:
|
||||
nm_debug.h
|
||||
|
||||
Summary:
|
||||
This module contains debug API declarations.
|
||||
|
||||
Description:
|
||||
This module contains debug API declarations.
|
||||
*******************************************************************************/
|
||||
|
||||
//DOM-IGNORE-BEGIN
|
||||
/*******************************************************************************
|
||||
* Copyright (C) 2021 Microchip Technology Inc. and its subsidiaries.
|
||||
*
|
||||
* Subject to your compliance with these terms, you may use Microchip software
|
||||
* and any derivatives exclusively with Microchip products. It is your
|
||||
* responsibility to comply with third party license terms applicable to your
|
||||
* use of third party software (including open source software) that may
|
||||
* accompany Microchip software.
|
||||
*
|
||||
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
|
||||
* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
|
||||
* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
|
||||
* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
|
||||
* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
|
||||
* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
|
||||
* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
|
||||
* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
|
||||
* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
|
||||
*******************************************************************************/
|
||||
|
||||
#ifndef _NM_DEBUG_H_
|
||||
#define _NM_DEBUG_H_
|
||||
|
||||
|
||||
//#include "wdrv_winc_debug.h" //JFM replaced include by direct definitions below
|
||||
#define WDRV_DBG_VERBOSE_PRINT(...)
|
||||
#define WDRV_DBG_TRACE_PRINT(...)
|
||||
#define WDRV_DBG_INFORM_PRINT(...)
|
||||
#define WDRV_DBG_ERROR_PRINT(...)
|
||||
|
||||
/**
|
||||
* @defgroup DebugDefines DebugDefines
|
||||
* @ingroup WlanDefines
|
||||
*/
|
||||
|
||||
/**@{*/
|
||||
|
||||
#define M2M_ERR(...) WDRV_DBG_ERROR_PRINT(__VA_ARGS__)
|
||||
#define M2M_INFO(...) WDRV_DBG_INFORM_PRINT(__VA_ARGS__)
|
||||
#define M2M_DBG(...) WDRV_DBG_VERBOSE_PRINT(__VA_ARGS__)
|
||||
#define M2M_PRINT(...) WDRV_DBG_VERBOSE_PRINT(__VA_ARGS__)
|
||||
|
||||
/**@}*/
|
||||
|
||||
#endif /* _NM_DEBUG_H_ */
|
||||
114
ChaletLora.X/Source/winc3400_142/common/source/nm_common.c
Normal file
114
ChaletLora.X/Source/winc3400_142/common/source/nm_common.c
Normal file
@ -0,0 +1,114 @@
|
||||
/*******************************************************************************
|
||||
File Name:
|
||||
nm_common.c
|
||||
|
||||
Summary:
|
||||
This module contains common APIs implementations.
|
||||
|
||||
Description:
|
||||
This module contains common APIs implementations.
|
||||
*******************************************************************************/
|
||||
|
||||
//DOM-IGNORE-BEGIN
|
||||
/*******************************************************************************
|
||||
* Copyright (C) 2021 Microchip Technology Inc. and its subsidiaries.
|
||||
*
|
||||
* Subject to your compliance with these terms, you may use Microchip software
|
||||
* and any derivatives exclusively with Microchip products. It is your
|
||||
* responsibility to comply with third party license terms applicable to your
|
||||
* use of third party software (including open source software) that may
|
||||
* accompany Microchip software.
|
||||
*
|
||||
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
|
||||
* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
|
||||
* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
|
||||
* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
|
||||
* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
|
||||
* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
|
||||
* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
|
||||
* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
|
||||
* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
|
||||
*******************************************************************************/
|
||||
|
||||
#include "nm_common.h"
|
||||
#include "timer.h"
|
||||
#include "BoardCfg.h"
|
||||
//#include "wdrv_winc_common.h"
|
||||
//#include "wdrv_winc_gpio.h"
|
||||
|
||||
|
||||
|
||||
void __ISR(_EXTERNAL_0_VECTOR , ipl3) chip_isr(void)
|
||||
//static void chip_isr(void)
|
||||
{
|
||||
//JFM WINC LOW LEVEL
|
||||
//JFM à valider si ça fuck pas la patente vu qu'on est en interrupt...
|
||||
//m2m_wifi_handle_events();
|
||||
|
||||
IFS0bits.INT0IF = 0;
|
||||
}
|
||||
|
||||
/*!
|
||||
* @fn nm_sleep
|
||||
* @brief Sleep in units of mSec
|
||||
* @param[IN] u32TimeMsec
|
||||
* Time in milliseconds
|
||||
*/
|
||||
void nm_sleep(uint32_t u32TimeMsec)
|
||||
{
|
||||
Sleep(u32TimeMsec);
|
||||
}
|
||||
|
||||
/*!
|
||||
* @fn nm_reset
|
||||
* @brief Reset NMC3400 SoC by setting CHIP_EN and RESET_N signals low,
|
||||
* CHIP_EN high then RESET_N high
|
||||
*/
|
||||
void nm_reset(void)
|
||||
{
|
||||
//JFM WINC LOW LEVEL
|
||||
WIFI_CHP_EN_PIN = 0;
|
||||
WIFI_CHP_RST_PIN = 0;
|
||||
// Sleep(1); //JFM
|
||||
Sleep(100);
|
||||
WIFI_CHP_EN_PIN = 1;
|
||||
// Sleep(5); JFM
|
||||
Sleep(150);
|
||||
WIFI_CHP_RST_PIN = 1;
|
||||
}
|
||||
|
||||
/* Convert hexchar to value 0-15 */
|
||||
static uint8_t hexchar_2_val(uint8_t ch)
|
||||
{
|
||||
ch -= 0x30;
|
||||
if (ch <= 9)
|
||||
return ch;
|
||||
ch |= 0x20;
|
||||
ch -= 0x31;
|
||||
if (ch <= 5)
|
||||
return ch + 10;
|
||||
return 0xFF;
|
||||
}
|
||||
|
||||
/* Convert hexstring to bytes */
|
||||
int8_t hexstr_2_bytes(uint8_t *pu8Out, uint8_t *pu8In, uint8_t u8SizeOut)
|
||||
{
|
||||
while(u8SizeOut--)
|
||||
{
|
||||
uint8_t u8Out = hexchar_2_val(*pu8In++);
|
||||
if (u8Out > 0xF)
|
||||
return M2M_ERR_INVALID_ARG;
|
||||
*pu8Out = u8Out * 0x10;
|
||||
u8Out = hexchar_2_val(*pu8In++);
|
||||
if (u8Out > 0xF)
|
||||
return M2M_ERR_INVALID_ARG;
|
||||
*pu8Out += u8Out;
|
||||
pu8Out++;
|
||||
}
|
||||
return M2M_SUCCESS;
|
||||
}
|
||||
|
||||
//DOM-IGNORE-END
|
||||
300
ChaletLora.X/Source/winc3400_142/driver/include/ecc_types.h
Normal file
300
ChaletLora.X/Source/winc3400_142/driver/include/ecc_types.h
Normal file
@ -0,0 +1,300 @@
|
||||
/*******************************************************************************
|
||||
File Name:
|
||||
ecc_types.h
|
||||
|
||||
Summary:
|
||||
Elliptic Curve Cryptography Module Interface.
|
||||
|
||||
Description:
|
||||
Elliptic Curve Cryptography Module Interface.
|
||||
*******************************************************************************/
|
||||
|
||||
//DOM-IGNORE-BEGIN
|
||||
/*******************************************************************************
|
||||
* Copyright (C) 2021 Microchip Technology Inc. and its subsidiaries.
|
||||
*
|
||||
* Subject to your compliance with these terms, you may use Microchip software
|
||||
* and any derivatives exclusively with Microchip products. It is your
|
||||
* responsibility to comply with third party license terms applicable to your
|
||||
* use of third party software (including open source software) that may
|
||||
* accompany Microchip software.
|
||||
*
|
||||
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
|
||||
* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
|
||||
* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
|
||||
* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
|
||||
* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
|
||||
* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
|
||||
* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
|
||||
* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
|
||||
* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
|
||||
*******************************************************************************/
|
||||
|
||||
#ifndef __ECC_TYPES_H__
|
||||
#define __ECC_TYPES_H__
|
||||
|
||||
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
|
||||
INCLUDES
|
||||
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
|
||||
|
||||
#include "m2m_types.h"
|
||||
|
||||
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
|
||||
MACROS
|
||||
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
|
||||
|
||||
|
||||
|
||||
#define ECC_LARGEST_CURVE_SIZE (32)
|
||||
/*!<
|
||||
The size of the the largest supported EC. For now, assuming
|
||||
the 256-bit EC is the largest supported curve type.
|
||||
*/
|
||||
|
||||
|
||||
#define ECC_POINT_MAX_SIZE ECC_LARGEST_CURVE_SIZE
|
||||
/*!<
|
||||
Maximum size of one coordinate of an EC point.
|
||||
*/
|
||||
|
||||
|
||||
#define ECC_POINT_MAX_SIZE_WORDS (ECC_POINT_MAX_SIZE / 4)
|
||||
/*!<
|
||||
SIZE in 32-bit words.
|
||||
*/
|
||||
|
||||
|
||||
#define ECC_NUM_SUPP_CURVES ((sizeof(gastrECCSuppList)) / (sizeof(tstrEllipticCurve)))
|
||||
/*!<
|
||||
*/
|
||||
|
||||
|
||||
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
|
||||
DATA TYPES
|
||||
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
|
||||
|
||||
/**@addtogroup SSLEnums
|
||||
* @{
|
||||
*/
|
||||
/*!
|
||||
@enum \
|
||||
tenuEcNamedCurve
|
||||
|
||||
@brief EC Named Curves
|
||||
|
||||
Defines a list of supported ECC named curves.
|
||||
*/
|
||||
typedef enum EcNamedCurve{
|
||||
EC_SECP192R1 = 19,
|
||||
/*!<
|
||||
It is defined by NIST as P192 and by the SEC Group as secp192r1.
|
||||
*/
|
||||
EC_SECP256R1 = 23,
|
||||
/*!<
|
||||
It is defined by NIST as P256 and by the SEC Group as secp256r1.
|
||||
*/
|
||||
EC_SECP384R1 = 24,
|
||||
/*!<
|
||||
It is defined by NIST as P384 and by the SEC Group as secp384r1.
|
||||
*/
|
||||
EC_SECP521R1 = 25,
|
||||
/*!<
|
||||
It is defined by NIST as P521 and by the SEC Group as secp521r1.
|
||||
*/
|
||||
EC_UNKNOWN = 255
|
||||
}tenuEcNamedCurve;
|
||||
|
||||
|
||||
/*!
|
||||
@struct \
|
||||
tstrECPoint
|
||||
|
||||
@brief Elliptic Curve point representation
|
||||
*/
|
||||
typedef struct EcPoint{
|
||||
uint8_t X[ECC_POINT_MAX_SIZE];
|
||||
/*!<
|
||||
The X-coordinate of the ec point.
|
||||
*/
|
||||
uint8_t Y[ECC_POINT_MAX_SIZE];
|
||||
/*!<
|
||||
The Y-coordinate of the ec point.
|
||||
*/
|
||||
uint16_t u16Size;
|
||||
/*!<
|
||||
Point size in bytes (for each of the coordinates).
|
||||
*/
|
||||
uint16_t u16PrivKeyID;
|
||||
/*!<
|
||||
ID for the corresponding private key.
|
||||
*/
|
||||
}tstrECPoint;
|
||||
|
||||
|
||||
/*!
|
||||
@struct \
|
||||
tstrECDomainParam
|
||||
|
||||
@brief ECC Curve Domain Parameters
|
||||
|
||||
The structure defines the ECC domain parameters for curves defined over prime finite fields.
|
||||
*/
|
||||
typedef struct EcDomainParam{
|
||||
uint32_t p[ECC_POINT_MAX_SIZE_WORDS];
|
||||
uint32_t a[ECC_POINT_MAX_SIZE_WORDS];
|
||||
uint32_t b[ECC_POINT_MAX_SIZE_WORDS];
|
||||
tstrECPoint G;
|
||||
}tstrECDomainParam;
|
||||
|
||||
|
||||
/*!
|
||||
@struct \
|
||||
tstrEllipticCurve
|
||||
|
||||
@brief
|
||||
Definition of an elliptic curve
|
||||
*/
|
||||
typedef struct{
|
||||
tenuEcNamedCurve enuType;
|
||||
tstrECDomainParam strParam;
|
||||
}tstrEllipticCurve;
|
||||
|
||||
/*!
|
||||
@enum \
|
||||
tenuEccREQ
|
||||
|
||||
@brief ECC operations that may be requested by WINC.
|
||||
|
||||
These are passed in the u16REQ field of @ref tstrEccReqInfo, which is used in both the request
|
||||
from the WINC and the response to the WINC.
|
||||
*/
|
||||
typedef enum{
|
||||
ECC_REQ_NONE,
|
||||
/*!< */
|
||||
ECC_REQ_CLIENT_ECDH,
|
||||
/*!<
|
||||
Derive the shared secret from ECDHE key exchange as client.
|
||||
*/
|
||||
ECC_REQ_SERVER_ECDH,
|
||||
/*!<
|
||||
Derive the shared secret from ECDHE key exchange as server.
|
||||
*/
|
||||
ECC_REQ_GEN_KEY,
|
||||
/*!<
|
||||
Generate a key pair to be used in ECDHE key exchange as server.
|
||||
*/
|
||||
ECC_REQ_SIGN_GEN,
|
||||
/*!<
|
||||
Generate the signature for a given curve and value. The value needs to be retrieved via
|
||||
@ref m2m_ssl_retrieve_hash.
|
||||
*/
|
||||
ECC_REQ_SIGN_VERIFY
|
||||
/*!<
|
||||
Verify a list of signatures. Each set of value/signature/key/curve information needs to be
|
||||
retrieved via @ref m2m_ssl_retrieve_next_for_verifying.
|
||||
*/
|
||||
}tenuEccREQ;
|
||||
|
||||
/*!
|
||||
@struct \
|
||||
tstrEcdhReqInfo
|
||||
|
||||
@brief Information relating to operations of type @ref ECC_REQ_CLIENT_ECDH, @ref ECC_REQ_GEN_KEY
|
||||
and @ref ECC_REQ_SERVER_ECDH.
|
||||
*/
|
||||
typedef struct{
|
||||
tstrECPoint strPubKey;
|
||||
/*!<
|
||||
Public key. Usage depends on type of operation.
|
||||
*/
|
||||
uint8_t au8Key[ECC_POINT_MAX_SIZE];
|
||||
/*!<
|
||||
Pre master secret generated during operations of type @ref ECC_REQ_CLIENT_ECDH and
|
||||
@ref ECC_REQ_SERVER_ECDH.
|
||||
*/
|
||||
}tstrEcdhReqInfo;
|
||||
|
||||
/*!
|
||||
@struct \
|
||||
tstrEcdsaVerifyReqInfo
|
||||
|
||||
@brief Information relating to requests of type @ref ECC_REQ_SIGN_VERIFY.
|
||||
*/
|
||||
typedef struct{
|
||||
uint32_t u32nSig;
|
||||
/*!<
|
||||
Number of sets of value/signature/key/curve information for verifying. Each set needs to be
|
||||
retrieved via @ref m2m_ssl_retrieve_next_for_verifying.
|
||||
*/
|
||||
}tstrEcdsaVerifyReqInfo;
|
||||
|
||||
/*!
|
||||
@struct \
|
||||
tstrEcdsaSignReqInfo
|
||||
|
||||
@brief Information relating to requests of type @ref ECC_REQ_SIGN_GEN.
|
||||
*/
|
||||
typedef struct{
|
||||
uint16_t u16CurveType;
|
||||
/*!<
|
||||
The named curve to be used for signing, to be cast to type @ref tenuEcNamedCurve.
|
||||
*/
|
||||
uint16_t u16HashSz;
|
||||
/*!<
|
||||
The size of the value to be signed. The value needs to be retrieved via
|
||||
@ref m2m_ssl_retrieve_hash.
|
||||
*/
|
||||
}tstrEcdsaSignReqInfo;
|
||||
|
||||
/*!
|
||||
@struct \
|
||||
tstrEccReqInfo
|
||||
|
||||
@brief Information relating to ECC operations.
|
||||
|
||||
This is used in both the request from the WINC and the response to the WINC.
|
||||
*/
|
||||
typedef struct{
|
||||
uint16_t u16REQ;
|
||||
/*!<
|
||||
The requested ECC operation, to be cast to type @ref tenuEccREQ.
|
||||
*/
|
||||
uint16_t u16Status;
|
||||
/*!<
|
||||
The status of the operation: zero for success; non-zero for failure.
|
||||
This field should be used in responses and ignored in requests.
|
||||
*/
|
||||
uint32_t u32UserData;
|
||||
/*!<
|
||||
This value is used internally. The value set in the response must match the value received
|
||||
in the request.
|
||||
*/
|
||||
uint32_t u32SeqNo;
|
||||
/*!<
|
||||
This value is used internally. The value set in the response must match the value received
|
||||
in the request.
|
||||
*/
|
||||
union{
|
||||
tstrEcdhReqInfo strEcdhREQ;
|
||||
/*!<
|
||||
Information relating to an operation of type @ref ECC_REQ_CLIENT_ECDH,
|
||||
@ref ECC_REQ_GEN_KEY or @ref ECC_REQ_SERVER_ECDH.
|
||||
*/
|
||||
tstrEcdsaSignReqInfo strEcdsaSignREQ;
|
||||
/*!<
|
||||
Information relating to an operation of type @ref ECC_REQ_SIGN_GEN.
|
||||
This field is used in requests and ignored in responses.
|
||||
*/
|
||||
tstrEcdsaVerifyReqInfo strEcdsaVerifyREQ;
|
||||
/*!<
|
||||
Information relating to an operation of type @ref ECC_REQ_SIGN_VERIFY.
|
||||
This field is used in requests and ignored in responses.
|
||||
*/
|
||||
};
|
||||
}tstrEccReqInfo;
|
||||
/**@}*/ //SSLEnums
|
||||
|
||||
#endif /* __ECC_TYPES_H__ */
|
||||
188
ChaletLora.X/Source/winc3400_142/driver/include/m2m_flash.h
Normal file
188
ChaletLora.X/Source/winc3400_142/driver/include/m2m_flash.h
Normal file
@ -0,0 +1,188 @@
|
||||
/*******************************************************************************
|
||||
WINC Flash Interface.
|
||||
|
||||
File Name:
|
||||
m2m_flash.h
|
||||
|
||||
Summary:
|
||||
WINC Flash Interface
|
||||
|
||||
Description:
|
||||
WINC Flash Interface
|
||||
|
||||
*******************************************************************************/
|
||||
|
||||
//DOM-IGNORE-BEGIN
|
||||
/*******************************************************************************
|
||||
* Copyright (C) 2021 Microchip Technology Inc. and its subsidiaries.
|
||||
*
|
||||
* Subject to your compliance with these terms, you may use Microchip software
|
||||
* and any derivatives exclusively with Microchip products. It is your
|
||||
* responsibility to comply with third party license terms applicable to your
|
||||
* use of third party software (including open source software) that may
|
||||
* accompany Microchip software.
|
||||
*
|
||||
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
|
||||
* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
|
||||
* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
|
||||
* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
|
||||
* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
|
||||
* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
|
||||
* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
|
||||
* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
|
||||
* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
|
||||
*******************************************************************************/
|
||||
// DOM-IGNORE-END
|
||||
|
||||
/**@defgroup FLASHAPI Flash
|
||||
*/
|
||||
|
||||
#ifndef __M2M_FLASH_H__
|
||||
#define __M2M_FLASH_H__
|
||||
|
||||
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
|
||||
INCLUDES
|
||||
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
|
||||
#include "nm_common.h"
|
||||
#include "m2m_types.h"
|
||||
|
||||
/**@defgroup FlashEnums Enumeration/Typedefs
|
||||
* @ingroup FLASHAPI
|
||||
* @{*/
|
||||
|
||||
/*!
|
||||
@enum tenuWincFlashRegion
|
||||
|
||||
@brief The regions of WINC flash available for accessing.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
/*! Access to the entire flash address space. */
|
||||
WINC_FLASH_REGION_RAW,
|
||||
/*! Access to the active firmware region. */
|
||||
WINC_FLASH_REGION_FIRMWARE_ACTIVE,
|
||||
/*! Access to the inactive firmware region. */
|
||||
WINC_FLASH_REGION_FIRMWARE_INACTIVE,
|
||||
/*! Access to PLL table region. Erase is not supported for this region. */
|
||||
WINC_FLASH_REGION_PLL_TABLE,
|
||||
/*! Access to gain table region. Erase is not supported for this region. */
|
||||
WINC_FLASH_REGION_GAIN_TABLE,
|
||||
/*! Access to PLL and gain tables region. Erase is supported for this region. */
|
||||
WINC_FLASH_REGION_PLL_AND_GAIN_TABLES,
|
||||
/*! Access to TLS root certificate region. */
|
||||
WINC_FLASH_REGION_ROOT_CERTS,
|
||||
/*! Access to TLS local certificate region. */
|
||||
WINC_FLASH_REGION_LOCAL_CERTS,
|
||||
/*! Access to connection parameters region. */
|
||||
WINC_FLASH_REGION_CONN_PARAM,
|
||||
/*! Access to HTTP files region. This region is also erased/written by erase/write of firmware regions. */
|
||||
WINC_FLASH_REGION_HTTP_FILES,
|
||||
/*! Number of regions. */
|
||||
WINC_FLASH_NUM_REGIONS
|
||||
} tenuWincFlashRegion;
|
||||
|
||||
/**@}
|
||||
*/
|
||||
|
||||
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
|
||||
FUNCTION PROTOTYPES
|
||||
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
|
||||
/** \defgroup FLASHFUNCTIONS Functions
|
||||
* @ingroup FLASHAPI
|
||||
*/
|
||||
/**@{*/
|
||||
|
||||
/*!
|
||||
@fn \
|
||||
int8_t m2m_flash_erase_sector(tenuWincFlashRegion enuRegion, uint8_t u8StartSector, uint8_t u8NumSectors);
|
||||
|
||||
@brief Erase one or more sectors within a WINC flash region.
|
||||
|
||||
@param [in] enuRegion
|
||||
Region of flash in which to erase.
|
||||
@param [in] u8StartSector
|
||||
Sector offset (within region) of first sector to erase.
|
||||
@param [in] u8NumSectors
|
||||
Number of sectors to erase.
|
||||
|
||||
@return M2M_SUCCESS - The erase completed successfully.
|
||||
M2M_ERR_INVALID_ARG - The parameters were invalid.
|
||||
M2M_ERR_FAIL - The request encountered an error.
|
||||
|
||||
@pre The WINC must have been initialised but must not be running. This can be done via
|
||||
@ref m2m_wifi_init_hold, @ref m2m_wifi_reinit_hold or @ref m2m_wifi_download_mode.
|
||||
|
||||
*/
|
||||
int8_t m2m_flash_erase_sector(tenuWincFlashRegion enuRegion, uint8_t u8StartSector, uint8_t u8NumSectors);
|
||||
|
||||
/*!
|
||||
@fn \
|
||||
int8_t m2m_flash_write(tenuWincFlashRegion enuRegion, void *pvBuffer, uint32_t u32Offset, uint32_t u32Size);
|
||||
|
||||
@brief Write the number of bytes specified to a WINC flash location.
|
||||
|
||||
@param [in] enuRegion
|
||||
Region of flash in which to write.
|
||||
@param [in] pvBuffer
|
||||
Pointer to buffer containing the data to write.
|
||||
@param [in] u32Offset
|
||||
Byte offset (within region) of write location.
|
||||
@param [in] u32Size
|
||||
Number of bytes to write.
|
||||
|
||||
@return M2M_SUCCESS - The write completed successfully.
|
||||
M2M_ERR_INVALID_ARG - The parameters were invalid.
|
||||
M2M_ERR_FAIL - The request encountered an error.
|
||||
|
||||
@pre The WINC must have been initialised but must not be running. This can be done via
|
||||
@ref m2m_wifi_init_hold, @ref m2m_wifi_reinit_hold or @ref m2m_wifi_download_mode.
|
||||
|
||||
@warning The write operation does not erase the flash device first, therefore the user
|
||||
must ensure the flash region has been erased first.
|
||||
*/
|
||||
int8_t m2m_flash_write(tenuWincFlashRegion enuRegion, void *pvBuffer, uint32_t u32Offset, uint32_t u32Size);
|
||||
|
||||
/*!
|
||||
@fn \
|
||||
int8_t m2m_flash_read(tenuWincFlashRegion enuRegion, void *pvBuffer, uint32_t u32Offset, uint32_t u32Size);
|
||||
|
||||
@brief Read the number of bytes specified from a WINC flash location.
|
||||
|
||||
@param [in] enuRegion
|
||||
Region of flash from which to read.
|
||||
@param [out] pvBuffer
|
||||
Pointer to buffer to populate with the data being read.
|
||||
@param [in] u32Offset
|
||||
Byte offset (within region) of read location.
|
||||
@param [in] u32Size
|
||||
Number of bytes to read.
|
||||
|
||||
@return M2M_SUCCESS - The read completed successfully.
|
||||
M2M_ERR_INVALID_ARG - The parameters were invalid.
|
||||
M2M_ERR_FAIL - The request encountered an error.
|
||||
|
||||
@pre The WINC must have been initialised but must not be running. This can be done via
|
||||
@ref m2m_wifi_init_hold, @ref m2m_wifi_reinit_hold or @ref m2m_wifi_download_mode.
|
||||
*/
|
||||
int8_t m2m_flash_read(tenuWincFlashRegion enuRegion, void *pvBuffer, uint32_t u32Offset, uint32_t u32Size);
|
||||
|
||||
/*!
|
||||
@fn \
|
||||
int8_t m2m_flash_switch_firmware(void);
|
||||
|
||||
@brief Switch the active and inactive firmware images.
|
||||
|
||||
@return M2M_SUCCESS - The firmware switch completed successfully.
|
||||
M2M_ERR_FAIL - The request encountered an error.
|
||||
|
||||
@pre The WINC must have been initialised but must not be running. This can be done via
|
||||
@ref m2m_wifi_init_hold, @ref m2m_wifi_reinit_hold or @ref m2m_wifi_download_mode.
|
||||
|
||||
*/
|
||||
int8_t m2m_flash_switch_firmware(void);
|
||||
|
||||
/**@}*/
|
||||
#endif /* __M2M_FLASH_H__ */
|
||||
243
ChaletLora.X/Source/winc3400_142/driver/include/m2m_hif.h
Normal file
243
ChaletLora.X/Source/winc3400_142/driver/include/m2m_hif.h
Normal file
@ -0,0 +1,243 @@
|
||||
/*******************************************************************************
|
||||
File Name:
|
||||
m2m_hif.h
|
||||
|
||||
Summary:
|
||||
This module contains M2M host interface API definitions.
|
||||
|
||||
Description:
|
||||
This module contains M2M host interface API definitions.
|
||||
*******************************************************************************/
|
||||
|
||||
//DOM-IGNORE-BEGIN
|
||||
/*******************************************************************************
|
||||
* Copyright (C) 2021 Microchip Technology Inc. and its subsidiaries.
|
||||
*
|
||||
* Subject to your compliance with these terms, you may use Microchip software
|
||||
* and any derivatives exclusively with Microchip products. It is your
|
||||
* responsibility to comply with third party license terms applicable to your
|
||||
* use of third party software (including open source software) that may
|
||||
* accompany Microchip software.
|
||||
*
|
||||
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
|
||||
* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
|
||||
* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
|
||||
* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
|
||||
* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
|
||||
* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
|
||||
* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
|
||||
* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
|
||||
* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
|
||||
*******************************************************************************/
|
||||
// DOM-IGNORE-END
|
||||
|
||||
#ifndef _M2M_HIF_
|
||||
#define _M2M_HIF_
|
||||
|
||||
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
|
||||
INCLUDES
|
||||
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
|
||||
|
||||
#include "nm_common.h"
|
||||
|
||||
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
|
||||
MACROS
|
||||
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
|
||||
|
||||
#define M2M_HIF_MAX_PACKET_SIZE (1600 - 4)
|
||||
/*!< Maximum size of the buffer could be transferred between Host and Firmware.
|
||||
*/
|
||||
|
||||
#define M2M_HIF_HDR_OFFSET (sizeof(tstrHifHdr) + 4)
|
||||
|
||||
|
||||
/**
|
||||
* @struct tstrHifHdr
|
||||
* @brief Structure to hold HIF header
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
uint8_t u8Gid; /*!< Group ID */
|
||||
uint8_t u8Opcode; /*!< OP code */
|
||||
uint16_t u16Length; /*!< Payload length */
|
||||
} tstrHifHdr;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*!
|
||||
@typedef typedef void (*tpfHifCallBack)(uint8_t u8OpCode, uint16_t u16DataSize, uint32_t u32Addr);
|
||||
@brief used to point to Wi-Fi call back function depend on Arduino project or other projects.
|
||||
@param [in] u8OpCode
|
||||
HIF Opcode type.
|
||||
@param [in] u16DataSize
|
||||
HIF data length.
|
||||
@param [in] u32Addr
|
||||
HIF address.
|
||||
@param [in] grp
|
||||
HIF group type.
|
||||
*/
|
||||
typedef void (*tpfHifCallBack)(uint8_t u8OpCode, uint16_t u16DataSize, uint32_t u32Addr);
|
||||
/**
|
||||
* @fn int8_t hif_init(void *arg);
|
||||
* @brief
|
||||
To initialize HIF layer.
|
||||
* @param [in] arg
|
||||
* Pointer to the arguments.
|
||||
* @return
|
||||
The function shall return ZERO for successful operation and a negative value otherwise.
|
||||
*/
|
||||
int8_t hif_init(void *arg);
|
||||
/**
|
||||
* @fn int8_t hif_deinit(void *arg);
|
||||
* @brief
|
||||
To Deinitialize HIF layer.
|
||||
* @param [in] arg
|
||||
* Pointer to the arguments.
|
||||
* @return
|
||||
The function shall return ZERO for successful operation and a negative value otherwise.
|
||||
*/
|
||||
int8_t hif_deinit(void *arg);
|
||||
/**
|
||||
* @fn int8_t hif_check_compatibility(uint16_t u16HifInfo);
|
||||
* @brief
|
||||
* To check the compatibility of an image with the current driver.
|
||||
* @param [in] u16HifInfo
|
||||
* HIF info of image to be checked.
|
||||
* @return The function shall return ZERO for compatible image and a negative value otherwise.
|
||||
*/
|
||||
int8_t hif_check_compatibility(uint16_t u16HifInfo);
|
||||
/**
|
||||
* @fn int8_t hif_enable_access(void);
|
||||
* @brief
|
||||
* To enable access to HIF layer, based on HIF level of Firmware.
|
||||
* This function reads HIF level directly from a register written by Firmware.
|
||||
* @return The function shall return ZERO for full match operation and a negative value if operation is restricted.
|
||||
*/
|
||||
int8_t hif_enable_access(void);
|
||||
/**
|
||||
* @fn int8_t hif_check_code(uint8_t u8Gid, uint8_t u8OpCode);
|
||||
* @brief
|
||||
* To check that a particular hif message is supported with the current driver/firmware pair.
|
||||
* @param [in] u8Gid
|
||||
* Group ID.
|
||||
* @param [in] u8Opcode
|
||||
* Operation ID.
|
||||
* @return The function shall return ZERO for support and a negative value otherwise.
|
||||
*/
|
||||
int8_t hif_check_code(uint8_t u8Gid, uint8_t u8OpCode);
|
||||
/**
|
||||
* @fn int8_t hif_send(uint8_t u8Gid, uint8_t u8Opcode, uint8_t *pu8CtrlBuf, uint16_t u16CtrlBufSize,
|
||||
uint8_t *pu8DataBuf, uint16_t u16DataSize, uint16_t u16DataOffset)
|
||||
* @brief Send packet using host interface.
|
||||
|
||||
* @param [in] u8Gid
|
||||
* Group ID.
|
||||
* @param [in] u8Opcode
|
||||
* Operation ID.
|
||||
* @param [in] pu8CtrlBuf
|
||||
* Pointer to the Control buffer.
|
||||
* @param [in] u16CtrlBufSize
|
||||
Control buffer size.
|
||||
* @param [in] u16DataOffset
|
||||
Packet Data offset.
|
||||
* @param [in] pu8DataBuf
|
||||
* Packet buffer Allocated by the caller.
|
||||
* @param [in] u16DataSize
|
||||
Packet buffer size (including the HIF header).
|
||||
* @return The function shall return ZERO for successful operation and a negative value otherwise.
|
||||
*/
|
||||
int8_t hif_send(uint8_t u8Gid, uint8_t u8Opcode, uint8_t *pu8CtrlBuf, uint16_t u16CtrlBufSize,
|
||||
uint8_t *pu8DataBuf, uint16_t u16DataSize, uint16_t u16DataOffset);
|
||||
/**
|
||||
* @fn hif_receive
|
||||
* @brief Host interface interrupt service routine
|
||||
* @param [in] u32Addr
|
||||
* Receive start address
|
||||
* @param [out] pu8Buf
|
||||
* Pointer to receive buffer. Allocated by the caller
|
||||
* @param [in] u16Sz
|
||||
* Receive buffer size
|
||||
* @param [in] isDone
|
||||
* If you don't need any more packets send True otherwise send false
|
||||
* @return
|
||||
The function shall return ZERO for successful operation and a negative value otherwise.
|
||||
*/
|
||||
|
||||
int8_t hif_receive(uint32_t u32Addr, uint8_t *pu8Buf, uint16_t u16Sz, uint8_t isDone);
|
||||
/**
|
||||
* @fn hif_register_cb
|
||||
* @brief
|
||||
To set Callback function for every Component.
|
||||
|
||||
* @param [in] u8Grp
|
||||
* Group to which the Callback function should be set.
|
||||
|
||||
* @param [in] fn
|
||||
* function to be set to the specified group.
|
||||
* @return
|
||||
The function shall return ZERO for successful operation and a negative value otherwise.
|
||||
*/
|
||||
int8_t hif_register_cb(uint8_t u8Grp, tpfHifCallBack fn);
|
||||
/**
|
||||
* @fn int8_t hif_chip_sleep(void);
|
||||
* @brief
|
||||
To make the chip sleep.
|
||||
* @return
|
||||
The function shall return ZERO for successful operation and a negative value otherwise.
|
||||
*/
|
||||
int8_t hif_chip_sleep(void);
|
||||
/**
|
||||
* @fn int8_t hif_chip_wake(void);
|
||||
* @brief
|
||||
To Wakeup the chip.
|
||||
* @return
|
||||
The function shall return ZERO for successful operation and a negative value otherwise.
|
||||
*/
|
||||
|
||||
int8_t hif_chip_wake(void);
|
||||
/*!
|
||||
@fn \
|
||||
void hif_set_sleep_mode(uint8_t u8Pstype);
|
||||
|
||||
@brief
|
||||
Set the sleep mode of the HIF layer.
|
||||
|
||||
@param [in] u8Pstype
|
||||
Sleep mode.
|
||||
|
||||
@return
|
||||
The function SHALL return 0 for success and a negative value otherwise.
|
||||
*/
|
||||
|
||||
void hif_set_sleep_mode(uint8_t u8Pstype);
|
||||
/*!
|
||||
@fn \
|
||||
uint8_t hif_get_sleep_mode(void);
|
||||
|
||||
@brief
|
||||
Get the sleep mode of the HIF layer.
|
||||
|
||||
@return
|
||||
The function SHALL return the sleep mode of the HIF layer.
|
||||
*/
|
||||
|
||||
uint8_t hif_get_sleep_mode(void);
|
||||
|
||||
/**
|
||||
* @fn hif_handle_isr(void)
|
||||
* @brief
|
||||
Handle interrupt received from WINC3400 firmware.
|
||||
* @return
|
||||
The function SHALL return 0 for success and a negative value otherwise.
|
||||
*/
|
||||
int8_t hif_handle_isr(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
370
ChaletLora.X/Source/winc3400_142/driver/include/m2m_ota.h
Normal file
370
ChaletLora.X/Source/winc3400_142/driver/include/m2m_ota.h
Normal file
@ -0,0 +1,370 @@
|
||||
/*******************************************************************************
|
||||
WINC3400 OTA Upgrade API Interface
|
||||
|
||||
File Name:
|
||||
m2m_ota.h
|
||||
|
||||
Summary:
|
||||
WINC3400 OTA Upgrade API Interface
|
||||
|
||||
Description:
|
||||
WINC3400 OTA Upgrade API Interface
|
||||
*******************************************************************************/
|
||||
|
||||
//DOM-IGNORE-BEGIN
|
||||
/*******************************************************************************
|
||||
* Copyright (C) 2021 Microchip Technology Inc. and its subsidiaries.
|
||||
*
|
||||
* Subject to your compliance with these terms, you may use Microchip software
|
||||
* and any derivatives exclusively with Microchip products. It is your
|
||||
* responsibility to comply with third party license terms applicable to your
|
||||
* use of third party software (including open source software) that may
|
||||
* accompany Microchip software.
|
||||
*
|
||||
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
|
||||
* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
|
||||
* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
|
||||
* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
|
||||
* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
|
||||
* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
|
||||
* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
|
||||
* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
|
||||
* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
|
||||
*******************************************************************************/
|
||||
// DOM-IGNORE-END
|
||||
|
||||
/**@defgroup OTAAPI OTA
|
||||
@brief
|
||||
The WINC supports OTA (Over-The-Air) updates. Using the APIs described in this module,
|
||||
it is possible to request an ATWINC15x0 to update its firmware, or safely rollback to
|
||||
the previous firmware version.\n There are also APIs to download files and store them in
|
||||
the WINC's Flash (supported by ATWINC1510 only), which can be used for Host MCU OTA
|
||||
updates or accessing information stored remotely.
|
||||
@{
|
||||
@defgroup OTACALLBACKS Callbacks
|
||||
@brief
|
||||
Lists the different callbacks that can be used during OTA updates.\n
|
||||
Callbacks of type @ref tpfOtaNotifCb and @ref tpfOtaUpdateCb should be passed
|
||||
onto @ref m2m_ota_init at system initialization. Other callbacks are provided
|
||||
to handle the various steps of Host File Download.
|
||||
|
||||
@defgroup OTADEFINE Defines
|
||||
@brief
|
||||
Specifies the macros and defines used by the OTA APIs.
|
||||
|
||||
@defgroup OTATYPEDEF Enumerations and Typedefs
|
||||
@brief
|
||||
Specifies the enums and Data Structures used by the OTA APIs.
|
||||
|
||||
@defgroup OTAFUNCTIONS Functions
|
||||
@brief
|
||||
Lists the full set of available APIs to manage OTA updates and Host File Downloads.
|
||||
@}
|
||||
*/
|
||||
|
||||
#ifndef __M2M_OTA_H__
|
||||
#define __M2M_OTA_H__
|
||||
|
||||
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
|
||||
INCLUDES
|
||||
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
|
||||
|
||||
#include "nm_common.h"
|
||||
#include "m2m_types.h"
|
||||
#include "nmdrv.h"
|
||||
|
||||
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
|
||||
MACROS
|
||||
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
|
||||
|
||||
/*!
|
||||
@typedef void (*tpfOtaUpdateCb)(uint8_t u8OtaUpdateStatusType, uint8_t u8OtaUpdateStatus);
|
||||
|
||||
@brief
|
||||
A callback to get OTA status update, the callback provides the status type and its status.\n
|
||||
The OTA callback provides the download status, the switch to the downloaded firmware status
|
||||
and roll-back status.
|
||||
|
||||
@param[in] u8OtaUpdateStatusType
|
||||
Possible values are listed in @ref tenuOtaUpdateStatusType.
|
||||
|
||||
@param[in] u8OtaUpdateStatus
|
||||
Possible values are listed as enumerated by @ref tenuOtaUpdateStatus.
|
||||
|
||||
@note
|
||||
Executes other callbacks passed to the OTA module.
|
||||
|
||||
@see
|
||||
tenuOtaUpdateStatusType
|
||||
tenuOtaUpdateStatus
|
||||
*/
|
||||
typedef void (*tpfOtaUpdateCb)(uint8_t u8OtaUpdateStatusType, uint8_t u8OtaUpdateStatus);
|
||||
/**@}*/ // OTACALLBACKS
|
||||
|
||||
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
|
||||
FUNCTION PROTOTYPES
|
||||
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*!
|
||||
@ingroup OTAFUNCTIONS
|
||||
@fn \
|
||||
int8_t m2m_ota_init(tpfOtaUpdateCb pfOtaUpdateCb);
|
||||
|
||||
@brief
|
||||
Synchronous initialization function for the OTA layer by registering the update callback.\n
|
||||
The notification callback is not supported at the current version. Calling this API is a
|
||||
MUST for all the OTA API's.
|
||||
|
||||
@param[in] pfOtaUpdateCb
|
||||
OTA Update callback function.
|
||||
|
||||
@return
|
||||
The function returns @ref M2M_SUCCESS for successful operations and a negative value otherwise.
|
||||
*/
|
||||
int8_t m2m_ota_init(tpfOtaUpdateCb pfOtaUpdateCb);
|
||||
|
||||
/*!
|
||||
@ingroup OTAFUNCTIONS
|
||||
@fn \
|
||||
int8_t m2m_ota_start_update(unsigned char * pcDownloadUrl);
|
||||
|
||||
@brief
|
||||
Request OTA start update using the download URL. The OTA module will download the OTA image, ensure integrity of the image
|
||||
and update the validity of the image in the control structure. On completion, a callback of type @ref tpfOtaUpdateCb is called
|
||||
(callback previously provided via @ref m2m_ota_init). Switching to the updated image additionally requires completion of
|
||||
@ref m2m_ota_switch_firmware, followed by a WINC reset.
|
||||
|
||||
@param[in] pcDownloadUrl
|
||||
The download firmware URL, according to the application server.
|
||||
|
||||
@warning
|
||||
Calling this API does not guarantee OTA WINC image update, it depends on the connection with the
|
||||
download server and the validity of the image.\n
|
||||
Calling this API invalidates any previous valid rollback image, irrespective of the result, but when
|
||||
the OTA succeeds, the current image will become the rollback image after @ref m2m_ota_switch_firmware.
|
||||
|
||||
@pre
|
||||
@ref m2m_ota_init is a prerequisite and must have been called before using @ref m2m_ota_start_update.\n
|
||||
Switching to the newly downloaded image requires calling @ref m2m_ota_switch_firmware API.
|
||||
|
||||
@sa
|
||||
@ref m2m_ota_init
|
||||
@ref m2m_ota_switch_firmware
|
||||
@ref tpfOtaUpdateCb
|
||||
|
||||
@return
|
||||
The function returns @ref M2M_SUCCESS for successful operations and a negative value otherwise.
|
||||
Note that successful operation in this context means the OTA update request has reached the firmware OTA module.
|
||||
It does not indicate whether or not the image update succeeded.
|
||||
|
||||
@section OTAExample Example
|
||||
This example shows how an OTA image update and switch is carried out.
|
||||
It demonstrates use of the following OTA APIs:
|
||||
- @ref m2m_ota_init
|
||||
- @ref tpfOtaUpdateCb
|
||||
- @ref m2m_ota_start_update
|
||||
- @ref m2m_ota_switch_firmware
|
||||
- @ref m2m_ota_rollback
|
||||
|
||||
It also makes use of @ref m2m_wifi_check_ota_rb in order to inform OTA decisions.
|
||||
@code
|
||||
static void OtaUpdateCb(uint8_t u8OtaUpdateStatusType, uint8_t u8OtaUpdateStatus)
|
||||
{
|
||||
int8_t s8tmp;
|
||||
tstrM2mRev strtmp;
|
||||
M2M_INFO("%d %d\n", u8OtaUpdateStatusType, u8OtaUpdateStatus);
|
||||
switch(u8OtaUpdateStatusType)
|
||||
{
|
||||
case DL_STATUS:
|
||||
if(u8OtaUpdateStatus == OTA_STATUS_SUCCESS)
|
||||
{
|
||||
M2M_INFO("OTA download succeeded\n");
|
||||
s8tmp = m2m_wifi_check_ota_rb();
|
||||
if(s8tmp == M2M_ERR_FW_VER_MISMATCH)
|
||||
{
|
||||
// In this case the application SHOULD update the host driver before calling
|
||||
// @ref m2m_ota_switch_firmware(). Switching firmware image and resetting without updating host
|
||||
// driver would lead to severely limited functionality (i.e. OTA rollback only).
|
||||
}
|
||||
else if(s8tmp == M2M_SUCCESS)
|
||||
{
|
||||
// In this case the application MAY WANT TO update the host driver before calling
|
||||
// @ref m2m_ota_switch_firmware(). Switching firmware image and resetting without
|
||||
// updating host driver may lead to suboptimal functionality.
|
||||
}
|
||||
else
|
||||
{
|
||||
M2M_INFO("Cannot recognize downloaded image\n");
|
||||
// In this case the application MUST NOT update the host driver if such an update would change the
|
||||
// driver HIF Major field. Firmware switch @ref using m2m_ota_switch_firmware() is blocked.
|
||||
break;
|
||||
}
|
||||
// Switch to the upgraded firmware
|
||||
M2M_INFO("Now switching active partition...\n");
|
||||
s8tmp = m2m_ota_switch_firmware();
|
||||
}
|
||||
break;
|
||||
case SW_STATUS:
|
||||
case RB_STATUS:
|
||||
if(u8OtaUpdateStatus == OTA_STATUS_SUCCESS)
|
||||
{
|
||||
M2M_INFO("Switch/Rollback succeeded\n");
|
||||
|
||||
// Start the host SW upgrade if required, then system reset is required (Reinitialize the driver)
|
||||
|
||||
M2M_INFO("Now resetting the system...\n");
|
||||
system_reset();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void wifi_event_cb(uint8_t u8WiFiEvent, void *pvMsg)
|
||||
{
|
||||
// ...
|
||||
case M2M_WIFI_REQ_DHCP_CONF:
|
||||
{
|
||||
// After successful connection, start the OTA upgrade
|
||||
m2m_ota_start_update(OTA_URL);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
// ...
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
tstrWifiInitParam param;
|
||||
int8_t s8Ret = M2M_SUCCESS;
|
||||
bool rollback_required = FALSE;
|
||||
|
||||
// System init, etc should be here...
|
||||
|
||||
memset((uint8_t *)¶m, 0, sizeof(param));
|
||||
param.pfAppWifiCb = wifi_event_cb;
|
||||
|
||||
// Initialize the WINC Driver
|
||||
s8Ret = m2m_wifi_init(¶m);
|
||||
if(s8Ret == M2M_ERR_FW_VER_MISMATCH)
|
||||
{
|
||||
M2M_ERR("Firmware version mismatch\n");
|
||||
s8Ret = m2m_wifi_check_ota_rb();
|
||||
if(s8Ret == M2M_SUCCESS)
|
||||
{
|
||||
// In this case the image in the inactive partition has compatible HIF. We will switch/rollback to it
|
||||
// after initializing the OTA module.
|
||||
rollback_required = TRUE;
|
||||
}
|
||||
}
|
||||
if(M2M_SUCCESS != s8Ret)
|
||||
{
|
||||
M2M_ERR("Driver Init Failed <%d>\n", s8Ret);
|
||||
while(1);
|
||||
}
|
||||
// Initialize the OTA module
|
||||
m2m_ota_init(OtaUpdateCb, NULL);
|
||||
if(rollback_required)
|
||||
{
|
||||
// We need to call either @ref m2m_ota_rollback() or @ref m2m_ota_switch_firmware() (functionally equivalent).
|
||||
m2m_ota_rollback();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Connect to AP that provides connection to the OTA server
|
||||
m2m_wifi_default_connect();
|
||||
}
|
||||
while(1)
|
||||
{
|
||||
// Handle the app state machine plus the WINC event handler
|
||||
while(m2m_wifi_handle_events(NULL) != M2M_SUCCESS) {
|
||||
}
|
||||
}
|
||||
}
|
||||
@endcode
|
||||
*/
|
||||
int8_t m2m_ota_start_update(unsigned char *pcDownloadUrl);
|
||||
|
||||
/*!
|
||||
@ingroup OTAFUNCTIONS
|
||||
@fn \
|
||||
int8_t m2m_ota_rollback(void);
|
||||
|
||||
@brief
|
||||
Request OTA Roll-back to the old (inactive) WINC image, the WINC firmware will check the validity of the inactive image
|
||||
and activate it if valid. On completion, a callback of type @ref tpfOtaUpdateCb is called (application must previously have
|
||||
provided the callback via @ref m2m_ota_init). If the callback indicates successful activation, the newly-activated image
|
||||
will start running after next system reset.
|
||||
|
||||
@warning
|
||||
If rollback requires a host driver update in order to maintain HIF compatibility (HIF
|
||||
major value change), then it is recommended to update the host driver prior to calling this API.\n
|
||||
In the event of system reset with incompatible driver/firmware, compatibility can be
|
||||
recovered by calling @ref m2m_ota_rollback or @ref m2m_ota_switch_firmware. See @ref OTAExample.
|
||||
|
||||
@sa
|
||||
m2m_ota_init
|
||||
m2m_ota_start_update
|
||||
|
||||
@return
|
||||
The function returns @ref M2M_SUCCESS for successful operations and a negative value otherwise.
|
||||
*/
|
||||
int8_t m2m_ota_rollback(void);
|
||||
|
||||
/*!
|
||||
@ingroup OTAFUNCTIONS
|
||||
@fn \
|
||||
int8_t m2m_ota_abort(void);
|
||||
|
||||
@brief
|
||||
Request the WINC to abort an OTA in progress.\n
|
||||
If no download is in progress, the API will respond with failure.
|
||||
|
||||
@sa
|
||||
m2m_ota_init
|
||||
m2m_ota_start_update
|
||||
|
||||
@return
|
||||
The function returns @ref M2M_SUCCESS for a successful operation and a negative value otherwise.
|
||||
*/
|
||||
int8_t m2m_ota_abort(void);
|
||||
|
||||
/*!
|
||||
@ingroup OTAFUNCTIONS
|
||||
@fn \
|
||||
int8_t m2m_ota_switch_firmware(void);
|
||||
|
||||
@brief
|
||||
Request switch to the updated WINC image. The WINC firmware will check the validity of the
|
||||
inactive image and activate it if valid. On completion, a callback of type @ref tpfOtaUpdateCb
|
||||
is called (application must previously have provided the callback via @ref m2m_ota_init).
|
||||
If the callback indicates successful activation, the newly-activated image will start running
|
||||
after next system reset.
|
||||
|
||||
@warning
|
||||
If switch requires a host driver update in order to maintain HIF compatibility (HIF
|
||||
major value change), then it is recommended to update the host driver prior to calling this API.\n
|
||||
In the event of system reset with incompatible driver/firmware, compatibility can be
|
||||
recovered by calling @ref m2m_ota_rollback or @ref m2m_ota_switch_firmware. See @ref OTAExample.
|
||||
|
||||
@sa
|
||||
m2m_ota_init
|
||||
m2m_ota_start_update
|
||||
|
||||
@return
|
||||
The function returns @ref M2M_SUCCESS for successful operations and a negative value otherwise.
|
||||
*/
|
||||
int8_t m2m_ota_switch_firmware(void);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* __M2M_OTA_H__ */
|
||||
307
ChaletLora.X/Source/winc3400_142/driver/include/m2m_periph.h
Normal file
307
ChaletLora.X/Source/winc3400_142/driver/include/m2m_periph.h
Normal file
@ -0,0 +1,307 @@
|
||||
/*******************************************************************************
|
||||
WINC3400 Peripherals Application Interface.
|
||||
|
||||
File Name:
|
||||
m2m_periph.h
|
||||
|
||||
Summary:
|
||||
WINC3400 Peripherals Application Interface
|
||||
|
||||
Description:
|
||||
WINC3400 Peripherals Application Interface
|
||||
*******************************************************************************/
|
||||
|
||||
//DOM-IGNORE-BEGIN
|
||||
/*******************************************************************************
|
||||
* Copyright (C) 2021 Microchip Technology Inc. and its subsidiaries.
|
||||
*
|
||||
* Subject to your compliance with these terms, you may use Microchip software
|
||||
* and any derivatives exclusively with Microchip products. It is your
|
||||
* responsibility to comply with third party license terms applicable to your
|
||||
* use of third party software (including open source software) that may
|
||||
* accompany Microchip software.
|
||||
*
|
||||
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
|
||||
* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
|
||||
* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
|
||||
* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
|
||||
* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
|
||||
* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
|
||||
* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
|
||||
* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
|
||||
* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
|
||||
*******************************************************************************/
|
||||
// DOM-IGNORE-END
|
||||
|
||||
#ifndef _M2M_PERIPH_H_
|
||||
#define _M2M_PERIPH_H_
|
||||
|
||||
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
|
||||
INCLUDES
|
||||
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
|
||||
|
||||
#include "nm_common.h"
|
||||
#include "m2m_types.h"
|
||||
|
||||
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
|
||||
MACROS
|
||||
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
|
||||
|
||||
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
|
||||
DATA TYPES
|
||||
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
|
||||
|
||||
/*!
|
||||
@struct \
|
||||
tstrPerphInitParam
|
||||
|
||||
@brief
|
||||
Peripheral module initialization parameters.
|
||||
*/
|
||||
typedef struct {
|
||||
void *arg;
|
||||
} tstrPerphInitParam;
|
||||
|
||||
/*!
|
||||
@enum \
|
||||
tenuGpioNum
|
||||
|
||||
@brief
|
||||
A list of GPIO numbers configurable through the m2m_periph module.
|
||||
*/
|
||||
typedef enum {
|
||||
M2M_PERIPH_GPIO3,
|
||||
M2M_PERIPH_GPIO4,
|
||||
M2M_PERIPH_GPIO15, /*!< GPIO15 pad */
|
||||
M2M_PERIPH_GPIO16, /*!< GPIO16 pad */
|
||||
M2M_PERIPH_GPIO18, /*!< GPIO18 pad */
|
||||
M2M_PERIPH_GPIO_MAX
|
||||
} tenuGpioNum;
|
||||
|
||||
/*!
|
||||
@enum \
|
||||
tenuI2cMasterSclMuxOpt
|
||||
|
||||
@brief
|
||||
Allowed pin multiplexing options for I2C master SCL signal.
|
||||
*/
|
||||
typedef enum {
|
||||
M2M_PERIPH_I2C_MASTER_SCL_MUX_OPT_HOST_WAKEUP, /*!< I2C master SCL is available on HOST_WAKEUP. */
|
||||
M2M_PERIPH_I2C_MASTER_SCL_MUX_OPT_SD_DAT3, /*!< I2C master SCL is available on SD_DAT3 (GPIO 7). */
|
||||
M2M_PERIPH_I2C_MASTER_SCL_MUX_OPT_GPIO13, /*!< I2C master SCL is available on GPIO 13. */
|
||||
M2M_PERIPH_I2C_MASTER_SCL_MUX_OPT_GPIO4, /*!< I2C master SCL is available on GPIO 4.*/
|
||||
M2M_PERIPH_I2C_MASTER_SCL_MUX_OPT_I2C_SCL, /*!< I2C master SCL is available on I2C slave SCL. */
|
||||
M2M_PERIPH_I2C_MASTER_SCL_MUX_OPT_NUM
|
||||
} tenuI2cMasterSclMuxOpt;
|
||||
|
||||
/*!
|
||||
@enum \
|
||||
tenuI2cMasterSdaMuxOpt
|
||||
|
||||
@brief
|
||||
Allowed pin multiplexing options for I2C master SDA signal.
|
||||
*/
|
||||
typedef enum {
|
||||
M2M_PERIPH_I2C_MASTER_SDA_MUX_OPT_RTC_CLK, /*!< I2C master SDA is available on RTC_CLK. */
|
||||
M2M_PERIPH_I2C_MASTER_SDA_MUX_OPT_SD_CLK, /*!< I2C master SDA is available on SD_CLK (GPIO 8). */
|
||||
M2M_PERIPH_I2C_MASTER_SDA_MUX_OPT_GPIO14, /*!< I2C master SDA is available on GPIO 14. */
|
||||
M2M_PERIPH_I2C_MASTER_SDA_MUX_OPT_GPIO6, /*!< I2C master SDA is available on GPIO 6.*/
|
||||
M2M_PERIPH_I2C_MASTER_SDA_MUX_OPT_I2C_SDA, /*!< I2C master SDA is available on I2C slave SDA. */
|
||||
M2M_PERIPH_I2C_MASTER_SDA_MUX_OPT_NUM
|
||||
} tenuI2cMasterSdaMuxOpt;
|
||||
|
||||
/*!
|
||||
@struct \
|
||||
tstrI2cMasterInitParam
|
||||
|
||||
@brief
|
||||
I2C master configuration parameters.
|
||||
@sa
|
||||
tenuI2cMasterSclMuxOpt
|
||||
tenuI2cMasterSdaMuxOpt
|
||||
*/
|
||||
typedef struct {
|
||||
uint8_t enuSclMuxOpt; /*!< SCL multiplexing option. Allowed value are defined in tenuI2cMasterSclMuxOpt */
|
||||
uint8_t enuSdaMuxOpt; /*!< SDA multiplexing option. Allowed value are defined in tenuI2cMasterSdaMuxOpt */
|
||||
uint8_t u8ClkSpeedKHz; /*!< I2C master clock speed in KHz. */
|
||||
} tstrI2cMasterInitParam;
|
||||
|
||||
/*!
|
||||
@enum \
|
||||
tenuI2cMasterFlags
|
||||
|
||||
@brief
|
||||
Bitwise-ORed flags for use in m2m_periph_i2c_master_write and m2m_periph_i2c_master_read
|
||||
@sa
|
||||
m2m_periph_i2c_master_write
|
||||
m2m_periph_i2c_master_read
|
||||
*/
|
||||
typedef enum {
|
||||
I2C_MASTER_NO_FLAGS = 0x00,
|
||||
/*!< No flags. */
|
||||
I2C_MASTER_NO_STOP = 0x01,
|
||||
/*!< No stop bit after this transaction. Useful for scattered buffer read/write operations. */
|
||||
I2C_MASTER_NO_START = 0x02,
|
||||
/*!< No start bit at the beginning of this transaction. Useful for scattered buffer read/write operations.*/
|
||||
} tenuI2cMasterFlags;
|
||||
|
||||
/*!
|
||||
@enum \
|
||||
tenuPullupMask
|
||||
|
||||
@brief
|
||||
Bitwise-ORed flags for use in m2m_perph_pullup_ctrl.
|
||||
@sa
|
||||
m2m_periph_pullup_ctrl
|
||||
|
||||
*/
|
||||
typedef enum {
|
||||
M2M_PERIPH_PULLUP_DIS_HOST_WAKEUP = (1ul << 0),
|
||||
M2M_PERIPH_PULLUP_DIS_RTC_CLK = (1ul << 1),
|
||||
M2M_PERIPH_PULLUP_DIS_IRQN = (1ul << 2),
|
||||
M2M_PERIPH_PULLUP_DIS_GPIO_3 = (1ul << 3),
|
||||
M2M_PERIPH_PULLUP_DIS_GPIO_4 = (1ul << 4),
|
||||
M2M_PERIPH_PULLUP_DIS_GPIO_5 = (1ul << 5),
|
||||
M2M_PERIPH_PULLUP_DIS_GPIO_6 = (1ul << 6),
|
||||
M2M_PERIPH_PULLUP_DIS_SD_CLK = (1ul << 7),
|
||||
M2M_PERIPH_PULLUP_DIS_SD_CMD_SPI_SCK = (1ul << 8),
|
||||
M2M_PERIPH_PULLUP_DIS_SD_DAT0_SPI_TXD = (1ul << 9),
|
||||
M2M_PERIPH_PULLUP_DIS_SD_DAT1_SPI_SSN = (1ul << 10),
|
||||
M2M_PERIPH_PULLUP_DIS_SD_DAT1_SPI_RXD = (1ul << 11),
|
||||
M2M_PERIPH_PULLUP_DIS_SD_DAT3 = (1ul << 12),
|
||||
} tenuPullupEnable1Mask;
|
||||
typedef enum {
|
||||
M2M_PERIPH_PULLUP_DIS_GPIO_13 = (1ul << 0),
|
||||
M2M_PERIPH_PULLUP_DIS_GPIO_14 = (1ul << 1),
|
||||
M2M_PERIPH_PULLUP_DIS_GPIO_15 = (1ul << 2),
|
||||
M2M_PERIPH_PULLUP_DIS_GPIO_16 = (1ul << 3),
|
||||
M2M_PERIPH_PULLUP_DIS_GPIO_17 = (1ul << 4),
|
||||
M2M_PERIPH_PULLUP_DIS_GPIO_18 = (1ul << 5),
|
||||
M2M_PERIPH_PULLUP_DIS_GPIO_19 = (1ul << 6),
|
||||
M2M_PERIPH_PULLUP_DIS_GPIO_20 = (1ul << 7),
|
||||
M2M_PERIPH_PULLUP_DIS_GPIO_22 = (1ul << 9),
|
||||
M2M_PERIPH_PULLUP_DIS_GPIO_23 = (1ul << 10),
|
||||
M2M_PERIPH_PULLUP_DIS_GPIO_38 = (1ul << 25),
|
||||
M2M_PERIPH_PULLUP_DIS_GPIO_39 = (1ul << 26),
|
||||
M2M_PERIPH_PULLUP_DIS_GPIO_40 = (1ul << 27),
|
||||
M2M_PERIPH_PULLUP_DIS_GPIO_42 = (1ul << 29),
|
||||
} tenuPullupEnable2Mask;
|
||||
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
|
||||
FUNCTION PROTOTYPES
|
||||
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*!
|
||||
@fn \
|
||||
int8_t m2m_periph_init(tstrPerphInitParam * param);
|
||||
|
||||
@brief
|
||||
Initialize the WINC3400 peripheral driver module.
|
||||
|
||||
@param [in] param
|
||||
Peripheral module initialization structure. See members of tstrPerphInitParam.
|
||||
|
||||
@return
|
||||
The function SHALL return 0 for success and a negative value otherwise.
|
||||
|
||||
@sa
|
||||
tstrPerphInitParam
|
||||
*/
|
||||
int8_t m2m_periph_init(tstrPerphInitParam *param);
|
||||
|
||||
/*!
|
||||
@fn \
|
||||
int8_t m2m_periph_gpio_set_dir(uint8_t u8GpioNum, uint8_t u8GpioDir);
|
||||
|
||||
@brief
|
||||
Configure a specific WINC3400 pad as a GPIO and sets its direction (input or output).
|
||||
|
||||
@param [in] u8GpioNum
|
||||
GPIO number. Allowed values are defined in tenuGpioNum.
|
||||
|
||||
@param [in] u8GpioDir
|
||||
GPIO direction: Zero = input. Non-zero = output.
|
||||
|
||||
@return
|
||||
The function SHALL return 0 for success and a negative value otherwise.
|
||||
|
||||
@sa
|
||||
tenuGpioNum
|
||||
*/
|
||||
int8_t m2m_periph_gpio_set_dir(uint8_t u8GpioNum, uint8_t u8GpioDir);
|
||||
|
||||
/*!
|
||||
@fn \
|
||||
int8_t m2m_periph_gpio_set_val(uint8_t u8GpioNum, uint8_t u8GpioVal);
|
||||
|
||||
@brief
|
||||
Set an WINC3400 GPIO output level high or low.
|
||||
|
||||
@param [in] u8GpioNum
|
||||
GPIO number. Allowed values are defined in tenuGpioNum.
|
||||
|
||||
@param [in] u8GpioVal
|
||||
GPIO output value. Zero = low, non-zero = high.
|
||||
|
||||
@return
|
||||
The function SHALL return 0 for success and a negative value otherwise.
|
||||
|
||||
@sa
|
||||
tenuGpioNum
|
||||
*/
|
||||
int8_t m2m_periph_gpio_set_val(uint8_t u8GpioNum, uint8_t u8GpioVal);
|
||||
|
||||
/*!
|
||||
@fn \
|
||||
int8_t m2m_periph_gpio_get_val(uint8_t u8GpioNum, uint8_t * pu8GpioVal);
|
||||
|
||||
@brief
|
||||
Read an WINC3400 GPIO input level.
|
||||
|
||||
@param [in] u8GpioNum
|
||||
GPIO number. Allowed values are defined in tenuGpioNum.
|
||||
|
||||
@param [out] pu8GpioVal
|
||||
GPIO input value. Zero = low, non-zero = high.
|
||||
|
||||
@return
|
||||
The function SHALL return 0 for success and a negative value otherwise.
|
||||
|
||||
@sa
|
||||
tenuGpioNum
|
||||
*/
|
||||
int8_t m2m_periph_gpio_get_val(uint8_t u8GpioNum, uint8_t *pu8GpioVal);
|
||||
|
||||
/*!
|
||||
@fn \
|
||||
int8_t m2m_periph_pullup_ctrl(uint32_t pinmask, uint8_t enable);
|
||||
|
||||
@brief
|
||||
Control the programmable pull-up resistor on the chip pads .
|
||||
|
||||
|
||||
@param [in] pinmask
|
||||
Write operation bitwise-ORed mask for which pads to control. Allowed values are defined in tenuPullupMask.
|
||||
|
||||
@param [in] enable
|
||||
Set to 0 to disable pull-up resistor. Non-zero will enable the pull-up.
|
||||
|
||||
@return
|
||||
The function SHALL return 0 for success and a negative value otherwise.
|
||||
|
||||
@sa
|
||||
tenuPullupMask
|
||||
*/
|
||||
int8_t m2m_periph_pullup_ctrl(uint32_t pinmask, uint8_t enable);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _M2M_PERIPH_H_ */
|
||||
255
ChaletLora.X/Source/winc3400_142/driver/include/m2m_ssl.h
Normal file
255
ChaletLora.X/Source/winc3400_142/driver/include/m2m_ssl.h
Normal file
@ -0,0 +1,255 @@
|
||||
/*******************************************************************************
|
||||
File Name:
|
||||
m2m_ssl.h
|
||||
|
||||
Summary:
|
||||
WINC SSL Interface.
|
||||
|
||||
Description:
|
||||
WINC SSL Interface.
|
||||
*******************************************************************************/
|
||||
|
||||
//DOM-IGNORE-BEGIN
|
||||
/*******************************************************************************
|
||||
* Copyright (C) 2021 Microchip Technology Inc. and its subsidiaries.
|
||||
*
|
||||
* Subject to your compliance with these terms, you may use Microchip software
|
||||
* and any derivatives exclusively with Microchip products. It is your
|
||||
* responsibility to comply with third party license terms applicable to your
|
||||
* use of third party software (including open source software) that may
|
||||
* accompany Microchip software.
|
||||
*
|
||||
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
|
||||
* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
|
||||
* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
|
||||
* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
|
||||
* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
|
||||
* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
|
||||
* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
|
||||
* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
|
||||
* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
|
||||
*******************************************************************************/
|
||||
//DOM-IGNORE-END
|
||||
|
||||
/** @defgroup SSLAPI SSL
|
||||
@brief
|
||||
Provides a description of the SSL Layer.
|
||||
@{
|
||||
@defgroup SSLCallbacks Callbacks
|
||||
@brief
|
||||
Provides detail on the available callbacks for the SSL Layer.
|
||||
|
||||
@defgroup SSLEnums Enumerations and Typedefs
|
||||
@brief
|
||||
Specifies the enums and Data Structures used by the SSL APIs.
|
||||
|
||||
@defgroup SSLFUNCTIONS Functions
|
||||
@brief
|
||||
Provides detail on the available APIs for the SSL Layer.
|
||||
@}
|
||||
*/
|
||||
|
||||
#ifndef __M2M_SSL_H__
|
||||
#define __M2M_SSL_H__
|
||||
|
||||
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
|
||||
INCLUDES
|
||||
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
|
||||
|
||||
#include "nm_common.h"
|
||||
#include "m2m_types.h"
|
||||
#include "nmdrv.h"
|
||||
#include "ecc_types.h"
|
||||
#include "socket.h"
|
||||
|
||||
/*!
|
||||
@ingroup SSLCallbacks
|
||||
@typedef void (*tpfAppSSLCb)(uint8_t u8MsgType, void* pvMsg);
|
||||
@brief A callback to get SSL notifications.
|
||||
@param[in] u8MsgType
|
||||
The type of the message received.
|
||||
@param[in] pvMsg
|
||||
A structure to provide notification payload.
|
||||
*/
|
||||
typedef void (*tpfAppSSLCb)(uint8_t u8MsgType, void *pvMsg);
|
||||
|
||||
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
|
||||
FUNCTION PROTOTYPES
|
||||
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
|
||||
|
||||
/*!
|
||||
@ingroup SSLFUNCTIONS
|
||||
@fn int8_t m2m_ssl_init(tpfAppSSLCb pfAppSSLCb);
|
||||
@brief Initializes the SSL layer.
|
||||
@param[in] pfAppSSLCb
|
||||
Application SSL callback function.
|
||||
@return The function returns @ref M2M_SUCCESS for success and a negative value otherwise.
|
||||
*/
|
||||
int8_t m2m_ssl_init(tpfAppSSLCb pfAppSSLCb);
|
||||
|
||||
/*!
|
||||
@ingroup SSLFUNCTIONS
|
||||
@fn int8_t m2m_ssl_handshake_rsp(tstrEccReqInfo* strECCResp, uint8_t* pu8RspDataBuff, uint16_t u16RspDataSz);
|
||||
@brief Sends ECC responses to the WINC.
|
||||
@param[in] strECCResp
|
||||
ECC Response struct.
|
||||
@param[in] pu8RspDataBuff
|
||||
Pointer of the response data to be sent.
|
||||
@param[in] u16RspDataSz
|
||||
Response data size.
|
||||
@return The function returns @ref M2M_SUCCESS for success and a negative value otherwise.
|
||||
*/
|
||||
int8_t m2m_ssl_handshake_rsp(tstrEccReqInfo *strECCResp, uint8_t *pu8RspDataBuff, uint16_t u16RspDataSz);
|
||||
|
||||
/*!
|
||||
@ingroup SSLFUNCTIONS
|
||||
@fn int8_t m2m_ssl_send_certs_to_winc(uint8_t* pu8Buffer, uint32_t u32BufferSz);
|
||||
@brief Sends certificates to the WINC.
|
||||
@param[in] pu8Buffer
|
||||
Pointer to the certificates. The buffer format must match the format of @ref tstrTlsSrvSecHdr.
|
||||
@param[in] u32BufferSz
|
||||
Size of the certificates.
|
||||
@return The function returns @ref M2M_SUCCESS for success and a negative value otherwise.
|
||||
*/
|
||||
int8_t m2m_ssl_send_certs_to_winc(uint8_t *pu8Buffer, uint32_t u32BufferSz);
|
||||
|
||||
/*!
|
||||
@ingroup SSLFUNCTIONS
|
||||
@fn int8_t m2m_ssl_retrieve_next_for_verifying(tenuEcNamedCurve *penuCurve, uint8_t *pu8Value, uint16_t *pu16ValueSz, uint8_t *pu8Sig, uint16_t *pu16SigSz, tstrECPoint *pstrKey);
|
||||
@brief Retrieve the next set of information from the WINC for ECDSA verification.
|
||||
@param[out] penuCurve
|
||||
The named curve.
|
||||
@param[out] pu8Value
|
||||
Value retrieved for verification. This is the digest of the message, truncated/prepended to the appropriate size.
|
||||
@param[inout] pu16ValueSz
|
||||
in: Size of value buffer provided by caller.
|
||||
out: Size of value retrieved (provided for convenience; the value size is in fact determined by the curve).
|
||||
@param[out] pu8Sig
|
||||
Signature retrieved for verification.
|
||||
@param[inout] pu16SigSz
|
||||
in: Size of signature buffer provided by caller.
|
||||
out: Size of signature retrieved (provided for convenience; the signature size is in fact determined by the curve).
|
||||
@param[out] pstrKey
|
||||
Public key retrieved for verification.
|
||||
@return The function returns @ref M2M_SUCCESS for success and a negative value otherwise.
|
||||
|
||||
@pre This function should only be called after the application has been notified that
|
||||
verification information is ready via @ref ECC_REQ_SIGN_VERIFY.
|
||||
|
||||
@warning If this function returns @ref M2M_ERR_FAIL, then any remaining verification info from
|
||||
the WINC is lost.
|
||||
*/
|
||||
int8_t m2m_ssl_retrieve_next_for_verifying(tenuEcNamedCurve *penuCurve, uint8_t *pu8Value, uint16_t *pu16ValueSz, uint8_t *pu8Sig, uint16_t *pu16SigSz, tstrECPoint *pstrKey);
|
||||
|
||||
/*!
|
||||
@ingroup SSLFUNCTIONS
|
||||
@fn int8_t m2m_ssl_retrieve_cert(uint16_t *pu16Curve, uint8_t *pu8Value, uint8_t *pu8Sig, tstrECPoint *pstrKey);
|
||||
@brief Retrieve the next set of information from the WINC for ECDSA verification.
|
||||
@param[out] pu16Curve
|
||||
The named curve, to be cast to type @ref tenuEcNamedCurve.
|
||||
@param[out] pu8Value
|
||||
Value retrieved for verification. This is the digest of the message, truncated/prepended to the appropriate size.
|
||||
The size of the value is equal to the field size of the curve, hence is determined by pu16Curve.
|
||||
@param[out] pu8Sig
|
||||
Signature retrieved for verification.
|
||||
The size of the signature is equal to twice the field size of the curve, hence is determined by pu16Curve.
|
||||
@param[out] pstrKey
|
||||
Public key retrieved for verification.
|
||||
@return The function returns @ref M2M_SUCCESS for success and a negative value otherwise.
|
||||
|
||||
@pre This function should only be called after the application has been notified that
|
||||
verification information is ready via @ref ECC_REQ_SIGN_VERIFY.
|
||||
|
||||
@warning If this function returns @ref M2M_ERR_FAIL, then any remaining verification info from
|
||||
the WINC is lost.
|
||||
|
||||
@warning This API has been deprecated and is kept for legacy purposes only. It is recommended
|
||||
that @ref m2m_ssl_retrieve_next_for_verifying is used instead.
|
||||
*/
|
||||
int8_t m2m_ssl_retrieve_cert(uint16_t *pu16Curve, uint8_t *pu8Value, uint8_t *pu8Sig, tstrECPoint *pstrKey);
|
||||
|
||||
/*!
|
||||
@ingroup SSLFUNCTIONS
|
||||
@fn int8_t m2m_ssl_retrieve_hash(uint8_t *pu8Value, uint16_t u16ValueSz)
|
||||
@brief Retrieve the value from the WINC for ECDSA signing.
|
||||
@param[out] pu8Value
|
||||
Value retrieved for signing. This is the digest of the message, truncated/prepended to the appropriate size.
|
||||
@param[in] u16ValueSz
|
||||
Size of value to be retrieved. (The application should obtain this information,
|
||||
along with the curve, from the associated @ref ECC_REQ_SIGN_GEN notification.)
|
||||
@return The function returns @ref M2M_SUCCESS for success and a negative value otherwise.
|
||||
|
||||
@pre This function should only be called after the application has been notified that
|
||||
signing information is ready via @ref ECC_REQ_SIGN_GEN.
|
||||
|
||||
@warning If this function returns @ref M2M_ERR_FAIL, then the value for signing is lost.
|
||||
*/
|
||||
int8_t m2m_ssl_retrieve_hash(uint8_t *pu8Value, uint16_t u16ValueSz);
|
||||
|
||||
/*!
|
||||
@ingroup SSLFUNCTIONS
|
||||
@fn void m2m_ssl_stop_retrieving(void);
|
||||
@brief Allow SSL driver to tidy up when the application chooses not to retrieve all available
|
||||
information.
|
||||
|
||||
@return None.
|
||||
|
||||
@warning The application must call this function if it has been notified (via
|
||||
@ref ECC_REQ_SIGN_GEN or @ref ECC_REQ_SIGN_VERIFY) that information is available for
|
||||
retrieving from the WINC, but chooses not to retrieve it all.
|
||||
The application must not call this function if it has retrieved all the available
|
||||
information, or if a retrieve function returned @ref M2M_ERR_FAIL indicating that any
|
||||
remaining information has been lost.
|
||||
|
||||
@see m2m_ssl_retrieve_next_for_verifying\n
|
||||
m2m_ssl_retrieve_cert\n
|
||||
m2m_ssl_retrieve_hash
|
||||
*/
|
||||
void m2m_ssl_stop_retrieving(void);
|
||||
|
||||
/*!
|
||||
@ingroup SSLFUNCTIONS
|
||||
@fn NMI_API void m2m_ssl_stop_processing_certs(void);
|
||||
@brief Allow SSL driver to tidy up in case application does not read all available certificates.
|
||||
@return None.
|
||||
|
||||
@warning This API has been deprecated and is kept for legacy purposes only. It is recommended
|
||||
that @ref m2m_ssl_stop_retrieving is used instead.
|
||||
*/
|
||||
void m2m_ssl_stop_processing_certs(void);
|
||||
|
||||
/*!
|
||||
@ingroup SSLFUNCTIONS
|
||||
@fn void m2m_ssl_ecc_process_done(void);
|
||||
@brief Allow SSL driver to tidy up after application has finished processing ECC message.
|
||||
|
||||
@return None.
|
||||
|
||||
@warning The application should call this function after receiving an SSL callback with message
|
||||
type @ref M2M_SSL_REQ_ECC, after retrieving any related information, and before
|
||||
calling @ref m2m_ssl_handshake_rsp.
|
||||
*/
|
||||
void m2m_ssl_ecc_process_done(void);
|
||||
|
||||
/*!
|
||||
@ingroup SSLFUNCTIONS
|
||||
@fn int8_t m2m_ssl_set_active_ciphersuites(uint32_t u32SslCsBMP);
|
||||
@brief Sets the active ciphersuites.
|
||||
@details Override the default Active SSL ciphers in the SSL module with a certain combination selected by
|
||||
the caller in the form of a bitmap containing the required ciphers to be on.\n
|
||||
There is no need to call this function if the application will not change the default ciphersuites.
|
||||
@param[in] u32SslCsBMP
|
||||
Bitmap containing the desired ciphers to be enabled for the SSL module. The ciphersuites are defined in
|
||||
@ref SSLCipherSuiteID.
|
||||
The default ciphersuites are all ciphersuites supported by the firmware with the exception of ECC ciphersuites.
|
||||
The caller can override the default with any desired combination.
|
||||
If u32SslCsBMP does not contain any ciphersuites supported by firmware, then the current active list will not
|
||||
change.
|
||||
@return The function returns @ref M2M_SUCCESS for success and a negative value otherwise.
|
||||
*/
|
||||
int8_t m2m_ssl_set_active_ciphersuites(uint32_t u32SslCsBMP);
|
||||
|
||||
#endif /* __M2M_SSL_H__ */
|
||||
2745
ChaletLora.X/Source/winc3400_142/driver/include/m2m_types.h
Normal file
2745
ChaletLora.X/Source/winc3400_142/driver/include/m2m_types.h
Normal file
File diff suppressed because it is too large
Load Diff
4147
ChaletLora.X/Source/winc3400_142/driver/include/m2m_wifi.h
Normal file
4147
ChaletLora.X/Source/winc3400_142/driver/include/m2m_wifi.h
Normal file
File diff suppressed because it is too large
Load Diff
148
ChaletLora.X/Source/winc3400_142/driver/include/nmasic.h
Normal file
148
ChaletLora.X/Source/winc3400_142/driver/include/nmasic.h
Normal file
@ -0,0 +1,148 @@
|
||||
/*******************************************************************************
|
||||
This module contains WINC3400 ASIC specific internal APIs.
|
||||
|
||||
File Name:
|
||||
nmasic.h
|
||||
|
||||
Summary:
|
||||
This module contains WINC3400 ASIC specific internal APIs.
|
||||
|
||||
Description:
|
||||
This module contains WINC3400 ASIC specific internal APIs.
|
||||
*******************************************************************************/
|
||||
|
||||
//DOM-IGNORE-BEGIN
|
||||
/*******************************************************************************
|
||||
* Copyright (C) 2021 Microchip Technology Inc. and its subsidiaries.
|
||||
*
|
||||
* Subject to your compliance with these terms, you may use Microchip software
|
||||
* and any derivatives exclusively with Microchip products. It is your
|
||||
* responsibility to comply with third party license terms applicable to your
|
||||
* use of third party software (including open source software) that may
|
||||
* accompany Microchip software.
|
||||
*
|
||||
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
|
||||
* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
|
||||
* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
|
||||
* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
|
||||
* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
|
||||
* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
|
||||
* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
|
||||
* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
|
||||
* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
|
||||
*******************************************************************************/
|
||||
// DOM-IGNORE-END
|
||||
|
||||
#ifndef _NMASIC_H_
|
||||
#define _NMASIC_H_
|
||||
|
||||
#include "nm_common.h"
|
||||
|
||||
#define NMI_PERIPH_REG_BASE 0x1000
|
||||
#define NMI_CHIPID (NMI_PERIPH_REG_BASE)
|
||||
#define rNMI_GP_REG_0 (0x149c)
|
||||
#define rNMI_GP_REG_1 (0x14A0)
|
||||
#define rNMI_GLB_RESET (0x1400)
|
||||
#define rNMI_BOOT_RESET_MUX (0x1118)
|
||||
#define NMI_STATE_REG (0x108c)
|
||||
#define BOOTROM_REG (0xc000c)
|
||||
#define NMI_REV_REG (0x207ac) /*Also, Used to load ATE firmware from SPI Flash and to ensure that it is running too*/
|
||||
#define M2M_WAIT_FOR_HOST_REG (0x207bc)
|
||||
#define M2M_FINISH_INIT_STATE 0x02532636UL
|
||||
#define M2M_FINISH_BOOT_ROM 0x10add09eUL
|
||||
#define M2M_START_FIRMWARE 0xef522f61UL
|
||||
#define M2M_START_PS_FIRMWARE 0x94992610UL
|
||||
|
||||
#define M2M_ATE_FW_START_VALUE (0x3C1CD57D) /*Also, Change this value in boot_firmware if it will be changed here*/
|
||||
#define M2M_ATE_FW_IS_UP_VALUE (0xD75DC1C3) /*Also, Change this value in ATE (Burst) firmware if it will be changed here*/
|
||||
|
||||
#define REV_2B0 (0x2B0)
|
||||
#define REV_B0 (0x2B0)
|
||||
#define REV_3A0 (0x3A0)
|
||||
#define CHIP_ID_3000D (0x3000D0)
|
||||
|
||||
#define GET_CHIPID() nmi_get_chipid()
|
||||
#define ISNMC1000(id) (((id & 0xfffff000) == 0x100000) ? 1 : 0)
|
||||
#define ISNMC1500(id) (((id & 0xfffff000) == 0x150000) ? 1 : 0)
|
||||
#define ISNMC3400(id) (((id & 0xfff0f000) == 0x300000) ? 1 : 0)
|
||||
#define REV(id) ( ((id) & 0x00000fff ) )
|
||||
#define EFUSED_MAC(value) (value & 0xffff0000)
|
||||
|
||||
#define rHAVE_SDIO_IRQ_GPIO_BIT (NBIT0)
|
||||
#define rHAVE_USE_PMU_BIT (NBIT1)
|
||||
#define rHAVE_SLEEP_CLK_SRC_RTC_BIT (NBIT2)
|
||||
#define rHAVE_SLEEP_CLK_SRC_XO_BIT (NBIT3)
|
||||
#define rHAVE_EXT_PA_INV_TX_RX (NBIT4)
|
||||
#define rHAVE_LEGACY_RF_SETTINGS (NBIT5)
|
||||
#define rHAVE_LOGS_DISABLED_BIT (NBIT6)
|
||||
#define rHAVE_ETHERNET_MODE_BIT (NBIT7)
|
||||
|
||||
typedef struct {
|
||||
uint32_t u32Mac_efuse_mib;
|
||||
uint32_t u32Firmware_Ota_rev;
|
||||
} tstrGpRegs;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
/**
|
||||
* @fn nm_clkless_wake
|
||||
* @brief Wakeup the chip using clockless registers
|
||||
* @return ZERO in case of success and M2M_ERR_BUS_FAIL in case of failure
|
||||
*/
|
||||
int8_t nm_clkless_wake(void);
|
||||
|
||||
int8_t chip_wake(void);
|
||||
|
||||
int8_t chip_sleep(void);
|
||||
|
||||
void chip_idle(void);
|
||||
|
||||
void enable_rf_blocks(void);
|
||||
|
||||
int8_t enable_interrupts(void);
|
||||
|
||||
int8_t cpu_start(void);
|
||||
|
||||
uint32_t nmi_get_chipid(void);
|
||||
|
||||
uint32_t nmi_get_rfrevid(void);
|
||||
|
||||
void restore_pmu_settings_after_global_reset(void);
|
||||
|
||||
void nmi_update_pll(void);
|
||||
|
||||
void nmi_set_sys_clk_src_to_xo(void);
|
||||
|
||||
int8_t chip_reset(void);
|
||||
|
||||
int8_t wait_for_bootrom(uint8_t);
|
||||
|
||||
int8_t wait_for_firmware_start(uint8_t);
|
||||
|
||||
int8_t chip_deinit(void);
|
||||
|
||||
int8_t chip_reset_and_cpu_halt(void);
|
||||
|
||||
int8_t set_gpio_dir(uint8_t gpio, uint8_t dir);
|
||||
|
||||
int8_t set_gpio_val(uint8_t gpio, uint8_t val);
|
||||
|
||||
int8_t get_gpio_val(uint8_t gpio, uint8_t* val);
|
||||
|
||||
int8_t pullup_ctrl(uint32_t pinmask, uint8_t enable);
|
||||
|
||||
int8_t nmi_get_otp_mac_address(uint8_t *pu8MacAddr, uint8_t * pu8IsValid);
|
||||
|
||||
int8_t nmi_get_mac_address(uint8_t *pu8MacAddr);
|
||||
|
||||
int8_t chip_apply_conf(uint32_t u32conf);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /*_NMASIC_H_*/
|
||||
137
ChaletLora.X/Source/winc3400_142/driver/include/nmbus.h
Normal file
137
ChaletLora.X/Source/winc3400_142/driver/include/nmbus.h
Normal file
@ -0,0 +1,137 @@
|
||||
/*******************************************************************************
|
||||
This module contains WINC3400 bus APIs implementation.
|
||||
|
||||
File Name:
|
||||
nmbus.h
|
||||
|
||||
Summary:
|
||||
This module contains WINC3400 bus APIs implementation.
|
||||
|
||||
Description:
|
||||
This module contains WINC3400 bus APIs implementation.
|
||||
*******************************************************************************/
|
||||
|
||||
//DOM-IGNORE-BEGIN
|
||||
/*******************************************************************************
|
||||
* Copyright (C) 2021 Microchip Technology Inc. and its subsidiaries.
|
||||
*
|
||||
* Subject to your compliance with these terms, you may use Microchip software
|
||||
* and any derivatives exclusively with Microchip products. It is your
|
||||
* responsibility to comply with third party license terms applicable to your
|
||||
* use of third party software (including open source software) that may
|
||||
* accompany Microchip software.
|
||||
*
|
||||
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
|
||||
* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
|
||||
* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
|
||||
* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
|
||||
* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
|
||||
* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
|
||||
* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
|
||||
* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
|
||||
* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
|
||||
*******************************************************************************/
|
||||
// DOM-IGNORE-END
|
||||
|
||||
#ifndef _NMBUS_H_
|
||||
#define _NMBUS_H_
|
||||
|
||||
#include "nm_common.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
/**
|
||||
* @fn nm_bus_iface_init
|
||||
* @brief Initialize bus interface
|
||||
* @return @ref M2M_SUCCESS in case of success and @ref M2M_ERR_BUS_FAIL in case of failure
|
||||
*/
|
||||
int8_t nm_bus_iface_init(void *pvInitVal);
|
||||
|
||||
/**
|
||||
* @fn nm_bus_iface_deinit
|
||||
* @brief Deinitialize bus interface
|
||||
* @return @ref M2M_SUCCESS in case of success and @ref M2M_ERR_BUS_FAIL in case of failure
|
||||
*/
|
||||
int8_t nm_bus_iface_deinit(void);
|
||||
|
||||
/**
|
||||
* @fn nm_bus_reset
|
||||
* @brief Reset bus interface
|
||||
* @return @ref M2M_SUCCESS in case of success and @ref M2M_ERR_BUS_FAIL in case of failure
|
||||
* @version 1.0
|
||||
*/
|
||||
int8_t nm_bus_reset(void);
|
||||
|
||||
/**
|
||||
* @fn nm_bus_iface_reconfigure
|
||||
* @brief Reconfigure bus interface
|
||||
* @return @ref M2M_SUCCESS in case of success and @ref M2M_ERR_BUS_FAIL in case of failure
|
||||
*/
|
||||
int8_t nm_bus_iface_reconfigure(void *ptr);
|
||||
|
||||
/**
|
||||
* @fn nm_read_reg
|
||||
* @brief Read register
|
||||
* @param[in] u32Addr
|
||||
* Register address
|
||||
* @return Register value
|
||||
*/
|
||||
uint32_t nm_read_reg(uint32_t u32Addr);
|
||||
|
||||
/**
|
||||
* @fn nm_read_reg_with_ret
|
||||
* @brief Read register with error code return
|
||||
* @param[in] u32Addr
|
||||
* Register address
|
||||
* @param[out] pu32RetVal
|
||||
* Pointer to u32 variable used to return the read value
|
||||
* @return @ref M2M_SUCCESS in case of success and @ref M2M_ERR_BUS_FAIL in case of failure
|
||||
*/
|
||||
int8_t nm_read_reg_with_ret(uint32_t u32Addr, uint32_t* pu32RetVal);
|
||||
|
||||
/**
|
||||
* @fn nm_write_reg
|
||||
* @brief Write register
|
||||
* @param[in] u32Addr
|
||||
* Register address
|
||||
* @param[in] u32Val
|
||||
* Value to be written to the register
|
||||
* @return @ref M2M_SUCCESS in case of success and @ref M2M_ERR_BUS_FAIL in case of failure
|
||||
*/
|
||||
int8_t nm_write_reg(uint32_t u32Addr, uint32_t u32Val);
|
||||
|
||||
/**
|
||||
* @fn nm_read_block
|
||||
* @brief Read block of data
|
||||
* @param[in] u32Addr
|
||||
* Start address
|
||||
* @param[out] puBuf
|
||||
* Pointer to a buffer used to return the read data
|
||||
* @param[in] u32Sz
|
||||
* Number of bytes to read. The buffer size must be >= u32Sz
|
||||
* @return @ref M2M_SUCCESS in case of success and @ref M2M_ERR_BUS_FAIL in case of failure
|
||||
*/
|
||||
int8_t nm_read_block(uint32_t u32Addr, uint8_t *puBuf, uint32_t u32Sz);
|
||||
|
||||
/**
|
||||
* @fn nm_write_block
|
||||
* @brief Write block of data
|
||||
* @param[in] u32Addr
|
||||
* Start address
|
||||
* @param[in] puBuf
|
||||
* Pointer to the buffer holding the data to be written
|
||||
* @param[in] u32Sz
|
||||
* Number of bytes to write. The buffer size must be >= u32Sz
|
||||
* @return @ref M2M_SUCCESS in case of success and @ref M2M_ERR_BUS_FAIL in case of failure
|
||||
*/
|
||||
int8_t nm_write_block(uint32_t u32Addr, uint8_t *puBuf, uint32_t u32Sz);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _NMBUS_H_ */
|
||||
176
ChaletLora.X/Source/winc3400_142/driver/include/nmdrv.h
Normal file
176
ChaletLora.X/Source/winc3400_142/driver/include/nmdrv.h
Normal file
@ -0,0 +1,176 @@
|
||||
/*******************************************************************************
|
||||
This module contains WINC3400 M2M driver APIs declarations.
|
||||
|
||||
File Name:
|
||||
nmdrv.h
|
||||
|
||||
Summary:
|
||||
This module contains WINC3400 M2M driver APIs declarations.
|
||||
|
||||
Description:
|
||||
This module contains WINC3400 M2M driver APIs declarations.
|
||||
*******************************************************************************/
|
||||
|
||||
//DOM-IGNORE-BEGIN
|
||||
/*******************************************************************************
|
||||
* Copyright (C) 2021 Microchip Technology Inc. and its subsidiaries.
|
||||
*
|
||||
* Subject to your compliance with these terms, you may use Microchip software
|
||||
* and any derivatives exclusively with Microchip products. It is your
|
||||
* responsibility to comply with third party license terms applicable to your
|
||||
* use of third party software (including open source software) that may
|
||||
* accompany Microchip software.
|
||||
*
|
||||
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
|
||||
* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
|
||||
* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
|
||||
* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
|
||||
* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
|
||||
* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
|
||||
* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
|
||||
* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
|
||||
* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
|
||||
*******************************************************************************/
|
||||
// DOM-IGNORE-END
|
||||
|
||||
#ifndef _NMDRV_H_
|
||||
#define _NMDRV_H_
|
||||
|
||||
#include "nm_common.h"
|
||||
|
||||
/*!
|
||||
@enum \
|
||||
tenuNmState
|
||||
@brief
|
||||
Enumeration for WINC state
|
||||
The following is used to track the state of the WINC (not initialized, initialized or started)
|
||||
|
||||
@remarks
|
||||
This is useful when putting the WINC in "download mode" to access the flash via SPI. By using
|
||||
@ref nm_get_state and checking against the desired state, it is possible to validate whether
|
||||
it is safe to proceed with SPI Flash access.
|
||||
*/
|
||||
typedef enum {
|
||||
NM_STATE_DEINIT,
|
||||
/*!< WINC is not initialized */
|
||||
NM_STATE_INIT,
|
||||
/*!< WINC has been initialized. SPI flash access is possible. */
|
||||
NM_STATE_START,
|
||||
/*!< WINC has started */
|
||||
} tenuNmState;
|
||||
|
||||
/**
|
||||
* @struct tstrM2mRev
|
||||
* @brief Structure holding firmware version parameters and build date/time
|
||||
*/
|
||||
typedef struct {
|
||||
uint16_t u16FirmwareHifInfo; /* Fw HIF Info */
|
||||
uint8_t u8FirmwareMajor; /* Version Major Number */
|
||||
uint8_t u8FirmwareRsvd; /* Reserved */
|
||||
uint8_t u8FirmwareMinor; /* Version Minor */
|
||||
uint8_t u8FirmwarePatch; /* Patch Number */
|
||||
uint8_t BuildDate[sizeof(__DATE__)]; // 12 bytes
|
||||
uint8_t BuildTime[sizeof(__TIME__)]; // 9 bytes
|
||||
} tstrM2mRev;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
/**
|
||||
* @fn nm_get_hif_info(uint16_t *pu16FwHifInfo, uint16_t *pu16OtaHifInfo);
|
||||
* @brief Get Hif info of images in both partitions (Firmware and Ota).
|
||||
* @param[out] pu16FwHifInfo
|
||||
* Pointer holding Hif info of image in the active partition.
|
||||
* @param[out] pu16OtaHifInfo
|
||||
* Pointer holding Hif info of image in the inactive partition.
|
||||
* @return @ref M2M_SUCCESS in case of success and Negative error code in case of failure
|
||||
*/
|
||||
int8_t nm_get_hif_info(uint16_t *pu16FwHifInfo, uint16_t *pu16OtaHifInfo);
|
||||
|
||||
/**
|
||||
* @fn nm_get_firmware_full_info(tstrM2mRev* pstrRev)
|
||||
* @brief Get Firmware version info
|
||||
* @param[out] pstrRev
|
||||
* Pointer holds address of structure @ref tstrM2mRev that contains the version parameters
|
||||
* of image in the active partition.
|
||||
* @return @ref M2M_SUCCESS in case of success and Negative error code in case of failure
|
||||
*/
|
||||
int8_t nm_get_firmware_full_info(tstrM2mRev* pstrRev);
|
||||
|
||||
/**
|
||||
* @fn nm_get_ota_firmware_info(tstrM2mRev* pstrRev)
|
||||
* @brief Get Firmware version info
|
||||
* @param[out] pstrRev
|
||||
* Pointer holds address of structure @ref tstrM2mRev that contains the version parameters
|
||||
* of image in the inactive partition.
|
||||
* @return @ref M2M_SUCCESS in case of success and Negative error code in case of failure
|
||||
*/
|
||||
int8_t nm_get_ota_firmware_info(tstrM2mRev* pstrRev);
|
||||
|
||||
/**
|
||||
* @fn nm_drv_init_download_mode
|
||||
* @brief Initialize NMC1000 driver in download mode
|
||||
* @return @ref M2M_SUCCESS in case of success and Negative error code in case of failure
|
||||
*/
|
||||
int8_t nm_drv_init_download_mode(void);
|
||||
|
||||
/**
|
||||
* @fn nm_drv_init
|
||||
* @brief Initialize NMC1000 driver
|
||||
* @param[in] arg
|
||||
* Generic argument passed on to nm_drv_init_start
|
||||
* @return @ref M2M_SUCCESS in case of success and Negative error code in case of failure
|
||||
*/
|
||||
int8_t nm_drv_init(void* arg);
|
||||
|
||||
/**
|
||||
* @fn nm_drv_init_hold
|
||||
* @brief First part of nm_drv_init, up to the point of initializing spi for flash access.
|
||||
* @see nm_drv_init
|
||||
* @return @ref M2M_SUCCESS in case of success and Negative error code in case of failure
|
||||
*/
|
||||
int8_t nm_drv_init_hold(void);
|
||||
|
||||
/**
|
||||
* @fn nm_drv_init_start
|
||||
* @brief Second part of nm_drv_init, continuing from where nm_drv_init_hold left off.
|
||||
* @see nm_drv_init
|
||||
* @param[in] arg
|
||||
* Parameter inherited from nm_drv_init
|
||||
* @return @ref M2M_SUCCESS in case of success and Negative error code in case of failure
|
||||
*/
|
||||
int8_t nm_drv_init_start(void* arg);
|
||||
|
||||
/**
|
||||
* @fn nm_drv_deinit
|
||||
* @brief Deinitialize NMC1000 driver
|
||||
* @param[in] arg
|
||||
* Generic argument unused.
|
||||
* @return @ref M2M_SUCCESS in case of success and Negative error code in case of failure
|
||||
*/
|
||||
int8_t nm_drv_deinit(void* arg);
|
||||
|
||||
/**
|
||||
* @fn nm_cpu_start(void)
|
||||
* @brief Start CPU from the WINC module
|
||||
* @return @ref M2M_SUCCESS in case of success and Negative error code in case of failure
|
||||
*/
|
||||
int8_t nm_cpu_start(void);
|
||||
|
||||
/**
|
||||
* @fn nm_get_state(void)
|
||||
* @brief Get the current state of the WINC module
|
||||
* @return The current state of the WINC module
|
||||
*/
|
||||
tenuNmState nm_get_state(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /*_NMDRV_H_*/
|
||||
|
||||
|
||||
137
ChaletLora.X/Source/winc3400_142/driver/include/nmspi.h
Normal file
137
ChaletLora.X/Source/winc3400_142/driver/include/nmspi.h
Normal file
@ -0,0 +1,137 @@
|
||||
/*******************************************************************************
|
||||
This module contains WINC3400 SPI protocol bus APIs implementation.
|
||||
|
||||
File Name:
|
||||
nmspi.h
|
||||
|
||||
Summary:
|
||||
This module contains WINC3400 SPI protocol bus APIs implementation.
|
||||
|
||||
Description:
|
||||
This module contains WINC3400 SPI protocol bus APIs implementation.
|
||||
*******************************************************************************/
|
||||
|
||||
//DOM-IGNORE-BEGIN
|
||||
/*******************************************************************************
|
||||
* Copyright (C) 2021 Microchip Technology Inc. and its subsidiaries.
|
||||
*
|
||||
* Subject to your compliance with these terms, you may use Microchip software
|
||||
* and any derivatives exclusively with Microchip products. It is your
|
||||
* responsibility to comply with third party license terms applicable to your
|
||||
* use of third party software (including open source software) that may
|
||||
* accompany Microchip software.
|
||||
*
|
||||
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
|
||||
* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
|
||||
* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
|
||||
* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
|
||||
* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
|
||||
* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
|
||||
* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
|
||||
* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
|
||||
* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
|
||||
*******************************************************************************/
|
||||
// DOM-IGNORE-END
|
||||
|
||||
#ifndef _NMSPI_H_
|
||||
#define _NMSPI_H_
|
||||
|
||||
#include "nm_common.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @fn nm_spi_init
|
||||
* @brief Initialize the SPI
|
||||
* @return @ref M2M_SUCCESS in case of success and @ref M2M_ERR_BUS_FAIL in case of failure
|
||||
*/
|
||||
int8_t nm_spi_init(void);
|
||||
|
||||
/**
|
||||
* @fn nm_spi_lock_init
|
||||
* @brief Initialize the SPI lock
|
||||
* @return None
|
||||
*/
|
||||
void nm_spi_lock_init(void);
|
||||
|
||||
/**
|
||||
* @fn nm_spi_reset
|
||||
* @brief Reset the SPI
|
||||
* @return @ref M2M_SUCCESS in case of success and @ref M2M_ERR_BUS_FAIL in case of failure
|
||||
*/
|
||||
int8_t nm_spi_reset(void);
|
||||
|
||||
/**
|
||||
* @fn nm_spi_deinit
|
||||
* @brief DeInitialize the SPI
|
||||
* @return @ref M2M_SUCCESS in case of success and @ref M2M_ERR_BUS_FAIL in case of failure
|
||||
*/
|
||||
int8_t nm_spi_deinit(void);
|
||||
|
||||
/**
|
||||
* @fn nm_spi_read_reg
|
||||
* @brief Read register
|
||||
* @param[in] u32Addr
|
||||
* Register address
|
||||
* @return Register value
|
||||
*/
|
||||
uint32_t nm_spi_read_reg(uint32_t u32Addr);
|
||||
|
||||
/**
|
||||
* @fn nm_spi_read_reg_with_ret
|
||||
* @brief Read register with error code return
|
||||
* @param[in] u32Addr
|
||||
* Register address
|
||||
* @param[out] pu32RetVal
|
||||
* Pointer to u32 variable used to return the read value
|
||||
* @return @ref M2M_SUCCESS in case of success and @ref M2M_ERR_BUS_FAIL in case of failure
|
||||
*/
|
||||
int8_t nm_spi_read_reg_with_ret(uint32_t u32Addr, uint32_t* pu32RetVal);
|
||||
|
||||
/**
|
||||
* @fn nm_spi_write_reg
|
||||
* @brief Write register
|
||||
* @param[in] u32Addr
|
||||
* Register address
|
||||
* @param[in] u32Val
|
||||
* Value to be written to the register
|
||||
* @return @ref M2M_SUCCESS in case of success and @ref M2M_ERR_BUS_FAIL in case of failure
|
||||
*/
|
||||
int8_t nm_spi_write_reg(uint32_t u32Addr, uint32_t u32Val);
|
||||
|
||||
/**
|
||||
* @fn nm_spi_read_block
|
||||
* @brief Read block of data
|
||||
* @param[in] u32Addr
|
||||
* Start address
|
||||
* @param[out] puBuf
|
||||
* Pointer to a buffer used to return the read data
|
||||
* @param[in] u16Sz
|
||||
* Number of bytes to read. The buffer size must be >= u16Sz
|
||||
* @return @ref M2M_SUCCESS in case of success and @ref M2M_ERR_BUS_FAIL in case of failure
|
||||
*/
|
||||
int8_t nm_spi_read_block(uint32_t u32Addr, uint8_t *puBuf, uint16_t u16Sz);
|
||||
|
||||
/**
|
||||
* @fn nm_spi_write_block
|
||||
* @brief Write block of data
|
||||
* @param[in] u32Addr
|
||||
* Start address
|
||||
* @param[in] puBuf
|
||||
* Pointer to the buffer holding the data to be written
|
||||
* @param[in] u16Sz
|
||||
* Number of bytes to write. The buffer size must be >= u16Sz
|
||||
* @return @ref M2M_SUCCESS in case of success and @ref M2M_ERR_BUS_FAIL in case of failure
|
||||
*/
|
||||
int8_t nm_spi_write_block(uint32_t u32Addr, uint8_t *puBuf, uint16_t u16Sz);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _NMSPI_H_ */
|
||||
354
ChaletLora.X/Source/winc3400_142/driver/source/m2m_flash.c
Normal file
354
ChaletLora.X/Source/winc3400_142/driver/source/m2m_flash.c
Normal file
@ -0,0 +1,354 @@
|
||||
/*******************************************************************************
|
||||
File Name:
|
||||
m2m_flash.c
|
||||
|
||||
Summary:
|
||||
This module contains the WINC flash interface.
|
||||
|
||||
Description:
|
||||
This module contains the WINC flash interface.
|
||||
*******************************************************************************/
|
||||
|
||||
//DOM-IGNORE-BEGIN
|
||||
/*******************************************************************************
|
||||
* Copyright (C) 2021 Microchip Technology Inc. and its subsidiaries.
|
||||
*
|
||||
* Subject to your compliance with these terms, you may use Microchip software
|
||||
* and any derivatives exclusively with Microchip products. It is your
|
||||
* responsibility to comply with third party license terms applicable to your
|
||||
* use of third party software (including open source software) that may
|
||||
* accompany Microchip software.
|
||||
*
|
||||
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
|
||||
* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
|
||||
* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
|
||||
* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
|
||||
* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
|
||||
* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
|
||||
* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
|
||||
* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
|
||||
* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
|
||||
*******************************************************************************/
|
||||
|
||||
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
|
||||
INCLUDES
|
||||
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
|
||||
#include "m2m_flash.h"
|
||||
#include "spi_flash.h"
|
||||
#include "spi_flash_map.h"
|
||||
#include "nmdrv.h"
|
||||
|
||||
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
|
||||
TYPEDEFS
|
||||
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint32_t address;
|
||||
uint32_t size;
|
||||
} tstrFlashMapEntry;
|
||||
|
||||
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
|
||||
GLOBALS
|
||||
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
|
||||
|
||||
static const tstrFlashMapEntry flashMap[] =
|
||||
{
|
||||
{0 , 0 }, // WINC_FLASH_REGION_RAW,
|
||||
{0 , OTA_IMAGE_SIZE }, // WINC_FLASH_REGION_FIRMWARE_ACTIVE,
|
||||
{0 , OTA_IMAGE_SIZE }, // WINC_FLASH_REGION_FIRMWARE_INACTIVE,
|
||||
{M2M_PLL_FLASH_OFFSET , M2M_PLL_FLASH_SZ }, // WINC_FLASH_REGION_PLL_TABLE,
|
||||
{M2M_GAIN_FLASH_OFFSET , M2M_GAIN_FLASH_SZ }, // WINC_FLASH_REGION_GAIN_TABLE,
|
||||
{M2M_PLL_FLASH_OFFSET , M2M_PLL_FLASH_SZ+M2M_GAIN_FLASH_SZ}, // WINC_FLASH_REGION_PLL_AND_GAIN_TABLES,
|
||||
{M2M_TLS_ROOTCER_FLASH_OFFSET , M2M_TLS_ROOTCER_FLASH_SZ }, // WINC_FLASH_REGION_ROOT_CERTS,
|
||||
{M2M_TLS_SERVER_FLASH_OFFSET , M2M_TLS_SERVER_FLASH_SZ }, // WINC_FLASH_REGION_LOCAL_CERTS,
|
||||
{M2M_CACHED_CONNS_FLASH_OFFSET , M2M_CACHED_CONNS_FLASH_SZ }, // WINC_FLASH_REGION_CONN_PARAM,
|
||||
{0 , M2M_HTTP_MEM_FLASH_SZ }, // WINC_FLASH_REGION_HTTP_FILES,
|
||||
};
|
||||
|
||||
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
|
||||
FUNCTIONS
|
||||
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
|
||||
|
||||
static int8_t winc_flash_compare(uint8_t *pu8Buf, uint32_t u32Offset, uint32_t u32Size)
|
||||
{
|
||||
int8_t ret = M2M_SUCCESS;
|
||||
uint8_t buf[128];
|
||||
uint32_t offset = 0;
|
||||
|
||||
while(offset < u32Size)
|
||||
{
|
||||
uint32_t chunk_sz = sizeof(buf);
|
||||
if(chunk_sz > u32Size - offset)
|
||||
chunk_sz = u32Size - offset;
|
||||
ret = spi_flash_read(buf, u32Offset + offset, chunk_sz);
|
||||
if(ret != M2M_SUCCESS)
|
||||
break;
|
||||
ret = memcmp(buf, pu8Buf + offset, chunk_sz);
|
||||
if(ret != 0)
|
||||
break;
|
||||
offset += chunk_sz;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
static int8_t winc_flash_write_verify(uint8_t *pu8Buf, uint32_t u32Offset, uint32_t u32Size)
|
||||
{
|
||||
int8_t ret = M2M_ERR_FAIL;
|
||||
uint8_t count = 20;
|
||||
|
||||
while((ret != M2M_SUCCESS) && (count-- > 0))
|
||||
{
|
||||
ret = spi_flash_write(pu8Buf, u32Offset, u32Size);
|
||||
if(ret == M2M_SUCCESS)
|
||||
ret = winc_flash_compare(pu8Buf, u32Offset, u32Size);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Some internal functions for accessing the control structure. */
|
||||
static uint8_t crc7(uint8_t crc, const uint8_t *buff, uint16_t len)
|
||||
{
|
||||
uint8_t reg = crc;
|
||||
uint16_t i;
|
||||
for(i = 0; i < len; i++)
|
||||
{
|
||||
uint16_t g;
|
||||
for(g = 0; g < 8; g++)
|
||||
{
|
||||
uint8_t inv = (((buff[i] << g) & 0x80) >> 7) ^ ((reg >> 6) & 1);
|
||||
reg = ((reg << 1) & 0x7f) ^ (9 * inv);
|
||||
}
|
||||
}
|
||||
return reg;
|
||||
}
|
||||
static int8_t verify_control_structure(tstrOtaControlSec *pstrControlSec)
|
||||
{
|
||||
int8_t s8Ret = M2M_SUCCESS;
|
||||
|
||||
if(pstrControlSec->u32OtaMagicValue != OTA_MAGIC_VALUE)
|
||||
s8Ret = M2M_ERR_FAIL;
|
||||
if(pstrControlSec->u32OtaControlSecCrc != crc7(0x7f, (uint8_t *)pstrControlSec, sizeof(tstrOtaControlSec) - 4))
|
||||
s8Ret = M2M_ERR_FAIL;
|
||||
|
||||
return s8Ret;
|
||||
}
|
||||
static int8_t read_control_structure(tstrOtaControlSec *pstrControlSec)
|
||||
{
|
||||
int8_t s8Ret;
|
||||
|
||||
s8Ret = spi_flash_read((uint8_t *)pstrControlSec, M2M_CONTROL_FLASH_OFFSET, sizeof(tstrOtaControlSec));
|
||||
if(s8Ret == M2M_SUCCESS)
|
||||
s8Ret = verify_control_structure(pstrControlSec);
|
||||
|
||||
if(s8Ret != M2M_SUCCESS)
|
||||
{
|
||||
s8Ret = spi_flash_read((uint8_t *)pstrControlSec, M2M_BACKUP_FLASH_OFFSET, sizeof(tstrOtaControlSec));
|
||||
if(s8Ret == M2M_SUCCESS)
|
||||
s8Ret = verify_control_structure(pstrControlSec);
|
||||
}
|
||||
|
||||
return s8Ret;
|
||||
}
|
||||
static int8_t update_control_structure(tstrOtaControlSec *pstrControlSec)
|
||||
{
|
||||
int8_t ret = M2M_ERR_FAIL;
|
||||
|
||||
ret = spi_flash_erase(M2M_BACKUP_FLASH_OFFSET, M2M_BACKUP_FLASH_SZ);
|
||||
if(ret == M2M_SUCCESS)
|
||||
{
|
||||
pstrControlSec->u32OtaSequenceNumber++;
|
||||
pstrControlSec->u32OtaControlSecCrc = crc7(0x7f, (uint8_t *)pstrControlSec, sizeof(tstrOtaControlSec) - 4);
|
||||
ret = winc_flash_write_verify((uint8_t *)pstrControlSec, M2M_BACKUP_FLASH_OFFSET, sizeof(tstrOtaControlSec));
|
||||
if(ret == M2M_SUCCESS)
|
||||
{
|
||||
ret = spi_flash_erase(M2M_CONTROL_FLASH_OFFSET, M2M_CONTROL_FLASH_SZ);
|
||||
if(ret == M2M_SUCCESS)
|
||||
{
|
||||
pstrControlSec->u32OtaSequenceNumber++;
|
||||
pstrControlSec->u32OtaControlSecCrc = crc7(0x7f, (uint8_t *)pstrControlSec, sizeof(tstrOtaControlSec) - 4);
|
||||
ret = winc_flash_write_verify((uint8_t *)pstrControlSec, M2M_CONTROL_FLASH_OFFSET, sizeof(tstrOtaControlSec));
|
||||
}
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
static bool find_flash_section(tenuWincFlashRegion enuRegion, uint32_t *pu32StartAddr, uint32_t *pu32Size)
|
||||
{
|
||||
/* Ensure the pointers and region are valid. */
|
||||
if((NULL == pu32StartAddr) || (NULL == pu32Size) || (enuRegion >= WINC_FLASH_NUM_REGIONS))
|
||||
return false;
|
||||
|
||||
/* For the raw region resolve the full flash space, otherwise lookup
|
||||
the region location and size from the flexible flash map. */
|
||||
switch(enuRegion)
|
||||
{
|
||||
case WINC_FLASH_REGION_RAW:
|
||||
*pu32StartAddr = 0;
|
||||
*pu32Size = spi_flash_get_size() << 17;
|
||||
break;
|
||||
case WINC_FLASH_REGION_FIRMWARE_ACTIVE:
|
||||
case WINC_FLASH_REGION_FIRMWARE_INACTIVE:
|
||||
case WINC_FLASH_REGION_HTTP_FILES:
|
||||
{
|
||||
/* In these cases we need to read the control structure to find the appropriate flash address. */
|
||||
tstrOtaControlSec strControl;
|
||||
|
||||
/* Check the WINC is initialised and not running. */
|
||||
if (NM_STATE_INIT != nm_get_state())
|
||||
return false;
|
||||
|
||||
/* Read control structure from flash. */
|
||||
if (M2M_SUCCESS != read_control_structure(&strControl))
|
||||
return false;
|
||||
|
||||
if (WINC_FLASH_REGION_FIRMWARE_INACTIVE == enuRegion)
|
||||
*pu32StartAddr = strControl.u32OtaRollbackImageOffset;
|
||||
else if (WINC_FLASH_REGION_FIRMWARE_ACTIVE == enuRegion)
|
||||
*pu32StartAddr = strControl.u32OtaCurrentWorkingImagOffset;
|
||||
else if (WINC_FLASH_REGION_HTTP_FILES == enuRegion)
|
||||
*pu32StartAddr = strControl.u32OtaCurrentWorkingImagOffset + (M2M_HTTP_MEM_FLASH_OFFSET - M2M_OTA_IMAGE1_OFFSET);
|
||||
|
||||
*pu32Size = flashMap[enuRegion].size;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
*pu32StartAddr = flashMap[enuRegion].address;
|
||||
*pu32Size = flashMap[enuRegion].size;
|
||||
break;
|
||||
}
|
||||
|
||||
M2M_INFO("Flash lookup %2d: 0x%06" PRIx32 " %0" PRId32 "\r\n", enuRegion, *pu32StartAddr, *pu32Size);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
int8_t m2m_flash_erase_sector(tenuWincFlashRegion enuRegion, uint8_t u8StartSector, uint8_t u8NumSectors)
|
||||
{
|
||||
uint32_t flashAddress;
|
||||
uint32_t flashRegionSize;
|
||||
|
||||
/* Check the WINC is initialised and not running. */
|
||||
if(NM_STATE_INIT != nm_get_state())
|
||||
return M2M_ERR_FAIL;
|
||||
|
||||
/* Check the region is valid. */
|
||||
if(enuRegion >= WINC_FLASH_NUM_REGIONS)
|
||||
return M2M_ERR_INVALID_ARG;
|
||||
|
||||
/* Find region address and size. */
|
||||
if(false == find_flash_section(enuRegion, &flashAddress, &flashRegionSize))
|
||||
return M2M_ERR_FAIL;
|
||||
|
||||
/* Erase is only supported for regions which begin on a sector boundary. */
|
||||
if(flashAddress & (FLASH_SECTOR_SZ-1))
|
||||
return M2M_ERR_INVALID_ARG;
|
||||
|
||||
/* Check requested size fits within region size. */
|
||||
if((((uint32_t)u8StartSector + u8NumSectors) * FLASH_SECTOR_SZ) > flashRegionSize)
|
||||
return M2M_ERR_FAIL;
|
||||
|
||||
/* Find start address of area within requested region. */
|
||||
flashAddress += (u8StartSector * FLASH_SECTOR_SZ);
|
||||
|
||||
/* Erase the requested sectors. */
|
||||
if(M2M_SUCCESS != spi_flash_erase(flashAddress, u8NumSectors * FLASH_SECTOR_SZ))
|
||||
return M2M_ERR_FAIL;
|
||||
|
||||
return M2M_SUCCESS;
|
||||
}
|
||||
|
||||
int8_t m2m_flash_write(tenuWincFlashRegion enuRegion, void *pvBuffer, uint32_t u32Offset, uint32_t u32Size)
|
||||
{
|
||||
uint32_t flashAddress;
|
||||
uint32_t flashRegionSize;
|
||||
|
||||
/* Check the WINC is initialised and not running. */
|
||||
if(NM_STATE_INIT != nm_get_state())
|
||||
return M2M_ERR_FAIL;
|
||||
|
||||
/* Check the buffer pointer and region are valid. */
|
||||
if((NULL == pvBuffer) || (enuRegion >= WINC_FLASH_NUM_REGIONS))
|
||||
return M2M_ERR_INVALID_ARG;
|
||||
|
||||
/* Find region address and size. */
|
||||
if(false == find_flash_section(enuRegion, &flashAddress, &flashRegionSize))
|
||||
return M2M_ERR_FAIL;
|
||||
|
||||
/* Check requested size fits within region size. Also check for wraparound. */
|
||||
if(((u32Offset + u32Size) > flashRegionSize) || ((uint32_t)(u32Offset + u32Size) < u32Offset))
|
||||
return M2M_ERR_FAIL;
|
||||
|
||||
/* Find start address of area within requested region. */
|
||||
flashAddress += u32Offset;
|
||||
|
||||
/* Write data to flash. */
|
||||
if(M2M_SUCCESS != spi_flash_write(pvBuffer, flashAddress, u32Size))
|
||||
return M2M_ERR_FAIL;
|
||||
|
||||
return M2M_SUCCESS;
|
||||
}
|
||||
|
||||
int8_t m2m_flash_read(tenuWincFlashRegion enuRegion, void *pvBuffer, uint32_t u32Offset, uint32_t u32Size)
|
||||
{
|
||||
uint32_t flashAddress;
|
||||
uint32_t flashRegionSize;
|
||||
|
||||
/* Check the WINC is initialised and not running. */
|
||||
if(NM_STATE_INIT != nm_get_state())
|
||||
return M2M_ERR_FAIL;
|
||||
|
||||
/* Check the buffer pointer and region are valid. */
|
||||
if((NULL == pvBuffer) || (enuRegion >= WINC_FLASH_NUM_REGIONS))
|
||||
return M2M_ERR_INVALID_ARG;
|
||||
|
||||
/* Find region address and size. */
|
||||
if(false == find_flash_section(enuRegion, &flashAddress, &flashRegionSize))
|
||||
return M2M_ERR_FAIL;
|
||||
|
||||
/* Check requested size fits within region size. Also check for wraparound. */
|
||||
if(((u32Offset + u32Size) > flashRegionSize) || ((uint32_t)(u32Offset + u32Size) < u32Offset))
|
||||
return M2M_ERR_FAIL;
|
||||
|
||||
/* Find start address of area within requested region. */
|
||||
flashAddress += u32Offset;
|
||||
|
||||
/* Read data from flash. */
|
||||
if(M2M_SUCCESS != spi_flash_read(pvBuffer, flashAddress, u32Size))
|
||||
return M2M_ERR_FAIL;
|
||||
|
||||
return M2M_SUCCESS;
|
||||
}
|
||||
|
||||
int8_t m2m_flash_switch_firmware(void)
|
||||
{
|
||||
tstrOtaControlSec strControl;
|
||||
uint32_t u32Tmp;
|
||||
|
||||
/* Check the WINC is initialised and not running. */
|
||||
if(NM_STATE_INIT != nm_get_state())
|
||||
return M2M_ERR_FAIL;
|
||||
|
||||
/* Read control structure from flash. */
|
||||
if(M2M_SUCCESS != read_control_structure(&strControl))
|
||||
return M2M_ERR_FAIL;
|
||||
|
||||
/* Switch active and inactive. */
|
||||
u32Tmp = strControl.u32OtaRollbackImageOffset;
|
||||
strControl.u32OtaRollbackImageOffset = strControl.u32OtaCurrentWorkingImagOffset;
|
||||
strControl.u32OtaCurrentWorkingImagOffset = u32Tmp;
|
||||
|
||||
/* Ensure the inactive image is marked as invalid. This protects m2m_ota_switch_firmware from
|
||||
switching to an image whose validity is unknown. Switching remains possible via this API. */
|
||||
strControl.u32OtaRollbackImageValidStatus = OTA_STATUS_INVALID;
|
||||
|
||||
if(M2M_SUCCESS != update_control_structure(&strControl))
|
||||
return M2M_ERR_FAIL;
|
||||
|
||||
return M2M_SUCCESS;
|
||||
}
|
||||
|
||||
//DOM-IGNORE-END
|
||||
857
ChaletLora.X/Source/winc3400_142/driver/source/m2m_hif.c
Normal file
857
ChaletLora.X/Source/winc3400_142/driver/source/m2m_hif.c
Normal file
@ -0,0 +1,857 @@
|
||||
/*******************************************************************************
|
||||
File Name:
|
||||
m2m_hif.c
|
||||
|
||||
Summary:
|
||||
This module contains M2M host interface API implementations.
|
||||
|
||||
Description:
|
||||
This module contains M2M host interface API implementations.
|
||||
*******************************************************************************/
|
||||
|
||||
//DOM-IGNORE-BEGIN
|
||||
/*******************************************************************************
|
||||
* Copyright (C) 2021 Microchip Technology Inc. and its subsidiaries.
|
||||
*
|
||||
* Subject to your compliance with these terms, you may use Microchip software
|
||||
* and any derivatives exclusively with Microchip products. It is your
|
||||
* responsibility to comply with third party license terms applicable to your
|
||||
* use of third party software (including open source software) that may
|
||||
* accompany Microchip software.
|
||||
*
|
||||
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
|
||||
* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
|
||||
* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
|
||||
* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
|
||||
* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
|
||||
* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
|
||||
* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
|
||||
* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
|
||||
* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
|
||||
*******************************************************************************/
|
||||
|
||||
#include "nm_common.h"
|
||||
#include "nmbus.h"
|
||||
#include "nmdrv.h"
|
||||
#include "nm_bsp.h"
|
||||
#include "m2m_hif.h"
|
||||
#include "m2m_types.h"
|
||||
#include "nmasic.h"
|
||||
#include "m2m_periph.h"
|
||||
//#include "wdrv_winc_common.h"
|
||||
//#include "osal/osal.h"
|
||||
|
||||
#define NMI_AHB_DATA_MEM_BASE 0x30000
|
||||
#define NMI_AHB_SHARE_MEM_BASE 0xd0000
|
||||
|
||||
#define WIFI_HOST_RCV_CTRL_0 (0x1070)
|
||||
#define WIFI_HOST_RCV_CTRL_1 (0x1084)
|
||||
#define WIFI_HOST_RCV_CTRL_2 (0x1078)
|
||||
#define WIFI_HOST_RCV_CTRL_3 (0x106c)
|
||||
#define WIFI_HOST_RCV_CTRL_4 (0x150400)
|
||||
|
||||
|
||||
#define INTERRUPT_CORTUS_0_3000D0 (0x10a8)
|
||||
#define INTERRUPT_CORTUS_1_3000D0 (0x10ac)
|
||||
#define INTERRUPT_CORTUS_2_3000D0 (0x10b0)
|
||||
#define INTERRUPT_CORTUS_3_3000D0 (0x10b4)
|
||||
|
||||
//static OSAL_SEM_HANDLE_TYPE hifSemaphore;
|
||||
|
||||
typedef struct {
|
||||
uint8_t u8ChipMode;
|
||||
uint8_t u8ChipSleep;
|
||||
uint8_t u8HifRXDone;
|
||||
uint8_t u8Interrupt;
|
||||
uint32_t u32RxAddr;
|
||||
uint32_t u32RxSize;
|
||||
tpfHifCallBack pfWifiCb;
|
||||
tpfHifCallBack pfIpCb;
|
||||
tpfHifCallBack pfOtaCb;
|
||||
tpfHifCallBack pfSigmaCb;
|
||||
tpfHifCallBack pfHifCb;
|
||||
//tpfHifCallBack pfCryptoCb;
|
||||
tpfHifCallBack pfSslCb;
|
||||
} tstrHifContext;
|
||||
|
||||
volatile tstrHifContext gstrHifCxt;
|
||||
|
||||
/*
|
||||
Special codes for managing HIF restriction to OTA rollback/switch only
|
||||
*/
|
||||
#define HIF_OTA_RB_ONLY 0xFFFF
|
||||
#define HIFCODE_OTA_RB ((M2M_REQ_GROUP_OTA << 8) | M2M_OTA_REQ_ROLLBACK)
|
||||
#define HIFCODE_OTA_SW ((M2M_REQ_GROUP_OTA << 8) | M2M_OTA_REQ_SWITCH_FIRMWARE)
|
||||
/*
|
||||
Codes for new HIF messages (since last HIF major increase).
|
||||
Only need ones which are host->winc.
|
||||
Each entry is formed of ((GroupId << 8) | OpCode)
|
||||
*/
|
||||
#define HIFCODE_SSL_WRITECERT ((M2M_REQ_GROUP_SSL << 8) | M2M_SSL_REQ_WRITE_OWN_CERTS)
|
||||
#define HIFCODE_WIFI_PASSIVESCAN ((M2M_REQ_GROUP_WIFI << 8) | M2M_WIFI_REQ_PASSIVE_SCAN)
|
||||
#define HIFCODE_WIFI_CONN ((M2M_REQ_GROUP_WIFI << 8) | M2M_WIFI_REQ_CONN)
|
||||
#define HIFCODE_WIFI_CONN_PARAM ((M2M_REQ_GROUP_WIFI << 8) | M2M_WIFI_IND_CONN_PARAM)
|
||||
#define HIFCODE_WIFI_DELETE_CRED ((M2M_REQ_GROUP_WIFI << 8) | M2M_WIFI_REQRSP_DELETE_APID)
|
||||
#define HIFCODE_WIFI_START_PROV_MODE ((M2M_REQ_GROUP_WIFI << 8) | M2M_WIFI_REQ_START_PROVISION_MODE)
|
||||
#define HIFCODE_WIFI_ENABLE_AP ((M2M_REQ_GROUP_WIFI << 8) | M2M_WIFI_REQ_ENABLE_AP)
|
||||
#define HIFCODE_IP_RAW_SOCK_OPT ((M2M_REQ_GROUP_IP << 8) | SOCKET_CMD_RAW_SET_SOCK_OPT)
|
||||
#define HIFCODE_WIFI_ROAMING ((M2M_REQ_GROUP_WIFI << 8) | M2M_WIFI_REQ_ROAMING)
|
||||
#define HIFCODE_IP_SECURE ((M2M_REQ_GROUP_IP << 8) | SOCKET_CMD_SECURE)
|
||||
#define HIFCODE_WIFI_SCAN_SSID_LIST ((M2M_REQ_GROUP_WIFI << 8) | M2M_WIFI_REQ_SCAN_SSID_LIST)
|
||||
#define HIFCODE_WIFI_SET_STOP_SCAN_OPTION ((M2M_REQ_GROUP_WIFI << 8) | M2M_WIFI_REQ_SET_STOP_SCAN_OPTION)
|
||||
|
||||
/*
|
||||
List of new HIF messages (since last HIF major increase).
|
||||
Only need to list ones which are host->winc.
|
||||
Additionally, entry 0 used to indicate OTA RB/SW only.
|
||||
*/
|
||||
#define NEW_HIF_LIST \
|
||||
HIF_OTA_RB_ONLY, \
|
||||
HIFCODE_SSL_WRITECERT, \
|
||||
HIFCODE_WIFI_PASSIVESCAN, \
|
||||
HIFCODE_WIFI_CONN, \
|
||||
HIFCODE_WIFI_CONN_PARAM, \
|
||||
HIFCODE_WIFI_DELETE_CRED, \
|
||||
HIFCODE_WIFI_START_PROV_MODE, \
|
||||
HIFCODE_WIFI_ENABLE_AP, \
|
||||
HIFCODE_IP_RAW_SOCK_OPT, \
|
||||
HIFCODE_WIFI_ROAMING, \
|
||||
HIFCODE_IP_SECURE, \
|
||||
HIFCODE_WIFI_SCAN_SSID_LIST, \
|
||||
HIFCODE_WIFI_SET_STOP_SCAN_OPTION
|
||||
/*
|
||||
Array of HIF messages which are not supported by Firmware.
|
||||
During hif_init() this array is rebased using an offset determined by Firmware HIF level.
|
||||
*/
|
||||
static uint16_t gau16HifBlacklist[] = {NEW_HIF_LIST};
|
||||
#define HIF_BLACKLIST_SZ (sizeof(gau16HifBlacklist)/sizeof(gau16HifBlacklist[0]))
|
||||
static uint8_t gu8HifBlOffset = 0;
|
||||
|
||||
|
||||
static int8_t hif_set_rx_done(void)
|
||||
{
|
||||
uint32_t reg;
|
||||
int8_t ret = M2M_SUCCESS;
|
||||
gstrHifCxt.u8HifRXDone = 0;
|
||||
if (ISNMC3400(nmi_get_chipid())) {
|
||||
ret = nm_write_reg(INTERRUPT_CORTUS_0_3000D0, 1);
|
||||
if(ret != M2M_SUCCESS)goto ERR1;
|
||||
} else {
|
||||
ret = nm_read_reg_with_ret(WIFI_HOST_RCV_CTRL_0, ®);
|
||||
if(ret != M2M_SUCCESS)goto ERR1;
|
||||
|
||||
/* Set RX Done */
|
||||
reg |= NBIT1;
|
||||
ret = nm_write_reg(WIFI_HOST_RCV_CTRL_0, reg);
|
||||
if(ret != M2M_SUCCESS)goto ERR1;
|
||||
}
|
||||
|
||||
ERR1:
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @fn static void m2m_hif_cb(uint8_t u8OpCode, uint16_t u16DataSize, uint32_t u32Addr)
|
||||
* @brief WiFi call back function
|
||||
* @param[in] u8OpCode
|
||||
* HIF Opcode type.
|
||||
* @param[in] u16DataSize
|
||||
* HIF data length.
|
||||
* @param[in] u32Addr
|
||||
* HIF address.
|
||||
*/
|
||||
static void m2m_hif_cb(uint8_t u8OpCode, uint16_t u16DataSize, uint32_t u32Addr)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @fn int8_t hif_chip_wake(void);
|
||||
* @brief To Wakeup the chip.
|
||||
* @return The function shall return ZERO for successful operation and a negative value otherwise.
|
||||
*/
|
||||
int8_t hif_chip_wake(void)
|
||||
{
|
||||
int8_t ret = M2M_SUCCESS;
|
||||
if(gstrHifCxt.u8HifRXDone)
|
||||
{
|
||||
/* chip already wake for the rx not done no need to send wake request */
|
||||
return ret;
|
||||
}
|
||||
if(gstrHifCxt.u8ChipSleep == 0)
|
||||
{
|
||||
if(gstrHifCxt.u8ChipMode != M2M_NO_PS)
|
||||
{
|
||||
ret = chip_wake();
|
||||
if(ret != M2M_SUCCESS)goto ERR1;
|
||||
}
|
||||
}
|
||||
gstrHifCxt.u8ChipSleep++;
|
||||
ERR1:
|
||||
return ret;
|
||||
}
|
||||
/*!
|
||||
@fn \
|
||||
void hif_set_sleep_mode(uint8_t u8Pstype);
|
||||
|
||||
@brief
|
||||
Set the sleep mode of the HIF layer.
|
||||
|
||||
@param [in] u8Pstype
|
||||
Sleep mode.
|
||||
|
||||
@return
|
||||
The function SHALL return 0 for success and a negative value otherwise.
|
||||
*/
|
||||
|
||||
void hif_set_sleep_mode(uint8_t u8Pstype)
|
||||
{
|
||||
gstrHifCxt.u8ChipMode = u8Pstype;
|
||||
}
|
||||
|
||||
/*!
|
||||
@fn \
|
||||
uint8_t hif_get_sleep_mode(void);
|
||||
|
||||
@brief
|
||||
Get the sleep mode of the HIF layer.
|
||||
|
||||
@return
|
||||
The function SHALL return the sleep mode of the HIF layer.
|
||||
*/
|
||||
uint8_t hif_get_sleep_mode(void)
|
||||
{
|
||||
return gstrHifCxt.u8ChipMode;
|
||||
}
|
||||
|
||||
/**
|
||||
* @fn int8_t hif_chip_sleep_sc(void);
|
||||
* @brief To clear the chip sleep but keep the chip sleep
|
||||
* @return The function shall return ZERO for successful operation and a negative value otherwise.
|
||||
*/
|
||||
static int8_t hif_chip_sleep_sc(void)
|
||||
{
|
||||
if(gstrHifCxt.u8ChipSleep >= 1)
|
||||
{
|
||||
gstrHifCxt.u8ChipSleep--;
|
||||
}
|
||||
return M2M_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @fn int8_t hif_chip_sleep(void);
|
||||
* @brief To make the chip sleep.
|
||||
* @return The function shall return ZERO for successful operation and a negative value otherwise.
|
||||
*/
|
||||
int8_t hif_chip_sleep(void)
|
||||
{
|
||||
int8_t ret = M2M_SUCCESS;
|
||||
|
||||
if(gstrHifCxt.u8ChipSleep >= 1)
|
||||
{
|
||||
gstrHifCxt.u8ChipSleep--;
|
||||
}
|
||||
|
||||
if(gstrHifCxt.u8ChipSleep == 0)
|
||||
{
|
||||
if(gstrHifCxt.u8ChipMode != M2M_NO_PS)
|
||||
ret = chip_sleep();
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @fn int8_t hif_init(void * arg);
|
||||
* @brief To initialize HIF layer.
|
||||
* @param[in] arg
|
||||
* Pointer to the arguments.
|
||||
* @return The function shall return ZERO for successful operation and a negative value otherwise.
|
||||
*/
|
||||
int8_t hif_init(void *arg)
|
||||
{
|
||||
memset((uint8_t*)&gstrHifCxt, 0, sizeof(tstrHifContext));
|
||||
|
||||
// if (OSAL_RESULT_TRUE != OSAL_SEM_Create(&hifSemaphore, OSAL_SEM_TYPE_BINARY, 1, 1))
|
||||
// return M2M_ERR_INIT;
|
||||
|
||||
hif_register_cb(M2M_REQ_GROUP_HIF, m2m_hif_cb);
|
||||
return hif_chip_sleep();
|
||||
}
|
||||
|
||||
/**
|
||||
* @fn int8_t hif_deinit(void * arg);
|
||||
* @brief To Deinitialize HIF layer.
|
||||
* @param[in] arg
|
||||
* Pointer to the arguments.
|
||||
* @return The function shall return ZERO for successful operation and a negative value otherwise.
|
||||
*/
|
||||
int8_t hif_deinit(void *arg)
|
||||
{
|
||||
int8_t ret = M2M_SUCCESS;
|
||||
ret = hif_chip_wake();
|
||||
memset((uint8_t*)&gstrHifCxt, 0, sizeof(tstrHifContext));
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @fn int8_t hif_check_compatibility(uint16_t u16HifInfo);
|
||||
* @brief
|
||||
* To check the compatibility of an image with the current driver.
|
||||
* @param [in] u16HifInfo
|
||||
* HIF info of image to be checked.
|
||||
* @return The function shall return ZERO for compatible image and a negative value otherwise.
|
||||
*/
|
||||
int8_t hif_check_compatibility(uint16_t u16HifInfo)
|
||||
{
|
||||
int8_t ret = M2M_ERR_FW_VER_MISMATCH;
|
||||
if((M2M_GET_HIF_BLOCK(u16HifInfo) == M2M_HIF_BLOCK_VALUE) && (M2M_GET_HIF_MAJOR(u16HifInfo) == M2M_HIF_MAJOR_VALUE))
|
||||
{
|
||||
ret = M2M_SUCCESS;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @fn int8_t hif_enable_access(void);
|
||||
* @brief
|
||||
* To enable access to HIF layer, based on HIF level of Firmware.
|
||||
* This function reads HIF level directly from a register written by Firmware.
|
||||
* @return The function shall return ZERO for full match operation and a negative value if operation is restricted.
|
||||
*/
|
||||
int8_t hif_enable_access(void)
|
||||
{
|
||||
int8_t ret = M2M_SUCCESS;
|
||||
uint16_t fw_hif_info = 0;
|
||||
|
||||
ret = nm_get_hif_info(&fw_hif_info, NULL);
|
||||
if(ret == M2M_SUCCESS)
|
||||
{
|
||||
ret = hif_check_compatibility(fw_hif_info);
|
||||
if(ret == M2M_SUCCESS)
|
||||
{
|
||||
switch(M2M_GET_HIF_MINOR(fw_hif_info))
|
||||
{
|
||||
case 0:
|
||||
gu8HifBlOffset = 1;
|
||||
break;
|
||||
case 1:
|
||||
gu8HifBlOffset = 2;
|
||||
break;
|
||||
case 2:
|
||||
gu8HifBlOffset = 2;
|
||||
break;
|
||||
case 3:
|
||||
gu8HifBlOffset = 3;
|
||||
break;
|
||||
case 4:
|
||||
gu8HifBlOffset = 10;
|
||||
break;
|
||||
case 5:
|
||||
gu8HifBlOffset = 13;
|
||||
break;
|
||||
// Additional case to be added each time hif minor increments.
|
||||
// All additional cases to be removed in the event of a hif major increment.
|
||||
// Default catches all cases in which hif minor is greater in Firmware than in Driver.
|
||||
default:
|
||||
gu8HifBlOffset = HIF_BLACKLIST_SZ;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
gu8HifBlOffset = 0;
|
||||
M2M_ERR("HIF access limited to OTA Switch/Rollback only\r\n");
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @fn int8_t hif_check_code(uint8_t u8Gid, uint8_t u8OpCode);
|
||||
* @brief
|
||||
* To check that a particular hif message is supported with the current driver/firmware pair.
|
||||
* @param[in] u8Gid
|
||||
* Group ID.
|
||||
* @param[in] u8Opcode
|
||||
* Operation ID.
|
||||
* @return The function shall return @ref M2M_SUCCESS for success and a negative value otherwise.
|
||||
*/
|
||||
int8_t hif_check_code(uint8_t u8Gid, uint8_t u8OpCode)
|
||||
{
|
||||
uint8_t u8BlId;
|
||||
uint16_t u16HifCode = ((uint16_t)u8Gid<<8) | u8OpCode;
|
||||
if((u16HifCode == HIFCODE_OTA_RB) || (u16HifCode == HIFCODE_OTA_SW))
|
||||
{
|
||||
return M2M_SUCCESS;
|
||||
}
|
||||
if(gu8HifBlOffset == 0)
|
||||
{
|
||||
M2M_ERR("HIF OTA rb/sw only\r\n");
|
||||
return M2M_ERR_SEND;
|
||||
}
|
||||
for(u8BlId = gu8HifBlOffset; u8BlId < HIF_BLACKLIST_SZ; u8BlId++)
|
||||
{
|
||||
if(u16HifCode == gau16HifBlacklist[u8BlId])
|
||||
{
|
||||
M2M_ERR("HIF message unsupported\r\n");
|
||||
return M2M_ERR_SEND;
|
||||
}
|
||||
}
|
||||
return M2M_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @fn int8_t hif_send(uint8_t u8Gid,uint8_t u8Opcode,uint8_t *pu8CtrlBuf,uint16_t u16CtrlBufSize,
|
||||
* uint8_t *pu8DataBuf,uint16_t u16DataSize, uint16_t u16DataOffset)
|
||||
* @brief Send packet using host interface.
|
||||
*
|
||||
* @param[in] u8Gid
|
||||
* Group ID.
|
||||
* @param[in] u8Opcode
|
||||
* Operation ID.
|
||||
* @param[in] pu8CtrlBuf
|
||||
* Pointer to the Control buffer.
|
||||
* @param[in] u16CtrlBufSize
|
||||
* Control buffer size.
|
||||
* @param[in] u16DataOffset
|
||||
* Packet Data offset.
|
||||
* @param[in] pu8DataBuf
|
||||
* Packet buffer Allocated by the caller.
|
||||
* @param[in] u16DataSize
|
||||
* Packet buffer size (including the HIF header).
|
||||
* @return The function shall return @ref M2M_SUCCESS for successful operation and a negative value otherwise.
|
||||
*/
|
||||
int8_t hif_send(uint8_t u8Gid, uint8_t u8Opcode, uint8_t *pu8CtrlBuf, uint16_t u16CtrlBufSize,
|
||||
uint8_t *pu8DataBuf, uint16_t u16DataSize, uint16_t u16DataOffset)
|
||||
{
|
||||
int8_t ret = M2M_ERR_SEND;
|
||||
tstrHifHdr strHif;
|
||||
uint32_t u32CtrlDataGap = u16DataOffset;
|
||||
|
||||
// while (OSAL_RESULT_FALSE == OSAL_SEM_Pend(&hifSemaphore, OSAL_WAIT_FOREVER))
|
||||
{
|
||||
}
|
||||
|
||||
strHif.u8Opcode = u8Opcode&(~NBIT7);
|
||||
strHif.u8Gid = u8Gid;
|
||||
strHif.u16Length = M2M_HIF_HDR_OFFSET;
|
||||
|
||||
if(pu8CtrlBuf != NULL)
|
||||
{
|
||||
if(u16CtrlBufSize > M2M_HIF_MAX_PACKET_SIZE-M2M_HIF_HDR_OFFSET)
|
||||
{
|
||||
M2M_ERR("HIF %s (%dB) exceeds max (%dB)\n", "Ctrl", u16CtrlBufSize, M2M_HIF_MAX_PACKET_SIZE-M2M_HIF_HDR_OFFSET);
|
||||
goto ERR2;
|
||||
}
|
||||
strHif.u16Length += u16CtrlBufSize;
|
||||
u32CtrlDataGap -= u16CtrlBufSize;
|
||||
}
|
||||
if(pu8DataBuf != NULL)
|
||||
{
|
||||
if((uint32_t)u16DataOffset + u16DataSize > M2M_HIF_MAX_PACKET_SIZE-M2M_HIF_HDR_OFFSET)
|
||||
{
|
||||
M2M_ERR("HIF %s (%luB) exceeds max (%luB)\n", "Data", (uint32_t)u16DataOffset + u16DataSize, (uint32_t)M2M_HIF_MAX_PACKET_SIZE-M2M_HIF_HDR_OFFSET);
|
||||
goto ERR2;
|
||||
}
|
||||
strHif.u16Length += u32CtrlDataGap + u16DataSize;
|
||||
}
|
||||
|
||||
ret = hif_check_code(strHif.u8Gid, strHif.u8Opcode);
|
||||
if(ret != M2M_SUCCESS)
|
||||
{
|
||||
goto ERR2;
|
||||
}
|
||||
|
||||
if(strHif.u16Length <= M2M_HIF_MAX_PACKET_SIZE)
|
||||
{
|
||||
ret = hif_chip_wake();
|
||||
if(ret == M2M_SUCCESS)
|
||||
{
|
||||
volatile uint32_t reg, dma_addr = 0;
|
||||
volatile uint16_t cnt = 0;
|
||||
|
||||
reg = 0UL;
|
||||
reg |= (uint32_t)u8Gid;
|
||||
reg |= ((uint32_t)u8Opcode<<8);
|
||||
reg |= ((uint32_t)strHif.u16Length<<16);
|
||||
ret = nm_write_reg(NMI_STATE_REG, reg);
|
||||
if(M2M_SUCCESS != ret) goto ERR1;
|
||||
|
||||
reg = 0UL;
|
||||
reg |= NBIT1;
|
||||
ret = nm_write_reg(WIFI_HOST_RCV_CTRL_2, reg);
|
||||
if(M2M_SUCCESS != ret) goto ERR1;
|
||||
|
||||
|
||||
if (ISNMC3400(nmi_get_chipid())) {
|
||||
|
||||
ret = nm_write_reg(INTERRUPT_CORTUS_1_3000D0, 1);
|
||||
if(M2M_SUCCESS != ret) goto ERR1;
|
||||
}
|
||||
|
||||
dma_addr = 0;
|
||||
|
||||
for(cnt = 0; cnt < 1000*5; cnt ++)
|
||||
{
|
||||
ret = nm_read_reg_with_ret(WIFI_HOST_RCV_CTRL_2, (uint32_t *)®);
|
||||
if(ret != M2M_SUCCESS) break;
|
||||
/*
|
||||
* If it takes too long to get a response, the slow down to
|
||||
* avoid back-to-back register read operations.
|
||||
*/
|
||||
if(cnt >= 1000) {
|
||||
if(cnt == 1000) {
|
||||
M2M_INFO("Slowing down...\n");
|
||||
}
|
||||
nm_sleep(5);
|
||||
}
|
||||
if(!(reg & NBIT1))
|
||||
{
|
||||
ret = nm_read_reg_with_ret(WIFI_HOST_RCV_CTRL_4, (uint32_t *)&dma_addr);
|
||||
if(ret != M2M_SUCCESS) {
|
||||
/*in case of read error clear the DMA address and return error*/
|
||||
dma_addr = 0;
|
||||
goto ERR1;
|
||||
}
|
||||
/*in case of success break */
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (dma_addr != 0)
|
||||
{
|
||||
volatile uint32_t u32CurrAddr;
|
||||
u32CurrAddr = dma_addr;
|
||||
strHif.u16Length=NM_BSP_B_L_16(strHif.u16Length);
|
||||
M2M_DBG("Writing into %" PRIx32 " %d\r\n", dma_addr, strHif.u16Length);
|
||||
ret = nm_write_block(u32CurrAddr, (uint8_t*)&strHif, M2M_HIF_HDR_OFFSET);
|
||||
if(M2M_SUCCESS != ret) goto ERR1;
|
||||
u32CurrAddr += M2M_HIF_HDR_OFFSET;
|
||||
if(pu8CtrlBuf != NULL)
|
||||
{
|
||||
ret = nm_write_block(u32CurrAddr, pu8CtrlBuf, u16CtrlBufSize);
|
||||
if(M2M_SUCCESS != ret) goto ERR1;
|
||||
u32CurrAddr += u16CtrlBufSize;
|
||||
}
|
||||
if(pu8DataBuf != NULL)
|
||||
{
|
||||
u32CurrAddr += u32CtrlDataGap;
|
||||
ret = nm_write_block(u32CurrAddr, pu8DataBuf, u16DataSize);
|
||||
if(M2M_SUCCESS != ret) goto ERR1;
|
||||
u32CurrAddr += u16DataSize;
|
||||
}
|
||||
|
||||
reg = dma_addr << 2;
|
||||
|
||||
/* Following line of code is to generate the interrupt which is not strictly needed for 3400,
|
||||
but has no noticeable side effects
|
||||
*/
|
||||
reg |= NBIT1;
|
||||
ret = nm_write_reg(WIFI_HOST_RCV_CTRL_3, reg);
|
||||
if(M2M_SUCCESS != ret) goto ERR1;
|
||||
|
||||
if (ISNMC3400(nmi_get_chipid())) {
|
||||
ret = nm_write_reg(INTERRUPT_CORTUS_2_3000D0, 1);
|
||||
if(M2M_SUCCESS != ret) goto ERR1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = hif_chip_sleep();
|
||||
M2M_DBG("Failed to alloc rx size\r\n");
|
||||
ret = M2M_ERR_MEM_ALLOC;
|
||||
goto ERR2;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
M2M_ERR("(HIF)Failed to wakeup the chip\r\n");
|
||||
goto ERR2;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
M2M_ERR("HIF message length (%d) exceeds max length (%d)\r\n", strHif.u16Length, M2M_HIF_MAX_PACKET_SIZE);
|
||||
ret = M2M_ERR_SEND;
|
||||
goto ERR2;
|
||||
}
|
||||
// OSAL_SEM_Post(&hifSemaphore);
|
||||
/*actual sleep ret = M2M_SUCCESS*/
|
||||
ret = hif_chip_sleep();
|
||||
return ret;
|
||||
ERR1:
|
||||
/*reset the count but no actual sleep as it already bus error*/
|
||||
hif_chip_sleep_sc();
|
||||
ERR2:
|
||||
/*logical error*/
|
||||
// OSAL_SEM_Post(&hifSemaphore);
|
||||
return ret;
|
||||
}
|
||||
/**
|
||||
* @fn hif_isr
|
||||
* @brief Host interface interrupt service routine
|
||||
* @return @ref M2M_SUCCESS in case of success or a negative vale otherwise
|
||||
*/
|
||||
static int8_t hif_isr(void)
|
||||
{
|
||||
int8_t ret = M2M_SUCCESS;
|
||||
uint32_t reg;
|
||||
volatile tstrHifHdr strHif;
|
||||
|
||||
// while (OSAL_RESULT_FALSE == OSAL_SEM_Pend(&hifSemaphore, OSAL_WAIT_FOREVER))
|
||||
{
|
||||
}
|
||||
|
||||
ret = nm_read_reg_with_ret(WIFI_HOST_RCV_CTRL_0, ®);
|
||||
if(M2M_SUCCESS == ret)
|
||||
{
|
||||
if(reg & 0x1) /* New interrupt has been received */
|
||||
{
|
||||
uint16_t size;
|
||||
|
||||
/*Clearing RX interrupt*/
|
||||
ret = nm_read_reg_with_ret(WIFI_HOST_RCV_CTRL_0, ®);
|
||||
if(ret != M2M_SUCCESS)goto ERR1;
|
||||
reg &= ~NBIT0;
|
||||
ret = nm_write_reg(WIFI_HOST_RCV_CTRL_0, reg);
|
||||
if(ret != M2M_SUCCESS)goto ERR1;
|
||||
/* read the rx size */
|
||||
ret = nm_read_reg_with_ret(WIFI_HOST_RCV_CTRL_0, ®);
|
||||
if(M2M_SUCCESS != ret)
|
||||
{
|
||||
M2M_ERR("(hif) WIFI_HOST_RCV_CTRL_0 bus fail\r\n");
|
||||
goto ERR1;
|
||||
}
|
||||
gstrHifCxt.u8HifRXDone = 1;
|
||||
size = (uint16_t)((reg >> 2) & 0xfff);
|
||||
if (size > 0) {
|
||||
uint32_t address = 0;
|
||||
/**
|
||||
start bus transfer
|
||||
**/
|
||||
ret = nm_read_reg_with_ret(WIFI_HOST_RCV_CTRL_1, &address);
|
||||
if(M2M_SUCCESS != ret)
|
||||
{
|
||||
M2M_ERR("(hif) WIFI_HOST_RCV_CTRL_1 bus fail\r\n");
|
||||
goto ERR1;
|
||||
}
|
||||
gstrHifCxt.u32RxAddr = address;
|
||||
gstrHifCxt.u32RxSize = size;
|
||||
ret = nm_read_block(address, (uint8_t*)&strHif, sizeof(tstrHifHdr));
|
||||
strHif.u16Length = NM_BSP_B_L_16(strHif.u16Length);
|
||||
if(M2M_SUCCESS != ret)
|
||||
{
|
||||
M2M_ERR("(hif) address bus fail\r\n");
|
||||
goto ERR1;
|
||||
}
|
||||
if(strHif.u16Length != size)
|
||||
{
|
||||
if((size - strHif.u16Length) > 4)
|
||||
{
|
||||
M2M_ERR("(hif) Corrupted packet Size = %u <L = %u, G = %u, OP = %02X>\r\n",
|
||||
size, strHif.u16Length, strHif.u8Gid, strHif.u8Opcode);
|
||||
ret = M2M_ERR_BUS_FAIL;
|
||||
goto ERR1;
|
||||
}
|
||||
}
|
||||
|
||||
// OSAL_SEM_Post(&hifSemaphore);
|
||||
|
||||
if(M2M_REQ_GROUP_WIFI == strHif.u8Gid)
|
||||
{
|
||||
if(gstrHifCxt.pfWifiCb)
|
||||
gstrHifCxt.pfWifiCb(strHif.u8Opcode, strHif.u16Length - M2M_HIF_HDR_OFFSET, address + M2M_HIF_HDR_OFFSET);
|
||||
else
|
||||
M2M_ERR("WIFI callback is not registered\r\n");
|
||||
}
|
||||
else if(M2M_REQ_GROUP_IP == strHif.u8Gid)
|
||||
{
|
||||
if(gstrHifCxt.pfIpCb)
|
||||
gstrHifCxt.pfIpCb(strHif.u8Opcode, strHif.u16Length - M2M_HIF_HDR_OFFSET, address + M2M_HIF_HDR_OFFSET);
|
||||
else
|
||||
M2M_ERR("Socket callback is not registered\r\n");
|
||||
}
|
||||
else if(M2M_REQ_GROUP_OTA == strHif.u8Gid)
|
||||
{
|
||||
if(gstrHifCxt.pfOtaCb)
|
||||
gstrHifCxt.pfOtaCb(strHif.u8Opcode, strHif.u16Length - M2M_HIF_HDR_OFFSET, address + M2M_HIF_HDR_OFFSET);
|
||||
else
|
||||
M2M_ERR("OTA callback is not registered\r\n");
|
||||
}
|
||||
else if(M2M_REQ_GROUP_SIGMA == strHif.u8Gid)
|
||||
{
|
||||
if(gstrHifCxt.pfSigmaCb)
|
||||
gstrHifCxt.pfSigmaCb(strHif.u8Opcode, strHif.u16Length - M2M_HIF_HDR_OFFSET, address + M2M_HIF_HDR_OFFSET);
|
||||
else
|
||||
M2M_ERR("Sigma callback is not registered\r\n");
|
||||
}
|
||||
else if(M2M_REQ_GROUP_SSL == strHif.u8Gid)
|
||||
{
|
||||
if(gstrHifCxt.pfSslCb)
|
||||
gstrHifCxt.pfSslCb(strHif.u8Opcode, strHif.u16Length - M2M_HIF_HDR_OFFSET, address + M2M_HIF_HDR_OFFSET);
|
||||
else
|
||||
M2M_ERR("SSL callback is not registered\r\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
M2M_ERR("(hif) invalid group ID\r\n");
|
||||
return M2M_ERR_BUS_FAIL;
|
||||
}
|
||||
if(gstrHifCxt.u8HifRXDone)
|
||||
{
|
||||
M2M_ERR("(hif) host app didn't set RX Done <%u><%X>\n", strHif.u8Gid, strHif.u8Opcode);
|
||||
return hif_set_rx_done();
|
||||
}
|
||||
|
||||
return M2M_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = M2M_ERR_RCV;
|
||||
M2M_ERR("(hif) Wrong Size\r\n");
|
||||
goto ERR1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
M2M_ERR("(hif) False interrupt %lx\r\n",reg);
|
||||
ret = M2M_ERR_FAIL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
M2M_ERR("(hif) Failed to read interrupt reg\r\n");
|
||||
}
|
||||
|
||||
ERR1:
|
||||
// OSAL_SEM_Post(&hifSemaphore);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @fn hif_handle_isr(void)
|
||||
* @brief Handle interrupt received from WINC3400 firmware.
|
||||
* @return The function SHALL return 0 for success and a negative value otherwise.
|
||||
*/
|
||||
int8_t hif_handle_isr(void)
|
||||
{
|
||||
int8_t ret = M2M_SUCCESS;
|
||||
|
||||
ret = hif_isr();
|
||||
if (M2M_SUCCESS != ret)
|
||||
{
|
||||
M2M_ERR("(hif) Failed to handle interrupt %d try Again..\r\n",ret);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @fn hif_receive
|
||||
* @brief Host interface interrupt service routine
|
||||
* @param[in] u32Addr
|
||||
* Receive start address
|
||||
* @param[out] pu8Buf
|
||||
* Pointer to receive buffer. Allocated by the caller
|
||||
* @param[in] u16Sz
|
||||
* Receive buffer size
|
||||
* @param[in] isDone
|
||||
* If you don't need any more packets send True otherwise send false
|
||||
* @return The function shall return ZERO for successful operation and a negative value otherwise.
|
||||
*/
|
||||
int8_t hif_receive(uint32_t u32Addr, uint8_t *pu8Buf, uint16_t u16Sz, uint8_t isDone)
|
||||
{
|
||||
int8_t ret = M2M_SUCCESS;
|
||||
|
||||
if((u32Addr == 0) || (pu8Buf == NULL) || (u16Sz == 0))
|
||||
{
|
||||
if(isDone)
|
||||
{
|
||||
ret = hif_set_rx_done();
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = M2M_ERR_FAIL;
|
||||
M2M_ERR(" hif_receive: Invalid argument\r\n");
|
||||
}
|
||||
goto ERR1;
|
||||
}
|
||||
|
||||
if(u16Sz > gstrHifCxt.u32RxSize)
|
||||
{
|
||||
ret = M2M_ERR_FAIL;
|
||||
M2M_ERR("APP Requested Size is larger than the received buffer size <%d><%" PRId32 ">\r\n", u16Sz, gstrHifCxt.u32RxSize);
|
||||
goto ERR1;
|
||||
}
|
||||
if((u32Addr < gstrHifCxt.u32RxAddr)||((u32Addr + u16Sz)>(gstrHifCxt.u32RxAddr+gstrHifCxt.u32RxSize)))
|
||||
{
|
||||
ret = M2M_ERR_FAIL;
|
||||
M2M_ERR("APP Requested Address beyond the received buffer address and length\r\n");
|
||||
goto ERR1;
|
||||
}
|
||||
|
||||
/* Receive the payload */
|
||||
ret = nm_read_block(u32Addr, pu8Buf, u16Sz);
|
||||
if(ret != M2M_SUCCESS)goto ERR1;
|
||||
|
||||
/* check if this is the last packet */
|
||||
if(
|
||||
isDone
|
||||
|| (((gstrHifCxt.u32RxAddr+gstrHifCxt.u32RxSize) - (u32Addr+u16Sz)) <= 3)
|
||||
/* Length in the RCV CTRL 0 register is rounded off to 4 by the firmware,
|
||||
but length inside the HIF header is not, hence consider done if fewer than
|
||||
4 bytes left to read */
|
||||
)
|
||||
{
|
||||
/* set RX done */
|
||||
ret = hif_set_rx_done();
|
||||
}
|
||||
ERR1:
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @fn hif_register_cb
|
||||
* @brief To set Callback function for every component
|
||||
* @param[in] u8Grp
|
||||
* Group to which the Callback function should be set.
|
||||
* @param[in] fn
|
||||
* function to be set
|
||||
* @return The function shall return ZERO for successful operation and a negative value otherwise.
|
||||
*/
|
||||
|
||||
int8_t hif_register_cb(uint8_t u8Grp, tpfHifCallBack fn)
|
||||
{
|
||||
int8_t ret = M2M_SUCCESS;
|
||||
switch(u8Grp)
|
||||
{
|
||||
case M2M_REQ_GROUP_IP:
|
||||
gstrHifCxt.pfIpCb = fn;
|
||||
break;
|
||||
case M2M_REQ_GROUP_WIFI:
|
||||
gstrHifCxt.pfWifiCb = fn;
|
||||
break;
|
||||
case M2M_REQ_GROUP_OTA:
|
||||
gstrHifCxt.pfOtaCb = fn;
|
||||
break;
|
||||
case M2M_REQ_GROUP_HIF:
|
||||
gstrHifCxt.pfHifCb = fn;
|
||||
break;
|
||||
case M2M_REQ_GROUP_SIGMA:
|
||||
gstrHifCxt.pfSigmaCb = fn;
|
||||
break;
|
||||
case M2M_REQ_GROUP_SSL:
|
||||
gstrHifCxt.pfSslCb = fn;
|
||||
break;
|
||||
default:
|
||||
M2M_ERR("GRp ? %d\r\n", u8Grp);
|
||||
ret = M2M_ERR_FAIL;
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
//DOM-IGNORE-END
|
||||
190
ChaletLora.X/Source/winc3400_142/driver/source/m2m_ota.c
Normal file
190
ChaletLora.X/Source/winc3400_142/driver/source/m2m_ota.c
Normal file
@ -0,0 +1,190 @@
|
||||
/*******************************************************************************
|
||||
WINC3400 IoT OTA Interface.
|
||||
|
||||
File Name:
|
||||
m2m_ota.c
|
||||
|
||||
Summary:
|
||||
WINC3400 IoT OTA Interface
|
||||
|
||||
Description:
|
||||
WINC3400 IoT OTA Interface
|
||||
*******************************************************************************/
|
||||
|
||||
//DOM-IGNORE-BEGIN
|
||||
/*******************************************************************************
|
||||
* Copyright (C) 2021 Microchip Technology Inc. and its subsidiaries.
|
||||
*
|
||||
* Subject to your compliance with these terms, you may use Microchip software
|
||||
* and any derivatives exclusively with Microchip products. It is your
|
||||
* responsibility to comply with third party license terms applicable to your
|
||||
* use of third party software (including open source software) that may
|
||||
* accompany Microchip software.
|
||||
*
|
||||
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
|
||||
* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
|
||||
* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
|
||||
* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
|
||||
* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
|
||||
* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
|
||||
* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
|
||||
* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
|
||||
* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
|
||||
*******************************************************************************/
|
||||
|
||||
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
|
||||
INCLUDES
|
||||
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
|
||||
#include "nm_common.h"
|
||||
#include "m2m_types.h"
|
||||
#include "m2m_ota.h"
|
||||
#include "m2m_wifi.h"
|
||||
#include "m2m_hif.h"
|
||||
|
||||
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
|
||||
MACROS
|
||||
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
|
||||
|
||||
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
|
||||
DATA TYPES
|
||||
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
|
||||
static tpfOtaUpdateCb gpfOtaUpdateCb = NULL;
|
||||
|
||||
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
|
||||
FUNCTION PROTOTYPES
|
||||
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
|
||||
|
||||
/**
|
||||
@fn m2m_ota_cb(uint8_t u8OpCode, uint16_t u16DataSize, uint32_t u32Addr)
|
||||
@brief Internal OTA call back function.
|
||||
@param[in] u8OpCode
|
||||
HIF Opcode type.
|
||||
@param[in] u16DataSize
|
||||
HIF data length.
|
||||
@param[in] u32Addr
|
||||
HIF address.
|
||||
*/
|
||||
static void m2m_ota_cb(uint8_t u8OpCode, uint16_t u16DataSize, uint32_t u32Addr)
|
||||
{
|
||||
int8_t s8Ret = M2M_SUCCESS;
|
||||
if (u8OpCode == M2M_OTA_RESP_UPDATE_STATUS)
|
||||
{
|
||||
tstrOtaUpdateStatusResp strOtaUpdateStatusResp;
|
||||
memset((uint8_t*)&strOtaUpdateStatusResp, 0, sizeof(tstrOtaUpdateStatusResp));
|
||||
s8Ret = hif_receive(u32Addr, (uint8_t*)&strOtaUpdateStatusResp, sizeof(tstrOtaUpdateStatusResp), 0);
|
||||
if(s8Ret == M2M_SUCCESS)
|
||||
{
|
||||
if(gpfOtaUpdateCb)
|
||||
gpfOtaUpdateCb(strOtaUpdateStatusResp.u8OtaUpdateStatusType, strOtaUpdateStatusResp.u8OtaUpdateStatus);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
M2M_ERR("Invalid OTA resp %d ?\r\n", u8OpCode);
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
@fn int8_t m2m_ota_init(tpfOtaUpdateCb pfOtaUpdateCb)
|
||||
@brief Initialize the OTA layer.
|
||||
@param[in] pfOtaUpdateCb
|
||||
OTA Update callback function.
|
||||
@return The function returns @ref M2M_SUCCESS for success and a negative value otherwise.
|
||||
*/
|
||||
int8_t m2m_ota_init(tpfOtaUpdateCb pfOtaUpdateCb)
|
||||
{
|
||||
int8_t ret = M2M_SUCCESS;
|
||||
|
||||
if (pfOtaUpdateCb) {
|
||||
gpfOtaUpdateCb = pfOtaUpdateCb;
|
||||
} else {
|
||||
M2M_ERR("Invalid OTA update callback\r\n");
|
||||
}
|
||||
|
||||
hif_register_cb(M2M_REQ_GROUP_OTA, m2m_ota_cb);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*!
|
||||
@fn int8_t m2m_ota_start_update(unsigned char * pcDownloadUrl)
|
||||
@brief Request OTA start update using the downloaded URL.
|
||||
@param[in] pcDownloadUrl
|
||||
The download firmware URL, you get it from device info.
|
||||
@return The function returns @ref M2M_SUCCESS for success and a negative value otherwise.
|
||||
*/
|
||||
int8_t m2m_ota_start_update(unsigned char *pcDownloadUrl)
|
||||
{
|
||||
int8_t ret = M2M_SUCCESS;
|
||||
uint16_t u16DurlSize = strlen((char*)pcDownloadUrl) + 1;
|
||||
|
||||
ret = hif_send(M2M_REQ_GROUP_OTA, M2M_OTA_REQ_START_UPDATE, pcDownloadUrl, u16DurlSize, NULL, 0, 0);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*!
|
||||
@fn int8_t m2m_ota_rollback(void)
|
||||
@brief Request OTA Rollback image.
|
||||
@return The function returns @ref M2M_SUCCESS for success and a negative value otherwise.
|
||||
*/
|
||||
int8_t m2m_ota_rollback(void)
|
||||
{
|
||||
int8_t ret = M2M_SUCCESS;
|
||||
tstrM2mRev strRev;
|
||||
|
||||
ret = m2m_ota_get_firmware_version(&strRev);
|
||||
if(ret == M2M_SUCCESS)
|
||||
{
|
||||
if(M2M_GET_HIF_BLOCK(strRev.u16FirmwareHifInfo) == M2M_HIF_BLOCK_VALUE)
|
||||
{
|
||||
ret = hif_send(M2M_REQ_GROUP_OTA, M2M_OTA_REQ_ROLLBACK, NULL, 0, NULL, 0, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = M2M_ERR_FAIL;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*!
|
||||
@fn int8_t m2m_ota_abort(void)
|
||||
@brief Request OTA Abort.
|
||||
@return The function returns @ref M2M_SUCCESS for success and a negative value otherwise.
|
||||
*/
|
||||
int8_t m2m_ota_abort(void)
|
||||
{
|
||||
int8_t ret = M2M_SUCCESS;
|
||||
ret = hif_send(M2M_REQ_GROUP_OTA, M2M_OTA_REQ_ABORT, NULL, 0, NULL, 0, 0);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*!
|
||||
@fn int8_t m2m_ota_switch_firmware(void)
|
||||
@brief Switch to the upgraded Firmware.
|
||||
@return The function returns @ref M2M_SUCCESS for success and a negative value otherwise.
|
||||
*/
|
||||
int8_t m2m_ota_switch_firmware(void)
|
||||
{
|
||||
int8_t ret = M2M_SUCCESS;
|
||||
tstrM2mRev strRev;
|
||||
|
||||
ret = m2m_ota_get_firmware_version(&strRev);
|
||||
if(ret == M2M_SUCCESS)
|
||||
{
|
||||
if(M2M_GET_HIF_BLOCK(strRev.u16FirmwareHifInfo) == M2M_HIF_BLOCK_VALUE)
|
||||
{
|
||||
ret = hif_send(M2M_REQ_GROUP_OTA, M2M_OTA_REQ_SWITCH_FIRMWARE, NULL, 0, NULL, 0, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = M2M_ERR_FAIL;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
//DOM-IGNORE-END
|
||||
144
ChaletLora.X/Source/winc3400_142/driver/source/m2m_periph.c
Normal file
144
ChaletLora.X/Source/winc3400_142/driver/source/m2m_periph.c
Normal file
@ -0,0 +1,144 @@
|
||||
/*******************************************************************************
|
||||
WINC3400 Peripherials Application Interface.
|
||||
|
||||
File Name:
|
||||
m2m_periph.c
|
||||
|
||||
Summary:
|
||||
WINC3400 Peripherals Application Interface
|
||||
|
||||
Description:
|
||||
WINC3400 Peripherals Application Interface
|
||||
*******************************************************************************/
|
||||
|
||||
//DOM-IGNORE-BEGIN
|
||||
/*******************************************************************************
|
||||
* Copyright (C) 2021 Microchip Technology Inc. and its subsidiaries.
|
||||
*
|
||||
* Subject to your compliance with these terms, you may use Microchip software
|
||||
* and any derivatives exclusively with Microchip products. It is your
|
||||
* responsibility to comply with third party license terms applicable to your
|
||||
* use of third party software (including open source software) that may
|
||||
* accompany Microchip software.
|
||||
*
|
||||
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
|
||||
* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
|
||||
* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
|
||||
* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
|
||||
* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
|
||||
* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
|
||||
* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
|
||||
* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
|
||||
* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
|
||||
*******************************************************************************/
|
||||
|
||||
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
|
||||
INCLUDES
|
||||
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
|
||||
|
||||
#include "m2m_periph.h"
|
||||
#include "nmasic.h"
|
||||
#include "m2m_hif.h"
|
||||
|
||||
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
|
||||
MACROS
|
||||
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
|
||||
#define GPIO_OP_DIR 0
|
||||
#define GPIO_OP_SET 1
|
||||
#define GPIO_OP_GET 2
|
||||
|
||||
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
|
||||
DATA TYPES
|
||||
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
|
||||
|
||||
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
|
||||
STATIC FUNCTIONS
|
||||
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
|
||||
static int8_t get_gpio_idx(uint8_t u8GpioNum)
|
||||
{
|
||||
if(u8GpioNum >= M2M_PERIPH_GPIO_MAX) return -1;
|
||||
else if(u8GpioNum == M2M_PERIPH_GPIO3)
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
else if(u8GpioNum == M2M_PERIPH_GPIO4)
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
if(u8GpioNum == M2M_PERIPH_GPIO15)
|
||||
{
|
||||
return 15;
|
||||
}
|
||||
else if(u8GpioNum == M2M_PERIPH_GPIO16)
|
||||
{
|
||||
return 16;
|
||||
}
|
||||
else if(u8GpioNum == M2M_PERIPH_GPIO18)
|
||||
{
|
||||
return 18;
|
||||
}
|
||||
else
|
||||
{
|
||||
return -2;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* GPIO read/write skeleton with wakeup/sleep capability.
|
||||
*/
|
||||
static int8_t gpio_ioctl(uint8_t op, uint8_t u8GpioNum, uint8_t u8InVal, uint8_t *pu8OutVal)
|
||||
{
|
||||
int8_t ret, gpio;
|
||||
|
||||
ret = hif_chip_wake();
|
||||
if(ret != M2M_SUCCESS) goto _EXIT;
|
||||
|
||||
gpio = get_gpio_idx(u8GpioNum);
|
||||
if(gpio < 0) goto _EXIT1;
|
||||
|
||||
if(op == GPIO_OP_DIR) {
|
||||
ret = set_gpio_dir((uint8_t)gpio, u8InVal);
|
||||
} else if(op == GPIO_OP_SET) {
|
||||
ret = set_gpio_val((uint8_t)gpio, u8InVal);
|
||||
} else if(op == GPIO_OP_GET) {
|
||||
ret = get_gpio_val((uint8_t)gpio, pu8OutVal);
|
||||
}
|
||||
if(ret != M2M_SUCCESS) goto _EXIT1;
|
||||
|
||||
_EXIT1:
|
||||
ret = hif_chip_sleep();
|
||||
_EXIT:
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
|
||||
FUNCTION IMPLEMENTATION
|
||||
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
|
||||
int8_t m2m_periph_init(tstrPerphInitParam *param)
|
||||
{
|
||||
return M2M_SUCCESS;
|
||||
}
|
||||
|
||||
int8_t m2m_periph_gpio_set_dir(uint8_t u8GpioNum, uint8_t u8GpioDir)
|
||||
{
|
||||
return gpio_ioctl(GPIO_OP_DIR, u8GpioNum, u8GpioDir, NULL);
|
||||
}
|
||||
|
||||
int8_t m2m_periph_gpio_set_val(uint8_t u8GpioNum, uint8_t u8GpioVal)
|
||||
{
|
||||
return gpio_ioctl(GPIO_OP_SET, u8GpioNum, u8GpioVal, NULL);
|
||||
}
|
||||
|
||||
int8_t m2m_periph_gpio_get_val(uint8_t u8GpioNum, uint8_t *pu8GpioVal)
|
||||
{
|
||||
return gpio_ioctl(GPIO_OP_GET, u8GpioNum, 0, pu8GpioVal);
|
||||
}
|
||||
|
||||
int8_t m2m_periph_pullup_ctrl(uint32_t pinmask, uint8_t enable)
|
||||
{
|
||||
return pullup_ctrl(pinmask, enable);
|
||||
}
|
||||
|
||||
//DOM-IGNORE-END
|
||||
495
ChaletLora.X/Source/winc3400_142/driver/source/m2m_ssl.c
Normal file
495
ChaletLora.X/Source/winc3400_142/driver/source/m2m_ssl.c
Normal file
@ -0,0 +1,495 @@
|
||||
/*******************************************************************************
|
||||
File Name:
|
||||
m2m_ssl.c
|
||||
|
||||
Summary:
|
||||
WINC SSL Interface.
|
||||
|
||||
Description:
|
||||
WINC SSL Interface.
|
||||
*******************************************************************************/
|
||||
|
||||
//DOM-IGNORE-BEGIN
|
||||
/*******************************************************************************
|
||||
* Copyright (C) 2021 Microchip Technology Inc. and its subsidiaries.
|
||||
*
|
||||
* Subject to your compliance with these terms, you may use Microchip software
|
||||
* and any derivatives exclusively with Microchip products. It is your
|
||||
* responsibility to comply with third party license terms applicable to your
|
||||
* use of third party software (including open source software) that may
|
||||
* accompany Microchip software.
|
||||
*
|
||||
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
|
||||
* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
|
||||
* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
|
||||
* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
|
||||
* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
|
||||
* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
|
||||
* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
|
||||
* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
|
||||
* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
|
||||
*******************************************************************************/
|
||||
|
||||
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
|
||||
INCLUDES
|
||||
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
|
||||
|
||||
#include "m2m_ssl.h"
|
||||
#include "m2m_hif.h"
|
||||
#include "nmasic.h"
|
||||
|
||||
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
|
||||
MACROS
|
||||
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
|
||||
|
||||
#define min(a,b) (((a) < (b)) ? (a) : (b))
|
||||
|
||||
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
|
||||
DATA TYPES
|
||||
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
|
||||
static tpfAppSSLCb gpfAppSSLCb = NULL;
|
||||
static uint32_t gu32HIFAddr = 0;
|
||||
static tenuTlsFlashStatus genuStatus = TLS_FLASH_ERR_UNKNOWN;
|
||||
|
||||
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
|
||||
FUNCTION PROTOTYPES
|
||||
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
|
||||
|
||||
/*!
|
||||
@fn void m2m_ssl_cb(uint8_t u8OpCode, uint16_t u16DataSize, uint32_t u32Addr)
|
||||
@brief Internal SSL callback function.
|
||||
@param [in] u8OpCode
|
||||
HIF Opcode type.
|
||||
@param [in] u16DataSize
|
||||
HIF data length.
|
||||
@param [in] u32Addr
|
||||
HIF address.
|
||||
*/
|
||||
static void m2m_ssl_cb(uint8_t u8OpCode, uint16_t u16DataSize, uint32_t u32Addr)
|
||||
{
|
||||
int8_t s8tmp = M2M_SUCCESS;
|
||||
switch(u8OpCode)
|
||||
{
|
||||
case M2M_SSL_REQ_ECC:
|
||||
{
|
||||
tstrEccReqInfo strEccREQ;
|
||||
s8tmp = hif_receive(u32Addr, (uint8_t *)&strEccREQ, sizeof(tstrEccReqInfo), 0);
|
||||
if(s8tmp == M2M_SUCCESS)
|
||||
{
|
||||
if(gpfAppSSLCb)
|
||||
{
|
||||
gu32HIFAddr = u32Addr + sizeof(tstrEccReqInfo);
|
||||
gpfAppSSLCb(M2M_SSL_REQ_ECC, &strEccREQ);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case M2M_SSL_RESP_SET_CS_LIST:
|
||||
{
|
||||
tstrSslSetActiveCsList strCsList;
|
||||
s8tmp = hif_receive(u32Addr, (uint8_t *)&strCsList, sizeof(tstrSslSetActiveCsList), 0);
|
||||
if(s8tmp == M2M_SUCCESS)
|
||||
{
|
||||
if(gpfAppSSLCb)
|
||||
gpfAppSSLCb(M2M_SSL_RESP_SET_CS_LIST, &strCsList);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case M2M_SSL_RESP_WRITE_OWN_CERTS:
|
||||
{
|
||||
tstrTlsSrvChunkHdr strTlsSrvChunkRsp;
|
||||
uint8_t bCallApp = 1;
|
||||
|
||||
s8tmp = hif_receive(u32Addr, (uint8_t *)&strTlsSrvChunkRsp, sizeof(tstrTlsSrvChunkHdr), 0);
|
||||
if(s8tmp == M2M_SUCCESS)
|
||||
{
|
||||
uint16_t offset = strTlsSrvChunkRsp.u16Offset32;
|
||||
uint16_t chunk_size = strTlsSrvChunkRsp.u16Size32;
|
||||
uint16_t total_size = strTlsSrvChunkRsp.u16TotalSize32;
|
||||
tenuTlsFlashStatus status = (tenuTlsFlashStatus)(strTlsSrvChunkRsp.u16Sig);
|
||||
|
||||
/* If first chunk, reset status. */
|
||||
if(offset == 0)
|
||||
genuStatus = TLS_FLASH_OK_NO_CHANGE;
|
||||
/* Only send status to app when processing last chunk. */
|
||||
if(offset + chunk_size != total_size)
|
||||
bCallApp = 0;
|
||||
|
||||
switch(status)
|
||||
{
|
||||
case TLS_FLASH_OK:
|
||||
// Good flash write. Update status if no errors yet.
|
||||
if(genuStatus == TLS_FLASH_OK_NO_CHANGE)
|
||||
genuStatus = status;
|
||||
break;
|
||||
case TLS_FLASH_OK_NO_CHANGE:
|
||||
// No change, don't update status.
|
||||
break;
|
||||
case TLS_FLASH_ERR_CORRUPT:
|
||||
// Corrupt. Always update status.
|
||||
genuStatus = status;
|
||||
break;
|
||||
case TLS_FLASH_ERR_NO_CHANGE:
|
||||
// Failed flash write. Update status if no more serious error.
|
||||
if((genuStatus != TLS_FLASH_ERR_CORRUPT) && (genuStatus != TLS_FLASH_ERR_UNKNOWN))
|
||||
genuStatus = status;
|
||||
break;
|
||||
default:
|
||||
// Don't expect any other case. Ensure we don't mask a previous corrupt error.
|
||||
if(genuStatus != TLS_FLASH_ERR_CORRUPT)
|
||||
genuStatus = TLS_FLASH_ERR_UNKNOWN;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(bCallApp && gpfAppSSLCb)
|
||||
gpfAppSSLCb(M2M_SSL_RESP_WRITE_OWN_CERTS, &genuStatus);
|
||||
}
|
||||
break;
|
||||
}
|
||||
if(s8tmp != M2M_SUCCESS)
|
||||
{
|
||||
M2M_ERR("Error receiving SSL from the HIF\n");
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
@fn int8_t m2m_ssl_init(tpfAppSSLCb pfAppSSLCb)
|
||||
@brief Initializes the SSL layer.
|
||||
@param [in] pfAppSslCb
|
||||
Application SSL callback function.
|
||||
@return The function returns @ref M2M_SUCCESS for success and a negative value otherwise.
|
||||
*/
|
||||
int8_t m2m_ssl_init(tpfAppSSLCb pfAppSSLCb)
|
||||
{
|
||||
int8_t s8Ret = M2M_SUCCESS;
|
||||
gpfAppSSLCb = pfAppSSLCb;
|
||||
gu32HIFAddr = 0;
|
||||
genuStatus = TLS_FLASH_ERR_UNKNOWN;
|
||||
s8Ret = hif_register_cb(M2M_REQ_GROUP_SSL, m2m_ssl_cb);
|
||||
if(s8Ret != M2M_SUCCESS)
|
||||
{
|
||||
M2M_ERR("hif_register_cb() failed with ret=%d", s8Ret);
|
||||
}
|
||||
return s8Ret;
|
||||
}
|
||||
|
||||
/*!
|
||||
@fn int8_t m2m_ssl_handshake_rsp(tstrEccReqInfo* strECCResp, uint8_t* pu8RspDataBuff, uint16_t u16RspDataSz)
|
||||
@brief Sends ECC responses to the WINC.
|
||||
@param[in] strECCResp
|
||||
ECC Response struct.
|
||||
@param[in] pu8RspDataBuff
|
||||
Pointer of the response data to be sent.
|
||||
@param[in] u16RspDataSz
|
||||
Response data size.
|
||||
@return The function returns @ref M2M_SUCCESS for success and a negative value otherwise.
|
||||
*/
|
||||
int8_t m2m_ssl_handshake_rsp(tstrEccReqInfo *strECCResp, uint8_t *pu8RspDataBuff, uint16_t u16RspDataSz)
|
||||
{
|
||||
int8_t s8Ret = M2M_SUCCESS;
|
||||
|
||||
s8Ret = hif_send(M2M_REQ_GROUP_SSL, (M2M_SSL_RESP_ECC | M2M_REQ_DATA_PKT), (uint8_t *)strECCResp, sizeof(tstrEccReqInfo), pu8RspDataBuff, u16RspDataSz, sizeof(tstrEccReqInfo));
|
||||
|
||||
return s8Ret;
|
||||
}
|
||||
|
||||
/*!
|
||||
@fn int8_t m2m_ssl_send_certs_to_winc(uint8_t *pu8Buffer, uint32_t u32BufferSz)
|
||||
@brief Sends certificates to the WINC
|
||||
@param[in] pu8Buffer
|
||||
Pointer to the certificates.
|
||||
@param[in] u32BufferSz
|
||||
Size of the certificates.
|
||||
@return The function returns @ref M2M_SUCCESS for success and a negative value otherwise.
|
||||
*/
|
||||
int8_t m2m_ssl_send_certs_to_winc(uint8_t *pu8Buffer, uint32_t u32BufferSz)
|
||||
{
|
||||
int8_t s8Ret = M2M_SUCCESS;
|
||||
#define TXLIMIT (256 * 6)
|
||||
|
||||
if(u32BufferSz <= TXLIMIT)
|
||||
{
|
||||
// set chunk header for one chunk
|
||||
tstrTlsSrvChunkHdr *pchkhdr = (tstrTlsSrvChunkHdr *)pu8Buffer;
|
||||
pchkhdr->u16Sig = TLS_CERTS_CHUNKED_SIG_VALUE;
|
||||
pchkhdr->u16TotalSize32 = (u32BufferSz + 3) >> 2;
|
||||
pchkhdr->u16Offset32 = 0;
|
||||
pchkhdr->u16Size32 = (u32BufferSz + 3) >> 2;
|
||||
s8Ret = hif_send(M2M_REQ_GROUP_SSL, (M2M_SSL_REQ_WRITE_OWN_CERTS | M2M_REQ_DATA_PKT), NULL, 0, pu8Buffer, u32BufferSz, 0);
|
||||
M2M_INFO("Transferred %" PRIu32 " bytes of cert data NON-CHUNKED\r\n", u32BufferSz);
|
||||
}
|
||||
else
|
||||
{
|
||||
// chunk it
|
||||
// We are sneaking in a header - tstrTlsSrvChunkHdr
|
||||
#define CHUNKHDRSZ (sizeof(tstrTlsSrvChunkHdr))
|
||||
#define CHUNKSZ (TXLIMIT - 256) // divisible by 4
|
||||
uint8_t saveblob[CHUNKHDRSZ];
|
||||
uint32_t ofs = 0;
|
||||
uint32_t thischunksz = 0;
|
||||
|
||||
// first is special - over writing our header
|
||||
memcpy(saveblob, &pu8Buffer[ofs], CHUNKHDRSZ);
|
||||
thischunksz = min(CHUNKSZ, u32BufferSz-ofs); // no need to round up to quad words this time
|
||||
|
||||
tstrTlsSrvChunkHdr *pchkhdr = (tstrTlsSrvChunkHdr *)&pu8Buffer[ofs];
|
||||
pchkhdr->u16Sig = TLS_CERTS_CHUNKED_SIG_VALUE;
|
||||
pchkhdr->u16TotalSize32 = ((u32BufferSz + 3) >> 2);
|
||||
pchkhdr->u16Offset32 = ((ofs + 3) >> 2);
|
||||
pchkhdr->u16Size32 = ((thischunksz + 3) >> 2);
|
||||
s8Ret = hif_send(M2M_REQ_GROUP_SSL, (M2M_SSL_REQ_WRITE_OWN_CERTS | M2M_REQ_DATA_PKT), NULL, 0, &pu8Buffer[ofs], thischunksz, 0);
|
||||
M2M_INFO("Transferred %" PRIu32 " bytes of cert data CHUNKED to offset %" PRIu32 " total %" PRIu32 "\r\n", thischunksz, ofs, u32BufferSz);
|
||||
memcpy(&pu8Buffer[ofs], saveblob, CHUNKHDRSZ);
|
||||
ofs += thischunksz;
|
||||
|
||||
while(ofs < u32BufferSz)
|
||||
{
|
||||
// Subsequent chunks write header before and send a little more
|
||||
memcpy(saveblob, &pu8Buffer[ofs-CHUNKHDRSZ], CHUNKHDRSZ);
|
||||
thischunksz = min(CHUNKSZ, u32BufferSz-ofs);
|
||||
thischunksz = (thischunksz + 3) & 0xFFFFFFFC; // needs to round up to quad word length
|
||||
pchkhdr = (tstrTlsSrvChunkHdr *)&pu8Buffer[ofs - CHUNKHDRSZ];
|
||||
pchkhdr->u16Sig = TLS_CERTS_CHUNKED_SIG_VALUE;
|
||||
pchkhdr->u16TotalSize32 = ((u32BufferSz + 3) >> 2);
|
||||
pchkhdr->u16Offset32 = ((ofs + 3) >> 2);
|
||||
pchkhdr->u16Size32 = ((thischunksz + 3) >> 2);
|
||||
s8Ret = hif_send(M2M_REQ_GROUP_SSL, (M2M_SSL_REQ_WRITE_OWN_CERTS | M2M_REQ_DATA_PKT), NULL, 0, &pu8Buffer[ofs - CHUNKHDRSZ], thischunksz + CHUNKHDRSZ, 0);
|
||||
M2M_INFO("Transferred %" PRIu32 " bytes of cert data CHUNKED to offset %" PRIu32 " total %" PRIu32 "\n", thischunksz, ofs, u32BufferSz);
|
||||
memcpy(&pu8Buffer[ofs - CHUNKHDRSZ], saveblob, CHUNKHDRSZ);
|
||||
ofs += thischunksz;
|
||||
}
|
||||
}
|
||||
|
||||
return s8Ret;
|
||||
}
|
||||
|
||||
/*!
|
||||
@fn int8_t m2m_ssl_retrieve_next_for_verifying(tenuEcNamedCurve *penuCurve, uint8_t *pu8Value, uint16_t *pu16ValueSz, uint8_t *pu8Sig, uint16_t *pu16SigSz, tstrECPoint *pstrKey);
|
||||
@brief Retrieve the next set of information from the WINC for ECDSA verification.
|
||||
@param[out] penuCurve
|
||||
The named curve.
|
||||
@param[out] pu8Value
|
||||
Value retrieved for verification. This is the digest of the message, truncated/prepended to the appropriate size.
|
||||
@param[inout] pu16ValueSz
|
||||
in: Size of value buffer provided by caller.
|
||||
out: Size of value retrieved (provided for convenience; the value size is in fact determined by the curve).
|
||||
@param[out] pu8Sig
|
||||
Signature retrieved for verification.
|
||||
@param[inout] pu16SigSz
|
||||
in: Size of signature buffer provided by caller.
|
||||
out: Size of signature retrieved (provided for convenience; the signature size is in fact determined by the curve).
|
||||
@param[out] pstrKey
|
||||
Public key retrieved for verification.
|
||||
@return The function returns @ref M2M_SUCCESS for success and a negative value otherwise.
|
||||
|
||||
@pre This function should only be called after the application has been notified that
|
||||
verification information is ready via @ref ECC_REQ_SIGN_VERIFY.
|
||||
|
||||
@warning If this function returns @ref M2M_ERR_FAIL, then any remaining verification info from
|
||||
the WINC is lost.
|
||||
*/
|
||||
int8_t m2m_ssl_retrieve_next_for_verifying(tenuEcNamedCurve *penuCurve, uint8_t *pu8Value, uint16_t *pu16ValueSz, uint8_t *pu8Sig, uint16_t *pu16SigSz, tstrECPoint *pstrKey)
|
||||
{
|
||||
int8_t s8Ret = M2M_ERR_FAIL;
|
||||
uint16_t u16HashSz, u16SigSz, u16KeySz;
|
||||
|
||||
if(gu32HIFAddr == 0) return M2M_ERR_FAIL;
|
||||
|
||||
if((NULL == penuCurve) || (NULL == pu8Value) || (NULL == pu16ValueSz) || (NULL == pu8Sig) || (NULL == pu16SigSz) || (NULL == pstrKey))
|
||||
{
|
||||
s8Ret = M2M_ERR_INVALID_ARG;
|
||||
goto __ERR;
|
||||
}
|
||||
|
||||
if(hif_receive(gu32HIFAddr, (uint8_t *)&u16KeySz, 2, 0) != M2M_SUCCESS) goto __ERR;
|
||||
*penuCurve = _htons(u16KeySz);
|
||||
gu32HIFAddr += 2;
|
||||
|
||||
if(hif_receive(gu32HIFAddr, (uint8_t *)&u16KeySz, 2, 0) != M2M_SUCCESS) goto __ERR;
|
||||
u16KeySz = _htons(u16KeySz);
|
||||
if(u16KeySz > sizeof(pstrKey->X)) goto __ERR;
|
||||
pstrKey->u16Size = u16KeySz;
|
||||
gu32HIFAddr += 2;
|
||||
|
||||
if(hif_receive(gu32HIFAddr, (uint8_t *)&u16HashSz, 2, 0) != M2M_SUCCESS) goto __ERR;
|
||||
u16HashSz = _htons(u16HashSz);
|
||||
if(u16HashSz > *pu16ValueSz) goto __ERR;
|
||||
*pu16ValueSz = u16HashSz;
|
||||
gu32HIFAddr += 2;
|
||||
|
||||
if(hif_receive(gu32HIFAddr, (uint8_t *)&u16SigSz, 2, 0) != M2M_SUCCESS) goto __ERR;
|
||||
u16SigSz = _htons(u16SigSz);
|
||||
if(u16SigSz > *pu16SigSz) goto __ERR;
|
||||
*pu16SigSz = u16SigSz;
|
||||
gu32HIFAddr += 2;
|
||||
|
||||
if(hif_receive(gu32HIFAddr, pstrKey->X, u16KeySz, 0) != M2M_SUCCESS) goto __ERR;
|
||||
gu32HIFAddr += u16KeySz;
|
||||
if(hif_receive(gu32HIFAddr, pstrKey->Y, u16KeySz, 0) != M2M_SUCCESS) goto __ERR;
|
||||
gu32HIFAddr += u16KeySz;
|
||||
|
||||
if(hif_receive(gu32HIFAddr, pu8Value, u16HashSz, 0) != M2M_SUCCESS) goto __ERR;
|
||||
gu32HIFAddr += u16HashSz;
|
||||
|
||||
if(hif_receive(gu32HIFAddr, pu8Sig, u16SigSz, 0) != M2M_SUCCESS) goto __ERR;
|
||||
gu32HIFAddr += u16SigSz;
|
||||
|
||||
return M2M_SUCCESS;
|
||||
|
||||
__ERR:
|
||||
hif_receive(0, NULL, 0, 1);
|
||||
return s8Ret;
|
||||
}
|
||||
|
||||
/*!
|
||||
@fn int8_t m2m_ssl_retrieve_cert(uint16_t *pu16Curve, uint8_t *pu8Value, uint8_t *pu8Sig, tstrECPoint *pstrKey);
|
||||
@brief Retrieve the next set of information from the WINC for ECDSA verification.
|
||||
@param[out] pu16Curve
|
||||
The named curve, to be cast to type @ref tenuEcNamedCurve.
|
||||
@param[out] pu8Value
|
||||
Value retrieved for verification. This is the digest of the message, truncated/prepended to the appropriate size.
|
||||
The size of the value is equal to the field size of the curve, hence is determined by pu16Curve.
|
||||
@param[out] pu8Sig
|
||||
Signature retrieved for verification.
|
||||
The size of the signature is equal to twice the field size of the curve, hence is determined by pu16Curve.
|
||||
@param[out] pstrKey
|
||||
Public key retrieved for verification.
|
||||
@return The function returns @ref M2M_SUCCESS for success and a negative value otherwise.
|
||||
|
||||
@pre This function should only be called after the application has been notified that
|
||||
verification information is ready via @ref ECC_REQ_SIGN_VERIFY.
|
||||
|
||||
@warning If this function returns @ref M2M_ERR_FAIL, then any remaining verification info from
|
||||
the WINC is lost.
|
||||
|
||||
@warning This API has been deprecated and is kept for legacy purposes only. It is recommended
|
||||
that @ref m2m_ssl_retrieve_next_for_verifying is used instead.
|
||||
*/
|
||||
int8_t m2m_ssl_retrieve_cert(uint16_t *pu16Curve, uint8_t *pu8Value, uint8_t *pu8Sig, tstrECPoint *pstrKey)
|
||||
{
|
||||
uint16_t u16ValueSz = 32, u16SigSz = 64;
|
||||
|
||||
return m2m_ssl_retrieve_next_for_verifying((tenuEcNamedCurve *)pu16Curve, pu8Value, &u16ValueSz, pu8Sig, &u16SigSz, pstrKey);
|
||||
}
|
||||
|
||||
/*!
|
||||
@fn int8_t m2m_ssl_retrieve_hash(uint8_t *pu8Value, uint16_t u16ValueSz)
|
||||
@brief Retrieve the value from the WINC for ECDSA signing.
|
||||
@param[out] pu8Value
|
||||
Value retrieved for signing. This is the digest of the message, truncated/prepended to the appropriate size.
|
||||
@param[in] u16ValueSz
|
||||
Size of value to be retrieved. (The application should obtain this information,
|
||||
along with the curve, from the associated @ref ECC_REQ_SIGN_GEN notification.)
|
||||
@return The function returns @ref M2M_SUCCESS for success and a negative value otherwise.
|
||||
|
||||
@pre This function should only be called after the application has been notified that
|
||||
signing information is ready via @ref ECC_REQ_SIGN_GEN.
|
||||
|
||||
@warning If this function returns @ref M2M_ERR_FAIL, then the value for signing is lost.
|
||||
*/
|
||||
int8_t m2m_ssl_retrieve_hash(uint8_t *pu8Value, uint16_t u16ValueSz)
|
||||
{
|
||||
int8_t s8Ret = M2M_ERR_FAIL;
|
||||
|
||||
if(gu32HIFAddr == 0) return M2M_ERR_FAIL;
|
||||
|
||||
if(NULL == pu8Value)
|
||||
{
|
||||
s8Ret = M2M_ERR_INVALID_ARG;
|
||||
goto __ERR;
|
||||
}
|
||||
|
||||
if(hif_receive(gu32HIFAddr, pu8Value, u16ValueSz, 0) != M2M_SUCCESS) goto __ERR;
|
||||
|
||||
return M2M_SUCCESS;
|
||||
|
||||
__ERR:
|
||||
hif_receive(0, NULL, 0, 1);
|
||||
return s8Ret;
|
||||
}
|
||||
|
||||
/*!
|
||||
@fn void m2m_ssl_stop_retrieving(void);
|
||||
@brief Allow SSL driver to tidy up when the application chooses not to retrieve all available
|
||||
information.
|
||||
|
||||
@return None.
|
||||
|
||||
@warning The application must call this function if it has been notified (via
|
||||
@ref ECC_REQ_SIGN_GEN or @ref ECC_REQ_SIGN_VERIFY) that information is available for
|
||||
retrieving from the WINC, but chooses not to retrieve it all.
|
||||
The application must not call this function if it has retrieved all the available
|
||||
information, or if a retrieve function returned @ref M2M_ERR_FAIL indicating that any
|
||||
remaining information has been lost.
|
||||
|
||||
@see m2m_ssl_retrieve_next_for_verifying\n
|
||||
m2m_ssl_retrieve_cert\n
|
||||
m2m_ssl_retrieve_hash
|
||||
*/
|
||||
void m2m_ssl_stop_retrieving(void)
|
||||
{
|
||||
hif_receive(0, NULL, 0, 1);
|
||||
}
|
||||
|
||||
/*!
|
||||
@fn void m2m_ssl_stop_processing_certs(void);
|
||||
@brief Allow SSL driver to tidy up in case application does not read all available certificates.
|
||||
@return None.
|
||||
|
||||
@warning This API has been deprecated and is kept for legacy purposes only. It is recommended
|
||||
that @ref m2m_ssl_stop_retrieving is used instead.
|
||||
*/
|
||||
void m2m_ssl_stop_processing_certs(void)
|
||||
{
|
||||
m2m_ssl_stop_retrieving();
|
||||
}
|
||||
|
||||
/*!
|
||||
@fn void m2m_ssl_ecc_process_done(void);
|
||||
@brief Allow SSL driver to tidy up after application has finished processing ECC message.
|
||||
|
||||
@return None.
|
||||
|
||||
@warning The application should call this function after receiving an SSL callback with message
|
||||
type @ref M2M_SSL_REQ_ECC, after retrieving any related information, and before
|
||||
calling @ref m2m_ssl_handshake_rsp.
|
||||
*/
|
||||
void m2m_ssl_ecc_process_done(void)
|
||||
{
|
||||
gu32HIFAddr = 0;
|
||||
}
|
||||
|
||||
/*!
|
||||
@fn int8_t m2m_ssl_set_active_ciphersuites(uint32_t u32SslCsBMP)
|
||||
@brief Sets the active ciphersuites.
|
||||
@details Override the default Active SSL ciphers in the SSL module with a certain combination selected by the caller in the form of
|
||||
a bitmap containing the required ciphers to be on.
|
||||
There is no need to call this function if the application will not change the default ciphersuites.
|
||||
|
||||
@param [in] u32SslCsBMP
|
||||
Bitmap containing the desired ciphers to be enabled for the SSL module. The ciphersuites are defined in
|
||||
@ref SSLCipherSuiteID.
|
||||
The default ciphersuites are all ciphersuites supported by the firmware with the exception of ECC ciphersuites.
|
||||
The caller can override the default with any desired combination.
|
||||
If u32SslCsBMP does not contain any ciphersuites supported by firmware, then the current active list will not
|
||||
change.
|
||||
|
||||
@return
|
||||
- @ref SOCK_ERR_NO_ERROR
|
||||
- @ref SOCK_ERR_INVALID_ARG
|
||||
*/
|
||||
int8_t m2m_ssl_set_active_ciphersuites(uint32_t u32SslCsBMP)
|
||||
{
|
||||
int8_t s8Ret = M2M_SUCCESS;
|
||||
tstrSslSetActiveCsList strCsList;
|
||||
|
||||
strCsList.u32CsBMP = u32SslCsBMP;
|
||||
s8Ret = hif_send(M2M_REQ_GROUP_SSL, M2M_SSL_REQ_SET_CS_LIST, (uint8_t *)&strCsList, sizeof(tstrSslSetActiveCsList), NULL, 0, 0);
|
||||
|
||||
return s8Ret;
|
||||
}
|
||||
|
||||
//DOM-IGNORE-END
|
||||
2061
ChaletLora.X/Source/winc3400_142/driver/source/m2m_wifi.c
Normal file
2061
ChaletLora.X/Source/winc3400_142/driver/source/m2m_wifi.c
Normal file
File diff suppressed because it is too large
Load Diff
706
ChaletLora.X/Source/winc3400_142/driver/source/nmasic.c
Normal file
706
ChaletLora.X/Source/winc3400_142/driver/source/nmasic.c
Normal file
@ -0,0 +1,706 @@
|
||||
/*******************************************************************************
|
||||
File Name:
|
||||
nmasic.c
|
||||
|
||||
Summary:
|
||||
This module contains WINC3400 ASIC specific internal APIs.
|
||||
|
||||
Description:
|
||||
This module contains WINC3400 ASIC specific internal APIs.
|
||||
*******************************************************************************/
|
||||
|
||||
//DOM-IGNORE-BEGIN
|
||||
/*******************************************************************************
|
||||
* Copyright (C) 2021 Microchip Technology Inc. and its subsidiaries.
|
||||
*
|
||||
* Subject to your compliance with these terms, you may use Microchip software
|
||||
* and any derivatives exclusively with Microchip products. It is your
|
||||
* responsibility to comply with third party license terms applicable to your
|
||||
* use of third party software (including open source software) that may
|
||||
* accompany Microchip software.
|
||||
*
|
||||
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
|
||||
* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
|
||||
* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
|
||||
* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
|
||||
* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
|
||||
* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
|
||||
* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
|
||||
* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
|
||||
* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
|
||||
*******************************************************************************/
|
||||
|
||||
#include "nm_common.h"
|
||||
#include "nmbus.h"
|
||||
#include "nm_bsp.h"
|
||||
#include "nmasic.h"
|
||||
#include "m2m_types.h"
|
||||
|
||||
#define NMI_GLB_RESET_0 (NMI_PERIPH_REG_BASE + 0x400)
|
||||
#define NMI_INTR_REG_BASE (NMI_PERIPH_REG_BASE + 0xa00)
|
||||
#define NMI_PIN_MUX_0 (NMI_PERIPH_REG_BASE + 0x408)
|
||||
#define NMI_INTR_ENABLE (NMI_INTR_REG_BASE)
|
||||
#define GET_UINT32(X,Y) (X[0+Y] + ((uint32_t)X[1+Y]<<8) + ((uint32_t)X[2+Y]<<16) +((uint32_t)X[3+Y]<<24))
|
||||
|
||||
#define CORT_HOST_COMM (0x14)
|
||||
#define HOST_CORT_COMM (0x0e)
|
||||
#define WAKE_CLK_REG (0x1)
|
||||
#define CLOCKS_EN_REG (0x13)
|
||||
|
||||
#define TIMEOUT (2000)
|
||||
#define WAKEUP_TRIALS (4)
|
||||
|
||||
int8_t chip_apply_conf(uint32_t u32Conf)
|
||||
{
|
||||
int8_t ret = M2M_SUCCESS;
|
||||
uint32_t val32 = u32Conf;
|
||||
|
||||
#ifdef __ENABLE_PMU__
|
||||
val32 |= rHAVE_USE_PMU_BIT;
|
||||
#endif
|
||||
#ifdef __ENABLE_SLEEP_CLK_SRC_RTC__
|
||||
val32 |= rHAVE_SLEEP_CLK_SRC_RTC_BIT;
|
||||
#elif defined __ENABLE_SLEEP_CLK_SRC_XO__
|
||||
val32 |= rHAVE_SLEEP_CLK_SRC_XO_BIT;
|
||||
#endif
|
||||
#ifdef __ENABLE_EXT_PA_INV_TX_RX__
|
||||
val32 |= rHAVE_EXT_PA_INV_TX_RX;
|
||||
#endif
|
||||
#ifdef __ENABLE_LEGACY_RF_SETTINGS__
|
||||
val32 |= rHAVE_LEGACY_RF_SETTINGS;
|
||||
#endif
|
||||
#ifdef __DISABLE_FIRMWARE_LOGS__
|
||||
val32 |= rHAVE_LOGS_DISABLED_BIT;
|
||||
#endif
|
||||
do {
|
||||
nm_write_reg(rNMI_GP_REG_1, val32);
|
||||
if(val32 != 0) {
|
||||
uint32_t reg = 0;
|
||||
ret = nm_read_reg_with_ret(rNMI_GP_REG_1, ®);
|
||||
if(ret == M2M_SUCCESS) {
|
||||
if(reg == val32)
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
} while(1);
|
||||
|
||||
return M2M_SUCCESS;
|
||||
}
|
||||
|
||||
void chip_idle(void)
|
||||
{
|
||||
uint32_t reg =0;
|
||||
nm_read_reg_with_ret(WAKE_CLK_REG, ®);
|
||||
if(reg&NBIT1)
|
||||
{
|
||||
reg &=~NBIT1;
|
||||
nm_write_reg(WAKE_CLK_REG, reg);
|
||||
}
|
||||
}
|
||||
|
||||
void enable_rf_blocks(void)
|
||||
{
|
||||
nm_write_reg(0x6, 0xdb);
|
||||
nm_write_reg(0x7, 0x6);
|
||||
nm_sleep(10);
|
||||
nm_write_reg(0x1480, 0);
|
||||
nm_write_reg(0x1484, 0);
|
||||
nm_sleep(10);
|
||||
|
||||
nm_write_reg(0x6, 0x0);
|
||||
nm_write_reg(0x7, 0x0);
|
||||
}
|
||||
|
||||
int8_t enable_interrupts(void)
|
||||
{
|
||||
uint32_t reg = 0;
|
||||
int8_t ret = M2M_SUCCESS;
|
||||
/**
|
||||
interrupt pin mux select
|
||||
**/
|
||||
ret = nm_read_reg_with_ret(NMI_PIN_MUX_0, ®);
|
||||
if (M2M_SUCCESS != ret) {
|
||||
return M2M_ERR_BUS_FAIL;
|
||||
}
|
||||
reg |= ((uint32_t) 1 << 8);
|
||||
ret = nm_write_reg(NMI_PIN_MUX_0, reg);
|
||||
if (M2M_SUCCESS != ret) {
|
||||
return M2M_ERR_BUS_FAIL;
|
||||
}
|
||||
/**
|
||||
interrupt enable
|
||||
**/
|
||||
ret = nm_read_reg_with_ret(NMI_INTR_ENABLE, ®);
|
||||
if (M2M_SUCCESS != ret) {
|
||||
return M2M_ERR_BUS_FAIL;
|
||||
}
|
||||
reg |= ((uint32_t) 1 << 16);
|
||||
ret = nm_write_reg(NMI_INTR_ENABLE, reg);
|
||||
if (M2M_SUCCESS != ret) {
|
||||
return M2M_ERR_BUS_FAIL;
|
||||
}
|
||||
return M2M_SUCCESS;
|
||||
}
|
||||
|
||||
int8_t cpu_start(void) {
|
||||
uint32_t reg = 0;
|
||||
int8_t ret;
|
||||
|
||||
/**
|
||||
reset regs
|
||||
*/
|
||||
ret = nm_write_reg(BOOTROM_REG, 0);
|
||||
ret += nm_write_reg(NMI_STATE_REG, 0);
|
||||
ret += nm_write_reg(NMI_REV_REG, 0);
|
||||
|
||||
/**
|
||||
Go...
|
||||
**/
|
||||
ret += nm_read_reg_with_ret(0x1118, ®);
|
||||
if (M2M_SUCCESS != ret) {
|
||||
ret = M2M_ERR_BUS_FAIL;
|
||||
M2M_ERR("[nmi start]: fail read reg 0x1118 ...\r\n");
|
||||
}
|
||||
reg |= NBIT0;
|
||||
ret += nm_write_reg(0x1118, reg);
|
||||
ret = nm_write_reg(0x150014, 0x1); //DTODO WHY IS THIS HERE??
|
||||
ret += nm_read_reg_with_ret(NMI_GLB_RESET_0, ®);
|
||||
if ((reg & (1ul << 10)) == (1ul << 10)) {
|
||||
reg &= ~(1ul << 10);
|
||||
ret += nm_write_reg(NMI_GLB_RESET_0, reg);
|
||||
}
|
||||
|
||||
reg |= (1ul << 10);
|
||||
ret += nm_write_reg(NMI_GLB_RESET_0, reg);
|
||||
nm_sleep(1); /* Removing this can cause a bus error. */
|
||||
return ret;
|
||||
}
|
||||
|
||||
uint32_t nmi_get_chipid(void)
|
||||
{
|
||||
static uint32_t chipid = 0;
|
||||
|
||||
if (chipid == 0) {
|
||||
uint32_t rfrevid;
|
||||
|
||||
if ((nm_read_reg_with_ret(0x1000, &chipid)) != M2M_SUCCESS) {
|
||||
chipid = 0;
|
||||
return 0;
|
||||
}
|
||||
if ((nm_read_reg_with_ret(0x13f4, &rfrevid)) != M2M_SUCCESS) {
|
||||
chipid = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (chipid == 0x1002a0) {
|
||||
if (rfrevid == 0x1) { /* 1002A0 */
|
||||
} else /* if (rfrevid == 0x2) */ { /* 1002A1 */
|
||||
chipid = 0x1002a1;
|
||||
}
|
||||
} else if (chipid == 0x1002b0) {
|
||||
if (rfrevid == 3) { /* 1002B0 */
|
||||
} else if (rfrevid == 4) { /* 1002B1 */
|
||||
chipid = 0x1002b1;
|
||||
} else /* if(rfrevid == 5) */ { /* 1002B2 */
|
||||
chipid = 0x1002b2;
|
||||
}
|
||||
} else if(chipid == 0x1000f0) {
|
||||
/* For 3400, the WiFi chip ID register reads 0x1000f0.
|
||||
* Therefore using BT chip ID register here which should read 0x3000D0
|
||||
*/
|
||||
#define rBT_CHIP_ID_REG (0x3b0000)
|
||||
if((nm_read_reg_with_ret(rBT_CHIP_ID_REG, &chipid)) != M2M_SUCCESS) {
|
||||
chipid = 0;
|
||||
return 0;
|
||||
}
|
||||
if(chipid == 0x3000d0) {
|
||||
if(rfrevid == 6) {
|
||||
chipid = 0x3000d1;
|
||||
}
|
||||
else if(rfrevid == 2) {
|
||||
chipid = 0x3000d2;
|
||||
}
|
||||
}
|
||||
}
|
||||
//#define PROBE_FLASH
|
||||
#ifdef PROBE_FLASH
|
||||
if(chipid) {
|
||||
UWORD32 flashid;
|
||||
|
||||
flashid = probe_spi_flash();
|
||||
if((chipid & 0xf00000) == 0x300000) {
|
||||
if(flashid == 0x1440ef) {
|
||||
chipid &= ~(0x0f0000);
|
||||
chipid |= 0x040000;
|
||||
}
|
||||
} else {
|
||||
if(flashid == 0x1230ef) {
|
||||
chipid &= ~(0x0f0000);
|
||||
chipid |= 0x050000;
|
||||
}
|
||||
if(flashid == 0xc21320c2) {
|
||||
chipid &= ~(0x0f0000);
|
||||
chipid |= 0x050000;
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
/*M2M is by default have SPI flash*/
|
||||
if((chipid & 0xf00000) == 0x300000) {
|
||||
chipid &= ~(0x0f0000);
|
||||
chipid |= 0x040000;
|
||||
} else {
|
||||
chipid &= ~(0x0f0000);
|
||||
chipid |= 0x050000;
|
||||
}
|
||||
#endif /* PROBE_FLASH */
|
||||
}
|
||||
return chipid;
|
||||
}
|
||||
|
||||
uint32_t nmi_get_rfrevid(void)
|
||||
{
|
||||
uint32_t rfrevid;
|
||||
if((nm_read_reg_with_ret(0x13f4, &rfrevid)) != M2M_SUCCESS) {
|
||||
rfrevid = 0;
|
||||
}
|
||||
return rfrevid;
|
||||
}
|
||||
|
||||
void restore_pmu_settings_after_global_reset(void)
|
||||
{
|
||||
/*
|
||||
* Must restore PMU register value after
|
||||
* global reset if PMU toggle is done at
|
||||
* least once since the last hard reset.
|
||||
*/
|
||||
if(REV(nmi_get_chipid()) >= REV_2B0) {
|
||||
nm_write_reg(0x1e48, 0xb78469ce);
|
||||
}
|
||||
}
|
||||
|
||||
void nmi_update_pll(void)
|
||||
{
|
||||
uint32_t pll;
|
||||
|
||||
pll = nm_read_reg(0x1428);
|
||||
pll &= ~0x1ul;
|
||||
nm_write_reg(0x1428, pll);
|
||||
pll |= 0x1ul;
|
||||
nm_write_reg(0x1428, pll);
|
||||
|
||||
}
|
||||
void nmi_set_sys_clk_src_to_xo(void)
|
||||
{
|
||||
uint32_t val32;
|
||||
|
||||
/* Switch system clock source to XO. This will take effect after nmi_update_pll(). */
|
||||
val32 = nm_read_reg(0x141c);
|
||||
val32 |= (1 << 2);
|
||||
nm_write_reg(0x141c, val32);
|
||||
|
||||
/* Do PLL update */
|
||||
nmi_update_pll();
|
||||
}
|
||||
|
||||
int8_t chip_sleep(void)
|
||||
{
|
||||
uint32_t reg;
|
||||
int8_t ret = M2M_SUCCESS;
|
||||
|
||||
while(1)
|
||||
{
|
||||
ret = nm_read_reg_with_ret(CORT_HOST_COMM, ®);
|
||||
if(ret != M2M_SUCCESS) goto ERR1;
|
||||
if((reg & NBIT0) == 0) break;
|
||||
}
|
||||
|
||||
/* Clear bit 1 */
|
||||
ret = nm_read_reg_with_ret(WAKE_CLK_REG, ®);
|
||||
if(ret != M2M_SUCCESS)goto ERR1;
|
||||
if(reg & NBIT1)
|
||||
{
|
||||
reg &=~NBIT1;
|
||||
ret = nm_write_reg(WAKE_CLK_REG, reg);
|
||||
if(ret != M2M_SUCCESS)goto ERR1;
|
||||
}
|
||||
|
||||
ret = nm_read_reg_with_ret(HOST_CORT_COMM, ®);
|
||||
if(ret != M2M_SUCCESS)goto ERR1;
|
||||
if(reg & NBIT0)
|
||||
{
|
||||
reg &= ~NBIT0;
|
||||
ret = nm_write_reg(HOST_CORT_COMM, reg);
|
||||
if(ret != M2M_SUCCESS)goto ERR1;
|
||||
}
|
||||
|
||||
ERR1:
|
||||
return ret;
|
||||
}
|
||||
|
||||
int8_t chip_wake(void)
|
||||
{
|
||||
int8_t ret = M2M_SUCCESS;
|
||||
uint32_t reg = 0, clk_status_reg = 0, trials = 0;
|
||||
|
||||
nm_read_reg_with_ret(CLOCKS_EN_REG, &clk_status_reg);
|
||||
|
||||
ret = nm_read_reg_with_ret(HOST_CORT_COMM, ®);
|
||||
if(ret != M2M_SUCCESS)goto _WAKE_EXIT;
|
||||
|
||||
if(!(reg & NBIT0))
|
||||
{
|
||||
/*USE bit 0 to indicate host wakeup*/
|
||||
ret = nm_write_reg(HOST_CORT_COMM, reg|NBIT0);
|
||||
if(ret != M2M_SUCCESS)goto _WAKE_EXIT;
|
||||
}
|
||||
|
||||
ret = nm_read_reg_with_ret(WAKE_CLK_REG, ®);
|
||||
if(ret != M2M_SUCCESS) goto _WAKE_EXIT;
|
||||
|
||||
/* Set bit 1 */
|
||||
if(!(reg & NBIT1))
|
||||
{
|
||||
ret = nm_write_reg(WAKE_CLK_REG, reg | NBIT1);
|
||||
if(ret != M2M_SUCCESS) goto _WAKE_EXIT;
|
||||
}
|
||||
|
||||
do
|
||||
{
|
||||
ret = nm_read_reg_with_ret(CLOCKS_EN_REG, &clk_status_reg);
|
||||
if(ret != M2M_SUCCESS) {
|
||||
M2M_ERR("Bus error (5).%d %" PRIx32 "\n", ret, clk_status_reg);
|
||||
goto _WAKE_EXIT;
|
||||
}
|
||||
if (clk_status_reg & NBIT2) {
|
||||
break;
|
||||
}
|
||||
nm_sleep(2);
|
||||
trials++;
|
||||
if (trials > WAKEUP_TRIALS)
|
||||
{
|
||||
M2M_ERR("Failed to wakeup the chip\n");
|
||||
ret = M2M_ERR_TIME_OUT;
|
||||
goto _WAKE_EXIT;
|
||||
}
|
||||
} while(1);
|
||||
/* Workaround sometimes spi fail to read clock regs after reading/writing clockless registers */
|
||||
//nm_bus_reset();
|
||||
_WAKE_EXIT:
|
||||
return ret;
|
||||
}
|
||||
|
||||
int8_t chip_reset_and_cpu_halt(void)
|
||||
{
|
||||
int8_t ret = M2M_SUCCESS;
|
||||
uint32_t reg = 0;
|
||||
|
||||
ret = chip_wake();
|
||||
if (ret != M2M_SUCCESS) {
|
||||
return ret;
|
||||
}
|
||||
chip_reset();
|
||||
ret = nm_read_reg_with_ret(0x1118, ®);
|
||||
if (M2M_SUCCESS != ret) {
|
||||
ret = M2M_ERR_BUS_FAIL;
|
||||
M2M_ERR("[nmi start]: fail read reg 0x1118 ...\r\n");
|
||||
}
|
||||
reg |= (1 << 0);
|
||||
ret = nm_write_reg(0x1118, reg);
|
||||
ret += nm_read_reg_with_ret(NMI_GLB_RESET_0, ®);
|
||||
if ((reg & (1ul << 10)) == (1ul << 10)) {
|
||||
reg &= ~(1ul << 10);
|
||||
ret += nm_write_reg(NMI_GLB_RESET_0, reg);
|
||||
ret += nm_read_reg_with_ret(NMI_GLB_RESET_0, ®);
|
||||
}
|
||||
nm_write_reg(BOOTROM_REG, 0);
|
||||
nm_write_reg(NMI_STATE_REG, 0);
|
||||
nm_write_reg(NMI_REV_REG, 0);
|
||||
nm_write_reg(NMI_PIN_MUX_0, 0x11111000);
|
||||
return ret;
|
||||
}
|
||||
int8_t chip_reset(void)
|
||||
{
|
||||
int8_t ret = M2M_SUCCESS;
|
||||
|
||||
ret += nm_write_reg(NMI_GLB_RESET_0, 0);
|
||||
nm_sleep(50);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int8_t wait_for_bootrom(uint8_t arg)
|
||||
{
|
||||
int8_t ret = M2M_SUCCESS;
|
||||
uint32_t reg = 0, cnt = 0;
|
||||
uint32_t u32GpReg1 = 0;
|
||||
|
||||
reg = 0;
|
||||
while(1) {
|
||||
reg = nm_read_reg(0x1014); /* wait for efuse loading done */
|
||||
if (reg & 0x80000000) {
|
||||
break;
|
||||
}
|
||||
nm_sleep(1); /* Removing this can cause a bus error. */
|
||||
}
|
||||
reg = nm_read_reg(M2M_WAIT_FOR_HOST_REG);
|
||||
reg &= 0x1;
|
||||
|
||||
/* check if waiting for the host will be skipped or not */
|
||||
if(reg == 0)
|
||||
{
|
||||
while(reg != M2M_FINISH_BOOT_ROM)
|
||||
{
|
||||
nm_sleep(1);
|
||||
reg = nm_read_reg(BOOTROM_REG);
|
||||
|
||||
if (++cnt > TIMEOUT)
|
||||
{
|
||||
M2M_DBG("failed to load firmware from flash.\r\n");
|
||||
ret = M2M_ERR_INIT;
|
||||
goto ERR2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (M2M_WIFI_MODE_CONFIG == arg) {
|
||||
nm_write_reg(NMI_REV_REG, M2M_ATE_FW_START_VALUE);
|
||||
} else if (M2M_WIFI_MODE_ETHERNET == arg) {
|
||||
u32GpReg1 = rHAVE_ETHERNET_MODE_BIT;
|
||||
} else {
|
||||
/*bypass this step*/
|
||||
}
|
||||
|
||||
if (REV(nmi_get_chipid()) == REV_3A0)
|
||||
{
|
||||
chip_apply_conf(u32GpReg1 | rHAVE_USE_PMU_BIT);
|
||||
}
|
||||
else
|
||||
{
|
||||
chip_apply_conf(u32GpReg1);
|
||||
}
|
||||
|
||||
nm_write_reg(BOOTROM_REG, M2M_START_FIRMWARE);
|
||||
|
||||
#ifdef __ROM_TEST__
|
||||
rom_test();
|
||||
#endif /* __ROM_TEST__ */
|
||||
|
||||
ERR2:
|
||||
return ret;
|
||||
}
|
||||
|
||||
int8_t wait_for_firmware_start(uint8_t arg)
|
||||
{
|
||||
int8_t ret = M2M_SUCCESS;
|
||||
uint32_t reg = 0, cnt = 0;
|
||||
volatile uint32_t regAddress = NMI_STATE_REG;
|
||||
volatile uint32_t checkValue = M2M_FINISH_INIT_STATE;
|
||||
|
||||
if(M2M_WIFI_MODE_CONFIG == arg) {
|
||||
regAddress = NMI_REV_REG;
|
||||
checkValue = M2M_ATE_FW_START_VALUE;//M2M_ATE_FW_IS_UP_VALUE;
|
||||
} else {
|
||||
/*bypass this step*/
|
||||
}
|
||||
|
||||
while (checkValue != reg)
|
||||
{
|
||||
nm_sleep(2); /* Removing this can cause a bus error. */
|
||||
M2M_DBG("%x %x %x\r\n", (unsigned int)nm_read_reg(0x108c), (unsigned int)nm_read_reg(0x108c), (unsigned int)nm_read_reg(0x14A0));
|
||||
if (nm_read_reg_with_ret(regAddress, ®) != M2M_SUCCESS)
|
||||
{
|
||||
// ensure reg != checkValue
|
||||
reg = !checkValue;
|
||||
}
|
||||
if (++cnt > TIMEOUT)
|
||||
{
|
||||
M2M_DBG("Time out for wait firmware Run\r\n");
|
||||
ret = M2M_ERR_INIT;
|
||||
goto ERR;
|
||||
}
|
||||
}
|
||||
if (M2M_FINISH_INIT_STATE == checkValue)
|
||||
{
|
||||
nm_write_reg(NMI_STATE_REG, 0);
|
||||
}
|
||||
ERR:
|
||||
return ret;
|
||||
}
|
||||
|
||||
int8_t chip_deinit(void)
|
||||
{
|
||||
uint32_t reg = 0;
|
||||
int8_t ret;
|
||||
uint8_t timeout = 10;
|
||||
|
||||
/**
|
||||
stop the firmware, need a re-download
|
||||
**/
|
||||
ret = nm_read_reg_with_ret(NMI_GLB_RESET_0, ®);
|
||||
if (ret != M2M_SUCCESS) {
|
||||
M2M_ERR("failed to de-initialize\r\n");
|
||||
}
|
||||
reg &= ~(1 << 10);
|
||||
ret = nm_write_reg(NMI_GLB_RESET_0, reg);
|
||||
|
||||
if (ret != M2M_SUCCESS) {
|
||||
M2M_ERR("Error while writing reg\r\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
do {
|
||||
ret = nm_read_reg_with_ret(NMI_GLB_RESET_0, ®);
|
||||
if (ret != M2M_SUCCESS) {
|
||||
M2M_ERR("Error while reading reg\r\n");
|
||||
return ret;
|
||||
}
|
||||
/*Workaround to ensure that the chip is actually reset*/
|
||||
if ((reg & (1 << 10))) {
|
||||
M2M_DBG("Bit 10 not reset retry %d\r\n", timeout);
|
||||
reg &= ~(1 << 10);
|
||||
ret = nm_write_reg(NMI_GLB_RESET_0, reg);
|
||||
timeout--;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
} while (timeout);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int8_t set_gpio_dir(uint8_t gpio, uint8_t dir)
|
||||
{
|
||||
uint32_t val32;
|
||||
int8_t ret;
|
||||
|
||||
ret = nm_read_reg_with_ret(0x20108, &val32);
|
||||
if(ret != M2M_SUCCESS) goto _EXIT;
|
||||
|
||||
if(dir) {
|
||||
val32 |= (1ul << gpio);
|
||||
} else {
|
||||
val32 &= ~(1ul << gpio);
|
||||
}
|
||||
|
||||
ret = nm_write_reg(0x20108, val32);
|
||||
|
||||
_EXIT:
|
||||
return ret;
|
||||
}
|
||||
int8_t set_gpio_val(uint8_t gpio, uint8_t val)
|
||||
{
|
||||
uint32_t val32;
|
||||
int8_t ret;
|
||||
|
||||
ret = nm_read_reg_with_ret(0x20100, &val32);
|
||||
if(ret != M2M_SUCCESS) goto _EXIT;
|
||||
|
||||
if(val) {
|
||||
val32 |= (1ul << gpio);
|
||||
} else {
|
||||
val32 &= ~(1ul << gpio);
|
||||
}
|
||||
|
||||
ret = nm_write_reg(0x20100, val32);
|
||||
|
||||
_EXIT:
|
||||
return ret;
|
||||
}
|
||||
|
||||
int8_t get_gpio_val(uint8_t gpio, uint8_t* val)
|
||||
{
|
||||
uint32_t val32;
|
||||
int8_t ret;
|
||||
|
||||
ret = nm_read_reg_with_ret(0x20104, &val32);
|
||||
if(ret != M2M_SUCCESS) goto _EXIT;
|
||||
|
||||
*val = (uint8_t)((val32 >> gpio) & 0x01);
|
||||
|
||||
_EXIT:
|
||||
return ret;
|
||||
}
|
||||
|
||||
int8_t pullup_ctrl(uint32_t pinmask, uint8_t enable)
|
||||
{
|
||||
int8_t s8Ret;
|
||||
uint32_t val32;
|
||||
s8Ret = nm_read_reg_with_ret(0x142c, &val32);
|
||||
if (s8Ret != M2M_SUCCESS) {
|
||||
M2M_ERR("[pullup_ctrl]: failed to read\r\n");
|
||||
goto _EXIT;
|
||||
}
|
||||
if (enable) {
|
||||
val32 &= ~pinmask;
|
||||
} else {
|
||||
val32 |= pinmask;
|
||||
}
|
||||
s8Ret = nm_write_reg(0x142c, val32);
|
||||
if (s8Ret != M2M_SUCCESS) {
|
||||
M2M_ERR("[pullup_ctrl]: failed to write\r\n");
|
||||
goto _EXIT;
|
||||
}
|
||||
_EXIT:
|
||||
return s8Ret;
|
||||
}
|
||||
|
||||
int8_t nmi_get_otp_mac_address(uint8_t *pu8MacAddr, uint8_t *pu8IsValid)
|
||||
{
|
||||
int8_t ret;
|
||||
uint32_t u32RegValue;
|
||||
uint8_t mac[6];
|
||||
tstrGpRegs strgp = {0};
|
||||
|
||||
ret = nm_read_reg_with_ret(rNMI_GP_REG_0, &u32RegValue);
|
||||
if (ret != M2M_SUCCESS) goto _EXIT_ERR;
|
||||
|
||||
ret = nm_read_block(u32RegValue|0x30000,(uint8_t*)&strgp,sizeof(tstrGpRegs));
|
||||
if (ret != M2M_SUCCESS) goto _EXIT_ERR;
|
||||
u32RegValue = strgp.u32Mac_efuse_mib;
|
||||
|
||||
if (!EFUSED_MAC(u32RegValue)) {
|
||||
M2M_DBG("Default MAC\r\n");
|
||||
memset(pu8MacAddr, 0, 6);
|
||||
goto _EXIT_ERR;
|
||||
}
|
||||
|
||||
M2M_DBG("OTP MAC\r\n");
|
||||
u32RegValue >>=16;
|
||||
ret = nm_read_block(u32RegValue|0x30000, mac, 6);
|
||||
memcpy(pu8MacAddr, mac, 6);
|
||||
if (pu8IsValid) *pu8IsValid = 1;
|
||||
return ret;
|
||||
|
||||
_EXIT_ERR:
|
||||
if (pu8IsValid) *pu8IsValid = 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
int8_t nmi_get_mac_address(uint8_t *pu8MacAddr)
|
||||
{
|
||||
int8_t ret;
|
||||
uint32_t u32RegValue;
|
||||
uint8_t mac[6];
|
||||
tstrGpRegs strgp = {0};
|
||||
|
||||
ret = nm_read_reg_with_ret(rNMI_GP_REG_0, &u32RegValue);
|
||||
if (ret != M2M_SUCCESS) goto _EXIT_ERR;
|
||||
|
||||
ret = nm_read_block(u32RegValue|0x30000, (uint8_t*)&strgp, sizeof(tstrGpRegs));
|
||||
if (ret != M2M_SUCCESS) goto _EXIT_ERR;
|
||||
u32RegValue = strgp.u32Mac_efuse_mib;
|
||||
|
||||
u32RegValue &=0x0000ffff;
|
||||
ret = nm_read_block(u32RegValue|0x30000, mac, 6);
|
||||
memcpy(pu8MacAddr, mac, 6);
|
||||
|
||||
_EXIT_ERR:
|
||||
return ret;
|
||||
}
|
||||
|
||||
//DOM-IGNORE-END
|
||||
248
ChaletLora.X/Source/winc3400_142/driver/source/nmbus.c
Normal file
248
ChaletLora.X/Source/winc3400_142/driver/source/nmbus.c
Normal file
@ -0,0 +1,248 @@
|
||||
/*******************************************************************************
|
||||
This module contains WINC3400 bus APIs implementation.
|
||||
|
||||
File Name:
|
||||
nmbus.c
|
||||
|
||||
Summary:
|
||||
This module contains WINC3400 bus APIs implementation.
|
||||
|
||||
Description:
|
||||
This module contains WINC3400 bus APIs implementation.
|
||||
*******************************************************************************/
|
||||
|
||||
//DOM-IGNORE-BEGIN
|
||||
/*******************************************************************************
|
||||
* Copyright (C) 2021 Microchip Technology Inc. and its subsidiaries.
|
||||
*
|
||||
* Subject to your compliance with these terms, you may use Microchip software
|
||||
* and any derivatives exclusively with Microchip products. It is your
|
||||
* responsibility to comply with third party license terms applicable to your
|
||||
* use of third party software (including open source software) that may
|
||||
* accompany Microchip software.
|
||||
*
|
||||
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
|
||||
* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
|
||||
* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
|
||||
* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
|
||||
* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
|
||||
* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
|
||||
* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
|
||||
* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
|
||||
* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
|
||||
*******************************************************************************/
|
||||
#include "nmbus.h"
|
||||
#include "nmspi.h"
|
||||
|
||||
#define MAX_TRX_CFG_SZ 8
|
||||
#define NM_BUS_MAX_TRX_SZ 256
|
||||
|
||||
/**
|
||||
* @struct tstrNmBusCapabilities
|
||||
* @brief Structure holding bus capabilities information
|
||||
* @sa NM_BUS_TYPE_I2C, NM_BUS_TYPE_SPI
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
uint16_t u16MaxTrxSz; /*!< Maximum transfer size. Must be >= 16 bytes*/
|
||||
} tstrNmBusCapabilities;
|
||||
|
||||
tstrNmBusCapabilities egstrNmBusCapabilities =
|
||||
{
|
||||
NM_BUS_MAX_TRX_SZ
|
||||
};
|
||||
|
||||
/*
|
||||
* @fn nm_bus_init
|
||||
* @brief Initialize the bus wrapper
|
||||
* @return M2M_SUCCESS in case of success and M2M_ERR_BUS_FAIL in case of failure
|
||||
*/
|
||||
static int8_t nm_bus_init(void *pvinit)
|
||||
{
|
||||
nm_reset();
|
||||
nm_sleep(1);
|
||||
return M2M_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
* @fn nm_bus_deinit
|
||||
* @brief De-initialize the bus wrapper
|
||||
*/
|
||||
static int8_t nm_bus_deinit(void)
|
||||
{
|
||||
return M2M_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @fn nm_bus_iface_init
|
||||
* @brief Initialize bus interface
|
||||
* @return @ref M2M_SUCCESS in case of success and M2M_ERR_BUS_FAIL in case of failure
|
||||
*/
|
||||
int8_t nm_bus_iface_init(void *pvInitVal)
|
||||
{
|
||||
int8_t ret = M2M_SUCCESS;
|
||||
ret = nm_bus_init(pvInitVal);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @fn nm_bus_iface_deinit
|
||||
* @brief Deinitialize bus interface
|
||||
* @return @ref M2M_SUCCESS in case of success and M2M_ERR_BUS_FAIL in case of failure
|
||||
*/
|
||||
int8_t nm_bus_iface_deinit(void)
|
||||
{
|
||||
int8_t ret = M2M_SUCCESS;
|
||||
ret = nm_bus_deinit();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @fn nm_bus_reset
|
||||
* @brief reset bus interface
|
||||
* @return @ref M2M_SUCCESS in case of success and M2M_ERR_BUS_FAIL in case of failure
|
||||
* @version 1.0
|
||||
*/
|
||||
int8_t nm_bus_reset(void)
|
||||
{
|
||||
return nm_spi_reset();
|
||||
}
|
||||
|
||||
/**
|
||||
* @fn nm_bus_iface_reconfigure
|
||||
* @brief reconfigure bus interface
|
||||
* @return @ref M2M_SUCCESS in case of success and M2M_ERR_BUS_FAIL in case of failure
|
||||
*/
|
||||
int8_t nm_bus_iface_reconfigure(void *ptr)
|
||||
{
|
||||
int8_t ret = M2M_SUCCESS;
|
||||
return ret;
|
||||
}
|
||||
/*
|
||||
* @fn nm_read_reg
|
||||
* @brief Read register
|
||||
* @param[in] u32Addr
|
||||
* Register address
|
||||
* @return Register value
|
||||
*/
|
||||
uint32_t nm_read_reg(uint32_t u32Addr)
|
||||
{
|
||||
return nm_spi_read_reg(u32Addr);
|
||||
}
|
||||
|
||||
/*
|
||||
* @fn nm_read_reg_with_ret
|
||||
* @brief Read register with error code return
|
||||
* @param[in] u32Addr
|
||||
* Register address
|
||||
* @param[out] pu32RetVal
|
||||
* Pointer to u32 variable used to return the read value
|
||||
* @return @ref M2M_SUCCESS in case of success and M2M_ERR_BUS_FAIL in case of failure
|
||||
*/
|
||||
int8_t nm_read_reg_with_ret(uint32_t u32Addr, uint32_t* pu32RetVal)
|
||||
{
|
||||
return nm_spi_read_reg_with_ret(u32Addr, pu32RetVal);
|
||||
}
|
||||
|
||||
/*
|
||||
* @fn nm_write_reg
|
||||
* @brief write register
|
||||
* @param[in] u32Addr
|
||||
* Register address
|
||||
* @param[in] u32Val
|
||||
* Value to be written to the register
|
||||
* @return @ref M2M_SUCCESS in case of success and M2M_ERR_BUS_FAIL in case of failure
|
||||
*/
|
||||
int8_t nm_write_reg(uint32_t u32Addr, uint32_t u32Val)
|
||||
{
|
||||
return nm_spi_write_reg(u32Addr, u32Val);
|
||||
}
|
||||
|
||||
static inline int8_t p_nm_read_block(uint32_t u32Addr, uint8_t *puBuf, uint16_t u16Sz)
|
||||
{
|
||||
return nm_spi_read_block(u32Addr, puBuf, u16Sz);
|
||||
}
|
||||
/*
|
||||
* @fn nm_read_block
|
||||
* @brief Read block of data
|
||||
* @param[in] u32Addr
|
||||
* Start address
|
||||
* @param[out] puBuf
|
||||
* Pointer to a buffer used to return the read data
|
||||
* @param[in] u32Sz
|
||||
* Number of bytes to read. The buffer size must be >= u32Sz
|
||||
* @return @ref M2M_SUCCESS in case of success and M2M_ERR_BUS_FAIL in case of failure
|
||||
*/
|
||||
int8_t nm_read_block(uint32_t u32Addr, uint8_t *puBuf, uint32_t u32Sz)
|
||||
{
|
||||
uint16_t u16MaxTrxSz = egstrNmBusCapabilities.u16MaxTrxSz - MAX_TRX_CFG_SZ;
|
||||
uint32_t off = 0;
|
||||
int8_t s8Ret = M2M_SUCCESS;
|
||||
|
||||
for(;;)
|
||||
{
|
||||
if(u32Sz <= u16MaxTrxSz)
|
||||
{
|
||||
s8Ret += p_nm_read_block(u32Addr, &puBuf[off], (uint16_t)u32Sz);
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
s8Ret += p_nm_read_block(u32Addr, &puBuf[off], u16MaxTrxSz);
|
||||
if(M2M_SUCCESS != s8Ret) break;
|
||||
u32Sz -= u16MaxTrxSz;
|
||||
off += u16MaxTrxSz;
|
||||
u32Addr += u16MaxTrxSz;
|
||||
}
|
||||
}
|
||||
|
||||
return s8Ret;
|
||||
}
|
||||
|
||||
static inline int8_t p_nm_write_block(uint32_t u32Addr, uint8_t *puBuf, uint16_t u16Sz)
|
||||
{
|
||||
return nm_spi_write_block(u32Addr, puBuf, u16Sz);
|
||||
}
|
||||
/**
|
||||
* @fn nm_write_block
|
||||
* @brief Write block of data
|
||||
* @param[in] u32Addr
|
||||
* Start address
|
||||
* @param[in] puBuf
|
||||
* Pointer to the buffer holding the data to be written
|
||||
* @param[in] u32Sz
|
||||
* Number of bytes to write. The buffer size must be >= u32Sz
|
||||
* @return @ref M2M_SUCCESS in case of success and M2M_ERR_BUS_FAIL in case of failure
|
||||
*/
|
||||
int8_t nm_write_block(uint32_t u32Addr, uint8_t *puBuf, uint32_t u32Sz)
|
||||
{
|
||||
uint16_t u16MaxTrxSz = egstrNmBusCapabilities.u16MaxTrxSz - MAX_TRX_CFG_SZ;
|
||||
uint32_t off = 0;
|
||||
int8_t s8Ret = M2M_SUCCESS;
|
||||
|
||||
for(;;)
|
||||
{
|
||||
if(u32Sz <= u16MaxTrxSz)
|
||||
{
|
||||
s8Ret += p_nm_write_block(u32Addr, &puBuf[off], (uint16_t)u32Sz);
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
s8Ret += p_nm_write_block(u32Addr, &puBuf[off], u16MaxTrxSz);
|
||||
if(M2M_SUCCESS != s8Ret) break;
|
||||
u32Sz -= u16MaxTrxSz;
|
||||
off += u16MaxTrxSz;
|
||||
u32Addr += u16MaxTrxSz;
|
||||
}
|
||||
}
|
||||
|
||||
return s8Ret;
|
||||
}
|
||||
|
||||
//DOM-IGNORE-END
|
||||
410
ChaletLora.X/Source/winc3400_142/driver/source/nmdrv.c
Normal file
410
ChaletLora.X/Source/winc3400_142/driver/source/nmdrv.c
Normal file
@ -0,0 +1,410 @@
|
||||
/*******************************************************************************
|
||||
File Name:
|
||||
nmdrv.c
|
||||
|
||||
Summary:
|
||||
This module contains WINC3400 M2M driver APIs implementation.
|
||||
|
||||
Description:
|
||||
This module contains WINC3400 M2M driver APIs implementation.
|
||||
*******************************************************************************/
|
||||
|
||||
//DOM-IGNORE-BEGIN
|
||||
/*******************************************************************************
|
||||
* Copyright (C) 2021 Microchip Technology Inc. and its subsidiaries.
|
||||
*
|
||||
* Subject to your compliance with these terms, you may use Microchip software
|
||||
* and any derivatives exclusively with Microchip products. It is your
|
||||
* responsibility to comply with third party license terms applicable to your
|
||||
* use of third party software (including open source software) that may
|
||||
* accompany Microchip software.
|
||||
*
|
||||
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
|
||||
* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
|
||||
* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
|
||||
* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
|
||||
* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
|
||||
* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
|
||||
* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
|
||||
* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
|
||||
* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
|
||||
*******************************************************************************/
|
||||
|
||||
#include "nm_common.h"
|
||||
#include "nmbus.h"
|
||||
#include "nm_bsp.h"
|
||||
#include "nmdrv.h"
|
||||
#include "nmasic.h"
|
||||
#include "m2m_types.h"
|
||||
|
||||
#include "nmspi.h"
|
||||
|
||||
static tenuNmState genuNmState = NM_STATE_DEINIT;
|
||||
/**
|
||||
* @fn nm_get_hif_info(uint16_t *pu16FwHifInfo, uint16_t *pu16OtaHifInfo);
|
||||
* @brief Get Hif info of images in both partitions (Firmware and Ota).
|
||||
* @param[out] pu16FwHifInfo
|
||||
* Pointer holding Hif info of image in the active partition.
|
||||
* @param[out] pu16OtaHifInfo
|
||||
* Pointer holding Hif info of image in the inactive partition.
|
||||
* @return @ref M2M_SUCCESS in case of success and Negative error code in case of failure
|
||||
*/
|
||||
int8_t nm_get_hif_info(uint16_t *pu16FwHifInfo, uint16_t *pu16OtaHifInfo)
|
||||
{
|
||||
int8_t ret = M2M_SUCCESS;
|
||||
uint32_t reg = 0;
|
||||
|
||||
ret = nm_read_reg_with_ret(NMI_REV_REG, ®);
|
||||
if(ret == M2M_SUCCESS)
|
||||
{
|
||||
if(pu16FwHifInfo != NULL)
|
||||
{
|
||||
*pu16FwHifInfo = (uint16_t)reg;
|
||||
}
|
||||
if(pu16OtaHifInfo)
|
||||
{
|
||||
*pu16OtaHifInfo = (uint16_t)(reg>>16);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @fn nm_get_firmware_full_info(tstrM2mRev* M2mRev)
|
||||
* @brief Get Firmware version info
|
||||
* @param[out] M2mRev
|
||||
* Pointer holds address of structure @ref tstrM2mRev that contains the firmware version parameters
|
||||
*/
|
||||
int8_t nm_get_firmware_full_info(tstrM2mRev *pstrRev)
|
||||
{
|
||||
uint16_t fw_hif_info = 0;
|
||||
uint32_t reg = 0;
|
||||
int8_t ret = M2M_SUCCESS;
|
||||
tstrGpRegs strgp = {0};
|
||||
|
||||
memset((uint8_t*)pstrRev, 0, sizeof(tstrM2mRev));
|
||||
nm_get_hif_info(&fw_hif_info, NULL);
|
||||
|
||||
M2M_INFO("Fw HIF: %04x\r\n", fw_hif_info);
|
||||
if(M2M_GET_HIF_BLOCK(fw_hif_info) == M2M_HIF_BLOCK_VALUE)
|
||||
{
|
||||
ret = nm_read_reg_with_ret(rNMI_GP_REG_0, ®);
|
||||
if(ret == M2M_SUCCESS)
|
||||
{
|
||||
if(reg != 0)
|
||||
{
|
||||
ret = nm_read_block(reg|0x30000, (uint8_t*)&strgp, sizeof(tstrGpRegs));
|
||||
if(ret == M2M_SUCCESS)
|
||||
{
|
||||
reg = strgp.u32Firmware_Ota_rev;
|
||||
reg &= 0x0000ffff;
|
||||
if(reg != 0)
|
||||
{
|
||||
ret = nm_read_block(reg|0x30000, (uint8_t*)pstrRev, sizeof(tstrM2mRev));
|
||||
if(ret == M2M_SUCCESS)
|
||||
{
|
||||
M2M_INFO("Firmware HIF (%u) : %u.%u\r\n", M2M_GET_HIF_BLOCK(pstrRev->u16FirmwareHifInfo), M2M_GET_HIF_MAJOR(pstrRev->u16FirmwareHifInfo), M2M_GET_HIF_MINOR(pstrRev->u16FirmwareHifInfo));
|
||||
M2M_INFO("Firmware ver : %u.%u.%u\r\n", pstrRev->u8FirmwareMajor, pstrRev->u8FirmwareMinor, pstrRev->u8FirmwarePatch);
|
||||
M2M_INFO("Firmware Build %s Time %s\r\n", pstrRev->BuildDate, pstrRev->BuildTime);
|
||||
|
||||
/* Check Hif info is consistent */
|
||||
if(fw_hif_info != pstrRev->u16FirmwareHifInfo)
|
||||
{
|
||||
ret = M2M_ERR_FAIL;
|
||||
M2M_ERR("Inconsistent Firmware Version\r\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = M2M_ERR_FAIL;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = M2M_ERR_FAIL;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = M2M_ERR_FAIL;
|
||||
}
|
||||
if(ret != M2M_SUCCESS)
|
||||
{
|
||||
M2M_ERR("Unknown Firmware Version\r\n");
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
/**
|
||||
* @fn nm_get_ota_firmware_info(tstrM2mRev* pstrRev)
|
||||
* @brief Get Firmware version info
|
||||
* @param[out] M2mRev
|
||||
* Pointer holds address of structure @ref tstrM2mRev that contains the firmware version parameters
|
||||
*/
|
||||
int8_t nm_get_ota_firmware_info(tstrM2mRev *pstrRev)
|
||||
{
|
||||
uint16_t ota_hif_info = 0;
|
||||
uint32_t reg = 0;
|
||||
int8_t ret = M2M_SUCCESS;
|
||||
tstrGpRegs strgp = {0};
|
||||
|
||||
memset((uint8_t*)pstrRev, 0, sizeof(tstrM2mRev));
|
||||
nm_get_hif_info(NULL, &ota_hif_info);
|
||||
|
||||
M2M_INFO("OTA HIF: %04x\r\n", ota_hif_info);
|
||||
if(M2M_GET_HIF_BLOCK(ota_hif_info) == M2M_HIF_BLOCK_VALUE)
|
||||
{
|
||||
ret = nm_read_reg_with_ret(rNMI_GP_REG_0, ®);
|
||||
if(ret == M2M_SUCCESS)
|
||||
{
|
||||
if(reg != 0)
|
||||
{
|
||||
ret = nm_read_block(reg|0x30000, (uint8_t*)&strgp, sizeof(tstrGpRegs));
|
||||
if(ret == M2M_SUCCESS)
|
||||
{
|
||||
reg = strgp.u32Firmware_Ota_rev;
|
||||
reg >>= 16;
|
||||
if(reg != 0)
|
||||
{
|
||||
ret = nm_read_block(reg|0x30000, (uint8_t*)pstrRev, sizeof(tstrM2mRev));
|
||||
if(ret == M2M_SUCCESS)
|
||||
{
|
||||
M2M_INFO("OTA HIF (%u) : %u.%u\r\n", M2M_GET_HIF_BLOCK(pstrRev->u16FirmwareHifInfo), M2M_GET_HIF_MAJOR(pstrRev->u16FirmwareHifInfo), M2M_GET_HIF_MINOR(pstrRev->u16FirmwareHifInfo));
|
||||
M2M_INFO("OTA ver : %u.%u.%u\r\n", pstrRev->u8FirmwareMajor, pstrRev->u8FirmwareMinor, pstrRev->u8FirmwarePatch);
|
||||
M2M_INFO("OTA Build %s Time %s\r\n", pstrRev->BuildDate, pstrRev->BuildTime);
|
||||
|
||||
/* Check Hif info is consistent */
|
||||
if(ota_hif_info != pstrRev->u16FirmwareHifInfo)
|
||||
{
|
||||
ret = M2M_ERR_FAIL;
|
||||
M2M_ERR("Inconsistent OTA Version\r\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = M2M_ERR_FAIL;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = M2M_ERR_FAIL;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = M2M_ERR_FAIL;
|
||||
}
|
||||
if(ret != M2M_SUCCESS)
|
||||
{
|
||||
M2M_INFO("No valid OTA image\r\n");
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @fn nm_drv_init_download_mode
|
||||
* @brief Initialize NMC1000 driver in download mode
|
||||
* @return @ref M2M_SUCCESS in case of success and Negative error code in case of failure
|
||||
*/
|
||||
int8_t nm_drv_init_download_mode(void)
|
||||
{
|
||||
int8_t ret = M2M_SUCCESS;
|
||||
|
||||
ret = nm_bus_iface_init(NULL);
|
||||
if (M2M_SUCCESS != ret) {
|
||||
M2M_ERR("[nmi start]: fail init bus\r\n");
|
||||
goto ERR1;
|
||||
}
|
||||
|
||||
nm_spi_lock_init();
|
||||
|
||||
/* Must do this after global reset to set SPI data packet size. */
|
||||
nm_spi_init();
|
||||
|
||||
M2M_INFO("Chip ID %lx\r\n", nmi_get_chipid());
|
||||
|
||||
/*disable all interrupt in ROM (to disable uart) in 2b0 chip*/
|
||||
nm_write_reg(0x20300, 0);
|
||||
|
||||
genuNmState = NM_STATE_INIT;
|
||||
ERR1:
|
||||
return ret;
|
||||
}
|
||||
|
||||
int8_t nm_drv_init_hold(void)
|
||||
{
|
||||
int8_t ret = M2M_SUCCESS;
|
||||
|
||||
nm_spi_lock_init();
|
||||
|
||||
ret = nm_bus_iface_init(NULL);
|
||||
if (M2M_SUCCESS != ret) {
|
||||
M2M_ERR("[nmi start]: fail init bus\r\n");
|
||||
goto ERR1;
|
||||
}
|
||||
|
||||
#ifdef BUS_ONLY
|
||||
return;
|
||||
#endif
|
||||
|
||||
#ifdef NO_HW_CHIP_EN
|
||||
ret = chip_wake();
|
||||
nm_sleep(10);
|
||||
if (M2M_SUCCESS != ret) {
|
||||
M2M_ERR("[nmi start]: fail chip_wakeup\r\n");
|
||||
goto ERR2;
|
||||
}
|
||||
|
||||
/**
|
||||
Go...
|
||||
**/
|
||||
ret = chip_reset();
|
||||
if (M2M_SUCCESS != ret) {
|
||||
goto ERR2;
|
||||
}
|
||||
#endif
|
||||
M2M_INFO("Chip ID %lx\r\n", nmi_get_chipid());
|
||||
/* Must do this after global reset to set SPI data packet size. */
|
||||
nm_spi_init();
|
||||
/*return power save to default value*/
|
||||
chip_idle();
|
||||
|
||||
genuNmState = NM_STATE_INIT;
|
||||
|
||||
return ret;
|
||||
#ifdef NO_HW_CHIP_EN
|
||||
ERR2:
|
||||
nm_bus_iface_deinit();
|
||||
#endif
|
||||
ERR1:
|
||||
return ret;
|
||||
}
|
||||
|
||||
int8_t nm_drv_init_start(void * arg)
|
||||
{
|
||||
int8_t ret = M2M_SUCCESS;
|
||||
uint8_t u8Mode = M2M_WIFI_MODE_NORMAL;
|
||||
|
||||
if(NULL != arg)
|
||||
{
|
||||
u8Mode = *((uint8_t *)arg);
|
||||
if(u8Mode < M2M_WIFI_MODE_NORMAL || u8Mode >= M2M_WIFI_MODE_MAX)
|
||||
u8Mode = M2M_WIFI_MODE_NORMAL;
|
||||
}
|
||||
|
||||
ret = cpu_start();
|
||||
if (M2M_SUCCESS != ret) {
|
||||
goto ERR2;
|
||||
}
|
||||
ret = wait_for_bootrom(u8Mode);
|
||||
if (M2M_SUCCESS != ret) {
|
||||
goto ERR2;
|
||||
}
|
||||
|
||||
ret = wait_for_firmware_start(u8Mode);
|
||||
if (M2M_SUCCESS != ret) {
|
||||
goto ERR2;
|
||||
}
|
||||
|
||||
if(M2M_WIFI_MODE_CONFIG == u8Mode) {
|
||||
goto ERR1;
|
||||
} else {
|
||||
/*continue running*/
|
||||
}
|
||||
|
||||
ret = enable_interrupts();
|
||||
if (M2M_SUCCESS != ret) {
|
||||
M2M_ERR("failed to enable interrupts..\r\n");
|
||||
goto ERR2;
|
||||
}
|
||||
|
||||
genuNmState = NM_STATE_START;
|
||||
|
||||
return ret;
|
||||
ERR2:
|
||||
nm_bus_iface_deinit();
|
||||
nm_spi_deinit();
|
||||
ERR1:
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @fn nm_drv_init
|
||||
* @brief Initialize NMC1000 driver
|
||||
* @param[in] arg
|
||||
* Generic argument passed on to nm_drv_init_start
|
||||
* @return @ref M2M_SUCCESS in case of success and Negative error code in case of failure
|
||||
*/
|
||||
int8_t nm_drv_init(void* arg)
|
||||
{
|
||||
int8_t ret = M2M_SUCCESS;
|
||||
|
||||
ret = nm_drv_init_hold();
|
||||
|
||||
if(ret == M2M_SUCCESS)
|
||||
ret = nm_drv_init_start(arg);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @fn nm_drv_deinit
|
||||
* @brief Deinitialize NMC1000 driver
|
||||
*/
|
||||
int8_t nm_drv_deinit(void* arg)
|
||||
{
|
||||
int8_t ret;
|
||||
|
||||
ret = chip_deinit();
|
||||
if (M2M_SUCCESS != ret) {
|
||||
M2M_ERR("[nmi stop]: chip_deinit fail\r\n");
|
||||
goto ERR1;
|
||||
}
|
||||
|
||||
ret = nm_bus_iface_deinit();
|
||||
if (M2M_SUCCESS != ret) {
|
||||
M2M_ERR("[nmi stop]: fail init bus\r\n");
|
||||
goto ERR1;
|
||||
}
|
||||
/* Must do this after global reset to set SPI data packet size. */
|
||||
nm_spi_deinit();
|
||||
|
||||
ERR1:
|
||||
genuNmState = NM_STATE_DEINIT;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @fn nm_cpu_start(void)
|
||||
* @brief Start CPU from the WINC module
|
||||
* @return @ref M2M_SUCCESS in case of success and Negative error code in case of failure
|
||||
*/
|
||||
int8_t nm_cpu_start(void)
|
||||
{
|
||||
int8_t ret;
|
||||
|
||||
ret = cpu_start();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @fn nm_get_state(void)
|
||||
* @brief Get the current state of the WINC module
|
||||
* @return The current state of the WINC module
|
||||
*/
|
||||
tenuNmState nm_get_state(void)
|
||||
{
|
||||
return genuNmState;
|
||||
}
|
||||
|
||||
//DOM-IGNORE-END
|
||||
978
ChaletLora.X/Source/winc3400_142/driver/source/nmspi.c
Normal file
978
ChaletLora.X/Source/winc3400_142/driver/source/nmspi.c
Normal file
@ -0,0 +1,978 @@
|
||||
/*******************************************************************************
|
||||
This module contains WINC3400 SPI protocol bus APIs implementation.
|
||||
|
||||
File Name:
|
||||
nmspi.c
|
||||
|
||||
Summary:
|
||||
This module contains WINC3400 SPI protocol bus APIs implementation.
|
||||
|
||||
Description:
|
||||
This module contains WINC3400 SPI protocol bus APIs implementation.
|
||||
*******************************************************************************/
|
||||
|
||||
//DOM-IGNORE-BEGIN
|
||||
/*******************************************************************************
|
||||
* Copyright (C) 2021 Microchip Technology Inc. and its subsidiaries.
|
||||
*
|
||||
* Subject to your compliance with these terms, you may use Microchip software
|
||||
* and any derivatives exclusively with Microchip products. It is your
|
||||
* responsibility to comply with third party license terms applicable to your
|
||||
* use of third party software (including open source software) that may
|
||||
* accompany Microchip software.
|
||||
*
|
||||
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
|
||||
* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
|
||||
* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
|
||||
* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
|
||||
* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
|
||||
* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
|
||||
* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
|
||||
* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
|
||||
* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
|
||||
*******************************************************************************/
|
||||
|
||||
//#include "osal/osal.h"
|
||||
#include "nm_common.h"
|
||||
|
||||
#include "nmspi.h"
|
||||
#include "spi.h"
|
||||
#include "BoardCfg.h"
|
||||
//#include "wdrv_winc_common.h"
|
||||
//#include "wdrv_winc_spi.h"
|
||||
|
||||
#define NMI_PERIPH_REG_BASE 0x1000
|
||||
#define NMI_INTR_REG_BASE (NMI_PERIPH_REG_BASE+0xa00)
|
||||
#define NMI_CHIPID (NMI_PERIPH_REG_BASE)
|
||||
#define NMI_PIN_MUX_0 (NMI_PERIPH_REG_BASE + 0x408)
|
||||
#define NMI_INTR_ENABLE (NMI_INTR_REG_BASE)
|
||||
|
||||
#define NMI_SPI_REG_BASE 0xe800
|
||||
#define NMI_SPI_CTL (NMI_SPI_REG_BASE)
|
||||
#define NMI_SPI_MASTER_DMA_ADDR (NMI_SPI_REG_BASE+0x4)
|
||||
#define NMI_SPI_MASTER_DMA_COUNT (NMI_SPI_REG_BASE+0x8)
|
||||
#define NMI_SPI_SLAVE_DMA_ADDR (NMI_SPI_REG_BASE+0xc)
|
||||
#define NMI_SPI_SLAVE_DMA_COUNT (NMI_SPI_REG_BASE+0x10)
|
||||
#define NMI_SPI_TX_MODE (NMI_SPI_REG_BASE+0x20)
|
||||
#define NMI_SPI_PROTOCOL_CONFIG (NMI_SPI_REG_BASE+0x24)
|
||||
#define NMI_SPI_INTR_CTL (NMI_SPI_REG_BASE+0x2c)
|
||||
#define NMI_SPI_MISC_CTRL (NMI_SPI_REG_BASE+0x48)
|
||||
|
||||
#define NMI_SPI_PROTOCOL_OFFSET (NMI_SPI_PROTOCOL_CONFIG-NMI_SPI_REG_BASE)
|
||||
|
||||
#define SPI_BASE NMI_SPI_REG_BASE
|
||||
|
||||
//#define CMD_DMA_WRITE 0xc1
|
||||
//#define CMD_DMA_READ 0xc2
|
||||
#define CMD_INTERNAL_WRITE 0xc3
|
||||
#define CMD_INTERNAL_READ 0xc4
|
||||
//#define CMD_TERMINATE 0xc5
|
||||
//#define CMD_REPEAT 0xc6
|
||||
#define CMD_DMA_EXT_WRITE 0xc7
|
||||
#define CMD_DMA_EXT_READ 0xc8
|
||||
#define CMD_SINGLE_WRITE 0xc9
|
||||
#define CMD_SINGLE_READ 0xca
|
||||
#define CMD_RESET 0xcf
|
||||
|
||||
#define N_OK 0
|
||||
#define N_FAIL -1
|
||||
#define N_RESET -2
|
||||
#define N_RETRY -3
|
||||
|
||||
#define SPI_RESP_RETRY_COUNT (10)
|
||||
#define SPI_RETRY_COUNT (10)
|
||||
#define DATA_PKT_SZ_256 256
|
||||
#define DATA_PKT_SZ_512 512
|
||||
#define DATA_PKT_SZ_1K 1024
|
||||
#define DATA_PKT_SZ_4K (4 * 1024)
|
||||
#define DATA_PKT_SZ_8K (8 * 1024)
|
||||
#define DATA_PKT_SZ DATA_PKT_SZ_8K
|
||||
|
||||
static uint8_t gu8Crc_off = 0;
|
||||
unsigned char mWifiSPIBaudrate;
|
||||
|
||||
//static OSAL_MUTEX_HANDLE_TYPE s_spiLock = 0;
|
||||
|
||||
static inline int8_t spi_read(uint8_t *b, uint16_t sz)
|
||||
{
|
||||
//JFM WINC Low Level
|
||||
int i;
|
||||
WIFI_SPI_SS_PIN = 0;
|
||||
for(i = 0; i < sz; i++)
|
||||
{
|
||||
*b++ = SPITransaction(0xAA,mWifiSPIBaudrate);
|
||||
}
|
||||
WIFI_SPI_SS_PIN = 1;
|
||||
|
||||
|
||||
return N_OK;
|
||||
|
||||
}
|
||||
|
||||
static inline int8_t spi_write(uint8_t *b, uint16_t sz)
|
||||
{
|
||||
|
||||
//JFM WINC Low Level
|
||||
int i;
|
||||
WIFI_SPI_SS_PIN = 0;
|
||||
for(i = 0; i < sz; i++)
|
||||
{
|
||||
SPITransaction(*b++,mWifiSPIBaudrate);
|
||||
}
|
||||
WIFI_SPI_SS_PIN = 1;
|
||||
|
||||
return N_OK;
|
||||
}
|
||||
|
||||
/********************************************
|
||||
|
||||
Crc7
|
||||
|
||||
********************************************/
|
||||
|
||||
static const uint8_t crc7_syndrome_table[256] = {
|
||||
0x00, 0x09, 0x12, 0x1b, 0x24, 0x2d, 0x36, 0x3f,
|
||||
0x48, 0x41, 0x5a, 0x53, 0x6c, 0x65, 0x7e, 0x77,
|
||||
0x19, 0x10, 0x0b, 0x02, 0x3d, 0x34, 0x2f, 0x26,
|
||||
0x51, 0x58, 0x43, 0x4a, 0x75, 0x7c, 0x67, 0x6e,
|
||||
0x32, 0x3b, 0x20, 0x29, 0x16, 0x1f, 0x04, 0x0d,
|
||||
0x7a, 0x73, 0x68, 0x61, 0x5e, 0x57, 0x4c, 0x45,
|
||||
0x2b, 0x22, 0x39, 0x30, 0x0f, 0x06, 0x1d, 0x14,
|
||||
0x63, 0x6a, 0x71, 0x78, 0x47, 0x4e, 0x55, 0x5c,
|
||||
0x64, 0x6d, 0x76, 0x7f, 0x40, 0x49, 0x52, 0x5b,
|
||||
0x2c, 0x25, 0x3e, 0x37, 0x08, 0x01, 0x1a, 0x13,
|
||||
0x7d, 0x74, 0x6f, 0x66, 0x59, 0x50, 0x4b, 0x42,
|
||||
0x35, 0x3c, 0x27, 0x2e, 0x11, 0x18, 0x03, 0x0a,
|
||||
0x56, 0x5f, 0x44, 0x4d, 0x72, 0x7b, 0x60, 0x69,
|
||||
0x1e, 0x17, 0x0c, 0x05, 0x3a, 0x33, 0x28, 0x21,
|
||||
0x4f, 0x46, 0x5d, 0x54, 0x6b, 0x62, 0x79, 0x70,
|
||||
0x07, 0x0e, 0x15, 0x1c, 0x23, 0x2a, 0x31, 0x38,
|
||||
0x41, 0x48, 0x53, 0x5a, 0x65, 0x6c, 0x77, 0x7e,
|
||||
0x09, 0x00, 0x1b, 0x12, 0x2d, 0x24, 0x3f, 0x36,
|
||||
0x58, 0x51, 0x4a, 0x43, 0x7c, 0x75, 0x6e, 0x67,
|
||||
0x10, 0x19, 0x02, 0x0b, 0x34, 0x3d, 0x26, 0x2f,
|
||||
0x73, 0x7a, 0x61, 0x68, 0x57, 0x5e, 0x45, 0x4c,
|
||||
0x3b, 0x32, 0x29, 0x20, 0x1f, 0x16, 0x0d, 0x04,
|
||||
0x6a, 0x63, 0x78, 0x71, 0x4e, 0x47, 0x5c, 0x55,
|
||||
0x22, 0x2b, 0x30, 0x39, 0x06, 0x0f, 0x14, 0x1d,
|
||||
0x25, 0x2c, 0x37, 0x3e, 0x01, 0x08, 0x13, 0x1a,
|
||||
0x6d, 0x64, 0x7f, 0x76, 0x49, 0x40, 0x5b, 0x52,
|
||||
0x3c, 0x35, 0x2e, 0x27, 0x18, 0x11, 0x0a, 0x03,
|
||||
0x74, 0x7d, 0x66, 0x6f, 0x50, 0x59, 0x42, 0x4b,
|
||||
0x17, 0x1e, 0x05, 0x0c, 0x33, 0x3a, 0x21, 0x28,
|
||||
0x5f, 0x56, 0x4d, 0x44, 0x7b, 0x72, 0x69, 0x60,
|
||||
0x0e, 0x07, 0x1c, 0x15, 0x2a, 0x23, 0x38, 0x31,
|
||||
0x46, 0x4f, 0x54, 0x5d, 0x62, 0x6b, 0x70, 0x79
|
||||
};
|
||||
|
||||
static uint8_t crc7_byte(uint8_t crc, uint8_t data)
|
||||
{
|
||||
return crc7_syndrome_table[(crc << 1) ^ data];
|
||||
}
|
||||
|
||||
static uint8_t crc7(uint8_t crc, const uint8_t *buffer, uint32_t len)
|
||||
{
|
||||
while (len--)
|
||||
crc = crc7_byte(crc, *buffer++);
|
||||
return crc;
|
||||
}
|
||||
|
||||
/********************************************
|
||||
|
||||
Spi protocol Function
|
||||
|
||||
********************************************/
|
||||
|
||||
static int8_t spi_cmd(uint8_t cmd, uint32_t adr, uint32_t u32data, uint32_t sz, uint8_t clockless)
|
||||
{
|
||||
uint8_t bc[9];
|
||||
uint8_t len = 5;
|
||||
|
||||
bc[0] = cmd;
|
||||
switch (cmd)
|
||||
{
|
||||
case CMD_SINGLE_READ: /* single word (4 bytes) read */
|
||||
bc[1] = (uint8_t)(adr >> 16);
|
||||
bc[2] = (uint8_t)(adr >> 8);
|
||||
bc[3] = (uint8_t)adr;
|
||||
len = 5;
|
||||
break;
|
||||
|
||||
case CMD_INTERNAL_READ: /* internal register read */
|
||||
bc[1] = (uint8_t)(adr >> 8);
|
||||
if(clockless)
|
||||
bc[1] |= (1 << 7);
|
||||
bc[2] = (uint8_t)adr;
|
||||
bc[3] = 0x00;
|
||||
len = 5;
|
||||
break;
|
||||
#ifdef CMD_TERMINATE
|
||||
case CMD_TERMINATE: /* termination */
|
||||
bc[1] = 0x00;
|
||||
bc[2] = 0x00;
|
||||
bc[3] = 0x00;
|
||||
len = 5;
|
||||
break;
|
||||
#endif
|
||||
#ifdef CMD_REPEAT
|
||||
case CMD_REPEAT: /* repeat */
|
||||
bc[1] = 0x00;
|
||||
bc[2] = 0x00;
|
||||
bc[3] = 0x00;
|
||||
len = 5;
|
||||
break;
|
||||
#endif
|
||||
case CMD_RESET: /* reset */
|
||||
bc[1] = 0xff;
|
||||
bc[2] = 0xff;
|
||||
bc[3] = 0xff;
|
||||
len = 5;
|
||||
break;
|
||||
#if defined(CMD_DMA_WRITE) || defined(CMD_DMA_READ)
|
||||
case CMD_DMA_WRITE: /* dma write */
|
||||
case CMD_DMA_READ: /* dma read */
|
||||
bc[1] = (uint8_t)(adr >> 16);
|
||||
bc[2] = (uint8_t)(adr >> 8);
|
||||
bc[3] = (uint8_t)adr;
|
||||
bc[4] = (uint8_t)(sz >> 8);
|
||||
bc[5] = (uint8_t)(sz);
|
||||
len = 7;
|
||||
break;
|
||||
#endif
|
||||
case CMD_DMA_EXT_WRITE: /* dma extended write */
|
||||
case CMD_DMA_EXT_READ: /* dma extended read */
|
||||
bc[1] = (uint8_t)(adr >> 16);
|
||||
bc[2] = (uint8_t)(adr >> 8);
|
||||
bc[3] = (uint8_t)adr;
|
||||
bc[4] = (uint8_t)(sz >> 16);
|
||||
bc[5] = (uint8_t)(sz >> 8);
|
||||
bc[6] = (uint8_t)(sz);
|
||||
len = 8;
|
||||
break;
|
||||
|
||||
case CMD_INTERNAL_WRITE: /* internal register write */
|
||||
bc[1] = (uint8_t)(adr >> 8);
|
||||
if(clockless) bc[1] |= (1 << 7);
|
||||
bc[2] = (uint8_t)(adr);
|
||||
bc[3] = (uint8_t)(u32data >> 24);
|
||||
bc[4] = (uint8_t)(u32data >> 16);
|
||||
bc[5] = (uint8_t)(u32data >> 8);
|
||||
bc[6] = (uint8_t)(u32data);
|
||||
len = 8;
|
||||
break;
|
||||
|
||||
case CMD_SINGLE_WRITE: /* single word write */
|
||||
bc[1] = (uint8_t)(adr >> 16);
|
||||
bc[2] = (uint8_t)(adr >> 8);
|
||||
bc[3] = (uint8_t)(adr);
|
||||
bc[4] = (uint8_t)(u32data >> 24);
|
||||
bc[5] = (uint8_t)(u32data >> 16);
|
||||
bc[6] = (uint8_t)(u32data >> 8);
|
||||
bc[7] = (uint8_t)(u32data);
|
||||
len = 9;
|
||||
break;
|
||||
|
||||
default:
|
||||
return N_FAIL;
|
||||
}
|
||||
|
||||
if (!gu8Crc_off)
|
||||
{
|
||||
bc[len-1] = (crc7(0x7f, (const uint8_t *)&bc[0], len-1)) << 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
len -= 1;
|
||||
}
|
||||
|
||||
if (N_OK != spi_write(bc, len))
|
||||
{
|
||||
M2M_ERR("[spi_cmd]: Failed cmd write, bus error...\r\n");
|
||||
return N_FAIL;
|
||||
}
|
||||
|
||||
return N_OK;
|
||||
}
|
||||
|
||||
static int8_t spi_cmd_rsp(uint8_t cmd)
|
||||
{
|
||||
uint8_t rsp;
|
||||
int8_t s8RetryCnt;
|
||||
|
||||
/**
|
||||
Command/Control response
|
||||
**/
|
||||
if ((cmd == CMD_RESET)
|
||||
#ifdef CMD_TERMINATE
|
||||
|| (cmd == CMD_TERMINATE)
|
||||
#endif
|
||||
#ifdef CMD_REPEAT
|
||||
|| (cmd == CMD_REPEAT)
|
||||
#endif
|
||||
)
|
||||
{
|
||||
if (N_OK != spi_read(&rsp, 1))
|
||||
return N_FAIL;
|
||||
}
|
||||
|
||||
/* wait for response */
|
||||
s8RetryCnt = SPI_RESP_RETRY_COUNT;
|
||||
do
|
||||
{
|
||||
if (N_OK != spi_read(&rsp, 1))
|
||||
{
|
||||
M2M_ERR("[spi_cmd_rsp]: Failed cmd response read, bus error...\r\n");
|
||||
return N_FAIL;
|
||||
}
|
||||
}
|
||||
while((rsp != cmd) && (s8RetryCnt-- > 0));
|
||||
|
||||
if (s8RetryCnt < 0)
|
||||
{
|
||||
M2M_ERR("[spi_cmd_rsp]: Failed cmd response read\n");
|
||||
return N_FAIL;
|
||||
}
|
||||
/**
|
||||
State response
|
||||
**/
|
||||
/* wait for response */
|
||||
s8RetryCnt = SPI_RESP_RETRY_COUNT;
|
||||
do
|
||||
{
|
||||
if (N_OK != spi_read(&rsp, 1))
|
||||
{
|
||||
M2M_ERR("[spi_cmd_rsp]: Failed cmd response read, bus error...\r\n");
|
||||
return N_FAIL;
|
||||
}
|
||||
}
|
||||
while((rsp != 0x00) && (s8RetryCnt-- > 0));
|
||||
|
||||
if (s8RetryCnt < 0)
|
||||
{
|
||||
M2M_ERR("[spi_cmd_rsp]: Failed cmd response read\n");
|
||||
return N_FAIL;
|
||||
}
|
||||
|
||||
return N_OK;
|
||||
}
|
||||
|
||||
static void spi_reset(void)
|
||||
{
|
||||
nm_sleep(1);
|
||||
spi_cmd(CMD_RESET, 0, 0, 0, 0);
|
||||
spi_cmd_rsp(CMD_RESET);
|
||||
nm_sleep(1);
|
||||
}
|
||||
|
||||
/********************************************
|
||||
|
||||
Spi Internal Read/Write Function
|
||||
|
||||
********************************************/
|
||||
|
||||
static int8_t spi_data_read(uint8_t *b, uint16_t sz,uint8_t clockless)
|
||||
{
|
||||
int16_t retry, ix, nbytes;
|
||||
int8_t result = N_OK;
|
||||
uint8_t crc[2];
|
||||
uint8_t rsp;
|
||||
|
||||
/**
|
||||
Data
|
||||
**/
|
||||
ix = 0;
|
||||
do {
|
||||
if (sz <= DATA_PKT_SZ)
|
||||
nbytes = sz;
|
||||
else
|
||||
nbytes = DATA_PKT_SZ;
|
||||
|
||||
/**
|
||||
Data Response header
|
||||
**/
|
||||
retry = SPI_RESP_RETRY_COUNT;
|
||||
do
|
||||
{
|
||||
if (N_OK != spi_read(&rsp, 1))
|
||||
{
|
||||
M2M_ERR("[spi_data_read]: Failed data response read, bus error...\r\n");
|
||||
result = N_FAIL;
|
||||
break;
|
||||
}
|
||||
if ((rsp & 0xf0) == 0xf0)
|
||||
break;
|
||||
}
|
||||
while (retry--);
|
||||
|
||||
if (result == N_FAIL)
|
||||
break;
|
||||
|
||||
if (retry <= 0)
|
||||
{
|
||||
M2M_ERR("[spi_data_read]: Failed data response read...(%02x)\r\n", rsp);
|
||||
result = N_FAIL;
|
||||
break;
|
||||
}
|
||||
|
||||
/**
|
||||
Read bytes
|
||||
**/
|
||||
if (N_OK != spi_read(&b[ix], nbytes))
|
||||
{
|
||||
M2M_ERR("[spi_data_read]: Failed data block read, bus error...\r\n");
|
||||
result = N_FAIL;
|
||||
break;
|
||||
}
|
||||
if(!clockless)
|
||||
{
|
||||
/**
|
||||
Read Crc
|
||||
**/
|
||||
if (!gu8Crc_off)
|
||||
{
|
||||
if (N_OK != spi_read(crc, 2))
|
||||
{
|
||||
M2M_ERR("[spi_data_read]: Failed data block CRC read, bus error...\r\n");
|
||||
result = N_FAIL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
ix += nbytes;
|
||||
sz -= nbytes;
|
||||
|
||||
} while (sz);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static int8_t spi_data_write(uint8_t *b, uint16_t sz)
|
||||
{
|
||||
int16_t ix = 0;
|
||||
uint16_t nbytes;
|
||||
int8_t result = N_OK;
|
||||
uint8_t cmd, order, crc[2] = {0};
|
||||
//uint8_t rsp;
|
||||
|
||||
/**
|
||||
Data
|
||||
**/
|
||||
do
|
||||
{
|
||||
if (sz <= DATA_PKT_SZ)
|
||||
nbytes = sz;
|
||||
else
|
||||
nbytes = DATA_PKT_SZ;
|
||||
|
||||
/**
|
||||
Write command
|
||||
**/
|
||||
cmd = 0xf0;
|
||||
if (ix == 0)
|
||||
{
|
||||
if (sz <= DATA_PKT_SZ)
|
||||
order = 0x3;
|
||||
else
|
||||
order = 0x1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (sz <= DATA_PKT_SZ)
|
||||
order = 0x3;
|
||||
else
|
||||
order = 0x2;
|
||||
}
|
||||
|
||||
cmd |= order;
|
||||
if (N_OK != spi_write(&cmd, 1))
|
||||
{
|
||||
M2M_ERR("[spi_data_write]: Failed data block cmd write, bus error...\r\n");
|
||||
result = N_FAIL;
|
||||
break;
|
||||
}
|
||||
|
||||
/**
|
||||
Write data
|
||||
**/
|
||||
if (N_OK != spi_write(&b[ix], nbytes))
|
||||
{
|
||||
M2M_ERR("[spi_data_write]: Failed data block write, bus error...\r\n");
|
||||
result = N_FAIL;
|
||||
break;
|
||||
}
|
||||
|
||||
/**
|
||||
Write Crc
|
||||
**/
|
||||
if (!gu8Crc_off)
|
||||
{
|
||||
if (N_OK != spi_write(crc, 2))
|
||||
{
|
||||
M2M_ERR("[spi_data_write]: Failed data block CRC write, bus error...\r\n");
|
||||
result = N_FAIL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ix += nbytes;
|
||||
sz -= nbytes;
|
||||
}
|
||||
while (sz);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/********************************************
|
||||
|
||||
Spi interfaces
|
||||
|
||||
********************************************/
|
||||
|
||||
static int8_t spi_write_reg(uint32_t u32Addr, uint32_t u32Val)
|
||||
{
|
||||
uint8_t cmd = CMD_SINGLE_WRITE;
|
||||
uint8_t clockless = 0;
|
||||
|
||||
if (u32Addr <= 0x30)
|
||||
{
|
||||
/**
|
||||
NMC1000 clockless registers.
|
||||
**/
|
||||
cmd = CMD_INTERNAL_WRITE;
|
||||
clockless = 1;
|
||||
}
|
||||
|
||||
if (spi_cmd(cmd, u32Addr, u32Val, 4, clockless) != N_OK)
|
||||
{
|
||||
M2M_ERR("[spi_write_reg]: Failed cmd, write reg (%08" PRIx32 ")...\r\n", u32Addr);
|
||||
return N_FAIL;
|
||||
}
|
||||
|
||||
if (spi_cmd_rsp(cmd) != N_OK)
|
||||
{
|
||||
M2M_ERR("[spi_write_reg]: Failed cmd response, write reg (%08" PRIx32 ")...\r\n", u32Addr);
|
||||
return N_FAIL;
|
||||
}
|
||||
|
||||
return N_OK;
|
||||
}
|
||||
|
||||
static int8_t spi_write_block(uint32_t u32Addr, uint8_t *puBuf, uint16_t u16Sz)
|
||||
{
|
||||
uint8_t len;
|
||||
uint8_t rsp[3];
|
||||
|
||||
/**
|
||||
Command
|
||||
**/
|
||||
if (spi_cmd(CMD_DMA_EXT_WRITE, u32Addr, 0, u16Sz, 0) != N_OK)
|
||||
{
|
||||
M2M_ERR("[spi_write_block]: Failed cmd, write block (%08" PRIx32 ")...\r\n", u32Addr);
|
||||
return N_FAIL;
|
||||
}
|
||||
|
||||
if (spi_cmd_rsp(CMD_DMA_EXT_WRITE) != N_OK)
|
||||
{
|
||||
M2M_ERR("[spi_write_block]: Failed cmd response, write block (%08" PRIx32 ")...\r\n", u32Addr);
|
||||
return N_FAIL;
|
||||
}
|
||||
|
||||
/**
|
||||
Data
|
||||
**/
|
||||
if (spi_data_write(puBuf, u16Sz) != N_OK)
|
||||
{
|
||||
M2M_ERR("[spi_write_block]: Failed block data write...\r\n");
|
||||
return N_FAIL;
|
||||
}
|
||||
/**
|
||||
Data RESP
|
||||
**/
|
||||
if (!gu8Crc_off)
|
||||
len = 2;
|
||||
else
|
||||
len = 3;
|
||||
|
||||
if (N_OK != spi_read(&rsp[0], len))
|
||||
{
|
||||
M2M_ERR("[spi_write_block]: Failed bus error...\r\n");
|
||||
return N_FAIL;
|
||||
}
|
||||
|
||||
if((rsp[len-1] != 0) || (rsp[len-2] != 0xC3))
|
||||
{
|
||||
M2M_ERR("[spi_write_block]: Failed data response read, %x %x %x\r\n", rsp[0], rsp[1], rsp[2]);
|
||||
return N_FAIL;
|
||||
}
|
||||
|
||||
return N_OK;
|
||||
}
|
||||
|
||||
static int8_t spi_read_reg(uint32_t u32Addr, uint32_t* pu32RetVal)
|
||||
{
|
||||
uint8_t cmd = CMD_SINGLE_READ;
|
||||
uint8_t tmp[4];
|
||||
uint8_t clockless = 0;
|
||||
|
||||
if (u32Addr <= 0xff)
|
||||
{
|
||||
/**
|
||||
NMC1000 clockless registers.
|
||||
**/
|
||||
cmd = CMD_INTERNAL_READ;
|
||||
clockless = 1;
|
||||
}
|
||||
|
||||
if (spi_cmd(cmd, u32Addr, 0, 4, clockless) != N_OK)
|
||||
{
|
||||
M2M_ERR("[spi_read_reg]: Failed cmd, read reg (%08" PRIx32 ")...\r\n", u32Addr);
|
||||
return N_FAIL;
|
||||
}
|
||||
|
||||
if (spi_cmd_rsp(cmd) != N_OK)
|
||||
{
|
||||
M2M_ERR("[spi_read_reg]: Failed cmd response, read reg (%08" PRIx32 ")...\r\n", u32Addr);
|
||||
return N_FAIL;
|
||||
}
|
||||
|
||||
/* to avoid endianess issues */
|
||||
if (spi_data_read(&tmp[0], 4, clockless) != N_OK)
|
||||
{
|
||||
M2M_ERR("[spi_read_reg]: Failed data read...\r\n");
|
||||
return N_FAIL;
|
||||
}
|
||||
|
||||
*pu32RetVal = ((uint32_t)tmp[0]) |
|
||||
((uint32_t)tmp[1] << 8) |
|
||||
((uint32_t)tmp[2] << 16) |
|
||||
((uint32_t)tmp[3] << 24);
|
||||
|
||||
return N_OK;
|
||||
}
|
||||
|
||||
static int8_t spi_read_block(uint32_t u32Addr, uint8_t *puBuf, uint16_t u16Sz)
|
||||
{
|
||||
/**
|
||||
Command
|
||||
**/
|
||||
if (spi_cmd(CMD_DMA_EXT_READ, u32Addr, 0, u16Sz, 0) != N_OK)
|
||||
{
|
||||
M2M_ERR("[spi_read_block]: Failed cmd, read block (%08" PRIx32 ")...\r\n", u32Addr);
|
||||
return N_FAIL;
|
||||
}
|
||||
|
||||
if (spi_cmd_rsp(CMD_DMA_EXT_READ) != N_OK)
|
||||
{
|
||||
M2M_ERR("[spi_read_block]: Failed cmd response, read block (%08" PRIx32 ")...\r\n", u32Addr);
|
||||
return N_FAIL;
|
||||
}
|
||||
|
||||
/**
|
||||
Data
|
||||
**/
|
||||
if (spi_data_read(puBuf, u16Sz, 0) != N_OK)
|
||||
{
|
||||
M2M_ERR("[spi_read_block]: Failed block data read...\r\n");
|
||||
return N_FAIL;
|
||||
}
|
||||
|
||||
return N_OK;
|
||||
}
|
||||
|
||||
static void spi_init_pkt_sz(void)
|
||||
{
|
||||
uint32_t val32;
|
||||
|
||||
/* Make sure SPI max. packet size fits the defined DATA_PKT_SZ. */
|
||||
val32 = nm_spi_read_reg(SPI_BASE+0x24);
|
||||
val32 &= ~(0x7 << 4);
|
||||
switch(DATA_PKT_SZ)
|
||||
{
|
||||
case 256: val32 |= (0 << 4); break;
|
||||
case 512: val32 |= (1 << 4); break;
|
||||
case 1024: val32 |= (2 << 4); break;
|
||||
case 2048: val32 |= (3 << 4); break;
|
||||
case 4096: val32 |= (4 << 4); break;
|
||||
case 8192: val32 |= (5 << 4); break;
|
||||
}
|
||||
nm_spi_write_reg(SPI_BASE+0x24, val32);
|
||||
}
|
||||
|
||||
/********************************************
|
||||
|
||||
Bus interfaces
|
||||
|
||||
********************************************/
|
||||
|
||||
int8_t nm_spi_reset(void)
|
||||
{
|
||||
// if (OSAL_RESULT_TRUE != OSAL_MUTEX_Lock(&s_spiLock, OSAL_WAIT_FOREVER))
|
||||
// return M2M_ERR_BUS_FAIL;
|
||||
|
||||
spi_cmd(CMD_RESET, 0, 0, 0, 0);
|
||||
spi_cmd_rsp(CMD_RESET);
|
||||
|
||||
// OSAL_MUTEX_Unlock(&s_spiLock);
|
||||
|
||||
return M2M_SUCCESS;
|
||||
}
|
||||
|
||||
void nm_spi_lock_init(void)
|
||||
{
|
||||
// OSAL_MUTEX_Create(&s_spiLock);
|
||||
}
|
||||
|
||||
/*
|
||||
* @fn nm_spi_init
|
||||
* @brief Initialize the SPI
|
||||
* @return M2M_SUCCESS in case of success and M2M_ERR_BUS_FAIL in case of failure
|
||||
*/
|
||||
int8_t nm_spi_init(void)
|
||||
{
|
||||
uint32_t chipid;
|
||||
uint32_t reg = 0;
|
||||
|
||||
mWifiSPIBaudrate = SPICalculateBRG(PERIPHERAL_FREQ, WIFI_MODULE_SPI_BAUDRATE);
|
||||
|
||||
/**
|
||||
configure protocol
|
||||
**/
|
||||
gu8Crc_off = 0;
|
||||
|
||||
if (nm_spi_read_reg_with_ret(NMI_SPI_PROTOCOL_CONFIG, ®) != M2M_SUCCESS)
|
||||
{
|
||||
/* Read failed. Try with CRC off. This might happen when module
|
||||
is removed but chip isn't reset*/
|
||||
gu8Crc_off = 1;
|
||||
M2M_ERR("[nm_spi_init]: Failed internal read protocol with CRC on, retrying with CRC off...\r\n");
|
||||
|
||||
if (nm_spi_read_reg_with_ret(NMI_SPI_PROTOCOL_CONFIG, ®) != M2M_SUCCESS)
|
||||
{
|
||||
// Reaad failed with both CRC on and off, something went bad
|
||||
M2M_ERR("[nm_spi_init]: Failed internal read protocol...\r\n");
|
||||
|
||||
return M2M_ERR_BUS_FAIL;
|
||||
}
|
||||
}
|
||||
if(gu8Crc_off == 0)
|
||||
{
|
||||
reg &= ~0xc; /* disable CRC checking */
|
||||
reg &= ~0x70;
|
||||
reg |= (0x5 << 4);
|
||||
|
||||
if (nm_spi_write_reg(NMI_SPI_PROTOCOL_CONFIG, reg) != M2M_SUCCESS)
|
||||
{
|
||||
M2M_ERR("[nm_spi_init]: Failed internal write protocol reg...\r\n");
|
||||
|
||||
return M2M_ERR_BUS_FAIL;
|
||||
}
|
||||
|
||||
gu8Crc_off = 1;
|
||||
}
|
||||
|
||||
/**
|
||||
make sure can read back chip id correctly
|
||||
**/
|
||||
if (nm_spi_read_reg_with_ret(0x1000, &chipid) != M2M_SUCCESS)
|
||||
{
|
||||
M2M_ERR("[nm_spi_init]: Fail cmd read chip id...\r\n");
|
||||
return M2M_ERR_BUS_FAIL;
|
||||
}
|
||||
|
||||
M2M_DBG("[nm_spi_init]: chipid (%08x)\r\n", (unsigned int)chipid);
|
||||
spi_init_pkt_sz();
|
||||
|
||||
return M2M_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
* @fn nm_spi_deinit
|
||||
* @brief DeInitialize the SPI
|
||||
* @return M2M_SUCCESS in case of success and M2M_ERR_BUS_FAIL in case of failure
|
||||
*/
|
||||
int8_t nm_spi_deinit(void)
|
||||
{
|
||||
gu8Crc_off = 0;
|
||||
// OSAL_MUTEX_Delete(&s_spiLock);
|
||||
return M2M_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
* @fn nm_spi_read_reg
|
||||
* @brief Read register
|
||||
* @param [in] u32Addr
|
||||
* Register address
|
||||
* @return Register value
|
||||
*/
|
||||
uint32_t nm_spi_read_reg(uint32_t u32Addr)
|
||||
{
|
||||
uint32_t u32Val;
|
||||
|
||||
nm_spi_read_reg_with_ret(u32Addr, &u32Val);
|
||||
|
||||
return u32Val;
|
||||
}
|
||||
|
||||
/*
|
||||
* @fn nm_spi_read_reg_with_ret
|
||||
* @brief Read register with error code return
|
||||
* @param [in] u32Addr
|
||||
* Register address
|
||||
* @param [out] pu32RetVal
|
||||
* Pointer to u32 variable used to return the read value
|
||||
* @return M2M_SUCCESS in case of success and M2M_ERR_BUS_FAIL in case of failure
|
||||
*/
|
||||
int8_t nm_spi_read_reg_with_ret(uint32_t u32Addr, uint32_t* pu32RetVal)
|
||||
{
|
||||
uint8_t retry = SPI_RETRY_COUNT;
|
||||
|
||||
// if (OSAL_RESULT_TRUE != OSAL_MUTEX_Lock(&s_spiLock, OSAL_WAIT_FOREVER))
|
||||
// return M2M_ERR_BUS_FAIL;
|
||||
|
||||
while(retry--)
|
||||
{
|
||||
if (spi_read_reg(u32Addr, pu32RetVal) == N_OK)
|
||||
{
|
||||
// OSAL_MUTEX_Unlock(&s_spiLock);
|
||||
|
||||
return M2M_SUCCESS;
|
||||
}
|
||||
|
||||
M2M_ERR("Reset and retry %d %" PRIx32 "\r\n", retry, u32Addr);
|
||||
spi_reset();
|
||||
}
|
||||
|
||||
// OSAL_MUTEX_Unlock(&s_spiLock);
|
||||
|
||||
return M2M_ERR_BUS_FAIL;
|
||||
}
|
||||
|
||||
/*
|
||||
* @fn nm_spi_write_reg
|
||||
* @brief write register
|
||||
* @param [in] u32Addr
|
||||
* Register address
|
||||
* @param [in] u32Val
|
||||
* Value to be written to the register
|
||||
* @return M2M_SUCCESS in case of success and M2M_ERR_BUS_FAIL in case of failure
|
||||
*/
|
||||
int8_t nm_spi_write_reg(uint32_t u32Addr, uint32_t u32Val)
|
||||
{
|
||||
uint8_t retry = SPI_RETRY_COUNT;
|
||||
|
||||
// if (OSAL_RESULT_TRUE != OSAL_MUTEX_Lock(&s_spiLock, OSAL_WAIT_FOREVER))
|
||||
// return M2M_ERR_BUS_FAIL;
|
||||
|
||||
while(retry--)
|
||||
{
|
||||
if (spi_write_reg(u32Addr, u32Val) == N_OK)
|
||||
{
|
||||
// OSAL_MUTEX_Unlock(&s_spiLock);
|
||||
|
||||
return M2M_SUCCESS;
|
||||
}
|
||||
|
||||
M2M_ERR("Reset and retry %d %" PRIx32 " %" PRIx32 "\r\n", retry, u32Addr, u32Val);
|
||||
spi_reset();
|
||||
}
|
||||
|
||||
// OSAL_MUTEX_Unlock(&s_spiLock);
|
||||
|
||||
return M2M_ERR_BUS_FAIL;
|
||||
}
|
||||
|
||||
/*
|
||||
* @fn nm_spi_read_block
|
||||
* @brief Read block of data
|
||||
* @param [in] u32Addr
|
||||
* Start address
|
||||
* @param [out] puBuf
|
||||
* Pointer to a buffer used to return the read data
|
||||
* @param [in] u16Sz
|
||||
* Number of bytes to read. The buffer size must be >= u16Sz
|
||||
* @return M2M_SUCCESS in case of success and M2M_ERR_BUS_FAIL in case of failure
|
||||
*/
|
||||
int8_t nm_spi_read_block(uint32_t u32Addr, uint8_t *puBuf, uint16_t u16Sz)
|
||||
{
|
||||
uint8_t retry = SPI_RETRY_COUNT;
|
||||
uint8_t tmpBuf[2] = {0,0};
|
||||
uint8_t *puTmpBuf;
|
||||
|
||||
// if (OSAL_RESULT_TRUE != OSAL_MUTEX_Lock(&s_spiLock, OSAL_WAIT_FOREVER))
|
||||
// return M2M_ERR_BUS_FAIL;
|
||||
|
||||
if (u16Sz == 1)
|
||||
{
|
||||
u16Sz = 2;
|
||||
puTmpBuf = tmpBuf;
|
||||
}
|
||||
else
|
||||
{
|
||||
puTmpBuf = puBuf;
|
||||
}
|
||||
|
||||
while(retry--)
|
||||
{
|
||||
if (spi_read_block(u32Addr, puTmpBuf, u16Sz) == N_OK)
|
||||
{
|
||||
// OSAL_MUTEX_Unlock(&s_spiLock);
|
||||
|
||||
if (puTmpBuf == tmpBuf)
|
||||
*puBuf = *tmpBuf;
|
||||
|
||||
return M2M_SUCCESS;
|
||||
}
|
||||
|
||||
M2M_ERR("Reset and retry %d %" PRIx32 " %d\r\n", retry, u32Addr, u16Sz);
|
||||
spi_reset();
|
||||
}
|
||||
|
||||
// OSAL_MUTEX_Unlock(&s_spiLock);
|
||||
|
||||
return M2M_ERR_BUS_FAIL;
|
||||
}
|
||||
|
||||
/*
|
||||
* @fn nm_spi_write_block
|
||||
* @brief Write block of data
|
||||
* @param [in] u32Addr
|
||||
* Start address
|
||||
* @param [in] puBuf
|
||||
* Pointer to the buffer holding the data to be written
|
||||
* @param [in] u16Sz
|
||||
* Number of bytes to write. The buffer size must be >= u16Sz
|
||||
* @return M2M_SUCCESS in case of success and M2M_ERR_BUS_FAIL in case of failure
|
||||
*/
|
||||
int8_t nm_spi_write_block(uint32_t u32Addr, uint8_t *puBuf, uint16_t u16Sz)
|
||||
{
|
||||
uint8_t retry = SPI_RETRY_COUNT;
|
||||
|
||||
// if (OSAL_RESULT_TRUE != OSAL_MUTEX_Lock(&s_spiLock, OSAL_WAIT_FOREVER))
|
||||
// return M2M_ERR_BUS_FAIL;
|
||||
|
||||
//Workaround hardware problem with single byte transfers over SPI bus
|
||||
if (u16Sz == 1)
|
||||
u16Sz = 2;
|
||||
|
||||
while(retry--)
|
||||
{
|
||||
if (spi_write_block(u32Addr, puBuf, u16Sz) == N_OK)
|
||||
{
|
||||
// OSAL_MUTEX_Unlock(&s_spiLock);
|
||||
|
||||
return M2M_SUCCESS;
|
||||
}
|
||||
|
||||
M2M_ERR("Reset and retry %d %" PRIx32 " %d\r\n", retry, u32Addr, u16Sz);
|
||||
spi_reset();
|
||||
}
|
||||
|
||||
// OSAL_MUTEX_Unlock(&s_spiLock);
|
||||
|
||||
return M2M_ERR_BUS_FAIL;
|
||||
}
|
||||
|
||||
//DOM-IGNORE-END
|
||||
@ -0,0 +1,347 @@
|
||||
/*******************************************************************************
|
||||
BSD compatible socket interface internal types.
|
||||
|
||||
File Name:
|
||||
m2m_socket_host_if.h
|
||||
|
||||
Summary:
|
||||
|
||||
Description:
|
||||
|
||||
*******************************************************************************/
|
||||
|
||||
//DOM-IGNORE-BEGIN
|
||||
/*******************************************************************************
|
||||
* Copyright (C) 2021 Microchip Technology Inc. and its subsidiaries.
|
||||
*
|
||||
* Subject to your compliance with these terms, you may use Microchip software
|
||||
* and any derivatives exclusively with Microchip products. It is your
|
||||
* responsibility to comply with third party license terms applicable to your
|
||||
* use of third party software (including open source software) that may
|
||||
* accompany Microchip software.
|
||||
*
|
||||
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
|
||||
* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
|
||||
* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
|
||||
* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
|
||||
* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
|
||||
* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
|
||||
* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
|
||||
* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
|
||||
* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
|
||||
*******************************************************************************/
|
||||
|
||||
#ifndef __M2M_SOCKET_HOST_IF_H__
|
||||
#define __M2M_SOCKET_HOST_IF_H__
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
|
||||
INCLUDES
|
||||
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
|
||||
|
||||
#include "socket.h"
|
||||
|
||||
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
|
||||
MACROS
|
||||
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
|
||||
|
||||
#define SSL_MAX_OPT_LEN HOSTNAME_MAX_SIZE
|
||||
|
||||
#define ALPN_LIST_MIN_SIZE 4
|
||||
#define ALPN_LIST_MAX_SIZE 32
|
||||
/*!<
|
||||
Maximum length of ALPN list that can be specified by the application.
|
||||
The list is in the following format:
|
||||
@verbatim
|
||||
0 1 2 3 ... (bytes)
|
||||
+-------+-------+-------+ ... +-------+ ... +-------+ ...
|
||||
| Length L (BE) | len1 | name1... | len2 | name2... | len3 | name3...
|
||||
+-------+-------+-------+ ... +-------+ ... +-------+ ...
|
||||
Length fields do not include themselves.
|
||||
@endverbatim
|
||||
*/
|
||||
|
||||
#define SOCKET_CMD_INVALID 0x00
|
||||
/*!<
|
||||
Invalid Socket command value.
|
||||
*/
|
||||
|
||||
#define PING_ERR_SUCCESS 0
|
||||
#define PING_ERR_DEST_UNREACH 1
|
||||
#define PING_ERR_TIMEOUT 2
|
||||
|
||||
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
|
||||
DATA TYPES
|
||||
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
|
||||
|
||||
|
||||
/*!
|
||||
* @brief
|
||||
*/
|
||||
typedef struct {
|
||||
uint16_t u16Family;
|
||||
uint16_t u16Port;
|
||||
uint32_t u32IPAddr;
|
||||
} tstrSockAddr;
|
||||
|
||||
|
||||
//typedef int8_t SOCKET;
|
||||
typedef tstrSockAddr tstrUIPSockAddr;
|
||||
|
||||
|
||||
|
||||
/*!
|
||||
@struct \
|
||||
tstrDnsReply
|
||||
|
||||
@brief
|
||||
DNS Reply, contains hostName and HostIP.
|
||||
*/
|
||||
typedef struct {
|
||||
char acHostName[HOSTNAME_MAX_SIZE];
|
||||
uint32_t u32HostIP;
|
||||
} tstrDnsReply;
|
||||
|
||||
|
||||
/*!
|
||||
@brief
|
||||
*/
|
||||
typedef struct {
|
||||
tstrSockAddr strAddr;
|
||||
SOCKET sock;
|
||||
uint8_t u8Void;
|
||||
uint16_t u16SessionID;
|
||||
} tstrBindCmd;
|
||||
|
||||
|
||||
/*!
|
||||
@brief
|
||||
*/
|
||||
typedef struct {
|
||||
SOCKET sock;
|
||||
int8_t s8Status;
|
||||
uint16_t u16SessionID;
|
||||
} tstrBindReply;
|
||||
|
||||
|
||||
/*!
|
||||
* @brief
|
||||
*/
|
||||
typedef struct {
|
||||
SOCKET sock;
|
||||
uint8_t u8BackLog;
|
||||
uint16_t u16SessionID;
|
||||
} tstrListenCmd;
|
||||
|
||||
|
||||
/*!
|
||||
@struct \
|
||||
tstrSocketRecvMsg
|
||||
|
||||
@brief Socket recv status.
|
||||
|
||||
It is passed to the APPSocketEventHandler with SOCKET_MSG_RECV or SOCKET_MSG_RECVFROM message type
|
||||
in a response to a user call to the recv or recvfrom.
|
||||
If the received data from the remote peer is larger than the USER Buffer size (given at recv call), the data is
|
||||
delivered to the user in a number of consecutive chunks according to the USER Buffer size.
|
||||
*/
|
||||
typedef struct {
|
||||
SOCKET sock;
|
||||
int8_t s8Status;
|
||||
uint16_t u16SessionID;
|
||||
} tstrListenReply;
|
||||
|
||||
|
||||
/*!
|
||||
* @brief
|
||||
*/
|
||||
typedef struct {
|
||||
tstrSockAddr strAddr;
|
||||
SOCKET sListenSock;
|
||||
SOCKET sConnectedSock;
|
||||
uint16_t u16Void;
|
||||
} tstrAcceptReply;
|
||||
|
||||
|
||||
/*!
|
||||
* @brief
|
||||
*/
|
||||
typedef struct {
|
||||
tstrSockAddr strAddr;
|
||||
SOCKET sock;
|
||||
uint8_t u8SslFlags;
|
||||
uint16_t u16SessionID;
|
||||
} tstrConnectCmd;
|
||||
|
||||
|
||||
/*!
|
||||
@struct \
|
||||
tstrConnectReply
|
||||
|
||||
@brief
|
||||
Connect Reply, contains sock number and error value
|
||||
*/
|
||||
typedef struct {
|
||||
SOCKET sock;
|
||||
int8_t s8Error;
|
||||
/*!<
|
||||
0 for successful connection, in which case u16AppDataOffset is valid.
|
||||
Negative for failed connection, in which case u8ErrorType and u8ErrorDetail may give more info.
|
||||
*/
|
||||
union {
|
||||
uint16_t u16AppDataOffset;
|
||||
/*!<
|
||||
In further packet send requests the host interface should put the user application
|
||||
data at this offset in the allocated shared data packet.
|
||||
*/
|
||||
struct {
|
||||
uint8_t u8ErrSource;
|
||||
/*!<
|
||||
0: No detail
|
||||
1: TLS Alert received from peer
|
||||
2: TLS Alert generated locally
|
||||
*/
|
||||
uint8_t u8ErrCode;
|
||||
/*!<
|
||||
For TLS Alerts, this is the Alert ID.
|
||||
*/
|
||||
};
|
||||
};
|
||||
} tstrConnectReply;
|
||||
|
||||
|
||||
/*!
|
||||
@struct \
|
||||
tstrConnectAlpnReply
|
||||
|
||||
@brief
|
||||
Connect Reply, contains sock number, error value and index of negotiated application protocol.
|
||||
*/
|
||||
typedef struct{
|
||||
tstrConnectReply strConnReply;
|
||||
uint8_t u8AppProtocolIdx;
|
||||
/*!<
|
||||
1-based index of application-layer protocol negotiated during TLS handshake.
|
||||
*/
|
||||
uint8_t __PAD24__[3];
|
||||
}tstrConnectAlpnReply;
|
||||
|
||||
|
||||
/*!
|
||||
@brief
|
||||
*/
|
||||
typedef struct{
|
||||
SOCKET sock;
|
||||
uint8_t u8Void;
|
||||
uint16_t u16DataSize;
|
||||
tstrSockAddr strAddr;
|
||||
uint16_t u16SessionID;
|
||||
uint16_t u16Void;
|
||||
} tstrSendCmd;
|
||||
|
||||
|
||||
/*!
|
||||
@struct \
|
||||
tstrSendReply
|
||||
|
||||
@brief
|
||||
Send Reply, contains socket number and number of sent bytes.
|
||||
*/
|
||||
typedef struct {
|
||||
SOCKET sock;
|
||||
uint8_t u8Void;
|
||||
int16_t s16SentBytes;
|
||||
uint16_t u16SessionID;
|
||||
uint16_t u16Void;
|
||||
} tstrSendReply;
|
||||
|
||||
|
||||
/*!
|
||||
* @brief
|
||||
*/
|
||||
typedef struct {
|
||||
uint32_t u32Timeoutmsec;
|
||||
SOCKET sock;
|
||||
uint8_t u8Void;
|
||||
uint16_t u16SessionID;
|
||||
uint16_t u16BufLen;
|
||||
} tstrRecvCmd;
|
||||
|
||||
|
||||
/*!
|
||||
@struct \
|
||||
tstrRecvReply
|
||||
@brief
|
||||
*/
|
||||
typedef struct {
|
||||
tstrSockAddr strRemoteAddr;
|
||||
int16_t s16RecvStatus;
|
||||
uint16_t u16DataOffset;
|
||||
SOCKET sock;
|
||||
uint8_t u8Void;
|
||||
uint16_t u16SessionID;
|
||||
} tstrRecvReply;
|
||||
|
||||
|
||||
/*!
|
||||
* @brief
|
||||
*/
|
||||
typedef struct {
|
||||
uint32_t u32OptionValue;
|
||||
SOCKET sock;
|
||||
uint8_t u8Option;
|
||||
uint16_t u16SessionID;
|
||||
} tstrSetSocketOptCmd;
|
||||
|
||||
|
||||
typedef struct {
|
||||
SOCKET sslSock;
|
||||
uint8_t __PAD24__[3];
|
||||
} tstrSSLSocketCreateCmd;
|
||||
|
||||
|
||||
/*!
|
||||
* @brief
|
||||
*/
|
||||
typedef struct {
|
||||
SOCKET sock;
|
||||
uint8_t u8Option;
|
||||
uint16_t u16SessionID;
|
||||
uint32_t u32OptLen;
|
||||
uint8_t au8OptVal[SSL_MAX_OPT_LEN];
|
||||
} tstrSSLSetSockOptCmd;
|
||||
|
||||
|
||||
/*!
|
||||
*/
|
||||
typedef struct {
|
||||
uint32_t u32DestIPAddr;
|
||||
uint32_t u32CmdPrivate;
|
||||
uint16_t u16PingCount;
|
||||
uint8_t u8TTL;
|
||||
uint8_t __PAD8__;
|
||||
} tstrPingCmd;
|
||||
|
||||
|
||||
typedef struct {
|
||||
uint32_t u32IPAddr;
|
||||
uint32_t u32CmdPrivate;
|
||||
uint32_t u32RTT;
|
||||
uint16_t u16Success;
|
||||
uint16_t u16Fail;
|
||||
uint8_t u8ErrorCode;
|
||||
uint8_t __PAD24__[3];
|
||||
} tstrPingReply;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __M2M_SOCKET_HOST_IF_H__ */
|
||||
95
ChaletLora.X/Source/winc3400_142/socket/include/netinet_in.h
Normal file
95
ChaletLora.X/Source/winc3400_142/socket/include/netinet_in.h
Normal file
@ -0,0 +1,95 @@
|
||||
/*******************************************************************************
|
||||
Company:
|
||||
Microchip Technology Inc.
|
||||
|
||||
File Name:
|
||||
netinet_in.h
|
||||
|
||||
Summary:
|
||||
|
||||
Description:
|
||||
*******************************************************************************/
|
||||
|
||||
// DOM-IGNORE-BEGIN
|
||||
/*******************************************************************************
|
||||
* Copyright (C) 2021 Microchip Technology Inc. and its subsidiaries.
|
||||
*
|
||||
* Subject to your compliance with these terms, you may use Microchip software
|
||||
* and any derivatives exclusively with Microchip products. It is your
|
||||
* responsibility to comply with third party license terms applicable to your
|
||||
* use of third party software (including open source software) that may
|
||||
* accompany Microchip software.
|
||||
*
|
||||
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
|
||||
* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
|
||||
* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
|
||||
* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
|
||||
* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
|
||||
* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
|
||||
* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
|
||||
* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
|
||||
* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
|
||||
*******************************************************************************/
|
||||
// DOM-IGNORE-END
|
||||
|
||||
#ifndef _NETINET_IN_H
|
||||
#define _NETINET_IN_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
// DOM-IGNORE-BEGIN
|
||||
#ifdef __cplusplus // Provide C++ Compatibility
|
||||
extern "C" {
|
||||
#endif
|
||||
// DOM-IGNORE-END
|
||||
|
||||
typedef uint32_t in_addr_t;
|
||||
|
||||
struct in_addr {
|
||||
/*!<
|
||||
Network Byte Order representation of the IPv4 address. For example,
|
||||
the address "192.168.0.10" is represented as 0x0A00A8C0.
|
||||
*/
|
||||
in_addr_t s_addr;
|
||||
};
|
||||
|
||||
struct sockaddr_in{
|
||||
uint16_t sin_family;
|
||||
/*!<
|
||||
Specifies the address family(AF).
|
||||
Members of AF_INET address family are IPv4 addresses.
|
||||
Hence,the only supported value for this is AF_INET.
|
||||
*/
|
||||
uint16_t sin_port;
|
||||
/*!<
|
||||
Port number of the socket.
|
||||
Network sockets are identified by a pair of IP addresses and port number.
|
||||
Must be set in the Network Byte Order format , @ref _htons (e.g. _htons(80)).
|
||||
Can NOT have zero value.
|
||||
*/
|
||||
struct in_addr sin_addr;
|
||||
/*!<
|
||||
IP Address of the socket.
|
||||
The IP address is of type @ref in_addr structure.
|
||||
Can be set to "0" to accept any IP address for server operation.
|
||||
*/
|
||||
uint8_t sin_zero[8];
|
||||
/*!<
|
||||
Padding to make structure the same size as @ref sockaddr.
|
||||
*/
|
||||
};
|
||||
|
||||
const char *inet_ntop(int af, const void *src, char *dst, size_t size);
|
||||
in_addr_t inet_addr(const char *cp);
|
||||
|
||||
// DOM-IGNORE-BEGIN
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
// DOM-IGNORE-END
|
||||
|
||||
#endif /* _NETINET_IN_H */
|
||||
2074
ChaletLora.X/Source/winc3400_142/socket/include/socket.h
Normal file
2074
ChaletLora.X/Source/winc3400_142/socket/include/socket.h
Normal file
File diff suppressed because it is too large
Load Diff
119
ChaletLora.X/Source/winc3400_142/socket/source/inet_addr.c
Normal file
119
ChaletLora.X/Source/winc3400_142/socket/source/inet_addr.c
Normal file
@ -0,0 +1,119 @@
|
||||
/*******************************************************************************
|
||||
WINC3400 Wireless Driver
|
||||
|
||||
File Name:
|
||||
inet_addr.c
|
||||
|
||||
Summary:
|
||||
Implementation of standard inet_addr function.
|
||||
|
||||
Description:
|
||||
Implementation of standard inet_addr function.
|
||||
*******************************************************************************/
|
||||
|
||||
//DOM-IGNORE-BEGIN
|
||||
/*******************************************************************************
|
||||
* Copyright (C) 2021 Microchip Technology Inc. and its subsidiaries.
|
||||
*
|
||||
* Subject to your compliance with these terms, you may use Microchip software
|
||||
* and any derivatives exclusively with Microchip products. It is your
|
||||
* responsibility to comply with third party license terms applicable to your
|
||||
* use of third party software (including open source software) that may
|
||||
* accompany Microchip software.
|
||||
*
|
||||
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
|
||||
* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
|
||||
* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
|
||||
* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
|
||||
* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
|
||||
* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
|
||||
* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
|
||||
* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
|
||||
* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
|
||||
*******************************************************************************/
|
||||
|
||||
#include <stdint.h>
|
||||
#include "socket.h"
|
||||
|
||||
in_addr_t inet_addr(const char *cp)
|
||||
{
|
||||
uint8_t i,l;
|
||||
uint16_t t;
|
||||
uint32_t ip;
|
||||
char c;
|
||||
|
||||
ip = 0;
|
||||
|
||||
for (i=0; i<4; i++)
|
||||
{
|
||||
t = 0;
|
||||
ip >>= 8;
|
||||
|
||||
// Count non-delimiter or terminator characters
|
||||
|
||||
for (l=0; l<4; l++)
|
||||
{
|
||||
c = cp[l];
|
||||
|
||||
if (('.' == c) || ('\0' == c))
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// There must be 1 to 3 characters
|
||||
|
||||
if ((0 == l) || (4 == l))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
c = *cp++;
|
||||
|
||||
// First digit can't be '0' unless it's the only one
|
||||
|
||||
if ((l > 1) && (c == '0'))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
while(l--)
|
||||
{
|
||||
// Each digit must be decimal
|
||||
|
||||
if ((c < '0') || (c > '9'))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
t = (t * 10) + (c - '0');
|
||||
|
||||
c = *cp++;
|
||||
}
|
||||
|
||||
// Total accumulated number must be less than 256
|
||||
|
||||
if (t > 255)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Pack number into 32 bit IP address representation
|
||||
|
||||
ip |= ((uint32_t)t << 24);
|
||||
|
||||
// First three numbers must terminate with '.', last one with '\0's
|
||||
|
||||
if ((('\0' == c) && (i != 3)) || (('\0' != c) && (i == 3)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return ip;
|
||||
}
|
||||
|
||||
//DOM-IGNORE-END
|
||||
104
ChaletLora.X/Source/winc3400_142/socket/source/inet_ntop.c
Normal file
104
ChaletLora.X/Source/winc3400_142/socket/source/inet_ntop.c
Normal file
@ -0,0 +1,104 @@
|
||||
/*******************************************************************************
|
||||
WINC3400 Wireless Driver
|
||||
|
||||
File Name:
|
||||
inet_ntop.c
|
||||
|
||||
Summary:
|
||||
Implementation of standard inet_ntop function.
|
||||
|
||||
Description:
|
||||
Implementation of standard inet_ntop function.
|
||||
*******************************************************************************/
|
||||
|
||||
//DOM-IGNORE-BEGIN
|
||||
/*******************************************************************************
|
||||
* Copyright (C) 2021 Microchip Technology Inc. and its subsidiaries.
|
||||
*
|
||||
* Subject to your compliance with these terms, you may use Microchip software
|
||||
* and any derivatives exclusively with Microchip products. It is your
|
||||
* responsibility to comply with third party license terms applicable to your
|
||||
* use of third party software (including open source software) that may
|
||||
* accompany Microchip software.
|
||||
*
|
||||
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
|
||||
* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
|
||||
* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
|
||||
* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
|
||||
* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
|
||||
* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
|
||||
* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
|
||||
* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
|
||||
* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
|
||||
*******************************************************************************/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <sys/types.h>
|
||||
#include "socket.h"
|
||||
|
||||
const char *inet_ntop(int af, const void *src, char *dst, size_t size)
|
||||
{
|
||||
uint8_t i, v, t, c, n;
|
||||
char *rp = dst;
|
||||
uint32_t ip = ((struct in_addr*)src)->s_addr;
|
||||
|
||||
if ((NULL == src) || (NULL == dst) || (size < 16))
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
for (i=0; i<4; i++)
|
||||
{
|
||||
t = ip;
|
||||
v = 100;
|
||||
|
||||
// Check for zero
|
||||
|
||||
if (t > 0)
|
||||
{
|
||||
n = 0;
|
||||
|
||||
do
|
||||
{
|
||||
c = '0';
|
||||
while (t >= v)
|
||||
{
|
||||
c++;
|
||||
t -= v;
|
||||
}
|
||||
v /= 10;
|
||||
|
||||
if (('0' != c) || (n > 0))
|
||||
{
|
||||
*dst++ = c;
|
||||
|
||||
n++;
|
||||
}
|
||||
}
|
||||
while (v > 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
*dst++ = '0';
|
||||
}
|
||||
|
||||
if (3 == i)
|
||||
{
|
||||
*dst++ = '\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
*dst++ = '.';
|
||||
}
|
||||
|
||||
ip >>= 8;
|
||||
}
|
||||
|
||||
return rp;
|
||||
}
|
||||
|
||||
//DOM-IGNORE-END
|
||||
1261
ChaletLora.X/Source/winc3400_142/socket/source/socket.c
Normal file
1261
ChaletLora.X/Source/winc3400_142/socket/source/socket.c
Normal file
File diff suppressed because it is too large
Load Diff
192
ChaletLora.X/Source/winc3400_142/spi_flash/include/spi_flash.h
Normal file
192
ChaletLora.X/Source/winc3400_142/spi_flash/include/spi_flash.h
Normal file
@ -0,0 +1,192 @@
|
||||
/*******************************************************************************
|
||||
WINC3400 SPI Flash Interface
|
||||
|
||||
File Name:
|
||||
spi_flash.h
|
||||
|
||||
Summary:
|
||||
WINC3400 SPI Flash Interface
|
||||
|
||||
Description:
|
||||
WINC3400 SPI Flash Interface
|
||||
*******************************************************************************/
|
||||
|
||||
//DOM-IGNORE-BEGIN
|
||||
/*******************************************************************************
|
||||
* Copyright (C) 2021 Microchip Technology Inc. and its subsidiaries.
|
||||
*
|
||||
* Subject to your compliance with these terms, you may use Microchip software
|
||||
* and any derivatives exclusively with Microchip products. It is your
|
||||
* responsibility to comply with third party license terms applicable to your
|
||||
* use of third party software (including open source software) that may
|
||||
* accompany Microchip software.
|
||||
*
|
||||
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
|
||||
* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
|
||||
* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
|
||||
* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
|
||||
* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
|
||||
* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
|
||||
* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
|
||||
* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
|
||||
* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
|
||||
*******************************************************************************/
|
||||
|
||||
/** @defgroup SPIFLASHAPI SPI FLASH
|
||||
*/
|
||||
|
||||
#ifndef __SPI_FLASH_H__
|
||||
#define __SPI_FLASH_H__
|
||||
|
||||
#include "nm_common.h"
|
||||
#include "nmbus.h"
|
||||
#include "spi_flash_map.h"
|
||||
|
||||
/** @defgroup SPIFLASHFUNCTIONS Functions
|
||||
* @ingroup SPIFLASHAPI
|
||||
*/
|
||||
|
||||
/**@{*/
|
||||
/*!
|
||||
* @fn uint32_t spi_flash_get_size(void);
|
||||
* @brief Returns with \ref uint32_t value which is total flash size\n
|
||||
* @note Returned value in Mb (Mega Bit).
|
||||
* @return SPI flash size in case of success and a ZERO value in case of failure.
|
||||
*/
|
||||
uint32_t spi_flash_get_size(void);
|
||||
|
||||
/*!
|
||||
* @fn int8_t spi_flash_read(uint8_t *, uint32_t, uint32_t);
|
||||
* @brief Read a specified portion of data from SPI Flash.\n
|
||||
* @param [out] pu8Buf
|
||||
* Pointer to data buffer which will be filled with data in case of successful operation.
|
||||
* @param [in] u32Addr
|
||||
* Address (Offset) to read from at the SPI flash.
|
||||
* @param [in] u32Sz
|
||||
* Total size of data to be read in bytes
|
||||
* @warning
|
||||
* - Address (offset) plus size of data must not exceed flash size.\n
|
||||
* - No firmware is required for reading from SPI flash.\n
|
||||
* - In case of there is a running firmware, it is required to pause your firmware first
|
||||
* before any trial to access SPI flash to avoid any racing between host and running firmware on bus using
|
||||
* @ref m2m_wifi_download_mode
|
||||
* @note
|
||||
* - It is blocking function\n
|
||||
* @sa m2m_wifi_download_mode, spi_flash_get_size
|
||||
* @return The function returns @ref M2M_SUCCESS for successful operations and a negative value otherwise.
|
||||
*/
|
||||
int8_t spi_flash_read(uint8_t *pu8Buf, uint32_t u32Addr, uint32_t u32Sz);
|
||||
|
||||
/*!
|
||||
* @fn int8_t spi_flash_write(uint8_t *, uint32_t, uint32_t);
|
||||
* @brief Write a specified portion of data to SPI Flash.\n
|
||||
* @param [in] pu8Buf
|
||||
* Pointer to data buffer which contains the data to be written.
|
||||
* @param [in] u32Offset
|
||||
* Address (Offset) to write at the SPI flash.
|
||||
* @param [in] u32Sz
|
||||
* Total number of size of data bytes
|
||||
* @note
|
||||
* - It is blocking function\n
|
||||
* - It is user's responsibility to verify that data has been written successfully
|
||||
* by reading data again and comparing it with the original.
|
||||
* @warning
|
||||
* - Address (offset) plus size of data must not exceed flash size.\n
|
||||
* - No firmware is required for writing to SPI flash.\n
|
||||
* - In case of there is a running firmware, it is required to pause your firmware first
|
||||
* before any trial to access SPI flash to avoid any racing between host and running firmware on bus using
|
||||
* @ref m2m_wifi_download_mode.
|
||||
* - Before writing to any section, it is required to erase that section first.
|
||||
* @sa m2m_wifi_download_mode, spi_flash_get_size, spi_flash_erase
|
||||
* @return The function returns @ref M2M_SUCCESS for successful operations and a negative value otherwise.
|
||||
*/
|
||||
int8_t spi_flash_write(uint8_t* pu8Buf, uint32_t u32Offset, uint32_t u32Sz);
|
||||
|
||||
/*!
|
||||
* @fn int8_t spi_flash_erase(uint32_t, uint32_t);
|
||||
* @brief Erase a specified portion of SPI Flash.\n
|
||||
* @param [in] u32Offset
|
||||
* Address (Offset) to erase from the SPI flash.
|
||||
* @param [in] u32Sz
|
||||
* Total number of bytes required to be erased.
|
||||
* @note It is blocking function \n
|
||||
* @warning
|
||||
* - Address (offset) plus size of data must not exceed flash size.\n
|
||||
* - No firmware is required for writing to SPI flash.\n
|
||||
* - In case of there is a running firmware, it is required to pause your firmware first
|
||||
* before any trial to access SPI flash to avoid any racing between host and running firmware on bus using
|
||||
* @ref m2m_wifi_download_mode
|
||||
* @sa m2m_wifi_download_mode, spi_flash_get_size
|
||||
* @return The function returns @ref M2M_SUCCESS for successful operations and a negative value otherwise.
|
||||
* \section SPIFLASHExample Example
|
||||
* @code{.c}
|
||||
* #include "spi_flash.h"
|
||||
*
|
||||
* #define DATA_TO_REPLACE "THIS IS A NEW SECTOR IN FLASH"
|
||||
*
|
||||
* int main()
|
||||
* {
|
||||
* uint8_t au8FlashContent[FLASH_SECTOR_SZ] = {0};
|
||||
* uint32_t u32FlashTotalSize = 0;
|
||||
* uint32_t u32FlashOffset = 0;
|
||||
*
|
||||
* ret = m2m_wifi_download_mode();
|
||||
* if(M2M_SUCCESS != ret)
|
||||
* {
|
||||
* printf("Unable to enter download mode\r\n");
|
||||
* }
|
||||
* else
|
||||
* {
|
||||
* u32FlashTotalSize = spi_flash_get_size();
|
||||
* }
|
||||
*
|
||||
* while((u32FlashTotalSize > u32FlashOffset) && (M2M_SUCCESS == ret))
|
||||
* {
|
||||
* ret = spi_flash_read(au8FlashContent, u32FlashOffset, FLASH_SECTOR_SZ);
|
||||
* if(M2M_SUCCESS != ret)
|
||||
* {
|
||||
* printf("Unable to read SPI sector\r\n");
|
||||
* break;
|
||||
* }
|
||||
* memcpy(au8FlashContent, DATA_TO_REPLACE, strlen(DATA_TO_REPLACE));
|
||||
*
|
||||
* ret = spi_flash_erase(u32FlashOffset, FLASH_SECTOR_SZ);
|
||||
* if(M2M_SUCCESS != ret)
|
||||
* {
|
||||
* printf("Unable to erase SPI sector\r\n");
|
||||
* break;
|
||||
* }
|
||||
*
|
||||
* ret = spi_flash_write(au8FlashContent, u32FlashOffset, FLASH_SECTOR_SZ);
|
||||
* if(M2M_SUCCESS != ret)
|
||||
* {
|
||||
* printf("Unable to write SPI sector\r\n");
|
||||
* break;
|
||||
* }
|
||||
* u32FlashOffset += FLASH_SECTOR_SZ;
|
||||
* }
|
||||
*
|
||||
* if(M2M_SUCCESS == ret)
|
||||
* {
|
||||
* printf("Successful operations\r\n");
|
||||
* }
|
||||
* else
|
||||
* {
|
||||
* printf("Failed operations\r\n");
|
||||
* }
|
||||
*
|
||||
* while(1);
|
||||
* return M2M_SUCCESS;
|
||||
* }
|
||||
* @endcode
|
||||
*/
|
||||
|
||||
int8_t spi_flash_erase(uint32_t u32Offset, uint32_t u32Sz);
|
||||
|
||||
/**@}
|
||||
*/
|
||||
|
||||
#endif //__SPI_FLASH_H__
|
||||
@ -0,0 +1,264 @@
|
||||
/*******************************************************************************
|
||||
WINC3400 SPI Flash Map
|
||||
|
||||
File Name:
|
||||
spi_flash_map.h
|
||||
|
||||
Summary:
|
||||
WINC3400 SPI Flash Map
|
||||
|
||||
Description:
|
||||
WINC3400 SPI Flash Map
|
||||
*******************************************************************************/
|
||||
|
||||
//DOM-IGNORE-BEGIN
|
||||
/*******************************************************************************
|
||||
* Copyright (C) 2021 Microchip Technology Inc. and its subsidiaries.
|
||||
*
|
||||
* Subject to your compliance with these terms, you may use Microchip software
|
||||
* and any derivatives exclusively with Microchip products. It is your
|
||||
* responsibility to comply with third party license terms applicable to your
|
||||
* use of third party software (including open source software) that may
|
||||
* accompany Microchip software.
|
||||
*
|
||||
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
|
||||
* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
|
||||
* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
|
||||
* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
|
||||
* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
|
||||
* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
|
||||
* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
|
||||
* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
|
||||
* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
|
||||
*******************************************************************************/
|
||||
|
||||
|
||||
#ifndef __SPI_FLASH_MAP_H__
|
||||
#define __SPI_FLASH_MAP_H__
|
||||
|
||||
//#define DOWNLOAD_ROLLBACK
|
||||
//#define OTA_GEN
|
||||
#define _PROGRAM_POWER_SAVE_
|
||||
#define BT_IMAGE_PRESENT
|
||||
|
||||
/* =======*=======*=======*=======*=======
|
||||
* General Sizes for Flash Memory
|
||||
* =======*=======*=======*=======*=======
|
||||
*/
|
||||
|
||||
#define FLASH_START_ADDR (0UL)
|
||||
/*!<Starting Address of Flash Memory
|
||||
*
|
||||
*/
|
||||
#define FLASH_BLOCK_SIZE (32 * 1024UL)
|
||||
/*!<Block Size in Flash Memory
|
||||
*/
|
||||
#define FLASH_SECTOR_SZ (4 * 1024UL)
|
||||
/*!<Sector Size in Flash Memory
|
||||
*/
|
||||
#define FLASH_PAGE_SZ (256)
|
||||
/*!<Page Size in Flash Memory
|
||||
*/
|
||||
|
||||
#define FLASH_2M_TOTAL_SZ (256 * 1024UL)
|
||||
/*!<Total Size of 2M Flash Memory
|
||||
*/
|
||||
#define FLASH_4M_TOTAL_SZ (512 * 1024UL)
|
||||
/*!<Total Size of 4M Flash Memory
|
||||
*/
|
||||
#define FLASH_8M_TOTAL_SZ (1024 * 1024UL)
|
||||
/*!<Total Size of 8M Flash Memory
|
||||
*/
|
||||
|
||||
/*
|
||||
* Detailed Sizes and locations for 8M Flash Memory:
|
||||
* ____________________ ___________ ___________________________ _______________________________________________
|
||||
* | Starting Address | Size | Location's Name | Description |
|
||||
* |____________________|___________|___________________________|_______________________________________________|
|
||||
* | 0 K | 4 K | Boot Firmware | Firmware to select which version to run |
|
||||
* | 4 K | 4 K | Control Section | Structured data used by Boot firmware |
|
||||
* | 8 K | 4 K | Backup | Generic sector backup |
|
||||
* | 12 K | 8 K | PLL+GAIN : | LookUp Table for PLL and Gain calculations |
|
||||
* | | | PLL Size = 2K | PLL |
|
||||
* | | | GAIN Size = 6K | Gain configuration |
|
||||
* | 20 K | 4 K | TLS CERTIFICATE | X.509 Root certificate storage |
|
||||
* | 24 K | 8 K | TLS Server | TLS Server Private Key and certificates |
|
||||
* | 32 K | 4 K | Connection Parameters | Parameters for success connection to AP |
|
||||
* | 36 K | 472 K | Firmware Image 1 | Firmware image, comprising: |
|
||||
* | 36 K | 8 K | Program Firmware | Downloader firmware |
|
||||
* | 44 K | 296 K | Main Firmware | Main Firmware to run WiFi Chip |
|
||||
* | 340 K | 8 K | HTTP Files | Files used with Provisioning Mode |
|
||||
* | 348 K | 160 K | BT Firmware | BT Firmware for BT Cortus |
|
||||
* | 508 K | 4 K | Empty | Unused |
|
||||
* | 512 K | 472 K | Firmware Image 2 | Available for firmware image update |
|
||||
* | | | Program Firmware | (flip-flop with Firmware Image 1) |
|
||||
* | | | Main Firmware | |
|
||||
* | | | HTTP Files | |
|
||||
* | | | BT Firmware | |
|
||||
* | 984 K | 40 K | Empty | Unused |
|
||||
* |____________________|___________|___________________________|_______________________________________________|
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* Boot Firmware: used to select which firmware to run
|
||||
*/
|
||||
#define M2M_BOOT_FIRMWARE_STARTING_ADDR (FLASH_START_ADDR)
|
||||
#define M2M_BOOT_FIRMWARE_FLASH_SZ (FLASH_SECTOR_SZ * 1)
|
||||
|
||||
/*
|
||||
* Control Section: used by Boot firmware
|
||||
*/
|
||||
#define M2M_CONTROL_FLASH_OFFSET (M2M_BOOT_FIRMWARE_STARTING_ADDR + M2M_BOOT_FIRMWARE_FLASH_SZ)
|
||||
#define M2M_CONTROL_FLASH_SZ (FLASH_SECTOR_SZ * 1)
|
||||
|
||||
/*
|
||||
* Generic Sector Backup: used as backup in case of interruption during sector read-erase-write
|
||||
*/
|
||||
#define M2M_BACKUP_FLASH_OFFSET (M2M_CONTROL_FLASH_OFFSET + M2M_CONTROL_FLASH_SZ)
|
||||
#define M2M_BACKUP_FLASH_SZ (FLASH_SECTOR_SZ * 1)
|
||||
|
||||
/*
|
||||
* LUT for PLL and TX Gain settings
|
||||
*/
|
||||
#define M2M_PLL_FLASH_OFFSET (M2M_BACKUP_FLASH_OFFSET + M2M_BACKUP_FLASH_SZ)
|
||||
#define M2M_PLL_MAGIC_NUMBER_FLASH_SZ (2*4) // 2 32bit values
|
||||
#define M2M_PLL_WIFI_CHAN_FLASH_OFFSET (M2M_PLL_FLASH_OFFSET + M2M_PLL_MAGIC_NUMBER_FLASH_SZ)
|
||||
#define M2M_PLL_WIFI_CHAN_FLASH_SZ (14*8*4) // Wifi Channels 1 to 14 inclusive, 8 32bit values for each channel.
|
||||
#define M2M_PLL_FREQ_FLASH_OFFSET (M2M_PLL_WIFI_CHAN_FLASH_OFFSET + M2M_PLL_WIFI_CHAN_FLASH_SZ)
|
||||
#define M2M_PLL_FREQ_FLASH_SZ ((1+84)*4) // Frequencies 2401 to 2484MHz inclusive, also 1920 used for cpll compensate.
|
||||
#define M2M_PLL_FLASH_SZ (1024 * 2)
|
||||
#define M2M_GAIN_FLASH_OFFSET (M2M_PLL_FLASH_OFFSET + M2M_PLL_FLASH_SZ)
|
||||
#define M2M_GAIN_FLASH_SZ (M2M_CONFIG_SECT_TOTAL_SZ - M2M_PLL_FLASH_SZ)
|
||||
#define M2M_CONFIG_SECT_TOTAL_SZ (FLASH_SECTOR_SZ * 2)
|
||||
|
||||
/*
|
||||
* TLS Certificates
|
||||
*/
|
||||
#define M2M_TLS_ROOTCER_FLASH_OFFSET (M2M_PLL_FLASH_OFFSET + M2M_CONFIG_SECT_TOTAL_SZ)
|
||||
#define M2M_TLS_ROOTCER_FLASH_SZ (FLASH_SECTOR_SZ * 1)
|
||||
#define M2M_TLS_ROOTCER_FLASH_SIG {0x01,0xF1,0x02,0xF2,0x03,0xF3,0x04,0xF4,0x05,0xF5,0x06,0xF6,0x07,0xF7,0x08,0xF8}
|
||||
#define M2M_TLS_ROOTCER_FLASH_SIG_LENGTH 16
|
||||
/*!<
|
||||
*/
|
||||
|
||||
/*
|
||||
* TLS Server Key Files
|
||||
*/
|
||||
#define M2M_TLS_SERVER_FLASH_OFFSET (M2M_TLS_ROOTCER_FLASH_OFFSET + M2M_TLS_ROOTCER_FLASH_SZ)
|
||||
#define M2M_TLS_SERVER_FLASH_SZ (FLASH_SECTOR_SZ * 2)
|
||||
#define M2M_TLS_SERVER_FLASH_SIG
|
||||
|
||||
/*
|
||||
* Saved Connection Parameters
|
||||
*/
|
||||
#define M2M_CACHED_CONNS_FLASH_OFFSET (M2M_TLS_SERVER_FLASH_OFFSET + M2M_TLS_SERVER_FLASH_SZ)
|
||||
#define M2M_CACHED_CONNS_FLASH_SZ (FLASH_SECTOR_SZ * 1)
|
||||
#define M2M_CACHED_CONNS_FLASH_SIG
|
||||
|
||||
/*
|
||||
*
|
||||
* OTA image1 Offset (Firmware offset)
|
||||
*/
|
||||
#define M2M_OTA_IMAGE1_OFFSET (M2M_CACHED_CONNS_FLASH_OFFSET + M2M_CACHED_CONNS_FLASH_SZ)
|
||||
|
||||
/*
|
||||
* Common section size
|
||||
*/
|
||||
#define FLASH_COMMON_SZ (\
|
||||
M2M_BOOT_FIRMWARE_FLASH_SZ +\
|
||||
M2M_CONTROL_FLASH_SZ +\
|
||||
M2M_BACKUP_FLASH_SZ +\
|
||||
M2M_CONFIG_SECT_TOTAL_SZ +\
|
||||
M2M_TLS_ROOTCER_FLASH_SZ +\
|
||||
M2M_TLS_SERVER_FLASH_SZ +\
|
||||
M2M_CACHED_CONNS_FLASH_SZ )
|
||||
|
||||
/*
|
||||
* Check addition
|
||||
*/
|
||||
#if (FLASH_COMMON_SZ != M2M_OTA_IMAGE1_OFFSET)
|
||||
#error "Common Size Mismatch"
|
||||
#endif
|
||||
|
||||
/**
|
||||
*
|
||||
* OTA image 2 offset
|
||||
*/
|
||||
#define M2M_OTA_IMAGE2_OFFSET (FLASH_4M_TOTAL_SZ)
|
||||
|
||||
/*
|
||||
* Firmware (including downloader firmware)
|
||||
*/
|
||||
#if (defined _FIRMWARE_)||(defined OTA_GEN)
|
||||
#define M2M_FIRMWARE_FLASH_OFFSET (0UL)
|
||||
#else
|
||||
#if (defined DOWNLOAD_ROLLBACK)
|
||||
#define M2M_FIRMWARE_FLASH_OFFSET (M2M_OTA_IMAGE2_OFFSET)
|
||||
#else
|
||||
#define M2M_FIRMWARE_FLASH_OFFSET (M2M_OTA_IMAGE1_OFFSET)
|
||||
#endif
|
||||
#endif
|
||||
#ifdef _PROGRAM_POWER_SAVE_
|
||||
#define M2M_PROGRAM_FLASH_SZ (8 * 1024UL) /* downloader firmware */
|
||||
#else
|
||||
#define M2M_PROGRAM_FLASH_SZ (0UL)
|
||||
#endif /* _PROGRAM_POWER_SAVE_ */
|
||||
#define M2M_FIRMWARE_FLASH_SZ (304 * 1024UL) /* downloader firmware and main firmware */
|
||||
|
||||
/*
|
||||
* HTTP Files
|
||||
*/
|
||||
#define M2M_HTTP_MEM_FLASH_OFFSET (M2M_FIRMWARE_FLASH_OFFSET + M2M_FIRMWARE_FLASH_SZ)
|
||||
#define M2M_HTTP_MEM_FLASH_SZ (FLASH_SECTOR_SZ * 2)
|
||||
|
||||
/*
|
||||
* ps_Firmware(Power Save Firmware): App. which runs for power saving purpose
|
||||
*/
|
||||
#define M2M_PS_FIRMWARE_FLASH_OFFSET (M2M_HTTP_MEM_FLASH_OFFSET + M2M_HTTP_MEM_FLASH_SZ)
|
||||
#define M2M_PS_FIRMWARE_FLASH_SZ (FLASH_SECTOR_SZ * 0)
|
||||
|
||||
/*
|
||||
* BT(Bluetooth Firmware): BT/BLE firmware to run on the BT cortus
|
||||
*/
|
||||
#define M2M_BT_FIRMWARE_FLASH_OFFSET (M2M_PS_FIRMWARE_FLASH_OFFSET + M2M_PS_FIRMWARE_FLASH_SZ)
|
||||
#ifdef BT_IMAGE_PRESENT
|
||||
#define M2M_BT_FIRMWARE_FLASH_SZ (160 * 1024UL)
|
||||
#else
|
||||
#define M2M_BT_FIRMWARE_FLASH_SZ (0)
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* OTA image size
|
||||
*/
|
||||
#define OTA_IMAGE_SIZE (\
|
||||
M2M_FIRMWARE_FLASH_SZ +\
|
||||
M2M_HTTP_MEM_FLASH_SZ +\
|
||||
M2M_PS_FIRMWARE_FLASH_SZ +\
|
||||
M2M_BT_FIRMWARE_FLASH_SZ )
|
||||
|
||||
/*
|
||||
* Check addition
|
||||
*/
|
||||
#if ((M2M_FIRMWARE_FLASH_OFFSET + OTA_IMAGE_SIZE) != (M2M_BT_FIRMWARE_FLASH_OFFSET + M2M_BT_FIRMWARE_FLASH_SZ))
|
||||
#error "OTA Size Mismatch"
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Check that total size of content
|
||||
* does not exceed total size of memory allocated
|
||||
*/
|
||||
#if ((FLASH_COMMON_SZ + OTA_IMAGE_SIZE) > M2M_OTA_IMAGE2_OFFSET)
|
||||
#error "Exceed Flash Size"
|
||||
#endif /* ((FLASH_COMMON_SZ + OTA_IMAGE_SIZE) > M2M_OTA_IMAGE2_OFFSET) */
|
||||
#if ((M2M_OTA_IMAGE2_OFFSET + OTA_IMAGE_SIZE) > FLASH_8M_TOTAL_SZ)
|
||||
#error "OTA Exceed Flash Size"
|
||||
#endif /* ((M2M_OTA_IMAGE2_OFFSET + OTA_IMAGE_SIZE) > FLASH_8M_TOTAL_SZ) */
|
||||
|
||||
#endif /* __SPI_FLASH_MAP_H__ */
|
||||
599
ChaletLora.X/Source/winc3400_142/spi_flash/source/spi_flash.c
Normal file
599
ChaletLora.X/Source/winc3400_142/spi_flash/source/spi_flash.c
Normal file
@ -0,0 +1,599 @@
|
||||
/*******************************************************************************
|
||||
WINC3400 SPI Flash Interface
|
||||
|
||||
File Name:
|
||||
spi_flash.c
|
||||
|
||||
Summary:
|
||||
WINC3400 SPI Flash Interface
|
||||
|
||||
Description:
|
||||
WINC3400 SPI Flash Interface
|
||||
*******************************************************************************/
|
||||
|
||||
//DOM-IGNORE-BEGIN
|
||||
/*******************************************************************************
|
||||
* Copyright (C) 2021 Microchip Technology Inc. and its subsidiaries.
|
||||
*
|
||||
* Subject to your compliance with these terms, you may use Microchip software
|
||||
* and any derivatives exclusively with Microchip products. It is your
|
||||
* responsibility to comply with third party license terms applicable to your
|
||||
* use of third party software (including open source software) that may
|
||||
* accompany Microchip software.
|
||||
*
|
||||
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
|
||||
* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
|
||||
* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
|
||||
* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
|
||||
* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
|
||||
* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
|
||||
* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
|
||||
* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
|
||||
* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
|
||||
*******************************************************************************/
|
||||
|
||||
#include "spi_flash.h"
|
||||
#include "spi_flash_map.h"
|
||||
#include "nm_common.h"
|
||||
#define DUMMY_REGISTER (0x1084)
|
||||
|
||||
#define TIMEOUT (-1) /*MS*/
|
||||
|
||||
#define MAX_PROG_CNT 2
|
||||
#define MAX_RETRY 4
|
||||
#define MAX_ATTEMPT_STATUS_READ 50000
|
||||
|
||||
#define HOST_SHARE_MEM_BASE (0xd0000UL)
|
||||
#define CORTUS_SHARE_MEM_BASE (0x60000000UL)
|
||||
#define NMI_SPI_FLASH_ADDR (0x111c)
|
||||
/***********************************************************
|
||||
SPI Flash DMA
|
||||
***********************************************************/
|
||||
#define GET_UINT32(X,Y) (X[0+Y] + ((uint32_t)X[1+Y]<<8) + ((uint32_t)X[2+Y]<<16) +((uint32_t)X[3+Y]<<24))
|
||||
#define SPI_FLASH_BASE (0x10200)
|
||||
#define SPI_FLASH_MODE (SPI_FLASH_BASE + 0x00)
|
||||
#define SPI_FLASH_CMD_CNT (SPI_FLASH_BASE + 0x04)
|
||||
#define SPI_FLASH_DATA_CNT (SPI_FLASH_BASE + 0x08)
|
||||
#define SPI_FLASH_BUF1 (SPI_FLASH_BASE + 0x0c)
|
||||
#define SPI_FLASH_BUF2 (SPI_FLASH_BASE + 0x10)
|
||||
#define SPI_FLASH_BUF_DIR (SPI_FLASH_BASE + 0x14)
|
||||
#define SPI_FLASH_TR_DONE (SPI_FLASH_BASE + 0x18)
|
||||
#define SPI_FLASH_DMA_ADDR (SPI_FLASH_BASE + 0x1c)
|
||||
#define SPI_FLASH_MSB_CTL (SPI_FLASH_BASE + 0x20)
|
||||
#define SPI_FLASH_TX_CTL (SPI_FLASH_BASE + 0x24)
|
||||
|
||||
/*********************************************/
|
||||
/* STATIC FUNCTIONS */
|
||||
/*********************************************/
|
||||
|
||||
/**
|
||||
* @fn spi_flash_read_status_reg
|
||||
* @brief Read status register
|
||||
* @param[OUT] val
|
||||
value of status reg
|
||||
* @return Status of execution
|
||||
* @note Compatible with MX25L6465E
|
||||
*/
|
||||
static int8_t spi_flash_read_status_reg(uint8_t *val)
|
||||
{
|
||||
int8_t ret = M2M_SUCCESS;
|
||||
uint8_t cmd[1];
|
||||
uint32_t reg;
|
||||
|
||||
cmd[0] = 0x05;
|
||||
|
||||
ret += nm_write_reg(SPI_FLASH_DATA_CNT, 4);
|
||||
ret += nm_write_reg(SPI_FLASH_BUF1, cmd[0]);
|
||||
ret += nm_write_reg(SPI_FLASH_BUF_DIR, 0x01);
|
||||
ret += nm_write_reg(SPI_FLASH_DMA_ADDR, DUMMY_REGISTER);
|
||||
ret += nm_write_reg(SPI_FLASH_CMD_CNT, 1 | (1<<7));
|
||||
do
|
||||
{
|
||||
ret += nm_read_reg_with_ret(SPI_FLASH_TR_DONE, (uint32_t *)®);
|
||||
if(M2M_SUCCESS != ret) break;
|
||||
}
|
||||
while(reg != 1);
|
||||
|
||||
reg = (M2M_SUCCESS == ret)?(nm_read_reg(DUMMY_REGISTER)):(0);
|
||||
*val = reg & 0xff;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @fn spi_flash_load_to_cortus_mem
|
||||
* @brief Load data from SPI flash into cortus memory
|
||||
* @param[IN] u32MemAdr
|
||||
* Cortus load address. It must be set to its AHB access address
|
||||
* @param[IN] u32FlashAdr
|
||||
* Address to read from at the SPI flash
|
||||
* @param[IN] u32Sz
|
||||
* Data size
|
||||
* @return Status of execution
|
||||
* @note Compatible with MX25L6465E and should be working with other types
|
||||
*/
|
||||
static int8_t spi_flash_load_to_cortus_mem(uint32_t u32MemAdr, uint32_t u32FlashAdr, uint32_t u32Sz)
|
||||
{
|
||||
uint8_t cmd[5];
|
||||
uint32_t val = 0;
|
||||
int8_t ret = M2M_SUCCESS;
|
||||
|
||||
cmd[0] = 0x0b;
|
||||
cmd[1] = (uint8_t)(u32FlashAdr >> 16);
|
||||
cmd[2] = (uint8_t)(u32FlashAdr >> 8);
|
||||
cmd[3] = (uint8_t)(u32FlashAdr);
|
||||
cmd[4] = 0xA5;
|
||||
|
||||
ret += nm_write_reg(SPI_FLASH_DATA_CNT, u32Sz);
|
||||
ret += nm_write_reg(SPI_FLASH_BUF1, cmd[0]|(cmd[1]<<8)|(cmd[2]<<16)|(cmd[3]<<24));
|
||||
ret += nm_write_reg(SPI_FLASH_BUF2, cmd[4]);
|
||||
ret += nm_write_reg(SPI_FLASH_BUF_DIR, 0x1f);
|
||||
ret += nm_write_reg(SPI_FLASH_DMA_ADDR, u32MemAdr);
|
||||
ret += nm_write_reg(SPI_FLASH_CMD_CNT, 5 | (1<<7));
|
||||
do
|
||||
{
|
||||
ret += nm_read_reg_with_ret(SPI_FLASH_TR_DONE, (uint32_t *)&val);
|
||||
if(M2M_SUCCESS != ret) break;
|
||||
}
|
||||
while(val != 1);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @fn spi_flash_sector_erase
|
||||
* @brief Erase sector (4KB)
|
||||
* @param[IN] u32FlashAdr
|
||||
* Any memory address within the sector
|
||||
* @return Status of execution
|
||||
* @note Compatible with MX25L6465E and should be working with other types
|
||||
*/
|
||||
static int8_t spi_flash_sector_erase(uint32_t u32FlashAdr)
|
||||
{
|
||||
uint8_t cmd[4];
|
||||
uint32_t val = 0;
|
||||
int8_t ret = M2M_SUCCESS;
|
||||
|
||||
cmd[0] = 0x20;
|
||||
cmd[1] = (uint8_t)(u32FlashAdr >> 16);
|
||||
cmd[2] = (uint8_t)(u32FlashAdr >> 8);
|
||||
cmd[3] = (uint8_t)(u32FlashAdr);
|
||||
|
||||
ret += nm_write_reg(SPI_FLASH_DATA_CNT, 0);
|
||||
ret += nm_write_reg(SPI_FLASH_BUF1, cmd[0]|(cmd[1]<<8)|(cmd[2]<<16)|(cmd[3]<<24));
|
||||
ret += nm_write_reg(SPI_FLASH_BUF_DIR, 0x0f);
|
||||
ret += nm_write_reg(SPI_FLASH_DMA_ADDR, 0);
|
||||
ret += nm_write_reg(SPI_FLASH_CMD_CNT, 4 | (1<<7));
|
||||
do
|
||||
{
|
||||
ret += nm_read_reg_with_ret(SPI_FLASH_TR_DONE, (uint32_t *)&val);
|
||||
if(M2M_SUCCESS != ret) break;
|
||||
}
|
||||
while(val != 1);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @fn spi_flash_write_enable
|
||||
* @brief Send write enable command to SPI flash
|
||||
* @return Status of execution
|
||||
* @note Compatible with MX25L6465E and should be working with other types
|
||||
*/
|
||||
static int8_t spi_flash_write_enable(void)
|
||||
{
|
||||
uint8_t cmd[1];
|
||||
uint32_t val = 0;
|
||||
int8_t ret = M2M_SUCCESS;
|
||||
|
||||
cmd[0] = 0x06;
|
||||
|
||||
ret += nm_write_reg(SPI_FLASH_DATA_CNT, 0);
|
||||
ret += nm_write_reg(SPI_FLASH_BUF1, cmd[0]);
|
||||
ret += nm_write_reg(SPI_FLASH_BUF_DIR, 0x01);
|
||||
ret += nm_write_reg(SPI_FLASH_DMA_ADDR, 0);
|
||||
ret += nm_write_reg(SPI_FLASH_CMD_CNT, 1 | (1<<7));
|
||||
do
|
||||
{
|
||||
ret += nm_read_reg_with_ret(SPI_FLASH_TR_DONE, (uint32_t *)&val);
|
||||
if(M2M_SUCCESS != ret) break;
|
||||
}
|
||||
while(val != 1);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @fn spi_flash_write_disable
|
||||
* @brief Send write disable command to SPI flash
|
||||
* @note Compatible with MX25L6465E and should be working with other types
|
||||
*/
|
||||
static int8_t spi_flash_write_disable(void)
|
||||
{
|
||||
uint8_t cmd[1];
|
||||
uint32_t val = 0;
|
||||
int8_t ret = M2M_SUCCESS;
|
||||
cmd[0] = 0x04;
|
||||
|
||||
ret += nm_write_reg(SPI_FLASH_DATA_CNT, 0);
|
||||
ret += nm_write_reg(SPI_FLASH_BUF1, cmd[0]);
|
||||
ret += nm_write_reg(SPI_FLASH_BUF_DIR, 0x01);
|
||||
ret += nm_write_reg(SPI_FLASH_DMA_ADDR, 0);
|
||||
ret += nm_write_reg(SPI_FLASH_CMD_CNT, 1 | (1<<7));
|
||||
do
|
||||
{
|
||||
ret += nm_read_reg_with_ret(SPI_FLASH_TR_DONE, (uint32_t *)&val);
|
||||
if(M2M_SUCCESS != ret) break;
|
||||
}
|
||||
while(val != 1);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @fn spi_flash_page_program
|
||||
* @brief Write data (less than page size) from cortus memory to SPI flash
|
||||
* @param[IN] u32MemAdr
|
||||
* Cortus data address. It must be set to its AHB access address
|
||||
* @param[IN] u32FlashAdr
|
||||
* Address to write to at the SPI flash
|
||||
* @param[IN] u32Sz
|
||||
* Data size
|
||||
* @note Compatible with MX25L6465E and should be working with other types
|
||||
*/
|
||||
static int8_t spi_flash_page_program(uint32_t u32MemAdr, uint32_t u32FlashAdr, uint32_t u32Sz)
|
||||
{
|
||||
uint8_t cmd[4];
|
||||
uint32_t val = 0;
|
||||
int8_t ret = M2M_SUCCESS;
|
||||
|
||||
cmd[0] = 0x02;
|
||||
cmd[1] = (uint8_t)(u32FlashAdr >> 16);
|
||||
cmd[2] = (uint8_t)(u32FlashAdr >> 8);
|
||||
cmd[3] = (uint8_t)(u32FlashAdr);
|
||||
|
||||
ret += nm_write_reg(SPI_FLASH_DATA_CNT, 0);
|
||||
ret += nm_write_reg(SPI_FLASH_BUF1, cmd[0]|(cmd[1]<<8)|(cmd[2]<<16)|(cmd[3]<<24));
|
||||
ret += nm_write_reg(SPI_FLASH_BUF_DIR, 0x0f);
|
||||
ret += nm_write_reg(SPI_FLASH_DMA_ADDR, u32MemAdr);
|
||||
ret += nm_write_reg(SPI_FLASH_CMD_CNT, 4 | (1<<7) | ((u32Sz & 0xfffff) << 8));
|
||||
do
|
||||
{
|
||||
ret += nm_read_reg_with_ret(SPI_FLASH_TR_DONE, (uint32_t *)&val);
|
||||
if(M2M_SUCCESS != ret) break;
|
||||
}
|
||||
while(val != 1);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @fn spi_flash_read_internal
|
||||
* @brief Read from data from SPI flash
|
||||
* @param[OUT] pu8Buf
|
||||
* Pointer to data buffer
|
||||
* @param[IN] u32Addr
|
||||
* Address to read from at the SPI flash
|
||||
* @param[IN] u32Sz
|
||||
* Data size
|
||||
* @note Data size must be < 64KB (limitation imposed by the bus wrapper)
|
||||
*/
|
||||
static int8_t spi_flash_read_internal(uint8_t *pu8Buf, uint32_t u32Addr, uint32_t u32Sz)
|
||||
{
|
||||
int8_t ret = M2M_SUCCESS;
|
||||
/* read size must be < 64KB */
|
||||
ret = spi_flash_load_to_cortus_mem(HOST_SHARE_MEM_BASE, u32Addr, u32Sz);
|
||||
if(M2M_SUCCESS != ret) goto ERR;
|
||||
ret = nm_read_block(HOST_SHARE_MEM_BASE, pu8Buf, u32Sz);
|
||||
ERR:
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @fn spi_flash_pp
|
||||
* @brief Program data of size less than a page (256 bytes) at the SPI flash
|
||||
* @param[IN] u32Offset
|
||||
* Address to write to at the SPI flash
|
||||
* @param[IN] pu8Buf
|
||||
* Pointer to data buffer
|
||||
* @param[IN] u32Sz
|
||||
* Data size
|
||||
* @return Status of execution
|
||||
*/
|
||||
static int8_t spi_flash_pp(uint32_t u32Offset, uint8_t *pu8Buf, uint16_t u16Sz)
|
||||
{
|
||||
int8_t ret = M2M_SUCCESS;
|
||||
uint8_t tmp;
|
||||
int i;
|
||||
int p;
|
||||
int x;
|
||||
|
||||
/* use shared packet memory as temp mem */
|
||||
ret += nm_write_block(HOST_SHARE_MEM_BASE, pu8Buf, u16Sz);
|
||||
|
||||
for(i = 0, p = 0; (i < MAX_RETRY) && (p < MAX_PROG_CNT); i++)
|
||||
{
|
||||
if((spi_flash_write_enable() == M2M_SUCCESS) &&
|
||||
(spi_flash_page_program(HOST_SHARE_MEM_BASE, u32Offset, u16Sz) == M2M_SUCCESS))
|
||||
{
|
||||
x = 0;
|
||||
while(++x < MAX_ATTEMPT_STATUS_READ)
|
||||
{
|
||||
if(spi_flash_read_status_reg(&tmp) != M2M_SUCCESS)
|
||||
{
|
||||
break;
|
||||
}
|
||||
if(!(tmp & 0x01))
|
||||
{
|
||||
p++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
ret = spi_flash_write_disable();
|
||||
|
||||
if(p < MAX_PROG_CNT)
|
||||
{
|
||||
ret = M2M_ERR_FAIL;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @fn spi_flash_rdid
|
||||
* @brief Read SPI Flash ID
|
||||
* @return SPI FLash ID
|
||||
*/
|
||||
static uint32_t spi_flash_rdid(void)
|
||||
{
|
||||
unsigned char cmd[1];
|
||||
uint32_t reg = 0;
|
||||
uint32_t cnt = 0;
|
||||
int8_t ret = M2M_SUCCESS;
|
||||
|
||||
cmd[0] = 0x9f;
|
||||
|
||||
ret += nm_write_reg(SPI_FLASH_DATA_CNT, 4);
|
||||
ret += nm_write_reg(SPI_FLASH_BUF1, cmd[0]);
|
||||
ret += nm_write_reg(SPI_FLASH_BUF_DIR, 0x1);
|
||||
ret += nm_write_reg(SPI_FLASH_DMA_ADDR, DUMMY_REGISTER);
|
||||
ret += nm_write_reg(SPI_FLASH_CMD_CNT, 1 | (1<<7));
|
||||
do
|
||||
{
|
||||
ret += nm_read_reg_with_ret(SPI_FLASH_TR_DONE, (uint32_t *)®);
|
||||
if(M2M_SUCCESS != ret) break;
|
||||
if(++cnt > 500)
|
||||
{
|
||||
ret = M2M_ERR_INIT;
|
||||
break;
|
||||
}
|
||||
}
|
||||
while(reg != 1);
|
||||
reg = (M2M_SUCCESS == ret)?(nm_read_reg(DUMMY_REGISTER)):(0);
|
||||
M2M_PRINT("Flash ID %x \n", (unsigned int)reg);
|
||||
return reg;
|
||||
}
|
||||
|
||||
/**
|
||||
* @fn spi_flash_unlock
|
||||
* @brief Unlock SPI Flash
|
||||
*/
|
||||
#if 0
|
||||
static void spi_flash_unlock(void)
|
||||
{
|
||||
uint8_t tmp;
|
||||
tmp = spi_flash_read_security_reg();
|
||||
spi_flash_clear_security_flags();
|
||||
if(tmp & 0x80)
|
||||
{
|
||||
spi_flash_write_enable();
|
||||
spi_flash_gang_unblock();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/*********************************************/
|
||||
/* GLOBAL FUNCTIONS */
|
||||
/*********************************************/
|
||||
|
||||
/**
|
||||
* @fn spi_flash_read
|
||||
* @brief Read from data from SPI flash
|
||||
* @param[OUT] pu8Buf
|
||||
* Pointer to data buffer
|
||||
* @param[IN] u32offset
|
||||
* Address to read from at the SPI flash
|
||||
* @param[IN] u32Sz
|
||||
* Data size
|
||||
* @return Status of execution
|
||||
* @note Data size is limited by the SPI flash size only
|
||||
*/
|
||||
int8_t spi_flash_read(uint8_t *pu8Buf, uint32_t u32offset, uint32_t u32Sz)
|
||||
{
|
||||
int8_t ret = M2M_SUCCESS;
|
||||
if(u32Sz > FLASH_BLOCK_SIZE)
|
||||
{
|
||||
do
|
||||
{
|
||||
ret = spi_flash_read_internal(pu8Buf, u32offset, FLASH_BLOCK_SIZE);
|
||||
if(M2M_SUCCESS != ret) goto ERR;
|
||||
u32Sz -= FLASH_BLOCK_SIZE;
|
||||
u32offset += FLASH_BLOCK_SIZE;
|
||||
pu8Buf += FLASH_BLOCK_SIZE;
|
||||
} while(u32Sz > FLASH_BLOCK_SIZE);
|
||||
}
|
||||
|
||||
ret = spi_flash_read_internal(pu8Buf, u32offset, u32Sz);
|
||||
|
||||
ERR:
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @fn spi_flash_write
|
||||
* @brief Program SPI flash
|
||||
* @param[IN] pu8Buf
|
||||
* Pointer to data buffer
|
||||
* @param[IN] u32Offset
|
||||
* Address to write to at the SPI flash
|
||||
* @param[IN] u32Sz
|
||||
* Data size
|
||||
* @return Status of execution
|
||||
*/
|
||||
int8_t spi_flash_write(uint8_t *pu8Buf, uint32_t u32Offset, uint32_t u32Sz)
|
||||
{
|
||||
#ifdef PROFILING
|
||||
uint32_t t1 = 0;
|
||||
uint32_t percent =0;
|
||||
uint32_t tpercent =0;
|
||||
#endif
|
||||
int8_t ret = M2M_SUCCESS;
|
||||
uint32_t u32wsz;
|
||||
uint32_t u32off;
|
||||
uint32_t u32Blksz;
|
||||
u32Blksz = FLASH_PAGE_SZ;
|
||||
u32off = u32Offset % u32Blksz;
|
||||
#ifdef PROFILING
|
||||
tpercent = (u32Sz/u32Blksz)+((u32Sz%u32Blksz)>0);
|
||||
t1 = nm_bsp_get_tick();
|
||||
M2M_PRINT(">Start programming...\r\n");
|
||||
#endif
|
||||
if(u32Sz<=0)
|
||||
{
|
||||
M2M_ERR("Data size = %d", (int)u32Sz);
|
||||
ret = M2M_ERR_FAIL;
|
||||
goto ERR;
|
||||
}
|
||||
|
||||
if(u32off) /*first part of data in the address page*/
|
||||
{
|
||||
u32wsz = u32Blksz - u32off;
|
||||
if(spi_flash_pp(u32Offset, pu8Buf, (uint16_t)BSP_MIN(u32Sz, u32wsz))!=M2M_SUCCESS)
|
||||
{
|
||||
ret = M2M_ERR_FAIL;
|
||||
goto ERR;
|
||||
}
|
||||
if(u32Sz < u32wsz) goto EXIT;
|
||||
pu8Buf += u32wsz;
|
||||
u32Offset += u32wsz;
|
||||
u32Sz -= u32wsz;
|
||||
}
|
||||
while(u32Sz > 0)
|
||||
{
|
||||
u32wsz = BSP_MIN(u32Sz, u32Blksz);
|
||||
|
||||
/*write complete page or the remaining data*/
|
||||
if(spi_flash_pp(u32Offset, pu8Buf, (uint16_t)u32wsz)!=M2M_SUCCESS)
|
||||
{
|
||||
ret = M2M_ERR_FAIL;
|
||||
goto ERR;
|
||||
}
|
||||
pu8Buf += u32wsz;
|
||||
u32Offset += u32wsz;
|
||||
u32Sz -= u32wsz;
|
||||
#ifdef PROFILING
|
||||
percent++;
|
||||
printf("\r>Complete Percentage = %d%%.\r", ((percent*100)/tpercent));
|
||||
#endif
|
||||
}
|
||||
EXIT:
|
||||
#ifdef PROFILING
|
||||
M2M_PRINT("\rDone\t\t\t\t\t\t");
|
||||
M2M_PRINT("\n#Programming time = %f sec\n\r", (nm_bsp_get_tick() - t1)/1000.0);
|
||||
#endif
|
||||
ERR:
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @fn spi_flash_erase
|
||||
* @brief Erase from data from SPI flash
|
||||
* @param[IN] u32Offset
|
||||
* Address to write to at the SPI flash
|
||||
* @param[IN] u32Sz
|
||||
* Data size
|
||||
* @return Status of execution
|
||||
* @note Data size is limited by the SPI flash size only
|
||||
*/
|
||||
int8_t spi_flash_erase(uint32_t u32Offset, uint32_t u32Sz)
|
||||
{
|
||||
uint32_t i = 0;
|
||||
uint8_t tmp = 0;
|
||||
int p;
|
||||
int j;
|
||||
int x;
|
||||
|
||||
#ifdef PROFILING
|
||||
uint32_t t;
|
||||
t = nm_bsp_get_tick();
|
||||
#endif
|
||||
M2M_DBG("\r\n>Start erasing...\r\n");
|
||||
for(i = u32Offset; i < (u32Sz +u32Offset); i += (16*FLASH_PAGE_SZ))
|
||||
{
|
||||
for(j = 0, p = 0; (j < MAX_RETRY) && (p < MAX_PROG_CNT); j++)
|
||||
{
|
||||
if((spi_flash_write_enable() == M2M_SUCCESS) &&
|
||||
(spi_flash_read_status_reg(&tmp) == M2M_SUCCESS) &&
|
||||
(spi_flash_sector_erase(i) == M2M_SUCCESS) &&
|
||||
(spi_flash_read_status_reg(&tmp) == M2M_SUCCESS))
|
||||
{
|
||||
x = 0;
|
||||
while(++x < MAX_ATTEMPT_STATUS_READ)
|
||||
{
|
||||
if(spi_flash_read_status_reg(&tmp) != M2M_SUCCESS)
|
||||
{
|
||||
break;
|
||||
}
|
||||
if(!(tmp & 0x01))
|
||||
{
|
||||
p++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(p != MAX_PROG_CNT)
|
||||
{
|
||||
return M2M_ERR_FAIL;
|
||||
}
|
||||
}
|
||||
M2M_DBG("Done\r\n");
|
||||
#ifdef PROFILING
|
||||
M2M_PRINT("#Erase time = %f sec\n", (nm_bsp_get_tick()-t)/1000.0);
|
||||
#endif
|
||||
return M2M_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @fn spi_flash_get_size
|
||||
* @brief Get size of SPI Flash
|
||||
* @return Size of Flash
|
||||
*/
|
||||
uint32_t spi_flash_get_size(void)
|
||||
{
|
||||
uint32_t u32FlashId = 0, u32FlashPwr = 0;
|
||||
static uint32_t gu32InternalFlashSize= 0;
|
||||
|
||||
if(!gu32InternalFlashSize)
|
||||
{
|
||||
u32FlashId = spi_flash_rdid();//spi_flash_probe();
|
||||
if(u32FlashId != 0xffffffff)
|
||||
{
|
||||
/*flash size is the third byte from the FLASH RDID*/
|
||||
u32FlashPwr = ((u32FlashId>>16)&0xff) - 0x11; /*2MBIT is the min*/
|
||||
/*That number power 2 to get the flash size*/
|
||||
gu32InternalFlashSize = 1<<u32FlashPwr;
|
||||
M2M_INFO("Flash Size %lu Mb\r\n", gu32InternalFlashSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
M2M_ERR("Can't detect Flash size\r\n");
|
||||
}
|
||||
}
|
||||
|
||||
return gu32InternalFlashSize;
|
||||
}
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -57,17 +57,17 @@ OBJECTDIR=build/${CND_CONF}/${IMAGE_TYPE}
|
||||
DISTDIR=dist/${CND_CONF}/${IMAGE_TYPE}
|
||||
|
||||
# Source Files Quoted if spaced
|
||||
SOURCEFILES_QUOTED_IF_SPACED=Source/ChaletduinoV2Board.c Source/winc3400/bsp/source/nm_bsp.c Source/winc3400/bus_wrapper/source/nm_bus_wrapper.c Source/winc3400/common/source/nm_common.c Source/winc3400/driver/source/m2m_ate_mode.c Source/winc3400/driver/source/m2m_crypto.c Source/winc3400/driver/source/m2m_hif.c Source/winc3400/driver/source/m2m_ota.c Source/winc3400/driver/source/m2m_periph.c Source/winc3400/driver/source/m2m_ssl.c Source/winc3400/driver/source/m2m_wifi.c Source/winc3400/driver/source/nmasic.c Source/winc3400/driver/source/nmbus.c Source/winc3400/driver/source/nmdrv.c Source/winc3400/driver/source/nmi2c.c Source/winc3400/driver/source/nmspi.c Source/winc3400/driver/source/nmuart.c Source/winc3400/socket/source/socket.c Source/winc3400/spi_flash/source/spi_flash.c Source/winc3400/winc_init.c Source/DigitalIO.c Source/InternalUart.c Source/NetworkProtocol.c Source/Terminal.c Source/Uart.c Source/Util.c Source/exceptions.c Source/interrupts.c Source/main.c Source/system.c Source/template.c Source/timer.c Source/WiFiCtrl.c Source/SPI.c Source/LoraNetworkInterface.c Source/ChaletPowerRelay.c Source/HarakiriRelay.c Source/BatteryMonitor.c Source/ina219.c Source/I2C.c Source/SPI_Flash.c Source/Syslog.c Source/Watchdog.c Source/BootloaderInterface.c Source/TemperatureSensor.c Source/TC77.c Source/BootloaderProtocol.c Source/crc32.c Source/LoraWatchdog.c
|
||||
SOURCEFILES_QUOTED_IF_SPACED=Source/ChaletduinoV2Board.c Source/winc3400_142/common/source/nm_common.c Source/winc3400_142/driver/source/m2m_flash.c Source/winc3400_142/driver/source/m2m_hif.c Source/winc3400_142/driver/source/m2m_ota.c Source/winc3400_142/driver/source/m2m_periph.c Source/winc3400_142/driver/source/m2m_ssl.c Source/winc3400_142/driver/source/m2m_wifi.c Source/winc3400_142/driver/source/nmasic.c Source/winc3400_142/driver/source/nmbus.c Source/winc3400_142/driver/source/nmdrv.c Source/winc3400_142/driver/source/nmspi.c Source/winc3400_142/socket/source/inet_addr.c Source/winc3400_142/socket/source/inet_ntop.c Source/winc3400_142/socket/source/socket.c Source/winc3400_142/spi_flash/source/spi_flash.c Source/DigitalIO.c Source/InternalUart.c Source/NetworkProtocol.c Source/Terminal.c Source/Uart.c Source/Util.c Source/exceptions.c Source/interrupts.c Source/main.c Source/system.c Source/template.c Source/timer.c Source/WiFiCtrl.c Source/SPI.c Source/LoraNetworkInterface.c Source/ChaletPowerRelay.c Source/HarakiriRelay.c Source/BatteryMonitor.c Source/ina219.c Source/I2C.c Source/SPI_Flash.c Source/Syslog.c Source/Watchdog.c Source/BootloaderInterface.c Source/TemperatureSensor.c Source/TC77.c Source/BootloaderProtocol.c Source/crc32.c Source/LoraWatchdog.c
|
||||
|
||||
# Object Files Quoted if spaced
|
||||
OBJECTFILES_QUOTED_IF_SPACED=${OBJECTDIR}/Source/ChaletduinoV2Board.o ${OBJECTDIR}/Source/winc3400/bsp/source/nm_bsp.o ${OBJECTDIR}/Source/winc3400/bus_wrapper/source/nm_bus_wrapper.o ${OBJECTDIR}/Source/winc3400/common/source/nm_common.o ${OBJECTDIR}/Source/winc3400/driver/source/m2m_ate_mode.o ${OBJECTDIR}/Source/winc3400/driver/source/m2m_crypto.o ${OBJECTDIR}/Source/winc3400/driver/source/m2m_hif.o ${OBJECTDIR}/Source/winc3400/driver/source/m2m_ota.o ${OBJECTDIR}/Source/winc3400/driver/source/m2m_periph.o ${OBJECTDIR}/Source/winc3400/driver/source/m2m_ssl.o ${OBJECTDIR}/Source/winc3400/driver/source/m2m_wifi.o ${OBJECTDIR}/Source/winc3400/driver/source/nmasic.o ${OBJECTDIR}/Source/winc3400/driver/source/nmbus.o ${OBJECTDIR}/Source/winc3400/driver/source/nmdrv.o ${OBJECTDIR}/Source/winc3400/driver/source/nmi2c.o ${OBJECTDIR}/Source/winc3400/driver/source/nmspi.o ${OBJECTDIR}/Source/winc3400/driver/source/nmuart.o ${OBJECTDIR}/Source/winc3400/socket/source/socket.o ${OBJECTDIR}/Source/winc3400/spi_flash/source/spi_flash.o ${OBJECTDIR}/Source/winc3400/winc_init.o ${OBJECTDIR}/Source/DigitalIO.o ${OBJECTDIR}/Source/InternalUart.o ${OBJECTDIR}/Source/NetworkProtocol.o ${OBJECTDIR}/Source/Terminal.o ${OBJECTDIR}/Source/Uart.o ${OBJECTDIR}/Source/Util.o ${OBJECTDIR}/Source/exceptions.o ${OBJECTDIR}/Source/interrupts.o ${OBJECTDIR}/Source/main.o ${OBJECTDIR}/Source/system.o ${OBJECTDIR}/Source/template.o ${OBJECTDIR}/Source/timer.o ${OBJECTDIR}/Source/WiFiCtrl.o ${OBJECTDIR}/Source/SPI.o ${OBJECTDIR}/Source/LoraNetworkInterface.o ${OBJECTDIR}/Source/ChaletPowerRelay.o ${OBJECTDIR}/Source/HarakiriRelay.o ${OBJECTDIR}/Source/BatteryMonitor.o ${OBJECTDIR}/Source/ina219.o ${OBJECTDIR}/Source/I2C.o ${OBJECTDIR}/Source/SPI_Flash.o ${OBJECTDIR}/Source/Syslog.o ${OBJECTDIR}/Source/Watchdog.o ${OBJECTDIR}/Source/BootloaderInterface.o ${OBJECTDIR}/Source/TemperatureSensor.o ${OBJECTDIR}/Source/TC77.o ${OBJECTDIR}/Source/BootloaderProtocol.o ${OBJECTDIR}/Source/crc32.o ${OBJECTDIR}/Source/LoraWatchdog.o
|
||||
POSSIBLE_DEPFILES=${OBJECTDIR}/Source/ChaletduinoV2Board.o.d ${OBJECTDIR}/Source/winc3400/bsp/source/nm_bsp.o.d ${OBJECTDIR}/Source/winc3400/bus_wrapper/source/nm_bus_wrapper.o.d ${OBJECTDIR}/Source/winc3400/common/source/nm_common.o.d ${OBJECTDIR}/Source/winc3400/driver/source/m2m_ate_mode.o.d ${OBJECTDIR}/Source/winc3400/driver/source/m2m_crypto.o.d ${OBJECTDIR}/Source/winc3400/driver/source/m2m_hif.o.d ${OBJECTDIR}/Source/winc3400/driver/source/m2m_ota.o.d ${OBJECTDIR}/Source/winc3400/driver/source/m2m_periph.o.d ${OBJECTDIR}/Source/winc3400/driver/source/m2m_ssl.o.d ${OBJECTDIR}/Source/winc3400/driver/source/m2m_wifi.o.d ${OBJECTDIR}/Source/winc3400/driver/source/nmasic.o.d ${OBJECTDIR}/Source/winc3400/driver/source/nmbus.o.d ${OBJECTDIR}/Source/winc3400/driver/source/nmdrv.o.d ${OBJECTDIR}/Source/winc3400/driver/source/nmi2c.o.d ${OBJECTDIR}/Source/winc3400/driver/source/nmspi.o.d ${OBJECTDIR}/Source/winc3400/driver/source/nmuart.o.d ${OBJECTDIR}/Source/winc3400/socket/source/socket.o.d ${OBJECTDIR}/Source/winc3400/spi_flash/source/spi_flash.o.d ${OBJECTDIR}/Source/winc3400/winc_init.o.d ${OBJECTDIR}/Source/DigitalIO.o.d ${OBJECTDIR}/Source/InternalUart.o.d ${OBJECTDIR}/Source/NetworkProtocol.o.d ${OBJECTDIR}/Source/Terminal.o.d ${OBJECTDIR}/Source/Uart.o.d ${OBJECTDIR}/Source/Util.o.d ${OBJECTDIR}/Source/exceptions.o.d ${OBJECTDIR}/Source/interrupts.o.d ${OBJECTDIR}/Source/main.o.d ${OBJECTDIR}/Source/system.o.d ${OBJECTDIR}/Source/template.o.d ${OBJECTDIR}/Source/timer.o.d ${OBJECTDIR}/Source/WiFiCtrl.o.d ${OBJECTDIR}/Source/SPI.o.d ${OBJECTDIR}/Source/LoraNetworkInterface.o.d ${OBJECTDIR}/Source/ChaletPowerRelay.o.d ${OBJECTDIR}/Source/HarakiriRelay.o.d ${OBJECTDIR}/Source/BatteryMonitor.o.d ${OBJECTDIR}/Source/ina219.o.d ${OBJECTDIR}/Source/I2C.o.d ${OBJECTDIR}/Source/SPI_Flash.o.d ${OBJECTDIR}/Source/Syslog.o.d ${OBJECTDIR}/Source/Watchdog.o.d ${OBJECTDIR}/Source/BootloaderInterface.o.d ${OBJECTDIR}/Source/TemperatureSensor.o.d ${OBJECTDIR}/Source/TC77.o.d ${OBJECTDIR}/Source/BootloaderProtocol.o.d ${OBJECTDIR}/Source/crc32.o.d ${OBJECTDIR}/Source/LoraWatchdog.o.d
|
||||
OBJECTFILES_QUOTED_IF_SPACED=${OBJECTDIR}/Source/ChaletduinoV2Board.o ${OBJECTDIR}/Source/winc3400_142/common/source/nm_common.o ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_flash.o ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_hif.o ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_ota.o ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_periph.o ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_ssl.o ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_wifi.o ${OBJECTDIR}/Source/winc3400_142/driver/source/nmasic.o ${OBJECTDIR}/Source/winc3400_142/driver/source/nmbus.o ${OBJECTDIR}/Source/winc3400_142/driver/source/nmdrv.o ${OBJECTDIR}/Source/winc3400_142/driver/source/nmspi.o ${OBJECTDIR}/Source/winc3400_142/socket/source/inet_addr.o ${OBJECTDIR}/Source/winc3400_142/socket/source/inet_ntop.o ${OBJECTDIR}/Source/winc3400_142/socket/source/socket.o ${OBJECTDIR}/Source/winc3400_142/spi_flash/source/spi_flash.o ${OBJECTDIR}/Source/DigitalIO.o ${OBJECTDIR}/Source/InternalUart.o ${OBJECTDIR}/Source/NetworkProtocol.o ${OBJECTDIR}/Source/Terminal.o ${OBJECTDIR}/Source/Uart.o ${OBJECTDIR}/Source/Util.o ${OBJECTDIR}/Source/exceptions.o ${OBJECTDIR}/Source/interrupts.o ${OBJECTDIR}/Source/main.o ${OBJECTDIR}/Source/system.o ${OBJECTDIR}/Source/template.o ${OBJECTDIR}/Source/timer.o ${OBJECTDIR}/Source/WiFiCtrl.o ${OBJECTDIR}/Source/SPI.o ${OBJECTDIR}/Source/LoraNetworkInterface.o ${OBJECTDIR}/Source/ChaletPowerRelay.o ${OBJECTDIR}/Source/HarakiriRelay.o ${OBJECTDIR}/Source/BatteryMonitor.o ${OBJECTDIR}/Source/ina219.o ${OBJECTDIR}/Source/I2C.o ${OBJECTDIR}/Source/SPI_Flash.o ${OBJECTDIR}/Source/Syslog.o ${OBJECTDIR}/Source/Watchdog.o ${OBJECTDIR}/Source/BootloaderInterface.o ${OBJECTDIR}/Source/TemperatureSensor.o ${OBJECTDIR}/Source/TC77.o ${OBJECTDIR}/Source/BootloaderProtocol.o ${OBJECTDIR}/Source/crc32.o ${OBJECTDIR}/Source/LoraWatchdog.o
|
||||
POSSIBLE_DEPFILES=${OBJECTDIR}/Source/ChaletduinoV2Board.o.d ${OBJECTDIR}/Source/winc3400_142/common/source/nm_common.o.d ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_flash.o.d ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_hif.o.d ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_ota.o.d ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_periph.o.d ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_ssl.o.d ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_wifi.o.d ${OBJECTDIR}/Source/winc3400_142/driver/source/nmasic.o.d ${OBJECTDIR}/Source/winc3400_142/driver/source/nmbus.o.d ${OBJECTDIR}/Source/winc3400_142/driver/source/nmdrv.o.d ${OBJECTDIR}/Source/winc3400_142/driver/source/nmspi.o.d ${OBJECTDIR}/Source/winc3400_142/socket/source/inet_addr.o.d ${OBJECTDIR}/Source/winc3400_142/socket/source/inet_ntop.o.d ${OBJECTDIR}/Source/winc3400_142/socket/source/socket.o.d ${OBJECTDIR}/Source/winc3400_142/spi_flash/source/spi_flash.o.d ${OBJECTDIR}/Source/DigitalIO.o.d ${OBJECTDIR}/Source/InternalUart.o.d ${OBJECTDIR}/Source/NetworkProtocol.o.d ${OBJECTDIR}/Source/Terminal.o.d ${OBJECTDIR}/Source/Uart.o.d ${OBJECTDIR}/Source/Util.o.d ${OBJECTDIR}/Source/exceptions.o.d ${OBJECTDIR}/Source/interrupts.o.d ${OBJECTDIR}/Source/main.o.d ${OBJECTDIR}/Source/system.o.d ${OBJECTDIR}/Source/template.o.d ${OBJECTDIR}/Source/timer.o.d ${OBJECTDIR}/Source/WiFiCtrl.o.d ${OBJECTDIR}/Source/SPI.o.d ${OBJECTDIR}/Source/LoraNetworkInterface.o.d ${OBJECTDIR}/Source/ChaletPowerRelay.o.d ${OBJECTDIR}/Source/HarakiriRelay.o.d ${OBJECTDIR}/Source/BatteryMonitor.o.d ${OBJECTDIR}/Source/ina219.o.d ${OBJECTDIR}/Source/I2C.o.d ${OBJECTDIR}/Source/SPI_Flash.o.d ${OBJECTDIR}/Source/Syslog.o.d ${OBJECTDIR}/Source/Watchdog.o.d ${OBJECTDIR}/Source/BootloaderInterface.o.d ${OBJECTDIR}/Source/TemperatureSensor.o.d ${OBJECTDIR}/Source/TC77.o.d ${OBJECTDIR}/Source/BootloaderProtocol.o.d ${OBJECTDIR}/Source/crc32.o.d ${OBJECTDIR}/Source/LoraWatchdog.o.d
|
||||
|
||||
# Object Files
|
||||
OBJECTFILES=${OBJECTDIR}/Source/ChaletduinoV2Board.o ${OBJECTDIR}/Source/winc3400/bsp/source/nm_bsp.o ${OBJECTDIR}/Source/winc3400/bus_wrapper/source/nm_bus_wrapper.o ${OBJECTDIR}/Source/winc3400/common/source/nm_common.o ${OBJECTDIR}/Source/winc3400/driver/source/m2m_ate_mode.o ${OBJECTDIR}/Source/winc3400/driver/source/m2m_crypto.o ${OBJECTDIR}/Source/winc3400/driver/source/m2m_hif.o ${OBJECTDIR}/Source/winc3400/driver/source/m2m_ota.o ${OBJECTDIR}/Source/winc3400/driver/source/m2m_periph.o ${OBJECTDIR}/Source/winc3400/driver/source/m2m_ssl.o ${OBJECTDIR}/Source/winc3400/driver/source/m2m_wifi.o ${OBJECTDIR}/Source/winc3400/driver/source/nmasic.o ${OBJECTDIR}/Source/winc3400/driver/source/nmbus.o ${OBJECTDIR}/Source/winc3400/driver/source/nmdrv.o ${OBJECTDIR}/Source/winc3400/driver/source/nmi2c.o ${OBJECTDIR}/Source/winc3400/driver/source/nmspi.o ${OBJECTDIR}/Source/winc3400/driver/source/nmuart.o ${OBJECTDIR}/Source/winc3400/socket/source/socket.o ${OBJECTDIR}/Source/winc3400/spi_flash/source/spi_flash.o ${OBJECTDIR}/Source/winc3400/winc_init.o ${OBJECTDIR}/Source/DigitalIO.o ${OBJECTDIR}/Source/InternalUart.o ${OBJECTDIR}/Source/NetworkProtocol.o ${OBJECTDIR}/Source/Terminal.o ${OBJECTDIR}/Source/Uart.o ${OBJECTDIR}/Source/Util.o ${OBJECTDIR}/Source/exceptions.o ${OBJECTDIR}/Source/interrupts.o ${OBJECTDIR}/Source/main.o ${OBJECTDIR}/Source/system.o ${OBJECTDIR}/Source/template.o ${OBJECTDIR}/Source/timer.o ${OBJECTDIR}/Source/WiFiCtrl.o ${OBJECTDIR}/Source/SPI.o ${OBJECTDIR}/Source/LoraNetworkInterface.o ${OBJECTDIR}/Source/ChaletPowerRelay.o ${OBJECTDIR}/Source/HarakiriRelay.o ${OBJECTDIR}/Source/BatteryMonitor.o ${OBJECTDIR}/Source/ina219.o ${OBJECTDIR}/Source/I2C.o ${OBJECTDIR}/Source/SPI_Flash.o ${OBJECTDIR}/Source/Syslog.o ${OBJECTDIR}/Source/Watchdog.o ${OBJECTDIR}/Source/BootloaderInterface.o ${OBJECTDIR}/Source/TemperatureSensor.o ${OBJECTDIR}/Source/TC77.o ${OBJECTDIR}/Source/BootloaderProtocol.o ${OBJECTDIR}/Source/crc32.o ${OBJECTDIR}/Source/LoraWatchdog.o
|
||||
OBJECTFILES=${OBJECTDIR}/Source/ChaletduinoV2Board.o ${OBJECTDIR}/Source/winc3400_142/common/source/nm_common.o ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_flash.o ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_hif.o ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_ota.o ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_periph.o ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_ssl.o ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_wifi.o ${OBJECTDIR}/Source/winc3400_142/driver/source/nmasic.o ${OBJECTDIR}/Source/winc3400_142/driver/source/nmbus.o ${OBJECTDIR}/Source/winc3400_142/driver/source/nmdrv.o ${OBJECTDIR}/Source/winc3400_142/driver/source/nmspi.o ${OBJECTDIR}/Source/winc3400_142/socket/source/inet_addr.o ${OBJECTDIR}/Source/winc3400_142/socket/source/inet_ntop.o ${OBJECTDIR}/Source/winc3400_142/socket/source/socket.o ${OBJECTDIR}/Source/winc3400_142/spi_flash/source/spi_flash.o ${OBJECTDIR}/Source/DigitalIO.o ${OBJECTDIR}/Source/InternalUart.o ${OBJECTDIR}/Source/NetworkProtocol.o ${OBJECTDIR}/Source/Terminal.o ${OBJECTDIR}/Source/Uart.o ${OBJECTDIR}/Source/Util.o ${OBJECTDIR}/Source/exceptions.o ${OBJECTDIR}/Source/interrupts.o ${OBJECTDIR}/Source/main.o ${OBJECTDIR}/Source/system.o ${OBJECTDIR}/Source/template.o ${OBJECTDIR}/Source/timer.o ${OBJECTDIR}/Source/WiFiCtrl.o ${OBJECTDIR}/Source/SPI.o ${OBJECTDIR}/Source/LoraNetworkInterface.o ${OBJECTDIR}/Source/ChaletPowerRelay.o ${OBJECTDIR}/Source/HarakiriRelay.o ${OBJECTDIR}/Source/BatteryMonitor.o ${OBJECTDIR}/Source/ina219.o ${OBJECTDIR}/Source/I2C.o ${OBJECTDIR}/Source/SPI_Flash.o ${OBJECTDIR}/Source/Syslog.o ${OBJECTDIR}/Source/Watchdog.o ${OBJECTDIR}/Source/BootloaderInterface.o ${OBJECTDIR}/Source/TemperatureSensor.o ${OBJECTDIR}/Source/TC77.o ${OBJECTDIR}/Source/BootloaderProtocol.o ${OBJECTDIR}/Source/crc32.o ${OBJECTDIR}/Source/LoraWatchdog.o
|
||||
|
||||
# Source Files
|
||||
SOURCEFILES=Source/ChaletduinoV2Board.c Source/winc3400/bsp/source/nm_bsp.c Source/winc3400/bus_wrapper/source/nm_bus_wrapper.c Source/winc3400/common/source/nm_common.c Source/winc3400/driver/source/m2m_ate_mode.c Source/winc3400/driver/source/m2m_crypto.c Source/winc3400/driver/source/m2m_hif.c Source/winc3400/driver/source/m2m_ota.c Source/winc3400/driver/source/m2m_periph.c Source/winc3400/driver/source/m2m_ssl.c Source/winc3400/driver/source/m2m_wifi.c Source/winc3400/driver/source/nmasic.c Source/winc3400/driver/source/nmbus.c Source/winc3400/driver/source/nmdrv.c Source/winc3400/driver/source/nmi2c.c Source/winc3400/driver/source/nmspi.c Source/winc3400/driver/source/nmuart.c Source/winc3400/socket/source/socket.c Source/winc3400/spi_flash/source/spi_flash.c Source/winc3400/winc_init.c Source/DigitalIO.c Source/InternalUart.c Source/NetworkProtocol.c Source/Terminal.c Source/Uart.c Source/Util.c Source/exceptions.c Source/interrupts.c Source/main.c Source/system.c Source/template.c Source/timer.c Source/WiFiCtrl.c Source/SPI.c Source/LoraNetworkInterface.c Source/ChaletPowerRelay.c Source/HarakiriRelay.c Source/BatteryMonitor.c Source/ina219.c Source/I2C.c Source/SPI_Flash.c Source/Syslog.c Source/Watchdog.c Source/BootloaderInterface.c Source/TemperatureSensor.c Source/TC77.c Source/BootloaderProtocol.c Source/crc32.c Source/LoraWatchdog.c
|
||||
SOURCEFILES=Source/ChaletduinoV2Board.c Source/winc3400_142/common/source/nm_common.c Source/winc3400_142/driver/source/m2m_flash.c Source/winc3400_142/driver/source/m2m_hif.c Source/winc3400_142/driver/source/m2m_ota.c Source/winc3400_142/driver/source/m2m_periph.c Source/winc3400_142/driver/source/m2m_ssl.c Source/winc3400_142/driver/source/m2m_wifi.c Source/winc3400_142/driver/source/nmasic.c Source/winc3400_142/driver/source/nmbus.c Source/winc3400_142/driver/source/nmdrv.c Source/winc3400_142/driver/source/nmspi.c Source/winc3400_142/socket/source/inet_addr.c Source/winc3400_142/socket/source/inet_ntop.c Source/winc3400_142/socket/source/socket.c Source/winc3400_142/spi_flash/source/spi_flash.c Source/DigitalIO.c Source/InternalUart.c Source/NetworkProtocol.c Source/Terminal.c Source/Uart.c Source/Util.c Source/exceptions.c Source/interrupts.c Source/main.c Source/system.c Source/template.c Source/timer.c Source/WiFiCtrl.c Source/SPI.c Source/LoraNetworkInterface.c Source/ChaletPowerRelay.c Source/HarakiriRelay.c Source/BatteryMonitor.c Source/ina219.c Source/I2C.c Source/SPI_Flash.c Source/Syslog.c Source/Watchdog.c Source/BootloaderInterface.c Source/TemperatureSensor.c Source/TC77.c Source/BootloaderProtocol.c Source/crc32.c Source/LoraWatchdog.c
|
||||
|
||||
|
||||
|
||||
@ -111,343 +111,315 @@ ${OBJECTDIR}/Source/ChaletduinoV2Board.o: Source/ChaletduinoV2Board.c nbproject
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/ChaletduinoV2Board.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/ChaletduinoV2Board.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/ChaletduinoV2Board.o.d" -o ${OBJECTDIR}/Source/ChaletduinoV2Board.o Source/ChaletduinoV2Board.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/ChaletduinoV2Board.o.d" -o ${OBJECTDIR}/Source/ChaletduinoV2Board.o Source/ChaletduinoV2Board.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/ChaletduinoV2Board.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/winc3400/bsp/source/nm_bsp.o: Source/winc3400/bsp/source/nm_bsp.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400/bsp/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/bsp/source/nm_bsp.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/bsp/source/nm_bsp.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400/bsp/source/nm_bsp.o.d" -o ${OBJECTDIR}/Source/winc3400/bsp/source/nm_bsp.o Source/winc3400/bsp/source/nm_bsp.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400/bsp/source/nm_bsp.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
${OBJECTDIR}/Source/winc3400_142/common/source/nm_common.o: Source/winc3400_142/common/source/nm_common.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400_142/common/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/common/source/nm_common.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/common/source/nm_common.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400_142/common/source/nm_common.o.d" -o ${OBJECTDIR}/Source/winc3400_142/common/source/nm_common.o Source/winc3400_142/common/source/nm_common.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400_142/common/source/nm_common.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/winc3400/bus_wrapper/source/nm_bus_wrapper.o: Source/winc3400/bus_wrapper/source/nm_bus_wrapper.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400/bus_wrapper/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/bus_wrapper/source/nm_bus_wrapper.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/bus_wrapper/source/nm_bus_wrapper.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400/bus_wrapper/source/nm_bus_wrapper.o.d" -o ${OBJECTDIR}/Source/winc3400/bus_wrapper/source/nm_bus_wrapper.o Source/winc3400/bus_wrapper/source/nm_bus_wrapper.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400/bus_wrapper/source/nm_bus_wrapper.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_flash.o: Source/winc3400_142/driver/source/m2m_flash.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400_142/driver/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_flash.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_flash.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_flash.o.d" -o ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_flash.o Source/winc3400_142/driver/source/m2m_flash.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_flash.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/winc3400/common/source/nm_common.o: Source/winc3400/common/source/nm_common.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400/common/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/common/source/nm_common.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/common/source/nm_common.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400/common/source/nm_common.o.d" -o ${OBJECTDIR}/Source/winc3400/common/source/nm_common.o Source/winc3400/common/source/nm_common.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400/common/source/nm_common.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_hif.o: Source/winc3400_142/driver/source/m2m_hif.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400_142/driver/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_hif.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_hif.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_hif.o.d" -o ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_hif.o Source/winc3400_142/driver/source/m2m_hif.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_hif.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/winc3400/driver/source/m2m_ate_mode.o: Source/winc3400/driver/source/m2m_ate_mode.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400/driver/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/m2m_ate_mode.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/m2m_ate_mode.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400/driver/source/m2m_ate_mode.o.d" -o ${OBJECTDIR}/Source/winc3400/driver/source/m2m_ate_mode.o Source/winc3400/driver/source/m2m_ate_mode.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400/driver/source/m2m_ate_mode.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_ota.o: Source/winc3400_142/driver/source/m2m_ota.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400_142/driver/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_ota.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_ota.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_ota.o.d" -o ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_ota.o Source/winc3400_142/driver/source/m2m_ota.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_ota.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/winc3400/driver/source/m2m_crypto.o: Source/winc3400/driver/source/m2m_crypto.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400/driver/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/m2m_crypto.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/m2m_crypto.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400/driver/source/m2m_crypto.o.d" -o ${OBJECTDIR}/Source/winc3400/driver/source/m2m_crypto.o Source/winc3400/driver/source/m2m_crypto.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400/driver/source/m2m_crypto.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_periph.o: Source/winc3400_142/driver/source/m2m_periph.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400_142/driver/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_periph.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_periph.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_periph.o.d" -o ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_periph.o Source/winc3400_142/driver/source/m2m_periph.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_periph.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/winc3400/driver/source/m2m_hif.o: Source/winc3400/driver/source/m2m_hif.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400/driver/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/m2m_hif.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/m2m_hif.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400/driver/source/m2m_hif.o.d" -o ${OBJECTDIR}/Source/winc3400/driver/source/m2m_hif.o Source/winc3400/driver/source/m2m_hif.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400/driver/source/m2m_hif.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_ssl.o: Source/winc3400_142/driver/source/m2m_ssl.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400_142/driver/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_ssl.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_ssl.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_ssl.o.d" -o ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_ssl.o Source/winc3400_142/driver/source/m2m_ssl.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_ssl.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/winc3400/driver/source/m2m_ota.o: Source/winc3400/driver/source/m2m_ota.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400/driver/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/m2m_ota.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/m2m_ota.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400/driver/source/m2m_ota.o.d" -o ${OBJECTDIR}/Source/winc3400/driver/source/m2m_ota.o Source/winc3400/driver/source/m2m_ota.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400/driver/source/m2m_ota.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_wifi.o: Source/winc3400_142/driver/source/m2m_wifi.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400_142/driver/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_wifi.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_wifi.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_wifi.o.d" -o ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_wifi.o Source/winc3400_142/driver/source/m2m_wifi.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_wifi.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/winc3400/driver/source/m2m_periph.o: Source/winc3400/driver/source/m2m_periph.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400/driver/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/m2m_periph.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/m2m_periph.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400/driver/source/m2m_periph.o.d" -o ${OBJECTDIR}/Source/winc3400/driver/source/m2m_periph.o Source/winc3400/driver/source/m2m_periph.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400/driver/source/m2m_periph.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
${OBJECTDIR}/Source/winc3400_142/driver/source/nmasic.o: Source/winc3400_142/driver/source/nmasic.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400_142/driver/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/driver/source/nmasic.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/driver/source/nmasic.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400_142/driver/source/nmasic.o.d" -o ${OBJECTDIR}/Source/winc3400_142/driver/source/nmasic.o Source/winc3400_142/driver/source/nmasic.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400_142/driver/source/nmasic.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/winc3400/driver/source/m2m_ssl.o: Source/winc3400/driver/source/m2m_ssl.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400/driver/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/m2m_ssl.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/m2m_ssl.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400/driver/source/m2m_ssl.o.d" -o ${OBJECTDIR}/Source/winc3400/driver/source/m2m_ssl.o Source/winc3400/driver/source/m2m_ssl.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400/driver/source/m2m_ssl.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
${OBJECTDIR}/Source/winc3400_142/driver/source/nmbus.o: Source/winc3400_142/driver/source/nmbus.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400_142/driver/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/driver/source/nmbus.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/driver/source/nmbus.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400_142/driver/source/nmbus.o.d" -o ${OBJECTDIR}/Source/winc3400_142/driver/source/nmbus.o Source/winc3400_142/driver/source/nmbus.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400_142/driver/source/nmbus.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/winc3400/driver/source/m2m_wifi.o: Source/winc3400/driver/source/m2m_wifi.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400/driver/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/m2m_wifi.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/m2m_wifi.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400/driver/source/m2m_wifi.o.d" -o ${OBJECTDIR}/Source/winc3400/driver/source/m2m_wifi.o Source/winc3400/driver/source/m2m_wifi.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400/driver/source/m2m_wifi.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
${OBJECTDIR}/Source/winc3400_142/driver/source/nmdrv.o: Source/winc3400_142/driver/source/nmdrv.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400_142/driver/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/driver/source/nmdrv.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/driver/source/nmdrv.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400_142/driver/source/nmdrv.o.d" -o ${OBJECTDIR}/Source/winc3400_142/driver/source/nmdrv.o Source/winc3400_142/driver/source/nmdrv.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400_142/driver/source/nmdrv.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/winc3400/driver/source/nmasic.o: Source/winc3400/driver/source/nmasic.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400/driver/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/nmasic.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/nmasic.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400/driver/source/nmasic.o.d" -o ${OBJECTDIR}/Source/winc3400/driver/source/nmasic.o Source/winc3400/driver/source/nmasic.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400/driver/source/nmasic.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
${OBJECTDIR}/Source/winc3400_142/driver/source/nmspi.o: Source/winc3400_142/driver/source/nmspi.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400_142/driver/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/driver/source/nmspi.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/driver/source/nmspi.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400_142/driver/source/nmspi.o.d" -o ${OBJECTDIR}/Source/winc3400_142/driver/source/nmspi.o Source/winc3400_142/driver/source/nmspi.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400_142/driver/source/nmspi.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/winc3400/driver/source/nmbus.o: Source/winc3400/driver/source/nmbus.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400/driver/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/nmbus.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/nmbus.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400/driver/source/nmbus.o.d" -o ${OBJECTDIR}/Source/winc3400/driver/source/nmbus.o Source/winc3400/driver/source/nmbus.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400/driver/source/nmbus.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
${OBJECTDIR}/Source/winc3400_142/socket/source/inet_addr.o: Source/winc3400_142/socket/source/inet_addr.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400_142/socket/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/socket/source/inet_addr.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/socket/source/inet_addr.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400_142/socket/source/inet_addr.o.d" -o ${OBJECTDIR}/Source/winc3400_142/socket/source/inet_addr.o Source/winc3400_142/socket/source/inet_addr.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400_142/socket/source/inet_addr.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/winc3400/driver/source/nmdrv.o: Source/winc3400/driver/source/nmdrv.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400/driver/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/nmdrv.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/nmdrv.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400/driver/source/nmdrv.o.d" -o ${OBJECTDIR}/Source/winc3400/driver/source/nmdrv.o Source/winc3400/driver/source/nmdrv.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400/driver/source/nmdrv.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
${OBJECTDIR}/Source/winc3400_142/socket/source/inet_ntop.o: Source/winc3400_142/socket/source/inet_ntop.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400_142/socket/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/socket/source/inet_ntop.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/socket/source/inet_ntop.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400_142/socket/source/inet_ntop.o.d" -o ${OBJECTDIR}/Source/winc3400_142/socket/source/inet_ntop.o Source/winc3400_142/socket/source/inet_ntop.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400_142/socket/source/inet_ntop.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/winc3400/driver/source/nmi2c.o: Source/winc3400/driver/source/nmi2c.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400/driver/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/nmi2c.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/nmi2c.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400/driver/source/nmi2c.o.d" -o ${OBJECTDIR}/Source/winc3400/driver/source/nmi2c.o Source/winc3400/driver/source/nmi2c.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400/driver/source/nmi2c.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
${OBJECTDIR}/Source/winc3400_142/socket/source/socket.o: Source/winc3400_142/socket/source/socket.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400_142/socket/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/socket/source/socket.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/socket/source/socket.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400_142/socket/source/socket.o.d" -o ${OBJECTDIR}/Source/winc3400_142/socket/source/socket.o Source/winc3400_142/socket/source/socket.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400_142/socket/source/socket.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/winc3400/driver/source/nmspi.o: Source/winc3400/driver/source/nmspi.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400/driver/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/nmspi.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/nmspi.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400/driver/source/nmspi.o.d" -o ${OBJECTDIR}/Source/winc3400/driver/source/nmspi.o Source/winc3400/driver/source/nmspi.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400/driver/source/nmspi.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/winc3400/driver/source/nmuart.o: Source/winc3400/driver/source/nmuart.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400/driver/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/nmuart.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/nmuart.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400/driver/source/nmuart.o.d" -o ${OBJECTDIR}/Source/winc3400/driver/source/nmuart.o Source/winc3400/driver/source/nmuart.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400/driver/source/nmuart.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/winc3400/socket/source/socket.o: Source/winc3400/socket/source/socket.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400/socket/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/socket/source/socket.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/socket/source/socket.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400/socket/source/socket.o.d" -o ${OBJECTDIR}/Source/winc3400/socket/source/socket.o Source/winc3400/socket/source/socket.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400/socket/source/socket.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/winc3400/spi_flash/source/spi_flash.o: Source/winc3400/spi_flash/source/spi_flash.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400/spi_flash/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/spi_flash/source/spi_flash.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/spi_flash/source/spi_flash.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400/spi_flash/source/spi_flash.o.d" -o ${OBJECTDIR}/Source/winc3400/spi_flash/source/spi_flash.o Source/winc3400/spi_flash/source/spi_flash.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400/spi_flash/source/spi_flash.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/winc3400/winc_init.o: Source/winc3400/winc_init.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/winc_init.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/winc_init.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400/winc_init.o.d" -o ${OBJECTDIR}/Source/winc3400/winc_init.o Source/winc3400/winc_init.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400/winc_init.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
${OBJECTDIR}/Source/winc3400_142/spi_flash/source/spi_flash.o: Source/winc3400_142/spi_flash/source/spi_flash.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400_142/spi_flash/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/spi_flash/source/spi_flash.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/spi_flash/source/spi_flash.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400_142/spi_flash/source/spi_flash.o.d" -o ${OBJECTDIR}/Source/winc3400_142/spi_flash/source/spi_flash.o Source/winc3400_142/spi_flash/source/spi_flash.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400_142/spi_flash/source/spi_flash.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/DigitalIO.o: Source/DigitalIO.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/DigitalIO.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/DigitalIO.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/DigitalIO.o.d" -o ${OBJECTDIR}/Source/DigitalIO.o Source/DigitalIO.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/DigitalIO.o.d" -o ${OBJECTDIR}/Source/DigitalIO.o Source/DigitalIO.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/DigitalIO.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/InternalUart.o: Source/InternalUart.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/InternalUart.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/InternalUart.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/InternalUart.o.d" -o ${OBJECTDIR}/Source/InternalUart.o Source/InternalUart.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/InternalUart.o.d" -o ${OBJECTDIR}/Source/InternalUart.o Source/InternalUart.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/InternalUart.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/NetworkProtocol.o: Source/NetworkProtocol.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/NetworkProtocol.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/NetworkProtocol.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/NetworkProtocol.o.d" -o ${OBJECTDIR}/Source/NetworkProtocol.o Source/NetworkProtocol.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/NetworkProtocol.o.d" -o ${OBJECTDIR}/Source/NetworkProtocol.o Source/NetworkProtocol.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/NetworkProtocol.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/Terminal.o: Source/Terminal.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/Terminal.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/Terminal.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/Terminal.o.d" -o ${OBJECTDIR}/Source/Terminal.o Source/Terminal.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/Terminal.o.d" -o ${OBJECTDIR}/Source/Terminal.o Source/Terminal.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/Terminal.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/Uart.o: Source/Uart.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/Uart.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/Uart.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/Uart.o.d" -o ${OBJECTDIR}/Source/Uart.o Source/Uart.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/Uart.o.d" -o ${OBJECTDIR}/Source/Uart.o Source/Uart.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/Uart.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/Util.o: Source/Util.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/Util.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/Util.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/Util.o.d" -o ${OBJECTDIR}/Source/Util.o Source/Util.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/Util.o.d" -o ${OBJECTDIR}/Source/Util.o Source/Util.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/Util.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/exceptions.o: Source/exceptions.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/exceptions.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/exceptions.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/exceptions.o.d" -o ${OBJECTDIR}/Source/exceptions.o Source/exceptions.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/exceptions.o.d" -o ${OBJECTDIR}/Source/exceptions.o Source/exceptions.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/exceptions.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/interrupts.o: Source/interrupts.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/interrupts.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/interrupts.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/interrupts.o.d" -o ${OBJECTDIR}/Source/interrupts.o Source/interrupts.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/interrupts.o.d" -o ${OBJECTDIR}/Source/interrupts.o Source/interrupts.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/interrupts.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/main.o: Source/main.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/main.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/main.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/main.o.d" -o ${OBJECTDIR}/Source/main.o Source/main.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/main.o.d" -o ${OBJECTDIR}/Source/main.o Source/main.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/main.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/system.o: Source/system.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/system.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/system.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/system.o.d" -o ${OBJECTDIR}/Source/system.o Source/system.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/system.o.d" -o ${OBJECTDIR}/Source/system.o Source/system.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/system.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/template.o: Source/template.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/template.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/template.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/template.o.d" -o ${OBJECTDIR}/Source/template.o Source/template.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/template.o.d" -o ${OBJECTDIR}/Source/template.o Source/template.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/template.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/timer.o: Source/timer.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/timer.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/timer.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/timer.o.d" -o ${OBJECTDIR}/Source/timer.o Source/timer.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/timer.o.d" -o ${OBJECTDIR}/Source/timer.o Source/timer.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/timer.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/WiFiCtrl.o: Source/WiFiCtrl.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/WiFiCtrl.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/WiFiCtrl.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/WiFiCtrl.o.d" -o ${OBJECTDIR}/Source/WiFiCtrl.o Source/WiFiCtrl.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/WiFiCtrl.o.d" -o ${OBJECTDIR}/Source/WiFiCtrl.o Source/WiFiCtrl.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/WiFiCtrl.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/SPI.o: Source/SPI.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/SPI.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/SPI.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/SPI.o.d" -o ${OBJECTDIR}/Source/SPI.o Source/SPI.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/SPI.o.d" -o ${OBJECTDIR}/Source/SPI.o Source/SPI.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/SPI.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/LoraNetworkInterface.o: Source/LoraNetworkInterface.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/LoraNetworkInterface.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/LoraNetworkInterface.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/LoraNetworkInterface.o.d" -o ${OBJECTDIR}/Source/LoraNetworkInterface.o Source/LoraNetworkInterface.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/LoraNetworkInterface.o.d" -o ${OBJECTDIR}/Source/LoraNetworkInterface.o Source/LoraNetworkInterface.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/LoraNetworkInterface.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/ChaletPowerRelay.o: Source/ChaletPowerRelay.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/ChaletPowerRelay.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/ChaletPowerRelay.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/ChaletPowerRelay.o.d" -o ${OBJECTDIR}/Source/ChaletPowerRelay.o Source/ChaletPowerRelay.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/ChaletPowerRelay.o.d" -o ${OBJECTDIR}/Source/ChaletPowerRelay.o Source/ChaletPowerRelay.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/ChaletPowerRelay.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/HarakiriRelay.o: Source/HarakiriRelay.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/HarakiriRelay.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/HarakiriRelay.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/HarakiriRelay.o.d" -o ${OBJECTDIR}/Source/HarakiriRelay.o Source/HarakiriRelay.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/HarakiriRelay.o.d" -o ${OBJECTDIR}/Source/HarakiriRelay.o Source/HarakiriRelay.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/HarakiriRelay.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/BatteryMonitor.o: Source/BatteryMonitor.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/BatteryMonitor.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/BatteryMonitor.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/BatteryMonitor.o.d" -o ${OBJECTDIR}/Source/BatteryMonitor.o Source/BatteryMonitor.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/BatteryMonitor.o.d" -o ${OBJECTDIR}/Source/BatteryMonitor.o Source/BatteryMonitor.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/BatteryMonitor.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/ina219.o: Source/ina219.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/ina219.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/ina219.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/ina219.o.d" -o ${OBJECTDIR}/Source/ina219.o Source/ina219.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/ina219.o.d" -o ${OBJECTDIR}/Source/ina219.o Source/ina219.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/ina219.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/I2C.o: Source/I2C.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/I2C.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/I2C.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/I2C.o.d" -o ${OBJECTDIR}/Source/I2C.o Source/I2C.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/I2C.o.d" -o ${OBJECTDIR}/Source/I2C.o Source/I2C.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/I2C.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/SPI_Flash.o: Source/SPI_Flash.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/SPI_Flash.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/SPI_Flash.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/SPI_Flash.o.d" -o ${OBJECTDIR}/Source/SPI_Flash.o Source/SPI_Flash.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/SPI_Flash.o.d" -o ${OBJECTDIR}/Source/SPI_Flash.o Source/SPI_Flash.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/SPI_Flash.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/Syslog.o: Source/Syslog.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/Syslog.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/Syslog.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/Syslog.o.d" -o ${OBJECTDIR}/Source/Syslog.o Source/Syslog.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/Syslog.o.d" -o ${OBJECTDIR}/Source/Syslog.o Source/Syslog.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/Syslog.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/Watchdog.o: Source/Watchdog.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/Watchdog.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/Watchdog.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/Watchdog.o.d" -o ${OBJECTDIR}/Source/Watchdog.o Source/Watchdog.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/Watchdog.o.d" -o ${OBJECTDIR}/Source/Watchdog.o Source/Watchdog.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/Watchdog.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/BootloaderInterface.o: Source/BootloaderInterface.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/BootloaderInterface.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/BootloaderInterface.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/BootloaderInterface.o.d" -o ${OBJECTDIR}/Source/BootloaderInterface.o Source/BootloaderInterface.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/BootloaderInterface.o.d" -o ${OBJECTDIR}/Source/BootloaderInterface.o Source/BootloaderInterface.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/BootloaderInterface.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/TemperatureSensor.o: Source/TemperatureSensor.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/TemperatureSensor.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/TemperatureSensor.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/TemperatureSensor.o.d" -o ${OBJECTDIR}/Source/TemperatureSensor.o Source/TemperatureSensor.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/TemperatureSensor.o.d" -o ${OBJECTDIR}/Source/TemperatureSensor.o Source/TemperatureSensor.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/TemperatureSensor.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/TC77.o: Source/TC77.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/TC77.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/TC77.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/TC77.o.d" -o ${OBJECTDIR}/Source/TC77.o Source/TC77.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/TC77.o.d" -o ${OBJECTDIR}/Source/TC77.o Source/TC77.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/TC77.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/BootloaderProtocol.o: Source/BootloaderProtocol.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/BootloaderProtocol.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/BootloaderProtocol.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/BootloaderProtocol.o.d" -o ${OBJECTDIR}/Source/BootloaderProtocol.o Source/BootloaderProtocol.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/BootloaderProtocol.o.d" -o ${OBJECTDIR}/Source/BootloaderProtocol.o Source/BootloaderProtocol.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/BootloaderProtocol.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/crc32.o: Source/crc32.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/crc32.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/crc32.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/crc32.o.d" -o ${OBJECTDIR}/Source/crc32.o Source/crc32.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/crc32.o.d" -o ${OBJECTDIR}/Source/crc32.o Source/crc32.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/crc32.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/LoraWatchdog.o: Source/LoraWatchdog.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/LoraWatchdog.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/LoraWatchdog.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/LoraWatchdog.o.d" -o ${OBJECTDIR}/Source/LoraWatchdog.o Source/LoraWatchdog.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/LoraWatchdog.o.d" -o ${OBJECTDIR}/Source/LoraWatchdog.o Source/LoraWatchdog.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/LoraWatchdog.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
else
|
||||
@ -455,343 +427,315 @@ ${OBJECTDIR}/Source/ChaletduinoV2Board.o: Source/ChaletduinoV2Board.c nbproject
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/ChaletduinoV2Board.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/ChaletduinoV2Board.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/ChaletduinoV2Board.o.d" -o ${OBJECTDIR}/Source/ChaletduinoV2Board.o Source/ChaletduinoV2Board.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/ChaletduinoV2Board.o.d" -o ${OBJECTDIR}/Source/ChaletduinoV2Board.o Source/ChaletduinoV2Board.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/ChaletduinoV2Board.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/winc3400/bsp/source/nm_bsp.o: Source/winc3400/bsp/source/nm_bsp.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400/bsp/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/bsp/source/nm_bsp.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/bsp/source/nm_bsp.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400/bsp/source/nm_bsp.o.d" -o ${OBJECTDIR}/Source/winc3400/bsp/source/nm_bsp.o Source/winc3400/bsp/source/nm_bsp.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400/bsp/source/nm_bsp.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
${OBJECTDIR}/Source/winc3400_142/common/source/nm_common.o: Source/winc3400_142/common/source/nm_common.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400_142/common/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/common/source/nm_common.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/common/source/nm_common.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400_142/common/source/nm_common.o.d" -o ${OBJECTDIR}/Source/winc3400_142/common/source/nm_common.o Source/winc3400_142/common/source/nm_common.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400_142/common/source/nm_common.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/winc3400/bus_wrapper/source/nm_bus_wrapper.o: Source/winc3400/bus_wrapper/source/nm_bus_wrapper.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400/bus_wrapper/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/bus_wrapper/source/nm_bus_wrapper.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/bus_wrapper/source/nm_bus_wrapper.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400/bus_wrapper/source/nm_bus_wrapper.o.d" -o ${OBJECTDIR}/Source/winc3400/bus_wrapper/source/nm_bus_wrapper.o Source/winc3400/bus_wrapper/source/nm_bus_wrapper.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400/bus_wrapper/source/nm_bus_wrapper.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_flash.o: Source/winc3400_142/driver/source/m2m_flash.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400_142/driver/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_flash.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_flash.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_flash.o.d" -o ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_flash.o Source/winc3400_142/driver/source/m2m_flash.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_flash.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/winc3400/common/source/nm_common.o: Source/winc3400/common/source/nm_common.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400/common/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/common/source/nm_common.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/common/source/nm_common.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400/common/source/nm_common.o.d" -o ${OBJECTDIR}/Source/winc3400/common/source/nm_common.o Source/winc3400/common/source/nm_common.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400/common/source/nm_common.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_hif.o: Source/winc3400_142/driver/source/m2m_hif.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400_142/driver/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_hif.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_hif.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_hif.o.d" -o ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_hif.o Source/winc3400_142/driver/source/m2m_hif.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_hif.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/winc3400/driver/source/m2m_ate_mode.o: Source/winc3400/driver/source/m2m_ate_mode.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400/driver/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/m2m_ate_mode.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/m2m_ate_mode.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400/driver/source/m2m_ate_mode.o.d" -o ${OBJECTDIR}/Source/winc3400/driver/source/m2m_ate_mode.o Source/winc3400/driver/source/m2m_ate_mode.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400/driver/source/m2m_ate_mode.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_ota.o: Source/winc3400_142/driver/source/m2m_ota.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400_142/driver/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_ota.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_ota.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_ota.o.d" -o ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_ota.o Source/winc3400_142/driver/source/m2m_ota.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_ota.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/winc3400/driver/source/m2m_crypto.o: Source/winc3400/driver/source/m2m_crypto.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400/driver/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/m2m_crypto.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/m2m_crypto.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400/driver/source/m2m_crypto.o.d" -o ${OBJECTDIR}/Source/winc3400/driver/source/m2m_crypto.o Source/winc3400/driver/source/m2m_crypto.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400/driver/source/m2m_crypto.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_periph.o: Source/winc3400_142/driver/source/m2m_periph.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400_142/driver/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_periph.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_periph.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_periph.o.d" -o ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_periph.o Source/winc3400_142/driver/source/m2m_periph.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_periph.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/winc3400/driver/source/m2m_hif.o: Source/winc3400/driver/source/m2m_hif.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400/driver/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/m2m_hif.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/m2m_hif.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400/driver/source/m2m_hif.o.d" -o ${OBJECTDIR}/Source/winc3400/driver/source/m2m_hif.o Source/winc3400/driver/source/m2m_hif.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400/driver/source/m2m_hif.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_ssl.o: Source/winc3400_142/driver/source/m2m_ssl.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400_142/driver/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_ssl.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_ssl.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_ssl.o.d" -o ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_ssl.o Source/winc3400_142/driver/source/m2m_ssl.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_ssl.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/winc3400/driver/source/m2m_ota.o: Source/winc3400/driver/source/m2m_ota.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400/driver/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/m2m_ota.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/m2m_ota.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400/driver/source/m2m_ota.o.d" -o ${OBJECTDIR}/Source/winc3400/driver/source/m2m_ota.o Source/winc3400/driver/source/m2m_ota.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400/driver/source/m2m_ota.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_wifi.o: Source/winc3400_142/driver/source/m2m_wifi.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400_142/driver/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_wifi.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_wifi.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_wifi.o.d" -o ${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_wifi.o Source/winc3400_142/driver/source/m2m_wifi.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400_142/driver/source/m2m_wifi.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/winc3400/driver/source/m2m_periph.o: Source/winc3400/driver/source/m2m_periph.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400/driver/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/m2m_periph.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/m2m_periph.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400/driver/source/m2m_periph.o.d" -o ${OBJECTDIR}/Source/winc3400/driver/source/m2m_periph.o Source/winc3400/driver/source/m2m_periph.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400/driver/source/m2m_periph.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
${OBJECTDIR}/Source/winc3400_142/driver/source/nmasic.o: Source/winc3400_142/driver/source/nmasic.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400_142/driver/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/driver/source/nmasic.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/driver/source/nmasic.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400_142/driver/source/nmasic.o.d" -o ${OBJECTDIR}/Source/winc3400_142/driver/source/nmasic.o Source/winc3400_142/driver/source/nmasic.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400_142/driver/source/nmasic.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/winc3400/driver/source/m2m_ssl.o: Source/winc3400/driver/source/m2m_ssl.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400/driver/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/m2m_ssl.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/m2m_ssl.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400/driver/source/m2m_ssl.o.d" -o ${OBJECTDIR}/Source/winc3400/driver/source/m2m_ssl.o Source/winc3400/driver/source/m2m_ssl.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400/driver/source/m2m_ssl.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
${OBJECTDIR}/Source/winc3400_142/driver/source/nmbus.o: Source/winc3400_142/driver/source/nmbus.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400_142/driver/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/driver/source/nmbus.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/driver/source/nmbus.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400_142/driver/source/nmbus.o.d" -o ${OBJECTDIR}/Source/winc3400_142/driver/source/nmbus.o Source/winc3400_142/driver/source/nmbus.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400_142/driver/source/nmbus.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/winc3400/driver/source/m2m_wifi.o: Source/winc3400/driver/source/m2m_wifi.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400/driver/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/m2m_wifi.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/m2m_wifi.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400/driver/source/m2m_wifi.o.d" -o ${OBJECTDIR}/Source/winc3400/driver/source/m2m_wifi.o Source/winc3400/driver/source/m2m_wifi.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400/driver/source/m2m_wifi.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
${OBJECTDIR}/Source/winc3400_142/driver/source/nmdrv.o: Source/winc3400_142/driver/source/nmdrv.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400_142/driver/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/driver/source/nmdrv.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/driver/source/nmdrv.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400_142/driver/source/nmdrv.o.d" -o ${OBJECTDIR}/Source/winc3400_142/driver/source/nmdrv.o Source/winc3400_142/driver/source/nmdrv.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400_142/driver/source/nmdrv.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/winc3400/driver/source/nmasic.o: Source/winc3400/driver/source/nmasic.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400/driver/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/nmasic.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/nmasic.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400/driver/source/nmasic.o.d" -o ${OBJECTDIR}/Source/winc3400/driver/source/nmasic.o Source/winc3400/driver/source/nmasic.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400/driver/source/nmasic.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
${OBJECTDIR}/Source/winc3400_142/driver/source/nmspi.o: Source/winc3400_142/driver/source/nmspi.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400_142/driver/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/driver/source/nmspi.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/driver/source/nmspi.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400_142/driver/source/nmspi.o.d" -o ${OBJECTDIR}/Source/winc3400_142/driver/source/nmspi.o Source/winc3400_142/driver/source/nmspi.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400_142/driver/source/nmspi.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/winc3400/driver/source/nmbus.o: Source/winc3400/driver/source/nmbus.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400/driver/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/nmbus.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/nmbus.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400/driver/source/nmbus.o.d" -o ${OBJECTDIR}/Source/winc3400/driver/source/nmbus.o Source/winc3400/driver/source/nmbus.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400/driver/source/nmbus.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
${OBJECTDIR}/Source/winc3400_142/socket/source/inet_addr.o: Source/winc3400_142/socket/source/inet_addr.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400_142/socket/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/socket/source/inet_addr.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/socket/source/inet_addr.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400_142/socket/source/inet_addr.o.d" -o ${OBJECTDIR}/Source/winc3400_142/socket/source/inet_addr.o Source/winc3400_142/socket/source/inet_addr.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400_142/socket/source/inet_addr.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/winc3400/driver/source/nmdrv.o: Source/winc3400/driver/source/nmdrv.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400/driver/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/nmdrv.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/nmdrv.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400/driver/source/nmdrv.o.d" -o ${OBJECTDIR}/Source/winc3400/driver/source/nmdrv.o Source/winc3400/driver/source/nmdrv.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400/driver/source/nmdrv.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
${OBJECTDIR}/Source/winc3400_142/socket/source/inet_ntop.o: Source/winc3400_142/socket/source/inet_ntop.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400_142/socket/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/socket/source/inet_ntop.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/socket/source/inet_ntop.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400_142/socket/source/inet_ntop.o.d" -o ${OBJECTDIR}/Source/winc3400_142/socket/source/inet_ntop.o Source/winc3400_142/socket/source/inet_ntop.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400_142/socket/source/inet_ntop.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/winc3400/driver/source/nmi2c.o: Source/winc3400/driver/source/nmi2c.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400/driver/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/nmi2c.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/nmi2c.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400/driver/source/nmi2c.o.d" -o ${OBJECTDIR}/Source/winc3400/driver/source/nmi2c.o Source/winc3400/driver/source/nmi2c.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400/driver/source/nmi2c.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
${OBJECTDIR}/Source/winc3400_142/socket/source/socket.o: Source/winc3400_142/socket/source/socket.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400_142/socket/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/socket/source/socket.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/socket/source/socket.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400_142/socket/source/socket.o.d" -o ${OBJECTDIR}/Source/winc3400_142/socket/source/socket.o Source/winc3400_142/socket/source/socket.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400_142/socket/source/socket.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/winc3400/driver/source/nmspi.o: Source/winc3400/driver/source/nmspi.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400/driver/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/nmspi.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/nmspi.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400/driver/source/nmspi.o.d" -o ${OBJECTDIR}/Source/winc3400/driver/source/nmspi.o Source/winc3400/driver/source/nmspi.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400/driver/source/nmspi.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/winc3400/driver/source/nmuart.o: Source/winc3400/driver/source/nmuart.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400/driver/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/nmuart.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/driver/source/nmuart.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400/driver/source/nmuart.o.d" -o ${OBJECTDIR}/Source/winc3400/driver/source/nmuart.o Source/winc3400/driver/source/nmuart.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400/driver/source/nmuart.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/winc3400/socket/source/socket.o: Source/winc3400/socket/source/socket.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400/socket/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/socket/source/socket.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/socket/source/socket.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400/socket/source/socket.o.d" -o ${OBJECTDIR}/Source/winc3400/socket/source/socket.o Source/winc3400/socket/source/socket.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400/socket/source/socket.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/winc3400/spi_flash/source/spi_flash.o: Source/winc3400/spi_flash/source/spi_flash.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400/spi_flash/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/spi_flash/source/spi_flash.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/spi_flash/source/spi_flash.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400/spi_flash/source/spi_flash.o.d" -o ${OBJECTDIR}/Source/winc3400/spi_flash/source/spi_flash.o Source/winc3400/spi_flash/source/spi_flash.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400/spi_flash/source/spi_flash.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/winc3400/winc_init.o: Source/winc3400/winc_init.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/winc_init.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400/winc_init.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400/winc_init.o.d" -o ${OBJECTDIR}/Source/winc3400/winc_init.o Source/winc3400/winc_init.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400/winc_init.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
${OBJECTDIR}/Source/winc3400_142/spi_flash/source/spi_flash.o: Source/winc3400_142/spi_flash/source/spi_flash.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source/winc3400_142/spi_flash/source"
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/spi_flash/source/spi_flash.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/winc3400_142/spi_flash/source/spi_flash.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/winc3400_142/spi_flash/source/spi_flash.o.d" -o ${OBJECTDIR}/Source/winc3400_142/spi_flash/source/spi_flash.o Source/winc3400_142/spi_flash/source/spi_flash.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/winc3400_142/spi_flash/source/spi_flash.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/DigitalIO.o: Source/DigitalIO.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/DigitalIO.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/DigitalIO.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/DigitalIO.o.d" -o ${OBJECTDIR}/Source/DigitalIO.o Source/DigitalIO.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/DigitalIO.o.d" -o ${OBJECTDIR}/Source/DigitalIO.o Source/DigitalIO.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/DigitalIO.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/InternalUart.o: Source/InternalUart.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/InternalUart.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/InternalUart.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/InternalUart.o.d" -o ${OBJECTDIR}/Source/InternalUart.o Source/InternalUart.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/InternalUart.o.d" -o ${OBJECTDIR}/Source/InternalUart.o Source/InternalUart.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/InternalUart.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/NetworkProtocol.o: Source/NetworkProtocol.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/NetworkProtocol.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/NetworkProtocol.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/NetworkProtocol.o.d" -o ${OBJECTDIR}/Source/NetworkProtocol.o Source/NetworkProtocol.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/NetworkProtocol.o.d" -o ${OBJECTDIR}/Source/NetworkProtocol.o Source/NetworkProtocol.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/NetworkProtocol.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/Terminal.o: Source/Terminal.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/Terminal.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/Terminal.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/Terminal.o.d" -o ${OBJECTDIR}/Source/Terminal.o Source/Terminal.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/Terminal.o.d" -o ${OBJECTDIR}/Source/Terminal.o Source/Terminal.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/Terminal.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/Uart.o: Source/Uart.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/Uart.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/Uart.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/Uart.o.d" -o ${OBJECTDIR}/Source/Uart.o Source/Uart.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/Uart.o.d" -o ${OBJECTDIR}/Source/Uart.o Source/Uart.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/Uart.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/Util.o: Source/Util.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/Util.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/Util.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/Util.o.d" -o ${OBJECTDIR}/Source/Util.o Source/Util.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/Util.o.d" -o ${OBJECTDIR}/Source/Util.o Source/Util.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/Util.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/exceptions.o: Source/exceptions.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/exceptions.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/exceptions.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/exceptions.o.d" -o ${OBJECTDIR}/Source/exceptions.o Source/exceptions.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/exceptions.o.d" -o ${OBJECTDIR}/Source/exceptions.o Source/exceptions.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/exceptions.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/interrupts.o: Source/interrupts.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/interrupts.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/interrupts.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/interrupts.o.d" -o ${OBJECTDIR}/Source/interrupts.o Source/interrupts.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/interrupts.o.d" -o ${OBJECTDIR}/Source/interrupts.o Source/interrupts.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/interrupts.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/main.o: Source/main.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/main.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/main.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/main.o.d" -o ${OBJECTDIR}/Source/main.o Source/main.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/main.o.d" -o ${OBJECTDIR}/Source/main.o Source/main.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/main.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/system.o: Source/system.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/system.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/system.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/system.o.d" -o ${OBJECTDIR}/Source/system.o Source/system.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/system.o.d" -o ${OBJECTDIR}/Source/system.o Source/system.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/system.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/template.o: Source/template.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/template.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/template.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/template.o.d" -o ${OBJECTDIR}/Source/template.o Source/template.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/template.o.d" -o ${OBJECTDIR}/Source/template.o Source/template.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/template.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/timer.o: Source/timer.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/timer.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/timer.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/timer.o.d" -o ${OBJECTDIR}/Source/timer.o Source/timer.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/timer.o.d" -o ${OBJECTDIR}/Source/timer.o Source/timer.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/timer.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/WiFiCtrl.o: Source/WiFiCtrl.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/WiFiCtrl.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/WiFiCtrl.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/WiFiCtrl.o.d" -o ${OBJECTDIR}/Source/WiFiCtrl.o Source/WiFiCtrl.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/WiFiCtrl.o.d" -o ${OBJECTDIR}/Source/WiFiCtrl.o Source/WiFiCtrl.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/WiFiCtrl.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/SPI.o: Source/SPI.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/SPI.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/SPI.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/SPI.o.d" -o ${OBJECTDIR}/Source/SPI.o Source/SPI.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/SPI.o.d" -o ${OBJECTDIR}/Source/SPI.o Source/SPI.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/SPI.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/LoraNetworkInterface.o: Source/LoraNetworkInterface.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/LoraNetworkInterface.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/LoraNetworkInterface.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/LoraNetworkInterface.o.d" -o ${OBJECTDIR}/Source/LoraNetworkInterface.o Source/LoraNetworkInterface.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/LoraNetworkInterface.o.d" -o ${OBJECTDIR}/Source/LoraNetworkInterface.o Source/LoraNetworkInterface.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/LoraNetworkInterface.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/ChaletPowerRelay.o: Source/ChaletPowerRelay.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/ChaletPowerRelay.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/ChaletPowerRelay.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/ChaletPowerRelay.o.d" -o ${OBJECTDIR}/Source/ChaletPowerRelay.o Source/ChaletPowerRelay.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/ChaletPowerRelay.o.d" -o ${OBJECTDIR}/Source/ChaletPowerRelay.o Source/ChaletPowerRelay.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/ChaletPowerRelay.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/HarakiriRelay.o: Source/HarakiriRelay.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/HarakiriRelay.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/HarakiriRelay.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/HarakiriRelay.o.d" -o ${OBJECTDIR}/Source/HarakiriRelay.o Source/HarakiriRelay.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/HarakiriRelay.o.d" -o ${OBJECTDIR}/Source/HarakiriRelay.o Source/HarakiriRelay.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/HarakiriRelay.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/BatteryMonitor.o: Source/BatteryMonitor.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/BatteryMonitor.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/BatteryMonitor.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/BatteryMonitor.o.d" -o ${OBJECTDIR}/Source/BatteryMonitor.o Source/BatteryMonitor.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/BatteryMonitor.o.d" -o ${OBJECTDIR}/Source/BatteryMonitor.o Source/BatteryMonitor.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/BatteryMonitor.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/ina219.o: Source/ina219.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/ina219.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/ina219.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/ina219.o.d" -o ${OBJECTDIR}/Source/ina219.o Source/ina219.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/ina219.o.d" -o ${OBJECTDIR}/Source/ina219.o Source/ina219.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/ina219.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/I2C.o: Source/I2C.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/I2C.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/I2C.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/I2C.o.d" -o ${OBJECTDIR}/Source/I2C.o Source/I2C.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/I2C.o.d" -o ${OBJECTDIR}/Source/I2C.o Source/I2C.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/I2C.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/SPI_Flash.o: Source/SPI_Flash.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/SPI_Flash.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/SPI_Flash.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/SPI_Flash.o.d" -o ${OBJECTDIR}/Source/SPI_Flash.o Source/SPI_Flash.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/SPI_Flash.o.d" -o ${OBJECTDIR}/Source/SPI_Flash.o Source/SPI_Flash.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/SPI_Flash.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/Syslog.o: Source/Syslog.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/Syslog.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/Syslog.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/Syslog.o.d" -o ${OBJECTDIR}/Source/Syslog.o Source/Syslog.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/Syslog.o.d" -o ${OBJECTDIR}/Source/Syslog.o Source/Syslog.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/Syslog.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/Watchdog.o: Source/Watchdog.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/Watchdog.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/Watchdog.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/Watchdog.o.d" -o ${OBJECTDIR}/Source/Watchdog.o Source/Watchdog.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/Watchdog.o.d" -o ${OBJECTDIR}/Source/Watchdog.o Source/Watchdog.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/Watchdog.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/BootloaderInterface.o: Source/BootloaderInterface.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/BootloaderInterface.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/BootloaderInterface.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/BootloaderInterface.o.d" -o ${OBJECTDIR}/Source/BootloaderInterface.o Source/BootloaderInterface.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/BootloaderInterface.o.d" -o ${OBJECTDIR}/Source/BootloaderInterface.o Source/BootloaderInterface.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/BootloaderInterface.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/TemperatureSensor.o: Source/TemperatureSensor.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/TemperatureSensor.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/TemperatureSensor.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/TemperatureSensor.o.d" -o ${OBJECTDIR}/Source/TemperatureSensor.o Source/TemperatureSensor.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/TemperatureSensor.o.d" -o ${OBJECTDIR}/Source/TemperatureSensor.o Source/TemperatureSensor.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/TemperatureSensor.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/TC77.o: Source/TC77.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/TC77.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/TC77.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/TC77.o.d" -o ${OBJECTDIR}/Source/TC77.o Source/TC77.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/TC77.o.d" -o ${OBJECTDIR}/Source/TC77.o Source/TC77.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/TC77.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/BootloaderProtocol.o: Source/BootloaderProtocol.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/BootloaderProtocol.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/BootloaderProtocol.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/BootloaderProtocol.o.d" -o ${OBJECTDIR}/Source/BootloaderProtocol.o Source/BootloaderProtocol.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/BootloaderProtocol.o.d" -o ${OBJECTDIR}/Source/BootloaderProtocol.o Source/BootloaderProtocol.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/BootloaderProtocol.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/crc32.o: Source/crc32.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/crc32.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/crc32.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/crc32.o.d" -o ${OBJECTDIR}/Source/crc32.o Source/crc32.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/crc32.o.d" -o ${OBJECTDIR}/Source/crc32.o Source/crc32.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/crc32.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
${OBJECTDIR}/Source/LoraWatchdog.o: Source/LoraWatchdog.c nbproject/Makefile-${CND_CONF}.mk
|
||||
@${MKDIR} "${OBJECTDIR}/Source"
|
||||
@${RM} ${OBJECTDIR}/Source/LoraWatchdog.o.d
|
||||
@${RM} ${OBJECTDIR}/Source/LoraWatchdog.o
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source/winc3400" -I"Source" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/LoraWatchdog.o.d" -o ${OBJECTDIR}/Source/LoraWatchdog.o Source/LoraWatchdog.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"Source" -I"Source/winc3400_142" -I"Source/winc3400_142/bsp/include" -I"Source/winc3400_142/common/include" -I"Source/winc3400_142/driver/include" -I"Source/winc3400_142/socket/include" -I"Source/winc3400_142/spi_flash/include" -DCHALETDUINO_V2_BRD -D_SUPPRESS_PLIB_WARNING -MMD -MF "${OBJECTDIR}/Source/LoraWatchdog.o.d" -o ${OBJECTDIR}/Source/LoraWatchdog.o Source/LoraWatchdog.c -DXPRJ_ChaletDuinoV2_795F512H_=$(CND_CONF) $(COMPARISON_BUILD)
|
||||
@${FIXDEPS} "${OBJECTDIR}/Source/LoraWatchdog.o.d" $(SILENT) -rsi ${MP_CC_DIR}../
|
||||
|
||||
endif
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#
|
||||
#Wed Oct 20 12:56:19 EDT 2021
|
||||
#Thu Dec 30 14:57:27 EST 2021
|
||||
default.languagetoolchain.version=2.41
|
||||
ChaletDuino_775F512H_.languagetoolchain.version=1.33
|
||||
default.Pack.dfplocation=C\:\\Users\\JF\\.mchp_packs\\Microchip\\PIC32MX_DFP\\1.2.228
|
||||
@ -7,7 +7,7 @@ conf.ids=default,ChaletDuino_775F512H_,ChaletDuinoV2_795F512H_
|
||||
default.languagetoolchain.dir=C\:\\Program Files\\Microchip\\xc32\\v2.41\\bin
|
||||
ChaletDuino_775F512H_.Pack.dfplocation=C\:\\Program Files (x86)\\Microchip\\MPLABX\\v5.40\\packs\\Microchip\\PIC32MX_DFP\\1.3.231
|
||||
ChaletDuinoV2_795F512H_.Pack.dfplocation=C\:\\Program Files (x86)\\Microchip\\MPLABX\\v5.40\\packs\\Microchip\\PIC32MX_DFP\\1.3.231
|
||||
configurations-xml=361ab07e6528007a52e4f55a861bad85
|
||||
configurations-xml=bbb83c38cec5eb460692a21d7e609f51
|
||||
default.com-microchip-mplab-nbide-toolchainXC32-XC32LanguageToolchain.md5=a5745c99cb5a5032f17cfaf0ff720282
|
||||
com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=9db8f8a224aa17d0023ea7f468f871dc
|
||||
ChaletDuino_775F512H_.languagetoolchain.dir=C\:\\Program Files\\Microchip\\xc32\\v1.33\\bin
|
||||
|
||||
@ -11,74 +11,57 @@
|
||||
<itemPath>Source/BoardCfg_Pinguino.h</itemPath>
|
||||
<itemPath>Source/BoardCfg_ChaletduinoV2.h</itemPath>
|
||||
</logicalFolder>
|
||||
<logicalFolder name="winc3400" displayName="winc3400" projectFiles="true">
|
||||
<logicalFolder name="winc3400_142"
|
||||
displayName="winc3400_142"
|
||||
projectFiles="true">
|
||||
<logicalFolder name="bsp" displayName="bsp" projectFiles="true">
|
||||
<logicalFolder name="include" displayName="include" projectFiles="true">
|
||||
<itemPath>Source/winc3400/bsp/include/nm_bsp.h</itemPath>
|
||||
<itemPath>Source/winc3400/bsp/include/nm_bsp_internal.h</itemPath>
|
||||
</logicalFolder>
|
||||
<logicalFolder name="source" displayName="source" projectFiles="true">
|
||||
</logicalFolder>
|
||||
</logicalFolder>
|
||||
<logicalFolder name="bus_wrapper" displayName="bus_wrapper" projectFiles="true">
|
||||
<logicalFolder name="include" displayName="include" projectFiles="true">
|
||||
<itemPath>Source/winc3400/bus_wrapper/include/nm_bus_wrapper.h</itemPath>
|
||||
</logicalFolder>
|
||||
<logicalFolder name="source" displayName="source" projectFiles="true">
|
||||
<itemPath>Source/winc3400_142/bsp/include/nm_bsp.h</itemPath>
|
||||
</logicalFolder>
|
||||
</logicalFolder>
|
||||
<logicalFolder name="common" displayName="common" projectFiles="true">
|
||||
<logicalFolder name="include" displayName="include" projectFiles="true">
|
||||
<itemPath>Source/winc3400/common/include/nm_common.h</itemPath>
|
||||
<itemPath>Source/winc3400/common/include/nm_debug.h</itemPath>
|
||||
<itemPath>Source/winc3400_142/common/include/nm_common.h</itemPath>
|
||||
<itemPath>Source/winc3400_142/common/include/nm_debug.h</itemPath>
|
||||
</logicalFolder>
|
||||
<logicalFolder name="source" displayName="source" projectFiles="true">
|
||||
</logicalFolder>
|
||||
</logicalFolder>
|
||||
<logicalFolder name="driver" displayName="driver" projectFiles="true">
|
||||
<logicalFolder name="include" displayName="include" projectFiles="true">
|
||||
<itemPath>Source/winc3400/driver/include/ecc_types.h</itemPath>
|
||||
<itemPath>Source/winc3400/driver/include/m2m_ate_mode.h</itemPath>
|
||||
<itemPath>Source/winc3400/driver/include/m2m_crypto.h</itemPath>
|
||||
<itemPath>Source/winc3400/driver/include/m2m_flash.h</itemPath>
|
||||
<itemPath>Source/winc3400/driver/include/m2m_ota.h</itemPath>
|
||||
<itemPath>Source/winc3400/driver/include/m2m_periph.h</itemPath>
|
||||
<itemPath>Source/winc3400/driver/include/m2m_ssl.h</itemPath>
|
||||
<itemPath>Source/winc3400/driver/include/m2m_types.h</itemPath>
|
||||
<itemPath>Source/winc3400/driver/include/m2m_wifi.h</itemPath>
|
||||
<itemPath>Source/winc3400_142/driver/include/ecc_types.h</itemPath>
|
||||
<itemPath>Source/winc3400_142/driver/include/m2m_flash.h</itemPath>
|
||||
<itemPath>Source/winc3400_142/driver/include/m2m_hif.h</itemPath>
|
||||
<itemPath>Source/winc3400_142/driver/include/m2m_ota.h</itemPath>
|
||||
<itemPath>Source/winc3400_142/driver/include/m2m_periph.h</itemPath>
|
||||
<itemPath>Source/winc3400_142/driver/include/m2m_ssl.h</itemPath>
|
||||
<itemPath>Source/winc3400_142/driver/include/m2m_types.h</itemPath>
|
||||
<itemPath>Source/winc3400_142/driver/include/m2m_wifi.h</itemPath>
|
||||
<itemPath>Source/winc3400_142/driver/include/nmasic.h</itemPath>
|
||||
<itemPath>Source/winc3400_142/driver/include/nmbus.h</itemPath>
|
||||
<itemPath>Source/winc3400_142/driver/include/nmdrv.h</itemPath>
|
||||
<itemPath>Source/winc3400_142/driver/include/nmspi.h</itemPath>
|
||||
</logicalFolder>
|
||||
<logicalFolder name="source" displayName="source" projectFiles="true">
|
||||
<itemPath>Source/winc3400/driver/source/m2m_hif.h</itemPath>
|
||||
<itemPath>Source/winc3400/driver/source/nmasic.h</itemPath>
|
||||
<itemPath>Source/winc3400/driver/source/nmbus.h</itemPath>
|
||||
<itemPath>Source/winc3400/driver/source/nmdrv.h</itemPath>
|
||||
<itemPath>Source/winc3400/driver/source/nmflash.h</itemPath>
|
||||
<itemPath>Source/winc3400/driver/source/nmi2c.h</itemPath>
|
||||
<itemPath>Source/winc3400/driver/source/nmspi.h</itemPath>
|
||||
<itemPath>Source/winc3400/driver/source/nmuart.h</itemPath>
|
||||
</logicalFolder>
|
||||
</logicalFolder>
|
||||
<logicalFolder name="programmer" displayName="programmer" projectFiles="true">
|
||||
<itemPath>Source/winc3400/programmer/programmer.h</itemPath>
|
||||
</logicalFolder>
|
||||
<logicalFolder name="socket" displayName="socket" projectFiles="true">
|
||||
<logicalFolder name="include" displayName="include" projectFiles="true">
|
||||
<itemPath>Source/winc3400/socket/include/m2m_socket_host_if.h</itemPath>
|
||||
<itemPath>Source/winc3400/socket/include/socket.h</itemPath>
|
||||
<itemPath>Source/winc3400_142/socket/include/m2m_socket_host_if.h</itemPath>
|
||||
<itemPath>Source/winc3400_142/socket/include/netinet_in.h</itemPath>
|
||||
<itemPath>Source/winc3400_142/socket/include/socket.h</itemPath>
|
||||
</logicalFolder>
|
||||
<logicalFolder name="source" displayName="source" projectFiles="true">
|
||||
<itemPath>Source/winc3400/socket/source/socket_internal.h</itemPath>
|
||||
</logicalFolder>
|
||||
</logicalFolder>
|
||||
<logicalFolder name="spi_flash" displayName="spi_flash" projectFiles="true">
|
||||
<logicalFolder name="include" displayName="include" projectFiles="true">
|
||||
<itemPath>Source/winc3400/spi_flash/include/spi_flash.h</itemPath>
|
||||
<itemPath>Source/winc3400/spi_flash/include/spi_flash_map.h</itemPath>
|
||||
<itemPath>Source/winc3400_142/spi_flash/include/spi_flash.h</itemPath>
|
||||
<itemPath>Source/winc3400_142/spi_flash/include/spi_flash_map.h</itemPath>
|
||||
</logicalFolder>
|
||||
<logicalFolder name="source" displayName="source" projectFiles="true">
|
||||
</logicalFolder>
|
||||
</logicalFolder>
|
||||
<itemPath>Source/winc3400/winc_init.h</itemPath>
|
||||
</logicalFolder>
|
||||
<itemPath>Source/define.h</itemPath>
|
||||
<itemPath>Source/DigitalIO.h</itemPath>
|
||||
@ -127,66 +110,52 @@
|
||||
<itemPath>Source/ChaletduinoBoard.c</itemPath>
|
||||
<itemPath>Source/ChaletduinoV2Board.c</itemPath>
|
||||
</logicalFolder>
|
||||
<logicalFolder name="winc3400" displayName="winc3400" projectFiles="true">
|
||||
<logicalFolder name="winc3400_142"
|
||||
displayName="winc3400_142"
|
||||
projectFiles="true">
|
||||
<logicalFolder name="bsp" displayName="bsp" projectFiles="true">
|
||||
<logicalFolder name="include" displayName="include" projectFiles="true">
|
||||
</logicalFolder>
|
||||
<logicalFolder name="source" displayName="source" projectFiles="true">
|
||||
<itemPath>Source/winc3400/bsp/source/nm_bsp.c</itemPath>
|
||||
</logicalFolder>
|
||||
</logicalFolder>
|
||||
<logicalFolder name="bus_wrapper" displayName="bus_wrapper" projectFiles="true">
|
||||
<logicalFolder name="include" displayName="include" projectFiles="true">
|
||||
</logicalFolder>
|
||||
<logicalFolder name="source" displayName="source" projectFiles="true">
|
||||
<itemPath>Source/winc3400/bus_wrapper/source/nm_bus_wrapper.c</itemPath>
|
||||
</logicalFolder>
|
||||
</logicalFolder>
|
||||
<logicalFolder name="common" displayName="common" projectFiles="true">
|
||||
<logicalFolder name="include" displayName="include" projectFiles="true">
|
||||
</logicalFolder>
|
||||
<logicalFolder name="source" displayName="source" projectFiles="true">
|
||||
<itemPath>Source/winc3400/common/source/nm_common.c</itemPath>
|
||||
<itemPath>Source/winc3400_142/common/source/nm_common.c</itemPath>
|
||||
</logicalFolder>
|
||||
</logicalFolder>
|
||||
<logicalFolder name="driver" displayName="driver" projectFiles="true">
|
||||
<logicalFolder name="include" displayName="include" projectFiles="true">
|
||||
</logicalFolder>
|
||||
<logicalFolder name="source" displayName="source" projectFiles="true">
|
||||
<itemPath>Source/winc3400/driver/source/m2m_ate_mode.c</itemPath>
|
||||
<itemPath>Source/winc3400/driver/source/m2m_crypto.c</itemPath>
|
||||
<itemPath>Source/winc3400/driver/source/m2m_flash.c</itemPath>
|
||||
<itemPath>Source/winc3400/driver/source/m2m_hif.c</itemPath>
|
||||
<itemPath>Source/winc3400/driver/source/m2m_ota.c</itemPath>
|
||||
<itemPath>Source/winc3400/driver/source/m2m_periph.c</itemPath>
|
||||
<itemPath>Source/winc3400/driver/source/m2m_ssl.c</itemPath>
|
||||
<itemPath>Source/winc3400/driver/source/m2m_wifi.c</itemPath>
|
||||
<itemPath>Source/winc3400/driver/source/nmasic.c</itemPath>
|
||||
<itemPath>Source/winc3400/driver/source/nmbus.c</itemPath>
|
||||
<itemPath>Source/winc3400/driver/source/nmdrv.c</itemPath>
|
||||
<itemPath>Source/winc3400/driver/source/nmflash.c</itemPath>
|
||||
<itemPath>Source/winc3400/driver/source/nmi2c.c</itemPath>
|
||||
<itemPath>Source/winc3400/driver/source/nmspi.c</itemPath>
|
||||
<itemPath>Source/winc3400/driver/source/nmuart.c</itemPath>
|
||||
<itemPath>Source/winc3400_142/driver/source/m2m_flash.c</itemPath>
|
||||
<itemPath>Source/winc3400_142/driver/source/m2m_hif.c</itemPath>
|
||||
<itemPath>Source/winc3400_142/driver/source/m2m_ota.c</itemPath>
|
||||
<itemPath>Source/winc3400_142/driver/source/m2m_periph.c</itemPath>
|
||||
<itemPath>Source/winc3400_142/driver/source/m2m_ssl.c</itemPath>
|
||||
<itemPath>Source/winc3400_142/driver/source/m2m_wifi.c</itemPath>
|
||||
<itemPath>Source/winc3400_142/driver/source/nmasic.c</itemPath>
|
||||
<itemPath>Source/winc3400_142/driver/source/nmbus.c</itemPath>
|
||||
<itemPath>Source/winc3400_142/driver/source/nmdrv.c</itemPath>
|
||||
<itemPath>Source/winc3400_142/driver/source/nmspi.c</itemPath>
|
||||
</logicalFolder>
|
||||
</logicalFolder>
|
||||
<logicalFolder name="programmer" displayName="programmer" projectFiles="true">
|
||||
</logicalFolder>
|
||||
<logicalFolder name="socket" displayName="socket" projectFiles="true">
|
||||
<logicalFolder name="include" displayName="include" projectFiles="true">
|
||||
</logicalFolder>
|
||||
<logicalFolder name="source" displayName="source" projectFiles="true">
|
||||
<itemPath>Source/winc3400/socket/source/socket.c</itemPath>
|
||||
<itemPath>Source/winc3400_142/socket/source/inet_addr.c</itemPath>
|
||||
<itemPath>Source/winc3400_142/socket/source/inet_ntop.c</itemPath>
|
||||
<itemPath>Source/winc3400_142/socket/source/socket.c</itemPath>
|
||||
</logicalFolder>
|
||||
</logicalFolder>
|
||||
<logicalFolder name="spi_flash" displayName="spi_flash" projectFiles="true">
|
||||
<logicalFolder name="include" displayName="include" projectFiles="true">
|
||||
</logicalFolder>
|
||||
<logicalFolder name="source" displayName="source" projectFiles="true">
|
||||
<itemPath>Source/winc3400/spi_flash/source/spi_flash.c</itemPath>
|
||||
<itemPath>Source/winc3400_142/spi_flash/source/spi_flash.c</itemPath>
|
||||
</logicalFolder>
|
||||
</logicalFolder>
|
||||
<itemPath>Source/winc3400/winc_init.c</itemPath>
|
||||
</logicalFolder>
|
||||
<itemPath>Source/DigitalIO.c</itemPath>
|
||||
<itemPath>Source/InternalUart.c</itemPath>
|
||||
@ -928,42 +897,6 @@
|
||||
<C32Global>
|
||||
</C32Global>
|
||||
</item>
|
||||
<item path="Source/winc3400/driver/source/m2m_flash.c"
|
||||
ex="true"
|
||||
overriding="false">
|
||||
<C32>
|
||||
</C32>
|
||||
<C32-AR>
|
||||
</C32-AR>
|
||||
<C32-AS>
|
||||
</C32-AS>
|
||||
<C32-CO>
|
||||
</C32-CO>
|
||||
<C32-LD>
|
||||
</C32-LD>
|
||||
<C32CPP>
|
||||
</C32CPP>
|
||||
<C32Global>
|
||||
</C32Global>
|
||||
</item>
|
||||
<item path="Source/winc3400/driver/source/nmflash.c"
|
||||
ex="true"
|
||||
overriding="false">
|
||||
<C32>
|
||||
</C32>
|
||||
<C32-AR>
|
||||
</C32-AR>
|
||||
<C32-AS>
|
||||
</C32-AS>
|
||||
<C32-CO>
|
||||
</C32-CO>
|
||||
<C32-LD>
|
||||
</C32-LD>
|
||||
<C32CPP>
|
||||
</C32CPP>
|
||||
<C32Global>
|
||||
</C32Global>
|
||||
</item>
|
||||
</conf>
|
||||
<conf name="ChaletDuinoV2_795F512H_" type="2">
|
||||
<toolsSet>
|
||||
@ -1128,7 +1061,8 @@
|
||||
<property key="use-indirect-calls" value="false"/>
|
||||
</C32CPP>
|
||||
<C32Global>
|
||||
<property key="common-include-directories" value="Source\winc3400;Source"/>
|
||||
<property key="common-include-directories"
|
||||
value="Source;Source\winc3400_142;Source\winc3400_142\bsp\include;Source\winc3400_142\common\include;Source\winc3400_142\driver\include;Source\winc3400_142\socket\include;Source\winc3400_142\spi_flash\include"/>
|
||||
<property key="gp-relative-option" value=""/>
|
||||
<property key="legacy-libc" value="false"/>
|
||||
<property key="mdtcm" value=""/>
|
||||
@ -1410,27 +1344,7 @@
|
||||
<C32Global>
|
||||
</C32Global>
|
||||
</item>
|
||||
<item path="Source/winc3400/driver/source/m2m_flash.c"
|
||||
ex="true"
|
||||
overriding="false">
|
||||
<C32>
|
||||
</C32>
|
||||
<C32-AR>
|
||||
</C32-AR>
|
||||
<C32-AS>
|
||||
</C32-AS>
|
||||
<C32-CO>
|
||||
</C32-CO>
|
||||
<C32-LD>
|
||||
</C32-LD>
|
||||
<C32CPP>
|
||||
</C32CPP>
|
||||
<C32Global>
|
||||
</C32Global>
|
||||
</item>
|
||||
<item path="Source/winc3400/driver/source/nmflash.c"
|
||||
ex="true"
|
||||
overriding="false">
|
||||
<item path="Source/winc3400_config.h" ex="true" overriding="false">
|
||||
<C32>
|
||||
</C32>
|
||||
<C32-AR>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user