Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6baa6497b7 | ||
|
|
2f9224c2ae | ||
|
|
8094d27cdc | ||
|
|
890ddc61c6 | ||
|
|
0c8a4ed4b9 | ||
|
|
de572b8d90 | ||
|
|
387a427108 | ||
|
|
b1c2a2f152 | ||
|
|
5216c562dc | ||
|
|
25668f70eb | ||
|
|
96eb8f8724 | ||
|
|
5fd5acddb6 | ||
|
|
21e511e47f | ||
|
|
0f7087849e | ||
|
|
0657699474 | ||
|
|
6828924f9f | ||
|
|
c53ae409aa | ||
|
|
88cf4f3056 |
@@ -0,0 +1,12 @@
|
||||
name: auto-github-actions
|
||||
on: [push]
|
||||
jobs:
|
||||
check-bats-version:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '14'
|
||||
- run: npm install -g bats
|
||||
- run: bats -v
|
||||
+6
-5
@@ -14,8 +14,8 @@ If you don't find anything, please [open a new issue](https://github.com/khoih-p
|
||||
|
||||
Please ensure to specify the following:
|
||||
|
||||
* Arduino IDE version (e.g. 1.8.13) or Platform.io version
|
||||
* `ESP8266`,`ESP32` or `STM32` Core Version (e.g. ESP8266 core v2.7.4, ESP32 v1.0.6 or STM32 v1.9.0)
|
||||
* Arduino IDE version (e.g. 1.8.16) or Platform.io version
|
||||
* `ESP8266`,`ESP32` or `STM32` Core Version (e.g. ESP8266 core v3.0.2, ESP32 v2.0.0 or STM32 v2.1.0)
|
||||
* Contextual information (e.g. what you were trying to achieve)
|
||||
* Simplest possible steps to reproduce
|
||||
* Anything that might be relevant in your opinion, such as:
|
||||
@@ -26,10 +26,10 @@ Please ensure to specify the following:
|
||||
### Example
|
||||
|
||||
```
|
||||
Arduino IDE version: 1.8.13
|
||||
ESP32 Core Version 1.0.6
|
||||
Arduino IDE version: 1.8.16
|
||||
ESP32 Core Version 2.0.0
|
||||
OS: Ubuntu 20.04 LTS
|
||||
Linux xy-Inspiron-3593 5.4.0-70-generic #78-Ubuntu SMP Fri Mar 19 13:29:52 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
|
||||
Linux xy-Inspiron-3593 5.4.0-86-generic #97-Ubuntu SMP Fri Sep 17 19:19:40 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
|
||||
|
||||
Context:
|
||||
I encountered an endless loop while trying to connect to Local WiFi.
|
||||
@@ -40,6 +40,7 @@ Steps to reproduce:
|
||||
3. ...
|
||||
4. ...
|
||||
```
|
||||
|
||||
### Sending Feature Requests
|
||||
|
||||
Feel free to post feature requests. It's helpful if you can explain exactly why the feature would be useful.
|
||||
|
||||
+519
@@ -0,0 +1,519 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file stm32f4xx_hal_conf_default.h
|
||||
* @brief HAL default configuration file.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© Copyright (c) 2017 STMicroelectronics.
|
||||
* All rights reserved.</center></h2>
|
||||
*
|
||||
* This software component is licensed by ST under BSD 3-Clause license,
|
||||
* the "License"; You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
* opensource.org/licenses/BSD-3-Clause
|
||||
*
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||
#ifndef __STM32F4xx_HAL_CONF_DEFAULT_H
|
||||
#define __STM32F4xx_HAL_CONF_DEFAULT_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
|
||||
/* ########################## Module Selection ############################## */
|
||||
/**
|
||||
* @brief Include the default list of modules to be used in the HAL driver
|
||||
* and manage module deactivation
|
||||
*/
|
||||
#include "stm32yyxx_hal_conf.h"
|
||||
#if 0
|
||||
/**
|
||||
* @brief This is the list of modules to be used in the HAL driver
|
||||
*/
|
||||
#define HAL_MODULE_ENABLED
|
||||
#define HAL_ADC_MODULE_ENABLED
|
||||
#define HAL_CAN_MODULE_ENABLED
|
||||
/*#define HAL_CAN_LEGACY_MODULE_ENABLED*/
|
||||
#define HAL_CRC_MODULE_ENABLED
|
||||
#define HAL_CEC_MODULE_ENABLED
|
||||
#define HAL_CRYP_MODULE_ENABLED
|
||||
#define HAL_DAC_MODULE_ENABLED
|
||||
#define HAL_DCMI_MODULE_ENABLED
|
||||
#define HAL_DMA_MODULE_ENABLED
|
||||
#define HAL_DMA2D_MODULE_ENABLED
|
||||
#define HAL_ETH_MODULE_ENABLED
|
||||
#define HAL_FLASH_MODULE_ENABLED
|
||||
#define HAL_NAND_MODULE_ENABLED
|
||||
#define HAL_NOR_MODULE_ENABLED
|
||||
#define HAL_PCCARD_MODULE_ENABLED
|
||||
#define HAL_SRAM_MODULE_ENABLED
|
||||
#define HAL_SDRAM_MODULE_ENABLED
|
||||
#define HAL_HASH_MODULE_ENABLED
|
||||
#define HAL_GPIO_MODULE_ENABLED
|
||||
#define HAL_EXTI_MODULE_ENABLED
|
||||
#define HAL_I2C_MODULE_ENABLED
|
||||
#define HAL_SMBUS_MODULE_ENABLED
|
||||
#define HAL_I2S_MODULE_ENABLED
|
||||
#define HAL_IWDG_MODULE_ENABLED
|
||||
#define HAL_LTDC_MODULE_ENABLED
|
||||
#define HAL_DSI_MODULE_ENABLED
|
||||
#define HAL_PWR_MODULE_ENABLED
|
||||
#define HAL_QSPI_MODULE_ENABLED
|
||||
#define HAL_RCC_MODULE_ENABLED
|
||||
#define HAL_RNG_MODULE_ENABLED
|
||||
#define HAL_RTC_MODULE_ENABLED
|
||||
#define HAL_SAI_MODULE_ENABLED
|
||||
#define HAL_SD_MODULE_ENABLED
|
||||
#define HAL_SPI_MODULE_ENABLED
|
||||
#define HAL_TIM_MODULE_ENABLED
|
||||
#define HAL_UART_MODULE_ENABLED
|
||||
#define HAL_USART_MODULE_ENABLED
|
||||
#define HAL_IRDA_MODULE_ENABLED
|
||||
#define HAL_SMARTCARD_MODULE_ENABLED
|
||||
#define HAL_WWDG_MODULE_ENABLED
|
||||
#define HAL_CORTEX_MODULE_ENABLED
|
||||
#define HAL_PCD_MODULE_ENABLED
|
||||
#define HAL_HCD_MODULE_ENABLED
|
||||
#define HAL_FMPI2C_MODULE_ENABLED
|
||||
#define HAL_FMPSMBUS_MODULE_ENABLED
|
||||
#define HAL_SPDIFRX_MODULE_ENABLED
|
||||
#define HAL_DFSDM_MODULE_ENABLED
|
||||
#define HAL_LPTIM_MODULE_ENABLED
|
||||
#define HAL_MMC_MODULE_ENABLED
|
||||
#endif
|
||||
|
||||
/* ########################## HSE/HSI Values adaptation ##################### */
|
||||
/**
|
||||
* @brief Adjust the value of External High Speed oscillator (HSE) used in your application.
|
||||
* This value is used by the RCC HAL module to compute the system frequency
|
||||
* (when HSE is used as system clock source, directly or through the PLL).
|
||||
*/
|
||||
#if !defined (HSE_VALUE)
|
||||
#define HSE_VALUE 8000000U /*!< Value of the External oscillator in Hz */
|
||||
#endif /* HSE_VALUE */
|
||||
|
||||
#if !defined (HSE_STARTUP_TIMEOUT)
|
||||
#define HSE_STARTUP_TIMEOUT 100U /*!< Time out for HSE start up, in ms */
|
||||
#endif /* HSE_STARTUP_TIMEOUT */
|
||||
|
||||
/**
|
||||
* @brief Internal High Speed oscillator (HSI) value.
|
||||
* This value is used by the RCC HAL module to compute the system frequency
|
||||
* (when HSI is used as system clock source, directly or through the PLL).
|
||||
*/
|
||||
#if !defined (HSI_VALUE)
|
||||
#define HSI_VALUE 16000000U /*!< Value of the Internal oscillator in Hz */
|
||||
#endif /* HSI_VALUE */
|
||||
|
||||
/**
|
||||
* @brief Internal Low Speed oscillator (LSI) value.
|
||||
*/
|
||||
#if !defined (LSI_VALUE)
|
||||
#define LSI_VALUE 32000U /*!< LSI Typical Value in Hz */
|
||||
#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz
|
||||
The real value may vary depending on the variations
|
||||
in voltage and temperature. */
|
||||
/**
|
||||
* @brief External Low Speed oscillator (LSE) value.
|
||||
*/
|
||||
#if !defined (LSE_VALUE)
|
||||
#define LSE_VALUE 32768U /*!< Value of the External Low Speed oscillator in Hz */
|
||||
#endif /* LSE_VALUE */
|
||||
|
||||
#if !defined (LSE_STARTUP_TIMEOUT)
|
||||
#define LSE_STARTUP_TIMEOUT 5000U /*!< Time out for LSE start up, in ms */
|
||||
#endif /* LSE_STARTUP_TIMEOUT */
|
||||
|
||||
/**
|
||||
* @brief External clock source for I2S peripheral
|
||||
* This value is used by the I2S HAL module to compute the I2S clock source
|
||||
* frequency, this source is inserted directly through I2S_CKIN pad.
|
||||
*/
|
||||
#if !defined (EXTERNAL_CLOCK_VALUE)
|
||||
#define EXTERNAL_CLOCK_VALUE 12288000U /*!< Value of the External oscillator in Hz*/
|
||||
#endif /* EXTERNAL_CLOCK_VALUE */
|
||||
|
||||
/* Tip: To avoid modifying this file each time you need to use different HSE,
|
||||
=== you can define the HSE value in your toolchain compiler preprocessor. */
|
||||
|
||||
/* ########################### System Configuration ######################### */
|
||||
/**
|
||||
* @brief This is the HAL system configuration section
|
||||
*/
|
||||
#if !defined (VDD_VALUE)
|
||||
#define VDD_VALUE 3300U /*!< Value of VDD in mv */
|
||||
#endif
|
||||
#if !defined (TICK_INT_PRIORITY)
|
||||
#define TICK_INT_PRIORITY 0x00U /*!< tick interrupt priority */
|
||||
#endif
|
||||
#if !defined (USE_RTOS)
|
||||
#define USE_RTOS 0U
|
||||
#endif
|
||||
#if !defined (PREFETCH_ENABLE)
|
||||
#define PREFETCH_ENABLE 1U
|
||||
#endif
|
||||
#if !defined (INSTRUCTION_CACHE_ENABLE)
|
||||
#define INSTRUCTION_CACHE_ENABLE 1U
|
||||
#endif
|
||||
#if !defined (DATA_CACHE_ENABLE)
|
||||
#define DATA_CACHE_ENABLE 1U
|
||||
#endif
|
||||
|
||||
#define USE_HAL_ADC_REGISTER_CALLBACKS 0U /* ADC register callback disabled */
|
||||
#define USE_HAL_CAN_REGISTER_CALLBACKS 0U /* CAN register callback disabled */
|
||||
#define USE_HAL_CEC_REGISTER_CALLBACKS 0U /* CEC register callback disabled */
|
||||
#define USE_HAL_CRYP_REGISTER_CALLBACKS 0U /* CRYP register callback disabled */
|
||||
#define USE_HAL_DAC_REGISTER_CALLBACKS 0U /* DAC register callback disabled */
|
||||
#define USE_HAL_DCMI_REGISTER_CALLBACKS 0U /* DCMI register callback disabled */
|
||||
#define USE_HAL_DFSDM_REGISTER_CALLBACKS 0U /* DFSDM register callback disabled */
|
||||
#define USE_HAL_DMA2D_REGISTER_CALLBACKS 0U /* DMA2D register callback disabled */
|
||||
#define USE_HAL_DSI_REGISTER_CALLBACKS 0U /* DSI register callback disabled */
|
||||
#define USE_HAL_ETH_REGISTER_CALLBACKS 0U /* ETH register callback disabled */
|
||||
#define USE_HAL_HASH_REGISTER_CALLBACKS 0U /* HASH register callback disabled */
|
||||
#define USE_HAL_HCD_REGISTER_CALLBACKS 0U /* HCD register callback disabled */
|
||||
#define USE_HAL_I2C_REGISTER_CALLBACKS 0U /* I2C register callback disabled */
|
||||
#define USE_HAL_FMPI2C_REGISTER_CALLBACKS 0U /* FMPI2C register callback disabled */
|
||||
#define USE_HAL_FMPSMBUS_REGISTER_CALLBACKS 0U /* FMPSMBUS register callback disabled */
|
||||
#define USE_HAL_I2S_REGISTER_CALLBACKS 0U /* I2S register callback disabled */
|
||||
#define USE_HAL_IRDA_REGISTER_CALLBACKS 0U /* IRDA register callback disabled */
|
||||
#define USE_HAL_LPTIM_REGISTER_CALLBACKS 0U /* LPTIM register callback disabled */
|
||||
#define USE_HAL_LTDC_REGISTER_CALLBACKS 0U /* LTDC register callback disabled */
|
||||
#define USE_HAL_MMC_REGISTER_CALLBACKS 0U /* MMC register callback disabled */
|
||||
#define USE_HAL_NAND_REGISTER_CALLBACKS 0U /* NAND register callback disabled */
|
||||
#define USE_HAL_NOR_REGISTER_CALLBACKS 0U /* NOR register callback disabled */
|
||||
#define USE_HAL_PCCARD_REGISTER_CALLBACKS 0U /* PCCARD register callback disabled */
|
||||
#define USE_HAL_PCD_REGISTER_CALLBACKS 0U /* PCD register callback disabled */
|
||||
#define USE_HAL_QSPI_REGISTER_CALLBACKS 0U /* QSPI register callback disabled */
|
||||
#define USE_HAL_RNG_REGISTER_CALLBACKS 0U /* RNG register callback disabled */
|
||||
#define USE_HAL_RTC_REGISTER_CALLBACKS 0U /* RTC register callback disabled */
|
||||
#define USE_HAL_SAI_REGISTER_CALLBACKS 0U /* SAI register callback disabled */
|
||||
#define USE_HAL_SD_REGISTER_CALLBACKS 0U /* SD register callback disabled */
|
||||
#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0U /* SMARTCARD register callback disabled */
|
||||
#define USE_HAL_SDRAM_REGISTER_CALLBACKS 0U /* SDRAM register callback disabled */
|
||||
#define USE_HAL_SRAM_REGISTER_CALLBACKS 0U /* SRAM register callback disabled */
|
||||
#define USE_HAL_SPDIFRX_REGISTER_CALLBACKS 0U /* SPDIFRX register callback disabled */
|
||||
#define USE_HAL_SMBUS_REGISTER_CALLBACKS 0U /* SMBUS register callback disabled */
|
||||
#define USE_HAL_SPI_REGISTER_CALLBACKS 0U /* SPI register callback disabled */
|
||||
#define USE_HAL_TIM_REGISTER_CALLBACKS 0U /* TIM register callback disabled */
|
||||
#define USE_HAL_UART_REGISTER_CALLBACKS 0U /* UART register callback disabled */
|
||||
#define USE_HAL_USART_REGISTER_CALLBACKS 0U /* USART register callback disabled */
|
||||
#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U /* WWDG register callback disabled */
|
||||
|
||||
/* ########################## Assert Selection ############################## */
|
||||
/**
|
||||
* @brief Uncomment the line below to expanse the "assert_param" macro in the
|
||||
* HAL drivers code
|
||||
*/
|
||||
/* #define USE_FULL_ASSERT 1U */
|
||||
|
||||
/* ################## Ethernet peripheral configuration ##################### */
|
||||
|
||||
/* Section 1 : Ethernet peripheral configuration */
|
||||
|
||||
/* MAC ADDRESS: MAC_ADDR0:MAC_ADDR1:MAC_ADDR2:MAC_ADDR3:MAC_ADDR4:MAC_ADDR5 */
|
||||
#define MAC_ADDR0 2U
|
||||
#define MAC_ADDR1 0U
|
||||
#define MAC_ADDR2 0U
|
||||
#define MAC_ADDR3 0U
|
||||
#define MAC_ADDR4 0U
|
||||
#define MAC_ADDR5 0U
|
||||
|
||||
/* Definition of the Ethernet driver buffers size and count */
|
||||
#define ETH_RX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for receive */
|
||||
#define ETH_TX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for transmit */
|
||||
#define ETH_RXBUFNB (5U) /* 5 Rx buffers of size ETH_RX_BUF_SIZE */
|
||||
#define ETH_TXBUFNB (5U) /* 5 Tx buffers of size ETH_TX_BUF_SIZE */
|
||||
|
||||
/* Section 2: PHY configuration section */
|
||||
/* LAN8742A PHY Address*/
|
||||
////////////////////////////////
|
||||
//#define LAN8742A_PHY_ADDRESS 0x00U
|
||||
/* Section 2: PHY configuration section */
|
||||
#if !defined (LAN8742A_PHY_ADDRESS)
|
||||
/* LAN8742A PHY Address*/
|
||||
#define LAN8742A_PHY_ADDRESS 0x00U
|
||||
#endif
|
||||
////////////////////////////////
|
||||
/* PHY Reset delay these values are based on a 1 ms Systick interrupt*/
|
||||
#define PHY_RESET_DELAY 0x000000FFU
|
||||
/* PHY Configuration delay */
|
||||
#define PHY_CONFIG_DELAY 0x00000FFFU
|
||||
|
||||
#define PHY_READ_TO 0x0000FFFFU
|
||||
#define PHY_WRITE_TO 0x0000FFFFU
|
||||
|
||||
/* Section 3: Common PHY Registers */
|
||||
|
||||
#define PHY_BCR ((uint16_t)0x0000) /*!< Transceiver Basic Control Register */
|
||||
#define PHY_BSR ((uint16_t)0x0001) /*!< Transceiver Basic Status Register */
|
||||
|
||||
#define PHY_RESET ((uint16_t)0x8000) /*!< PHY Reset */
|
||||
#define PHY_LOOPBACK ((uint16_t)0x4000) /*!< Select loop-back mode */
|
||||
#define PHY_FULLDUPLEX_100M ((uint16_t)0x2100) /*!< Set the full-duplex mode at 100 Mb/s */
|
||||
#define PHY_HALFDUPLEX_100M ((uint16_t)0x2000) /*!< Set the half-duplex mode at 100 Mb/s */
|
||||
#define PHY_FULLDUPLEX_10M ((uint16_t)0x0100) /*!< Set the full-duplex mode at 10 Mb/s */
|
||||
#define PHY_HALFDUPLEX_10M ((uint16_t)0x0000) /*!< Set the half-duplex mode at 10 Mb/s */
|
||||
#define PHY_AUTONEGOTIATION ((uint16_t)0x1000) /*!< Enable auto-negotiation function */
|
||||
#define PHY_RESTART_AUTONEGOTIATION ((uint16_t)0x0200) /*!< Restart auto-negotiation function */
|
||||
#define PHY_POWERDOWN ((uint16_t)0x0800) /*!< Select the power down mode */
|
||||
#define PHY_ISOLATE ((uint16_t)0x0400) /*!< Isolate PHY from MII */
|
||||
|
||||
#define PHY_AUTONEGO_COMPLETE ((uint16_t)0x0020) /*!< Auto-Negotiation process completed */
|
||||
#define PHY_LINKED_STATUS ((uint16_t)0x0004) /*!< Valid link established */
|
||||
#define PHY_JABBER_DETECTION ((uint16_t)0x0002) /*!< Jabber condition detected */
|
||||
|
||||
/* Section 4: Extended PHY Registers */
|
||||
|
||||
#define PHY_SR ((uint16_t)0x1F) /*!< PHY special control/ status register Offset */
|
||||
|
||||
#define PHY_SPEED_STATUS ((uint16_t)0x0004) /*!< PHY Speed mask */
|
||||
#define PHY_DUPLEX_STATUS ((uint16_t)0x0010) /*!< PHY Duplex mask */
|
||||
|
||||
|
||||
#define PHY_ISFR ((uint16_t)0x1D) /*!< PHY Interrupt Source Flag register Offset */
|
||||
#define PHY_IMR ((uint16_t)0x1E) /*!< PHY Interrupt Mask register Offset */
|
||||
#define PHY_ISFR_INT4 ((uint16_t)0x0010) /*!< PHY Link down inturrupt */
|
||||
|
||||
/* ################## SPI peripheral configuration ########################## */
|
||||
|
||||
/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver
|
||||
* Activated: CRC code is present inside driver
|
||||
* Deactivated: CRC code cleaned from driver
|
||||
*/
|
||||
#if !defined (USE_SPI_CRC)
|
||||
#define USE_SPI_CRC 0U
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
/**
|
||||
* @brief Include module's header file
|
||||
*/
|
||||
|
||||
#ifdef HAL_RCC_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_rcc.h"
|
||||
#endif /* HAL_RCC_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_GPIO_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_gpio.h"
|
||||
#endif /* HAL_GPIO_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_EXTI_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_exti.h"
|
||||
#endif /* HAL_EXTI_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_DMA_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_dma.h"
|
||||
#endif /* HAL_DMA_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_CORTEX_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_cortex.h"
|
||||
#endif /* HAL_CORTEX_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_ADC_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_adc.h"
|
||||
#endif /* HAL_ADC_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_CAN_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_can.h"
|
||||
#endif /* HAL_CAN_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_CAN_LEGACY_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_can_legacy.h"
|
||||
#endif /* HAL_CAN_LEGACY_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_CRC_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_crc.h"
|
||||
#endif /* HAL_CRC_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_CRYP_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_cryp.h"
|
||||
#endif /* HAL_CRYP_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_DMA2D_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_dma2d.h"
|
||||
#endif /* HAL_DMA2D_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_DAC_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_dac.h"
|
||||
#endif /* HAL_DAC_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_DCMI_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_dcmi.h"
|
||||
#endif /* HAL_DCMI_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_ETH_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_eth.h"
|
||||
#endif /* HAL_ETH_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_FLASH_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_flash.h"
|
||||
#endif /* HAL_FLASH_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_SRAM_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_sram.h"
|
||||
#endif /* HAL_SRAM_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_NOR_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_nor.h"
|
||||
#endif /* HAL_NOR_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_NAND_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_nand.h"
|
||||
#endif /* HAL_NAND_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_PCCARD_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_pccard.h"
|
||||
#endif /* HAL_PCCARD_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_SDRAM_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_sdram.h"
|
||||
#endif /* HAL_SDRAM_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_HASH_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_hash.h"
|
||||
#endif /* HAL_HASH_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_I2C_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_i2c.h"
|
||||
#endif /* HAL_I2C_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_SMBUS_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_smbus.h"
|
||||
#endif /* HAL_SMBUS_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_I2S_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_i2s.h"
|
||||
#endif /* HAL_I2S_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_IWDG_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_iwdg.h"
|
||||
#endif /* HAL_IWDG_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_LTDC_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_ltdc.h"
|
||||
#endif /* HAL_LTDC_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_PWR_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_pwr.h"
|
||||
#endif /* HAL_PWR_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_RNG_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_rng.h"
|
||||
#endif /* HAL_RNG_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_RTC_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_rtc.h"
|
||||
#endif /* HAL_RTC_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_SAI_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_sai.h"
|
||||
#endif /* HAL_SAI_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_SD_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_sd.h"
|
||||
#endif /* HAL_SD_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_SPI_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_spi.h"
|
||||
#endif /* HAL_SPI_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_TIM_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_tim.h"
|
||||
#endif /* HAL_TIM_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_UART_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_uart.h"
|
||||
#endif /* HAL_UART_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_USART_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_usart.h"
|
||||
#endif /* HAL_USART_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_IRDA_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_irda.h"
|
||||
#endif /* HAL_IRDA_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_SMARTCARD_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_smartcard.h"
|
||||
#endif /* HAL_SMARTCARD_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_WWDG_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_wwdg.h"
|
||||
#endif /* HAL_WWDG_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_PCD_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_pcd.h"
|
||||
#endif /* HAL_PCD_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_HCD_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_hcd.h"
|
||||
#endif /* HAL_HCD_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_DSI_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_dsi.h"
|
||||
#endif /* HAL_DSI_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_QSPI_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_qspi.h"
|
||||
#endif /* HAL_QSPI_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_CEC_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_cec.h"
|
||||
#endif /* HAL_CEC_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_FMPI2C_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_fmpi2c.h"
|
||||
#endif /* HAL_FMPI2C_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_FMPSMBUS_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_fmpsmbus.h"
|
||||
#endif /* HAL_FMPSMBUS_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_SPDIFRX_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_spdifrx.h"
|
||||
#endif /* HAL_SPDIFRX_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_DFSDM_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_dfsdm.h"
|
||||
#endif /* HAL_DFSDM_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_LPTIM_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_lptim.h"
|
||||
#endif /* HAL_LPTIM_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_MMC_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_mmc.h"
|
||||
#endif /* HAL_MMC_MODULE_ENABLED */
|
||||
|
||||
/* Exported macro ------------------------------------------------------------*/
|
||||
#ifdef USE_FULL_ASSERT
|
||||
/**
|
||||
* @brief The assert_param macro is used for function's parameters check.
|
||||
* @param expr If expr is false, it calls assert_failed function
|
||||
* which reports the name of the source file and the source
|
||||
* line number of the call that failed.
|
||||
* If expr is true, it returns no value.
|
||||
* @retval None
|
||||
*/
|
||||
#define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__))
|
||||
/* Exported functions ------------------------------------------------------- */
|
||||
void assert_failed(uint8_t *file, uint32_t line);
|
||||
#else
|
||||
#define assert_param(expr) ((void)0U)
|
||||
#endif /* USE_FULL_ASSERT */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __STM32F4xx_HAL_CONF_DEFAULT_H */
|
||||
|
||||
|
||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
||||
+511
@@ -0,0 +1,511 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file stm32f7xx_hal_conf_default.h
|
||||
* @brief HAL default configuration file.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© Copyright (c) 2017 STMicroelectronics.
|
||||
* All rights reserved.</center></h2>
|
||||
*
|
||||
* This software component is licensed by ST under BSD 3-Clause license,
|
||||
* the "License"; You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
* opensource.org/licenses/BSD-3-Clause
|
||||
*
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||
#ifndef __STM32F7xx_HAL_CONF_DEFAULT_H
|
||||
#define __STM32F7xx_HAL_CONF_DEFAULT_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
|
||||
/* ########################## Module Selection ############################## */
|
||||
/**
|
||||
* @brief Include the default list of modules to be used in the HAL driver
|
||||
* and manage module deactivation
|
||||
*/
|
||||
#include "stm32yyxx_hal_conf.h"
|
||||
#if 0
|
||||
/**
|
||||
* @brief This is the list of modules to be used in the HAL driver
|
||||
*/
|
||||
#define HAL_MODULE_ENABLED
|
||||
#define HAL_ADC_MODULE_ENABLED
|
||||
#define HAL_CAN_MODULE_ENABLED
|
||||
#define HAL_CAN_LEGACY_MODULE_ENABLED
|
||||
#define HAL_CEC_MODULE_ENABLED
|
||||
#define HAL_CRC_MODULE_ENABLED
|
||||
#define HAL_CRYP_MODULE_ENABLED
|
||||
#define HAL_DAC_MODULE_ENABLED
|
||||
#define HAL_DCMI_MODULE_ENABLED
|
||||
#define HAL_DMA_MODULE_ENABLED
|
||||
#define HAL_DMA2D_MODULE_ENABLED
|
||||
#define HAL_ETH_MODULE_ENABLED
|
||||
#define HAL_EXTI_MODULE_ENABLED
|
||||
#define HAL_FLASH_MODULE_ENABLED
|
||||
#define HAL_NAND_MODULE_ENABLED
|
||||
#define HAL_NOR_MODULE_ENABLED
|
||||
#define HAL_SRAM_MODULE_ENABLED
|
||||
#define HAL_SDRAM_MODULE_ENABLED
|
||||
#define HAL_HASH_MODULE_ENABLED
|
||||
#define HAL_GPIO_MODULE_ENABLED
|
||||
#define HAL_I2C_MODULE_ENABLED
|
||||
#define HAL_I2S_MODULE_ENABLED
|
||||
#define HAL_IWDG_MODULE_ENABLED
|
||||
#define HAL_LPTIM_MODULE_ENABLED
|
||||
#define HAL_LTDC_MODULE_ENABLED
|
||||
#define HAL_PWR_MODULE_ENABLED
|
||||
#define HAL_QSPI_MODULE_ENABLED
|
||||
#define HAL_RCC_MODULE_ENABLED
|
||||
#define HAL_RNG_MODULE_ENABLED
|
||||
#define HAL_RTC_MODULE_ENABLED
|
||||
#define HAL_SAI_MODULE_ENABLED
|
||||
#define HAL_SD_MODULE_ENABLED
|
||||
#define HAL_SPDIFRX_MODULE_ENABLED
|
||||
#define HAL_SPI_MODULE_ENABLED
|
||||
#define HAL_TIM_MODULE_ENABLED
|
||||
#define HAL_UART_MODULE_ENABLED
|
||||
#define HAL_USART_MODULE_ENABLED
|
||||
#define HAL_IRDA_MODULE_ENABLED
|
||||
#define HAL_SMARTCARD_MODULE_ENABLED
|
||||
#define HAL_WWDG_MODULE_ENABLED
|
||||
#define HAL_CORTEX_MODULE_ENABLED
|
||||
#define HAL_PCD_MODULE_ENABLED
|
||||
#define HAL_HCD_MODULE_ENABLED
|
||||
#define HAL_DFSDM_MODULE_ENABLED
|
||||
#define HAL_DSI_MODULE_ENABLED
|
||||
#define HAL_JPEG_MODULE_ENABLED
|
||||
#define HAL_MDIOS_MODULE_ENABLED
|
||||
#define HAL_SMBUS_MODULE_ENABLED
|
||||
#define HAL_MMC_MODULE_ENABLED
|
||||
#endif
|
||||
|
||||
/* ########################## HSE/HSI Values adaptation ##################### */
|
||||
/**
|
||||
* @brief Adjust the value of External High Speed oscillator (HSE) used in your application.
|
||||
* This value is used by the RCC HAL module to compute the system frequency
|
||||
* (when HSE is used as system clock source, directly or through the PLL).
|
||||
*/
|
||||
#if !defined (HSE_VALUE)
|
||||
#define HSE_VALUE 25000000U /*!< Value of the External oscillator in Hz */
|
||||
#endif /* HSE_VALUE */
|
||||
|
||||
#if !defined (HSE_STARTUP_TIMEOUT)
|
||||
#define HSE_STARTUP_TIMEOUT 100U /*!< Time out for HSE start up, in ms */
|
||||
#endif /* HSE_STARTUP_TIMEOUT */
|
||||
|
||||
/**
|
||||
* @brief Internal High Speed oscillator (HSI) value.
|
||||
* This value is used by the RCC HAL module to compute the system frequency
|
||||
* (when HSI is used as system clock source, directly or through the PLL).
|
||||
*/
|
||||
#if !defined (HSI_VALUE)
|
||||
#define HSI_VALUE 16000000U /*!< Value of the Internal oscillator in Hz*/
|
||||
#endif /* HSI_VALUE */
|
||||
|
||||
/**
|
||||
* @brief Internal Low Speed oscillator (LSI) value.
|
||||
*/
|
||||
#if !defined (LSI_VALUE)
|
||||
#define LSI_VALUE 32000U /*!< LSI Typical Value in Hz*/
|
||||
#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz
|
||||
The real value may vary depending on the variations
|
||||
in voltage and temperature. */
|
||||
/**
|
||||
* @brief External Low Speed oscillator (LSE) value.
|
||||
*/
|
||||
#if !defined (LSE_VALUE)
|
||||
#define LSE_VALUE 32768U /*!< Value of the External Low Speed oscillator in Hz */
|
||||
#endif /* LSE_VALUE */
|
||||
|
||||
#if !defined (LSE_STARTUP_TIMEOUT)
|
||||
#define LSE_STARTUP_TIMEOUT 5000U /*!< Time out for LSE start up, in ms */
|
||||
#endif /* LSE_STARTUP_TIMEOUT */
|
||||
|
||||
/**
|
||||
* @brief External clock source for I2S peripheral
|
||||
* This value is used by the I2S HAL module to compute the I2S clock source
|
||||
* frequency, this source is inserted directly through I2S_CKIN pad.
|
||||
*/
|
||||
#if !defined (EXTERNAL_CLOCK_VALUE)
|
||||
#define EXTERNAL_CLOCK_VALUE 12288000U /*!< Value of the Internal oscillator in Hz*/
|
||||
#endif /* EXTERNAL_CLOCK_VALUE */
|
||||
|
||||
/* Tip: To avoid modifying this file each time you need to use different HSE,
|
||||
=== you can define the HSE value in your toolchain compiler preprocessor. */
|
||||
|
||||
/* ########################### System Configuration ######################### */
|
||||
/**
|
||||
* @brief This is the HAL system configuration section
|
||||
*/
|
||||
#if !defined (VDD_VALUE)
|
||||
#define VDD_VALUE 3300U /*!< Value of VDD in mv */
|
||||
#endif
|
||||
#if !defined (TICK_INT_PRIORITY)
|
||||
#define TICK_INT_PRIORITY 0x00U /*!< tick interrupt priority */
|
||||
#endif
|
||||
#if !defined (USE_RTOS)
|
||||
#define USE_RTOS 0U
|
||||
#endif
|
||||
#if !defined (PREFETCH_ENABLE)
|
||||
#define PREFETCH_ENABLE 1U /* To enable prefetch */
|
||||
#endif
|
||||
#if !defined (ART_ACCLERATOR_ENABLE)
|
||||
#define ART_ACCLERATOR_ENABLE 1U /* To enable ART Accelerator */
|
||||
#endif
|
||||
|
||||
#define USE_HAL_ADC_REGISTER_CALLBACKS 0U /* ADC register callback disabled */
|
||||
#define USE_HAL_CAN_REGISTER_CALLBACKS 0U /* CAN register callback disabled */
|
||||
#define USE_HAL_CEC_REGISTER_CALLBACKS 0U /* CEC register callback disabled */
|
||||
#define USE_HAL_CRYP_REGISTER_CALLBACKS 0U /* CRYP register callback disabled */
|
||||
#define USE_HAL_DAC_REGISTER_CALLBACKS 0U /* DAC register callback disabled */
|
||||
#define USE_HAL_DCMI_REGISTER_CALLBACKS 0U /* DCMI register callback disabled */
|
||||
#define USE_HAL_DFSDM_REGISTER_CALLBACKS 0U /* DFSDM register callback disabled */
|
||||
#define USE_HAL_DMA2D_REGISTER_CALLBACKS 0U /* DMA2D register callback disabled */
|
||||
#define USE_HAL_DSI_REGISTER_CALLBACKS 0U /* DSI register callback disabled */
|
||||
#define USE_HAL_ETH_REGISTER_CALLBACKS 0U /* ETH register callback disabled */
|
||||
#define USE_HAL_HASH_REGISTER_CALLBACKS 0U /* HASH register callback disabled */
|
||||
#define USE_HAL_HCD_REGISTER_CALLBACKS 0U /* HCD register callback disabled */
|
||||
#define USE_HAL_I2C_REGISTER_CALLBACKS 0U /* I2C register callback disabled */
|
||||
#define USE_HAL_I2S_REGISTER_CALLBACKS 0U /* I2S register callback disabled */
|
||||
#define USE_HAL_IRDA_REGISTER_CALLBACKS 0U /* IRDA register callback disabled */
|
||||
#define USE_HAL_JPEG_REGISTER_CALLBACKS 0U /* JPEG register callback disabled */
|
||||
#define USE_HAL_LPTIM_REGISTER_CALLBACKS 0U /* LPTIM register callback disabled */
|
||||
#define USE_HAL_LTDC_REGISTER_CALLBACKS 0U /* LTDC register callback disabled */
|
||||
#define USE_HAL_MDIOS_REGISTER_CALLBACKS 0U /* MDIOS register callback disabled */
|
||||
#define USE_HAL_MMC_REGISTER_CALLBACKS 0U /* MMC register callback disabled */
|
||||
#define USE_HAL_NAND_REGISTER_CALLBACKS 0U /* NAND register callback disabled */
|
||||
#define USE_HAL_NOR_REGISTER_CALLBACKS 0U /* NOR register callback disabled */
|
||||
#define USE_HAL_PCD_REGISTER_CALLBACKS 0U /* PCD register callback disabled */
|
||||
#define USE_HAL_QSPI_REGISTER_CALLBACKS 0U /* QSPI register callback disabled */
|
||||
#define USE_HAL_RNG_REGISTER_CALLBACKS 0U /* RNG register callback disabled */
|
||||
#define USE_HAL_RTC_REGISTER_CALLBACKS 0U /* RTC register callback disabled */
|
||||
#define USE_HAL_SAI_REGISTER_CALLBACKS 0U /* SAI register callback disabled */
|
||||
#define USE_HAL_SD_REGISTER_CALLBACKS 0U /* SD register callback disabled */
|
||||
#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0U /* SMARTCARD register callback disabled */
|
||||
#define USE_HAL_SDRAM_REGISTER_CALLBACKS 0U /* SDRAM register callback disabled */
|
||||
#define USE_HAL_SRAM_REGISTER_CALLBACKS 0U /* SRAM register callback disabled */
|
||||
#define USE_HAL_SPDIFRX_REGISTER_CALLBACKS 0U /* SPDIFRX register callback disabled */
|
||||
#define USE_HAL_SMBUS_REGISTER_CALLBACKS 0U /* SMBUS register callback disabled */
|
||||
#define USE_HAL_SPI_REGISTER_CALLBACKS 0U /* SPI register callback disabled */
|
||||
#define USE_HAL_TIM_REGISTER_CALLBACKS 0U /* TIM register callback disabled */
|
||||
#define USE_HAL_UART_REGISTER_CALLBACKS 0U /* UART register callback disabled */
|
||||
#define USE_HAL_USART_REGISTER_CALLBACKS 0U /* USART register callback disabled */
|
||||
#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U /* WWDG register callback disabled */
|
||||
|
||||
/* ########################## Assert Selection ############################## */
|
||||
/**
|
||||
* @brief Uncomment the line below to expanse the "assert_param" macro in the
|
||||
* HAL drivers code
|
||||
*/
|
||||
/* #define USE_FULL_ASSERT 1 */
|
||||
|
||||
/* ################## Ethernet peripheral configuration ##################### */
|
||||
|
||||
/* Section 1 : Ethernet peripheral configuration */
|
||||
|
||||
/* MAC ADDRESS: MAC_ADDR0:MAC_ADDR1:MAC_ADDR2:MAC_ADDR3:MAC_ADDR4:MAC_ADDR5 */
|
||||
#define MAC_ADDR0 2U
|
||||
#define MAC_ADDR1 0U
|
||||
#define MAC_ADDR2 0U
|
||||
#define MAC_ADDR3 0U
|
||||
#define MAC_ADDR4 0U
|
||||
#define MAC_ADDR5 0U
|
||||
|
||||
/* Definition of the Ethernet driver buffers size and count */
|
||||
#define ETH_RX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for receive */
|
||||
#define ETH_TX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for transmit */
|
||||
#define ETH_RXBUFNB 4U /* 4 Rx buffers of size ETH_RX_BUF_SIZE */
|
||||
#define ETH_TXBUFNB 4U /* 4 Tx buffers of size ETH_TX_BUF_SIZE */
|
||||
|
||||
/* Section 2: PHY configuration section */
|
||||
/* LAN8742A PHY Address*/
|
||||
////////////////////////////////
|
||||
//#define LAN8742A_PHY_ADDRESS 0x00U
|
||||
/* Section 2: PHY configuration section */
|
||||
#if !defined (LAN8742A_PHY_ADDRESS)
|
||||
/* LAN8742A PHY Address*/
|
||||
#define LAN8742A_PHY_ADDRESS 0x00U
|
||||
#endif
|
||||
////////////////////////////////
|
||||
/* PHY Reset delay these values are based on a 1 ms Systick interrupt*/
|
||||
#define PHY_RESET_DELAY 0x00000FFFU
|
||||
/* PHY Configuration delay */
|
||||
#define PHY_CONFIG_DELAY 0x00000FFFU
|
||||
|
||||
#define PHY_READ_TO 0x0000FFFFU
|
||||
#define PHY_WRITE_TO 0x0000FFFFU
|
||||
|
||||
/* Section 3: Common PHY Registers */
|
||||
|
||||
#define PHY_BCR ((uint16_t)0x00U) /*!< Transceiver Basic Control Register */
|
||||
#define PHY_BSR ((uint16_t)0x01U) /*!< Transceiver Basic Status Register */
|
||||
|
||||
#define PHY_RESET ((uint16_t)0x8000U) /*!< PHY Reset */
|
||||
#define PHY_LOOPBACK ((uint16_t)0x4000U) /*!< Select loop-back mode */
|
||||
#define PHY_FULLDUPLEX_100M ((uint16_t)0x2100U) /*!< Set the full-duplex mode at 100 Mb/s */
|
||||
#define PHY_HALFDUPLEX_100M ((uint16_t)0x2000U) /*!< Set the half-duplex mode at 100 Mb/s */
|
||||
#define PHY_FULLDUPLEX_10M ((uint16_t)0x0100U) /*!< Set the full-duplex mode at 10 Mb/s */
|
||||
#define PHY_HALFDUPLEX_10M ((uint16_t)0x0000U) /*!< Set the half-duplex mode at 10 Mb/s */
|
||||
#define PHY_AUTONEGOTIATION ((uint16_t)0x1000U) /*!< Enable auto-negotiation function */
|
||||
#define PHY_RESTART_AUTONEGOTIATION ((uint16_t)0x0200U) /*!< Restart auto-negotiation function */
|
||||
#define PHY_POWERDOWN ((uint16_t)0x0800U) /*!< Select the power down mode */
|
||||
#define PHY_ISOLATE ((uint16_t)0x0400U) /*!< Isolate PHY from MII */
|
||||
|
||||
#define PHY_AUTONEGO_COMPLETE ((uint16_t)0x0020U) /*!< Auto-Negotiation process completed */
|
||||
#define PHY_LINKED_STATUS ((uint16_t)0x0004U) /*!< Valid link established */
|
||||
#define PHY_JABBER_DETECTION ((uint16_t)0x0002U) /*!< Jabber condition detected */
|
||||
|
||||
/* Section 4: Extended PHY Registers */
|
||||
|
||||
#define PHY_SR ((uint16_t)0x1FU) /*!< PHY special control/ status register Offset */
|
||||
|
||||
#define PHY_SPEED_STATUS ((uint16_t)0x0004U) /*!< PHY Speed mask */
|
||||
#define PHY_DUPLEX_STATUS ((uint16_t)0x0010U) /*!< PHY Duplex mask */
|
||||
|
||||
|
||||
#define PHY_ISFR ((uint16_t)0x01DU) /*!< PHY Interrupt Source Flag register Offset */
|
||||
#define PHY_IMR ((uint16_t)0x001E) /*!< PHY Interrupt Mask register Offset */
|
||||
#define PHY_ISFR_INT4 ((uint16_t)0x0010U) /*!< PHY Link down inturrupt */
|
||||
|
||||
/* ################## SPI peripheral configuration ########################## */
|
||||
|
||||
/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver
|
||||
* Activated: CRC code is present inside driver
|
||||
* Deactivated: CRC code cleaned from driver
|
||||
*/
|
||||
#if !defined (USE_SPI_CRC)
|
||||
#define USE_SPI_CRC 0U
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
/**
|
||||
* @brief Include module's header file
|
||||
*/
|
||||
|
||||
#ifdef HAL_RCC_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_rcc.h"
|
||||
#endif /* HAL_RCC_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_GPIO_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_gpio.h"
|
||||
#endif /* HAL_GPIO_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_DMA_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_dma.h"
|
||||
#endif /* HAL_DMA_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_CORTEX_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_cortex.h"
|
||||
#endif /* HAL_CORTEX_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_ADC_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_adc.h"
|
||||
#endif /* HAL_ADC_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_CAN_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_can.h"
|
||||
#endif /* HAL_CAN_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_CAN_LEGACY_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_can_legacy.h"
|
||||
#endif /* HAL_CAN_LEGACY_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_CEC_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_cec.h"
|
||||
#endif /* HAL_CEC_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_CRC_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_crc.h"
|
||||
#endif /* HAL_CRC_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_CRYP_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_cryp.h"
|
||||
#endif /* HAL_CRYP_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_DMA2D_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_dma2d.h"
|
||||
#endif /* HAL_DMA2D_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_DAC_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_dac.h"
|
||||
#endif /* HAL_DAC_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_DCMI_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_dcmi.h"
|
||||
#endif /* HAL_DCMI_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_ETH_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_eth.h"
|
||||
#endif /* HAL_ETH_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_EXTI_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_exti.h"
|
||||
#endif /* HAL_EXTI_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_FLASH_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_flash.h"
|
||||
#endif /* HAL_FLASH_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_SRAM_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_sram.h"
|
||||
#endif /* HAL_SRAM_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_NOR_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_nor.h"
|
||||
#endif /* HAL_NOR_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_NAND_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_nand.h"
|
||||
#endif /* HAL_NAND_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_SDRAM_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_sdram.h"
|
||||
#endif /* HAL_SDRAM_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_HASH_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_hash.h"
|
||||
#endif /* HAL_HASH_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_I2C_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_i2c.h"
|
||||
#endif /* HAL_I2C_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_I2S_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_i2s.h"
|
||||
#endif /* HAL_I2S_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_IWDG_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_iwdg.h"
|
||||
#endif /* HAL_IWDG_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_LPTIM_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_lptim.h"
|
||||
#endif /* HAL_LPTIM_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_LTDC_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_ltdc.h"
|
||||
#endif /* HAL_LTDC_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_PWR_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_pwr.h"
|
||||
#endif /* HAL_PWR_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_QSPI_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_qspi.h"
|
||||
#endif /* HAL_QSPI_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_RNG_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_rng.h"
|
||||
#endif /* HAL_RNG_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_RTC_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_rtc.h"
|
||||
#endif /* HAL_RTC_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_SAI_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_sai.h"
|
||||
#endif /* HAL_SAI_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_SD_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_sd.h"
|
||||
#endif /* HAL_SD_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_SPDIFRX_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_spdifrx.h"
|
||||
#endif /* HAL_SPDIFRX_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_SPI_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_spi.h"
|
||||
#endif /* HAL_SPI_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_TIM_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_tim.h"
|
||||
#endif /* HAL_TIM_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_UART_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_uart.h"
|
||||
#endif /* HAL_UART_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_USART_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_usart.h"
|
||||
#endif /* HAL_USART_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_IRDA_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_irda.h"
|
||||
#endif /* HAL_IRDA_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_SMARTCARD_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_smartcard.h"
|
||||
#endif /* HAL_SMARTCARD_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_WWDG_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_wwdg.h"
|
||||
#endif /* HAL_WWDG_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_PCD_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_pcd.h"
|
||||
#endif /* HAL_PCD_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_HCD_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_hcd.h"
|
||||
#endif /* HAL_HCD_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_DFSDM_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_dfsdm.h"
|
||||
#endif /* HAL_DFSDM_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_DSI_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_dsi.h"
|
||||
#endif /* HAL_DSI_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_JPEG_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_jpeg.h"
|
||||
#endif /* HAL_JPEG_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_MDIOS_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_mdios.h"
|
||||
#endif /* HAL_MDIOS_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_SMBUS_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_smbus.h"
|
||||
#endif /* HAL_SMBUS_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_MMC_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_mmc.h"
|
||||
#endif /* HAL_MMC_MODULE_ENABLED */
|
||||
|
||||
/* Exported macro ------------------------------------------------------------*/
|
||||
#ifdef USE_FULL_ASSERT
|
||||
/**
|
||||
* @brief The assert_param macro is used for function's parameters check.
|
||||
* @param expr If expr is false, it calls assert_failed function
|
||||
* which reports the name of the source file and the source
|
||||
* line number of the call that failed.
|
||||
* If expr is true, it returns no value.
|
||||
* @retval None
|
||||
*/
|
||||
#define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__))
|
||||
/* Exported functions ------------------------------------------------------- */
|
||||
void assert_failed(uint8_t *file, uint32_t line);
|
||||
#else
|
||||
#define assert_param(expr) ((void)0U)
|
||||
#endif /* USE_FULL_ASSERT */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __STM32F7xx_HAL_CONF_DEFAULT_H */
|
||||
|
||||
|
||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
||||
+274
@@ -0,0 +1,274 @@
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (c) 2020-2021, STMicroelectronics
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software component is licensed by ST under BSD 3-Clause license,
|
||||
* the "License"; You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
* opensource.org/licenses/BSD-3-Clause
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Pins
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
#define PG9 0
|
||||
#define PG14 1
|
||||
#define PF15 2
|
||||
#define PE13 3
|
||||
#define PF14 4
|
||||
#define PE11 5
|
||||
#define PE9 6
|
||||
#define PF13 7
|
||||
#define PF12 8
|
||||
#define PD15 9
|
||||
#define PD14 10
|
||||
#define PA7 PIN_A10
|
||||
#define PA6 PIN_A11
|
||||
#define PA5 PIN_A12
|
||||
#define PB9 14
|
||||
#define PB8 15
|
||||
#define PC6 16
|
||||
#define PB15 17
|
||||
#define PB13 18
|
||||
#define PB12 19
|
||||
#define PA15 20
|
||||
#define PC7 21
|
||||
#define PB5 22
|
||||
#define PB3 23
|
||||
#define PA4 PIN_A13
|
||||
#define PB4 25
|
||||
#define PB6 26
|
||||
#define PB2 27
|
||||
#define PD13 28
|
||||
#define PD12 29
|
||||
#define PD11 30
|
||||
#define PE2 31
|
||||
#define PA0 PIN_A14
|
||||
#define PB0 PIN_A23 // LED_GREEN
|
||||
#define PE0 34
|
||||
#define PB11 35
|
||||
#define PB10 36
|
||||
#define PE15 37
|
||||
#define PE14 38
|
||||
#define PE12 39
|
||||
#define PE10 40
|
||||
#define PE7 41
|
||||
#define PE8 42
|
||||
#define PC8 43
|
||||
#define PC9 44
|
||||
#define PC10 45
|
||||
#define PC11 46
|
||||
#define PC12 47
|
||||
#define PD2 48
|
||||
#define PG2 49
|
||||
#define PG3 50
|
||||
#define PD7 51
|
||||
#define PD6 52
|
||||
#define PD5 53
|
||||
#define PD4 54
|
||||
#define PD3 55
|
||||
// 56 is PE2 (31)
|
||||
#define PE4 57
|
||||
#define PE5 58
|
||||
#define PE6 59
|
||||
#define PE3 60
|
||||
#define PF8 PIN_A15
|
||||
#define PF7 PIN_A16
|
||||
#define PF9 PIN_A17
|
||||
#define PG1 64
|
||||
#define PG0 65
|
||||
#define PD1 66
|
||||
#define PD0 67
|
||||
#define PF0 68
|
||||
#define PF1 69
|
||||
#define PF2 70
|
||||
// 71 is PA7 (11)
|
||||
// 72 is NC
|
||||
#define PB7 73 // LED_BLUE
|
||||
#define PB14 74 // LED_RED
|
||||
#define PC13 75 // USER_BTN
|
||||
#define PD9 76 // Serial Rx
|
||||
#define PD8 77 // Serial Tx
|
||||
#define PA3 PIN_A0
|
||||
#define PC0 PIN_A1
|
||||
#define PC3 PIN_A2
|
||||
#define PF3 PIN_A3
|
||||
#define PF5 PIN_A4
|
||||
#define PF10 PIN_A5
|
||||
#define PB1 PIN_A6
|
||||
#define PC2 PIN_A7
|
||||
#define PF4 PIN_A8
|
||||
#define PF6 PIN_A9
|
||||
// ST Morpho
|
||||
#define PA1 PIN_A18
|
||||
#define PA2 PIN_A19
|
||||
#define PA8 90
|
||||
#define PA9 91
|
||||
#define PA10 92
|
||||
#define PA11 93
|
||||
#define PA12 94
|
||||
#define PA13 95 // SWD
|
||||
#define PA14 96 // SWD
|
||||
#define PC1 PIN_A20
|
||||
#define PC4 PIN_A21
|
||||
#define PC5 PIN_A22
|
||||
#define PC14 100
|
||||
#define PC15 101
|
||||
#define PD10 102
|
||||
#define PE1 103
|
||||
#define PF11 104
|
||||
#define PG4 105
|
||||
#define PG5 106
|
||||
#define PG6 107
|
||||
#define PG7 108
|
||||
#define PG8 109
|
||||
#define PG10 110
|
||||
#define PG11 111
|
||||
#define PG12 112
|
||||
#define PG13 113
|
||||
#define PG15 114
|
||||
#define PH0 115 // MCO
|
||||
#define PH1 116
|
||||
|
||||
// Alternate pins number
|
||||
#define PA0_ALT1 (PA0 | ALT1)
|
||||
#define PA0_ALT2 (PA0 | ALT2)
|
||||
#define PA1_ALT1 (PA1 | ALT1)
|
||||
#define PA1_ALT2 (PA1 | ALT2)
|
||||
#define PA2_ALT1 (PA2 | ALT1)
|
||||
#define PA2_ALT2 (PA2 | ALT2)
|
||||
#define PA3_ALT1 (PA3 | ALT1)
|
||||
#define PA3_ALT2 (PA3 | ALT2)
|
||||
#define PA4_ALT1 (PA4 | ALT1)
|
||||
#define PA5_ALT1 (PA5 | ALT1)
|
||||
#define PA6_ALT1 (PA6 | ALT1)
|
||||
#define PA7_ALT1 (PA7 | ALT1)
|
||||
#define PA7_ALT2 (PA7 | ALT2)
|
||||
#define PA7_ALT3 (PA7 | ALT3)
|
||||
#define PA15_ALT1 (PA15 | ALT1)
|
||||
#define PB0_ALT1 (PB0 | ALT1)
|
||||
#define PB0_ALT2 (PB0 | ALT2)
|
||||
#define PB1_ALT1 (PB1 | ALT1)
|
||||
#define PB1_ALT2 (PB1 | ALT2)
|
||||
#define PB3_ALT1 (PB3 | ALT1)
|
||||
#define PB4_ALT1 (PB4 | ALT1)
|
||||
#define PB5_ALT1 (PB5 | ALT1)
|
||||
#define PB8_ALT1 (PB8 | ALT1)
|
||||
#define PB9_ALT1 (PB9 | ALT1)
|
||||
#define PB14_ALT1 (PB14 | ALT1)
|
||||
#define PB14_ALT2 (PB14 | ALT2)
|
||||
#define PB15_ALT1 (PB15 | ALT1)
|
||||
#define PB15_ALT2 (PB15 | ALT2)
|
||||
#define PC0_ALT1 (PC0 | ALT1)
|
||||
#define PC0_ALT2 (PC0 | ALT2)
|
||||
#define PC1_ALT1 (PC1 | ALT1)
|
||||
#define PC1_ALT2 (PC1 | ALT2)
|
||||
#define PC2_ALT1 (PC2 | ALT1)
|
||||
#define PC2_ALT2 (PC2 | ALT2)
|
||||
#define PC3_ALT1 (PC3 | ALT1)
|
||||
#define PC3_ALT2 (PC3 | ALT2)
|
||||
#define PC4_ALT1 (PC4 | ALT1)
|
||||
#define PC5_ALT1 (PC5 | ALT1)
|
||||
#define PC6_ALT1 (PC6 | ALT1)
|
||||
#define PC7_ALT1 (PC7 | ALT1)
|
||||
#define PC8_ALT1 (PC8 | ALT1)
|
||||
#define PC9_ALT1 (PC9 | ALT1)
|
||||
#define PC10_ALT1 (PC10 | ALT1)
|
||||
#define PC11_ALT1 (PC11 | ALT1)
|
||||
|
||||
// This must be a literal
|
||||
#define NUM_DIGITAL_PINS 117
|
||||
// This must be a literal with a value less than or equal to to MAX_ANALOG_INPUTS
|
||||
#define NUM_ANALOG_INPUTS 24
|
||||
|
||||
// On-board LED pin number
|
||||
#ifndef LED_BUILTIN
|
||||
#define LED_BUILTIN PB0
|
||||
#endif
|
||||
#define LED_GREEN LED_BUILTIN
|
||||
#define LED_BLUE PB7
|
||||
#define LED_RED PB14
|
||||
|
||||
// On-board user button
|
||||
#ifndef USER_BTN
|
||||
#define USER_BTN PC13
|
||||
#endif
|
||||
|
||||
// Timer Definitions
|
||||
// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin
|
||||
#ifndef TIMER_TONE
|
||||
#define TIMER_TONE TIM6
|
||||
#endif
|
||||
#ifndef TIMER_SERVO
|
||||
#define TIMER_SERVO TIM7
|
||||
#endif
|
||||
|
||||
// UART Definitions
|
||||
#ifndef SERIAL_UART_INSTANCE
|
||||
#define SERIAL_UART_INSTANCE 3 //Connected to ST-Link
|
||||
#endif
|
||||
// Serial pin used for console (ex: stlink)
|
||||
// Rerquired by Firmata
|
||||
#ifndef PIN_SERIAL_RX
|
||||
#define PIN_SERIAL_RX PD9
|
||||
#endif
|
||||
#ifndef PIN_SERIAL_TX
|
||||
#define PIN_SERIAL_TX PD8
|
||||
#endif
|
||||
|
||||
// Value of the External oscillator in Hz
|
||||
#define HSE_VALUE 8000000U
|
||||
|
||||
/* Extra HAL modules */
|
||||
#if !defined(HAL_DAC_MODULE_DISABLED)
|
||||
#define HAL_DAC_MODULE_ENABLED
|
||||
#endif
|
||||
#if !defined(HAL_ETH_MODULE_DISABLED)
|
||||
#define HAL_ETH_MODULE_ENABLED
|
||||
#endif
|
||||
#if !defined(HAL_QSPI_MODULE_DISABLED)
|
||||
#define HAL_QSPI_MODULE_ENABLED
|
||||
#endif
|
||||
#if !defined(HAL_SD_MODULE_DISABLED)
|
||||
#define HAL_SD_MODULE_ENABLED
|
||||
#endif
|
||||
|
||||
// Last Flash sector used for EEPROM emulation, address/sector depends on single/dual bank configuration.
|
||||
// By default 2MB single bank
|
||||
#define FLASH_BASE_ADDRESS 0x081C0000
|
||||
#define FLASH_DATA_SECTOR 11
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Arduino objects - C++ only
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
// These serial port names are intended to allow libraries and architecture-neutral
|
||||
// sketches to automatically default to the correct port name for a particular type
|
||||
// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
|
||||
// the first hardware serial port whose RX/TX pins are not dedicated to another use.
|
||||
//
|
||||
// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
|
||||
//
|
||||
// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
|
||||
//
|
||||
// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
|
||||
//
|
||||
// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
|
||||
//
|
||||
// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
|
||||
// pins are NOT connected to anything by default.
|
||||
#ifndef SERIAL_PORT_MONITOR
|
||||
#define SERIAL_PORT_MONITOR Serial
|
||||
#endif
|
||||
#ifndef SERIAL_PORT_HARDWARE
|
||||
// KH mod to add Serial1, for ESP-AT
|
||||
//#define SERIAL_PORT_HARDWARE Serial
|
||||
#define SERIAL_PORT_HARDWARE Serial1
|
||||
#endif
|
||||
#endif
|
||||
+173
@@ -0,0 +1,173 @@
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (c) 2020-2021, STMicroelectronics
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software component is licensed by ST under BSD 3-Clause license,
|
||||
* the "License"; You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
* opensource.org/licenses/BSD-3-Clause
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* STM32 pins number
|
||||
*----------------------------------------------------------------------------*/
|
||||
#define PA0 PIN_A0
|
||||
#define PA1 PIN_A1
|
||||
#define PA2 PIN_A2
|
||||
#define PA3 PIN_A3
|
||||
#define PA4 PIN_A4
|
||||
#define PA5 PIN_A5
|
||||
#define PA6 PIN_A6
|
||||
#define PA7 PIN_A7
|
||||
#define PA8 8
|
||||
#define PA9 9
|
||||
#define PA10 10
|
||||
#define PA11 11
|
||||
#define PA12 12
|
||||
#define PA13 13
|
||||
#define PA14 14
|
||||
#define PA15 15
|
||||
#define PB0 PIN_A8
|
||||
#define PB1 PIN_A9
|
||||
#define PB2 18
|
||||
#define PB3 19
|
||||
#define PB4 20
|
||||
#define PB5 21
|
||||
#define PB6 22
|
||||
#define PB7 23
|
||||
#define PB8 24
|
||||
#define PB9 25
|
||||
#define PB10 26
|
||||
#define PB11 27
|
||||
#define PB12 28
|
||||
#define PB13 29
|
||||
#define PB14 30
|
||||
#define PB15 31
|
||||
#define PC0 PIN_A10
|
||||
#define PC1 PIN_A11
|
||||
#define PC2 PIN_A12
|
||||
#define PC4 PIN_A13
|
||||
#define PC5 PIN_A14
|
||||
#define PC6 37
|
||||
#define PC7 38
|
||||
#define PC8 39
|
||||
#define PC9 40
|
||||
#define PC10 41
|
||||
#define PC11 42
|
||||
#define PC12 43
|
||||
#define PC13 44
|
||||
#define PC14 45
|
||||
#define PC15 46
|
||||
#define PD2 47
|
||||
#define PH0 48
|
||||
#define PH1 49
|
||||
|
||||
// Alternate pins number
|
||||
#define PA2_ALT1 (PA2 | ALT1)
|
||||
#define PA3_ALT1 (PA3 | ALT1)
|
||||
|
||||
#define NUM_DIGITAL_PINS 50
|
||||
#define NUM_ANALOG_INPUTS 15
|
||||
|
||||
// On-board LED pin number
|
||||
#ifndef LED_BUILTIN
|
||||
#define LED_BUILTIN PNUM_NOT_DEFINED
|
||||
#endif
|
||||
|
||||
// On-board user button
|
||||
#ifndef USER_BTN
|
||||
#define USER_BTN PNUM_NOT_DEFINED
|
||||
#endif
|
||||
|
||||
// SPI definitions
|
||||
#ifndef PIN_SPI_SS
|
||||
#define PIN_SPI_SS PA4
|
||||
#endif
|
||||
#ifndef PIN_SPI_SS1
|
||||
#define PIN_SPI_SS1 PA15
|
||||
#endif
|
||||
#ifndef PIN_SPI_SS2
|
||||
#define PIN_SPI_SS2 PNUM_NOT_DEFINED
|
||||
#endif
|
||||
#ifndef PIN_SPI_SS3
|
||||
#define PIN_SPI_SS3 PNUM_NOT_DEFINED
|
||||
#endif
|
||||
#ifndef PIN_SPI_MOSI
|
||||
#define PIN_SPI_MOSI PA7
|
||||
#endif
|
||||
#ifndef PIN_SPI_MISO
|
||||
#define PIN_SPI_MISO PA6
|
||||
#endif
|
||||
#ifndef PIN_SPI_SCK
|
||||
#define PIN_SPI_SCK PA5
|
||||
#endif
|
||||
|
||||
// I2C definitions
|
||||
#ifndef PIN_WIRE_SDA
|
||||
#define PIN_WIRE_SDA PB7
|
||||
#endif
|
||||
#ifndef PIN_WIRE_SCL
|
||||
#define PIN_WIRE_SCL PB6
|
||||
#endif
|
||||
|
||||
// Timer Definitions
|
||||
// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin
|
||||
#ifndef TIMER_TONE
|
||||
#define TIMER_TONE TIM6
|
||||
#endif
|
||||
#ifndef TIMER_SERVO
|
||||
#define TIMER_SERVO TIM21
|
||||
#endif
|
||||
|
||||
// UART Definitions
|
||||
#ifndef SERIAL_UART_INSTANCE
|
||||
#define SERIAL_UART_INSTANCE 2
|
||||
#endif
|
||||
|
||||
// Default pin used for generic 'Serial' instance
|
||||
// Mandatory for Firmata
|
||||
#ifndef PIN_SERIAL_RX
|
||||
#define PIN_SERIAL_RX PA3
|
||||
#endif
|
||||
#ifndef PIN_SERIAL_TX
|
||||
#define PIN_SERIAL_TX PA2
|
||||
#endif
|
||||
|
||||
// Extra HAL modules
|
||||
#if !defined(HAL_DAC_MODULE_DISABLED)
|
||||
#define HAL_DAC_MODULE_ENABLED
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Arduino objects - C++ only
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
// These serial port names are intended to allow libraries and architecture-neutral
|
||||
// sketches to automatically default to the correct port name for a particular type
|
||||
// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
|
||||
// the first hardware serial port whose RX/TX pins are not dedicated to another use.
|
||||
//
|
||||
// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
|
||||
//
|
||||
// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
|
||||
//
|
||||
// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
|
||||
//
|
||||
// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
|
||||
//
|
||||
// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
|
||||
// pins are NOT connected to anything by default.
|
||||
#ifndef SERIAL_PORT_MONITOR
|
||||
#define SERIAL_PORT_MONITOR Serial
|
||||
#endif
|
||||
#ifndef SERIAL_PORT_HARDWARE
|
||||
// KH mod to add Serial1, for ESP-AT
|
||||
//#define SERIAL_PORT_HARDWARE Serial
|
||||
#define SERIAL_PORT_HARDWARE Serial1
|
||||
#endif
|
||||
#endif
|
||||
+274
@@ -0,0 +1,274 @@
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (c) 2020-2021, STMicroelectronics
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software component is licensed by ST under BSD 3-Clause license,
|
||||
* the "License"; You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
* opensource.org/licenses/BSD-3-Clause
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Pins
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
#define PG9 0
|
||||
#define PG14 1
|
||||
#define PF15 2
|
||||
#define PE13 3
|
||||
#define PF14 4
|
||||
#define PE11 5
|
||||
#define PE9 6
|
||||
#define PF13 7
|
||||
#define PF12 8
|
||||
#define PD15 9
|
||||
#define PD14 10
|
||||
#define PA7 PIN_A10
|
||||
#define PA6 PIN_A11
|
||||
#define PA5 PIN_A12
|
||||
#define PB9 14
|
||||
#define PB8 15
|
||||
#define PC6 16
|
||||
#define PB15 17
|
||||
#define PB13 18
|
||||
#define PB12 19
|
||||
#define PA15 20
|
||||
#define PC7 21
|
||||
#define PB5 22
|
||||
#define PB3 23
|
||||
#define PA4 PIN_A13
|
||||
#define PB4 25
|
||||
#define PB6 26
|
||||
#define PB2 27
|
||||
#define PD13 28
|
||||
#define PD12 29
|
||||
#define PD11 30
|
||||
#define PE2 31
|
||||
#define PA0 PIN_A14
|
||||
#define PB0 PIN_A23 // LED_GREEN
|
||||
#define PE0 34
|
||||
#define PB11 35
|
||||
#define PB10 36
|
||||
#define PE15 37
|
||||
#define PE14 38
|
||||
#define PE12 39
|
||||
#define PE10 40
|
||||
#define PE7 41
|
||||
#define PE8 42
|
||||
#define PC8 43
|
||||
#define PC9 44
|
||||
#define PC10 45
|
||||
#define PC11 46
|
||||
#define PC12 47
|
||||
#define PD2 48
|
||||
#define PG2 49
|
||||
#define PG3 50
|
||||
#define PD7 51
|
||||
#define PD6 52
|
||||
#define PD5 53
|
||||
#define PD4 54
|
||||
#define PD3 55
|
||||
// 56 is PE2 (31)
|
||||
#define PE4 57
|
||||
#define PE5 58
|
||||
#define PE6 59
|
||||
#define PE3 60
|
||||
#define PF8 PIN_A15
|
||||
#define PF7 PIN_A16
|
||||
#define PF9 PIN_A17
|
||||
#define PG1 64
|
||||
#define PG0 65
|
||||
#define PD1 66
|
||||
#define PD0 67
|
||||
#define PF0 68
|
||||
#define PF1 69
|
||||
#define PF2 70
|
||||
// 71 is PA7 (11)
|
||||
// 72 is NC
|
||||
#define PB7 73 // LED_BLUE
|
||||
#define PB14 74 // LED_RED
|
||||
#define PC13 75 // USER_BTN
|
||||
#define PD9 76 // Serial Rx
|
||||
#define PD8 77 // Serial Tx
|
||||
#define PA3 PIN_A0
|
||||
#define PC0 PIN_A1
|
||||
#define PC3 PIN_A2
|
||||
#define PF3 PIN_A3
|
||||
#define PF5 PIN_A4
|
||||
#define PF10 PIN_A5
|
||||
#define PB1 PIN_A6
|
||||
#define PC2 PIN_A7
|
||||
#define PF4 PIN_A8
|
||||
#define PF6 PIN_A9
|
||||
// ST Morpho
|
||||
#define PA1 PIN_A18
|
||||
#define PA2 PIN_A19
|
||||
#define PA8 90
|
||||
#define PA9 91
|
||||
#define PA10 92
|
||||
#define PA11 93
|
||||
#define PA12 94
|
||||
#define PA13 95 // SWD
|
||||
#define PA14 96 // SWD
|
||||
#define PC1 PIN_A20
|
||||
#define PC4 PIN_A21
|
||||
#define PC5 PIN_A22
|
||||
#define PC14 100
|
||||
#define PC15 101
|
||||
#define PD10 102
|
||||
#define PE1 103
|
||||
#define PF11 104
|
||||
#define PG4 105
|
||||
#define PG5 106
|
||||
#define PG6 107
|
||||
#define PG7 108
|
||||
#define PG8 109
|
||||
#define PG10 110
|
||||
#define PG11 111
|
||||
#define PG12 112
|
||||
#define PG13 113
|
||||
#define PG15 114
|
||||
#define PH0 115 // MCO
|
||||
#define PH1 116
|
||||
|
||||
// Alternate pins number
|
||||
#define PA0_ALT1 (PA0 | ALT1)
|
||||
#define PA0_ALT2 (PA0 | ALT2)
|
||||
#define PA1_ALT1 (PA1 | ALT1)
|
||||
#define PA1_ALT2 (PA1 | ALT2)
|
||||
#define PA2_ALT1 (PA2 | ALT1)
|
||||
#define PA2_ALT2 (PA2 | ALT2)
|
||||
#define PA3_ALT1 (PA3 | ALT1)
|
||||
#define PA3_ALT2 (PA3 | ALT2)
|
||||
#define PA4_ALT1 (PA4 | ALT1)
|
||||
#define PA5_ALT1 (PA5 | ALT1)
|
||||
#define PA6_ALT1 (PA6 | ALT1)
|
||||
#define PA7_ALT1 (PA7 | ALT1)
|
||||
#define PA7_ALT2 (PA7 | ALT2)
|
||||
#define PA7_ALT3 (PA7 | ALT3)
|
||||
#define PA15_ALT1 (PA15 | ALT1)
|
||||
#define PB0_ALT1 (PB0 | ALT1)
|
||||
#define PB0_ALT2 (PB0 | ALT2)
|
||||
#define PB1_ALT1 (PB1 | ALT1)
|
||||
#define PB1_ALT2 (PB1 | ALT2)
|
||||
#define PB3_ALT1 (PB3 | ALT1)
|
||||
#define PB4_ALT1 (PB4 | ALT1)
|
||||
#define PB5_ALT1 (PB5 | ALT1)
|
||||
#define PB8_ALT1 (PB8 | ALT1)
|
||||
#define PB9_ALT1 (PB9 | ALT1)
|
||||
#define PB14_ALT1 (PB14 | ALT1)
|
||||
#define PB14_ALT2 (PB14 | ALT2)
|
||||
#define PB15_ALT1 (PB15 | ALT1)
|
||||
#define PB15_ALT2 (PB15 | ALT2)
|
||||
#define PC0_ALT1 (PC0 | ALT1)
|
||||
#define PC0_ALT2 (PC0 | ALT2)
|
||||
#define PC1_ALT1 (PC1 | ALT1)
|
||||
#define PC1_ALT2 (PC1 | ALT2)
|
||||
#define PC2_ALT1 (PC2 | ALT1)
|
||||
#define PC2_ALT2 (PC2 | ALT2)
|
||||
#define PC3_ALT1 (PC3 | ALT1)
|
||||
#define PC3_ALT2 (PC3 | ALT2)
|
||||
#define PC4_ALT1 (PC4 | ALT1)
|
||||
#define PC5_ALT1 (PC5 | ALT1)
|
||||
#define PC6_ALT1 (PC6 | ALT1)
|
||||
#define PC7_ALT1 (PC7 | ALT1)
|
||||
#define PC8_ALT1 (PC8 | ALT1)
|
||||
#define PC9_ALT1 (PC9 | ALT1)
|
||||
#define PC10_ALT1 (PC10 | ALT1)
|
||||
#define PC11_ALT1 (PC11 | ALT1)
|
||||
|
||||
// This must be a literal
|
||||
#define NUM_DIGITAL_PINS 117
|
||||
// This must be a literal with a value less than or equal to to MAX_ANALOG_INPUTS
|
||||
#define NUM_ANALOG_INPUTS 24
|
||||
|
||||
// On-board LED pin number
|
||||
#ifndef LED_BUILTIN
|
||||
#define LED_BUILTIN PB0
|
||||
#endif
|
||||
#define LED_GREEN LED_BUILTIN
|
||||
#define LED_BLUE PB7
|
||||
#define LED_RED PB14
|
||||
|
||||
// On-board user button
|
||||
#ifndef USER_BTN
|
||||
#define USER_BTN PC13
|
||||
#endif
|
||||
|
||||
// Timer Definitions
|
||||
// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin
|
||||
#ifndef TIMER_TONE
|
||||
#define TIMER_TONE TIM6
|
||||
#endif
|
||||
#ifndef TIMER_SERVO
|
||||
#define TIMER_SERVO TIM7
|
||||
#endif
|
||||
|
||||
// UART Definitions
|
||||
#ifndef SERIAL_UART_INSTANCE
|
||||
#define SERIAL_UART_INSTANCE 3 //Connected to ST-Link
|
||||
#endif
|
||||
// Serial pin used for console (ex: stlink)
|
||||
// Rerquired by Firmata
|
||||
#ifndef PIN_SERIAL_RX
|
||||
#define PIN_SERIAL_RX PD9
|
||||
#endif
|
||||
#ifndef PIN_SERIAL_TX
|
||||
#define PIN_SERIAL_TX PD8
|
||||
#endif
|
||||
|
||||
// Value of the External oscillator in Hz
|
||||
#define HSE_VALUE 8000000U
|
||||
|
||||
/* Extra HAL modules */
|
||||
#if !defined(HAL_DAC_MODULE_DISABLED)
|
||||
#define HAL_DAC_MODULE_ENABLED
|
||||
#endif
|
||||
#if !defined(HAL_ETH_MODULE_DISABLED)
|
||||
#define HAL_ETH_MODULE_ENABLED
|
||||
#endif
|
||||
#if !defined(HAL_QSPI_MODULE_DISABLED)
|
||||
#define HAL_QSPI_MODULE_ENABLED
|
||||
#endif
|
||||
#if !defined(HAL_SD_MODULE_DISABLED)
|
||||
#define HAL_SD_MODULE_ENABLED
|
||||
#endif
|
||||
|
||||
// Last Flash sector used for EEPROM emulation, address/sector depends on single/dual bank configuration.
|
||||
// By default 2MB single bank
|
||||
#define FLASH_BASE_ADDRESS 0x081C0000
|
||||
#define FLASH_DATA_SECTOR 11
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Arduino objects - C++ only
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
// These serial port names are intended to allow libraries and architecture-neutral
|
||||
// sketches to automatically default to the correct port name for a particular type
|
||||
// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
|
||||
// the first hardware serial port whose RX/TX pins are not dedicated to another use.
|
||||
//
|
||||
// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
|
||||
//
|
||||
// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
|
||||
//
|
||||
// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
|
||||
//
|
||||
// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
|
||||
//
|
||||
// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
|
||||
// pins are NOT connected to anything by default.
|
||||
#ifndef SERIAL_PORT_MONITOR
|
||||
#define SERIAL_PORT_MONITOR Serial
|
||||
#endif
|
||||
#ifndef SERIAL_PORT_HARDWARE
|
||||
// KH mod to add Serial1, for ESP-AT
|
||||
//#define SERIAL_PORT_HARDWARE Serial
|
||||
#define SERIAL_PORT_HARDWARE Serial1
|
||||
#endif
|
||||
#endif
|
||||
+173
@@ -0,0 +1,173 @@
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (c) 2020-2021, STMicroelectronics
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software component is licensed by ST under BSD 3-Clause license,
|
||||
* the "License"; You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
* opensource.org/licenses/BSD-3-Clause
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* STM32 pins number
|
||||
*----------------------------------------------------------------------------*/
|
||||
#define PA0 PIN_A0
|
||||
#define PA1 PIN_A1
|
||||
#define PA2 PIN_A2
|
||||
#define PA3 PIN_A3
|
||||
#define PA4 PIN_A4
|
||||
#define PA5 PIN_A5
|
||||
#define PA6 PIN_A6
|
||||
#define PA7 PIN_A7
|
||||
#define PA8 8
|
||||
#define PA9 9
|
||||
#define PA10 10
|
||||
#define PA11 11
|
||||
#define PA12 12
|
||||
#define PA13 13
|
||||
#define PA14 14
|
||||
#define PA15 15
|
||||
#define PB0 PIN_A8
|
||||
#define PB1 PIN_A9
|
||||
#define PB2 18
|
||||
#define PB3 19
|
||||
#define PB4 20
|
||||
#define PB5 21
|
||||
#define PB6 22
|
||||
#define PB7 23
|
||||
#define PB8 24
|
||||
#define PB9 25
|
||||
#define PB10 26
|
||||
#define PB11 27
|
||||
#define PB12 28
|
||||
#define PB13 29
|
||||
#define PB14 30
|
||||
#define PB15 31
|
||||
#define PC0 PIN_A10
|
||||
#define PC1 PIN_A11
|
||||
#define PC2 PIN_A12
|
||||
#define PC4 PIN_A13
|
||||
#define PC5 PIN_A14
|
||||
#define PC6 37
|
||||
#define PC7 38
|
||||
#define PC8 39
|
||||
#define PC9 40
|
||||
#define PC10 41
|
||||
#define PC11 42
|
||||
#define PC12 43
|
||||
#define PC13 44
|
||||
#define PC14 45
|
||||
#define PC15 46
|
||||
#define PD2 47
|
||||
#define PH0 48
|
||||
#define PH1 49
|
||||
|
||||
// Alternate pins number
|
||||
#define PA2_ALT1 (PA2 | ALT1)
|
||||
#define PA3_ALT1 (PA3 | ALT1)
|
||||
|
||||
#define NUM_DIGITAL_PINS 50
|
||||
#define NUM_ANALOG_INPUTS 15
|
||||
|
||||
// On-board LED pin number
|
||||
#ifndef LED_BUILTIN
|
||||
#define LED_BUILTIN PNUM_NOT_DEFINED
|
||||
#endif
|
||||
|
||||
// On-board user button
|
||||
#ifndef USER_BTN
|
||||
#define USER_BTN PNUM_NOT_DEFINED
|
||||
#endif
|
||||
|
||||
// SPI definitions
|
||||
#ifndef PIN_SPI_SS
|
||||
#define PIN_SPI_SS PA4
|
||||
#endif
|
||||
#ifndef PIN_SPI_SS1
|
||||
#define PIN_SPI_SS1 PA15
|
||||
#endif
|
||||
#ifndef PIN_SPI_SS2
|
||||
#define PIN_SPI_SS2 PNUM_NOT_DEFINED
|
||||
#endif
|
||||
#ifndef PIN_SPI_SS3
|
||||
#define PIN_SPI_SS3 PNUM_NOT_DEFINED
|
||||
#endif
|
||||
#ifndef PIN_SPI_MOSI
|
||||
#define PIN_SPI_MOSI PA7
|
||||
#endif
|
||||
#ifndef PIN_SPI_MISO
|
||||
#define PIN_SPI_MISO PA6
|
||||
#endif
|
||||
#ifndef PIN_SPI_SCK
|
||||
#define PIN_SPI_SCK PA5
|
||||
#endif
|
||||
|
||||
// I2C definitions
|
||||
#ifndef PIN_WIRE_SDA
|
||||
#define PIN_WIRE_SDA PB7
|
||||
#endif
|
||||
#ifndef PIN_WIRE_SCL
|
||||
#define PIN_WIRE_SCL PB6
|
||||
#endif
|
||||
|
||||
// Timer Definitions
|
||||
// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin
|
||||
#ifndef TIMER_TONE
|
||||
#define TIMER_TONE TIM6
|
||||
#endif
|
||||
#ifndef TIMER_SERVO
|
||||
#define TIMER_SERVO TIM21
|
||||
#endif
|
||||
|
||||
// UART Definitions
|
||||
#ifndef SERIAL_UART_INSTANCE
|
||||
#define SERIAL_UART_INSTANCE 2
|
||||
#endif
|
||||
|
||||
// Default pin used for generic 'Serial' instance
|
||||
// Mandatory for Firmata
|
||||
#ifndef PIN_SERIAL_RX
|
||||
#define PIN_SERIAL_RX PA3
|
||||
#endif
|
||||
#ifndef PIN_SERIAL_TX
|
||||
#define PIN_SERIAL_TX PA2
|
||||
#endif
|
||||
|
||||
// Extra HAL modules
|
||||
#if !defined(HAL_DAC_MODULE_DISABLED)
|
||||
#define HAL_DAC_MODULE_ENABLED
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Arduino objects - C++ only
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
// These serial port names are intended to allow libraries and architecture-neutral
|
||||
// sketches to automatically default to the correct port name for a particular type
|
||||
// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
|
||||
// the first hardware serial port whose RX/TX pins are not dedicated to another use.
|
||||
//
|
||||
// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
|
||||
//
|
||||
// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
|
||||
//
|
||||
// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
|
||||
//
|
||||
// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
|
||||
//
|
||||
// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
|
||||
// pins are NOT connected to anything by default.
|
||||
#ifndef SERIAL_PORT_MONITOR
|
||||
#define SERIAL_PORT_MONITOR Serial
|
||||
#endif
|
||||
#ifndef SERIAL_PORT_HARDWARE
|
||||
// KH mod to add Serial1, for ESP-AT
|
||||
//#define SERIAL_PORT_HARDWARE Serial
|
||||
#define SERIAL_PORT_HARDWARE Serial1
|
||||
#endif
|
||||
#endif
|
||||
+519
@@ -0,0 +1,519 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file stm32f4xx_hal_conf_default.h
|
||||
* @brief HAL default configuration file.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© Copyright (c) 2017 STMicroelectronics.
|
||||
* All rights reserved.</center></h2>
|
||||
*
|
||||
* This software component is licensed by ST under BSD 3-Clause license,
|
||||
* the "License"; You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
* opensource.org/licenses/BSD-3-Clause
|
||||
*
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||
#ifndef __STM32F4xx_HAL_CONF_DEFAULT_H
|
||||
#define __STM32F4xx_HAL_CONF_DEFAULT_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
|
||||
/* ########################## Module Selection ############################## */
|
||||
/**
|
||||
* @brief Include the default list of modules to be used in the HAL driver
|
||||
* and manage module deactivation
|
||||
*/
|
||||
#include "stm32yyxx_hal_conf.h"
|
||||
#if 0
|
||||
/**
|
||||
* @brief This is the list of modules to be used in the HAL driver
|
||||
*/
|
||||
#define HAL_MODULE_ENABLED
|
||||
#define HAL_ADC_MODULE_ENABLED
|
||||
#define HAL_CAN_MODULE_ENABLED
|
||||
/*#define HAL_CAN_LEGACY_MODULE_ENABLED*/
|
||||
#define HAL_CRC_MODULE_ENABLED
|
||||
#define HAL_CEC_MODULE_ENABLED
|
||||
#define HAL_CRYP_MODULE_ENABLED
|
||||
#define HAL_DAC_MODULE_ENABLED
|
||||
#define HAL_DCMI_MODULE_ENABLED
|
||||
#define HAL_DMA_MODULE_ENABLED
|
||||
#define HAL_DMA2D_MODULE_ENABLED
|
||||
#define HAL_ETH_MODULE_ENABLED
|
||||
#define HAL_FLASH_MODULE_ENABLED
|
||||
#define HAL_NAND_MODULE_ENABLED
|
||||
#define HAL_NOR_MODULE_ENABLED
|
||||
#define HAL_PCCARD_MODULE_ENABLED
|
||||
#define HAL_SRAM_MODULE_ENABLED
|
||||
#define HAL_SDRAM_MODULE_ENABLED
|
||||
#define HAL_HASH_MODULE_ENABLED
|
||||
#define HAL_GPIO_MODULE_ENABLED
|
||||
#define HAL_EXTI_MODULE_ENABLED
|
||||
#define HAL_I2C_MODULE_ENABLED
|
||||
#define HAL_SMBUS_MODULE_ENABLED
|
||||
#define HAL_I2S_MODULE_ENABLED
|
||||
#define HAL_IWDG_MODULE_ENABLED
|
||||
#define HAL_LTDC_MODULE_ENABLED
|
||||
#define HAL_DSI_MODULE_ENABLED
|
||||
#define HAL_PWR_MODULE_ENABLED
|
||||
#define HAL_QSPI_MODULE_ENABLED
|
||||
#define HAL_RCC_MODULE_ENABLED
|
||||
#define HAL_RNG_MODULE_ENABLED
|
||||
#define HAL_RTC_MODULE_ENABLED
|
||||
#define HAL_SAI_MODULE_ENABLED
|
||||
#define HAL_SD_MODULE_ENABLED
|
||||
#define HAL_SPI_MODULE_ENABLED
|
||||
#define HAL_TIM_MODULE_ENABLED
|
||||
#define HAL_UART_MODULE_ENABLED
|
||||
#define HAL_USART_MODULE_ENABLED
|
||||
#define HAL_IRDA_MODULE_ENABLED
|
||||
#define HAL_SMARTCARD_MODULE_ENABLED
|
||||
#define HAL_WWDG_MODULE_ENABLED
|
||||
#define HAL_CORTEX_MODULE_ENABLED
|
||||
#define HAL_PCD_MODULE_ENABLED
|
||||
#define HAL_HCD_MODULE_ENABLED
|
||||
#define HAL_FMPI2C_MODULE_ENABLED
|
||||
#define HAL_FMPSMBUS_MODULE_ENABLED
|
||||
#define HAL_SPDIFRX_MODULE_ENABLED
|
||||
#define HAL_DFSDM_MODULE_ENABLED
|
||||
#define HAL_LPTIM_MODULE_ENABLED
|
||||
#define HAL_MMC_MODULE_ENABLED
|
||||
#endif
|
||||
|
||||
/* ########################## HSE/HSI Values adaptation ##################### */
|
||||
/**
|
||||
* @brief Adjust the value of External High Speed oscillator (HSE) used in your application.
|
||||
* This value is used by the RCC HAL module to compute the system frequency
|
||||
* (when HSE is used as system clock source, directly or through the PLL).
|
||||
*/
|
||||
#if !defined (HSE_VALUE)
|
||||
#define HSE_VALUE 8000000U /*!< Value of the External oscillator in Hz */
|
||||
#endif /* HSE_VALUE */
|
||||
|
||||
#if !defined (HSE_STARTUP_TIMEOUT)
|
||||
#define HSE_STARTUP_TIMEOUT 100U /*!< Time out for HSE start up, in ms */
|
||||
#endif /* HSE_STARTUP_TIMEOUT */
|
||||
|
||||
/**
|
||||
* @brief Internal High Speed oscillator (HSI) value.
|
||||
* This value is used by the RCC HAL module to compute the system frequency
|
||||
* (when HSI is used as system clock source, directly or through the PLL).
|
||||
*/
|
||||
#if !defined (HSI_VALUE)
|
||||
#define HSI_VALUE 16000000U /*!< Value of the Internal oscillator in Hz */
|
||||
#endif /* HSI_VALUE */
|
||||
|
||||
/**
|
||||
* @brief Internal Low Speed oscillator (LSI) value.
|
||||
*/
|
||||
#if !defined (LSI_VALUE)
|
||||
#define LSI_VALUE 32000U /*!< LSI Typical Value in Hz */
|
||||
#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz
|
||||
The real value may vary depending on the variations
|
||||
in voltage and temperature. */
|
||||
/**
|
||||
* @brief External Low Speed oscillator (LSE) value.
|
||||
*/
|
||||
#if !defined (LSE_VALUE)
|
||||
#define LSE_VALUE 32768U /*!< Value of the External Low Speed oscillator in Hz */
|
||||
#endif /* LSE_VALUE */
|
||||
|
||||
#if !defined (LSE_STARTUP_TIMEOUT)
|
||||
#define LSE_STARTUP_TIMEOUT 5000U /*!< Time out for LSE start up, in ms */
|
||||
#endif /* LSE_STARTUP_TIMEOUT */
|
||||
|
||||
/**
|
||||
* @brief External clock source for I2S peripheral
|
||||
* This value is used by the I2S HAL module to compute the I2S clock source
|
||||
* frequency, this source is inserted directly through I2S_CKIN pad.
|
||||
*/
|
||||
#if !defined (EXTERNAL_CLOCK_VALUE)
|
||||
#define EXTERNAL_CLOCK_VALUE 12288000U /*!< Value of the External oscillator in Hz*/
|
||||
#endif /* EXTERNAL_CLOCK_VALUE */
|
||||
|
||||
/* Tip: To avoid modifying this file each time you need to use different HSE,
|
||||
=== you can define the HSE value in your toolchain compiler preprocessor. */
|
||||
|
||||
/* ########################### System Configuration ######################### */
|
||||
/**
|
||||
* @brief This is the HAL system configuration section
|
||||
*/
|
||||
#if !defined (VDD_VALUE)
|
||||
#define VDD_VALUE 3300U /*!< Value of VDD in mv */
|
||||
#endif
|
||||
#if !defined (TICK_INT_PRIORITY)
|
||||
#define TICK_INT_PRIORITY 0x00U /*!< tick interrupt priority */
|
||||
#endif
|
||||
#if !defined (USE_RTOS)
|
||||
#define USE_RTOS 0U
|
||||
#endif
|
||||
#if !defined (PREFETCH_ENABLE)
|
||||
#define PREFETCH_ENABLE 1U
|
||||
#endif
|
||||
#if !defined (INSTRUCTION_CACHE_ENABLE)
|
||||
#define INSTRUCTION_CACHE_ENABLE 1U
|
||||
#endif
|
||||
#if !defined (DATA_CACHE_ENABLE)
|
||||
#define DATA_CACHE_ENABLE 1U
|
||||
#endif
|
||||
|
||||
#define USE_HAL_ADC_REGISTER_CALLBACKS 0U /* ADC register callback disabled */
|
||||
#define USE_HAL_CAN_REGISTER_CALLBACKS 0U /* CAN register callback disabled */
|
||||
#define USE_HAL_CEC_REGISTER_CALLBACKS 0U /* CEC register callback disabled */
|
||||
#define USE_HAL_CRYP_REGISTER_CALLBACKS 0U /* CRYP register callback disabled */
|
||||
#define USE_HAL_DAC_REGISTER_CALLBACKS 0U /* DAC register callback disabled */
|
||||
#define USE_HAL_DCMI_REGISTER_CALLBACKS 0U /* DCMI register callback disabled */
|
||||
#define USE_HAL_DFSDM_REGISTER_CALLBACKS 0U /* DFSDM register callback disabled */
|
||||
#define USE_HAL_DMA2D_REGISTER_CALLBACKS 0U /* DMA2D register callback disabled */
|
||||
#define USE_HAL_DSI_REGISTER_CALLBACKS 0U /* DSI register callback disabled */
|
||||
#define USE_HAL_ETH_REGISTER_CALLBACKS 0U /* ETH register callback disabled */
|
||||
#define USE_HAL_HASH_REGISTER_CALLBACKS 0U /* HASH register callback disabled */
|
||||
#define USE_HAL_HCD_REGISTER_CALLBACKS 0U /* HCD register callback disabled */
|
||||
#define USE_HAL_I2C_REGISTER_CALLBACKS 0U /* I2C register callback disabled */
|
||||
#define USE_HAL_FMPI2C_REGISTER_CALLBACKS 0U /* FMPI2C register callback disabled */
|
||||
#define USE_HAL_FMPSMBUS_REGISTER_CALLBACKS 0U /* FMPSMBUS register callback disabled */
|
||||
#define USE_HAL_I2S_REGISTER_CALLBACKS 0U /* I2S register callback disabled */
|
||||
#define USE_HAL_IRDA_REGISTER_CALLBACKS 0U /* IRDA register callback disabled */
|
||||
#define USE_HAL_LPTIM_REGISTER_CALLBACKS 0U /* LPTIM register callback disabled */
|
||||
#define USE_HAL_LTDC_REGISTER_CALLBACKS 0U /* LTDC register callback disabled */
|
||||
#define USE_HAL_MMC_REGISTER_CALLBACKS 0U /* MMC register callback disabled */
|
||||
#define USE_HAL_NAND_REGISTER_CALLBACKS 0U /* NAND register callback disabled */
|
||||
#define USE_HAL_NOR_REGISTER_CALLBACKS 0U /* NOR register callback disabled */
|
||||
#define USE_HAL_PCCARD_REGISTER_CALLBACKS 0U /* PCCARD register callback disabled */
|
||||
#define USE_HAL_PCD_REGISTER_CALLBACKS 0U /* PCD register callback disabled */
|
||||
#define USE_HAL_QSPI_REGISTER_CALLBACKS 0U /* QSPI register callback disabled */
|
||||
#define USE_HAL_RNG_REGISTER_CALLBACKS 0U /* RNG register callback disabled */
|
||||
#define USE_HAL_RTC_REGISTER_CALLBACKS 0U /* RTC register callback disabled */
|
||||
#define USE_HAL_SAI_REGISTER_CALLBACKS 0U /* SAI register callback disabled */
|
||||
#define USE_HAL_SD_REGISTER_CALLBACKS 0U /* SD register callback disabled */
|
||||
#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0U /* SMARTCARD register callback disabled */
|
||||
#define USE_HAL_SDRAM_REGISTER_CALLBACKS 0U /* SDRAM register callback disabled */
|
||||
#define USE_HAL_SRAM_REGISTER_CALLBACKS 0U /* SRAM register callback disabled */
|
||||
#define USE_HAL_SPDIFRX_REGISTER_CALLBACKS 0U /* SPDIFRX register callback disabled */
|
||||
#define USE_HAL_SMBUS_REGISTER_CALLBACKS 0U /* SMBUS register callback disabled */
|
||||
#define USE_HAL_SPI_REGISTER_CALLBACKS 0U /* SPI register callback disabled */
|
||||
#define USE_HAL_TIM_REGISTER_CALLBACKS 0U /* TIM register callback disabled */
|
||||
#define USE_HAL_UART_REGISTER_CALLBACKS 0U /* UART register callback disabled */
|
||||
#define USE_HAL_USART_REGISTER_CALLBACKS 0U /* USART register callback disabled */
|
||||
#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U /* WWDG register callback disabled */
|
||||
|
||||
/* ########################## Assert Selection ############################## */
|
||||
/**
|
||||
* @brief Uncomment the line below to expanse the "assert_param" macro in the
|
||||
* HAL drivers code
|
||||
*/
|
||||
/* #define USE_FULL_ASSERT 1U */
|
||||
|
||||
/* ################## Ethernet peripheral configuration ##################### */
|
||||
|
||||
/* Section 1 : Ethernet peripheral configuration */
|
||||
|
||||
/* MAC ADDRESS: MAC_ADDR0:MAC_ADDR1:MAC_ADDR2:MAC_ADDR3:MAC_ADDR4:MAC_ADDR5 */
|
||||
#define MAC_ADDR0 2U
|
||||
#define MAC_ADDR1 0U
|
||||
#define MAC_ADDR2 0U
|
||||
#define MAC_ADDR3 0U
|
||||
#define MAC_ADDR4 0U
|
||||
#define MAC_ADDR5 0U
|
||||
|
||||
/* Definition of the Ethernet driver buffers size and count */
|
||||
#define ETH_RX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for receive */
|
||||
#define ETH_TX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for transmit */
|
||||
#define ETH_RXBUFNB (5U) /* 5 Rx buffers of size ETH_RX_BUF_SIZE */
|
||||
#define ETH_TXBUFNB (5U) /* 5 Tx buffers of size ETH_TX_BUF_SIZE */
|
||||
|
||||
/* Section 2: PHY configuration section */
|
||||
/* LAN8742A PHY Address*/
|
||||
////////////////////////////////
|
||||
//#define LAN8742A_PHY_ADDRESS 0x00U
|
||||
/* Section 2: PHY configuration section */
|
||||
#if !defined (LAN8742A_PHY_ADDRESS)
|
||||
/* LAN8742A PHY Address*/
|
||||
#define LAN8742A_PHY_ADDRESS 0x00U
|
||||
#endif
|
||||
////////////////////////////////
|
||||
/* PHY Reset delay these values are based on a 1 ms Systick interrupt*/
|
||||
#define PHY_RESET_DELAY 0x000000FFU
|
||||
/* PHY Configuration delay */
|
||||
#define PHY_CONFIG_DELAY 0x00000FFFU
|
||||
|
||||
#define PHY_READ_TO 0x0000FFFFU
|
||||
#define PHY_WRITE_TO 0x0000FFFFU
|
||||
|
||||
/* Section 3: Common PHY Registers */
|
||||
|
||||
#define PHY_BCR ((uint16_t)0x0000) /*!< Transceiver Basic Control Register */
|
||||
#define PHY_BSR ((uint16_t)0x0001) /*!< Transceiver Basic Status Register */
|
||||
|
||||
#define PHY_RESET ((uint16_t)0x8000) /*!< PHY Reset */
|
||||
#define PHY_LOOPBACK ((uint16_t)0x4000) /*!< Select loop-back mode */
|
||||
#define PHY_FULLDUPLEX_100M ((uint16_t)0x2100) /*!< Set the full-duplex mode at 100 Mb/s */
|
||||
#define PHY_HALFDUPLEX_100M ((uint16_t)0x2000) /*!< Set the half-duplex mode at 100 Mb/s */
|
||||
#define PHY_FULLDUPLEX_10M ((uint16_t)0x0100) /*!< Set the full-duplex mode at 10 Mb/s */
|
||||
#define PHY_HALFDUPLEX_10M ((uint16_t)0x0000) /*!< Set the half-duplex mode at 10 Mb/s */
|
||||
#define PHY_AUTONEGOTIATION ((uint16_t)0x1000) /*!< Enable auto-negotiation function */
|
||||
#define PHY_RESTART_AUTONEGOTIATION ((uint16_t)0x0200) /*!< Restart auto-negotiation function */
|
||||
#define PHY_POWERDOWN ((uint16_t)0x0800) /*!< Select the power down mode */
|
||||
#define PHY_ISOLATE ((uint16_t)0x0400) /*!< Isolate PHY from MII */
|
||||
|
||||
#define PHY_AUTONEGO_COMPLETE ((uint16_t)0x0020) /*!< Auto-Negotiation process completed */
|
||||
#define PHY_LINKED_STATUS ((uint16_t)0x0004) /*!< Valid link established */
|
||||
#define PHY_JABBER_DETECTION ((uint16_t)0x0002) /*!< Jabber condition detected */
|
||||
|
||||
/* Section 4: Extended PHY Registers */
|
||||
|
||||
#define PHY_SR ((uint16_t)0x1F) /*!< PHY special control/ status register Offset */
|
||||
|
||||
#define PHY_SPEED_STATUS ((uint16_t)0x0004) /*!< PHY Speed mask */
|
||||
#define PHY_DUPLEX_STATUS ((uint16_t)0x0010) /*!< PHY Duplex mask */
|
||||
|
||||
|
||||
#define PHY_ISFR ((uint16_t)0x1D) /*!< PHY Interrupt Source Flag register Offset */
|
||||
#define PHY_IMR ((uint16_t)0x1E) /*!< PHY Interrupt Mask register Offset */
|
||||
#define PHY_ISFR_INT4 ((uint16_t)0x0010) /*!< PHY Link down inturrupt */
|
||||
|
||||
/* ################## SPI peripheral configuration ########################## */
|
||||
|
||||
/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver
|
||||
* Activated: CRC code is present inside driver
|
||||
* Deactivated: CRC code cleaned from driver
|
||||
*/
|
||||
#if !defined (USE_SPI_CRC)
|
||||
#define USE_SPI_CRC 0U
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
/**
|
||||
* @brief Include module's header file
|
||||
*/
|
||||
|
||||
#ifdef HAL_RCC_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_rcc.h"
|
||||
#endif /* HAL_RCC_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_GPIO_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_gpio.h"
|
||||
#endif /* HAL_GPIO_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_EXTI_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_exti.h"
|
||||
#endif /* HAL_EXTI_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_DMA_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_dma.h"
|
||||
#endif /* HAL_DMA_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_CORTEX_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_cortex.h"
|
||||
#endif /* HAL_CORTEX_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_ADC_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_adc.h"
|
||||
#endif /* HAL_ADC_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_CAN_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_can.h"
|
||||
#endif /* HAL_CAN_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_CAN_LEGACY_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_can_legacy.h"
|
||||
#endif /* HAL_CAN_LEGACY_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_CRC_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_crc.h"
|
||||
#endif /* HAL_CRC_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_CRYP_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_cryp.h"
|
||||
#endif /* HAL_CRYP_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_DMA2D_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_dma2d.h"
|
||||
#endif /* HAL_DMA2D_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_DAC_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_dac.h"
|
||||
#endif /* HAL_DAC_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_DCMI_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_dcmi.h"
|
||||
#endif /* HAL_DCMI_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_ETH_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_eth.h"
|
||||
#endif /* HAL_ETH_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_FLASH_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_flash.h"
|
||||
#endif /* HAL_FLASH_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_SRAM_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_sram.h"
|
||||
#endif /* HAL_SRAM_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_NOR_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_nor.h"
|
||||
#endif /* HAL_NOR_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_NAND_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_nand.h"
|
||||
#endif /* HAL_NAND_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_PCCARD_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_pccard.h"
|
||||
#endif /* HAL_PCCARD_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_SDRAM_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_sdram.h"
|
||||
#endif /* HAL_SDRAM_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_HASH_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_hash.h"
|
||||
#endif /* HAL_HASH_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_I2C_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_i2c.h"
|
||||
#endif /* HAL_I2C_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_SMBUS_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_smbus.h"
|
||||
#endif /* HAL_SMBUS_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_I2S_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_i2s.h"
|
||||
#endif /* HAL_I2S_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_IWDG_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_iwdg.h"
|
||||
#endif /* HAL_IWDG_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_LTDC_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_ltdc.h"
|
||||
#endif /* HAL_LTDC_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_PWR_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_pwr.h"
|
||||
#endif /* HAL_PWR_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_RNG_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_rng.h"
|
||||
#endif /* HAL_RNG_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_RTC_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_rtc.h"
|
||||
#endif /* HAL_RTC_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_SAI_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_sai.h"
|
||||
#endif /* HAL_SAI_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_SD_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_sd.h"
|
||||
#endif /* HAL_SD_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_SPI_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_spi.h"
|
||||
#endif /* HAL_SPI_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_TIM_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_tim.h"
|
||||
#endif /* HAL_TIM_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_UART_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_uart.h"
|
||||
#endif /* HAL_UART_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_USART_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_usart.h"
|
||||
#endif /* HAL_USART_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_IRDA_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_irda.h"
|
||||
#endif /* HAL_IRDA_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_SMARTCARD_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_smartcard.h"
|
||||
#endif /* HAL_SMARTCARD_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_WWDG_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_wwdg.h"
|
||||
#endif /* HAL_WWDG_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_PCD_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_pcd.h"
|
||||
#endif /* HAL_PCD_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_HCD_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_hcd.h"
|
||||
#endif /* HAL_HCD_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_DSI_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_dsi.h"
|
||||
#endif /* HAL_DSI_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_QSPI_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_qspi.h"
|
||||
#endif /* HAL_QSPI_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_CEC_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_cec.h"
|
||||
#endif /* HAL_CEC_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_FMPI2C_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_fmpi2c.h"
|
||||
#endif /* HAL_FMPI2C_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_FMPSMBUS_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_fmpsmbus.h"
|
||||
#endif /* HAL_FMPSMBUS_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_SPDIFRX_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_spdifrx.h"
|
||||
#endif /* HAL_SPDIFRX_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_DFSDM_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_dfsdm.h"
|
||||
#endif /* HAL_DFSDM_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_LPTIM_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_lptim.h"
|
||||
#endif /* HAL_LPTIM_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_MMC_MODULE_ENABLED
|
||||
#include "stm32f4xx_hal_mmc.h"
|
||||
#endif /* HAL_MMC_MODULE_ENABLED */
|
||||
|
||||
/* Exported macro ------------------------------------------------------------*/
|
||||
#ifdef USE_FULL_ASSERT
|
||||
/**
|
||||
* @brief The assert_param macro is used for function's parameters check.
|
||||
* @param expr If expr is false, it calls assert_failed function
|
||||
* which reports the name of the source file and the source
|
||||
* line number of the call that failed.
|
||||
* If expr is true, it returns no value.
|
||||
* @retval None
|
||||
*/
|
||||
#define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__))
|
||||
/* Exported functions ------------------------------------------------------- */
|
||||
void assert_failed(uint8_t *file, uint32_t line);
|
||||
#else
|
||||
#define assert_param(expr) ((void)0U)
|
||||
#endif /* USE_FULL_ASSERT */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __STM32F4xx_HAL_CONF_DEFAULT_H */
|
||||
|
||||
|
||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
||||
+511
@@ -0,0 +1,511 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file stm32f7xx_hal_conf_default.h
|
||||
* @brief HAL default configuration file.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© Copyright (c) 2017 STMicroelectronics.
|
||||
* All rights reserved.</center></h2>
|
||||
*
|
||||
* This software component is licensed by ST under BSD 3-Clause license,
|
||||
* the "License"; You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
* opensource.org/licenses/BSD-3-Clause
|
||||
*
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||
#ifndef __STM32F7xx_HAL_CONF_DEFAULT_H
|
||||
#define __STM32F7xx_HAL_CONF_DEFAULT_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
|
||||
/* ########################## Module Selection ############################## */
|
||||
/**
|
||||
* @brief Include the default list of modules to be used in the HAL driver
|
||||
* and manage module deactivation
|
||||
*/
|
||||
#include "stm32yyxx_hal_conf.h"
|
||||
#if 0
|
||||
/**
|
||||
* @brief This is the list of modules to be used in the HAL driver
|
||||
*/
|
||||
#define HAL_MODULE_ENABLED
|
||||
#define HAL_ADC_MODULE_ENABLED
|
||||
#define HAL_CAN_MODULE_ENABLED
|
||||
#define HAL_CAN_LEGACY_MODULE_ENABLED
|
||||
#define HAL_CEC_MODULE_ENABLED
|
||||
#define HAL_CRC_MODULE_ENABLED
|
||||
#define HAL_CRYP_MODULE_ENABLED
|
||||
#define HAL_DAC_MODULE_ENABLED
|
||||
#define HAL_DCMI_MODULE_ENABLED
|
||||
#define HAL_DMA_MODULE_ENABLED
|
||||
#define HAL_DMA2D_MODULE_ENABLED
|
||||
#define HAL_ETH_MODULE_ENABLED
|
||||
#define HAL_EXTI_MODULE_ENABLED
|
||||
#define HAL_FLASH_MODULE_ENABLED
|
||||
#define HAL_NAND_MODULE_ENABLED
|
||||
#define HAL_NOR_MODULE_ENABLED
|
||||
#define HAL_SRAM_MODULE_ENABLED
|
||||
#define HAL_SDRAM_MODULE_ENABLED
|
||||
#define HAL_HASH_MODULE_ENABLED
|
||||
#define HAL_GPIO_MODULE_ENABLED
|
||||
#define HAL_I2C_MODULE_ENABLED
|
||||
#define HAL_I2S_MODULE_ENABLED
|
||||
#define HAL_IWDG_MODULE_ENABLED
|
||||
#define HAL_LPTIM_MODULE_ENABLED
|
||||
#define HAL_LTDC_MODULE_ENABLED
|
||||
#define HAL_PWR_MODULE_ENABLED
|
||||
#define HAL_QSPI_MODULE_ENABLED
|
||||
#define HAL_RCC_MODULE_ENABLED
|
||||
#define HAL_RNG_MODULE_ENABLED
|
||||
#define HAL_RTC_MODULE_ENABLED
|
||||
#define HAL_SAI_MODULE_ENABLED
|
||||
#define HAL_SD_MODULE_ENABLED
|
||||
#define HAL_SPDIFRX_MODULE_ENABLED
|
||||
#define HAL_SPI_MODULE_ENABLED
|
||||
#define HAL_TIM_MODULE_ENABLED
|
||||
#define HAL_UART_MODULE_ENABLED
|
||||
#define HAL_USART_MODULE_ENABLED
|
||||
#define HAL_IRDA_MODULE_ENABLED
|
||||
#define HAL_SMARTCARD_MODULE_ENABLED
|
||||
#define HAL_WWDG_MODULE_ENABLED
|
||||
#define HAL_CORTEX_MODULE_ENABLED
|
||||
#define HAL_PCD_MODULE_ENABLED
|
||||
#define HAL_HCD_MODULE_ENABLED
|
||||
#define HAL_DFSDM_MODULE_ENABLED
|
||||
#define HAL_DSI_MODULE_ENABLED
|
||||
#define HAL_JPEG_MODULE_ENABLED
|
||||
#define HAL_MDIOS_MODULE_ENABLED
|
||||
#define HAL_SMBUS_MODULE_ENABLED
|
||||
#define HAL_MMC_MODULE_ENABLED
|
||||
#endif
|
||||
|
||||
/* ########################## HSE/HSI Values adaptation ##################### */
|
||||
/**
|
||||
* @brief Adjust the value of External High Speed oscillator (HSE) used in your application.
|
||||
* This value is used by the RCC HAL module to compute the system frequency
|
||||
* (when HSE is used as system clock source, directly or through the PLL).
|
||||
*/
|
||||
#if !defined (HSE_VALUE)
|
||||
#define HSE_VALUE 25000000U /*!< Value of the External oscillator in Hz */
|
||||
#endif /* HSE_VALUE */
|
||||
|
||||
#if !defined (HSE_STARTUP_TIMEOUT)
|
||||
#define HSE_STARTUP_TIMEOUT 100U /*!< Time out for HSE start up, in ms */
|
||||
#endif /* HSE_STARTUP_TIMEOUT */
|
||||
|
||||
/**
|
||||
* @brief Internal High Speed oscillator (HSI) value.
|
||||
* This value is used by the RCC HAL module to compute the system frequency
|
||||
* (when HSI is used as system clock source, directly or through the PLL).
|
||||
*/
|
||||
#if !defined (HSI_VALUE)
|
||||
#define HSI_VALUE 16000000U /*!< Value of the Internal oscillator in Hz*/
|
||||
#endif /* HSI_VALUE */
|
||||
|
||||
/**
|
||||
* @brief Internal Low Speed oscillator (LSI) value.
|
||||
*/
|
||||
#if !defined (LSI_VALUE)
|
||||
#define LSI_VALUE 32000U /*!< LSI Typical Value in Hz*/
|
||||
#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz
|
||||
The real value may vary depending on the variations
|
||||
in voltage and temperature. */
|
||||
/**
|
||||
* @brief External Low Speed oscillator (LSE) value.
|
||||
*/
|
||||
#if !defined (LSE_VALUE)
|
||||
#define LSE_VALUE 32768U /*!< Value of the External Low Speed oscillator in Hz */
|
||||
#endif /* LSE_VALUE */
|
||||
|
||||
#if !defined (LSE_STARTUP_TIMEOUT)
|
||||
#define LSE_STARTUP_TIMEOUT 5000U /*!< Time out for LSE start up, in ms */
|
||||
#endif /* LSE_STARTUP_TIMEOUT */
|
||||
|
||||
/**
|
||||
* @brief External clock source for I2S peripheral
|
||||
* This value is used by the I2S HAL module to compute the I2S clock source
|
||||
* frequency, this source is inserted directly through I2S_CKIN pad.
|
||||
*/
|
||||
#if !defined (EXTERNAL_CLOCK_VALUE)
|
||||
#define EXTERNAL_CLOCK_VALUE 12288000U /*!< Value of the Internal oscillator in Hz*/
|
||||
#endif /* EXTERNAL_CLOCK_VALUE */
|
||||
|
||||
/* Tip: To avoid modifying this file each time you need to use different HSE,
|
||||
=== you can define the HSE value in your toolchain compiler preprocessor. */
|
||||
|
||||
/* ########################### System Configuration ######################### */
|
||||
/**
|
||||
* @brief This is the HAL system configuration section
|
||||
*/
|
||||
#if !defined (VDD_VALUE)
|
||||
#define VDD_VALUE 3300U /*!< Value of VDD in mv */
|
||||
#endif
|
||||
#if !defined (TICK_INT_PRIORITY)
|
||||
#define TICK_INT_PRIORITY 0x00U /*!< tick interrupt priority */
|
||||
#endif
|
||||
#if !defined (USE_RTOS)
|
||||
#define USE_RTOS 0U
|
||||
#endif
|
||||
#if !defined (PREFETCH_ENABLE)
|
||||
#define PREFETCH_ENABLE 1U /* To enable prefetch */
|
||||
#endif
|
||||
#if !defined (ART_ACCLERATOR_ENABLE)
|
||||
#define ART_ACCLERATOR_ENABLE 1U /* To enable ART Accelerator */
|
||||
#endif
|
||||
|
||||
#define USE_HAL_ADC_REGISTER_CALLBACKS 0U /* ADC register callback disabled */
|
||||
#define USE_HAL_CAN_REGISTER_CALLBACKS 0U /* CAN register callback disabled */
|
||||
#define USE_HAL_CEC_REGISTER_CALLBACKS 0U /* CEC register callback disabled */
|
||||
#define USE_HAL_CRYP_REGISTER_CALLBACKS 0U /* CRYP register callback disabled */
|
||||
#define USE_HAL_DAC_REGISTER_CALLBACKS 0U /* DAC register callback disabled */
|
||||
#define USE_HAL_DCMI_REGISTER_CALLBACKS 0U /* DCMI register callback disabled */
|
||||
#define USE_HAL_DFSDM_REGISTER_CALLBACKS 0U /* DFSDM register callback disabled */
|
||||
#define USE_HAL_DMA2D_REGISTER_CALLBACKS 0U /* DMA2D register callback disabled */
|
||||
#define USE_HAL_DSI_REGISTER_CALLBACKS 0U /* DSI register callback disabled */
|
||||
#define USE_HAL_ETH_REGISTER_CALLBACKS 0U /* ETH register callback disabled */
|
||||
#define USE_HAL_HASH_REGISTER_CALLBACKS 0U /* HASH register callback disabled */
|
||||
#define USE_HAL_HCD_REGISTER_CALLBACKS 0U /* HCD register callback disabled */
|
||||
#define USE_HAL_I2C_REGISTER_CALLBACKS 0U /* I2C register callback disabled */
|
||||
#define USE_HAL_I2S_REGISTER_CALLBACKS 0U /* I2S register callback disabled */
|
||||
#define USE_HAL_IRDA_REGISTER_CALLBACKS 0U /* IRDA register callback disabled */
|
||||
#define USE_HAL_JPEG_REGISTER_CALLBACKS 0U /* JPEG register callback disabled */
|
||||
#define USE_HAL_LPTIM_REGISTER_CALLBACKS 0U /* LPTIM register callback disabled */
|
||||
#define USE_HAL_LTDC_REGISTER_CALLBACKS 0U /* LTDC register callback disabled */
|
||||
#define USE_HAL_MDIOS_REGISTER_CALLBACKS 0U /* MDIOS register callback disabled */
|
||||
#define USE_HAL_MMC_REGISTER_CALLBACKS 0U /* MMC register callback disabled */
|
||||
#define USE_HAL_NAND_REGISTER_CALLBACKS 0U /* NAND register callback disabled */
|
||||
#define USE_HAL_NOR_REGISTER_CALLBACKS 0U /* NOR register callback disabled */
|
||||
#define USE_HAL_PCD_REGISTER_CALLBACKS 0U /* PCD register callback disabled */
|
||||
#define USE_HAL_QSPI_REGISTER_CALLBACKS 0U /* QSPI register callback disabled */
|
||||
#define USE_HAL_RNG_REGISTER_CALLBACKS 0U /* RNG register callback disabled */
|
||||
#define USE_HAL_RTC_REGISTER_CALLBACKS 0U /* RTC register callback disabled */
|
||||
#define USE_HAL_SAI_REGISTER_CALLBACKS 0U /* SAI register callback disabled */
|
||||
#define USE_HAL_SD_REGISTER_CALLBACKS 0U /* SD register callback disabled */
|
||||
#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0U /* SMARTCARD register callback disabled */
|
||||
#define USE_HAL_SDRAM_REGISTER_CALLBACKS 0U /* SDRAM register callback disabled */
|
||||
#define USE_HAL_SRAM_REGISTER_CALLBACKS 0U /* SRAM register callback disabled */
|
||||
#define USE_HAL_SPDIFRX_REGISTER_CALLBACKS 0U /* SPDIFRX register callback disabled */
|
||||
#define USE_HAL_SMBUS_REGISTER_CALLBACKS 0U /* SMBUS register callback disabled */
|
||||
#define USE_HAL_SPI_REGISTER_CALLBACKS 0U /* SPI register callback disabled */
|
||||
#define USE_HAL_TIM_REGISTER_CALLBACKS 0U /* TIM register callback disabled */
|
||||
#define USE_HAL_UART_REGISTER_CALLBACKS 0U /* UART register callback disabled */
|
||||
#define USE_HAL_USART_REGISTER_CALLBACKS 0U /* USART register callback disabled */
|
||||
#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U /* WWDG register callback disabled */
|
||||
|
||||
/* ########################## Assert Selection ############################## */
|
||||
/**
|
||||
* @brief Uncomment the line below to expanse the "assert_param" macro in the
|
||||
* HAL drivers code
|
||||
*/
|
||||
/* #define USE_FULL_ASSERT 1 */
|
||||
|
||||
/* ################## Ethernet peripheral configuration ##################### */
|
||||
|
||||
/* Section 1 : Ethernet peripheral configuration */
|
||||
|
||||
/* MAC ADDRESS: MAC_ADDR0:MAC_ADDR1:MAC_ADDR2:MAC_ADDR3:MAC_ADDR4:MAC_ADDR5 */
|
||||
#define MAC_ADDR0 2U
|
||||
#define MAC_ADDR1 0U
|
||||
#define MAC_ADDR2 0U
|
||||
#define MAC_ADDR3 0U
|
||||
#define MAC_ADDR4 0U
|
||||
#define MAC_ADDR5 0U
|
||||
|
||||
/* Definition of the Ethernet driver buffers size and count */
|
||||
#define ETH_RX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for receive */
|
||||
#define ETH_TX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for transmit */
|
||||
#define ETH_RXBUFNB 4U /* 4 Rx buffers of size ETH_RX_BUF_SIZE */
|
||||
#define ETH_TXBUFNB 4U /* 4 Tx buffers of size ETH_TX_BUF_SIZE */
|
||||
|
||||
/* Section 2: PHY configuration section */
|
||||
/* LAN8742A PHY Address*/
|
||||
////////////////////////////////
|
||||
//#define LAN8742A_PHY_ADDRESS 0x00U
|
||||
/* Section 2: PHY configuration section */
|
||||
#if !defined (LAN8742A_PHY_ADDRESS)
|
||||
/* LAN8742A PHY Address*/
|
||||
#define LAN8742A_PHY_ADDRESS 0x00U
|
||||
#endif
|
||||
////////////////////////////////
|
||||
/* PHY Reset delay these values are based on a 1 ms Systick interrupt*/
|
||||
#define PHY_RESET_DELAY 0x00000FFFU
|
||||
/* PHY Configuration delay */
|
||||
#define PHY_CONFIG_DELAY 0x00000FFFU
|
||||
|
||||
#define PHY_READ_TO 0x0000FFFFU
|
||||
#define PHY_WRITE_TO 0x0000FFFFU
|
||||
|
||||
/* Section 3: Common PHY Registers */
|
||||
|
||||
#define PHY_BCR ((uint16_t)0x00U) /*!< Transceiver Basic Control Register */
|
||||
#define PHY_BSR ((uint16_t)0x01U) /*!< Transceiver Basic Status Register */
|
||||
|
||||
#define PHY_RESET ((uint16_t)0x8000U) /*!< PHY Reset */
|
||||
#define PHY_LOOPBACK ((uint16_t)0x4000U) /*!< Select loop-back mode */
|
||||
#define PHY_FULLDUPLEX_100M ((uint16_t)0x2100U) /*!< Set the full-duplex mode at 100 Mb/s */
|
||||
#define PHY_HALFDUPLEX_100M ((uint16_t)0x2000U) /*!< Set the half-duplex mode at 100 Mb/s */
|
||||
#define PHY_FULLDUPLEX_10M ((uint16_t)0x0100U) /*!< Set the full-duplex mode at 10 Mb/s */
|
||||
#define PHY_HALFDUPLEX_10M ((uint16_t)0x0000U) /*!< Set the half-duplex mode at 10 Mb/s */
|
||||
#define PHY_AUTONEGOTIATION ((uint16_t)0x1000U) /*!< Enable auto-negotiation function */
|
||||
#define PHY_RESTART_AUTONEGOTIATION ((uint16_t)0x0200U) /*!< Restart auto-negotiation function */
|
||||
#define PHY_POWERDOWN ((uint16_t)0x0800U) /*!< Select the power down mode */
|
||||
#define PHY_ISOLATE ((uint16_t)0x0400U) /*!< Isolate PHY from MII */
|
||||
|
||||
#define PHY_AUTONEGO_COMPLETE ((uint16_t)0x0020U) /*!< Auto-Negotiation process completed */
|
||||
#define PHY_LINKED_STATUS ((uint16_t)0x0004U) /*!< Valid link established */
|
||||
#define PHY_JABBER_DETECTION ((uint16_t)0x0002U) /*!< Jabber condition detected */
|
||||
|
||||
/* Section 4: Extended PHY Registers */
|
||||
|
||||
#define PHY_SR ((uint16_t)0x1FU) /*!< PHY special control/ status register Offset */
|
||||
|
||||
#define PHY_SPEED_STATUS ((uint16_t)0x0004U) /*!< PHY Speed mask */
|
||||
#define PHY_DUPLEX_STATUS ((uint16_t)0x0010U) /*!< PHY Duplex mask */
|
||||
|
||||
|
||||
#define PHY_ISFR ((uint16_t)0x01DU) /*!< PHY Interrupt Source Flag register Offset */
|
||||
#define PHY_IMR ((uint16_t)0x001E) /*!< PHY Interrupt Mask register Offset */
|
||||
#define PHY_ISFR_INT4 ((uint16_t)0x0010U) /*!< PHY Link down inturrupt */
|
||||
|
||||
/* ################## SPI peripheral configuration ########################## */
|
||||
|
||||
/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver
|
||||
* Activated: CRC code is present inside driver
|
||||
* Deactivated: CRC code cleaned from driver
|
||||
*/
|
||||
#if !defined (USE_SPI_CRC)
|
||||
#define USE_SPI_CRC 0U
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
/**
|
||||
* @brief Include module's header file
|
||||
*/
|
||||
|
||||
#ifdef HAL_RCC_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_rcc.h"
|
||||
#endif /* HAL_RCC_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_GPIO_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_gpio.h"
|
||||
#endif /* HAL_GPIO_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_DMA_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_dma.h"
|
||||
#endif /* HAL_DMA_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_CORTEX_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_cortex.h"
|
||||
#endif /* HAL_CORTEX_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_ADC_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_adc.h"
|
||||
#endif /* HAL_ADC_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_CAN_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_can.h"
|
||||
#endif /* HAL_CAN_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_CAN_LEGACY_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_can_legacy.h"
|
||||
#endif /* HAL_CAN_LEGACY_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_CEC_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_cec.h"
|
||||
#endif /* HAL_CEC_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_CRC_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_crc.h"
|
||||
#endif /* HAL_CRC_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_CRYP_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_cryp.h"
|
||||
#endif /* HAL_CRYP_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_DMA2D_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_dma2d.h"
|
||||
#endif /* HAL_DMA2D_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_DAC_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_dac.h"
|
||||
#endif /* HAL_DAC_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_DCMI_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_dcmi.h"
|
||||
#endif /* HAL_DCMI_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_ETH_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_eth.h"
|
||||
#endif /* HAL_ETH_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_EXTI_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_exti.h"
|
||||
#endif /* HAL_EXTI_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_FLASH_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_flash.h"
|
||||
#endif /* HAL_FLASH_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_SRAM_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_sram.h"
|
||||
#endif /* HAL_SRAM_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_NOR_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_nor.h"
|
||||
#endif /* HAL_NOR_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_NAND_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_nand.h"
|
||||
#endif /* HAL_NAND_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_SDRAM_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_sdram.h"
|
||||
#endif /* HAL_SDRAM_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_HASH_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_hash.h"
|
||||
#endif /* HAL_HASH_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_I2C_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_i2c.h"
|
||||
#endif /* HAL_I2C_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_I2S_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_i2s.h"
|
||||
#endif /* HAL_I2S_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_IWDG_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_iwdg.h"
|
||||
#endif /* HAL_IWDG_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_LPTIM_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_lptim.h"
|
||||
#endif /* HAL_LPTIM_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_LTDC_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_ltdc.h"
|
||||
#endif /* HAL_LTDC_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_PWR_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_pwr.h"
|
||||
#endif /* HAL_PWR_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_QSPI_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_qspi.h"
|
||||
#endif /* HAL_QSPI_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_RNG_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_rng.h"
|
||||
#endif /* HAL_RNG_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_RTC_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_rtc.h"
|
||||
#endif /* HAL_RTC_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_SAI_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_sai.h"
|
||||
#endif /* HAL_SAI_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_SD_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_sd.h"
|
||||
#endif /* HAL_SD_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_SPDIFRX_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_spdifrx.h"
|
||||
#endif /* HAL_SPDIFRX_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_SPI_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_spi.h"
|
||||
#endif /* HAL_SPI_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_TIM_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_tim.h"
|
||||
#endif /* HAL_TIM_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_UART_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_uart.h"
|
||||
#endif /* HAL_UART_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_USART_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_usart.h"
|
||||
#endif /* HAL_USART_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_IRDA_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_irda.h"
|
||||
#endif /* HAL_IRDA_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_SMARTCARD_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_smartcard.h"
|
||||
#endif /* HAL_SMARTCARD_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_WWDG_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_wwdg.h"
|
||||
#endif /* HAL_WWDG_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_PCD_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_pcd.h"
|
||||
#endif /* HAL_PCD_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_HCD_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_hcd.h"
|
||||
#endif /* HAL_HCD_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_DFSDM_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_dfsdm.h"
|
||||
#endif /* HAL_DFSDM_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_DSI_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_dsi.h"
|
||||
#endif /* HAL_DSI_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_JPEG_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_jpeg.h"
|
||||
#endif /* HAL_JPEG_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_MDIOS_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_mdios.h"
|
||||
#endif /* HAL_MDIOS_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_SMBUS_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_smbus.h"
|
||||
#endif /* HAL_SMBUS_MODULE_ENABLED */
|
||||
|
||||
#ifdef HAL_MMC_MODULE_ENABLED
|
||||
#include "stm32f7xx_hal_mmc.h"
|
||||
#endif /* HAL_MMC_MODULE_ENABLED */
|
||||
|
||||
/* Exported macro ------------------------------------------------------------*/
|
||||
#ifdef USE_FULL_ASSERT
|
||||
/**
|
||||
* @brief The assert_param macro is used for function's parameters check.
|
||||
* @param expr If expr is false, it calls assert_failed function
|
||||
* which reports the name of the source file and the source
|
||||
* line number of the call that failed.
|
||||
* If expr is true, it returns no value.
|
||||
* @retval None
|
||||
*/
|
||||
#define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__))
|
||||
/* Exported functions ------------------------------------------------------- */
|
||||
void assert_failed(uint8_t *file, uint32_t line);
|
||||
#else
|
||||
#define assert_param(expr) ((void)0U)
|
||||
#endif /* USE_FULL_ASSERT */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __STM32F7xx_HAL_CONF_DEFAULT_H */
|
||||
|
||||
|
||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
||||
+274
@@ -0,0 +1,274 @@
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (c) 2020-2021, STMicroelectronics
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software component is licensed by ST under BSD 3-Clause license,
|
||||
* the "License"; You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
* opensource.org/licenses/BSD-3-Clause
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Pins
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
#define PG9 0
|
||||
#define PG14 1
|
||||
#define PF15 2
|
||||
#define PE13 3
|
||||
#define PF14 4
|
||||
#define PE11 5
|
||||
#define PE9 6
|
||||
#define PF13 7
|
||||
#define PF12 8
|
||||
#define PD15 9
|
||||
#define PD14 10
|
||||
#define PA7 PIN_A10
|
||||
#define PA6 PIN_A11
|
||||
#define PA5 PIN_A12
|
||||
#define PB9 14
|
||||
#define PB8 15
|
||||
#define PC6 16
|
||||
#define PB15 17
|
||||
#define PB13 18
|
||||
#define PB12 19
|
||||
#define PA15 20
|
||||
#define PC7 21
|
||||
#define PB5 22
|
||||
#define PB3 23
|
||||
#define PA4 PIN_A13
|
||||
#define PB4 25
|
||||
#define PB6 26
|
||||
#define PB2 27
|
||||
#define PD13 28
|
||||
#define PD12 29
|
||||
#define PD11 30
|
||||
#define PE2 31
|
||||
#define PA0 PIN_A14
|
||||
#define PB0 PIN_A23 // LED_GREEN
|
||||
#define PE0 34
|
||||
#define PB11 35
|
||||
#define PB10 36
|
||||
#define PE15 37
|
||||
#define PE14 38
|
||||
#define PE12 39
|
||||
#define PE10 40
|
||||
#define PE7 41
|
||||
#define PE8 42
|
||||
#define PC8 43
|
||||
#define PC9 44
|
||||
#define PC10 45
|
||||
#define PC11 46
|
||||
#define PC12 47
|
||||
#define PD2 48
|
||||
#define PG2 49
|
||||
#define PG3 50
|
||||
#define PD7 51
|
||||
#define PD6 52
|
||||
#define PD5 53
|
||||
#define PD4 54
|
||||
#define PD3 55
|
||||
// 56 is PE2 (31)
|
||||
#define PE4 57
|
||||
#define PE5 58
|
||||
#define PE6 59
|
||||
#define PE3 60
|
||||
#define PF8 PIN_A15
|
||||
#define PF7 PIN_A16
|
||||
#define PF9 PIN_A17
|
||||
#define PG1 64
|
||||
#define PG0 65
|
||||
#define PD1 66
|
||||
#define PD0 67
|
||||
#define PF0 68
|
||||
#define PF1 69
|
||||
#define PF2 70
|
||||
// 71 is PA7 (11)
|
||||
// 72 is NC
|
||||
#define PB7 73 // LED_BLUE
|
||||
#define PB14 74 // LED_RED
|
||||
#define PC13 75 // USER_BTN
|
||||
#define PD9 76 // Serial Rx
|
||||
#define PD8 77 // Serial Tx
|
||||
#define PA3 PIN_A0
|
||||
#define PC0 PIN_A1
|
||||
#define PC3 PIN_A2
|
||||
#define PF3 PIN_A3
|
||||
#define PF5 PIN_A4
|
||||
#define PF10 PIN_A5
|
||||
#define PB1 PIN_A6
|
||||
#define PC2 PIN_A7
|
||||
#define PF4 PIN_A8
|
||||
#define PF6 PIN_A9
|
||||
// ST Morpho
|
||||
#define PA1 PIN_A18
|
||||
#define PA2 PIN_A19
|
||||
#define PA8 90
|
||||
#define PA9 91
|
||||
#define PA10 92
|
||||
#define PA11 93
|
||||
#define PA12 94
|
||||
#define PA13 95 // SWD
|
||||
#define PA14 96 // SWD
|
||||
#define PC1 PIN_A20
|
||||
#define PC4 PIN_A21
|
||||
#define PC5 PIN_A22
|
||||
#define PC14 100
|
||||
#define PC15 101
|
||||
#define PD10 102
|
||||
#define PE1 103
|
||||
#define PF11 104
|
||||
#define PG4 105
|
||||
#define PG5 106
|
||||
#define PG6 107
|
||||
#define PG7 108
|
||||
#define PG8 109
|
||||
#define PG10 110
|
||||
#define PG11 111
|
||||
#define PG12 112
|
||||
#define PG13 113
|
||||
#define PG15 114
|
||||
#define PH0 115 // MCO
|
||||
#define PH1 116
|
||||
|
||||
// Alternate pins number
|
||||
#define PA0_ALT1 (PA0 | ALT1)
|
||||
#define PA0_ALT2 (PA0 | ALT2)
|
||||
#define PA1_ALT1 (PA1 | ALT1)
|
||||
#define PA1_ALT2 (PA1 | ALT2)
|
||||
#define PA2_ALT1 (PA2 | ALT1)
|
||||
#define PA2_ALT2 (PA2 | ALT2)
|
||||
#define PA3_ALT1 (PA3 | ALT1)
|
||||
#define PA3_ALT2 (PA3 | ALT2)
|
||||
#define PA4_ALT1 (PA4 | ALT1)
|
||||
#define PA5_ALT1 (PA5 | ALT1)
|
||||
#define PA6_ALT1 (PA6 | ALT1)
|
||||
#define PA7_ALT1 (PA7 | ALT1)
|
||||
#define PA7_ALT2 (PA7 | ALT2)
|
||||
#define PA7_ALT3 (PA7 | ALT3)
|
||||
#define PA15_ALT1 (PA15 | ALT1)
|
||||
#define PB0_ALT1 (PB0 | ALT1)
|
||||
#define PB0_ALT2 (PB0 | ALT2)
|
||||
#define PB1_ALT1 (PB1 | ALT1)
|
||||
#define PB1_ALT2 (PB1 | ALT2)
|
||||
#define PB3_ALT1 (PB3 | ALT1)
|
||||
#define PB4_ALT1 (PB4 | ALT1)
|
||||
#define PB5_ALT1 (PB5 | ALT1)
|
||||
#define PB8_ALT1 (PB8 | ALT1)
|
||||
#define PB9_ALT1 (PB9 | ALT1)
|
||||
#define PB14_ALT1 (PB14 | ALT1)
|
||||
#define PB14_ALT2 (PB14 | ALT2)
|
||||
#define PB15_ALT1 (PB15 | ALT1)
|
||||
#define PB15_ALT2 (PB15 | ALT2)
|
||||
#define PC0_ALT1 (PC0 | ALT1)
|
||||
#define PC0_ALT2 (PC0 | ALT2)
|
||||
#define PC1_ALT1 (PC1 | ALT1)
|
||||
#define PC1_ALT2 (PC1 | ALT2)
|
||||
#define PC2_ALT1 (PC2 | ALT1)
|
||||
#define PC2_ALT2 (PC2 | ALT2)
|
||||
#define PC3_ALT1 (PC3 | ALT1)
|
||||
#define PC3_ALT2 (PC3 | ALT2)
|
||||
#define PC4_ALT1 (PC4 | ALT1)
|
||||
#define PC5_ALT1 (PC5 | ALT1)
|
||||
#define PC6_ALT1 (PC6 | ALT1)
|
||||
#define PC7_ALT1 (PC7 | ALT1)
|
||||
#define PC8_ALT1 (PC8 | ALT1)
|
||||
#define PC9_ALT1 (PC9 | ALT1)
|
||||
#define PC10_ALT1 (PC10 | ALT1)
|
||||
#define PC11_ALT1 (PC11 | ALT1)
|
||||
|
||||
// This must be a literal
|
||||
#define NUM_DIGITAL_PINS 117
|
||||
// This must be a literal with a value less than or equal to to MAX_ANALOG_INPUTS
|
||||
#define NUM_ANALOG_INPUTS 24
|
||||
|
||||
// On-board LED pin number
|
||||
#ifndef LED_BUILTIN
|
||||
#define LED_BUILTIN PB0
|
||||
#endif
|
||||
#define LED_GREEN LED_BUILTIN
|
||||
#define LED_BLUE PB7
|
||||
#define LED_RED PB14
|
||||
|
||||
// On-board user button
|
||||
#ifndef USER_BTN
|
||||
#define USER_BTN PC13
|
||||
#endif
|
||||
|
||||
// Timer Definitions
|
||||
// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin
|
||||
#ifndef TIMER_TONE
|
||||
#define TIMER_TONE TIM6
|
||||
#endif
|
||||
#ifndef TIMER_SERVO
|
||||
#define TIMER_SERVO TIM7
|
||||
#endif
|
||||
|
||||
// UART Definitions
|
||||
#ifndef SERIAL_UART_INSTANCE
|
||||
#define SERIAL_UART_INSTANCE 3 //Connected to ST-Link
|
||||
#endif
|
||||
// Serial pin used for console (ex: stlink)
|
||||
// Rerquired by Firmata
|
||||
#ifndef PIN_SERIAL_RX
|
||||
#define PIN_SERIAL_RX PD9
|
||||
#endif
|
||||
#ifndef PIN_SERIAL_TX
|
||||
#define PIN_SERIAL_TX PD8
|
||||
#endif
|
||||
|
||||
// Value of the External oscillator in Hz
|
||||
#define HSE_VALUE 8000000U
|
||||
|
||||
/* Extra HAL modules */
|
||||
#if !defined(HAL_DAC_MODULE_DISABLED)
|
||||
#define HAL_DAC_MODULE_ENABLED
|
||||
#endif
|
||||
#if !defined(HAL_ETH_MODULE_DISABLED)
|
||||
#define HAL_ETH_MODULE_ENABLED
|
||||
#endif
|
||||
#if !defined(HAL_QSPI_MODULE_DISABLED)
|
||||
#define HAL_QSPI_MODULE_ENABLED
|
||||
#endif
|
||||
#if !defined(HAL_SD_MODULE_DISABLED)
|
||||
#define HAL_SD_MODULE_ENABLED
|
||||
#endif
|
||||
|
||||
// Last Flash sector used for EEPROM emulation, address/sector depends on single/dual bank configuration.
|
||||
// By default 2MB single bank
|
||||
#define FLASH_BASE_ADDRESS 0x081C0000
|
||||
#define FLASH_DATA_SECTOR 11
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Arduino objects - C++ only
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
// These serial port names are intended to allow libraries and architecture-neutral
|
||||
// sketches to automatically default to the correct port name for a particular type
|
||||
// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
|
||||
// the first hardware serial port whose RX/TX pins are not dedicated to another use.
|
||||
//
|
||||
// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
|
||||
//
|
||||
// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
|
||||
//
|
||||
// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
|
||||
//
|
||||
// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
|
||||
//
|
||||
// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
|
||||
// pins are NOT connected to anything by default.
|
||||
#ifndef SERIAL_PORT_MONITOR
|
||||
#define SERIAL_PORT_MONITOR Serial
|
||||
#endif
|
||||
#ifndef SERIAL_PORT_HARDWARE
|
||||
// KH mod to add Serial1, for ESP-AT
|
||||
//#define SERIAL_PORT_HARDWARE Serial
|
||||
#define SERIAL_PORT_HARDWARE Serial1
|
||||
#endif
|
||||
#endif
|
||||
+173
@@ -0,0 +1,173 @@
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (c) 2020-2021, STMicroelectronics
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software component is licensed by ST under BSD 3-Clause license,
|
||||
* the "License"; You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
* opensource.org/licenses/BSD-3-Clause
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* STM32 pins number
|
||||
*----------------------------------------------------------------------------*/
|
||||
#define PA0 PIN_A0
|
||||
#define PA1 PIN_A1
|
||||
#define PA2 PIN_A2
|
||||
#define PA3 PIN_A3
|
||||
#define PA4 PIN_A4
|
||||
#define PA5 PIN_A5
|
||||
#define PA6 PIN_A6
|
||||
#define PA7 PIN_A7
|
||||
#define PA8 8
|
||||
#define PA9 9
|
||||
#define PA10 10
|
||||
#define PA11 11
|
||||
#define PA12 12
|
||||
#define PA13 13
|
||||
#define PA14 14
|
||||
#define PA15 15
|
||||
#define PB0 PIN_A8
|
||||
#define PB1 PIN_A9
|
||||
#define PB2 18
|
||||
#define PB3 19
|
||||
#define PB4 20
|
||||
#define PB5 21
|
||||
#define PB6 22
|
||||
#define PB7 23
|
||||
#define PB8 24
|
||||
#define PB9 25
|
||||
#define PB10 26
|
||||
#define PB11 27
|
||||
#define PB12 28
|
||||
#define PB13 29
|
||||
#define PB14 30
|
||||
#define PB15 31
|
||||
#define PC0 PIN_A10
|
||||
#define PC1 PIN_A11
|
||||
#define PC2 PIN_A12
|
||||
#define PC4 PIN_A13
|
||||
#define PC5 PIN_A14
|
||||
#define PC6 37
|
||||
#define PC7 38
|
||||
#define PC8 39
|
||||
#define PC9 40
|
||||
#define PC10 41
|
||||
#define PC11 42
|
||||
#define PC12 43
|
||||
#define PC13 44
|
||||
#define PC14 45
|
||||
#define PC15 46
|
||||
#define PD2 47
|
||||
#define PH0 48
|
||||
#define PH1 49
|
||||
|
||||
// Alternate pins number
|
||||
#define PA2_ALT1 (PA2 | ALT1)
|
||||
#define PA3_ALT1 (PA3 | ALT1)
|
||||
|
||||
#define NUM_DIGITAL_PINS 50
|
||||
#define NUM_ANALOG_INPUTS 15
|
||||
|
||||
// On-board LED pin number
|
||||
#ifndef LED_BUILTIN
|
||||
#define LED_BUILTIN PNUM_NOT_DEFINED
|
||||
#endif
|
||||
|
||||
// On-board user button
|
||||
#ifndef USER_BTN
|
||||
#define USER_BTN PNUM_NOT_DEFINED
|
||||
#endif
|
||||
|
||||
// SPI definitions
|
||||
#ifndef PIN_SPI_SS
|
||||
#define PIN_SPI_SS PA4
|
||||
#endif
|
||||
#ifndef PIN_SPI_SS1
|
||||
#define PIN_SPI_SS1 PA15
|
||||
#endif
|
||||
#ifndef PIN_SPI_SS2
|
||||
#define PIN_SPI_SS2 PNUM_NOT_DEFINED
|
||||
#endif
|
||||
#ifndef PIN_SPI_SS3
|
||||
#define PIN_SPI_SS3 PNUM_NOT_DEFINED
|
||||
#endif
|
||||
#ifndef PIN_SPI_MOSI
|
||||
#define PIN_SPI_MOSI PA7
|
||||
#endif
|
||||
#ifndef PIN_SPI_MISO
|
||||
#define PIN_SPI_MISO PA6
|
||||
#endif
|
||||
#ifndef PIN_SPI_SCK
|
||||
#define PIN_SPI_SCK PA5
|
||||
#endif
|
||||
|
||||
// I2C definitions
|
||||
#ifndef PIN_WIRE_SDA
|
||||
#define PIN_WIRE_SDA PB7
|
||||
#endif
|
||||
#ifndef PIN_WIRE_SCL
|
||||
#define PIN_WIRE_SCL PB6
|
||||
#endif
|
||||
|
||||
// Timer Definitions
|
||||
// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin
|
||||
#ifndef TIMER_TONE
|
||||
#define TIMER_TONE TIM6
|
||||
#endif
|
||||
#ifndef TIMER_SERVO
|
||||
#define TIMER_SERVO TIM21
|
||||
#endif
|
||||
|
||||
// UART Definitions
|
||||
#ifndef SERIAL_UART_INSTANCE
|
||||
#define SERIAL_UART_INSTANCE 2
|
||||
#endif
|
||||
|
||||
// Default pin used for generic 'Serial' instance
|
||||
// Mandatory for Firmata
|
||||
#ifndef PIN_SERIAL_RX
|
||||
#define PIN_SERIAL_RX PA3
|
||||
#endif
|
||||
#ifndef PIN_SERIAL_TX
|
||||
#define PIN_SERIAL_TX PA2
|
||||
#endif
|
||||
|
||||
// Extra HAL modules
|
||||
#if !defined(HAL_DAC_MODULE_DISABLED)
|
||||
#define HAL_DAC_MODULE_ENABLED
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Arduino objects - C++ only
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
// These serial port names are intended to allow libraries and architecture-neutral
|
||||
// sketches to automatically default to the correct port name for a particular type
|
||||
// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
|
||||
// the first hardware serial port whose RX/TX pins are not dedicated to another use.
|
||||
//
|
||||
// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
|
||||
//
|
||||
// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
|
||||
//
|
||||
// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
|
||||
//
|
||||
// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
|
||||
//
|
||||
// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
|
||||
// pins are NOT connected to anything by default.
|
||||
#ifndef SERIAL_PORT_MONITOR
|
||||
#define SERIAL_PORT_MONITOR Serial
|
||||
#endif
|
||||
#ifndef SERIAL_PORT_HARDWARE
|
||||
// KH mod to add Serial1, for ESP-AT
|
||||
//#define SERIAL_PORT_HARDWARE Serial
|
||||
#define SERIAL_PORT_HARDWARE Serial1
|
||||
#endif
|
||||
#endif
|
||||
+31
-53
@@ -27,74 +27,53 @@
|
||||
|
||||
const uint32_t g_ADigitalPinMap[] =
|
||||
{
|
||||
// D0 .. D13
|
||||
// D0 .. D13
|
||||
29, // D0 is P0.29 (UART TX)
|
||||
45, // D1 is P1.13 (UART RX
|
||||
44, // D2 is P1.12 (NFC2)
|
||||
31, // D3 is P0.31 (LED1)
|
||||
13, // D4 is P0.13 (LED2)
|
||||
11, // D5 is P0.11
|
||||
9, // D6 is P0.09
|
||||
9, // D6 is P0.09
|
||||
10, // D7 is P0.10 (Button)
|
||||
41, // D8 is P1.09 (NeoPixel)
|
||||
41, // D8 is P1.09
|
||||
12, // D9 is P0.12
|
||||
14, // D10 is P0.14
|
||||
15, // D11 is P0.15
|
||||
32, // D12 is P1.00
|
||||
7, // D13 is P0.07
|
||||
7, // D13 is P0.07
|
||||
|
||||
// D14 .. D21 (aka A0 .. A7)
|
||||
4, // D14 is P0.04 (A0)
|
||||
// D14 .. D21 (aka A0 .. A5)
|
||||
4, // D14 is P0.04 (A0)
|
||||
30, // D15 is P0.30 (A1)
|
||||
5, // D16 is P0.05 (A2)
|
||||
2, // D17 is P0.02 (A3)
|
||||
5, // D16 is P0.05 (A2)
|
||||
2, // D17 is P0.02 (A3)
|
||||
28, // D18 is P0.28 (A4)
|
||||
3, // D19 is P0.03 (A5)
|
||||
29, // D20 is P0.29 (A6, Battery) ????
|
||||
31, // D21 is P0.31 (A7, ARef) ????
|
||||
|
||||
// D22 .. D23 (aka I2C pins)
|
||||
16, // D22 is P0.16 (SDA)
|
||||
24, // D23 is P0.24 (SCL)
|
||||
|
||||
// D24 .. D26 (aka SPI pins)
|
||||
32, // D24 is P1.00 (SPI MISO)
|
||||
15, // D25 is P0.15 (SPI MOSI)
|
||||
7, // D26 is P0.07 (SPI SCK )
|
||||
3, // D19 is P0.03 (A5)
|
||||
|
||||
// D20 .. D21 (aka I2C pins)
|
||||
16, // D20 is P0.16 (SDA)
|
||||
24, // D21 is P0.24 (SCL)
|
||||
|
||||
// QSPI pins (not exposed via any header / test point)
|
||||
19, // D27 is P0.19 (QSPI CLK)
|
||||
17, // D28 is P0.17 (QSPI CS)
|
||||
20, // D29 is P0.20 (QSPI Data 0)
|
||||
21, // D30 is P0.21 (QSPI Data 1)
|
||||
22, // D31 is P0.22 (QSPI Data 2)
|
||||
23, // D32 is P0.23 (QSPI Data 3)
|
||||
|
||||
// The remaining NFC pin
|
||||
9, // D33 is P0.09 (NFC1, exposed only via test point on bottom of board)
|
||||
|
||||
// Thus, there are 34 defined pins
|
||||
|
||||
// The remaining pins are not usable:
|
||||
//
|
||||
//
|
||||
// The following pins were never listed as they were considered unusable
|
||||
// 0, // P0.00 is XL1 (attached to 32.768kHz crystal)
|
||||
// 1, // P0.01 is XL2 (attached to 32.768kHz crystal)
|
||||
// 18, // P0.18 is RESET (attached to switch)
|
||||
// 32, // P1.00 is SWO (attached to debug header)
|
||||
//
|
||||
// The remaining pins are not connected (per schematic)
|
||||
// 33, // P1.01 is not connected per schematic
|
||||
// 35, // P1.03 is not connected per schematic
|
||||
// 36, // P1.04 is not connected per schematic
|
||||
// 37, // P1.05 is not connected per schematic
|
||||
// 38, // P1.06 is not connected per schematic
|
||||
// 39, // P1.07 is not connected per schematic
|
||||
// 43, // P1.11 is not connected per schematic
|
||||
// 44, // P1.12 is not connected per schematic
|
||||
// 45, // P1.13 is not connected per schematic
|
||||
// 46, // P1.14 is not connected per schematic
|
||||
19, // D22 is P0.19 (QSPI CLK)
|
||||
17, // D23 is P0.17 (QSPI CS)
|
||||
20, // D24 is P0.20 (QSPI Data 0)
|
||||
21, // D25 is P0.21 (QSPI Data 1)
|
||||
22, // D26 is P0.22 (QSPI Data 2)
|
||||
26, // D27 is P0.23 (QSPI Data 3)
|
||||
|
||||
40, // D28 is P1.08 - IO34
|
||||
41, // D29 is P1.01 - IO35
|
||||
44, // D30 is P1.02 - IO36
|
||||
45, // D31 is P1.03 - IO37
|
||||
42, // D32 is P1.10 - IO38
|
||||
43, // D33 is P1.11 - IO39
|
||||
47, // D34 is P1.15 - IO40
|
||||
46, // D35 is P1.14 - IO41
|
||||
26, // D36 is P0.26 - IO42
|
||||
6, // D37 is P0.6 - IO43
|
||||
27, // D38 is P0.27 - IO44
|
||||
};
|
||||
|
||||
void initVariant()
|
||||
@@ -106,4 +85,3 @@ void initVariant()
|
||||
pinMode(PIN_LED2, OUTPUT);
|
||||
ledOff(PIN_LED2);
|
||||
}
|
||||
|
||||
|
||||
+15
-25
@@ -38,17 +38,15 @@
|
||||
extern "C"
|
||||
{
|
||||
#endif // __cplusplus
|
||||
// (XX) = TABLE INDEX
|
||||
// Number of pins defined in PinDescription array
|
||||
#define PINS_COUNT (34)
|
||||
#define PINS_COUNT (40)
|
||||
#define NUM_DIGITAL_PINS (34)
|
||||
#define NUM_ANALOG_INPUTS (6) // A6 is used for battery, A7 is analog reference
|
||||
#define NUM_ANALOG_INPUTS (6)
|
||||
#define NUM_ANALOG_OUTPUTS (0)
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED1 (3)
|
||||
#define PIN_LED2 (4)
|
||||
#define PIN_NEOPIXEL (8)
|
||||
|
||||
#define LED_BUILTIN PIN_LED1
|
||||
#define LED_CONN PIN_LED2
|
||||
@@ -72,8 +70,6 @@ extern "C"
|
||||
#define PIN_A3 (17)
|
||||
#define PIN_A4 (18)
|
||||
#define PIN_A5 (19)
|
||||
#define PIN_A6 (20)
|
||||
#define PIN_A7 (21)
|
||||
|
||||
#define D0 (0)
|
||||
#define D1 (1)
|
||||
@@ -96,18 +92,12 @@ static const uint8_t A2 = PIN_A2 ;
|
||||
static const uint8_t A3 = PIN_A3 ;
|
||||
static const uint8_t A4 = PIN_A4 ;
|
||||
static const uint8_t A5 = PIN_A5 ;
|
||||
static const uint8_t A6 = PIN_A6 ;
|
||||
static const uint8_t A7 = PIN_A7 ;
|
||||
|
||||
#define ADC_RESOLUTION 14
|
||||
|
||||
// Other pins
|
||||
#define PIN_AREF PIN_A7
|
||||
#define PIN_VBAT PIN_A6
|
||||
#define PIN_NFC1 (33)
|
||||
#define PIN_NFC1 (31)
|
||||
#define PIN_NFC2 (2)
|
||||
|
||||
static const uint8_t AREF = PIN_AREF;
|
||||
|
||||
/*
|
||||
* Serial interfaces
|
||||
*/
|
||||
@@ -119,9 +109,9 @@ static const uint8_t AREF = PIN_AREF;
|
||||
*/
|
||||
#define SPI_INTERFACES_COUNT 1
|
||||
|
||||
#define PIN_SPI_MISO (24) //24 original
|
||||
#define PIN_SPI_MOSI (25) //25 original
|
||||
#define PIN_SPI_SCK (26) //26 original
|
||||
#define PIN_SPI_MISO (22) //24 original
|
||||
#define PIN_SPI_MOSI (23) //25 original
|
||||
#define PIN_SPI_SCK (24) //26 original
|
||||
|
||||
static const uint8_t SS = (13);
|
||||
static const uint8_t MOSI = PIN_SPI_MOSI;
|
||||
@@ -133,16 +123,16 @@ static const uint8_t SCK = PIN_SPI_SCK;
|
||||
*/
|
||||
#define WIRE_INTERFACES_COUNT 1
|
||||
|
||||
#define PIN_WIRE_SDA (22)
|
||||
#define PIN_WIRE_SCL (23)
|
||||
#define PIN_WIRE_SDA (20)
|
||||
#define PIN_WIRE_SCL (21)
|
||||
|
||||
// QSPI Pins
|
||||
#define PIN_QSPI_SCK 27
|
||||
#define PIN_QSPI_CS 28
|
||||
#define PIN_QSPI_IO0 29
|
||||
#define PIN_QSPI_IO1 30
|
||||
#define PIN_QSPI_IO2 31
|
||||
#define PIN_QSPI_IO3 32
|
||||
#define PIN_QSPI_SCK 22
|
||||
#define PIN_QSPI_CS 23
|
||||
#define PIN_QSPI_IO0 24
|
||||
#define PIN_QSPI_IO1 25
|
||||
#define PIN_QSPI_IO2 26
|
||||
#define PIN_QSPI_IO3 27
|
||||
|
||||
// On-board QSPI Flash
|
||||
#define EXTERNAL_FLASH_DEVICES GD25Q16C
|
||||
|
||||
+31
-53
@@ -27,74 +27,53 @@
|
||||
|
||||
const uint32_t g_ADigitalPinMap[] =
|
||||
{
|
||||
// D0 .. D13
|
||||
// D0 .. D13
|
||||
29, // D0 is P0.29 (UART TX)
|
||||
45, // D1 is P1.13 (UART RX
|
||||
44, // D2 is P1.12 (NFC2)
|
||||
31, // D3 is P0.31 (LED1)
|
||||
13, // D4 is P0.13 (LED2)
|
||||
11, // D5 is P0.11
|
||||
9, // D6 is P0.09
|
||||
9, // D6 is P0.09
|
||||
10, // D7 is P0.10 (Button)
|
||||
41, // D8 is P1.09 (NeoPixel)
|
||||
41, // D8 is P1.09
|
||||
12, // D9 is P0.12
|
||||
14, // D10 is P0.14
|
||||
15, // D11 is P0.15
|
||||
32, // D12 is P1.00
|
||||
7, // D13 is P0.07
|
||||
7, // D13 is P0.07
|
||||
|
||||
// D14 .. D21 (aka A0 .. A7)
|
||||
4, // D14 is P0.04 (A0)
|
||||
// D14 .. D21 (aka A0 .. A5)
|
||||
4, // D14 is P0.04 (A0)
|
||||
30, // D15 is P0.30 (A1)
|
||||
5, // D16 is P0.05 (A2)
|
||||
2, // D17 is P0.02 (A3)
|
||||
5, // D16 is P0.05 (A2)
|
||||
2, // D17 is P0.02 (A3)
|
||||
28, // D18 is P0.28 (A4)
|
||||
3, // D19 is P0.03 (A5)
|
||||
29, // D20 is P0.29 (A6, Battery) ????
|
||||
31, // D21 is P0.31 (A7, ARef) ????
|
||||
|
||||
// D22 .. D23 (aka I2C pins)
|
||||
16, // D22 is P0.16 (SDA)
|
||||
24, // D23 is P0.24 (SCL)
|
||||
|
||||
// D24 .. D26 (aka SPI pins)
|
||||
32, // D24 is P1.00 (SPI MISO)
|
||||
15, // D25 is P0.15 (SPI MOSI)
|
||||
7, // D26 is P0.07 (SPI SCK )
|
||||
3, // D19 is P0.03 (A5)
|
||||
|
||||
// D20 .. D21 (aka I2C pins)
|
||||
16, // D20 is P0.16 (SDA)
|
||||
24, // D21 is P0.24 (SCL)
|
||||
|
||||
// QSPI pins (not exposed via any header / test point)
|
||||
19, // D27 is P0.19 (QSPI CLK)
|
||||
17, // D28 is P0.17 (QSPI CS)
|
||||
20, // D29 is P0.20 (QSPI Data 0)
|
||||
21, // D30 is P0.21 (QSPI Data 1)
|
||||
22, // D31 is P0.22 (QSPI Data 2)
|
||||
23, // D32 is P0.23 (QSPI Data 3)
|
||||
|
||||
// The remaining NFC pin
|
||||
9, // D33 is P0.09 (NFC1, exposed only via test point on bottom of board)
|
||||
|
||||
// Thus, there are 34 defined pins
|
||||
|
||||
// The remaining pins are not usable:
|
||||
//
|
||||
//
|
||||
// The following pins were never listed as they were considered unusable
|
||||
// 0, // P0.00 is XL1 (attached to 32.768kHz crystal)
|
||||
// 1, // P0.01 is XL2 (attached to 32.768kHz crystal)
|
||||
// 18, // P0.18 is RESET (attached to switch)
|
||||
// 32, // P1.00 is SWO (attached to debug header)
|
||||
//
|
||||
// The remaining pins are not connected (per schematic)
|
||||
// 33, // P1.01 is not connected per schematic
|
||||
// 35, // P1.03 is not connected per schematic
|
||||
// 36, // P1.04 is not connected per schematic
|
||||
// 37, // P1.05 is not connected per schematic
|
||||
// 38, // P1.06 is not connected per schematic
|
||||
// 39, // P1.07 is not connected per schematic
|
||||
// 43, // P1.11 is not connected per schematic
|
||||
// 44, // P1.12 is not connected per schematic
|
||||
// 45, // P1.13 is not connected per schematic
|
||||
// 46, // P1.14 is not connected per schematic
|
||||
19, // D22 is P0.19 (QSPI CLK)
|
||||
17, // D23 is P0.17 (QSPI CS)
|
||||
20, // D24 is P0.20 (QSPI Data 0)
|
||||
21, // D25 is P0.21 (QSPI Data 1)
|
||||
22, // D26 is P0.22 (QSPI Data 2)
|
||||
26, // D27 is P0.23 (QSPI Data 3)
|
||||
|
||||
40, // D28 is P1.08 - IO34
|
||||
41, // D29 is P1.01 - IO35
|
||||
44, // D30 is P1.02 - IO36
|
||||
45, // D31 is P1.03 - IO37
|
||||
42, // D32 is P1.10 - IO38
|
||||
43, // D33 is P1.11 - IO39
|
||||
47, // D34 is P1.15 - IO40
|
||||
46, // D35 is P1.14 - IO41
|
||||
26, // D36 is P0.26 - IO42
|
||||
6, // D37 is P0.6 - IO43
|
||||
27, // D38 is P0.27 - IO44
|
||||
};
|
||||
|
||||
void initVariant()
|
||||
@@ -106,4 +85,3 @@ void initVariant()
|
||||
pinMode(PIN_LED2, OUTPUT);
|
||||
ledOff(PIN_LED2);
|
||||
}
|
||||
|
||||
|
||||
+15
-25
@@ -38,17 +38,15 @@
|
||||
extern "C"
|
||||
{
|
||||
#endif // __cplusplus
|
||||
// (XX) = TABLE INDEX
|
||||
// Number of pins defined in PinDescription array
|
||||
#define PINS_COUNT (34)
|
||||
#define PINS_COUNT (40)
|
||||
#define NUM_DIGITAL_PINS (34)
|
||||
#define NUM_ANALOG_INPUTS (6) // A6 is used for battery, A7 is analog reference
|
||||
#define NUM_ANALOG_INPUTS (6)
|
||||
#define NUM_ANALOG_OUTPUTS (0)
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED1 (3)
|
||||
#define PIN_LED2 (4)
|
||||
#define PIN_NEOPIXEL (8)
|
||||
|
||||
#define LED_BUILTIN PIN_LED1
|
||||
#define LED_CONN PIN_LED2
|
||||
@@ -72,8 +70,6 @@ extern "C"
|
||||
#define PIN_A3 (17)
|
||||
#define PIN_A4 (18)
|
||||
#define PIN_A5 (19)
|
||||
#define PIN_A6 (20)
|
||||
#define PIN_A7 (21)
|
||||
|
||||
#define D0 (0)
|
||||
#define D1 (1)
|
||||
@@ -96,18 +92,12 @@ static const uint8_t A2 = PIN_A2 ;
|
||||
static const uint8_t A3 = PIN_A3 ;
|
||||
static const uint8_t A4 = PIN_A4 ;
|
||||
static const uint8_t A5 = PIN_A5 ;
|
||||
static const uint8_t A6 = PIN_A6 ;
|
||||
static const uint8_t A7 = PIN_A7 ;
|
||||
|
||||
#define ADC_RESOLUTION 14
|
||||
|
||||
// Other pins
|
||||
#define PIN_AREF PIN_A7
|
||||
#define PIN_VBAT PIN_A6
|
||||
#define PIN_NFC1 (33)
|
||||
#define PIN_NFC1 (31)
|
||||
#define PIN_NFC2 (2)
|
||||
|
||||
static const uint8_t AREF = PIN_AREF;
|
||||
|
||||
/*
|
||||
* Serial interfaces
|
||||
*/
|
||||
@@ -119,9 +109,9 @@ static const uint8_t AREF = PIN_AREF;
|
||||
*/
|
||||
#define SPI_INTERFACES_COUNT 1
|
||||
|
||||
#define PIN_SPI_MISO (24) //24 original
|
||||
#define PIN_SPI_MOSI (25) //25 original
|
||||
#define PIN_SPI_SCK (26) //26 original
|
||||
#define PIN_SPI_MISO (22) //24 original
|
||||
#define PIN_SPI_MOSI (23) //25 original
|
||||
#define PIN_SPI_SCK (24) //26 original
|
||||
|
||||
static const uint8_t SS = (13);
|
||||
static const uint8_t MOSI = PIN_SPI_MOSI;
|
||||
@@ -133,16 +123,16 @@ static const uint8_t SCK = PIN_SPI_SCK;
|
||||
*/
|
||||
#define WIRE_INTERFACES_COUNT 1
|
||||
|
||||
#define PIN_WIRE_SDA (22)
|
||||
#define PIN_WIRE_SCL (23)
|
||||
#define PIN_WIRE_SDA (20)
|
||||
#define PIN_WIRE_SCL (21)
|
||||
|
||||
// QSPI Pins
|
||||
#define PIN_QSPI_SCK 27
|
||||
#define PIN_QSPI_CS 28
|
||||
#define PIN_QSPI_IO0 29
|
||||
#define PIN_QSPI_IO1 30
|
||||
#define PIN_QSPI_IO2 31
|
||||
#define PIN_QSPI_IO3 32
|
||||
#define PIN_QSPI_SCK 22
|
||||
#define PIN_QSPI_CS 23
|
||||
#define PIN_QSPI_IO0 24
|
||||
#define PIN_QSPI_IO1 25
|
||||
#define PIN_QSPI_IO2 26
|
||||
#define PIN_QSPI_IO3 27
|
||||
|
||||
// On-board QSPI Flash
|
||||
#define EXTERNAL_FLASH_DEVICES GD25Q16C
|
||||
|
||||
+31
-53
@@ -27,74 +27,53 @@
|
||||
|
||||
const uint32_t g_ADigitalPinMap[] =
|
||||
{
|
||||
// D0 .. D13
|
||||
// D0 .. D13
|
||||
29, // D0 is P0.29 (UART TX)
|
||||
45, // D1 is P1.13 (UART RX
|
||||
44, // D2 is P1.12 (NFC2)
|
||||
31, // D3 is P0.31 (LED1)
|
||||
13, // D4 is P0.13 (LED2)
|
||||
11, // D5 is P0.11
|
||||
9, // D6 is P0.09
|
||||
9, // D6 is P0.09
|
||||
10, // D7 is P0.10 (Button)
|
||||
41, // D8 is P1.09 (NeoPixel)
|
||||
41, // D8 is P1.09
|
||||
12, // D9 is P0.12
|
||||
14, // D10 is P0.14
|
||||
15, // D11 is P0.15
|
||||
32, // D12 is P1.00
|
||||
7, // D13 is P0.07
|
||||
7, // D13 is P0.07
|
||||
|
||||
// D14 .. D21 (aka A0 .. A7)
|
||||
4, // D14 is P0.04 (A0)
|
||||
// D14 .. D21 (aka A0 .. A5)
|
||||
4, // D14 is P0.04 (A0)
|
||||
30, // D15 is P0.30 (A1)
|
||||
5, // D16 is P0.05 (A2)
|
||||
2, // D17 is P0.02 (A3)
|
||||
5, // D16 is P0.05 (A2)
|
||||
2, // D17 is P0.02 (A3)
|
||||
28, // D18 is P0.28 (A4)
|
||||
3, // D19 is P0.03 (A5)
|
||||
29, // D20 is P0.29 (A6, Battery) ????
|
||||
31, // D21 is P0.31 (A7, ARef) ????
|
||||
|
||||
// D22 .. D23 (aka I2C pins)
|
||||
16, // D22 is P0.16 (SDA)
|
||||
24, // D23 is P0.24 (SCL)
|
||||
|
||||
// D24 .. D26 (aka SPI pins)
|
||||
32, // D24 is P1.00 (SPI MISO)
|
||||
15, // D25 is P0.15 (SPI MOSI)
|
||||
7, // D26 is P0.07 (SPI SCK )
|
||||
3, // D19 is P0.03 (A5)
|
||||
|
||||
// D20 .. D21 (aka I2C pins)
|
||||
16, // D20 is P0.16 (SDA)
|
||||
24, // D21 is P0.24 (SCL)
|
||||
|
||||
// QSPI pins (not exposed via any header / test point)
|
||||
19, // D27 is P0.19 (QSPI CLK)
|
||||
17, // D28 is P0.17 (QSPI CS)
|
||||
20, // D29 is P0.20 (QSPI Data 0)
|
||||
21, // D30 is P0.21 (QSPI Data 1)
|
||||
22, // D31 is P0.22 (QSPI Data 2)
|
||||
23, // D32 is P0.23 (QSPI Data 3)
|
||||
|
||||
// The remaining NFC pin
|
||||
9, // D33 is P0.09 (NFC1, exposed only via test point on bottom of board)
|
||||
|
||||
// Thus, there are 34 defined pins
|
||||
|
||||
// The remaining pins are not usable:
|
||||
//
|
||||
//
|
||||
// The following pins were never listed as they were considered unusable
|
||||
// 0, // P0.00 is XL1 (attached to 32.768kHz crystal)
|
||||
// 1, // P0.01 is XL2 (attached to 32.768kHz crystal)
|
||||
// 18, // P0.18 is RESET (attached to switch)
|
||||
// 32, // P1.00 is SWO (attached to debug header)
|
||||
//
|
||||
// The remaining pins are not connected (per schematic)
|
||||
// 33, // P1.01 is not connected per schematic
|
||||
// 35, // P1.03 is not connected per schematic
|
||||
// 36, // P1.04 is not connected per schematic
|
||||
// 37, // P1.05 is not connected per schematic
|
||||
// 38, // P1.06 is not connected per schematic
|
||||
// 39, // P1.07 is not connected per schematic
|
||||
// 43, // P1.11 is not connected per schematic
|
||||
// 44, // P1.12 is not connected per schematic
|
||||
// 45, // P1.13 is not connected per schematic
|
||||
// 46, // P1.14 is not connected per schematic
|
||||
19, // D22 is P0.19 (QSPI CLK)
|
||||
17, // D23 is P0.17 (QSPI CS)
|
||||
20, // D24 is P0.20 (QSPI Data 0)
|
||||
21, // D25 is P0.21 (QSPI Data 1)
|
||||
22, // D26 is P0.22 (QSPI Data 2)
|
||||
26, // D27 is P0.23 (QSPI Data 3)
|
||||
|
||||
40, // D28 is P1.08 - IO34
|
||||
41, // D29 is P1.01 - IO35
|
||||
44, // D30 is P1.02 - IO36
|
||||
45, // D31 is P1.03 - IO37
|
||||
42, // D32 is P1.10 - IO38
|
||||
43, // D33 is P1.11 - IO39
|
||||
47, // D34 is P1.15 - IO40
|
||||
46, // D35 is P1.14 - IO41
|
||||
26, // D36 is P0.26 - IO42
|
||||
6, // D37 is P0.6 - IO43
|
||||
27, // D38 is P0.27 - IO44
|
||||
};
|
||||
|
||||
void initVariant()
|
||||
@@ -106,4 +85,3 @@ void initVariant()
|
||||
pinMode(PIN_LED2, OUTPUT);
|
||||
ledOff(PIN_LED2);
|
||||
}
|
||||
|
||||
|
||||
+15
-25
@@ -38,17 +38,15 @@
|
||||
extern "C"
|
||||
{
|
||||
#endif // __cplusplus
|
||||
// (XX) = TABLE INDEX
|
||||
// Number of pins defined in PinDescription array
|
||||
#define PINS_COUNT (34)
|
||||
#define PINS_COUNT (40)
|
||||
#define NUM_DIGITAL_PINS (34)
|
||||
#define NUM_ANALOG_INPUTS (6) // A6 is used for battery, A7 is analog reference
|
||||
#define NUM_ANALOG_INPUTS (6)
|
||||
#define NUM_ANALOG_OUTPUTS (0)
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED1 (3)
|
||||
#define PIN_LED2 (4)
|
||||
#define PIN_NEOPIXEL (8)
|
||||
|
||||
#define LED_BUILTIN PIN_LED1
|
||||
#define LED_CONN PIN_LED2
|
||||
@@ -72,8 +70,6 @@ extern "C"
|
||||
#define PIN_A3 (17)
|
||||
#define PIN_A4 (18)
|
||||
#define PIN_A5 (19)
|
||||
#define PIN_A6 (20)
|
||||
#define PIN_A7 (21)
|
||||
|
||||
#define D0 (0)
|
||||
#define D1 (1)
|
||||
@@ -96,18 +92,12 @@ static const uint8_t A2 = PIN_A2 ;
|
||||
static const uint8_t A3 = PIN_A3 ;
|
||||
static const uint8_t A4 = PIN_A4 ;
|
||||
static const uint8_t A5 = PIN_A5 ;
|
||||
static const uint8_t A6 = PIN_A6 ;
|
||||
static const uint8_t A7 = PIN_A7 ;
|
||||
|
||||
#define ADC_RESOLUTION 14
|
||||
|
||||
// Other pins
|
||||
#define PIN_AREF PIN_A7
|
||||
#define PIN_VBAT PIN_A6
|
||||
#define PIN_NFC1 (33)
|
||||
#define PIN_NFC1 (31)
|
||||
#define PIN_NFC2 (2)
|
||||
|
||||
static const uint8_t AREF = PIN_AREF;
|
||||
|
||||
/*
|
||||
* Serial interfaces
|
||||
*/
|
||||
@@ -119,9 +109,9 @@ static const uint8_t AREF = PIN_AREF;
|
||||
*/
|
||||
#define SPI_INTERFACES_COUNT 1
|
||||
|
||||
#define PIN_SPI_MISO (24) //24 original
|
||||
#define PIN_SPI_MOSI (25) //25 original
|
||||
#define PIN_SPI_SCK (26) //26 original
|
||||
#define PIN_SPI_MISO (22) //24 original
|
||||
#define PIN_SPI_MOSI (23) //25 original
|
||||
#define PIN_SPI_SCK (24) //26 original
|
||||
|
||||
static const uint8_t SS = (13);
|
||||
static const uint8_t MOSI = PIN_SPI_MOSI;
|
||||
@@ -133,16 +123,16 @@ static const uint8_t SCK = PIN_SPI_SCK;
|
||||
*/
|
||||
#define WIRE_INTERFACES_COUNT 1
|
||||
|
||||
#define PIN_WIRE_SDA (22)
|
||||
#define PIN_WIRE_SCL (23)
|
||||
#define PIN_WIRE_SDA (20)
|
||||
#define PIN_WIRE_SCL (21)
|
||||
|
||||
// QSPI Pins
|
||||
#define PIN_QSPI_SCK 27
|
||||
#define PIN_QSPI_CS 28
|
||||
#define PIN_QSPI_IO0 29
|
||||
#define PIN_QSPI_IO1 30
|
||||
#define PIN_QSPI_IO2 31
|
||||
#define PIN_QSPI_IO3 32
|
||||
#define PIN_QSPI_SCK 22
|
||||
#define PIN_QSPI_CS 23
|
||||
#define PIN_QSPI_IO0 24
|
||||
#define PIN_QSPI_IO1 25
|
||||
#define PIN_QSPI_IO2 26
|
||||
#define PIN_QSPI_IO3 27
|
||||
|
||||
// On-board QSPI Flash
|
||||
#define EXTERNAL_FLASH_DEVICES GD25Q16C
|
||||
|
||||
+31
-53
@@ -27,74 +27,53 @@
|
||||
|
||||
const uint32_t g_ADigitalPinMap[] =
|
||||
{
|
||||
// D0 .. D13
|
||||
// D0 .. D13
|
||||
29, // D0 is P0.29 (UART TX)
|
||||
45, // D1 is P1.13 (UART RX
|
||||
44, // D2 is P1.12 (NFC2)
|
||||
31, // D3 is P0.31 (LED1)
|
||||
13, // D4 is P0.13 (LED2)
|
||||
11, // D5 is P0.11
|
||||
9, // D6 is P0.09
|
||||
9, // D6 is P0.09
|
||||
10, // D7 is P0.10 (Button)
|
||||
41, // D8 is P1.09 (NeoPixel)
|
||||
41, // D8 is P1.09
|
||||
12, // D9 is P0.12
|
||||
14, // D10 is P0.14
|
||||
15, // D11 is P0.15
|
||||
32, // D12 is P1.00
|
||||
7, // D13 is P0.07
|
||||
7, // D13 is P0.07
|
||||
|
||||
// D14 .. D21 (aka A0 .. A7)
|
||||
4, // D14 is P0.04 (A0)
|
||||
// D14 .. D21 (aka A0 .. A5)
|
||||
4, // D14 is P0.04 (A0)
|
||||
30, // D15 is P0.30 (A1)
|
||||
5, // D16 is P0.05 (A2)
|
||||
2, // D17 is P0.02 (A3)
|
||||
5, // D16 is P0.05 (A2)
|
||||
2, // D17 is P0.02 (A3)
|
||||
28, // D18 is P0.28 (A4)
|
||||
3, // D19 is P0.03 (A5)
|
||||
29, // D20 is P0.29 (A6, Battery) ????
|
||||
31, // D21 is P0.31 (A7, ARef) ????
|
||||
|
||||
// D22 .. D23 (aka I2C pins)
|
||||
16, // D22 is P0.16 (SDA)
|
||||
24, // D23 is P0.24 (SCL)
|
||||
|
||||
// D24 .. D26 (aka SPI pins)
|
||||
32, // D24 is P1.00 (SPI MISO)
|
||||
15, // D25 is P0.15 (SPI MOSI)
|
||||
7, // D26 is P0.07 (SPI SCK )
|
||||
3, // D19 is P0.03 (A5)
|
||||
|
||||
// D20 .. D21 (aka I2C pins)
|
||||
16, // D20 is P0.16 (SDA)
|
||||
24, // D21 is P0.24 (SCL)
|
||||
|
||||
// QSPI pins (not exposed via any header / test point)
|
||||
19, // D27 is P0.19 (QSPI CLK)
|
||||
17, // D28 is P0.17 (QSPI CS)
|
||||
20, // D29 is P0.20 (QSPI Data 0)
|
||||
21, // D30 is P0.21 (QSPI Data 1)
|
||||
22, // D31 is P0.22 (QSPI Data 2)
|
||||
23, // D32 is P0.23 (QSPI Data 3)
|
||||
|
||||
// The remaining NFC pin
|
||||
9, // D33 is P0.09 (NFC1, exposed only via test point on bottom of board)
|
||||
|
||||
// Thus, there are 34 defined pins
|
||||
|
||||
// The remaining pins are not usable:
|
||||
//
|
||||
//
|
||||
// The following pins were never listed as they were considered unusable
|
||||
// 0, // P0.00 is XL1 (attached to 32.768kHz crystal)
|
||||
// 1, // P0.01 is XL2 (attached to 32.768kHz crystal)
|
||||
// 18, // P0.18 is RESET (attached to switch)
|
||||
// 32, // P1.00 is SWO (attached to debug header)
|
||||
//
|
||||
// The remaining pins are not connected (per schematic)
|
||||
// 33, // P1.01 is not connected per schematic
|
||||
// 35, // P1.03 is not connected per schematic
|
||||
// 36, // P1.04 is not connected per schematic
|
||||
// 37, // P1.05 is not connected per schematic
|
||||
// 38, // P1.06 is not connected per schematic
|
||||
// 39, // P1.07 is not connected per schematic
|
||||
// 43, // P1.11 is not connected per schematic
|
||||
// 44, // P1.12 is not connected per schematic
|
||||
// 45, // P1.13 is not connected per schematic
|
||||
// 46, // P1.14 is not connected per schematic
|
||||
19, // D22 is P0.19 (QSPI CLK)
|
||||
17, // D23 is P0.17 (QSPI CS)
|
||||
20, // D24 is P0.20 (QSPI Data 0)
|
||||
21, // D25 is P0.21 (QSPI Data 1)
|
||||
22, // D26 is P0.22 (QSPI Data 2)
|
||||
26, // D27 is P0.23 (QSPI Data 3)
|
||||
|
||||
40, // D28 is P1.08 - IO34
|
||||
41, // D29 is P1.01 - IO35
|
||||
44, // D30 is P1.02 - IO36
|
||||
45, // D31 is P1.03 - IO37
|
||||
42, // D32 is P1.10 - IO38
|
||||
43, // D33 is P1.11 - IO39
|
||||
47, // D34 is P1.15 - IO40
|
||||
46, // D35 is P1.14 - IO41
|
||||
26, // D36 is P0.26 - IO42
|
||||
6, // D37 is P0.6 - IO43
|
||||
27, // D38 is P0.27 - IO44
|
||||
};
|
||||
|
||||
void initVariant()
|
||||
@@ -106,4 +85,3 @@ void initVariant()
|
||||
pinMode(PIN_LED2, OUTPUT);
|
||||
ledOff(PIN_LED2);
|
||||
}
|
||||
|
||||
|
||||
+15
-25
@@ -38,17 +38,15 @@
|
||||
extern "C"
|
||||
{
|
||||
#endif // __cplusplus
|
||||
// (XX) = TABLE INDEX
|
||||
// Number of pins defined in PinDescription array
|
||||
#define PINS_COUNT (34)
|
||||
#define PINS_COUNT (40)
|
||||
#define NUM_DIGITAL_PINS (34)
|
||||
#define NUM_ANALOG_INPUTS (6) // A6 is used for battery, A7 is analog reference
|
||||
#define NUM_ANALOG_INPUTS (6)
|
||||
#define NUM_ANALOG_OUTPUTS (0)
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED1 (3)
|
||||
#define PIN_LED2 (4)
|
||||
#define PIN_NEOPIXEL (8)
|
||||
|
||||
#define LED_BUILTIN PIN_LED1
|
||||
#define LED_CONN PIN_LED2
|
||||
@@ -72,8 +70,6 @@ extern "C"
|
||||
#define PIN_A3 (17)
|
||||
#define PIN_A4 (18)
|
||||
#define PIN_A5 (19)
|
||||
#define PIN_A6 (20)
|
||||
#define PIN_A7 (21)
|
||||
|
||||
#define D0 (0)
|
||||
#define D1 (1)
|
||||
@@ -96,18 +92,12 @@ static const uint8_t A2 = PIN_A2 ;
|
||||
static const uint8_t A3 = PIN_A3 ;
|
||||
static const uint8_t A4 = PIN_A4 ;
|
||||
static const uint8_t A5 = PIN_A5 ;
|
||||
static const uint8_t A6 = PIN_A6 ;
|
||||
static const uint8_t A7 = PIN_A7 ;
|
||||
|
||||
#define ADC_RESOLUTION 14
|
||||
|
||||
// Other pins
|
||||
#define PIN_AREF PIN_A7
|
||||
#define PIN_VBAT PIN_A6
|
||||
#define PIN_NFC1 (33)
|
||||
#define PIN_NFC1 (31)
|
||||
#define PIN_NFC2 (2)
|
||||
|
||||
static const uint8_t AREF = PIN_AREF;
|
||||
|
||||
/*
|
||||
* Serial interfaces
|
||||
*/
|
||||
@@ -119,9 +109,9 @@ static const uint8_t AREF = PIN_AREF;
|
||||
*/
|
||||
#define SPI_INTERFACES_COUNT 1
|
||||
|
||||
#define PIN_SPI_MISO (24) //24 original
|
||||
#define PIN_SPI_MOSI (25) //25 original
|
||||
#define PIN_SPI_SCK (26) //26 original
|
||||
#define PIN_SPI_MISO (22) //24 original
|
||||
#define PIN_SPI_MOSI (23) //25 original
|
||||
#define PIN_SPI_SCK (24) //26 original
|
||||
|
||||
static const uint8_t SS = (13);
|
||||
static const uint8_t MOSI = PIN_SPI_MOSI;
|
||||
@@ -133,16 +123,16 @@ static const uint8_t SCK = PIN_SPI_SCK;
|
||||
*/
|
||||
#define WIRE_INTERFACES_COUNT 1
|
||||
|
||||
#define PIN_WIRE_SDA (22)
|
||||
#define PIN_WIRE_SCL (23)
|
||||
#define PIN_WIRE_SDA (20)
|
||||
#define PIN_WIRE_SCL (21)
|
||||
|
||||
// QSPI Pins
|
||||
#define PIN_QSPI_SCK 27
|
||||
#define PIN_QSPI_CS 28
|
||||
#define PIN_QSPI_IO0 29
|
||||
#define PIN_QSPI_IO1 30
|
||||
#define PIN_QSPI_IO2 31
|
||||
#define PIN_QSPI_IO3 32
|
||||
#define PIN_QSPI_SCK 22
|
||||
#define PIN_QSPI_CS 23
|
||||
#define PIN_QSPI_IO0 24
|
||||
#define PIN_QSPI_IO1 25
|
||||
#define PIN_QSPI_IO2 26
|
||||
#define PIN_QSPI_IO3 27
|
||||
|
||||
// On-board QSPI Flash
|
||||
#define EXTERNAL_FLASH_DEVICES GD25Q16C
|
||||
|
||||
@@ -0,0 +1,650 @@
|
||||
# Copyright (c) 2014-2015 Arduino LLC. All right reserved.
|
||||
# Copyright (c) 2016 Sandeep Mistry All right reserved.
|
||||
# Copyright (c) 2017 Adafruit Industries. All right reserved.
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
menu.softdevice=Bootloader
|
||||
menu.debug=Debug
|
||||
|
||||
# ----------------------------------
|
||||
# Bluefruit Feather nRF52832
|
||||
# ----------------------------------
|
||||
feather52832.name=Adafruit Feather nRF52832
|
||||
feather52832.bootloader.tool=bootburn
|
||||
|
||||
# Upload
|
||||
feather52832.upload.tool=nrfutil
|
||||
feather52832.upload.protocol=nrfutil
|
||||
feather52832.upload.use_1200bps_touch=false
|
||||
feather52832.upload.wait_for_upload_port=false
|
||||
feather52832.upload.native_usb=false
|
||||
feather52832.upload.maximum_size=290816
|
||||
feather52832.upload.maximum_data_size=52224
|
||||
|
||||
# Build
|
||||
feather52832.build.mcu=cortex-m4
|
||||
feather52832.build.f_cpu=64000000
|
||||
feather52832.build.board=NRF52832_FEATHER
|
||||
feather52832.build.core=nRF5
|
||||
feather52832.build.variant=feather_nrf52832
|
||||
feather52832.build.usb_manufacturer="Adafruit LLC"
|
||||
feather52832.build.usb_product="Feather nRF52832"
|
||||
feather52832.build.extra_flags=-DNRF52832_XXAA -DNRF52
|
||||
feather52832.build.ldscript=nrf52832_s132_v6.ld
|
||||
|
||||
# SofDevice Menu
|
||||
feather52832.menu.softdevice.s132v6=0.3.2 SoftDevice s132 6.1.1
|
||||
feather52832.menu.softdevice.s132v6.build.sd_name=s132
|
||||
feather52832.menu.softdevice.s132v6.build.sd_version=6.1.1
|
||||
feather52832.menu.softdevice.s132v6.build.sd_fwid=0x00B7
|
||||
|
||||
# Debug Menu
|
||||
feather52832.menu.debug.l0=Level 0 (Release)
|
||||
feather52832.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
feather52832.menu.debug.l1=Level 1 (Error Message)
|
||||
feather52832.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
feather52832.menu.debug.l2=Level 2 (Full Debug)
|
||||
feather52832.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
feather52832.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
feather52832.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
feather52832.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
# ----------------------------------
|
||||
# Bluefruit Feather nRF52840 Express
|
||||
# ----------------------------------
|
||||
feather52840.name=Adafruit Feather nRF52840 Express
|
||||
|
||||
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
|
||||
feather52840.vid.0=0x239A
|
||||
feather52840.pid.0=0x8029
|
||||
feather52840.vid.1=0x239A
|
||||
feather52840.pid.1=0x0029
|
||||
feather52840.vid.2=0x239A
|
||||
feather52840.pid.2=0x002A
|
||||
feather52840.vid.3=0x239A
|
||||
feather52840.pid.3=0x802A
|
||||
|
||||
# Upload
|
||||
feather52840.bootloader.tool=bootburn
|
||||
feather52840.upload.tool=nrfutil
|
||||
feather52840.upload.protocol=nrfutil
|
||||
feather52840.upload.use_1200bps_touch=true
|
||||
feather52840.upload.wait_for_upload_port=true
|
||||
feather52840.upload.maximum_size=815104
|
||||
feather52840.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
feather52840.build.mcu=cortex-m4
|
||||
feather52840.build.f_cpu=64000000
|
||||
feather52840.build.board=NRF52840_FEATHER
|
||||
feather52840.build.core=nRF5
|
||||
feather52840.build.variant=feather_nrf52840_express
|
||||
feather52840.build.usb_manufacturer="Adafruit LLC"
|
||||
feather52840.build.usb_product="Feather nRF52840 Express"
|
||||
feather52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
|
||||
feather52840.build.ldscript=nrf52840_s140_v6.ld
|
||||
feather52840.build.vid=0x239A
|
||||
feather52840.build.pid=0x8029
|
||||
|
||||
# SofDevice Menu
|
||||
feather52840.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1
|
||||
feather52840.menu.softdevice.s140v6.build.sd_name=s140
|
||||
feather52840.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
feather52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
feather52840.menu.debug.l0=Level 0 (Release)
|
||||
feather52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
feather52840.menu.debug.l1=Level 1 (Error Message)
|
||||
feather52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
feather52840.menu.debug.l2=Level 2 (Full Debug)
|
||||
feather52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
feather52840.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
feather52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
feather52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
|
||||
# ----------------------------------
|
||||
# Feather nRF52840 sense
|
||||
# ----------------------------------
|
||||
feather52840sense.name=Adafruit Feather nRF52840 Sense
|
||||
|
||||
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
|
||||
feather52840sense.vid.0=0x239A
|
||||
feather52840sense.pid.0=0x8087
|
||||
feather52840sense.vid.1=0x239A
|
||||
feather52840sense.pid.1=0x0087
|
||||
feather52840sense.vid.2=0x239A
|
||||
feather52840sense.pid.2=0x0088
|
||||
feather52840sense.vid.3=0x239A
|
||||
feather52840sense.pid.3=0x8088
|
||||
|
||||
# Upload
|
||||
feather52840sense.bootloader.tool=bootburn
|
||||
feather52840sense.upload.tool=nrfutil
|
||||
feather52840sense.upload.protocol=nrfutil
|
||||
feather52840sense.upload.use_1200bps_touch=true
|
||||
feather52840sense.upload.wait_for_upload_port=true
|
||||
feather52840sense.upload.maximum_size=815104
|
||||
feather52840sense.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
feather52840sense.build.mcu=cortex-m4
|
||||
feather52840sense.build.f_cpu=64000000
|
||||
feather52840sense.build.board=NRF52840_FEATHER_SENSE
|
||||
feather52840sense.build.core=nRF5
|
||||
feather52840sense.build.variant=feather_nrf52840_sense
|
||||
feather52840sense.build.usb_manufacturer="Adafruit LLC"
|
||||
feather52840sense.build.usb_product="Feather nRF52840 Sense"
|
||||
feather52840sense.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
|
||||
feather52840sense.build.ldscript=nrf52840_s140_v6.ld
|
||||
feather52840sense.build.vid=0x239A
|
||||
feather52840sense.build.pid=0x8087
|
||||
|
||||
# SofDevice Menu
|
||||
feather52840sense.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1
|
||||
feather52840sense.menu.softdevice.s140v6.build.sd_name=s140
|
||||
feather52840sense.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
feather52840sense.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
feather52840sense.menu.debug.l0=Level 0 (Release)
|
||||
feather52840sense.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
feather52840sense.menu.debug.l1=Level 1 (Error Message)
|
||||
feather52840sense.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
feather52840sense.menu.debug.l2=Level 2 (Full Debug)
|
||||
feather52840sense.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
feather52840sense.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
feather52840sense.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
feather52840sense.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
|
||||
# ---------------------------------------------
|
||||
# Bluefruit ItsyBitsy nRF52840 Express
|
||||
# ---------------------------------------------
|
||||
itsybitsy52840.name=Adafruit ItsyBitsy nRF52840 Express
|
||||
|
||||
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
|
||||
itsybitsy52840.vid.0=0x239A
|
||||
itsybitsy52840.pid.0=0x8051
|
||||
itsybitsy52840.vid.1=0x239A
|
||||
itsybitsy52840.pid.1=0x0051
|
||||
itsybitsy52840.vid.2=0x239A
|
||||
itsybitsy52840.pid.2=0x0052
|
||||
itsybitsy52840.vid.3=0x239A
|
||||
itsybitsy52840.pid.3=0x8052
|
||||
|
||||
# Upload
|
||||
itsybitsy52840.bootloader.tool=bootburn
|
||||
itsybitsy52840.upload.tool=nrfutil
|
||||
itsybitsy52840.upload.protocol=nrfutil
|
||||
itsybitsy52840.upload.use_1200bps_touch=true
|
||||
itsybitsy52840.upload.wait_for_upload_port=true
|
||||
itsybitsy52840.upload.maximum_size=815104
|
||||
itsybitsy52840.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
itsybitsy52840.build.mcu=cortex-m4
|
||||
itsybitsy52840.build.f_cpu=64000000
|
||||
itsybitsy52840.build.board=NRF52840_ITSYBITSY
|
||||
itsybitsy52840.build.core=nRF5
|
||||
itsybitsy52840.build.variant=itsybitsy_nrf52840_express
|
||||
itsybitsy52840.build.usb_manufacturer="Adafruit LLC"
|
||||
itsybitsy52840.build.usb_product="ItsyBitsy nRF52840 Express"
|
||||
itsybitsy52840.build.extra_flags=-DNRF52840_XXAA -DARDUINO_NRF52_ITSYBITSY {build.flags.usb}
|
||||
itsybitsy52840.build.ldscript=nrf52840_s140_v6.ld
|
||||
itsybitsy52840.build.vid=0x239A
|
||||
itsybitsy52840.build.pid=0x8051
|
||||
|
||||
# SofDevice Menu
|
||||
itsybitsy52840.menu.softdevice.s140v6=0.2.11 SoftDevice s140 6.1.1
|
||||
itsybitsy52840.menu.softdevice.s140v6.build.sd_name=s140
|
||||
itsybitsy52840.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
itsybitsy52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
itsybitsy52840.menu.debug.l0=Level 0 (Release)
|
||||
itsybitsy52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
itsybitsy52840.menu.debug.l1=Level 1 (Error Message)
|
||||
itsybitsy52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
itsybitsy52840.menu.debug.l2=Level 2 (Full Debug)
|
||||
itsybitsy52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
itsybitsy52840.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
itsybitsy52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
itsybitsy52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
# ---------------------------------------------
|
||||
# Bluefruit Circuit Playground nRF52840 Express
|
||||
# ---------------------------------------------
|
||||
cplaynrf52840.name=Adafruit Circuit Playground Bluefruit
|
||||
|
||||
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
|
||||
cplaynrf52840.vid.0=0x239A
|
||||
cplaynrf52840.pid.0=0x8045
|
||||
cplaynrf52840.vid.1=0x239A
|
||||
cplaynrf52840.pid.1=0x0045
|
||||
cplaynrf52840.vid.2=0x239A
|
||||
cplaynrf52840.pid.2=0x0046
|
||||
cplaynrf52840.vid.3=0x239A
|
||||
cplaynrf52840.pid.3=0x8046
|
||||
|
||||
# Upload
|
||||
cplaynrf52840.bootloader.tool=bootburn
|
||||
cplaynrf52840.upload.tool=nrfutil
|
||||
cplaynrf52840.upload.protocol=nrfutil
|
||||
cplaynrf52840.upload.use_1200bps_touch=true
|
||||
cplaynrf52840.upload.wait_for_upload_port=true
|
||||
cplaynrf52840.upload.maximum_size=815104
|
||||
cplaynrf52840.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
cplaynrf52840.build.mcu=cortex-m4
|
||||
cplaynrf52840.build.f_cpu=64000000
|
||||
cplaynrf52840.build.board=NRF52840_CIRCUITPLAY
|
||||
cplaynrf52840.build.core=nRF5
|
||||
cplaynrf52840.build.variant=circuitplayground_nrf52840
|
||||
cplaynrf52840.build.usb_manufacturer="Adafruit LLC"
|
||||
cplaynrf52840.build.usb_product="Circuit Playground Bluefruit"
|
||||
cplaynrf52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
|
||||
cplaynrf52840.build.ldscript=nrf52840_s140_v6.ld
|
||||
cplaynrf52840.build.vid=0x239A
|
||||
cplaynrf52840.build.pid=0x8045
|
||||
|
||||
# SofDevice Menu
|
||||
cplaynrf52840.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1
|
||||
cplaynrf52840.menu.softdevice.s140v6.build.sd_name=s140
|
||||
cplaynrf52840.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
cplaynrf52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
cplaynrf52840.menu.debug.l0=Level 0 (Release)
|
||||
cplaynrf52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
cplaynrf52840.menu.debug.l1=Level 1 (Error Message)
|
||||
cplaynrf52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
cplaynrf52840.menu.debug.l2=Level 2 (Full Debug)
|
||||
cplaynrf52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
cplaynrf52840.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
cplaynrf52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
cplaynrf52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
|
||||
# ---------------------------------------------
|
||||
# Clue nRF52840
|
||||
# ---------------------------------------------
|
||||
cluenrf52840.name=Adafruit CLUE
|
||||
|
||||
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
|
||||
cluenrf52840.vid.0=0x239A
|
||||
cluenrf52840.pid.0=0x8072
|
||||
cluenrf52840.vid.1=0x239A
|
||||
cluenrf52840.pid.1=0x0072
|
||||
cluenrf52840.vid.2=0x239A
|
||||
cluenrf52840.pid.2=0x0071
|
||||
cluenrf52840.vid.3=0x239A
|
||||
cluenrf52840.pid.3=0x8071
|
||||
|
||||
# Upload
|
||||
cluenrf52840.bootloader.tool=bootburn
|
||||
cluenrf52840.upload.tool=nrfutil
|
||||
cluenrf52840.upload.protocol=nrfutil
|
||||
cluenrf52840.upload.use_1200bps_touch=true
|
||||
cluenrf52840.upload.wait_for_upload_port=true
|
||||
cluenrf52840.upload.maximum_size=815104
|
||||
cluenrf52840.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
cluenrf52840.build.mcu=cortex-m4
|
||||
cluenrf52840.build.f_cpu=64000000
|
||||
cluenrf52840.build.board=NRF52840_CLUE
|
||||
cluenrf52840.build.core=nRF5
|
||||
cluenrf52840.build.variant=clue_nrf52840
|
||||
cluenrf52840.build.usb_manufacturer="Adafruit LLC"
|
||||
cluenrf52840.build.usb_product="CLUE"
|
||||
cluenrf52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
|
||||
cluenrf52840.build.ldscript=nrf52840_s140_v6.ld
|
||||
cluenrf52840.build.vid=0x239A
|
||||
cluenrf52840.build.pid=0x8071
|
||||
|
||||
# SofDevice Menu
|
||||
cluenrf52840.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1
|
||||
cluenrf52840.menu.softdevice.s140v6.build.sd_name=s140
|
||||
cluenrf52840.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
cluenrf52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
cluenrf52840.menu.debug.l0=Level 0 (Release)
|
||||
cluenrf52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
cluenrf52840.menu.debug.l1=Level 1 (Error Message)
|
||||
cluenrf52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
cluenrf52840.menu.debug.l2=Level 2 (Full Debug)
|
||||
cluenrf52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
cluenrf52840.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
cluenrf52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
cluenrf52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
# ----------------------------------
|
||||
# Metro nRF52840 Express
|
||||
# ----------------------------------
|
||||
metro52840.name=Adafruit Metro nRF52840 Express
|
||||
|
||||
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
|
||||
metro52840.vid.0=0x239A
|
||||
metro52840.pid.0=0x803F
|
||||
metro52840.vid.1=0x239A
|
||||
metro52840.pid.1=0x003F
|
||||
metro52840.vid.2=0x239A
|
||||
metro52840.pid.2=0x0040
|
||||
metro52840.vid.3=0x239A
|
||||
metro52840.pid.3=0x8040
|
||||
|
||||
# Upload
|
||||
metro52840.bootloader.tool=bootburn
|
||||
metro52840.upload.tool=nrfutil
|
||||
metro52840.upload.protocol=nrfutil
|
||||
metro52840.upload.use_1200bps_touch=true
|
||||
metro52840.upload.wait_for_upload_port=true
|
||||
metro52840.upload.maximum_size=815104
|
||||
metro52840.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
metro52840.build.mcu=cortex-m4
|
||||
metro52840.build.f_cpu=64000000
|
||||
metro52840.build.board=NRF52840_METRO
|
||||
metro52840.build.core=nRF5
|
||||
metro52840.build.variant=metro_nrf52840_express
|
||||
metro52840.build.usb_manufacturer="Adafruit LLC"
|
||||
metro52840.build.usb_product="Metro nRF52840 Express"
|
||||
metro52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
|
||||
metro52840.build.ldscript=nrf52840_s140_v6.ld
|
||||
metro52840.build.vid=0x239A
|
||||
metro52840.build.pid=0x803F
|
||||
|
||||
# SofDevice Menu
|
||||
metro52840.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1
|
||||
metro52840.menu.softdevice.s140v6.build.sd_name=s140
|
||||
metro52840.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
metro52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
metro52840.menu.debug.l0=Level 0 (Release)
|
||||
metro52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
metro52840.menu.debug.l1=Level 1 (Error Message)
|
||||
metro52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
metro52840.menu.debug.l2=Level 2 (Full Debug)
|
||||
metro52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
metro52840.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
metro52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
metro52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
|
||||
|
||||
|
||||
# -------------------------------------------------------
|
||||
#
|
||||
# Boards that aren't made by Adafruit
|
||||
#
|
||||
# -------------------------------------------------------
|
||||
|
||||
|
||||
# ----------------------------------
|
||||
# Nordic nRF52840DK (PCA10056)
|
||||
# ----------------------------------
|
||||
pca10056.name=Nordic nRF52840DK (PCA10056)
|
||||
pca10056.bootloader.tool=bootburn
|
||||
|
||||
# Upload
|
||||
pca10056.upload.tool=nrfutil
|
||||
pca10056.upload.protocol=nrfutil
|
||||
pca10056.upload.use_1200bps_touch=true
|
||||
pca10056.upload.wait_for_upload_port=true
|
||||
pca10056.upload.maximum_size=815104
|
||||
pca10056.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
pca10056.build.mcu=cortex-m4
|
||||
pca10056.build.f_cpu=64000000
|
||||
pca10056.build.board=NRF52840_PCA10056
|
||||
pca10056.build.core=nRF5
|
||||
pca10056.build.variant=pca10056
|
||||
pca10056.build.usb_manufacturer="Nordic"
|
||||
pca10056.build.usb_product="nRF52840 DK"
|
||||
pca10056.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
|
||||
pca10056.build.ldscript=nrf52840_s140_v6.ld
|
||||
pca10056.build.vid=0x239A
|
||||
pca10056.build.pid=0x8029
|
||||
|
||||
# SofDevice Menu
|
||||
pca10056.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1
|
||||
pca10056.menu.softdevice.s140v6.build.sd_name=s140
|
||||
pca10056.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
pca10056.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
pca10056.menu.debug.l0=Level 0 (Release)
|
||||
pca10056.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
pca10056.menu.debug.l1=Level 1 (Error Message)
|
||||
pca10056.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
pca10056.menu.debug.l2=Level 2 (Full Debug)
|
||||
pca10056.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
pca10056.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
pca10056.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
pca10056.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
# ----------------------------------
|
||||
# Particle Xenon
|
||||
# ----------------------------------
|
||||
particle_xenon.name=Particle Xenon
|
||||
|
||||
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
|
||||
particle_xenon.vid.0=0x239A
|
||||
particle_xenon.pid.0=0x8029
|
||||
particle_xenon.vid.1=0x239A
|
||||
particle_xenon.pid.1=0x0029
|
||||
particle_xenon.vid.2=0x239A
|
||||
particle_xenon.pid.2=0x002A
|
||||
particle_xenon.vid.3=0x239A
|
||||
particle_xenon.pid.3=0x802A
|
||||
|
||||
# Upload
|
||||
particle_xenon.bootloader.tool=bootburn
|
||||
particle_xenon.upload.tool=nrfutil
|
||||
particle_xenon.upload.protocol=nrfutil
|
||||
particle_xenon.upload.use_1200bps_touch=true
|
||||
particle_xenon.upload.wait_for_upload_port=true
|
||||
particle_xenon.upload.maximum_size=815104
|
||||
particle_xenon.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
particle_xenon.build.mcu=cortex-m4
|
||||
particle_xenon.build.f_cpu=64000000
|
||||
particle_xenon.build.board=PARTICLE_XENON
|
||||
particle_xenon.build.core=nRF5
|
||||
particle_xenon.build.variant=particle_xenon
|
||||
particle_xenon.build.usb_manufacturer="Particle Industries"
|
||||
particle_xenon.build.usb_product="Particle Xenon"
|
||||
particle_xenon.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
|
||||
particle_xenon.build.ldscript=nrf52840_s140_v6.ld
|
||||
particle_xenon.build.vid=0x239A
|
||||
particle_xenon.build.pid=0x8029
|
||||
|
||||
# SofDevice Menu
|
||||
particle_xenon.menu.softdevice.s140v6=0.2.11 SoftDevice s140 6.1.1
|
||||
particle_xenon.menu.softdevice.s140v6.build.sd_name=s140
|
||||
particle_xenon.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
particle_xenon.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
particle_xenon.menu.debug.l0=Level 0 (Release)
|
||||
particle_xenon.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
particle_xenon.menu.debug.l1=Level 1 (Error Message)
|
||||
particle_xenon.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
particle_xenon.menu.debug.l2=Level 2 (Full Debug)
|
||||
particle_xenon.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
particle_xenon.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
particle_xenon.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
particle_xenon.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
# ----------------------------------
|
||||
# Raytac MDBT50Q - RX
|
||||
# ----------------------------------
|
||||
mdbt50qrx.name=Raytac MDBT50Q-RX Dongle
|
||||
|
||||
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
|
||||
mdbt50qrx.vid.0=0x239A
|
||||
mdbt50qrx.pid.0=0x8029
|
||||
mdbt50qrx.vid.1=0x239A
|
||||
mdbt50qrx.pid.1=0x0029
|
||||
mdbt50qrx.vid.2=0x239A
|
||||
mdbt50qrx.pid.2=0x002A
|
||||
mdbt50qrx.vid.3=0x239A
|
||||
mdbt50qrx.pid.3=0x802A
|
||||
|
||||
# Upload
|
||||
mdbt50qrx.bootloader.tool=bootburn
|
||||
mdbt50qrx.upload.tool=nrfutil
|
||||
mdbt50qrx.upload.protocol=nrfutil
|
||||
mdbt50qrx.upload.use_1200bps_touch=true
|
||||
mdbt50qrx.upload.wait_for_upload_port=true
|
||||
mdbt50qrx.upload.maximum_size=815104
|
||||
mdbt50qrx.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
mdbt50qrx.build.mcu=cortex-m4
|
||||
mdbt50qrx.build.f_cpu=64000000
|
||||
mdbt50qrx.build.board=MDBT50Q_RX
|
||||
mdbt50qrx.build.core=nRF5
|
||||
mdbt50qrx.build.variant=raytac_mdbt50q_rx
|
||||
mdbt50qrx.build.usb_manufacturer="Raytac Corporation"
|
||||
mdbt50qrx.build.usb_product="Raytac MDBT50Q - RX"
|
||||
mdbt50qrx.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
|
||||
mdbt50qrx.build.ldscript=nrf52840_s140_v6.ld
|
||||
mdbt50qrx.build.vid=0x239A
|
||||
mdbt50qrx.build.pid=0x8029
|
||||
|
||||
# SofDevice Menu
|
||||
mdbt50qrx.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1
|
||||
mdbt50qrx.menu.softdevice.s140v6.build.sd_name=s140
|
||||
mdbt50qrx.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
mdbt50qrx.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
mdbt50qrx.menu.debug.l0=Level 0 (Release)
|
||||
mdbt50qrx.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
mdbt50qrx.menu.debug.l1=Level 1 (Error Message)
|
||||
mdbt50qrx.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
mdbt50qrx.menu.debug.l2=Level 2 (Full Debug)
|
||||
mdbt50qrx.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
mdbt50qrx.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
mdbt50qrx.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
mdbt50qrx.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
|
||||
# ----------------------------------
|
||||
# NINA B302
|
||||
# ----------------------------------
|
||||
ninab302.name=NINA B302 ublox
|
||||
|
||||
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
|
||||
ninab302.vid.0=0x239A
|
||||
ninab302.pid.0=0x8029
|
||||
ninab302.vid.1=0x239A
|
||||
ninab302.pid.1=0x0029
|
||||
ninab302.vid.2=0x7239A
|
||||
ninab302.pid.2=0x002A
|
||||
ninab302.vid.3=0x239A
|
||||
ninab302.pid.3=0x802A
|
||||
|
||||
# Upload
|
||||
ninab302.bootloader.tool=bootburn
|
||||
ninab302.upload.tool=nrfutil
|
||||
ninab302.upload.protocol=nrfutil
|
||||
ninab302.upload.use_1200bps_touch=true
|
||||
ninab302.upload.wait_for_upload_port=true
|
||||
ninab302.upload.maximum_size=815104
|
||||
ninab302.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
ninab302.build.mcu=cortex-m4
|
||||
ninab302.build.f_cpu=64000000
|
||||
ninab302.build.board=NINA_B302_ublox
|
||||
ninab302.build.core=nRF5
|
||||
ninab302.build.variant=NINA_B302_ublox
|
||||
ninab302.build.usb_manufacturer="Nordic"
|
||||
ninab302.build.usb_product="NINA B302 ublox"
|
||||
ninab302.build.extra_flags=-DNRF52840_XXAA -DNINA_B302_ublox {build.flags.usb}
|
||||
ninab302.build.ldscript=nrf52840_s140_v6.ld
|
||||
ninab302.build.vid=0x239A
|
||||
ninab302.build.pid=0x8029
|
||||
|
||||
# SofDevice Menu
|
||||
ninab302.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1
|
||||
ninab302.menu.softdevice.s140v6.build.sd_name=s140
|
||||
ninab302.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
ninab302.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
ninab302.menu.debug.l0=Level 0 (Release)
|
||||
ninab302.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
ninab302.menu.debug.l1=Level 1 (Error Message)
|
||||
ninab302.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
ninab302.menu.debug.l2=Level 2 (Full Debug)
|
||||
ninab302.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
ninab302.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
ninab302.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
ninab302.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
# ----------------------------------
|
||||
# NINA B112
|
||||
# ----------------------------------
|
||||
ninab112.name=NINA B112 ublox
|
||||
ninab112.bootloader.tool=bootburn
|
||||
|
||||
# Upload
|
||||
ninab112.upload.tool=nrfutil
|
||||
ninab112.upload.protocol=nrfutil
|
||||
ninab112.upload.use_1200bps_touch=false
|
||||
ninab112.upload.wait_for_upload_port=false
|
||||
ninab112.upload.native_usb=false
|
||||
ninab112.upload.maximum_size=290816
|
||||
ninab112.upload.maximum_data_size=52224
|
||||
|
||||
# Build
|
||||
ninab112.build.mcu=cortex-m4
|
||||
ninab112.build.f_cpu=64000000
|
||||
ninab112.build.board=NINA_B112_ublox
|
||||
ninab112.build.core=nRF5
|
||||
ninab112.build.variant=NINA_B112_ublox
|
||||
feather52840.build.usb_manufacturer="Adafruit LLC"
|
||||
feather52840.build.usb_product="Feather nRF52832"
|
||||
ninab112.build.extra_flags=-DNRF52832_XXAA -DNINA_B112_ublox -DNRF52
|
||||
ninab112.build.ldscript=nrf52832_s132_v6.ld
|
||||
|
||||
# SofDevice Menu
|
||||
ninab112.menu.softdevice.s132v6=0.3.2 SoftDevice s132 6.1.1
|
||||
ninab112.menu.softdevice.s132v6.build.sd_name=s132
|
||||
ninab112.menu.softdevice.s132v6.build.sd_version=6.1.1
|
||||
ninab112.menu.softdevice.s132v6.build.sd_fwid=0x00B7
|
||||
|
||||
# Debug Menu
|
||||
ninab112.menu.debug.l0=Level 0 (Release)
|
||||
ninab112.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
ninab112.menu.debug.l1=Level 1 (Error Message)
|
||||
ninab112.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
ninab112.menu.debug.l2=Level 2 (Full Debug)
|
||||
ninab112.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
ninab112.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
ninab112.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
ninab112.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
* Udp.cpp: Library to send/receive UDP packets.
|
||||
*
|
||||
* NOTE: UDP is fast, but has some important limitations (thanks to Warren Gray for mentioning these)
|
||||
* 1) UDP does not guarantee the order in which assembled UDP packets are received. This
|
||||
* might not happen often in practice, but in larger network topologies, a UDP
|
||||
* packet can be received out of sequence.
|
||||
* 2) UDP does not guard against lost packets - so packets *can* disappear without the sender being
|
||||
* aware of it. Again, this may not be a concern in practice on small local networks.
|
||||
* For more information, see http://www.cafeaulait.org/course/week12/35.html
|
||||
*
|
||||
* MIT License:
|
||||
* Copyright (c) 2008 Bjoern Hartmann
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
* bjoern@cs.stanford.edu 12/30/2008
|
||||
*/
|
||||
|
||||
#ifndef udp_h
|
||||
#define udp_h
|
||||
|
||||
#include <Stream.h>
|
||||
#include <IPAddress.h>
|
||||
|
||||
class UDP : public Stream {
|
||||
|
||||
public:
|
||||
virtual uint8_t begin(uint16_t) =0; // initialize, start listening on specified port. Returns 1 if successful, 0 if there are no sockets available to use
|
||||
|
||||
// KH, add virtual function to support Multicast, necessary for many services (MDNS, UPnP, etc.)
|
||||
virtual uint8_t beginMulticast(IPAddress, uint16_t) { return 0; } // initialize, start listening on specified multicast IP address and port. Returns 1 if successful, 0 on failure
|
||||
|
||||
virtual void stop() =0; // Finish with the UDP socket
|
||||
|
||||
// Sending UDP packets
|
||||
|
||||
// Start building up a packet to send to the remote host specific in ip and port
|
||||
// Returns 1 if successful, 0 if there was a problem with the supplied IP address or port
|
||||
virtual int beginPacket(IPAddress ip, uint16_t port) =0;
|
||||
// Start building up a packet to send to the remote host specific in host and port
|
||||
// Returns 1 if successful, 0 if there was a problem resolving the hostname or port
|
||||
virtual int beginPacket(const char *host, uint16_t port) =0;
|
||||
// Finish off this packet and send it
|
||||
// Returns 1 if the packet was sent successfully, 0 if there was an error
|
||||
virtual int endPacket() =0;
|
||||
// Write a single byte into the packet
|
||||
virtual size_t write(uint8_t) =0;
|
||||
// Write size bytes from buffer into the packet
|
||||
virtual size_t write(const uint8_t *buffer, size_t size) =0;
|
||||
|
||||
// Start processing the next available incoming packet
|
||||
// Returns the size of the packet in bytes, or 0 if no packets are available
|
||||
virtual int parsePacket() =0;
|
||||
// Number of bytes remaining in the current packet
|
||||
virtual int available() =0;
|
||||
// Read a single byte from the current packet
|
||||
virtual int read() =0;
|
||||
// Read up to len bytes from the current packet and place them into buffer
|
||||
// Returns the number of bytes read, or 0 if none are available
|
||||
virtual int read(unsigned char* buffer, size_t len) =0;
|
||||
// Read up to len characters from the current packet and place them into buffer
|
||||
// Returns the number of characters read, or 0 if none are available
|
||||
virtual int read(char* buffer, size_t len) =0;
|
||||
// Return the next byte from the current packet without moving on to the next byte
|
||||
virtual int peek() =0;
|
||||
virtual void flush() =0; // Finish reading the current packet
|
||||
|
||||
// Return the IP address of the host who sent the current incoming packet
|
||||
virtual IPAddress remoteIP() =0;
|
||||
// Return the port of the host who sent the current incoming packet
|
||||
virtual uint16_t remotePort() =0;
|
||||
protected:
|
||||
uint8_t* rawIPAddress(IPAddress& addr) { return addr.raw_address(); };
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,165 @@
|
||||
# Copyright (c) 2014-2015 Arduino LLC. All right reserved.
|
||||
# Copyright (c) 2016 Sandeep Mistry All right reserved.
|
||||
# Copyright (c) 2017 Adafruit Industries. All rights reserved.
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
name=Adafruit nRF52 Boards
|
||||
version=0.22.0
|
||||
|
||||
# Compile variables
|
||||
# -----------------
|
||||
|
||||
compiler.warning_flags=-w
|
||||
compiler.warning_flags.none=-w
|
||||
compiler.warning_flags.default=
|
||||
compiler.warning_flags.more=-Wall
|
||||
compiler.warning_flags.all=-Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-pointer-arith
|
||||
|
||||
# Allow changing optimization settings via platform.local.txt / boards.local.txt
|
||||
compiler.optimization_flag=-Ofast
|
||||
|
||||
compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/
|
||||
compiler.c.cmd=arm-none-eabi-gcc
|
||||
compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.warning_flags} {build.float_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD
|
||||
|
||||
# KH, Error here to use gcc, must use g++
|
||||
#compiler.c.elf.cmd=arm-none-eabi-gcc
|
||||
compiler.c.elf.cmd=arm-none-eabi-g++
|
||||
|
||||
compiler.c.elf.flags={compiler.optimization_flag} -Wl,--gc-sections -save-temps
|
||||
compiler.S.cmd=arm-none-eabi-gcc
|
||||
compiler.S.flags=-mcpu={build.mcu} -mthumb -mabi=aapcs {compiler.optimization_flag} -g -c {build.float_flags} -x assembler-with-cpp
|
||||
|
||||
compiler.cpp.cmd=arm-none-eabi-g++
|
||||
compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.warning_flags} {build.float_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD
|
||||
compiler.ar.cmd=arm-none-eabi-ar
|
||||
compiler.ar.flags=rcs
|
||||
compiler.objcopy.cmd=arm-none-eabi-objcopy
|
||||
compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0
|
||||
compiler.elf2bin.flags=-O binary
|
||||
compiler.elf2bin.cmd=arm-none-eabi-objcopy
|
||||
compiler.elf2hex.flags=-O ihex
|
||||
compiler.elf2hex.cmd=arm-none-eabi-objcopy
|
||||
compiler.ldflags=-mcpu={build.mcu} -mthumb {build.float_flags} -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align --specs=nano.specs --specs=nosys.specs
|
||||
compiler.size.cmd=arm-none-eabi-size
|
||||
|
||||
# this can be overriden in boards.txt
|
||||
build.float_flags=-mfloat-abi=hard -mfpu=fpv4-sp-d16 -u _printf_float
|
||||
build.debug_flags=-DCFG_DEBUG=0
|
||||
build.logger_flags=-DCFG_LOGGER=1
|
||||
build.sysview_flags=-DCFG_SYSVIEW=0
|
||||
|
||||
# common compiler for nrf
|
||||
rtos.path={build.core.path}/freertos
|
||||
nordic.path={build.core.path}/nordic
|
||||
|
||||
# build.logger_flags and build.sysview_flags are intentionally empty,
|
||||
# to allow modification via a user's own boards.local.txt or platform.local.txt files.
|
||||
build.flags.nrf= -DSOFTDEVICE_PRESENT -DARDUINO_NRF52_ADAFRUIT -DNRF52_SERIES -DDX_CC_TEE -DLFS_NAME_MAX=64 {compiler.optimization_flag} {build.debug_flags} {build.logger_flags} {build.sysview_flags} "-I{build.core.path}/cmsis/Core/Include" "-I{nordic.path}" "-I{nordic.path}/nrfx" "-I{nordic.path}/nrfx/hal" "-I{nordic.path}/nrfx/mdk" "-I{nordic.path}/nrfx/soc" "-I{nordic.path}/nrfx/drivers/include" "-I{nordic.path}/nrfx/drivers/src" "-I{nordic.path}/softdevice/{build.sd_name}_nrf52_{build.sd_version}_API/include" "-I{nordic.path}/softdevice/{build.sd_name}_nrf52_{build.sd_version}_API/include/nrf52" "-I{rtos.path}/Source/include" "-I{rtos.path}/config" "-I{rtos.path}/portable/GCC/nrf52" "-I{rtos.path}/portable/CMSIS/nrf52" "-I{build.core.path}/sysview/SEGGER" "-I{build.core.path}/sysview/Config" "-I{runtime.platform.path}/libraries/Adafruit_TinyUSB_Arduino/src/arduino"
|
||||
|
||||
# usb flags
|
||||
build.flags.usb= -DUSBCON -DUSE_TINYUSB -DUSB_VID={build.vid} -DUSB_PID={build.pid} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}'
|
||||
|
||||
# These can be overridden in platform.local.txt
|
||||
compiler.c.extra_flags=
|
||||
compiler.c.elf.extra_flags=
|
||||
compiler.cpp.extra_flags=
|
||||
compiler.S.extra_flags=
|
||||
compiler.ar.extra_flags=
|
||||
compiler.libraries.ldflags=
|
||||
compiler.elf2bin.extra_flags=
|
||||
compiler.elf2hex.extra_flags=
|
||||
|
||||
|
||||
# Compile patterns
|
||||
# ----------------
|
||||
|
||||
## Compile c files
|
||||
## KH Add -DBOARD_NAME="{build.board}"
|
||||
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} '-DARDUINO_BSP_VERSION="{version}"' {compiler.c.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}"
|
||||
|
||||
## Compile c++ files
|
||||
## KH Add -DBOARD_NAME="{build.board}"
|
||||
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} '-DARDUINO_BSP_VERSION="{version}"' {compiler.cpp.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}"
|
||||
|
||||
## Compile S files
|
||||
## KH Add -DBOARD_NAME="{build.board}"
|
||||
recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}"
|
||||
|
||||
## Create archives
|
||||
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"
|
||||
|
||||
## Combine gc-sections, archives, and objects
|
||||
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-L{build.core.path}/linker" "-T{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} -Wl,--start-group -lm "{build.path}/{archive_file}" {compiler.libraries.ldflags} -Wl,--end-group
|
||||
|
||||
## Create output (bin file)
|
||||
#recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2bin.cmd}" {compiler.elf2bin.flags} {compiler.elf2bin.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin"
|
||||
|
||||
## Create output (hex file)
|
||||
recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex"
|
||||
|
||||
## Create dfu package zip file
|
||||
recipe.objcopy.zip.pattern="{tools.nrfutil.cmd}" dfu genpkg --dev-type 0x0052 --sd-req {build.sd_fwid} --application "{build.path}/{build.project_name}.hex" "{build.path}/{build.project_name}.zip"
|
||||
|
||||
## Create uf2 file
|
||||
#recipe.objcopy.uf2.pattern=python "{runtime.platform.path}/tools/uf2conv/uf2conv.py" -f 0xADA52840 -c -o "{build.path}/{build.project_name}.uf2" "{build.path}/{build.project_name}.hex"
|
||||
|
||||
## Save bin
|
||||
recipe.output.tmp_file_bin={build.project_name}.bin
|
||||
recipe.output.save_file_bin={build.project_name}.save.bin
|
||||
|
||||
## Save hex
|
||||
recipe.output.tmp_file_hex={build.project_name}.hex
|
||||
recipe.output.save_file_hexu={build.project_name}.save.hex
|
||||
|
||||
## Compute size
|
||||
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
|
||||
recipe.size.regex=^(?:\.text|\.data|)\s+([0-9]+).*
|
||||
recipe.size.regex.data=^(?:\.data|\.bss)\s+([0-9]+).*
|
||||
|
||||
## Export Compiled Binary
|
||||
recipe.output.tmp_file={build.project_name}.hex
|
||||
recipe.output.save_file={build.project_name}.{build.variant}.hex
|
||||
|
||||
#***************************************************
|
||||
# adafruit-nrfutil for uploading
|
||||
# https://github.com/adafruit/Adafruit_nRF52_nrfutil
|
||||
# pre-built binaries are provided for macos and windows
|
||||
#***************************************************
|
||||
tools.nrfutil.cmd=adafruit-nrfutil
|
||||
tools.nrfutil.cmd.windows={runtime.platform.path}/tools/adafruit-nrfutil/win32/adafruit-nrfutil.exe
|
||||
tools.nrfutil.cmd.macosx={runtime.platform.path}/tools/adafruit-nrfutil/macos/adafruit-nrfutil
|
||||
|
||||
tools.nrfutil.upload.params.verbose=--verbose
|
||||
tools.nrfutil.upload.params.quiet=
|
||||
tools.nrfutil.upload.pattern="{cmd}" {upload.verbose} dfu serial -pkg "{build.path}/{build.project_name}.zip" -p {serial.port} -b 115200 --singlebank
|
||||
|
||||
#***************************************************
|
||||
# Burning bootloader with either jlink or nrfutil
|
||||
#***************************************************
|
||||
|
||||
# Bootloader version
|
||||
tools.bootburn.bootloader.file={runtime.platform.path}/bootloader/{build.variant}/{build.variant}_bootloader-0.3.2_{build.sd_name}_{build.sd_version}
|
||||
|
||||
tools.bootburn.bootloader.params.verbose=
|
||||
tools.bootburn.bootloader.params.quiet=
|
||||
tools.bootburn.bootloader.pattern={program.burn_pattern}
|
||||
|
||||
# erase flash page while programming
|
||||
tools.bootburn.erase.params.verbose=
|
||||
tools.bootburn.erase.params.quiet=
|
||||
tools.bootburn.erase.pattern=
|
||||
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Lesser General Public License for more details.
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
// API compatibility
|
||||
#include "variant.h"
|
||||
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
|
||||
Copyright (c) 2016 Sandeep Mistry All right reserved.
|
||||
Copyright (c) 2018, Adafruit Industries (adafruit.com)
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
// Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip).
|
||||
// See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1)
|
||||
|
||||
#include "variant.h"
|
||||
#include "wiring_constants.h"
|
||||
#include "wiring_digital.h"
|
||||
#include "nrf.h"
|
||||
|
||||
const uint32_t g_ADigitalPinMap[] = {
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
6,
|
||||
7,
|
||||
8,
|
||||
9,
|
||||
10,
|
||||
11,
|
||||
12,
|
||||
13,
|
||||
14,
|
||||
15,
|
||||
16,
|
||||
17,
|
||||
18,
|
||||
19,
|
||||
20,
|
||||
21,
|
||||
22,
|
||||
23,
|
||||
24,
|
||||
25,
|
||||
26,
|
||||
27,
|
||||
28,
|
||||
29,
|
||||
30,
|
||||
31
|
||||
};
|
||||
|
||||
@@ -0,0 +1,173 @@
|
||||
/*
|
||||
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
|
||||
Copyright (c) 2016 Sandeep Mistry All right reserved.
|
||||
Copyright (c) 2018, Adafruit Industries (adafruit.com)
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Lesser General Public License for more details.
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef _VARIANT_NINA_B112_UBLOX_
|
||||
#define _VARIANT_NINA_B112_UBLOX_
|
||||
|
||||
#define NRF_CLOCK_LFCLKSRC {.source = NRF_CLOCK_LF_SRC_XTAL, \
|
||||
.rc_ctiv = 0, \
|
||||
.rc_temp_ctiv = 0, \
|
||||
.xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM}
|
||||
|
||||
/** Master clock frequency */
|
||||
#define VARIANT_MCK (64000000ul)
|
||||
|
||||
#define USE_LFXO // Board uses 32khz crystal for LF
|
||||
// define USE_LFRC // Board uses RC for LF
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Headers
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
#include "WVariant.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif // __cplusplus
|
||||
|
||||
// Number of pins defined in PinDescription array
|
||||
#define PINS_COUNT (32u)
|
||||
#define NUM_DIGITAL_PINS (32u)
|
||||
#define NUM_ANALOG_INPUTS (6u)
|
||||
#define NUM_ANALOG_OUTPUTS (0u)
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED LED1
|
||||
#define LED_BUILTIN PIN_LED
|
||||
|
||||
//LEDs onboard
|
||||
#define LED1 (8) // Red
|
||||
#define LED2 (16) // Green/SW1
|
||||
#define LED3 (18) // Blue
|
||||
|
||||
#define LED_STATE_ON 1 // State when LED is litted
|
||||
|
||||
//Switch
|
||||
|
||||
#define SW1 (16)
|
||||
#define SW2 (30)
|
||||
|
||||
// NFC
|
||||
#define PIN_NFC_1 (9) // P0.9
|
||||
#define PIN_NFC_2 (10) // P0.10
|
||||
|
||||
/*
|
||||
* Analog pins
|
||||
*/
|
||||
#define PIN_A0 (3) // P0.03
|
||||
#define PIN_A1 (2) // P0.02
|
||||
#define PIN_A2 (4) // P0.04
|
||||
#define PIN_A3 (30) // P0.30
|
||||
#define PIN_A4 (29) // P0.29
|
||||
#define PIN_A5 (28) // P0.28
|
||||
|
||||
static const uint8_t A0 = PIN_A0 ;
|
||||
static const uint8_t A1 = PIN_A1 ;
|
||||
static const uint8_t A2 = PIN_A2 ;
|
||||
static const uint8_t A3 = PIN_A3 ;
|
||||
static const uint8_t A4 = PIN_A4 ;
|
||||
static const uint8_t A5 = PIN_A5 ;
|
||||
|
||||
#define ADC_RESOLUTION 14
|
||||
|
||||
#define PIN_D0 (5) // P0.05
|
||||
#define PIN_D1 (6) // P0.06
|
||||
#define PIN_D2 (7) // P0.07
|
||||
#define PIN_D3 (31) // P0.31
|
||||
#define PIN_D4 (18) // P0.18
|
||||
#define PIN_D6 (9) // P0.09
|
||||
#define PIN_D7 (10) // P0.10
|
||||
#define PIN_D9 (8) // P0.8
|
||||
#define PIN_D10 (11) // P0.11
|
||||
#define PIN_D11 (13) // P0.13
|
||||
#define PIN_D12 (12) // P0.12
|
||||
#define PIN_D13 (14) // P0.14
|
||||
#define PIN_D14 (2) // P0.02
|
||||
#define PIN_D15 (3) // P0.03
|
||||
|
||||
static const uint8_t D0 = PIN_D0 ;
|
||||
static const uint8_t D1 = PIN_D1 ;
|
||||
static const uint8_t D2 = PIN_D2 ;
|
||||
static const uint8_t D3 = PIN_D3 ;
|
||||
static const uint8_t D4 = PIN_D4 ;
|
||||
static const uint8_t D6 = PIN_D6 ;
|
||||
static const uint8_t D7 = PIN_D7 ;
|
||||
static const uint8_t D9 = PIN_D9 ;
|
||||
static const uint8_t D10 = PIN_D10 ;
|
||||
static const uint8_t D11 = PIN_D11 ;
|
||||
static const uint8_t D12 = PIN_D12 ;
|
||||
static const uint8_t D13 = PIN_D13 ;
|
||||
static const uint8_t D14 = PIN_D14 ;
|
||||
static const uint8_t D15 = PIN_D15 ;
|
||||
|
||||
// Other pins
|
||||
//static const uint8_t AREF = PIN_AREF;
|
||||
|
||||
//#define PIN_AREF (24)
|
||||
//#define PIN_VBAT PIN_A7
|
||||
|
||||
/*
|
||||
* Serial interfaces
|
||||
*/
|
||||
//#define PIN_SERIAL_RX (8) //used for original Adafruit Bootloader
|
||||
//#define PIN_SERIAL_TX (6) //used for original Adafruit Bootloader
|
||||
|
||||
#define PIN_SERIAL_RX (5) // P0.05
|
||||
#define PIN_SERIAL_TX (6) // P0.06
|
||||
#define PIN_SERIAL_CTS (7) // P0.07
|
||||
#define PIN_SERIAL_RTS (31) // P0.31
|
||||
#define PIN_SERIAL_DTR (28) // P0.28
|
||||
#define PIN_SERIAL_DSR (29) // P0.29
|
||||
|
||||
/*
|
||||
* SPI Interfaces
|
||||
*/
|
||||
#define SPI_INTERFACES_COUNT 1
|
||||
|
||||
#define PIN_SPI_MISO (12) // P0.12
|
||||
#define PIN_SPI_MOSI (13) // P0.13
|
||||
#define PIN_SPI_SCK (14) // P0.14
|
||||
|
||||
static const uint8_t SS = 11 ; // P0.11
|
||||
static const uint8_t MOSI = PIN_SPI_MOSI ;
|
||||
static const uint8_t MISO = PIN_SPI_MISO ;
|
||||
static const uint8_t SCK = PIN_SPI_SCK ;
|
||||
|
||||
/*
|
||||
* Wire Interfaces
|
||||
*/
|
||||
#define WIRE_INTERFACES_COUNT 1
|
||||
|
||||
#define PIN_WIRE_SDA (2) // P0.02
|
||||
#define PIN_WIRE_SCL (3) // P0.03
|
||||
|
||||
static const uint8_t SDA = PIN_WIRE_SDA;
|
||||
static const uint8_t SCL = PIN_WIRE_SCL;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Arduino objects - C++ only
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
#endif //_VARIANT_NINA_B112_UBLOX_
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Lesser General Public License for more details.
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
// API compatibility
|
||||
#include "variant.h"
|
||||
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
|
||||
Copyright (c) 2016 Sandeep Mistry All right reserved.
|
||||
Copyright (c) 2018, Adafruit Industries (adafruit.com)
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
// Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip).
|
||||
// See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1)
|
||||
|
||||
#include "variant.h"
|
||||
#include "wiring_constants.h"
|
||||
#include "wiring_digital.h"
|
||||
#include "nrf.h"
|
||||
|
||||
const uint32_t g_ADigitalPinMap[] =
|
||||
{
|
||||
// D0 .. D13
|
||||
29, // D0 is P0.29 (UART TX)
|
||||
45, // D1 is P1.13 (UART RX
|
||||
44, // D2 is P1.12 (NFC2)
|
||||
31, // D3 is P0.31 (LED1)
|
||||
13, // D4 is P0.13 (LED2)
|
||||
11, // D5 is P0.11
|
||||
9, // D6 is P0.09
|
||||
10, // D7 is P0.10 (Button)
|
||||
41, // D8 is P1.09
|
||||
12, // D9 is P0.12
|
||||
14, // D10 is P0.14
|
||||
15, // D11 is P0.15
|
||||
32, // D12 is P1.00
|
||||
7, // D13 is P0.07
|
||||
|
||||
// D14 .. D21 (aka A0 .. A5)
|
||||
4, // D14 is P0.04 (A0)
|
||||
30, // D15 is P0.30 (A1)
|
||||
5, // D16 is P0.05 (A2)
|
||||
2, // D17 is P0.02 (A3)
|
||||
28, // D18 is P0.28 (A4)
|
||||
3, // D19 is P0.03 (A5)
|
||||
|
||||
// D20 .. D21 (aka I2C pins)
|
||||
16, // D20 is P0.16 (SDA)
|
||||
24, // D21 is P0.24 (SCL)
|
||||
|
||||
// QSPI pins (not exposed via any header / test point)
|
||||
19, // D22 is P0.19 (QSPI CLK)
|
||||
17, // D23 is P0.17 (QSPI CS)
|
||||
20, // D24 is P0.20 (QSPI Data 0)
|
||||
21, // D25 is P0.21 (QSPI Data 1)
|
||||
22, // D26 is P0.22 (QSPI Data 2)
|
||||
26, // D27 is P0.23 (QSPI Data 3)
|
||||
|
||||
40, // D28 is P1.08 - IO34
|
||||
41, // D29 is P1.01 - IO35
|
||||
44, // D30 is P1.02 - IO36
|
||||
45, // D31 is P1.03 - IO37
|
||||
42, // D32 is P1.10 - IO38
|
||||
43, // D33 is P1.11 - IO39
|
||||
47, // D34 is P1.15 - IO40
|
||||
46, // D35 is P1.14 - IO41
|
||||
26, // D36 is P0.26 - IO42
|
||||
6, // D37 is P0.6 - IO43
|
||||
27, // D38 is P0.27 - IO44
|
||||
};
|
||||
|
||||
void initVariant()
|
||||
{
|
||||
// LED1 & LED2
|
||||
pinMode(PIN_LED1, OUTPUT);
|
||||
ledOff(PIN_LED1);
|
||||
|
||||
pinMode(PIN_LED2, OUTPUT);
|
||||
ledOff(PIN_LED2);
|
||||
}
|
||||
@@ -0,0 +1,149 @@
|
||||
/*
|
||||
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
|
||||
Copyright (c) 2016 Sandeep Mistry All right reserved.
|
||||
Copyright (c) 2018, Adafruit Industries (adafruit.com)
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Lesser General Public License for more details.
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
// Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip).
|
||||
// See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1)
|
||||
|
||||
#ifndef _VARIANT_NINA_B302_UBLOX_
|
||||
#define _VARIANT_NINA_B302_UBLOX_
|
||||
|
||||
/** Master clock frequency */
|
||||
#define VARIANT_MCK (64000000ul)
|
||||
|
||||
#define USE_LFXO // Board uses 32khz crystal for LF
|
||||
// define USE_LFRC // Board uses RC for LF
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Headers
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
#include "WVariant.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif // __cplusplus
|
||||
// Number of pins defined in PinDescription array
|
||||
#define PINS_COUNT (40)
|
||||
#define NUM_DIGITAL_PINS (34)
|
||||
#define NUM_ANALOG_INPUTS (6)
|
||||
#define NUM_ANALOG_OUTPUTS (0)
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED1 (3)
|
||||
#define PIN_LED2 (4)
|
||||
|
||||
#define LED_BUILTIN PIN_LED1
|
||||
#define LED_CONN PIN_LED2
|
||||
|
||||
#define LED_RED PIN_LED1
|
||||
#define LED_BLUE PIN_LED2
|
||||
|
||||
#define LED_STATE_ON 1 // State when LED is litted
|
||||
|
||||
/*
|
||||
* Buttons
|
||||
*/
|
||||
#define PIN_BUTTON1 (7)
|
||||
|
||||
/*
|
||||
* Analog pins
|
||||
*/
|
||||
#define PIN_A0 (14)
|
||||
#define PIN_A1 (15)
|
||||
#define PIN_A2 (16)
|
||||
#define PIN_A3 (17)
|
||||
#define PIN_A4 (18)
|
||||
#define PIN_A5 (19)
|
||||
|
||||
#define D0 (0)
|
||||
#define D1 (1)
|
||||
#define D2 (2)
|
||||
#define D3 (3)
|
||||
#define D4 (4)
|
||||
#define D5 (5)
|
||||
#define D6 (6)
|
||||
#define D7 (7)
|
||||
#define D8 (8)
|
||||
#define D9 (9)
|
||||
#define D10 (10)
|
||||
#define D11 (11)
|
||||
#define D12 (12)
|
||||
#define D13 (13)
|
||||
|
||||
static const uint8_t A0 = PIN_A0 ;
|
||||
static const uint8_t A1 = PIN_A1 ;
|
||||
static const uint8_t A2 = PIN_A2 ;
|
||||
static const uint8_t A3 = PIN_A3 ;
|
||||
static const uint8_t A4 = PIN_A4 ;
|
||||
static const uint8_t A5 = PIN_A5 ;
|
||||
|
||||
#define ADC_RESOLUTION 14
|
||||
|
||||
#define PIN_NFC1 (31)
|
||||
#define PIN_NFC2 (2)
|
||||
|
||||
/*
|
||||
* Serial interfaces
|
||||
*/
|
||||
#define PIN_SERIAL1_RX (1)
|
||||
#define PIN_SERIAL1_TX (0)
|
||||
|
||||
/*
|
||||
* SPI Interfaces
|
||||
*/
|
||||
#define SPI_INTERFACES_COUNT 1
|
||||
|
||||
#define PIN_SPI_MISO (22) //24 original
|
||||
#define PIN_SPI_MOSI (23) //25 original
|
||||
#define PIN_SPI_SCK (24) //26 original
|
||||
|
||||
static const uint8_t SS = (13);
|
||||
static const uint8_t MOSI = PIN_SPI_MOSI;
|
||||
static const uint8_t MISO = PIN_SPI_MISO;
|
||||
static const uint8_t SCK = PIN_SPI_SCK;
|
||||
|
||||
/*
|
||||
* Wire Interfaces
|
||||
*/
|
||||
#define WIRE_INTERFACES_COUNT 1
|
||||
|
||||
#define PIN_WIRE_SDA (20)
|
||||
#define PIN_WIRE_SCL (21)
|
||||
|
||||
// QSPI Pins
|
||||
#define PIN_QSPI_SCK 22
|
||||
#define PIN_QSPI_CS 23
|
||||
#define PIN_QSPI_IO0 24
|
||||
#define PIN_QSPI_IO1 25
|
||||
#define PIN_QSPI_IO2 26
|
||||
#define PIN_QSPI_IO3 27
|
||||
|
||||
// On-board QSPI Flash
|
||||
#define EXTERNAL_FLASH_DEVICES GD25Q16C
|
||||
#define EXTERNAL_FLASH_USE_QSPI
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Arduino objects - C++ only
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
#endif //_VARIANT_NINA_B302_UBLOX_
|
||||
@@ -0,0 +1,596 @@
|
||||
# Copyright (c) 2014-2015 Arduino LLC. All right reserved.
|
||||
# Copyright (c) 2016 Sandeep Mistry All right reserved.
|
||||
# Copyright (c) 2017 Adafruit Industries. All right reserved.
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
menu.softdevice=Bootloader
|
||||
menu.debug=Debug
|
||||
|
||||
# ----------------------------------
|
||||
# Bluefruit Feather nRF52832
|
||||
# ----------------------------------
|
||||
feather52832.name=Adafruit Feather nRF52832
|
||||
feather52832.bootloader.tool=bootburn
|
||||
|
||||
# Upload
|
||||
feather52832.upload.tool=nrfutil
|
||||
feather52832.upload.protocol=nrfutil
|
||||
feather52832.upload.use_1200bps_touch=false
|
||||
feather52832.upload.wait_for_upload_port=false
|
||||
feather52832.upload.native_usb=false
|
||||
feather52832.upload.maximum_size=290816
|
||||
feather52832.upload.maximum_data_size=52224
|
||||
|
||||
# Build
|
||||
feather52832.build.mcu=cortex-m4
|
||||
feather52832.build.f_cpu=64000000
|
||||
feather52832.build.board=NRF52832_FEATHER
|
||||
feather52832.build.core=nRF5
|
||||
feather52832.build.variant=feather_nrf52832
|
||||
feather52832.build.usb_manufacturer="Adafruit LLC"
|
||||
feather52832.build.usb_product="Feather nRF52832"
|
||||
feather52832.build.extra_flags=-DNRF52832_XXAA -DNRF52
|
||||
feather52832.build.ldscript=nrf52832_s132_v6.ld
|
||||
|
||||
# SofDevice Menu
|
||||
feather52832.menu.softdevice.s132v6=0.5.0 SoftDevice s132 6.1.1
|
||||
feather52832.menu.softdevice.s132v6.build.sd_name=s132
|
||||
feather52832.menu.softdevice.s132v6.build.sd_version=6.1.1
|
||||
feather52832.menu.softdevice.s132v6.build.sd_fwid=0x00B7
|
||||
|
||||
# Debug Menu
|
||||
feather52832.menu.debug.l0=Level 0 (Release)
|
||||
feather52832.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
feather52832.menu.debug.l1=Level 1 (Error Message)
|
||||
feather52832.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
feather52832.menu.debug.l2=Level 2 (Full Debug)
|
||||
feather52832.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
feather52832.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
feather52832.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
feather52832.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
# ----------------------------------
|
||||
# Bluefruit Feather nRF52840 Express
|
||||
# ----------------------------------
|
||||
feather52840.name=Adafruit Feather nRF52840 Express
|
||||
|
||||
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
|
||||
feather52840.vid.0=0x239A
|
||||
feather52840.pid.0=0x8029
|
||||
feather52840.vid.1=0x239A
|
||||
feather52840.pid.1=0x0029
|
||||
feather52840.vid.2=0x239A
|
||||
feather52840.pid.2=0x002A
|
||||
feather52840.vid.3=0x239A
|
||||
feather52840.pid.3=0x802A
|
||||
|
||||
# Upload
|
||||
feather52840.bootloader.tool=bootburn
|
||||
feather52840.upload.tool=nrfutil
|
||||
feather52840.upload.protocol=nrfutil
|
||||
feather52840.upload.use_1200bps_touch=true
|
||||
feather52840.upload.wait_for_upload_port=true
|
||||
feather52840.upload.maximum_size=815104
|
||||
feather52840.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
feather52840.build.mcu=cortex-m4
|
||||
feather52840.build.f_cpu=64000000
|
||||
feather52840.build.board=NRF52840_FEATHER
|
||||
feather52840.build.core=nRF5
|
||||
feather52840.build.variant=feather_nrf52840_express
|
||||
feather52840.build.usb_manufacturer="Adafruit LLC"
|
||||
feather52840.build.usb_product="Feather nRF52840 Express"
|
||||
feather52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
|
||||
feather52840.build.ldscript=nrf52840_s140_v6.ld
|
||||
feather52840.build.vid=0x239A
|
||||
feather52840.build.pid=0x8029
|
||||
|
||||
# SofDevice Menu
|
||||
feather52840.menu.softdevice.s140v6=0.5.0 SoftDevice s140 6.1.1
|
||||
feather52840.menu.softdevice.s140v6.build.sd_name=s140
|
||||
feather52840.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
feather52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
feather52840.menu.debug.l0=Level 0 (Release)
|
||||
feather52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
feather52840.menu.debug.l1=Level 1 (Error Message)
|
||||
feather52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
feather52840.menu.debug.l2=Level 2 (Full Debug)
|
||||
feather52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
feather52840.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
feather52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
feather52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
|
||||
# ----------------------------------
|
||||
# Feather nRF52840 sense
|
||||
# ----------------------------------
|
||||
feather52840sense.name=Adafruit Feather nRF52840 Sense
|
||||
|
||||
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
|
||||
feather52840sense.vid.0=0x239A
|
||||
feather52840sense.pid.0=0x8087
|
||||
feather52840sense.vid.1=0x239A
|
||||
feather52840sense.pid.1=0x0087
|
||||
feather52840sense.vid.2=0x239A
|
||||
feather52840sense.pid.2=0x0088
|
||||
feather52840sense.vid.3=0x239A
|
||||
feather52840sense.pid.3=0x8088
|
||||
|
||||
# Upload
|
||||
feather52840sense.bootloader.tool=bootburn
|
||||
feather52840sense.upload.tool=nrfutil
|
||||
feather52840sense.upload.protocol=nrfutil
|
||||
feather52840sense.upload.use_1200bps_touch=true
|
||||
feather52840sense.upload.wait_for_upload_port=true
|
||||
feather52840sense.upload.maximum_size=815104
|
||||
feather52840sense.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
feather52840sense.build.mcu=cortex-m4
|
||||
feather52840sense.build.f_cpu=64000000
|
||||
feather52840sense.build.board=NRF52840_FEATHER_SENSE
|
||||
feather52840sense.build.core=nRF5
|
||||
feather52840sense.build.variant=feather_nrf52840_sense
|
||||
feather52840sense.build.usb_manufacturer="Adafruit LLC"
|
||||
feather52840sense.build.usb_product="Feather nRF52840 Sense"
|
||||
feather52840sense.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
|
||||
feather52840sense.build.ldscript=nrf52840_s140_v6.ld
|
||||
feather52840sense.build.vid=0x239A
|
||||
feather52840sense.build.pid=0x8087
|
||||
|
||||
# SofDevice Menu
|
||||
feather52840sense.menu.softdevice.s140v6=0.5.0 SoftDevice s140 6.1.1
|
||||
feather52840sense.menu.softdevice.s140v6.build.sd_name=s140
|
||||
feather52840sense.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
feather52840sense.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
feather52840sense.menu.debug.l0=Level 0 (Release)
|
||||
feather52840sense.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
feather52840sense.menu.debug.l1=Level 1 (Error Message)
|
||||
feather52840sense.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
feather52840sense.menu.debug.l2=Level 2 (Full Debug)
|
||||
feather52840sense.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
feather52840sense.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
feather52840sense.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
feather52840sense.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
|
||||
# ---------------------------------------------
|
||||
# Bluefruit ItsyBitsy nRF52840 Express
|
||||
# ---------------------------------------------
|
||||
itsybitsy52840.name=Adafruit ItsyBitsy nRF52840 Express
|
||||
|
||||
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
|
||||
itsybitsy52840.vid.0=0x239A
|
||||
itsybitsy52840.pid.0=0x8051
|
||||
itsybitsy52840.vid.1=0x239A
|
||||
itsybitsy52840.pid.1=0x0051
|
||||
itsybitsy52840.vid.2=0x239A
|
||||
itsybitsy52840.pid.2=0x0052
|
||||
itsybitsy52840.vid.3=0x239A
|
||||
itsybitsy52840.pid.3=0x8052
|
||||
|
||||
# Upload
|
||||
itsybitsy52840.bootloader.tool=bootburn
|
||||
itsybitsy52840.upload.tool=nrfutil
|
||||
itsybitsy52840.upload.protocol=nrfutil
|
||||
itsybitsy52840.upload.use_1200bps_touch=true
|
||||
itsybitsy52840.upload.wait_for_upload_port=true
|
||||
itsybitsy52840.upload.maximum_size=815104
|
||||
itsybitsy52840.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
itsybitsy52840.build.mcu=cortex-m4
|
||||
itsybitsy52840.build.f_cpu=64000000
|
||||
itsybitsy52840.build.board=NRF52840_ITSYBITSY
|
||||
itsybitsy52840.build.core=nRF5
|
||||
itsybitsy52840.build.variant=itsybitsy_nrf52840_express
|
||||
itsybitsy52840.build.usb_manufacturer="Adafruit LLC"
|
||||
itsybitsy52840.build.usb_product="ItsyBitsy nRF52840 Express"
|
||||
itsybitsy52840.build.extra_flags=-DNRF52840_XXAA -DARDUINO_NRF52_ITSYBITSY {build.flags.usb}
|
||||
itsybitsy52840.build.ldscript=nrf52840_s140_v6.ld
|
||||
itsybitsy52840.build.vid=0x239A
|
||||
itsybitsy52840.build.pid=0x8051
|
||||
|
||||
# SofDevice Menu
|
||||
itsybitsy52840.menu.softdevice.s140v6=0.2.11 SoftDevice s140 6.1.1
|
||||
itsybitsy52840.menu.softdevice.s140v6.build.sd_name=s140
|
||||
itsybitsy52840.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
itsybitsy52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
itsybitsy52840.menu.debug.l0=Level 0 (Release)
|
||||
itsybitsy52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
itsybitsy52840.menu.debug.l1=Level 1 (Error Message)
|
||||
itsybitsy52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
itsybitsy52840.menu.debug.l2=Level 2 (Full Debug)
|
||||
itsybitsy52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
itsybitsy52840.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
itsybitsy52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
itsybitsy52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
# ---------------------------------------------
|
||||
# Bluefruit Circuit Playground nRF52840 Express
|
||||
# ---------------------------------------------
|
||||
cplaynrf52840.name=Adafruit Circuit Playground Bluefruit
|
||||
|
||||
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
|
||||
cplaynrf52840.vid.0=0x239A
|
||||
cplaynrf52840.pid.0=0x8045
|
||||
cplaynrf52840.vid.1=0x239A
|
||||
cplaynrf52840.pid.1=0x0045
|
||||
cplaynrf52840.vid.2=0x239A
|
||||
cplaynrf52840.pid.2=0x0046
|
||||
cplaynrf52840.vid.3=0x239A
|
||||
cplaynrf52840.pid.3=0x8046
|
||||
|
||||
# Upload
|
||||
cplaynrf52840.bootloader.tool=bootburn
|
||||
cplaynrf52840.upload.tool=nrfutil
|
||||
cplaynrf52840.upload.protocol=nrfutil
|
||||
cplaynrf52840.upload.use_1200bps_touch=true
|
||||
cplaynrf52840.upload.wait_for_upload_port=true
|
||||
cplaynrf52840.upload.maximum_size=815104
|
||||
cplaynrf52840.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
cplaynrf52840.build.mcu=cortex-m4
|
||||
cplaynrf52840.build.f_cpu=64000000
|
||||
cplaynrf52840.build.board=NRF52840_CIRCUITPLAY
|
||||
cplaynrf52840.build.core=nRF5
|
||||
cplaynrf52840.build.variant=circuitplayground_nrf52840
|
||||
cplaynrf52840.build.usb_manufacturer="Adafruit LLC"
|
||||
cplaynrf52840.build.usb_product="Circuit Playground Bluefruit"
|
||||
cplaynrf52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
|
||||
cplaynrf52840.build.ldscript=nrf52840_s140_v6.ld
|
||||
cplaynrf52840.build.vid=0x239A
|
||||
cplaynrf52840.build.pid=0x8045
|
||||
|
||||
# SofDevice Menu
|
||||
cplaynrf52840.menu.softdevice.s140v6=0.5.0 SoftDevice s140 6.1.1
|
||||
cplaynrf52840.menu.softdevice.s140v6.build.sd_name=s140
|
||||
cplaynrf52840.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
cplaynrf52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
cplaynrf52840.menu.debug.l0=Level 0 (Release)
|
||||
cplaynrf52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
cplaynrf52840.menu.debug.l1=Level 1 (Error Message)
|
||||
cplaynrf52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
cplaynrf52840.menu.debug.l2=Level 2 (Full Debug)
|
||||
cplaynrf52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
cplaynrf52840.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
cplaynrf52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
cplaynrf52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
|
||||
# ---------------------------------------------
|
||||
# Clue nRF52840
|
||||
# ---------------------------------------------
|
||||
cluenrf52840.name=Adafruit CLUE
|
||||
|
||||
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
|
||||
cluenrf52840.vid.0=0x239A
|
||||
cluenrf52840.pid.0=0x8072
|
||||
cluenrf52840.vid.1=0x239A
|
||||
cluenrf52840.pid.1=0x0072
|
||||
cluenrf52840.vid.2=0x239A
|
||||
cluenrf52840.pid.2=0x0071
|
||||
cluenrf52840.vid.3=0x239A
|
||||
cluenrf52840.pid.3=0x8071
|
||||
|
||||
# Upload
|
||||
cluenrf52840.bootloader.tool=bootburn
|
||||
cluenrf52840.upload.tool=nrfutil
|
||||
cluenrf52840.upload.protocol=nrfutil
|
||||
cluenrf52840.upload.use_1200bps_touch=true
|
||||
cluenrf52840.upload.wait_for_upload_port=true
|
||||
cluenrf52840.upload.maximum_size=815104
|
||||
cluenrf52840.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
cluenrf52840.build.mcu=cortex-m4
|
||||
cluenrf52840.build.f_cpu=64000000
|
||||
cluenrf52840.build.board=NRF52840_CLUE
|
||||
cluenrf52840.build.core=nRF5
|
||||
cluenrf52840.build.variant=clue_nrf52840
|
||||
cluenrf52840.build.usb_manufacturer="Adafruit LLC"
|
||||
cluenrf52840.build.usb_product="CLUE"
|
||||
cluenrf52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
|
||||
cluenrf52840.build.ldscript=nrf52840_s140_v6.ld
|
||||
cluenrf52840.build.vid=0x239A
|
||||
cluenrf52840.build.pid=0x8071
|
||||
|
||||
# SofDevice Menu
|
||||
cluenrf52840.menu.softdevice.s140v6=0.5.0 SoftDevice s140 6.1.1
|
||||
cluenrf52840.menu.softdevice.s140v6.build.sd_name=s140
|
||||
cluenrf52840.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
cluenrf52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
cluenrf52840.menu.debug.l0=Level 0 (Release)
|
||||
cluenrf52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
cluenrf52840.menu.debug.l1=Level 1 (Error Message)
|
||||
cluenrf52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
cluenrf52840.menu.debug.l2=Level 2 (Full Debug)
|
||||
cluenrf52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
cluenrf52840.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
cluenrf52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
cluenrf52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
# ----------------------------------
|
||||
# Metro nRF52840 Express
|
||||
# ----------------------------------
|
||||
metro52840.name=Adafruit Metro nRF52840 Express
|
||||
|
||||
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
|
||||
metro52840.vid.0=0x239A
|
||||
metro52840.pid.0=0x803F
|
||||
metro52840.vid.1=0x239A
|
||||
metro52840.pid.1=0x003F
|
||||
metro52840.vid.2=0x239A
|
||||
metro52840.pid.2=0x0040
|
||||
metro52840.vid.3=0x239A
|
||||
metro52840.pid.3=0x8040
|
||||
|
||||
# Upload
|
||||
metro52840.bootloader.tool=bootburn
|
||||
metro52840.upload.tool=nrfutil
|
||||
metro52840.upload.protocol=nrfutil
|
||||
metro52840.upload.use_1200bps_touch=true
|
||||
metro52840.upload.wait_for_upload_port=true
|
||||
metro52840.upload.maximum_size=815104
|
||||
metro52840.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
metro52840.build.mcu=cortex-m4
|
||||
metro52840.build.f_cpu=64000000
|
||||
metro52840.build.board=NRF52840_METRO
|
||||
metro52840.build.core=nRF5
|
||||
metro52840.build.variant=metro_nrf52840_express
|
||||
metro52840.build.usb_manufacturer="Adafruit LLC"
|
||||
metro52840.build.usb_product="Metro nRF52840 Express"
|
||||
metro52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
|
||||
metro52840.build.ldscript=nrf52840_s140_v6.ld
|
||||
metro52840.build.vid=0x239A
|
||||
metro52840.build.pid=0x803F
|
||||
|
||||
# SofDevice Menu
|
||||
metro52840.menu.softdevice.s140v6=0.5.0 SoftDevice s140 6.1.1
|
||||
metro52840.menu.softdevice.s140v6.build.sd_name=s140
|
||||
metro52840.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
metro52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
metro52840.menu.debug.l0=Level 0 (Release)
|
||||
metro52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
metro52840.menu.debug.l1=Level 1 (Error Message)
|
||||
metro52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
metro52840.menu.debug.l2=Level 2 (Full Debug)
|
||||
metro52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
metro52840.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
metro52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
metro52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
|
||||
|
||||
|
||||
# -------------------------------------------------------
|
||||
#
|
||||
# Boards that aren't made by Adafruit
|
||||
#
|
||||
# -------------------------------------------------------
|
||||
|
||||
|
||||
# ----------------------------------
|
||||
# Nordic nRF52840DK (PCA10056)
|
||||
# ----------------------------------
|
||||
pca10056.name=Nordic nRF52840DK (PCA10056)
|
||||
pca10056.bootloader.tool=bootburn
|
||||
|
||||
# Upload
|
||||
pca10056.upload.tool=nrfutil
|
||||
pca10056.upload.protocol=nrfutil
|
||||
pca10056.upload.use_1200bps_touch=true
|
||||
pca10056.upload.wait_for_upload_port=true
|
||||
pca10056.upload.maximum_size=815104
|
||||
pca10056.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
pca10056.build.mcu=cortex-m4
|
||||
pca10056.build.f_cpu=64000000
|
||||
pca10056.build.board=NRF52840_PCA10056
|
||||
pca10056.build.core=nRF5
|
||||
pca10056.build.variant=pca10056
|
||||
pca10056.build.usb_manufacturer="Nordic"
|
||||
pca10056.build.usb_product="nRF52840 DK"
|
||||
pca10056.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
|
||||
pca10056.build.ldscript=nrf52840_s140_v6.ld
|
||||
pca10056.build.vid=0x239A
|
||||
pca10056.build.pid=0x8029
|
||||
|
||||
# SofDevice Menu
|
||||
pca10056.menu.softdevice.s140v6=0.5.0 SoftDevice s140 6.1.1
|
||||
pca10056.menu.softdevice.s140v6.build.sd_name=s140
|
||||
pca10056.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
pca10056.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
pca10056.menu.debug.l0=Level 0 (Release)
|
||||
pca10056.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
pca10056.menu.debug.l1=Level 1 (Error Message)
|
||||
pca10056.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
pca10056.menu.debug.l2=Level 2 (Full Debug)
|
||||
pca10056.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
pca10056.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
pca10056.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
pca10056.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
# ----------------------------------
|
||||
# Particle Xenon
|
||||
# ----------------------------------
|
||||
particle_xenon.name=Particle Xenon
|
||||
|
||||
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
|
||||
particle_xenon.vid.0=0x239A
|
||||
particle_xenon.pid.0=0x8029
|
||||
particle_xenon.vid.1=0x239A
|
||||
particle_xenon.pid.1=0x0029
|
||||
particle_xenon.vid.2=0x239A
|
||||
particle_xenon.pid.2=0x002A
|
||||
particle_xenon.vid.3=0x239A
|
||||
particle_xenon.pid.3=0x802A
|
||||
|
||||
# Upload
|
||||
particle_xenon.bootloader.tool=bootburn
|
||||
particle_xenon.upload.tool=nrfutil
|
||||
particle_xenon.upload.protocol=nrfutil
|
||||
particle_xenon.upload.use_1200bps_touch=true
|
||||
particle_xenon.upload.wait_for_upload_port=true
|
||||
particle_xenon.upload.maximum_size=815104
|
||||
particle_xenon.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
particle_xenon.build.mcu=cortex-m4
|
||||
particle_xenon.build.f_cpu=64000000
|
||||
particle_xenon.build.board=PARTICLE_XENON
|
||||
particle_xenon.build.core=nRF5
|
||||
particle_xenon.build.variant=particle_xenon
|
||||
particle_xenon.build.usb_manufacturer="Particle Industries"
|
||||
particle_xenon.build.usb_product="Particle Xenon"
|
||||
particle_xenon.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
|
||||
particle_xenon.build.ldscript=nrf52840_s140_v6.ld
|
||||
particle_xenon.build.vid=0x239A
|
||||
particle_xenon.build.pid=0x8029
|
||||
|
||||
# SofDevice Menu
|
||||
particle_xenon.menu.softdevice.s140v6=0.5.0 SoftDevice s140 6.1.1
|
||||
particle_xenon.menu.softdevice.s140v6.build.sd_name=s140
|
||||
particle_xenon.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
particle_xenon.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
particle_xenon.menu.debug.l0=Level 0 (Release)
|
||||
particle_xenon.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
particle_xenon.menu.debug.l1=Level 1 (Error Message)
|
||||
particle_xenon.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
particle_xenon.menu.debug.l2=Level 2 (Full Debug)
|
||||
particle_xenon.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
particle_xenon.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
particle_xenon.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
particle_xenon.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
|
||||
# ----------------------------------
|
||||
# NINA B302
|
||||
# ----------------------------------
|
||||
ninab302.name=NINA B302 ublox
|
||||
|
||||
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
|
||||
ninab302.vid.0=0x239A
|
||||
ninab302.pid.0=0x8029
|
||||
ninab302.vid.1=0x239A
|
||||
ninab302.pid.1=0x0029
|
||||
ninab302.vid.2=0x7239A
|
||||
ninab302.pid.2=0x002A
|
||||
ninab302.vid.3=0x239A
|
||||
ninab302.pid.3=0x802A
|
||||
|
||||
# Upload
|
||||
ninab302.bootloader.tool=bootburn
|
||||
ninab302.upload.tool=nrfutil
|
||||
ninab302.upload.protocol=nrfutil
|
||||
ninab302.upload.use_1200bps_touch=true
|
||||
ninab302.upload.wait_for_upload_port=true
|
||||
ninab302.upload.maximum_size=815104
|
||||
ninab302.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
ninab302.build.mcu=cortex-m4
|
||||
ninab302.build.f_cpu=64000000
|
||||
ninab302.build.board=NINA_B302_ublox
|
||||
ninab302.build.core=nRF5
|
||||
ninab302.build.variant=NINA_B302_ublox
|
||||
ninab302.build.usb_manufacturer="Nordic"
|
||||
ninab302.build.usb_product="NINA B302 ublox"
|
||||
ninab302.build.extra_flags=-DNRF52840_XXAA -DNINA_B302_ublox {build.flags.usb}
|
||||
ninab302.build.ldscript=nrf52840_s140_v6.ld
|
||||
ninab302.build.vid=0x239A
|
||||
ninab302.build.pid=0x8029
|
||||
|
||||
# SofDevice Menu
|
||||
ninab302.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1
|
||||
ninab302.menu.softdevice.s140v6.build.sd_name=s140
|
||||
ninab302.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
ninab302.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
ninab302.menu.debug.l0=Level 0 (Release)
|
||||
ninab302.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
ninab302.menu.debug.l1=Level 1 (Error Message)
|
||||
ninab302.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
ninab302.menu.debug.l2=Level 2 (Full Debug)
|
||||
ninab302.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
ninab302.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
ninab302.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
ninab302.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
# ----------------------------------
|
||||
# NINA B112
|
||||
# ----------------------------------
|
||||
ninab112.name=NINA B112 ublox
|
||||
ninab112.bootloader.tool=bootburn
|
||||
|
||||
# Upload
|
||||
ninab112.upload.tool=nrfutil
|
||||
ninab112.upload.protocol=nrfutil
|
||||
ninab112.upload.use_1200bps_touch=false
|
||||
ninab112.upload.wait_for_upload_port=false
|
||||
ninab112.upload.native_usb=false
|
||||
ninab112.upload.maximum_size=290816
|
||||
ninab112.upload.maximum_data_size=52224
|
||||
|
||||
# Build
|
||||
ninab112.build.mcu=cortex-m4
|
||||
ninab112.build.f_cpu=64000000
|
||||
ninab112.build.board=NINA_B112_ublox
|
||||
ninab112.build.core=nRF5
|
||||
ninab112.build.variant=NINA_B112_ublox
|
||||
feather52840.build.usb_manufacturer="Adafruit LLC"
|
||||
feather52840.build.usb_product="Feather nRF52832"
|
||||
ninab112.build.extra_flags=-DNRF52832_XXAA -DNINA_B112_ublox -DNRF52
|
||||
ninab112.build.ldscript=nrf52832_s132_v6.ld
|
||||
|
||||
# SofDevice Menu
|
||||
ninab112.menu.softdevice.s132v6=0.3.2 SoftDevice s132 6.1.1
|
||||
ninab112.menu.softdevice.s132v6.build.sd_name=s132
|
||||
ninab112.menu.softdevice.s132v6.build.sd_version=6.1.1
|
||||
ninab112.menu.softdevice.s132v6.build.sd_fwid=0x00B7
|
||||
|
||||
# Debug Menu
|
||||
ninab112.menu.debug.l0=Level 0 (Release)
|
||||
ninab112.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
ninab112.menu.debug.l1=Level 1 (Error Message)
|
||||
ninab112.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
ninab112.menu.debug.l2=Level 2 (Full Debug)
|
||||
ninab112.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
ninab112.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
ninab112.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
ninab112.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
* Udp.cpp: Library to send/receive UDP packets.
|
||||
*
|
||||
* NOTE: UDP is fast, but has some important limitations (thanks to Warren Gray for mentioning these)
|
||||
* 1) UDP does not guarantee the order in which assembled UDP packets are received. This
|
||||
* might not happen often in practice, but in larger network topologies, a UDP
|
||||
* packet can be received out of sequence.
|
||||
* 2) UDP does not guard against lost packets - so packets *can* disappear without the sender being
|
||||
* aware of it. Again, this may not be a concern in practice on small local networks.
|
||||
* For more information, see http://www.cafeaulait.org/course/week12/35.html
|
||||
*
|
||||
* MIT License:
|
||||
* Copyright (c) 2008 Bjoern Hartmann
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
* bjoern@cs.stanford.edu 12/30/2008
|
||||
*/
|
||||
|
||||
#ifndef udp_h
|
||||
#define udp_h
|
||||
|
||||
#include <Stream.h>
|
||||
#include <IPAddress.h>
|
||||
|
||||
class UDP : public Stream {
|
||||
|
||||
public:
|
||||
virtual uint8_t begin(uint16_t) =0; // initialize, start listening on specified port. Returns 1 if successful, 0 if there are no sockets available to use
|
||||
|
||||
// KH, add virtual function to support Multicast, necessary for many services (MDNS, UPnP, etc.)
|
||||
virtual uint8_t beginMulticast(IPAddress, uint16_t) { return 0; } // initialize, start listening on specified multicast IP address and port. Returns 1 if successful, 0 on failure
|
||||
|
||||
virtual void stop() =0; // Finish with the UDP socket
|
||||
|
||||
// Sending UDP packets
|
||||
|
||||
// Start building up a packet to send to the remote host specific in ip and port
|
||||
// Returns 1 if successful, 0 if there was a problem with the supplied IP address or port
|
||||
virtual int beginPacket(IPAddress ip, uint16_t port) =0;
|
||||
// Start building up a packet to send to the remote host specific in host and port
|
||||
// Returns 1 if successful, 0 if there was a problem resolving the hostname or port
|
||||
virtual int beginPacket(const char *host, uint16_t port) =0;
|
||||
// Finish off this packet and send it
|
||||
// Returns 1 if the packet was sent successfully, 0 if there was an error
|
||||
virtual int endPacket() =0;
|
||||
// Write a single byte into the packet
|
||||
virtual size_t write(uint8_t) =0;
|
||||
// Write size bytes from buffer into the packet
|
||||
virtual size_t write(const uint8_t *buffer, size_t size) =0;
|
||||
|
||||
// Start processing the next available incoming packet
|
||||
// Returns the size of the packet in bytes, or 0 if no packets are available
|
||||
virtual int parsePacket() =0;
|
||||
// Number of bytes remaining in the current packet
|
||||
virtual int available() =0;
|
||||
// Read a single byte from the current packet
|
||||
virtual int read() =0;
|
||||
// Read up to len bytes from the current packet and place them into buffer
|
||||
// Returns the number of bytes read, or 0 if none are available
|
||||
virtual int read(unsigned char* buffer, size_t len) =0;
|
||||
// Read up to len characters from the current packet and place them into buffer
|
||||
// Returns the number of characters read, or 0 if none are available
|
||||
virtual int read(char* buffer, size_t len) =0;
|
||||
// Return the next byte from the current packet without moving on to the next byte
|
||||
virtual int peek() =0;
|
||||
virtual void flush() =0; // Finish reading the current packet
|
||||
|
||||
// Return the IP address of the host who sent the current incoming packet
|
||||
virtual IPAddress remoteIP() =0;
|
||||
// Return the port of the host who sent the current incoming packet
|
||||
virtual uint16_t remotePort() =0;
|
||||
protected:
|
||||
uint8_t* rawIPAddress(IPAddress& addr) { return addr.raw_address(); };
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,169 @@
|
||||
# Copyright (c) 2014-2015 Arduino LLC. All right reserved.
|
||||
# Copyright (c) 2016 Sandeep Mistry All right reserved.
|
||||
# Copyright (c) 2017 Adafruit Industries. All rights reserved.
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
name=Adafruit nRF52 Boards
|
||||
version=0.22.1
|
||||
|
||||
# Compile variables
|
||||
# -----------------
|
||||
|
||||
compiler.warning_flags=-w
|
||||
compiler.warning_flags.none=-w
|
||||
compiler.warning_flags.default=
|
||||
compiler.warning_flags.more=-Wall
|
||||
compiler.warning_flags.all=-Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-pointer-arith
|
||||
|
||||
# Allow changing optimization settings via platform.local.txt / boards.local.txt
|
||||
compiler.optimization_flag=-Ofast
|
||||
|
||||
compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/
|
||||
compiler.c.cmd=arm-none-eabi-gcc
|
||||
compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.warning_flags} {build.float_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD
|
||||
|
||||
# KH, Error here to use gcc, must use g++
|
||||
#compiler.c.elf.cmd=arm-none-eabi-gcc
|
||||
compiler.c.elf.cmd=arm-none-eabi-g++
|
||||
|
||||
compiler.c.elf.flags={compiler.optimization_flag} -Wl,--gc-sections -save-temps
|
||||
compiler.S.cmd=arm-none-eabi-gcc
|
||||
compiler.S.flags=-mcpu={build.mcu} -mthumb -mabi=aapcs {compiler.optimization_flag} -g -c {build.float_flags} -x assembler-with-cpp
|
||||
|
||||
compiler.cpp.cmd=arm-none-eabi-g++
|
||||
compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.warning_flags} {build.float_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD
|
||||
compiler.ar.cmd=arm-none-eabi-ar
|
||||
compiler.ar.flags=rcs
|
||||
compiler.objcopy.cmd=arm-none-eabi-objcopy
|
||||
compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0
|
||||
compiler.elf2bin.flags=-O binary
|
||||
compiler.elf2bin.cmd=arm-none-eabi-objcopy
|
||||
compiler.elf2hex.flags=-O ihex
|
||||
compiler.elf2hex.cmd=arm-none-eabi-objcopy
|
||||
compiler.ldflags=-mcpu={build.mcu} -mthumb {build.float_flags} -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align --specs=nano.specs --specs=nosys.specs
|
||||
compiler.size.cmd=arm-none-eabi-size
|
||||
|
||||
# this can be overriden in boards.txt
|
||||
build.float_flags=-mfloat-abi=hard -mfpu=fpv4-sp-d16 -u _printf_float
|
||||
build.debug_flags=-DCFG_DEBUG=0
|
||||
build.logger_flags=-DCFG_LOGGER=1
|
||||
build.sysview_flags=-DCFG_SYSVIEW=0
|
||||
|
||||
# USB flags
|
||||
build.flags.usb= -DUSBCON -DUSE_TINYUSB -DUSB_VID={build.vid} -DUSB_PID={build.pid} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}'
|
||||
|
||||
# These can be overridden in platform.local.txt
|
||||
compiler.c.extra_flags=
|
||||
compiler.c.elf.extra_flags=
|
||||
compiler.cpp.extra_flags=
|
||||
compiler.S.extra_flags=
|
||||
compiler.ar.extra_flags=
|
||||
compiler.libraries.ldflags=
|
||||
compiler.elf2bin.extra_flags=
|
||||
compiler.elf2hex.extra_flags=
|
||||
|
||||
compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Core/Include/" "-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/DSP/Include/"
|
||||
|
||||
# TODO enable linking with libmath later on
|
||||
compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Lib/GCC/" -larm_cortexM4lf_math
|
||||
|
||||
# common compiler for nrf
|
||||
rtos.path={build.core.path}/freertos
|
||||
nordic.path={build.core.path}/nordic
|
||||
|
||||
# build.logger_flags and build.sysview_flags are intentionally empty,
|
||||
# to allow modification via a user's own boards.local.txt or platform.local.txt files.
|
||||
build.flags.nrf= -DSOFTDEVICE_PRESENT -DARDUINO_NRF52_ADAFRUIT -DNRF52_SERIES -DDX_CC_TEE -DLFS_NAME_MAX=64 {compiler.optimization_flag} {build.debug_flags} {build.logger_flags} {build.sysview_flags} {compiler.arm.cmsis.c.flags} "-I{nordic.path}" "-I{nordic.path}/nrfx" "-I{nordic.path}/nrfx/hal" "-I{nordic.path}/nrfx/mdk" "-I{nordic.path}/nrfx/soc" "-I{nordic.path}/nrfx/drivers/include" "-I{nordic.path}/nrfx/drivers/src" "-I{nordic.path}/softdevice/{build.sd_name}_nrf52_{build.sd_version}_API/include" "-I{nordic.path}/softdevice/{build.sd_name}_nrf52_{build.sd_version}_API/include/nrf52" "-I{rtos.path}/Source/include" "-I{rtos.path}/config" "-I{rtos.path}/portable/GCC/nrf52" "-I{rtos.path}/portable/CMSIS/nrf52" "-I{build.core.path}/sysview/SEGGER" "-I{build.core.path}/sysview/Config" "-I{runtime.platform.path}/libraries/Adafruit_TinyUSB_Arduino/src/arduino"
|
||||
|
||||
# Compile patterns
|
||||
# ----------------
|
||||
|
||||
## Compile c files
|
||||
## KH Add -DBOARD_NAME="{build.board}"
|
||||
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} '-DARDUINO_BSP_VERSION="{version}"' {compiler.c.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}"
|
||||
|
||||
## Compile c++ files
|
||||
## KH Add -DBOARD_NAME="{build.board}"
|
||||
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} '-DARDUINO_BSP_VERSION="{version}"' {compiler.cpp.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}"
|
||||
|
||||
## Compile S files
|
||||
## KH Add -DBOARD_NAME="{build.board}"
|
||||
recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}"
|
||||
|
||||
## Create archives
|
||||
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"
|
||||
|
||||
## Combine gc-sections, archives, and objects
|
||||
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-L{build.core.path}/linker" "-T{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} -Wl,--start-group -lm "{build.path}/{archive_file}" {compiler.libraries.ldflags} -Wl,--end-group
|
||||
|
||||
## Create output (bin file)
|
||||
#recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2bin.cmd}" {compiler.elf2bin.flags} {compiler.elf2bin.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin"
|
||||
|
||||
## Create output (hex file)
|
||||
recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex"
|
||||
|
||||
## Create dfu package zip file
|
||||
recipe.objcopy.zip.pattern="{tools.nrfutil.cmd}" dfu genpkg --dev-type 0x0052 --sd-req {build.sd_fwid} --application "{build.path}/{build.project_name}.hex" "{build.path}/{build.project_name}.zip"
|
||||
|
||||
## Create uf2 file
|
||||
#recipe.objcopy.uf2.pattern=python "{runtime.platform.path}/tools/uf2conv/uf2conv.py" -f 0xADA52840 -c -o "{build.path}/{build.project_name}.uf2" "{build.path}/{build.project_name}.hex"
|
||||
|
||||
## Save bin
|
||||
recipe.output.tmp_file_bin={build.project_name}.bin
|
||||
recipe.output.save_file_bin={build.project_name}.save.bin
|
||||
|
||||
## Save hex
|
||||
recipe.output.tmp_file_hex={build.project_name}.hex
|
||||
recipe.output.save_file_hexu={build.project_name}.save.hex
|
||||
|
||||
## Compute size
|
||||
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
|
||||
recipe.size.regex=^(?:\.text|\.data|)\s+([0-9]+).*
|
||||
recipe.size.regex.data=^(?:\.data|\.bss)\s+([0-9]+).*
|
||||
|
||||
## Export Compiled Binary
|
||||
recipe.output.tmp_file={build.project_name}.hex
|
||||
recipe.output.save_file={build.project_name}.{build.variant}.hex
|
||||
|
||||
#***************************************************
|
||||
# adafruit-nrfutil for uploading
|
||||
# https://github.com/adafruit/Adafruit_nRF52_nrfutil
|
||||
# pre-built binaries are provided for macos and windows
|
||||
#***************************************************
|
||||
tools.nrfutil.cmd=adafruit-nrfutil
|
||||
tools.nrfutil.cmd.windows={runtime.platform.path}/tools/adafruit-nrfutil/win32/adafruit-nrfutil.exe
|
||||
tools.nrfutil.cmd.macosx={runtime.platform.path}/tools/adafruit-nrfutil/macos/adafruit-nrfutil
|
||||
|
||||
tools.nrfutil.upload.params.verbose=--verbose
|
||||
tools.nrfutil.upload.params.quiet=
|
||||
tools.nrfutil.upload.pattern="{cmd}" {upload.verbose} dfu serial -pkg "{build.path}/{build.project_name}.zip" -p {serial.port} -b 115200 --singlebank
|
||||
|
||||
#***************************************************
|
||||
# Burning bootloader with either jlink or nrfutil
|
||||
#***************************************************
|
||||
|
||||
# Bootloader version
|
||||
tools.bootburn.bootloader.file={runtime.platform.path}/bootloader/{build.variant}/{build.variant}_bootloader-0.5.0_{build.sd_name}_{build.sd_version}
|
||||
|
||||
tools.bootburn.bootloader.params.verbose=
|
||||
tools.bootburn.bootloader.params.quiet=
|
||||
tools.bootburn.bootloader.pattern={program.burn_pattern}
|
||||
|
||||
# erase flash page while programming
|
||||
tools.bootburn.erase.params.verbose=
|
||||
tools.bootburn.erase.params.quiet=
|
||||
tools.bootburn.erase.pattern=
|
||||
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Lesser General Public License for more details.
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
// API compatibility
|
||||
#include "variant.h"
|
||||
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
|
||||
Copyright (c) 2016 Sandeep Mistry All right reserved.
|
||||
Copyright (c) 2018, Adafruit Industries (adafruit.com)
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
// Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip).
|
||||
// See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1)
|
||||
|
||||
#include "variant.h"
|
||||
#include "wiring_constants.h"
|
||||
#include "wiring_digital.h"
|
||||
#include "nrf.h"
|
||||
|
||||
const uint32_t g_ADigitalPinMap[] = {
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
6,
|
||||
7,
|
||||
8,
|
||||
9,
|
||||
10,
|
||||
11,
|
||||
12,
|
||||
13,
|
||||
14,
|
||||
15,
|
||||
16,
|
||||
17,
|
||||
18,
|
||||
19,
|
||||
20,
|
||||
21,
|
||||
22,
|
||||
23,
|
||||
24,
|
||||
25,
|
||||
26,
|
||||
27,
|
||||
28,
|
||||
29,
|
||||
30,
|
||||
31
|
||||
};
|
||||
|
||||
@@ -0,0 +1,173 @@
|
||||
/*
|
||||
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
|
||||
Copyright (c) 2016 Sandeep Mistry All right reserved.
|
||||
Copyright (c) 2018, Adafruit Industries (adafruit.com)
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Lesser General Public License for more details.
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef _VARIANT_NINA_B112_UBLOX_
|
||||
#define _VARIANT_NINA_B112_UBLOX_
|
||||
|
||||
#define NRF_CLOCK_LFCLKSRC {.source = NRF_CLOCK_LF_SRC_XTAL, \
|
||||
.rc_ctiv = 0, \
|
||||
.rc_temp_ctiv = 0, \
|
||||
.xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM}
|
||||
|
||||
/** Master clock frequency */
|
||||
#define VARIANT_MCK (64000000ul)
|
||||
|
||||
#define USE_LFXO // Board uses 32khz crystal for LF
|
||||
// define USE_LFRC // Board uses RC for LF
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Headers
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
#include "WVariant.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif // __cplusplus
|
||||
|
||||
// Number of pins defined in PinDescription array
|
||||
#define PINS_COUNT (32u)
|
||||
#define NUM_DIGITAL_PINS (32u)
|
||||
#define NUM_ANALOG_INPUTS (6u)
|
||||
#define NUM_ANALOG_OUTPUTS (0u)
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED LED1
|
||||
#define LED_BUILTIN PIN_LED
|
||||
|
||||
//LEDs onboard
|
||||
#define LED1 (8) // Red
|
||||
#define LED2 (16) // Green/SW1
|
||||
#define LED3 (18) // Blue
|
||||
|
||||
#define LED_STATE_ON 1 // State when LED is litted
|
||||
|
||||
//Switch
|
||||
|
||||
#define SW1 (16)
|
||||
#define SW2 (30)
|
||||
|
||||
// NFC
|
||||
#define PIN_NFC_1 (9) // P0.9
|
||||
#define PIN_NFC_2 (10) // P0.10
|
||||
|
||||
/*
|
||||
* Analog pins
|
||||
*/
|
||||
#define PIN_A0 (3) // P0.03
|
||||
#define PIN_A1 (2) // P0.02
|
||||
#define PIN_A2 (4) // P0.04
|
||||
#define PIN_A3 (30) // P0.30
|
||||
#define PIN_A4 (29) // P0.29
|
||||
#define PIN_A5 (28) // P0.28
|
||||
|
||||
static const uint8_t A0 = PIN_A0 ;
|
||||
static const uint8_t A1 = PIN_A1 ;
|
||||
static const uint8_t A2 = PIN_A2 ;
|
||||
static const uint8_t A3 = PIN_A3 ;
|
||||
static const uint8_t A4 = PIN_A4 ;
|
||||
static const uint8_t A5 = PIN_A5 ;
|
||||
|
||||
#define ADC_RESOLUTION 14
|
||||
|
||||
#define PIN_D0 (5) // P0.05
|
||||
#define PIN_D1 (6) // P0.06
|
||||
#define PIN_D2 (7) // P0.07
|
||||
#define PIN_D3 (31) // P0.31
|
||||
#define PIN_D4 (18) // P0.18
|
||||
#define PIN_D6 (9) // P0.09
|
||||
#define PIN_D7 (10) // P0.10
|
||||
#define PIN_D9 (8) // P0.8
|
||||
#define PIN_D10 (11) // P0.11
|
||||
#define PIN_D11 (13) // P0.13
|
||||
#define PIN_D12 (12) // P0.12
|
||||
#define PIN_D13 (14) // P0.14
|
||||
#define PIN_D14 (2) // P0.02
|
||||
#define PIN_D15 (3) // P0.03
|
||||
|
||||
static const uint8_t D0 = PIN_D0 ;
|
||||
static const uint8_t D1 = PIN_D1 ;
|
||||
static const uint8_t D2 = PIN_D2 ;
|
||||
static const uint8_t D3 = PIN_D3 ;
|
||||
static const uint8_t D4 = PIN_D4 ;
|
||||
static const uint8_t D6 = PIN_D6 ;
|
||||
static const uint8_t D7 = PIN_D7 ;
|
||||
static const uint8_t D9 = PIN_D9 ;
|
||||
static const uint8_t D10 = PIN_D10 ;
|
||||
static const uint8_t D11 = PIN_D11 ;
|
||||
static const uint8_t D12 = PIN_D12 ;
|
||||
static const uint8_t D13 = PIN_D13 ;
|
||||
static const uint8_t D14 = PIN_D14 ;
|
||||
static const uint8_t D15 = PIN_D15 ;
|
||||
|
||||
// Other pins
|
||||
//static const uint8_t AREF = PIN_AREF;
|
||||
|
||||
//#define PIN_AREF (24)
|
||||
//#define PIN_VBAT PIN_A7
|
||||
|
||||
/*
|
||||
* Serial interfaces
|
||||
*/
|
||||
//#define PIN_SERIAL_RX (8) //used for original Adafruit Bootloader
|
||||
//#define PIN_SERIAL_TX (6) //used for original Adafruit Bootloader
|
||||
|
||||
#define PIN_SERIAL_RX (5) // P0.05
|
||||
#define PIN_SERIAL_TX (6) // P0.06
|
||||
#define PIN_SERIAL_CTS (7) // P0.07
|
||||
#define PIN_SERIAL_RTS (31) // P0.31
|
||||
#define PIN_SERIAL_DTR (28) // P0.28
|
||||
#define PIN_SERIAL_DSR (29) // P0.29
|
||||
|
||||
/*
|
||||
* SPI Interfaces
|
||||
*/
|
||||
#define SPI_INTERFACES_COUNT 1
|
||||
|
||||
#define PIN_SPI_MISO (12) // P0.12
|
||||
#define PIN_SPI_MOSI (13) // P0.13
|
||||
#define PIN_SPI_SCK (14) // P0.14
|
||||
|
||||
static const uint8_t SS = 11 ; // P0.11
|
||||
static const uint8_t MOSI = PIN_SPI_MOSI ;
|
||||
static const uint8_t MISO = PIN_SPI_MISO ;
|
||||
static const uint8_t SCK = PIN_SPI_SCK ;
|
||||
|
||||
/*
|
||||
* Wire Interfaces
|
||||
*/
|
||||
#define WIRE_INTERFACES_COUNT 1
|
||||
|
||||
#define PIN_WIRE_SDA (2) // P0.02
|
||||
#define PIN_WIRE_SCL (3) // P0.03
|
||||
|
||||
static const uint8_t SDA = PIN_WIRE_SDA;
|
||||
static const uint8_t SCL = PIN_WIRE_SCL;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Arduino objects - C++ only
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
#endif //_VARIANT_NINA_B112_UBLOX_
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Lesser General Public License for more details.
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
// API compatibility
|
||||
#include "variant.h"
|
||||
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
|
||||
Copyright (c) 2016 Sandeep Mistry All right reserved.
|
||||
Copyright (c) 2018, Adafruit Industries (adafruit.com)
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
// Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip).
|
||||
// See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1)
|
||||
|
||||
#include "variant.h"
|
||||
#include "wiring_constants.h"
|
||||
#include "wiring_digital.h"
|
||||
#include "nrf.h"
|
||||
|
||||
const uint32_t g_ADigitalPinMap[] =
|
||||
{
|
||||
// D0 .. D13
|
||||
29, // D0 is P0.29 (UART TX)
|
||||
45, // D1 is P1.13 (UART RX
|
||||
44, // D2 is P1.12 (NFC2)
|
||||
31, // D3 is P0.31 (LED1)
|
||||
13, // D4 is P0.13 (LED2)
|
||||
11, // D5 is P0.11
|
||||
9, // D6 is P0.09
|
||||
10, // D7 is P0.10 (Button)
|
||||
41, // D8 is P1.09
|
||||
12, // D9 is P0.12
|
||||
14, // D10 is P0.14
|
||||
15, // D11 is P0.15
|
||||
32, // D12 is P1.00
|
||||
7, // D13 is P0.07
|
||||
|
||||
// D14 .. D21 (aka A0 .. A5)
|
||||
4, // D14 is P0.04 (A0)
|
||||
30, // D15 is P0.30 (A1)
|
||||
5, // D16 is P0.05 (A2)
|
||||
2, // D17 is P0.02 (A3)
|
||||
28, // D18 is P0.28 (A4)
|
||||
3, // D19 is P0.03 (A5)
|
||||
|
||||
// D20 .. D21 (aka I2C pins)
|
||||
16, // D20 is P0.16 (SDA)
|
||||
24, // D21 is P0.24 (SCL)
|
||||
|
||||
// QSPI pins (not exposed via any header / test point)
|
||||
19, // D22 is P0.19 (QSPI CLK)
|
||||
17, // D23 is P0.17 (QSPI CS)
|
||||
20, // D24 is P0.20 (QSPI Data 0)
|
||||
21, // D25 is P0.21 (QSPI Data 1)
|
||||
22, // D26 is P0.22 (QSPI Data 2)
|
||||
26, // D27 is P0.23 (QSPI Data 3)
|
||||
|
||||
40, // D28 is P1.08 - IO34
|
||||
41, // D29 is P1.01 - IO35
|
||||
44, // D30 is P1.02 - IO36
|
||||
45, // D31 is P1.03 - IO37
|
||||
42, // D32 is P1.10 - IO38
|
||||
43, // D33 is P1.11 - IO39
|
||||
47, // D34 is P1.15 - IO40
|
||||
46, // D35 is P1.14 - IO41
|
||||
26, // D36 is P0.26 - IO42
|
||||
6, // D37 is P0.6 - IO43
|
||||
27, // D38 is P0.27 - IO44
|
||||
};
|
||||
|
||||
void initVariant()
|
||||
{
|
||||
// LED1 & LED2
|
||||
pinMode(PIN_LED1, OUTPUT);
|
||||
ledOff(PIN_LED1);
|
||||
|
||||
pinMode(PIN_LED2, OUTPUT);
|
||||
ledOff(PIN_LED2);
|
||||
}
|
||||
@@ -0,0 +1,149 @@
|
||||
/*
|
||||
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
|
||||
Copyright (c) 2016 Sandeep Mistry All right reserved.
|
||||
Copyright (c) 2018, Adafruit Industries (adafruit.com)
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Lesser General Public License for more details.
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
// Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip).
|
||||
// See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1)
|
||||
|
||||
#ifndef _VARIANT_NINA_B302_UBLOX_
|
||||
#define _VARIANT_NINA_B302_UBLOX_
|
||||
|
||||
/** Master clock frequency */
|
||||
#define VARIANT_MCK (64000000ul)
|
||||
|
||||
#define USE_LFXO // Board uses 32khz crystal for LF
|
||||
// define USE_LFRC // Board uses RC for LF
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Headers
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
#include "WVariant.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif // __cplusplus
|
||||
// Number of pins defined in PinDescription array
|
||||
#define PINS_COUNT (40)
|
||||
#define NUM_DIGITAL_PINS (34)
|
||||
#define NUM_ANALOG_INPUTS (6)
|
||||
#define NUM_ANALOG_OUTPUTS (0)
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED1 (3)
|
||||
#define PIN_LED2 (4)
|
||||
|
||||
#define LED_BUILTIN PIN_LED1
|
||||
#define LED_CONN PIN_LED2
|
||||
|
||||
#define LED_RED PIN_LED1
|
||||
#define LED_BLUE PIN_LED2
|
||||
|
||||
#define LED_STATE_ON 1 // State when LED is litted
|
||||
|
||||
/*
|
||||
* Buttons
|
||||
*/
|
||||
#define PIN_BUTTON1 (7)
|
||||
|
||||
/*
|
||||
* Analog pins
|
||||
*/
|
||||
#define PIN_A0 (14)
|
||||
#define PIN_A1 (15)
|
||||
#define PIN_A2 (16)
|
||||
#define PIN_A3 (17)
|
||||
#define PIN_A4 (18)
|
||||
#define PIN_A5 (19)
|
||||
|
||||
#define D0 (0)
|
||||
#define D1 (1)
|
||||
#define D2 (2)
|
||||
#define D3 (3)
|
||||
#define D4 (4)
|
||||
#define D5 (5)
|
||||
#define D6 (6)
|
||||
#define D7 (7)
|
||||
#define D8 (8)
|
||||
#define D9 (9)
|
||||
#define D10 (10)
|
||||
#define D11 (11)
|
||||
#define D12 (12)
|
||||
#define D13 (13)
|
||||
|
||||
static const uint8_t A0 = PIN_A0 ;
|
||||
static const uint8_t A1 = PIN_A1 ;
|
||||
static const uint8_t A2 = PIN_A2 ;
|
||||
static const uint8_t A3 = PIN_A3 ;
|
||||
static const uint8_t A4 = PIN_A4 ;
|
||||
static const uint8_t A5 = PIN_A5 ;
|
||||
|
||||
#define ADC_RESOLUTION 14
|
||||
|
||||
#define PIN_NFC1 (31)
|
||||
#define PIN_NFC2 (2)
|
||||
|
||||
/*
|
||||
* Serial interfaces
|
||||
*/
|
||||
#define PIN_SERIAL1_RX (1)
|
||||
#define PIN_SERIAL1_TX (0)
|
||||
|
||||
/*
|
||||
* SPI Interfaces
|
||||
*/
|
||||
#define SPI_INTERFACES_COUNT 1
|
||||
|
||||
#define PIN_SPI_MISO (22) //24 original
|
||||
#define PIN_SPI_MOSI (23) //25 original
|
||||
#define PIN_SPI_SCK (24) //26 original
|
||||
|
||||
static const uint8_t SS = (13);
|
||||
static const uint8_t MOSI = PIN_SPI_MOSI;
|
||||
static const uint8_t MISO = PIN_SPI_MISO;
|
||||
static const uint8_t SCK = PIN_SPI_SCK;
|
||||
|
||||
/*
|
||||
* Wire Interfaces
|
||||
*/
|
||||
#define WIRE_INTERFACES_COUNT 1
|
||||
|
||||
#define PIN_WIRE_SDA (20)
|
||||
#define PIN_WIRE_SCL (21)
|
||||
|
||||
// QSPI Pins
|
||||
#define PIN_QSPI_SCK 22
|
||||
#define PIN_QSPI_CS 23
|
||||
#define PIN_QSPI_IO0 24
|
||||
#define PIN_QSPI_IO1 25
|
||||
#define PIN_QSPI_IO2 26
|
||||
#define PIN_QSPI_IO3 27
|
||||
|
||||
// On-board QSPI Flash
|
||||
#define EXTERNAL_FLASH_DEVICES GD25Q16C
|
||||
#define EXTERNAL_FLASH_USE_QSPI
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Arduino objects - C++ only
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
#endif //_VARIANT_NINA_B302_UBLOX_
|
||||
@@ -0,0 +1,648 @@
|
||||
# Copyright (c) 2014-2015 Arduino LLC. All right reserved.
|
||||
# Copyright (c) 2016 Sandeep Mistry All right reserved.
|
||||
# Copyright (c) 2017 Adafruit Industries. All right reserved.
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
menu.softdevice=SoftDevice
|
||||
menu.debug=Debug
|
||||
|
||||
# ----------------------------------
|
||||
# Bluefruit Feather nRF52832
|
||||
# ----------------------------------
|
||||
feather52832.name=Adafruit Feather nRF52832
|
||||
feather52832.bootloader.tool=bootburn
|
||||
|
||||
# Upload
|
||||
feather52832.upload.tool=nrfutil
|
||||
feather52832.upload.protocol=nrfutil
|
||||
feather52832.upload.use_1200bps_touch=false
|
||||
feather52832.upload.wait_for_upload_port=false
|
||||
feather52832.upload.native_usb=false
|
||||
feather52832.upload.maximum_size=290816
|
||||
feather52832.upload.maximum_data_size=52224
|
||||
|
||||
# Build
|
||||
feather52832.build.mcu=cortex-m4
|
||||
feather52832.build.f_cpu=64000000
|
||||
feather52832.build.board=NRF52832_FEATHER
|
||||
feather52832.build.core=nRF5
|
||||
feather52832.build.variant=feather_nrf52832
|
||||
feather52832.build.usb_manufacturer="Adafruit LLC"
|
||||
feather52832.build.usb_product="Feather nRF52832"
|
||||
feather52832.build.extra_flags=-DNRF52832_XXAA -DNRF52
|
||||
feather52832.build.ldscript=nrf52832_s132_v6.ld
|
||||
|
||||
# SofDevice Menu
|
||||
feather52832.menu.softdevice.s132v6=S132 6.1.1
|
||||
feather52832.menu.softdevice.s132v6.build.sd_name=s132
|
||||
feather52832.menu.softdevice.s132v6.build.sd_version=6.1.1
|
||||
feather52832.menu.softdevice.s132v6.build.sd_fwid=0x00B7
|
||||
|
||||
# Debug Menu
|
||||
feather52832.menu.debug.l0=Level 0 (Release)
|
||||
feather52832.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
feather52832.menu.debug.l1=Level 1 (Error Message)
|
||||
feather52832.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
feather52832.menu.debug.l2=Level 2 (Full Debug)
|
||||
feather52832.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
feather52832.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
feather52832.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
feather52832.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
# ----------------------------------
|
||||
# Bluefruit Feather nRF52840 Express
|
||||
# ----------------------------------
|
||||
feather52840.name=Adafruit Feather nRF52840 Express
|
||||
|
||||
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
|
||||
feather52840.vid.0=0x239A
|
||||
feather52840.pid.0=0x8029
|
||||
feather52840.vid.1=0x239A
|
||||
feather52840.pid.1=0x0029
|
||||
feather52840.vid.2=0x239A
|
||||
feather52840.pid.2=0x002A
|
||||
feather52840.vid.3=0x239A
|
||||
feather52840.pid.3=0x802A
|
||||
|
||||
# Upload
|
||||
feather52840.bootloader.tool=bootburn
|
||||
feather52840.upload.tool=nrfutil
|
||||
feather52840.upload.protocol=nrfutil
|
||||
feather52840.upload.use_1200bps_touch=true
|
||||
feather52840.upload.wait_for_upload_port=true
|
||||
feather52840.upload.maximum_size=815104
|
||||
feather52840.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
feather52840.build.mcu=cortex-m4
|
||||
feather52840.build.f_cpu=64000000
|
||||
feather52840.build.board=NRF52840_FEATHER
|
||||
feather52840.build.core=nRF5
|
||||
feather52840.build.variant=feather_nrf52840_express
|
||||
feather52840.build.usb_manufacturer="Adafruit LLC"
|
||||
feather52840.build.usb_product="Feather nRF52840 Express"
|
||||
feather52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
|
||||
feather52840.build.ldscript=nrf52840_s140_v6.ld
|
||||
feather52840.build.vid=0x239A
|
||||
feather52840.build.pid=0x8029
|
||||
|
||||
# SofDevice Menu
|
||||
feather52840.menu.softdevice.s140v6=S140 6.1.1
|
||||
feather52840.menu.softdevice.s140v6.build.sd_name=s140
|
||||
feather52840.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
feather52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
feather52840.menu.debug.l0=Level 0 (Release)
|
||||
feather52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
feather52840.menu.debug.l1=Level 1 (Error Message)
|
||||
feather52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
feather52840.menu.debug.l2=Level 2 (Full Debug)
|
||||
feather52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
feather52840.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
feather52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
feather52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
|
||||
# ----------------------------------
|
||||
# Feather nRF52840 sense
|
||||
# ----------------------------------
|
||||
feather52840sense.name=Adafruit Feather nRF52840 Sense
|
||||
|
||||
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
|
||||
feather52840sense.vid.0=0x239A
|
||||
feather52840sense.pid.0=0x8087
|
||||
feather52840sense.vid.1=0x239A
|
||||
feather52840sense.pid.1=0x0087
|
||||
feather52840sense.vid.2=0x239A
|
||||
feather52840sense.pid.2=0x0088
|
||||
feather52840sense.vid.3=0x239A
|
||||
feather52840sense.pid.3=0x8088
|
||||
|
||||
# Upload
|
||||
feather52840sense.bootloader.tool=bootburn
|
||||
feather52840sense.upload.tool=nrfutil
|
||||
feather52840sense.upload.protocol=nrfutil
|
||||
feather52840sense.upload.use_1200bps_touch=true
|
||||
feather52840sense.upload.wait_for_upload_port=true
|
||||
feather52840sense.upload.maximum_size=815104
|
||||
feather52840sense.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
feather52840sense.build.mcu=cortex-m4
|
||||
feather52840sense.build.f_cpu=64000000
|
||||
feather52840sense.build.board=NRF52840_FEATHER_SENSE
|
||||
feather52840sense.build.core=nRF5
|
||||
feather52840sense.build.variant=feather_nrf52840_sense
|
||||
feather52840sense.build.usb_manufacturer="Adafruit LLC"
|
||||
feather52840sense.build.usb_product="Feather nRF52840 Sense"
|
||||
feather52840sense.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
|
||||
feather52840sense.build.ldscript=nrf52840_s140_v6.ld
|
||||
feather52840sense.build.vid=0x239A
|
||||
feather52840sense.build.pid=0x8087
|
||||
|
||||
# SofDevice Menu
|
||||
feather52840sense.menu.softdevice.s140v6=S140 6.1.1
|
||||
feather52840sense.menu.softdevice.s140v6.build.sd_name=s140
|
||||
feather52840sense.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
feather52840sense.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
feather52840sense.menu.debug.l0=Level 0 (Release)
|
||||
feather52840sense.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
feather52840sense.menu.debug.l1=Level 1 (Error Message)
|
||||
feather52840sense.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
feather52840sense.menu.debug.l2=Level 2 (Full Debug)
|
||||
feather52840sense.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
feather52840sense.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
feather52840sense.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
feather52840sense.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
|
||||
# ---------------------------------------------
|
||||
# Bluefruit ItsyBitsy nRF52840 Express
|
||||
# ---------------------------------------------
|
||||
itsybitsy52840.name=Adafruit ItsyBitsy nRF52840 Express
|
||||
|
||||
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
|
||||
itsybitsy52840.vid.0=0x239A
|
||||
itsybitsy52840.pid.0=0x8051
|
||||
itsybitsy52840.vid.1=0x239A
|
||||
itsybitsy52840.pid.1=0x0051
|
||||
itsybitsy52840.vid.2=0x239A
|
||||
itsybitsy52840.pid.2=0x0052
|
||||
itsybitsy52840.vid.3=0x239A
|
||||
itsybitsy52840.pid.3=0x8052
|
||||
|
||||
# Upload
|
||||
itsybitsy52840.bootloader.tool=bootburn
|
||||
itsybitsy52840.upload.tool=nrfutil
|
||||
itsybitsy52840.upload.protocol=nrfutil
|
||||
itsybitsy52840.upload.use_1200bps_touch=true
|
||||
itsybitsy52840.upload.wait_for_upload_port=true
|
||||
itsybitsy52840.upload.maximum_size=815104
|
||||
itsybitsy52840.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
itsybitsy52840.build.mcu=cortex-m4
|
||||
itsybitsy52840.build.f_cpu=64000000
|
||||
itsybitsy52840.build.board=NRF52840_ITSYBITSY
|
||||
itsybitsy52840.build.core=nRF5
|
||||
itsybitsy52840.build.variant=itsybitsy_nrf52840_express
|
||||
itsybitsy52840.build.usb_manufacturer="Adafruit LLC"
|
||||
itsybitsy52840.build.usb_product="ItsyBitsy nRF52840 Express"
|
||||
itsybitsy52840.build.extra_flags=-DNRF52840_XXAA -DARDUINO_NRF52_ITSYBITSY {build.flags.usb}
|
||||
itsybitsy52840.build.ldscript=nrf52840_s140_v6.ld
|
||||
itsybitsy52840.build.vid=0x239A
|
||||
itsybitsy52840.build.pid=0x8051
|
||||
|
||||
# SofDevice Menu
|
||||
itsybitsy52840.menu.softdevice.s140v6=0.2.11 SoftDevice s140 6.1.1
|
||||
itsybitsy52840.menu.softdevice.s140v6.build.sd_name=s140
|
||||
itsybitsy52840.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
itsybitsy52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
itsybitsy52840.menu.debug.l0=Level 0 (Release)
|
||||
itsybitsy52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
itsybitsy52840.menu.debug.l1=Level 1 (Error Message)
|
||||
itsybitsy52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
itsybitsy52840.menu.debug.l2=Level 2 (Full Debug)
|
||||
itsybitsy52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
itsybitsy52840.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
itsybitsy52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
itsybitsy52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
# ---------------------------------------------
|
||||
# Bluefruit Circuit Playground nRF52840 Express
|
||||
# ---------------------------------------------
|
||||
cplaynrf52840.name=Adafruit Circuit Playground Bluefruit
|
||||
|
||||
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
|
||||
cplaynrf52840.vid.0=0x239A
|
||||
cplaynrf52840.pid.0=0x8045
|
||||
cplaynrf52840.vid.1=0x239A
|
||||
cplaynrf52840.pid.1=0x0045
|
||||
cplaynrf52840.vid.2=0x239A
|
||||
cplaynrf52840.pid.2=0x0046
|
||||
cplaynrf52840.vid.3=0x239A
|
||||
cplaynrf52840.pid.3=0x8046
|
||||
|
||||
# Upload
|
||||
cplaynrf52840.bootloader.tool=bootburn
|
||||
cplaynrf52840.upload.tool=nrfutil
|
||||
cplaynrf52840.upload.protocol=nrfutil
|
||||
cplaynrf52840.upload.use_1200bps_touch=true
|
||||
cplaynrf52840.upload.wait_for_upload_port=true
|
||||
cplaynrf52840.upload.maximum_size=815104
|
||||
cplaynrf52840.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
cplaynrf52840.build.mcu=cortex-m4
|
||||
cplaynrf52840.build.f_cpu=64000000
|
||||
cplaynrf52840.build.board=NRF52840_CIRCUITPLAY
|
||||
cplaynrf52840.build.core=nRF5
|
||||
cplaynrf52840.build.variant=circuitplayground_nrf52840
|
||||
cplaynrf52840.build.usb_manufacturer="Adafruit LLC"
|
||||
cplaynrf52840.build.usb_product="Circuit Playground Bluefruit"
|
||||
cplaynrf52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
|
||||
cplaynrf52840.build.ldscript=nrf52840_s140_v6.ld
|
||||
cplaynrf52840.build.vid=0x239A
|
||||
cplaynrf52840.build.pid=0x8045
|
||||
|
||||
# SofDevice Menu
|
||||
cplaynrf52840.menu.softdevice.s140v6=S140 6.1.1
|
||||
cplaynrf52840.menu.softdevice.s140v6.build.sd_name=s140
|
||||
cplaynrf52840.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
cplaynrf52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
cplaynrf52840.menu.debug.l0=Level 0 (Release)
|
||||
cplaynrf52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
cplaynrf52840.menu.debug.l1=Level 1 (Error Message)
|
||||
cplaynrf52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
cplaynrf52840.menu.debug.l2=Level 2 (Full Debug)
|
||||
cplaynrf52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
cplaynrf52840.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
cplaynrf52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
cplaynrf52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
|
||||
# ---------------------------------------------
|
||||
# Clue nRF52840
|
||||
# ---------------------------------------------
|
||||
cluenrf52840.name=Adafruit CLUE
|
||||
|
||||
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
|
||||
cluenrf52840.vid.0=0x239A
|
||||
cluenrf52840.pid.0=0x8072
|
||||
cluenrf52840.vid.1=0x239A
|
||||
cluenrf52840.pid.1=0x0072
|
||||
cluenrf52840.vid.2=0x239A
|
||||
cluenrf52840.pid.2=0x0071
|
||||
cluenrf52840.vid.3=0x239A
|
||||
cluenrf52840.pid.3=0x8071
|
||||
|
||||
# Upload
|
||||
cluenrf52840.bootloader.tool=bootburn
|
||||
cluenrf52840.upload.tool=nrfutil
|
||||
cluenrf52840.upload.protocol=nrfutil
|
||||
cluenrf52840.upload.use_1200bps_touch=true
|
||||
cluenrf52840.upload.wait_for_upload_port=true
|
||||
cluenrf52840.upload.maximum_size=815104
|
||||
cluenrf52840.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
cluenrf52840.build.mcu=cortex-m4
|
||||
cluenrf52840.build.f_cpu=64000000
|
||||
cluenrf52840.build.board=NRF52840_CLUE
|
||||
cluenrf52840.build.core=nRF5
|
||||
cluenrf52840.build.variant=clue_nrf52840
|
||||
cluenrf52840.build.usb_manufacturer="Adafruit LLC"
|
||||
cluenrf52840.build.usb_product="CLUE"
|
||||
cluenrf52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
|
||||
cluenrf52840.build.ldscript=nrf52840_s140_v6.ld
|
||||
cluenrf52840.build.vid=0x239A
|
||||
cluenrf52840.build.pid=0x8071
|
||||
|
||||
# SofDevice Menu
|
||||
cluenrf52840.menu.softdevice.s140v6=S140 6.1.1
|
||||
cluenrf52840.menu.softdevice.s140v6.build.sd_name=s140
|
||||
cluenrf52840.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
cluenrf52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
cluenrf52840.menu.debug.l0=Level 0 (Release)
|
||||
cluenrf52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
cluenrf52840.menu.debug.l1=Level 1 (Error Message)
|
||||
cluenrf52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
cluenrf52840.menu.debug.l2=Level 2 (Full Debug)
|
||||
cluenrf52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
cluenrf52840.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
cluenrf52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
cluenrf52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
# ----------------------------------
|
||||
# Metro nRF52840 Express
|
||||
# ----------------------------------
|
||||
metro52840.name=Adafruit Metro nRF52840 Express
|
||||
|
||||
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
|
||||
metro52840.vid.0=0x239A
|
||||
metro52840.pid.0=0x803F
|
||||
metro52840.vid.1=0x239A
|
||||
metro52840.pid.1=0x003F
|
||||
metro52840.vid.2=0x239A
|
||||
metro52840.pid.2=0x0040
|
||||
metro52840.vid.3=0x239A
|
||||
metro52840.pid.3=0x8040
|
||||
|
||||
# Upload
|
||||
metro52840.bootloader.tool=bootburn
|
||||
metro52840.upload.tool=nrfutil
|
||||
metro52840.upload.protocol=nrfutil
|
||||
metro52840.upload.use_1200bps_touch=true
|
||||
metro52840.upload.wait_for_upload_port=true
|
||||
metro52840.upload.maximum_size=815104
|
||||
metro52840.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
metro52840.build.mcu=cortex-m4
|
||||
metro52840.build.f_cpu=64000000
|
||||
metro52840.build.board=NRF52840_METRO
|
||||
metro52840.build.core=nRF5
|
||||
metro52840.build.variant=metro_nrf52840_express
|
||||
metro52840.build.usb_manufacturer="Adafruit LLC"
|
||||
metro52840.build.usb_product="Metro nRF52840 Express"
|
||||
metro52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
|
||||
metro52840.build.ldscript=nrf52840_s140_v6.ld
|
||||
metro52840.build.vid=0x239A
|
||||
metro52840.build.pid=0x803F
|
||||
|
||||
# SofDevice Menu
|
||||
metro52840.menu.softdevice.s140v6=S140 6.1.1
|
||||
metro52840.menu.softdevice.s140v6.build.sd_name=s140
|
||||
metro52840.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
metro52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
metro52840.menu.debug.l0=Level 0 (Release)
|
||||
metro52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
metro52840.menu.debug.l1=Level 1 (Error Message)
|
||||
metro52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
metro52840.menu.debug.l2=Level 2 (Full Debug)
|
||||
metro52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
metro52840.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
metro52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
metro52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
|
||||
|
||||
|
||||
# -------------------------------------------------------
|
||||
#
|
||||
# Boards that aren't made by Adafruit
|
||||
#
|
||||
# -------------------------------------------------------
|
||||
|
||||
|
||||
# ----------------------------------
|
||||
# Nordic nRF52840DK (PCA10056)
|
||||
# ----------------------------------
|
||||
pca10056.name=Nordic nRF52840DK (PCA10056)
|
||||
pca10056.bootloader.tool=bootburn
|
||||
|
||||
# Upload
|
||||
pca10056.upload.tool=nrfutil
|
||||
pca10056.upload.protocol=nrfutil
|
||||
pca10056.upload.use_1200bps_touch=true
|
||||
pca10056.upload.wait_for_upload_port=true
|
||||
pca10056.upload.maximum_size=815104
|
||||
pca10056.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
pca10056.build.mcu=cortex-m4
|
||||
pca10056.build.f_cpu=64000000
|
||||
pca10056.build.board=NRF52840_PCA10056
|
||||
pca10056.build.core=nRF5
|
||||
pca10056.build.variant=pca10056
|
||||
pca10056.build.usb_manufacturer="Nordic"
|
||||
pca10056.build.usb_product="nRF52840 DK"
|
||||
pca10056.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
|
||||
pca10056.build.ldscript=nrf52840_s140_v6.ld
|
||||
pca10056.build.vid=0x239A
|
||||
pca10056.build.pid=0x8029
|
||||
|
||||
# SofDevice Menu
|
||||
pca10056.menu.softdevice.s140v6=S140 6.1.1
|
||||
pca10056.menu.softdevice.s140v6.build.sd_name=s140
|
||||
pca10056.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
pca10056.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
pca10056.menu.debug.l0=Level 0 (Release)
|
||||
pca10056.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
pca10056.menu.debug.l1=Level 1 (Error Message)
|
||||
pca10056.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
pca10056.menu.debug.l2=Level 2 (Full Debug)
|
||||
pca10056.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
pca10056.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
pca10056.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
pca10056.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
# ----------------------------------
|
||||
# Particle Xenon
|
||||
# ----------------------------------
|
||||
particle_xenon.name=Particle Xenon
|
||||
|
||||
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
|
||||
particle_xenon.vid.0=0x239A
|
||||
particle_xenon.pid.0=0x8029
|
||||
particle_xenon.vid.1=0x239A
|
||||
particle_xenon.pid.1=0x0029
|
||||
particle_xenon.vid.2=0x239A
|
||||
particle_xenon.pid.2=0x002A
|
||||
particle_xenon.vid.3=0x239A
|
||||
particle_xenon.pid.3=0x802A
|
||||
|
||||
# Upload
|
||||
particle_xenon.bootloader.tool=bootburn
|
||||
particle_xenon.upload.tool=nrfutil
|
||||
particle_xenon.upload.protocol=nrfutil
|
||||
particle_xenon.upload.use_1200bps_touch=true
|
||||
particle_xenon.upload.wait_for_upload_port=true
|
||||
particle_xenon.upload.maximum_size=815104
|
||||
particle_xenon.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
particle_xenon.build.mcu=cortex-m4
|
||||
particle_xenon.build.f_cpu=64000000
|
||||
particle_xenon.build.board=PARTICLE_XENON
|
||||
particle_xenon.build.core=nRF5
|
||||
particle_xenon.build.variant=particle_xenon
|
||||
particle_xenon.build.usb_manufacturer="Particle Industries"
|
||||
particle_xenon.build.usb_product="Particle Xenon"
|
||||
particle_xenon.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
|
||||
particle_xenon.build.ldscript=nrf52840_s140_v6.ld
|
||||
particle_xenon.build.vid=0x239A
|
||||
particle_xenon.build.pid=0x8029
|
||||
|
||||
# SofDevice Menu
|
||||
particle_xenon.menu.softdevice.s140v6=S140 6.1.1
|
||||
particle_xenon.menu.softdevice.s140v6.build.sd_name=s140
|
||||
particle_xenon.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
particle_xenon.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
particle_xenon.menu.debug.l0=Level 0 (Release)
|
||||
particle_xenon.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
particle_xenon.menu.debug.l1=Level 1 (Error Message)
|
||||
particle_xenon.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
particle_xenon.menu.debug.l2=Level 2 (Full Debug)
|
||||
particle_xenon.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
particle_xenon.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
particle_xenon.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
particle_xenon.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
# ----------------------------------
|
||||
# Raytac MDBT50Q - RX
|
||||
# ----------------------------------
|
||||
mdbt50qrx.name=Raytac MDBT50Q-RX Dongle
|
||||
|
||||
# VID/PID for bootloader, Arduino + Circuitpython App
|
||||
mdbt50qrx.vid.0=0x239A
|
||||
mdbt50qrx.pid.0=0x810B
|
||||
mdbt50qrx.vid.1=0x239A
|
||||
mdbt50qrx.pid.1=0x010B
|
||||
mdbt50qrx.vid.2=0x239A
|
||||
mdbt50qrx.pid.2=0x810C
|
||||
|
||||
# Upload
|
||||
mdbt50qrx.bootloader.tool=bootburn
|
||||
mdbt50qrx.upload.tool=nrfutil
|
||||
mdbt50qrx.upload.protocol=nrfutil
|
||||
mdbt50qrx.upload.use_1200bps_touch=true
|
||||
mdbt50qrx.upload.wait_for_upload_port=true
|
||||
mdbt50qrx.upload.maximum_size=815104
|
||||
mdbt50qrx.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
mdbt50qrx.build.mcu=cortex-m4
|
||||
mdbt50qrx.build.f_cpu=64000000
|
||||
mdbt50qrx.build.board=MDBT50Q_RX
|
||||
mdbt50qrx.build.core=nRF5
|
||||
mdbt50qrx.build.variant=raytac_mdbt50q_rx
|
||||
mdbt50qrx.build.usb_manufacturer="Raytac"
|
||||
mdbt50qrx.build.usb_product="nRF52840 Dongle"
|
||||
mdbt50qrx.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
|
||||
mdbt50qrx.build.ldscript=nrf52840_s140_v6.ld
|
||||
mdbt50qrx.build.vid=0x239A
|
||||
mdbt50qrx.build.pid=0x810B
|
||||
|
||||
# SofDevice Menu
|
||||
mdbt50qrx.menu.softdevice.s140v6=S140 6.1.1
|
||||
mdbt50qrx.menu.softdevice.s140v6.build.sd_name=s140
|
||||
mdbt50qrx.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
mdbt50qrx.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
mdbt50qrx.menu.debug.l0=Level 0 (Release)
|
||||
mdbt50qrx.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
mdbt50qrx.menu.debug.l1=Level 1 (Error Message)
|
||||
mdbt50qrx.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
mdbt50qrx.menu.debug.l2=Level 2 (Full Debug)
|
||||
mdbt50qrx.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
mdbt50qrx.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
mdbt50qrx.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
mdbt50qrx.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
|
||||
# ----------------------------------
|
||||
# NINA B302
|
||||
# ----------------------------------
|
||||
ninab302.name=NINA B302 ublox
|
||||
|
||||
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
|
||||
ninab302.vid.0=0x239A
|
||||
ninab302.pid.0=0x8029
|
||||
ninab302.vid.1=0x239A
|
||||
ninab302.pid.1=0x0029
|
||||
ninab302.vid.2=0x7239A
|
||||
ninab302.pid.2=0x002A
|
||||
ninab302.vid.3=0x239A
|
||||
ninab302.pid.3=0x802A
|
||||
|
||||
# Upload
|
||||
ninab302.bootloader.tool=bootburn
|
||||
ninab302.upload.tool=nrfutil
|
||||
ninab302.upload.protocol=nrfutil
|
||||
ninab302.upload.use_1200bps_touch=true
|
||||
ninab302.upload.wait_for_upload_port=true
|
||||
ninab302.upload.maximum_size=815104
|
||||
ninab302.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
ninab302.build.mcu=cortex-m4
|
||||
ninab302.build.f_cpu=64000000
|
||||
ninab302.build.board=NINA_B302_ublox
|
||||
ninab302.build.core=nRF5
|
||||
ninab302.build.variant=NINA_B302_ublox
|
||||
ninab302.build.usb_manufacturer="Nordic"
|
||||
ninab302.build.usb_product="NINA B302 ublox"
|
||||
ninab302.build.extra_flags=-DNRF52840_XXAA -DNINA_B302_ublox {build.flags.usb}
|
||||
ninab302.build.ldscript=nrf52840_s140_v6.ld
|
||||
ninab302.build.vid=0x239A
|
||||
ninab302.build.pid=0x8029
|
||||
|
||||
# SofDevice Menu
|
||||
ninab302.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1
|
||||
ninab302.menu.softdevice.s140v6.build.sd_name=s140
|
||||
ninab302.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
ninab302.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
ninab302.menu.debug.l0=Level 0 (Release)
|
||||
ninab302.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
ninab302.menu.debug.l1=Level 1 (Error Message)
|
||||
ninab302.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
ninab302.menu.debug.l2=Level 2 (Full Debug)
|
||||
ninab302.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
ninab302.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
ninab302.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
ninab302.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
# ----------------------------------
|
||||
# NINA B112
|
||||
# ----------------------------------
|
||||
ninab112.name=NINA B112 ublox
|
||||
ninab112.bootloader.tool=bootburn
|
||||
|
||||
# Upload
|
||||
ninab112.upload.tool=nrfutil
|
||||
ninab112.upload.protocol=nrfutil
|
||||
ninab112.upload.use_1200bps_touch=false
|
||||
ninab112.upload.wait_for_upload_port=false
|
||||
ninab112.upload.native_usb=false
|
||||
ninab112.upload.maximum_size=290816
|
||||
ninab112.upload.maximum_data_size=52224
|
||||
|
||||
# Build
|
||||
ninab112.build.mcu=cortex-m4
|
||||
ninab112.build.f_cpu=64000000
|
||||
ninab112.build.board=NINA_B112_ublox
|
||||
ninab112.build.core=nRF5
|
||||
ninab112.build.variant=NINA_B112_ublox
|
||||
feather52840.build.usb_manufacturer="Adafruit LLC"
|
||||
feather52840.build.usb_product="Feather nRF52832"
|
||||
ninab112.build.extra_flags=-DNRF52832_XXAA -DNINA_B112_ublox -DNRF52
|
||||
ninab112.build.ldscript=nrf52832_s132_v6.ld
|
||||
|
||||
# SofDevice Menu
|
||||
ninab112.menu.softdevice.s132v6=0.3.2 SoftDevice s132 6.1.1
|
||||
ninab112.menu.softdevice.s132v6.build.sd_name=s132
|
||||
ninab112.menu.softdevice.s132v6.build.sd_version=6.1.1
|
||||
ninab112.menu.softdevice.s132v6.build.sd_fwid=0x00B7
|
||||
|
||||
# Debug Menu
|
||||
ninab112.menu.debug.l0=Level 0 (Release)
|
||||
ninab112.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
ninab112.menu.debug.l1=Level 1 (Error Message)
|
||||
ninab112.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
ninab112.menu.debug.l2=Level 2 (Full Debug)
|
||||
ninab112.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
ninab112.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
ninab112.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
ninab112.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
* Udp.cpp: Library to send/receive UDP packets.
|
||||
*
|
||||
* NOTE: UDP is fast, but has some important limitations (thanks to Warren Gray for mentioning these)
|
||||
* 1) UDP does not guarantee the order in which assembled UDP packets are received. This
|
||||
* might not happen often in practice, but in larger network topologies, a UDP
|
||||
* packet can be received out of sequence.
|
||||
* 2) UDP does not guard against lost packets - so packets *can* disappear without the sender being
|
||||
* aware of it. Again, this may not be a concern in practice on small local networks.
|
||||
* For more information, see http://www.cafeaulait.org/course/week12/35.html
|
||||
*
|
||||
* MIT License:
|
||||
* Copyright (c) 2008 Bjoern Hartmann
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
* bjoern@cs.stanford.edu 12/30/2008
|
||||
*/
|
||||
|
||||
#ifndef udp_h
|
||||
#define udp_h
|
||||
|
||||
#include <Stream.h>
|
||||
#include <IPAddress.h>
|
||||
|
||||
class UDP : public Stream {
|
||||
|
||||
public:
|
||||
virtual uint8_t begin(uint16_t) =0; // initialize, start listening on specified port. Returns 1 if successful, 0 if there are no sockets available to use
|
||||
|
||||
// KH, add virtual function to support Multicast, necessary for many services (MDNS, UPnP, etc.)
|
||||
virtual uint8_t beginMulticast(IPAddress, uint16_t) { return 0; } // initialize, start listening on specified multicast IP address and port. Returns 1 if successful, 0 on failure
|
||||
|
||||
virtual void stop() =0; // Finish with the UDP socket
|
||||
|
||||
// Sending UDP packets
|
||||
|
||||
// Start building up a packet to send to the remote host specific in ip and port
|
||||
// Returns 1 if successful, 0 if there was a problem with the supplied IP address or port
|
||||
virtual int beginPacket(IPAddress ip, uint16_t port) =0;
|
||||
// Start building up a packet to send to the remote host specific in host and port
|
||||
// Returns 1 if successful, 0 if there was a problem resolving the hostname or port
|
||||
virtual int beginPacket(const char *host, uint16_t port) =0;
|
||||
// Finish off this packet and send it
|
||||
// Returns 1 if the packet was sent successfully, 0 if there was an error
|
||||
virtual int endPacket() =0;
|
||||
// Write a single byte into the packet
|
||||
virtual size_t write(uint8_t) =0;
|
||||
// Write size bytes from buffer into the packet
|
||||
virtual size_t write(const uint8_t *buffer, size_t size) =0;
|
||||
|
||||
// Start processing the next available incoming packet
|
||||
// Returns the size of the packet in bytes, or 0 if no packets are available
|
||||
virtual int parsePacket() =0;
|
||||
// Number of bytes remaining in the current packet
|
||||
virtual int available() =0;
|
||||
// Read a single byte from the current packet
|
||||
virtual int read() =0;
|
||||
// Read up to len bytes from the current packet and place them into buffer
|
||||
// Returns the number of bytes read, or 0 if none are available
|
||||
virtual int read(unsigned char* buffer, size_t len) =0;
|
||||
// Read up to len characters from the current packet and place them into buffer
|
||||
// Returns the number of characters read, or 0 if none are available
|
||||
virtual int read(char* buffer, size_t len) =0;
|
||||
// Return the next byte from the current packet without moving on to the next byte
|
||||
virtual int peek() =0;
|
||||
virtual void flush() =0; // Finish reading the current packet
|
||||
|
||||
// Return the IP address of the host who sent the current incoming packet
|
||||
virtual IPAddress remoteIP() =0;
|
||||
// Return the port of the host who sent the current incoming packet
|
||||
virtual uint16_t remotePort() =0;
|
||||
protected:
|
||||
uint8_t* rawIPAddress(IPAddress& addr) { return addr.raw_address(); };
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,168 @@
|
||||
# Copyright (c) 2014-2015 Arduino LLC. All right reserved.
|
||||
# Copyright (c) 2016 Sandeep Mistry All right reserved.
|
||||
# Copyright (c) 2017 Adafruit Industries. All rights reserved.
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
name=Adafruit nRF52 Boards
|
||||
version=0.23.0
|
||||
|
||||
# Compile variables
|
||||
# -----------------
|
||||
|
||||
compiler.warning_flags=-w
|
||||
compiler.warning_flags.none=-w
|
||||
compiler.warning_flags.default=
|
||||
compiler.warning_flags.more=-Wall
|
||||
compiler.warning_flags.all=-Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-pointer-arith
|
||||
|
||||
# Allow changing optimization settings via platform.local.txt / boards.local.txt
|
||||
compiler.optimization_flag=-Ofast
|
||||
|
||||
compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/
|
||||
compiler.c.cmd=arm-none-eabi-gcc
|
||||
compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.warning_flags} {build.float_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD
|
||||
|
||||
|
||||
# KH, Error here to use gcc, must use g++
|
||||
#compiler.c.elf.cmd=arm-none-eabi-gcc
|
||||
compiler.c.elf.cmd=arm-none-eabi-g++
|
||||
|
||||
compiler.c.elf.flags={compiler.optimization_flag} -Wl,--gc-sections -save-temps
|
||||
compiler.S.cmd=arm-none-eabi-gcc
|
||||
compiler.S.flags=-mcpu={build.mcu} -mthumb -mabi=aapcs {compiler.optimization_flag} -g -c {build.float_flags} -x assembler-with-cpp
|
||||
|
||||
compiler.cpp.cmd=arm-none-eabi-g++
|
||||
compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.warning_flags} {build.float_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD
|
||||
compiler.ar.cmd=arm-none-eabi-ar
|
||||
compiler.ar.flags=rcs
|
||||
compiler.objcopy.cmd=arm-none-eabi-objcopy
|
||||
compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0
|
||||
compiler.elf2bin.flags=-O binary
|
||||
compiler.elf2bin.cmd=arm-none-eabi-objcopy
|
||||
compiler.elf2hex.flags=-O ihex
|
||||
compiler.elf2hex.cmd=arm-none-eabi-objcopy
|
||||
compiler.ldflags=-mcpu={build.mcu} -mthumb {build.float_flags} -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align --specs=nano.specs --specs=nosys.specs
|
||||
compiler.size.cmd=arm-none-eabi-size
|
||||
|
||||
# this can be overriden in boards.txt
|
||||
build.float_flags=-mfloat-abi=hard -mfpu=fpv4-sp-d16 -u _printf_float
|
||||
build.debug_flags=-DCFG_DEBUG=0
|
||||
build.logger_flags=-DCFG_LOGGER=1
|
||||
build.sysview_flags=-DCFG_SYSVIEW=0
|
||||
|
||||
# USB flags
|
||||
build.flags.usb= -DUSBCON -DUSE_TINYUSB -DUSB_VID={build.vid} -DUSB_PID={build.pid} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}'
|
||||
|
||||
# These can be overridden in platform.local.txt
|
||||
compiler.c.extra_flags=
|
||||
compiler.c.elf.extra_flags=
|
||||
compiler.cpp.extra_flags=
|
||||
compiler.S.extra_flags=
|
||||
compiler.ar.extra_flags=
|
||||
compiler.libraries.ldflags=
|
||||
compiler.elf2bin.extra_flags=
|
||||
compiler.elf2hex.extra_flags=
|
||||
|
||||
compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-5.7.0.path}/CMSIS/Core/Include/" "-I{runtime.tools.CMSIS-5.7.0.path}/CMSIS/DSP/Include/"
|
||||
compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-5.7.0.path}/CMSIS/DSP/Lib/GCC/" -larm_cortexM4lf_math
|
||||
|
||||
# common compiler for nrf
|
||||
rtos.path={build.core.path}/freertos
|
||||
nordic.path={build.core.path}/nordic
|
||||
|
||||
# build.logger_flags and build.sysview_flags are intentionally empty,
|
||||
# to allow modification via a user's own boards.local.txt or platform.local.txt files.
|
||||
build.flags.nrf= -DSOFTDEVICE_PRESENT -DARDUINO_NRF52_ADAFRUIT -DNRF52_SERIES -DDX_CC_TEE -DLFS_NAME_MAX=64 {compiler.optimization_flag} {build.debug_flags} {build.logger_flags} {build.sysview_flags} {compiler.arm.cmsis.c.flags} "-I{nordic.path}" "-I{nordic.path}/nrfx" "-I{nordic.path}/nrfx/hal" "-I{nordic.path}/nrfx/mdk" "-I{nordic.path}/nrfx/soc" "-I{nordic.path}/nrfx/drivers/include" "-I{nordic.path}/nrfx/drivers/src" "-I{nordic.path}/softdevice/{build.sd_name}_nrf52_{build.sd_version}_API/include" "-I{nordic.path}/softdevice/{build.sd_name}_nrf52_{build.sd_version}_API/include/nrf52" "-I{rtos.path}/Source/include" "-I{rtos.path}/config" "-I{rtos.path}/portable/GCC/nrf52" "-I{rtos.path}/portable/CMSIS/nrf52" "-I{build.core.path}/sysview/SEGGER" "-I{build.core.path}/sysview/Config" "-I{runtime.platform.path}/libraries/Adafruit_TinyUSB_Arduino/src/arduino"
|
||||
|
||||
# Compile patterns
|
||||
# ----------------
|
||||
|
||||
## Compile c files
|
||||
## KH Add -DBOARD_NAME="{build.board}"
|
||||
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} '-DARDUINO_BSP_VERSION="{version}"' {compiler.c.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}"
|
||||
|
||||
## Compile c++ files
|
||||
## KH Add -DBOARD_NAME="{build.board}"
|
||||
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} '-DARDUINO_BSP_VERSION="{version}"' {compiler.cpp.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}"
|
||||
|
||||
## Compile S files
|
||||
## KH Add -DBOARD_NAME="{build.board}"
|
||||
recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}"
|
||||
|
||||
## Create archives
|
||||
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"
|
||||
|
||||
## Combine gc-sections, archives, and objects
|
||||
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-L{build.core.path}/linker" "-T{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} -Wl,--start-group {compiler.arm.cmsis.ldflags} -lm "{build.path}/{archive_file}" {compiler.libraries.ldflags} -Wl,--end-group
|
||||
|
||||
## Create output (bin file)
|
||||
#recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2bin.cmd}" {compiler.elf2bin.flags} {compiler.elf2bin.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin"
|
||||
|
||||
## Create output (hex file)
|
||||
recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex"
|
||||
|
||||
## Create dfu package zip file
|
||||
recipe.objcopy.zip.pattern="{tools.nrfutil.cmd}" dfu genpkg --dev-type 0x0052 --sd-req {build.sd_fwid} --application "{build.path}/{build.project_name}.hex" "{build.path}/{build.project_name}.zip"
|
||||
|
||||
## Create uf2 file
|
||||
#recipe.objcopy.uf2.pattern=python "{runtime.platform.path}/tools/uf2conv/uf2conv.py" -f 0xADA52840 -c -o "{build.path}/{build.project_name}.uf2" "{build.path}/{build.project_name}.hex"
|
||||
|
||||
## Save bin
|
||||
recipe.output.tmp_file_bin={build.project_name}.bin
|
||||
recipe.output.save_file_bin={build.project_name}.save.bin
|
||||
|
||||
## Save hex
|
||||
recipe.output.tmp_file_hex={build.project_name}.hex
|
||||
recipe.output.save_file_hexu={build.project_name}.save.hex
|
||||
|
||||
## Compute size
|
||||
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
|
||||
recipe.size.regex=^(?:\.text|\.data|)\s+([0-9]+).*
|
||||
recipe.size.regex.data=^(?:\.data|\.bss)\s+([0-9]+).*
|
||||
|
||||
## Export Compiled Binary
|
||||
recipe.output.tmp_file={build.project_name}.hex
|
||||
recipe.output.save_file={build.project_name}.{build.variant}.hex
|
||||
|
||||
#***************************************************
|
||||
# adafruit-nrfutil for uploading
|
||||
# https://github.com/adafruit/Adafruit_nRF52_nrfutil
|
||||
# pre-built binaries are provided for macos and windows
|
||||
#***************************************************
|
||||
tools.nrfutil.cmd=adafruit-nrfutil
|
||||
tools.nrfutil.cmd.windows={runtime.platform.path}/tools/adafruit-nrfutil/win32/adafruit-nrfutil.exe
|
||||
tools.nrfutil.cmd.macosx={runtime.platform.path}/tools/adafruit-nrfutil/macos/adafruit-nrfutil
|
||||
|
||||
tools.nrfutil.upload.params.verbose=--verbose
|
||||
tools.nrfutil.upload.params.quiet=
|
||||
tools.nrfutil.upload.pattern="{cmd}" {upload.verbose} dfu serial -pkg "{build.path}/{build.project_name}.zip" -p {serial.port} -b 115200 --singlebank
|
||||
|
||||
#***************************************************
|
||||
# Burning bootloader with either jlink or nrfutil
|
||||
#***************************************************
|
||||
|
||||
# Bootloader version
|
||||
tools.bootburn.bootloader.file={runtime.platform.path}/bootloader/{build.variant}/{build.variant}_bootloader-0.6.0_{build.sd_name}_{build.sd_version}
|
||||
|
||||
tools.bootburn.bootloader.params.verbose=
|
||||
tools.bootburn.bootloader.params.quiet=
|
||||
tools.bootburn.bootloader.pattern={program.burn_pattern}
|
||||
|
||||
# erase flash page while programming
|
||||
tools.bootburn.erase.params.verbose=
|
||||
tools.bootburn.erase.params.quiet=
|
||||
tools.bootburn.erase.pattern=
|
||||
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Lesser General Public License for more details.
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
// API compatibility
|
||||
#include "variant.h"
|
||||
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
|
||||
Copyright (c) 2016 Sandeep Mistry All right reserved.
|
||||
Copyright (c) 2018, Adafruit Industries (adafruit.com)
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
// Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip).
|
||||
// See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1)
|
||||
|
||||
#include "variant.h"
|
||||
#include "wiring_constants.h"
|
||||
#include "wiring_digital.h"
|
||||
#include "nrf.h"
|
||||
|
||||
const uint32_t g_ADigitalPinMap[] = {
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
6,
|
||||
7,
|
||||
8,
|
||||
9,
|
||||
10,
|
||||
11,
|
||||
12,
|
||||
13,
|
||||
14,
|
||||
15,
|
||||
16,
|
||||
17,
|
||||
18,
|
||||
19,
|
||||
20,
|
||||
21,
|
||||
22,
|
||||
23,
|
||||
24,
|
||||
25,
|
||||
26,
|
||||
27,
|
||||
28,
|
||||
29,
|
||||
30,
|
||||
31
|
||||
};
|
||||
|
||||
@@ -0,0 +1,173 @@
|
||||
/*
|
||||
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
|
||||
Copyright (c) 2016 Sandeep Mistry All right reserved.
|
||||
Copyright (c) 2018, Adafruit Industries (adafruit.com)
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Lesser General Public License for more details.
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef _VARIANT_NINA_B112_UBLOX_
|
||||
#define _VARIANT_NINA_B112_UBLOX_
|
||||
|
||||
#define NRF_CLOCK_LFCLKSRC {.source = NRF_CLOCK_LF_SRC_XTAL, \
|
||||
.rc_ctiv = 0, \
|
||||
.rc_temp_ctiv = 0, \
|
||||
.xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM}
|
||||
|
||||
/** Master clock frequency */
|
||||
#define VARIANT_MCK (64000000ul)
|
||||
|
||||
#define USE_LFXO // Board uses 32khz crystal for LF
|
||||
// define USE_LFRC // Board uses RC for LF
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Headers
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
#include "WVariant.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif // __cplusplus
|
||||
|
||||
// Number of pins defined in PinDescription array
|
||||
#define PINS_COUNT (32u)
|
||||
#define NUM_DIGITAL_PINS (32u)
|
||||
#define NUM_ANALOG_INPUTS (6u)
|
||||
#define NUM_ANALOG_OUTPUTS (0u)
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED LED1
|
||||
#define LED_BUILTIN PIN_LED
|
||||
|
||||
//LEDs onboard
|
||||
#define LED1 (8) // Red
|
||||
#define LED2 (16) // Green/SW1
|
||||
#define LED3 (18) // Blue
|
||||
|
||||
#define LED_STATE_ON 1 // State when LED is litted
|
||||
|
||||
//Switch
|
||||
|
||||
#define SW1 (16)
|
||||
#define SW2 (30)
|
||||
|
||||
// NFC
|
||||
#define PIN_NFC_1 (9) // P0.9
|
||||
#define PIN_NFC_2 (10) // P0.10
|
||||
|
||||
/*
|
||||
* Analog pins
|
||||
*/
|
||||
#define PIN_A0 (3) // P0.03
|
||||
#define PIN_A1 (2) // P0.02
|
||||
#define PIN_A2 (4) // P0.04
|
||||
#define PIN_A3 (30) // P0.30
|
||||
#define PIN_A4 (29) // P0.29
|
||||
#define PIN_A5 (28) // P0.28
|
||||
|
||||
static const uint8_t A0 = PIN_A0 ;
|
||||
static const uint8_t A1 = PIN_A1 ;
|
||||
static const uint8_t A2 = PIN_A2 ;
|
||||
static const uint8_t A3 = PIN_A3 ;
|
||||
static const uint8_t A4 = PIN_A4 ;
|
||||
static const uint8_t A5 = PIN_A5 ;
|
||||
|
||||
#define ADC_RESOLUTION 14
|
||||
|
||||
#define PIN_D0 (5) // P0.05
|
||||
#define PIN_D1 (6) // P0.06
|
||||
#define PIN_D2 (7) // P0.07
|
||||
#define PIN_D3 (31) // P0.31
|
||||
#define PIN_D4 (18) // P0.18
|
||||
#define PIN_D6 (9) // P0.09
|
||||
#define PIN_D7 (10) // P0.10
|
||||
#define PIN_D9 (8) // P0.8
|
||||
#define PIN_D10 (11) // P0.11
|
||||
#define PIN_D11 (13) // P0.13
|
||||
#define PIN_D12 (12) // P0.12
|
||||
#define PIN_D13 (14) // P0.14
|
||||
#define PIN_D14 (2) // P0.02
|
||||
#define PIN_D15 (3) // P0.03
|
||||
|
||||
static const uint8_t D0 = PIN_D0 ;
|
||||
static const uint8_t D1 = PIN_D1 ;
|
||||
static const uint8_t D2 = PIN_D2 ;
|
||||
static const uint8_t D3 = PIN_D3 ;
|
||||
static const uint8_t D4 = PIN_D4 ;
|
||||
static const uint8_t D6 = PIN_D6 ;
|
||||
static const uint8_t D7 = PIN_D7 ;
|
||||
static const uint8_t D9 = PIN_D9 ;
|
||||
static const uint8_t D10 = PIN_D10 ;
|
||||
static const uint8_t D11 = PIN_D11 ;
|
||||
static const uint8_t D12 = PIN_D12 ;
|
||||
static const uint8_t D13 = PIN_D13 ;
|
||||
static const uint8_t D14 = PIN_D14 ;
|
||||
static const uint8_t D15 = PIN_D15 ;
|
||||
|
||||
// Other pins
|
||||
//static const uint8_t AREF = PIN_AREF;
|
||||
|
||||
//#define PIN_AREF (24)
|
||||
//#define PIN_VBAT PIN_A7
|
||||
|
||||
/*
|
||||
* Serial interfaces
|
||||
*/
|
||||
//#define PIN_SERIAL_RX (8) //used for original Adafruit Bootloader
|
||||
//#define PIN_SERIAL_TX (6) //used for original Adafruit Bootloader
|
||||
|
||||
#define PIN_SERIAL_RX (5) // P0.05
|
||||
#define PIN_SERIAL_TX (6) // P0.06
|
||||
#define PIN_SERIAL_CTS (7) // P0.07
|
||||
#define PIN_SERIAL_RTS (31) // P0.31
|
||||
#define PIN_SERIAL_DTR (28) // P0.28
|
||||
#define PIN_SERIAL_DSR (29) // P0.29
|
||||
|
||||
/*
|
||||
* SPI Interfaces
|
||||
*/
|
||||
#define SPI_INTERFACES_COUNT 1
|
||||
|
||||
#define PIN_SPI_MISO (12) // P0.12
|
||||
#define PIN_SPI_MOSI (13) // P0.13
|
||||
#define PIN_SPI_SCK (14) // P0.14
|
||||
|
||||
static const uint8_t SS = 11 ; // P0.11
|
||||
static const uint8_t MOSI = PIN_SPI_MOSI ;
|
||||
static const uint8_t MISO = PIN_SPI_MISO ;
|
||||
static const uint8_t SCK = PIN_SPI_SCK ;
|
||||
|
||||
/*
|
||||
* Wire Interfaces
|
||||
*/
|
||||
#define WIRE_INTERFACES_COUNT 1
|
||||
|
||||
#define PIN_WIRE_SDA (2) // P0.02
|
||||
#define PIN_WIRE_SCL (3) // P0.03
|
||||
|
||||
static const uint8_t SDA = PIN_WIRE_SDA;
|
||||
static const uint8_t SCL = PIN_WIRE_SCL;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Arduino objects - C++ only
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
#endif //_VARIANT_NINA_B112_UBLOX_
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Lesser General Public License for more details.
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
// API compatibility
|
||||
#include "variant.h"
|
||||
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
|
||||
Copyright (c) 2016 Sandeep Mistry All right reserved.
|
||||
Copyright (c) 2018, Adafruit Industries (adafruit.com)
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
// Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip).
|
||||
// See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1)
|
||||
|
||||
#include "variant.h"
|
||||
#include "wiring_constants.h"
|
||||
#include "wiring_digital.h"
|
||||
#include "nrf.h"
|
||||
|
||||
const uint32_t g_ADigitalPinMap[] =
|
||||
{
|
||||
// D0 .. D13
|
||||
29, // D0 is P0.29 (UART TX)
|
||||
45, // D1 is P1.13 (UART RX
|
||||
44, // D2 is P1.12 (NFC2)
|
||||
31, // D3 is P0.31 (LED1)
|
||||
13, // D4 is P0.13 (LED2)
|
||||
11, // D5 is P0.11
|
||||
9, // D6 is P0.09
|
||||
10, // D7 is P0.10 (Button)
|
||||
41, // D8 is P1.09
|
||||
12, // D9 is P0.12
|
||||
14, // D10 is P0.14
|
||||
15, // D11 is P0.15
|
||||
32, // D12 is P1.00
|
||||
7, // D13 is P0.07
|
||||
|
||||
// D14 .. D21 (aka A0 .. A5)
|
||||
4, // D14 is P0.04 (A0)
|
||||
30, // D15 is P0.30 (A1)
|
||||
5, // D16 is P0.05 (A2)
|
||||
2, // D17 is P0.02 (A3)
|
||||
28, // D18 is P0.28 (A4)
|
||||
3, // D19 is P0.03 (A5)
|
||||
|
||||
// D20 .. D21 (aka I2C pins)
|
||||
16, // D20 is P0.16 (SDA)
|
||||
24, // D21 is P0.24 (SCL)
|
||||
|
||||
// QSPI pins (not exposed via any header / test point)
|
||||
19, // D22 is P0.19 (QSPI CLK)
|
||||
17, // D23 is P0.17 (QSPI CS)
|
||||
20, // D24 is P0.20 (QSPI Data 0)
|
||||
21, // D25 is P0.21 (QSPI Data 1)
|
||||
22, // D26 is P0.22 (QSPI Data 2)
|
||||
26, // D27 is P0.23 (QSPI Data 3)
|
||||
|
||||
40, // D28 is P1.08 - IO34
|
||||
41, // D29 is P1.01 - IO35
|
||||
44, // D30 is P1.02 - IO36
|
||||
45, // D31 is P1.03 - IO37
|
||||
42, // D32 is P1.10 - IO38
|
||||
43, // D33 is P1.11 - IO39
|
||||
47, // D34 is P1.15 - IO40
|
||||
46, // D35 is P1.14 - IO41
|
||||
26, // D36 is P0.26 - IO42
|
||||
6, // D37 is P0.6 - IO43
|
||||
27, // D38 is P0.27 - IO44
|
||||
};
|
||||
|
||||
void initVariant()
|
||||
{
|
||||
// LED1 & LED2
|
||||
pinMode(PIN_LED1, OUTPUT);
|
||||
ledOff(PIN_LED1);
|
||||
|
||||
pinMode(PIN_LED2, OUTPUT);
|
||||
ledOff(PIN_LED2);
|
||||
}
|
||||
@@ -0,0 +1,149 @@
|
||||
/*
|
||||
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
|
||||
Copyright (c) 2016 Sandeep Mistry All right reserved.
|
||||
Copyright (c) 2018, Adafruit Industries (adafruit.com)
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Lesser General Public License for more details.
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
// Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip).
|
||||
// See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1)
|
||||
|
||||
#ifndef _VARIANT_NINA_B302_UBLOX_
|
||||
#define _VARIANT_NINA_B302_UBLOX_
|
||||
|
||||
/** Master clock frequency */
|
||||
#define VARIANT_MCK (64000000ul)
|
||||
|
||||
#define USE_LFXO // Board uses 32khz crystal for LF
|
||||
// define USE_LFRC // Board uses RC for LF
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Headers
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
#include "WVariant.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif // __cplusplus
|
||||
// Number of pins defined in PinDescription array
|
||||
#define PINS_COUNT (40)
|
||||
#define NUM_DIGITAL_PINS (34)
|
||||
#define NUM_ANALOG_INPUTS (6)
|
||||
#define NUM_ANALOG_OUTPUTS (0)
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED1 (3)
|
||||
#define PIN_LED2 (4)
|
||||
|
||||
#define LED_BUILTIN PIN_LED1
|
||||
#define LED_CONN PIN_LED2
|
||||
|
||||
#define LED_RED PIN_LED1
|
||||
#define LED_BLUE PIN_LED2
|
||||
|
||||
#define LED_STATE_ON 1 // State when LED is litted
|
||||
|
||||
/*
|
||||
* Buttons
|
||||
*/
|
||||
#define PIN_BUTTON1 (7)
|
||||
|
||||
/*
|
||||
* Analog pins
|
||||
*/
|
||||
#define PIN_A0 (14)
|
||||
#define PIN_A1 (15)
|
||||
#define PIN_A2 (16)
|
||||
#define PIN_A3 (17)
|
||||
#define PIN_A4 (18)
|
||||
#define PIN_A5 (19)
|
||||
|
||||
#define D0 (0)
|
||||
#define D1 (1)
|
||||
#define D2 (2)
|
||||
#define D3 (3)
|
||||
#define D4 (4)
|
||||
#define D5 (5)
|
||||
#define D6 (6)
|
||||
#define D7 (7)
|
||||
#define D8 (8)
|
||||
#define D9 (9)
|
||||
#define D10 (10)
|
||||
#define D11 (11)
|
||||
#define D12 (12)
|
||||
#define D13 (13)
|
||||
|
||||
static const uint8_t A0 = PIN_A0 ;
|
||||
static const uint8_t A1 = PIN_A1 ;
|
||||
static const uint8_t A2 = PIN_A2 ;
|
||||
static const uint8_t A3 = PIN_A3 ;
|
||||
static const uint8_t A4 = PIN_A4 ;
|
||||
static const uint8_t A5 = PIN_A5 ;
|
||||
|
||||
#define ADC_RESOLUTION 14
|
||||
|
||||
#define PIN_NFC1 (31)
|
||||
#define PIN_NFC2 (2)
|
||||
|
||||
/*
|
||||
* Serial interfaces
|
||||
*/
|
||||
#define PIN_SERIAL1_RX (1)
|
||||
#define PIN_SERIAL1_TX (0)
|
||||
|
||||
/*
|
||||
* SPI Interfaces
|
||||
*/
|
||||
#define SPI_INTERFACES_COUNT 1
|
||||
|
||||
#define PIN_SPI_MISO (22) //24 original
|
||||
#define PIN_SPI_MOSI (23) //25 original
|
||||
#define PIN_SPI_SCK (24) //26 original
|
||||
|
||||
static const uint8_t SS = (13);
|
||||
static const uint8_t MOSI = PIN_SPI_MOSI;
|
||||
static const uint8_t MISO = PIN_SPI_MISO;
|
||||
static const uint8_t SCK = PIN_SPI_SCK;
|
||||
|
||||
/*
|
||||
* Wire Interfaces
|
||||
*/
|
||||
#define WIRE_INTERFACES_COUNT 1
|
||||
|
||||
#define PIN_WIRE_SDA (20)
|
||||
#define PIN_WIRE_SCL (21)
|
||||
|
||||
// QSPI Pins
|
||||
#define PIN_QSPI_SCK 22
|
||||
#define PIN_QSPI_CS 23
|
||||
#define PIN_QSPI_IO0 24
|
||||
#define PIN_QSPI_IO1 25
|
||||
#define PIN_QSPI_IO2 26
|
||||
#define PIN_QSPI_IO3 27
|
||||
|
||||
// On-board QSPI Flash
|
||||
#define EXTERNAL_FLASH_DEVICES GD25Q16C
|
||||
#define EXTERNAL_FLASH_USE_QSPI
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Arduino objects - C++ only
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
#endif //_VARIANT_NINA_B302_UBLOX_
|
||||
@@ -0,0 +1,649 @@
|
||||
# Copyright (c) 2014-2015 Arduino LLC. All right reserved.
|
||||
# Copyright (c) 2016 Sandeep Mistry All right reserved.
|
||||
# Copyright (c) 2017 Adafruit Industries. All right reserved.
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
menu.softdevice=SoftDevice
|
||||
menu.debug=Debug
|
||||
|
||||
# ----------------------------------
|
||||
# Bluefruit Feather nRF52832
|
||||
# ----------------------------------
|
||||
feather52832.name=Adafruit Feather nRF52832
|
||||
feather52832.bootloader.tool=bootburn
|
||||
|
||||
# Upload
|
||||
feather52832.upload.tool=nrfutil
|
||||
feather52832.upload.protocol=nrfutil
|
||||
feather52832.upload.use_1200bps_touch=false
|
||||
feather52832.upload.wait_for_upload_port=false
|
||||
feather52832.upload.native_usb=false
|
||||
feather52832.upload.maximum_size=290816
|
||||
feather52832.upload.maximum_data_size=52224
|
||||
|
||||
# Build
|
||||
feather52832.build.mcu=cortex-m4
|
||||
feather52832.build.f_cpu=64000000
|
||||
feather52832.build.board=NRF52832_FEATHER
|
||||
feather52832.build.core=nRF5
|
||||
feather52832.build.variant=feather_nrf52832
|
||||
feather52832.build.usb_manufacturer="Adafruit LLC"
|
||||
feather52832.build.usb_product="Feather nRF52832"
|
||||
feather52832.build.extra_flags=-DNRF52832_XXAA -DNRF52
|
||||
feather52832.build.ldscript=nrf52832_s132_v6.ld
|
||||
|
||||
# SofDevice Menu
|
||||
feather52832.menu.softdevice.s132v6=S132 6.1.1
|
||||
feather52832.menu.softdevice.s132v6.build.sd_name=s132
|
||||
feather52832.menu.softdevice.s132v6.build.sd_version=6.1.1
|
||||
feather52832.menu.softdevice.s132v6.build.sd_fwid=0x00B7
|
||||
|
||||
# Debug Menu
|
||||
feather52832.menu.debug.l0=Level 0 (Release)
|
||||
feather52832.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
feather52832.menu.debug.l1=Level 1 (Error Message)
|
||||
feather52832.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
feather52832.menu.debug.l2=Level 2 (Full Debug)
|
||||
feather52832.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
feather52832.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
feather52832.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
feather52832.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
# ----------------------------------
|
||||
# Bluefruit Feather nRF52840 Express
|
||||
# ----------------------------------
|
||||
feather52840.name=Adafruit Feather nRF52840 Express
|
||||
|
||||
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
|
||||
feather52840.vid.0=0x239A
|
||||
feather52840.pid.0=0x8029
|
||||
feather52840.vid.1=0x239A
|
||||
feather52840.pid.1=0x0029
|
||||
feather52840.vid.2=0x239A
|
||||
feather52840.pid.2=0x002A
|
||||
feather52840.vid.3=0x239A
|
||||
feather52840.pid.3=0x802A
|
||||
|
||||
# Upload
|
||||
feather52840.bootloader.tool=bootburn
|
||||
feather52840.upload.tool=nrfutil
|
||||
feather52840.upload.protocol=nrfutil
|
||||
feather52840.upload.use_1200bps_touch=true
|
||||
feather52840.upload.wait_for_upload_port=true
|
||||
feather52840.upload.maximum_size=815104
|
||||
feather52840.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
feather52840.build.mcu=cortex-m4
|
||||
feather52840.build.f_cpu=64000000
|
||||
feather52840.build.board=NRF52840_FEATHER
|
||||
feather52840.build.core=nRF5
|
||||
feather52840.build.variant=feather_nrf52840_express
|
||||
feather52840.build.usb_manufacturer="Adafruit LLC"
|
||||
feather52840.build.usb_product="Feather nRF52840 Express"
|
||||
feather52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
|
||||
feather52840.build.ldscript=nrf52840_s140_v6.ld
|
||||
feather52840.build.vid=0x239A
|
||||
feather52840.build.pid=0x8029
|
||||
|
||||
# SofDevice Menu
|
||||
feather52840.menu.softdevice.s140v6=S140 6.1.1
|
||||
feather52840.menu.softdevice.s140v6.build.sd_name=s140
|
||||
feather52840.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
feather52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
feather52840.menu.debug.l0=Level 0 (Release)
|
||||
feather52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
feather52840.menu.debug.l1=Level 1 (Error Message)
|
||||
feather52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
feather52840.menu.debug.l2=Level 2 (Full Debug)
|
||||
feather52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
feather52840.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
feather52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
feather52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
|
||||
# ----------------------------------
|
||||
# Feather nRF52840 sense
|
||||
# ----------------------------------
|
||||
feather52840sense.name=Adafruit Feather nRF52840 Sense
|
||||
|
||||
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
|
||||
feather52840sense.vid.0=0x239A
|
||||
feather52840sense.pid.0=0x8087
|
||||
feather52840sense.vid.1=0x239A
|
||||
feather52840sense.pid.1=0x0087
|
||||
feather52840sense.vid.2=0x239A
|
||||
feather52840sense.pid.2=0x0088
|
||||
feather52840sense.vid.3=0x239A
|
||||
feather52840sense.pid.3=0x8088
|
||||
|
||||
# Upload
|
||||
feather52840sense.bootloader.tool=bootburn
|
||||
feather52840sense.upload.tool=nrfutil
|
||||
feather52840sense.upload.protocol=nrfutil
|
||||
feather52840sense.upload.use_1200bps_touch=true
|
||||
feather52840sense.upload.wait_for_upload_port=true
|
||||
feather52840sense.upload.maximum_size=815104
|
||||
feather52840sense.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
feather52840sense.build.mcu=cortex-m4
|
||||
feather52840sense.build.f_cpu=64000000
|
||||
feather52840sense.build.board=NRF52840_FEATHER_SENSE
|
||||
feather52840sense.build.core=nRF5
|
||||
feather52840sense.build.variant=feather_nrf52840_sense
|
||||
feather52840sense.build.usb_manufacturer="Adafruit LLC"
|
||||
feather52840sense.build.usb_product="Feather nRF52840 Sense"
|
||||
feather52840sense.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
|
||||
feather52840sense.build.ldscript=nrf52840_s140_v6.ld
|
||||
feather52840sense.build.vid=0x239A
|
||||
feather52840sense.build.pid=0x8087
|
||||
|
||||
# SofDevice Menu
|
||||
feather52840sense.menu.softdevice.s140v6=S140 6.1.1
|
||||
feather52840sense.menu.softdevice.s140v6.build.sd_name=s140
|
||||
feather52840sense.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
feather52840sense.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
feather52840sense.menu.debug.l0=Level 0 (Release)
|
||||
feather52840sense.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
feather52840sense.menu.debug.l1=Level 1 (Error Message)
|
||||
feather52840sense.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
feather52840sense.menu.debug.l2=Level 2 (Full Debug)
|
||||
feather52840sense.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
feather52840sense.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
feather52840sense.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
feather52840sense.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
|
||||
# ---------------------------------------------
|
||||
# Bluefruit ItsyBitsy nRF52840 Express
|
||||
# ---------------------------------------------
|
||||
itsybitsy52840.name=Adafruit ItsyBitsy nRF52840 Express
|
||||
|
||||
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
|
||||
itsybitsy52840.vid.0=0x239A
|
||||
itsybitsy52840.pid.0=0x8051
|
||||
itsybitsy52840.vid.1=0x239A
|
||||
itsybitsy52840.pid.1=0x0051
|
||||
itsybitsy52840.vid.2=0x239A
|
||||
itsybitsy52840.pid.2=0x0052
|
||||
itsybitsy52840.vid.3=0x239A
|
||||
itsybitsy52840.pid.3=0x8052
|
||||
|
||||
# Upload
|
||||
itsybitsy52840.bootloader.tool=bootburn
|
||||
itsybitsy52840.upload.tool=nrfutil
|
||||
itsybitsy52840.upload.protocol=nrfutil
|
||||
itsybitsy52840.upload.use_1200bps_touch=true
|
||||
itsybitsy52840.upload.wait_for_upload_port=true
|
||||
itsybitsy52840.upload.maximum_size=815104
|
||||
itsybitsy52840.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
itsybitsy52840.build.mcu=cortex-m4
|
||||
itsybitsy52840.build.f_cpu=64000000
|
||||
itsybitsy52840.build.board=NRF52840_ITSYBITSY
|
||||
itsybitsy52840.build.core=nRF5
|
||||
itsybitsy52840.build.variant=itsybitsy_nrf52840_express
|
||||
itsybitsy52840.build.usb_manufacturer="Adafruit LLC"
|
||||
itsybitsy52840.build.usb_product="ItsyBitsy nRF52840 Express"
|
||||
itsybitsy52840.build.extra_flags=-DNRF52840_XXAA -DARDUINO_NRF52_ITSYBITSY {build.flags.usb}
|
||||
itsybitsy52840.build.ldscript=nrf52840_s140_v6.ld
|
||||
itsybitsy52840.build.vid=0x239A
|
||||
itsybitsy52840.build.pid=0x8051
|
||||
|
||||
# SofDevice Menu
|
||||
itsybitsy52840.menu.softdevice.s140v6=0.2.11 SoftDevice s140 6.1.1
|
||||
itsybitsy52840.menu.softdevice.s140v6.build.sd_name=s140
|
||||
itsybitsy52840.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
itsybitsy52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
itsybitsy52840.menu.debug.l0=Level 0 (Release)
|
||||
itsybitsy52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
itsybitsy52840.menu.debug.l1=Level 1 (Error Message)
|
||||
itsybitsy52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
itsybitsy52840.menu.debug.l2=Level 2 (Full Debug)
|
||||
itsybitsy52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
itsybitsy52840.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
itsybitsy52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
itsybitsy52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
# ---------------------------------------------
|
||||
# Bluefruit Circuit Playground nRF52840 Express
|
||||
# ---------------------------------------------
|
||||
cplaynrf52840.name=Adafruit Circuit Playground Bluefruit
|
||||
|
||||
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
|
||||
cplaynrf52840.vid.0=0x239A
|
||||
cplaynrf52840.pid.0=0x8045
|
||||
cplaynrf52840.vid.1=0x239A
|
||||
cplaynrf52840.pid.1=0x0045
|
||||
cplaynrf52840.vid.2=0x239A
|
||||
cplaynrf52840.pid.2=0x0046
|
||||
cplaynrf52840.vid.3=0x239A
|
||||
cplaynrf52840.pid.3=0x8046
|
||||
|
||||
# Upload
|
||||
cplaynrf52840.bootloader.tool=bootburn
|
||||
cplaynrf52840.upload.tool=nrfutil
|
||||
cplaynrf52840.upload.protocol=nrfutil
|
||||
cplaynrf52840.upload.use_1200bps_touch=true
|
||||
cplaynrf52840.upload.wait_for_upload_port=true
|
||||
cplaynrf52840.upload.maximum_size=815104
|
||||
cplaynrf52840.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
cplaynrf52840.build.mcu=cortex-m4
|
||||
cplaynrf52840.build.f_cpu=64000000
|
||||
cplaynrf52840.build.board=NRF52840_CIRCUITPLAY
|
||||
cplaynrf52840.build.core=nRF5
|
||||
cplaynrf52840.build.variant=circuitplayground_nrf52840
|
||||
cplaynrf52840.build.usb_manufacturer="Adafruit LLC"
|
||||
cplaynrf52840.build.usb_product="Circuit Playground Bluefruit"
|
||||
cplaynrf52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
|
||||
cplaynrf52840.build.ldscript=nrf52840_s140_v6.ld
|
||||
cplaynrf52840.build.vid=0x239A
|
||||
cplaynrf52840.build.pid=0x8045
|
||||
|
||||
# SofDevice Menu
|
||||
cplaynrf52840.menu.softdevice.s140v6=S140 6.1.1
|
||||
cplaynrf52840.menu.softdevice.s140v6.build.sd_name=s140
|
||||
cplaynrf52840.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
cplaynrf52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
cplaynrf52840.menu.debug.l0=Level 0 (Release)
|
||||
cplaynrf52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
cplaynrf52840.menu.debug.l1=Level 1 (Error Message)
|
||||
cplaynrf52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
cplaynrf52840.menu.debug.l2=Level 2 (Full Debug)
|
||||
cplaynrf52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
cplaynrf52840.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
cplaynrf52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
cplaynrf52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
|
||||
# ---------------------------------------------
|
||||
# Clue nRF52840
|
||||
# ---------------------------------------------
|
||||
cluenrf52840.name=Adafruit CLUE
|
||||
|
||||
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
|
||||
cluenrf52840.vid.0=0x239A
|
||||
cluenrf52840.pid.0=0x8072
|
||||
cluenrf52840.vid.1=0x239A
|
||||
cluenrf52840.pid.1=0x0072
|
||||
cluenrf52840.vid.2=0x239A
|
||||
cluenrf52840.pid.2=0x0071
|
||||
cluenrf52840.vid.3=0x239A
|
||||
cluenrf52840.pid.3=0x8071
|
||||
|
||||
# Upload
|
||||
cluenrf52840.bootloader.tool=bootburn
|
||||
cluenrf52840.upload.tool=nrfutil
|
||||
cluenrf52840.upload.protocol=nrfutil
|
||||
cluenrf52840.upload.use_1200bps_touch=true
|
||||
cluenrf52840.upload.wait_for_upload_port=true
|
||||
cluenrf52840.upload.maximum_size=815104
|
||||
cluenrf52840.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
cluenrf52840.build.mcu=cortex-m4
|
||||
cluenrf52840.build.f_cpu=64000000
|
||||
cluenrf52840.build.board=NRF52840_CLUE
|
||||
cluenrf52840.build.core=nRF5
|
||||
cluenrf52840.build.variant=clue_nrf52840
|
||||
cluenrf52840.build.usb_manufacturer="Adafruit LLC"
|
||||
cluenrf52840.build.usb_product="CLUE"
|
||||
cluenrf52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
|
||||
cluenrf52840.build.ldscript=nrf52840_s140_v6.ld
|
||||
cluenrf52840.build.vid=0x239A
|
||||
cluenrf52840.build.pid=0x8071
|
||||
|
||||
# SofDevice Menu
|
||||
cluenrf52840.menu.softdevice.s140v6=S140 6.1.1
|
||||
cluenrf52840.menu.softdevice.s140v6.build.sd_name=s140
|
||||
cluenrf52840.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
cluenrf52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
cluenrf52840.menu.debug.l0=Level 0 (Release)
|
||||
cluenrf52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
cluenrf52840.menu.debug.l1=Level 1 (Error Message)
|
||||
cluenrf52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
cluenrf52840.menu.debug.l2=Level 2 (Full Debug)
|
||||
cluenrf52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
cluenrf52840.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
cluenrf52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
cluenrf52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
# ----------------------------------
|
||||
# Metro nRF52840 Express
|
||||
# ----------------------------------
|
||||
metro52840.name=Adafruit Metro nRF52840 Express
|
||||
|
||||
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
|
||||
metro52840.vid.0=0x239A
|
||||
metro52840.pid.0=0x803F
|
||||
metro52840.vid.1=0x239A
|
||||
metro52840.pid.1=0x003F
|
||||
metro52840.vid.2=0x239A
|
||||
metro52840.pid.2=0x0040
|
||||
metro52840.vid.3=0x239A
|
||||
metro52840.pid.3=0x8040
|
||||
|
||||
# Upload
|
||||
metro52840.bootloader.tool=bootburn
|
||||
metro52840.upload.tool=nrfutil
|
||||
metro52840.upload.protocol=nrfutil
|
||||
metro52840.upload.use_1200bps_touch=true
|
||||
metro52840.upload.wait_for_upload_port=true
|
||||
metro52840.upload.maximum_size=815104
|
||||
metro52840.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
metro52840.build.mcu=cortex-m4
|
||||
metro52840.build.f_cpu=64000000
|
||||
metro52840.build.board=NRF52840_METRO
|
||||
metro52840.build.core=nRF5
|
||||
metro52840.build.variant=metro_nrf52840_express
|
||||
metro52840.build.usb_manufacturer="Adafruit LLC"
|
||||
metro52840.build.usb_product="Metro nRF52840 Express"
|
||||
metro52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
|
||||
metro52840.build.ldscript=nrf52840_s140_v6.ld
|
||||
metro52840.build.vid=0x239A
|
||||
metro52840.build.pid=0x803F
|
||||
|
||||
# SofDevice Menu
|
||||
metro52840.menu.softdevice.s140v6=S140 6.1.1
|
||||
metro52840.menu.softdevice.s140v6.build.sd_name=s140
|
||||
metro52840.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
metro52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
metro52840.menu.debug.l0=Level 0 (Release)
|
||||
metro52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
metro52840.menu.debug.l1=Level 1 (Error Message)
|
||||
metro52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
metro52840.menu.debug.l2=Level 2 (Full Debug)
|
||||
metro52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
metro52840.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
metro52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
metro52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
|
||||
|
||||
|
||||
# -------------------------------------------------------
|
||||
#
|
||||
# Boards that aren't made by Adafruit
|
||||
#
|
||||
# -------------------------------------------------------
|
||||
|
||||
|
||||
# ----------------------------------
|
||||
# Nordic nRF52840DK (PCA10056)
|
||||
# ----------------------------------
|
||||
pca10056.name=Nordic nRF52840DK (PCA10056)
|
||||
pca10056.bootloader.tool=bootburn
|
||||
|
||||
# Upload
|
||||
pca10056.upload.tool=nrfutil
|
||||
pca10056.upload.protocol=nrfutil
|
||||
pca10056.upload.use_1200bps_touch=true
|
||||
pca10056.upload.wait_for_upload_port=true
|
||||
pca10056.upload.maximum_size=815104
|
||||
pca10056.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
pca10056.build.mcu=cortex-m4
|
||||
pca10056.build.f_cpu=64000000
|
||||
pca10056.build.board=NRF52840_PCA10056
|
||||
pca10056.build.core=nRF5
|
||||
pca10056.build.variant=pca10056
|
||||
pca10056.build.usb_manufacturer="Nordic"
|
||||
pca10056.build.usb_product="nRF52840 DK"
|
||||
pca10056.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
|
||||
pca10056.build.ldscript=nrf52840_s140_v6.ld
|
||||
pca10056.build.vid=0x239A
|
||||
pca10056.build.pid=0x8029
|
||||
|
||||
# SofDevice Menu
|
||||
pca10056.menu.softdevice.s140v6=S140 6.1.1
|
||||
pca10056.menu.softdevice.s140v6.build.sd_name=s140
|
||||
pca10056.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
pca10056.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
pca10056.menu.debug.l0=Level 0 (Release)
|
||||
pca10056.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
pca10056.menu.debug.l1=Level 1 (Error Message)
|
||||
pca10056.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
pca10056.menu.debug.l2=Level 2 (Full Debug)
|
||||
pca10056.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
pca10056.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
pca10056.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
pca10056.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
# ----------------------------------
|
||||
# Particle Xenon
|
||||
# ----------------------------------
|
||||
particle_xenon.name=Particle Xenon
|
||||
|
||||
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
|
||||
particle_xenon.vid.0=0x239A
|
||||
particle_xenon.pid.0=0x8029
|
||||
particle_xenon.vid.1=0x239A
|
||||
particle_xenon.pid.1=0x0029
|
||||
particle_xenon.vid.2=0x239A
|
||||
particle_xenon.pid.2=0x002A
|
||||
particle_xenon.vid.3=0x239A
|
||||
particle_xenon.pid.3=0x802A
|
||||
|
||||
# Upload
|
||||
particle_xenon.bootloader.tool=bootburn
|
||||
particle_xenon.upload.tool=nrfutil
|
||||
particle_xenon.upload.protocol=nrfutil
|
||||
particle_xenon.upload.use_1200bps_touch=true
|
||||
particle_xenon.upload.wait_for_upload_port=true
|
||||
particle_xenon.upload.maximum_size=815104
|
||||
particle_xenon.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
particle_xenon.build.mcu=cortex-m4
|
||||
particle_xenon.build.f_cpu=64000000
|
||||
particle_xenon.build.board=PARTICLE_XENON
|
||||
particle_xenon.build.core=nRF5
|
||||
particle_xenon.build.variant=particle_xenon
|
||||
particle_xenon.build.usb_manufacturer="Particle Industries"
|
||||
particle_xenon.build.usb_product="Particle Xenon"
|
||||
particle_xenon.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
|
||||
particle_xenon.build.ldscript=nrf52840_s140_v6.ld
|
||||
particle_xenon.build.vid=0x239A
|
||||
particle_xenon.build.pid=0x8029
|
||||
|
||||
# SofDevice Menu
|
||||
particle_xenon.menu.softdevice.s140v6=S140 6.1.1
|
||||
particle_xenon.menu.softdevice.s140v6.build.sd_name=s140
|
||||
particle_xenon.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
particle_xenon.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
particle_xenon.menu.debug.l0=Level 0 (Release)
|
||||
particle_xenon.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
particle_xenon.menu.debug.l1=Level 1 (Error Message)
|
||||
particle_xenon.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
particle_xenon.menu.debug.l2=Level 2 (Full Debug)
|
||||
particle_xenon.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
particle_xenon.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
particle_xenon.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
particle_xenon.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
# ----------------------------------
|
||||
# Raytac MDBT50Q - RX
|
||||
# ----------------------------------
|
||||
mdbt50qrx.name=Raytac MDBT50Q-RX Dongle
|
||||
|
||||
# VID/PID for bootloader, Arduino + Circuitpython App
|
||||
mdbt50qrx.vid.0=0x239A
|
||||
mdbt50qrx.pid.0=0x810B
|
||||
mdbt50qrx.vid.1=0x239A
|
||||
mdbt50qrx.pid.1=0x010B
|
||||
mdbt50qrx.vid.2=0x239A
|
||||
mdbt50qrx.pid.2=0x810C
|
||||
|
||||
# Upload
|
||||
mdbt50qrx.bootloader.tool=bootburn
|
||||
mdbt50qrx.upload.tool=nrfutil
|
||||
mdbt50qrx.upload.protocol=nrfutil
|
||||
mdbt50qrx.upload.use_1200bps_touch=true
|
||||
mdbt50qrx.upload.wait_for_upload_port=true
|
||||
mdbt50qrx.upload.maximum_size=815104
|
||||
mdbt50qrx.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
mdbt50qrx.build.mcu=cortex-m4
|
||||
mdbt50qrx.build.f_cpu=64000000
|
||||
mdbt50qrx.build.board=MDBT50Q_RX
|
||||
mdbt50qrx.build.core=nRF5
|
||||
mdbt50qrx.build.variant=raytac_mdbt50q_rx
|
||||
mdbt50qrx.build.usb_manufacturer="Raytac"
|
||||
mdbt50qrx.build.usb_product="nRF52840 Dongle"
|
||||
mdbt50qrx.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
|
||||
mdbt50qrx.build.ldscript=nrf52840_s140_v6.ld
|
||||
mdbt50qrx.build.vid=0x239A
|
||||
mdbt50qrx.build.pid=0x810B
|
||||
|
||||
# SofDevice Menu
|
||||
mdbt50qrx.menu.softdevice.s140v6=S140 6.1.1
|
||||
mdbt50qrx.menu.softdevice.s140v6.build.sd_name=s140
|
||||
mdbt50qrx.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
mdbt50qrx.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
mdbt50qrx.menu.debug.l0=Level 0 (Release)
|
||||
mdbt50qrx.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
mdbt50qrx.menu.debug.l1=Level 1 (Error Message)
|
||||
mdbt50qrx.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
mdbt50qrx.menu.debug.l2=Level 2 (Full Debug)
|
||||
mdbt50qrx.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
mdbt50qrx.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
mdbt50qrx.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
mdbt50qrx.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
|
||||
|
||||
# ----------------------------------
|
||||
# NINA B302
|
||||
# ----------------------------------
|
||||
ninab302.name=NINA B302 ublox
|
||||
|
||||
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
|
||||
ninab302.vid.0=0x239A
|
||||
ninab302.pid.0=0x8029
|
||||
ninab302.vid.1=0x239A
|
||||
ninab302.pid.1=0x0029
|
||||
ninab302.vid.2=0x7239A
|
||||
ninab302.pid.2=0x002A
|
||||
ninab302.vid.3=0x239A
|
||||
ninab302.pid.3=0x802A
|
||||
|
||||
# Upload
|
||||
ninab302.bootloader.tool=bootburn
|
||||
ninab302.upload.tool=nrfutil
|
||||
ninab302.upload.protocol=nrfutil
|
||||
ninab302.upload.use_1200bps_touch=true
|
||||
ninab302.upload.wait_for_upload_port=true
|
||||
ninab302.upload.maximum_size=815104
|
||||
ninab302.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
ninab302.build.mcu=cortex-m4
|
||||
ninab302.build.f_cpu=64000000
|
||||
ninab302.build.board=NINA_B302_ublox
|
||||
ninab302.build.core=nRF5
|
||||
ninab302.build.variant=NINA_B302_ublox
|
||||
ninab302.build.usb_manufacturer="Nordic"
|
||||
ninab302.build.usb_product="NINA B302 ublox"
|
||||
ninab302.build.extra_flags=-DNRF52840_XXAA -DNINA_B302_ublox {build.flags.usb}
|
||||
ninab302.build.ldscript=nrf52840_s140_v6.ld
|
||||
ninab302.build.vid=0x239A
|
||||
ninab302.build.pid=0x8029
|
||||
|
||||
# SofDevice Menu
|
||||
ninab302.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1
|
||||
ninab302.menu.softdevice.s140v6.build.sd_name=s140
|
||||
ninab302.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
ninab302.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
ninab302.menu.debug.l0=Level 0 (Release)
|
||||
ninab302.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
ninab302.menu.debug.l1=Level 1 (Error Message)
|
||||
ninab302.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
ninab302.menu.debug.l2=Level 2 (Full Debug)
|
||||
ninab302.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
ninab302.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
ninab302.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
ninab302.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
# ----------------------------------
|
||||
# NINA B112
|
||||
# ----------------------------------
|
||||
ninab112.name=NINA B112 ublox
|
||||
ninab112.bootloader.tool=bootburn
|
||||
|
||||
# Upload
|
||||
ninab112.upload.tool=nrfutil
|
||||
ninab112.upload.protocol=nrfutil
|
||||
ninab112.upload.use_1200bps_touch=false
|
||||
ninab112.upload.wait_for_upload_port=false
|
||||
ninab112.upload.native_usb=false
|
||||
ninab112.upload.maximum_size=290816
|
||||
ninab112.upload.maximum_data_size=52224
|
||||
|
||||
# Build
|
||||
ninab112.build.mcu=cortex-m4
|
||||
ninab112.build.f_cpu=64000000
|
||||
ninab112.build.board=NINA_B112_ublox
|
||||
ninab112.build.core=nRF5
|
||||
ninab112.build.variant=NINA_B112_ublox
|
||||
feather52840.build.usb_manufacturer="Adafruit LLC"
|
||||
feather52840.build.usb_product="Feather nRF52832"
|
||||
ninab112.build.extra_flags=-DNRF52832_XXAA -DNINA_B112_ublox -DNRF52
|
||||
ninab112.build.ldscript=nrf52832_s132_v6.ld
|
||||
|
||||
# SofDevice Menu
|
||||
ninab112.menu.softdevice.s132v6=0.3.2 SoftDevice s132 6.1.1
|
||||
ninab112.menu.softdevice.s132v6.build.sd_name=s132
|
||||
ninab112.menu.softdevice.s132v6.build.sd_version=6.1.1
|
||||
ninab112.menu.softdevice.s132v6.build.sd_fwid=0x00B7
|
||||
|
||||
# Debug Menu
|
||||
ninab112.menu.debug.l0=Level 0 (Release)
|
||||
ninab112.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
ninab112.menu.debug.l1=Level 1 (Error Message)
|
||||
ninab112.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
ninab112.menu.debug.l2=Level 2 (Full Debug)
|
||||
ninab112.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
ninab112.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
ninab112.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
ninab112.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
* Udp.cpp: Library to send/receive UDP packets.
|
||||
*
|
||||
* NOTE: UDP is fast, but has some important limitations (thanks to Warren Gray for mentioning these)
|
||||
* 1) UDP does not guarantee the order in which assembled UDP packets are received. This
|
||||
* might not happen often in practice, but in larger network topologies, a UDP
|
||||
* packet can be received out of sequence.
|
||||
* 2) UDP does not guard against lost packets - so packets *can* disappear without the sender being
|
||||
* aware of it. Again, this may not be a concern in practice on small local networks.
|
||||
* For more information, see http://www.cafeaulait.org/course/week12/35.html
|
||||
*
|
||||
* MIT License:
|
||||
* Copyright (c) 2008 Bjoern Hartmann
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
* bjoern@cs.stanford.edu 12/30/2008
|
||||
*/
|
||||
|
||||
#ifndef udp_h
|
||||
#define udp_h
|
||||
|
||||
#include <Stream.h>
|
||||
#include <IPAddress.h>
|
||||
|
||||
class UDP : public Stream {
|
||||
|
||||
public:
|
||||
virtual uint8_t begin(uint16_t) =0; // initialize, start listening on specified port. Returns 1 if successful, 0 if there are no sockets available to use
|
||||
|
||||
// KH, add virtual function to support Multicast, necessary for many services (MDNS, UPnP, etc.)
|
||||
virtual uint8_t beginMulticast(IPAddress, uint16_t) { return 0; } // initialize, start listening on specified multicast IP address and port. Returns 1 if successful, 0 on failure
|
||||
|
||||
virtual void stop() =0; // Finish with the UDP socket
|
||||
|
||||
// Sending UDP packets
|
||||
|
||||
// Start building up a packet to send to the remote host specific in ip and port
|
||||
// Returns 1 if successful, 0 if there was a problem with the supplied IP address or port
|
||||
virtual int beginPacket(IPAddress ip, uint16_t port) =0;
|
||||
// Start building up a packet to send to the remote host specific in host and port
|
||||
// Returns 1 if successful, 0 if there was a problem resolving the hostname or port
|
||||
virtual int beginPacket(const char *host, uint16_t port) =0;
|
||||
// Finish off this packet and send it
|
||||
// Returns 1 if the packet was sent successfully, 0 if there was an error
|
||||
virtual int endPacket() =0;
|
||||
// Write a single byte into the packet
|
||||
virtual size_t write(uint8_t) =0;
|
||||
// Write size bytes from buffer into the packet
|
||||
virtual size_t write(const uint8_t *buffer, size_t size) =0;
|
||||
|
||||
// Start processing the next available incoming packet
|
||||
// Returns the size of the packet in bytes, or 0 if no packets are available
|
||||
virtual int parsePacket() =0;
|
||||
// Number of bytes remaining in the current packet
|
||||
virtual int available() =0;
|
||||
// Read a single byte from the current packet
|
||||
virtual int read() =0;
|
||||
// Read up to len bytes from the current packet and place them into buffer
|
||||
// Returns the number of bytes read, or 0 if none are available
|
||||
virtual int read(unsigned char* buffer, size_t len) =0;
|
||||
// Read up to len characters from the current packet and place them into buffer
|
||||
// Returns the number of characters read, or 0 if none are available
|
||||
virtual int read(char* buffer, size_t len) =0;
|
||||
// Return the next byte from the current packet without moving on to the next byte
|
||||
virtual int peek() =0;
|
||||
virtual void flush() =0; // Finish reading the current packet
|
||||
|
||||
// Return the IP address of the host who sent the current incoming packet
|
||||
virtual IPAddress remoteIP() =0;
|
||||
// Return the port of the host who sent the current incoming packet
|
||||
virtual uint16_t remotePort() =0;
|
||||
protected:
|
||||
uint8_t* rawIPAddress(IPAddress& addr) { return addr.raw_address(); };
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,167 @@
|
||||
# Copyright (c) 2014-2015 Arduino LLC. All right reserved.
|
||||
# Copyright (c) 2016 Sandeep Mistry All right reserved.
|
||||
# Copyright (c) 2017 Adafruit Industries. All rights reserved.
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
name=Adafruit nRF52 Boards
|
||||
version=0.24.0
|
||||
|
||||
# Compile variables
|
||||
# -----------------
|
||||
|
||||
compiler.warning_flags=-w
|
||||
compiler.warning_flags.none=-w
|
||||
compiler.warning_flags.default=
|
||||
compiler.warning_flags.more=-Wall
|
||||
compiler.warning_flags.all=-Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-pointer-arith
|
||||
|
||||
# Allow changing optimization settings via platform.local.txt / boards.local.txt
|
||||
compiler.optimization_flag=-Ofast
|
||||
|
||||
compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/
|
||||
compiler.c.cmd=arm-none-eabi-gcc
|
||||
compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.warning_flags} {build.float_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD
|
||||
|
||||
# KH, Error here to use gcc, must use g++
|
||||
#compiler.c.elf.cmd=arm-none-eabi-gcc
|
||||
compiler.c.elf.cmd=arm-none-eabi-g++
|
||||
|
||||
compiler.c.elf.flags={compiler.optimization_flag} -Wl,--gc-sections -save-temps
|
||||
compiler.S.cmd=arm-none-eabi-gcc
|
||||
compiler.S.flags=-mcpu={build.mcu} -mthumb -mabi=aapcs {compiler.optimization_flag} -g -c {build.float_flags} -x assembler-with-cpp
|
||||
|
||||
compiler.cpp.cmd=arm-none-eabi-g++
|
||||
compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.warning_flags} {build.float_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD
|
||||
compiler.ar.cmd=arm-none-eabi-ar
|
||||
compiler.ar.flags=rcs
|
||||
compiler.objcopy.cmd=arm-none-eabi-objcopy
|
||||
compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0
|
||||
compiler.elf2bin.flags=-O binary
|
||||
compiler.elf2bin.cmd=arm-none-eabi-objcopy
|
||||
compiler.elf2hex.flags=-O ihex
|
||||
compiler.elf2hex.cmd=arm-none-eabi-objcopy
|
||||
compiler.ldflags=-mcpu={build.mcu} -mthumb {build.float_flags} -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align --specs=nano.specs --specs=nosys.specs
|
||||
compiler.size.cmd=arm-none-eabi-size
|
||||
|
||||
# this can be overriden in boards.txt
|
||||
build.float_flags=-mfloat-abi=hard -mfpu=fpv4-sp-d16 -u _printf_float
|
||||
build.debug_flags=-DCFG_DEBUG=0
|
||||
build.logger_flags=-DCFG_LOGGER=1
|
||||
build.sysview_flags=-DCFG_SYSVIEW=0
|
||||
|
||||
# USB flags
|
||||
build.flags.usb= -DUSBCON -DUSE_TINYUSB -DUSB_VID={build.vid} -DUSB_PID={build.pid} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}'
|
||||
|
||||
# These can be overridden in platform.local.txt
|
||||
compiler.c.extra_flags=
|
||||
compiler.c.elf.extra_flags=
|
||||
compiler.cpp.extra_flags=
|
||||
compiler.S.extra_flags=
|
||||
compiler.ar.extra_flags=
|
||||
compiler.libraries.ldflags=
|
||||
compiler.elf2bin.extra_flags=
|
||||
compiler.elf2hex.extra_flags=
|
||||
|
||||
compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-5.7.0.path}/CMSIS/Core/Include/" "-I{runtime.tools.CMSIS-5.7.0.path}/CMSIS/DSP/Include/"
|
||||
compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-5.7.0.path}/CMSIS/DSP/Lib/GCC/" -larm_cortexM4lf_math
|
||||
|
||||
# common compiler for nrf
|
||||
rtos.path={build.core.path}/freertos
|
||||
nordic.path={build.core.path}/nordic
|
||||
|
||||
# build.logger_flags and build.sysview_flags are intentionally empty,
|
||||
# to allow modification via a user's own boards.local.txt or platform.local.txt files.
|
||||
build.flags.nrf= -DSOFTDEVICE_PRESENT -DARDUINO_NRF52_ADAFRUIT -DNRF52_SERIES -DDX_CC_TEE -DLFS_NAME_MAX=64 {compiler.optimization_flag} {build.debug_flags} {build.logger_flags} {build.sysview_flags} {compiler.arm.cmsis.c.flags} "-I{nordic.path}" "-I{nordic.path}/nrfx" "-I{nordic.path}/nrfx/hal" "-I{nordic.path}/nrfx/mdk" "-I{nordic.path}/nrfx/soc" "-I{nordic.path}/nrfx/drivers/include" "-I{nordic.path}/nrfx/drivers/src" "-I{nordic.path}/softdevice/{build.sd_name}_nrf52_{build.sd_version}_API/include" "-I{nordic.path}/softdevice/{build.sd_name}_nrf52_{build.sd_version}_API/include/nrf52" "-I{rtos.path}/Source/include" "-I{rtos.path}/config" "-I{rtos.path}/portable/GCC/nrf52" "-I{rtos.path}/portable/CMSIS/nrf52" "-I{build.core.path}/sysview/SEGGER" "-I{build.core.path}/sysview/Config" "-I{runtime.platform.path}/libraries/Adafruit_TinyUSB_Arduino/src/arduino"
|
||||
|
||||
# Compile patterns
|
||||
# ----------------
|
||||
|
||||
## Compile c files
|
||||
## KH Add -DBOARD_NAME="{build.board}"
|
||||
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} '-DARDUINO_BSP_VERSION="{version}"' {compiler.c.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}"
|
||||
|
||||
## Compile c++ files
|
||||
## KH Add -DBOARD_NAME="{build.board}"
|
||||
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} '-DARDUINO_BSP_VERSION="{version}"' {compiler.cpp.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}"
|
||||
|
||||
## Compile S files
|
||||
## KH Add -DBOARD_NAME="{build.board}"
|
||||
recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}"
|
||||
|
||||
## Create archives
|
||||
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"
|
||||
|
||||
## Combine gc-sections, archives, and objects
|
||||
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-L{build.core.path}/linker" "-T{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} -Wl,--start-group {compiler.arm.cmsis.ldflags} -lm "{build.path}/{archive_file}" {compiler.libraries.ldflags} -Wl,--end-group
|
||||
|
||||
## Create output (bin file)
|
||||
#recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2bin.cmd}" {compiler.elf2bin.flags} {compiler.elf2bin.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin"
|
||||
|
||||
## Create output (hex file)
|
||||
recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex"
|
||||
|
||||
## Create dfu package zip file
|
||||
recipe.objcopy.zip.pattern="{tools.nrfutil.cmd}" dfu genpkg --dev-type 0x0052 --sd-req {build.sd_fwid} --application "{build.path}/{build.project_name}.hex" "{build.path}/{build.project_name}.zip"
|
||||
|
||||
## Create uf2 file
|
||||
#recipe.objcopy.uf2.pattern=python "{runtime.platform.path}/tools/uf2conv/uf2conv.py" -f 0xADA52840 -c -o "{build.path}/{build.project_name}.uf2" "{build.path}/{build.project_name}.hex"
|
||||
|
||||
## Save bin
|
||||
recipe.output.tmp_file_bin={build.project_name}.bin
|
||||
recipe.output.save_file_bin={build.project_name}.save.bin
|
||||
|
||||
## Save hex
|
||||
recipe.output.tmp_file_hex={build.project_name}.hex
|
||||
recipe.output.save_file_hexu={build.project_name}.save.hex
|
||||
|
||||
## Compute size
|
||||
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
|
||||
recipe.size.regex=^(?:\.text|\.data|)\s+([0-9]+).*
|
||||
recipe.size.regex.data=^(?:\.data|\.bss)\s+([0-9]+).*
|
||||
|
||||
## Export Compiled Binary
|
||||
recipe.output.tmp_file={build.project_name}.hex
|
||||
recipe.output.save_file={build.project_name}.{build.variant}.hex
|
||||
|
||||
#***************************************************
|
||||
# adafruit-nrfutil for uploading
|
||||
# https://github.com/adafruit/Adafruit_nRF52_nrfutil
|
||||
# pre-built binaries are provided for macos and windows
|
||||
#***************************************************
|
||||
tools.nrfutil.cmd=adafruit-nrfutil
|
||||
tools.nrfutil.cmd.windows={runtime.platform.path}/tools/adafruit-nrfutil/win32/adafruit-nrfutil.exe
|
||||
tools.nrfutil.cmd.macosx={runtime.platform.path}/tools/adafruit-nrfutil/macos/adafruit-nrfutil
|
||||
|
||||
tools.nrfutil.upload.params.verbose=--verbose
|
||||
tools.nrfutil.upload.params.quiet=
|
||||
tools.nrfutil.upload.pattern="{cmd}" {upload.verbose} dfu serial -pkg "{build.path}/{build.project_name}.zip" -p {serial.port} -b 115200 --singlebank
|
||||
|
||||
#***************************************************
|
||||
# Burning bootloader with either jlink or nrfutil
|
||||
#***************************************************
|
||||
|
||||
# Bootloader version
|
||||
tools.bootburn.bootloader.file={runtime.platform.path}/bootloader/{build.variant}/{build.variant}_bootloader-0.6.0_{build.sd_name}_{build.sd_version}
|
||||
|
||||
tools.bootburn.bootloader.params.verbose=
|
||||
tools.bootburn.bootloader.params.quiet=
|
||||
tools.bootburn.bootloader.pattern={program.burn_pattern}
|
||||
|
||||
# erase flash page while programming
|
||||
tools.bootburn.erase.params.verbose=
|
||||
tools.bootburn.erase.params.quiet=
|
||||
tools.bootburn.erase.pattern=
|
||||
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Lesser General Public License for more details.
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
// API compatibility
|
||||
#include "variant.h"
|
||||
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
|
||||
Copyright (c) 2016 Sandeep Mistry All right reserved.
|
||||
Copyright (c) 2018, Adafruit Industries (adafruit.com)
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
// Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip).
|
||||
// See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1)
|
||||
|
||||
#include "variant.h"
|
||||
#include "wiring_constants.h"
|
||||
#include "wiring_digital.h"
|
||||
#include "nrf.h"
|
||||
|
||||
const uint32_t g_ADigitalPinMap[] = {
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
6,
|
||||
7,
|
||||
8,
|
||||
9,
|
||||
10,
|
||||
11,
|
||||
12,
|
||||
13,
|
||||
14,
|
||||
15,
|
||||
16,
|
||||
17,
|
||||
18,
|
||||
19,
|
||||
20,
|
||||
21,
|
||||
22,
|
||||
23,
|
||||
24,
|
||||
25,
|
||||
26,
|
||||
27,
|
||||
28,
|
||||
29,
|
||||
30,
|
||||
31
|
||||
};
|
||||
|
||||
@@ -0,0 +1,173 @@
|
||||
/*
|
||||
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
|
||||
Copyright (c) 2016 Sandeep Mistry All right reserved.
|
||||
Copyright (c) 2018, Adafruit Industries (adafruit.com)
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Lesser General Public License for more details.
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef _VARIANT_NINA_B112_UBLOX_
|
||||
#define _VARIANT_NINA_B112_UBLOX_
|
||||
|
||||
#define NRF_CLOCK_LFCLKSRC {.source = NRF_CLOCK_LF_SRC_XTAL, \
|
||||
.rc_ctiv = 0, \
|
||||
.rc_temp_ctiv = 0, \
|
||||
.xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM}
|
||||
|
||||
/** Master clock frequency */
|
||||
#define VARIANT_MCK (64000000ul)
|
||||
|
||||
#define USE_LFXO // Board uses 32khz crystal for LF
|
||||
// define USE_LFRC // Board uses RC for LF
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Headers
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
#include "WVariant.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif // __cplusplus
|
||||
|
||||
// Number of pins defined in PinDescription array
|
||||
#define PINS_COUNT (32u)
|
||||
#define NUM_DIGITAL_PINS (32u)
|
||||
#define NUM_ANALOG_INPUTS (6u)
|
||||
#define NUM_ANALOG_OUTPUTS (0u)
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED LED1
|
||||
#define LED_BUILTIN PIN_LED
|
||||
|
||||
//LEDs onboard
|
||||
#define LED1 (8) // Red
|
||||
#define LED2 (16) // Green/SW1
|
||||
#define LED3 (18) // Blue
|
||||
|
||||
#define LED_STATE_ON 1 // State when LED is litted
|
||||
|
||||
//Switch
|
||||
|
||||
#define SW1 (16)
|
||||
#define SW2 (30)
|
||||
|
||||
// NFC
|
||||
#define PIN_NFC_1 (9) // P0.9
|
||||
#define PIN_NFC_2 (10) // P0.10
|
||||
|
||||
/*
|
||||
* Analog pins
|
||||
*/
|
||||
#define PIN_A0 (3) // P0.03
|
||||
#define PIN_A1 (2) // P0.02
|
||||
#define PIN_A2 (4) // P0.04
|
||||
#define PIN_A3 (30) // P0.30
|
||||
#define PIN_A4 (29) // P0.29
|
||||
#define PIN_A5 (28) // P0.28
|
||||
|
||||
static const uint8_t A0 = PIN_A0 ;
|
||||
static const uint8_t A1 = PIN_A1 ;
|
||||
static const uint8_t A2 = PIN_A2 ;
|
||||
static const uint8_t A3 = PIN_A3 ;
|
||||
static const uint8_t A4 = PIN_A4 ;
|
||||
static const uint8_t A5 = PIN_A5 ;
|
||||
|
||||
#define ADC_RESOLUTION 14
|
||||
|
||||
#define PIN_D0 (5) // P0.05
|
||||
#define PIN_D1 (6) // P0.06
|
||||
#define PIN_D2 (7) // P0.07
|
||||
#define PIN_D3 (31) // P0.31
|
||||
#define PIN_D4 (18) // P0.18
|
||||
#define PIN_D6 (9) // P0.09
|
||||
#define PIN_D7 (10) // P0.10
|
||||
#define PIN_D9 (8) // P0.8
|
||||
#define PIN_D10 (11) // P0.11
|
||||
#define PIN_D11 (13) // P0.13
|
||||
#define PIN_D12 (12) // P0.12
|
||||
#define PIN_D13 (14) // P0.14
|
||||
#define PIN_D14 (2) // P0.02
|
||||
#define PIN_D15 (3) // P0.03
|
||||
|
||||
static const uint8_t D0 = PIN_D0 ;
|
||||
static const uint8_t D1 = PIN_D1 ;
|
||||
static const uint8_t D2 = PIN_D2 ;
|
||||
static const uint8_t D3 = PIN_D3 ;
|
||||
static const uint8_t D4 = PIN_D4 ;
|
||||
static const uint8_t D6 = PIN_D6 ;
|
||||
static const uint8_t D7 = PIN_D7 ;
|
||||
static const uint8_t D9 = PIN_D9 ;
|
||||
static const uint8_t D10 = PIN_D10 ;
|
||||
static const uint8_t D11 = PIN_D11 ;
|
||||
static const uint8_t D12 = PIN_D12 ;
|
||||
static const uint8_t D13 = PIN_D13 ;
|
||||
static const uint8_t D14 = PIN_D14 ;
|
||||
static const uint8_t D15 = PIN_D15 ;
|
||||
|
||||
// Other pins
|
||||
//static const uint8_t AREF = PIN_AREF;
|
||||
|
||||
//#define PIN_AREF (24)
|
||||
//#define PIN_VBAT PIN_A7
|
||||
|
||||
/*
|
||||
* Serial interfaces
|
||||
*/
|
||||
//#define PIN_SERIAL_RX (8) //used for original Adafruit Bootloader
|
||||
//#define PIN_SERIAL_TX (6) //used for original Adafruit Bootloader
|
||||
|
||||
#define PIN_SERIAL_RX (5) // P0.05
|
||||
#define PIN_SERIAL_TX (6) // P0.06
|
||||
#define PIN_SERIAL_CTS (7) // P0.07
|
||||
#define PIN_SERIAL_RTS (31) // P0.31
|
||||
#define PIN_SERIAL_DTR (28) // P0.28
|
||||
#define PIN_SERIAL_DSR (29) // P0.29
|
||||
|
||||
/*
|
||||
* SPI Interfaces
|
||||
*/
|
||||
#define SPI_INTERFACES_COUNT 1
|
||||
|
||||
#define PIN_SPI_MISO (12) // P0.12
|
||||
#define PIN_SPI_MOSI (13) // P0.13
|
||||
#define PIN_SPI_SCK (14) // P0.14
|
||||
|
||||
static const uint8_t SS = 11 ; // P0.11
|
||||
static const uint8_t MOSI = PIN_SPI_MOSI ;
|
||||
static const uint8_t MISO = PIN_SPI_MISO ;
|
||||
static const uint8_t SCK = PIN_SPI_SCK ;
|
||||
|
||||
/*
|
||||
* Wire Interfaces
|
||||
*/
|
||||
#define WIRE_INTERFACES_COUNT 1
|
||||
|
||||
#define PIN_WIRE_SDA (2) // P0.02
|
||||
#define PIN_WIRE_SCL (3) // P0.03
|
||||
|
||||
static const uint8_t SDA = PIN_WIRE_SDA;
|
||||
static const uint8_t SCL = PIN_WIRE_SCL;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Arduino objects - C++ only
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
#endif //_VARIANT_NINA_B112_UBLOX_
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Lesser General Public License for more details.
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
// API compatibility
|
||||
#include "variant.h"
|
||||
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
|
||||
Copyright (c) 2016 Sandeep Mistry All right reserved.
|
||||
Copyright (c) 2018, Adafruit Industries (adafruit.com)
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
// Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip).
|
||||
// See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1)
|
||||
|
||||
#include "variant.h"
|
||||
#include "wiring_constants.h"
|
||||
#include "wiring_digital.h"
|
||||
#include "nrf.h"
|
||||
|
||||
const uint32_t g_ADigitalPinMap[] =
|
||||
{
|
||||
// D0 .. D13
|
||||
29, // D0 is P0.29 (UART TX)
|
||||
45, // D1 is P1.13 (UART RX
|
||||
44, // D2 is P1.12 (NFC2)
|
||||
31, // D3 is P0.31 (LED1)
|
||||
13, // D4 is P0.13 (LED2)
|
||||
11, // D5 is P0.11
|
||||
9, // D6 is P0.09
|
||||
10, // D7 is P0.10 (Button)
|
||||
41, // D8 is P1.09
|
||||
12, // D9 is P0.12
|
||||
14, // D10 is P0.14
|
||||
15, // D11 is P0.15
|
||||
32, // D12 is P1.00
|
||||
7, // D13 is P0.07
|
||||
|
||||
// D14 .. D21 (aka A0 .. A5)
|
||||
4, // D14 is P0.04 (A0)
|
||||
30, // D15 is P0.30 (A1)
|
||||
5, // D16 is P0.05 (A2)
|
||||
2, // D17 is P0.02 (A3)
|
||||
28, // D18 is P0.28 (A4)
|
||||
3, // D19 is P0.03 (A5)
|
||||
|
||||
// D20 .. D21 (aka I2C pins)
|
||||
16, // D20 is P0.16 (SDA)
|
||||
24, // D21 is P0.24 (SCL)
|
||||
|
||||
// QSPI pins (not exposed via any header / test point)
|
||||
19, // D22 is P0.19 (QSPI CLK)
|
||||
17, // D23 is P0.17 (QSPI CS)
|
||||
20, // D24 is P0.20 (QSPI Data 0)
|
||||
21, // D25 is P0.21 (QSPI Data 1)
|
||||
22, // D26 is P0.22 (QSPI Data 2)
|
||||
26, // D27 is P0.23 (QSPI Data 3)
|
||||
|
||||
40, // D28 is P1.08 - IO34
|
||||
41, // D29 is P1.01 - IO35
|
||||
44, // D30 is P1.02 - IO36
|
||||
45, // D31 is P1.03 - IO37
|
||||
42, // D32 is P1.10 - IO38
|
||||
43, // D33 is P1.11 - IO39
|
||||
47, // D34 is P1.15 - IO40
|
||||
46, // D35 is P1.14 - IO41
|
||||
26, // D36 is P0.26 - IO42
|
||||
6, // D37 is P0.6 - IO43
|
||||
27, // D38 is P0.27 - IO44
|
||||
};
|
||||
|
||||
void initVariant()
|
||||
{
|
||||
// LED1 & LED2
|
||||
pinMode(PIN_LED1, OUTPUT);
|
||||
ledOff(PIN_LED1);
|
||||
|
||||
pinMode(PIN_LED2, OUTPUT);
|
||||
ledOff(PIN_LED2);
|
||||
}
|
||||
@@ -0,0 +1,149 @@
|
||||
/*
|
||||
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
|
||||
Copyright (c) 2016 Sandeep Mistry All right reserved.
|
||||
Copyright (c) 2018, Adafruit Industries (adafruit.com)
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Lesser General Public License for more details.
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
// Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip).
|
||||
// See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1)
|
||||
|
||||
#ifndef _VARIANT_NINA_B302_UBLOX_
|
||||
#define _VARIANT_NINA_B302_UBLOX_
|
||||
|
||||
/** Master clock frequency */
|
||||
#define VARIANT_MCK (64000000ul)
|
||||
|
||||
#define USE_LFXO // Board uses 32khz crystal for LF
|
||||
// define USE_LFRC // Board uses RC for LF
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Headers
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
#include "WVariant.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif // __cplusplus
|
||||
// Number of pins defined in PinDescription array
|
||||
#define PINS_COUNT (40)
|
||||
#define NUM_DIGITAL_PINS (34)
|
||||
#define NUM_ANALOG_INPUTS (6)
|
||||
#define NUM_ANALOG_OUTPUTS (0)
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED1 (3)
|
||||
#define PIN_LED2 (4)
|
||||
|
||||
#define LED_BUILTIN PIN_LED1
|
||||
#define LED_CONN PIN_LED2
|
||||
|
||||
#define LED_RED PIN_LED1
|
||||
#define LED_BLUE PIN_LED2
|
||||
|
||||
#define LED_STATE_ON 1 // State when LED is litted
|
||||
|
||||
/*
|
||||
* Buttons
|
||||
*/
|
||||
#define PIN_BUTTON1 (7)
|
||||
|
||||
/*
|
||||
* Analog pins
|
||||
*/
|
||||
#define PIN_A0 (14)
|
||||
#define PIN_A1 (15)
|
||||
#define PIN_A2 (16)
|
||||
#define PIN_A3 (17)
|
||||
#define PIN_A4 (18)
|
||||
#define PIN_A5 (19)
|
||||
|
||||
#define D0 (0)
|
||||
#define D1 (1)
|
||||
#define D2 (2)
|
||||
#define D3 (3)
|
||||
#define D4 (4)
|
||||
#define D5 (5)
|
||||
#define D6 (6)
|
||||
#define D7 (7)
|
||||
#define D8 (8)
|
||||
#define D9 (9)
|
||||
#define D10 (10)
|
||||
#define D11 (11)
|
||||
#define D12 (12)
|
||||
#define D13 (13)
|
||||
|
||||
static const uint8_t A0 = PIN_A0 ;
|
||||
static const uint8_t A1 = PIN_A1 ;
|
||||
static const uint8_t A2 = PIN_A2 ;
|
||||
static const uint8_t A3 = PIN_A3 ;
|
||||
static const uint8_t A4 = PIN_A4 ;
|
||||
static const uint8_t A5 = PIN_A5 ;
|
||||
|
||||
#define ADC_RESOLUTION 14
|
||||
|
||||
#define PIN_NFC1 (31)
|
||||
#define PIN_NFC2 (2)
|
||||
|
||||
/*
|
||||
* Serial interfaces
|
||||
*/
|
||||
#define PIN_SERIAL1_RX (1)
|
||||
#define PIN_SERIAL1_TX (0)
|
||||
|
||||
/*
|
||||
* SPI Interfaces
|
||||
*/
|
||||
#define SPI_INTERFACES_COUNT 1
|
||||
|
||||
#define PIN_SPI_MISO (22) //24 original
|
||||
#define PIN_SPI_MOSI (23) //25 original
|
||||
#define PIN_SPI_SCK (24) //26 original
|
||||
|
||||
static const uint8_t SS = (13);
|
||||
static const uint8_t MOSI = PIN_SPI_MOSI;
|
||||
static const uint8_t MISO = PIN_SPI_MISO;
|
||||
static const uint8_t SCK = PIN_SPI_SCK;
|
||||
|
||||
/*
|
||||
* Wire Interfaces
|
||||
*/
|
||||
#define WIRE_INTERFACES_COUNT 1
|
||||
|
||||
#define PIN_WIRE_SDA (20)
|
||||
#define PIN_WIRE_SCL (21)
|
||||
|
||||
// QSPI Pins
|
||||
#define PIN_QSPI_SCK 22
|
||||
#define PIN_QSPI_CS 23
|
||||
#define PIN_QSPI_IO0 24
|
||||
#define PIN_QSPI_IO1 25
|
||||
#define PIN_QSPI_IO2 26
|
||||
#define PIN_QSPI_IO3 27
|
||||
|
||||
// On-board QSPI Flash
|
||||
#define EXTERNAL_FLASH_DEVICES GD25Q16C
|
||||
#define EXTERNAL_FLASH_USE_QSPI
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Arduino objects - C++ only
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
#endif //_VARIANT_NINA_B302_UBLOX_
|
||||
@@ -0,0 +1,647 @@
|
||||
# Copyright (c) 2014-2015 Arduino LLC. All right reserved.
|
||||
# Copyright (c) 2016 Sandeep Mistry All right reserved.
|
||||
# Copyright (c) 2017 Adafruit Industries. All right reserved.
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
menu.softdevice=SoftDevice
|
||||
menu.debug=Debug
|
||||
|
||||
# ----------------------------------
|
||||
# Bluefruit Feather nRF52832
|
||||
# ----------------------------------
|
||||
feather52832.name=Adafruit Feather nRF52832
|
||||
feather52832.bootloader.tool=bootburn
|
||||
|
||||
# Upload
|
||||
feather52832.upload.tool=nrfutil
|
||||
feather52832.upload.protocol=nrfutil
|
||||
feather52832.upload.use_1200bps_touch=false
|
||||
feather52832.upload.wait_for_upload_port=false
|
||||
feather52832.upload.native_usb=false
|
||||
feather52832.upload.maximum_size=290816
|
||||
feather52832.upload.maximum_data_size=52224
|
||||
|
||||
# Build
|
||||
feather52832.build.mcu=cortex-m4
|
||||
feather52832.build.f_cpu=64000000
|
||||
feather52832.build.board=NRF52832_FEATHER
|
||||
feather52832.build.core=nRF5
|
||||
feather52832.build.variant=feather_nrf52832
|
||||
feather52832.build.usb_manufacturer="Adafruit LLC"
|
||||
feather52832.build.usb_product="Feather nRF52832"
|
||||
feather52832.build.extra_flags=-DNRF52832_XXAA -DNRF52
|
||||
feather52832.build.ldscript=nrf52832_s132_v6.ld
|
||||
|
||||
# SofDevice Menu
|
||||
feather52832.menu.softdevice.s132v6=S132 6.1.1
|
||||
feather52832.menu.softdevice.s132v6.build.sd_name=s132
|
||||
feather52832.menu.softdevice.s132v6.build.sd_version=6.1.1
|
||||
feather52832.menu.softdevice.s132v6.build.sd_fwid=0x00B7
|
||||
|
||||
# Debug Menu
|
||||
feather52832.menu.debug.l0=Level 0 (Release)
|
||||
feather52832.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
feather52832.menu.debug.l1=Level 1 (Error Message)
|
||||
feather52832.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
feather52832.menu.debug.l2=Level 2 (Full Debug)
|
||||
feather52832.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
feather52832.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
feather52832.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
feather52832.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
# ----------------------------------
|
||||
# Bluefruit Feather nRF52840 Express
|
||||
# ----------------------------------
|
||||
feather52840.name=Adafruit Feather nRF52840 Express
|
||||
|
||||
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
|
||||
feather52840.vid.0=0x239A
|
||||
feather52840.pid.0=0x8029
|
||||
feather52840.vid.1=0x239A
|
||||
feather52840.pid.1=0x0029
|
||||
feather52840.vid.2=0x239A
|
||||
feather52840.pid.2=0x002A
|
||||
feather52840.vid.3=0x239A
|
||||
feather52840.pid.3=0x802A
|
||||
|
||||
# Upload
|
||||
feather52840.bootloader.tool=bootburn
|
||||
feather52840.upload.tool=nrfutil
|
||||
feather52840.upload.protocol=nrfutil
|
||||
feather52840.upload.use_1200bps_touch=true
|
||||
feather52840.upload.wait_for_upload_port=true
|
||||
feather52840.upload.maximum_size=815104
|
||||
feather52840.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
feather52840.build.mcu=cortex-m4
|
||||
feather52840.build.f_cpu=64000000
|
||||
feather52840.build.board=NRF52840_FEATHER
|
||||
feather52840.build.core=nRF5
|
||||
feather52840.build.variant=feather_nrf52840_express
|
||||
feather52840.build.usb_manufacturer="Adafruit LLC"
|
||||
feather52840.build.usb_product="Feather nRF52840 Express"
|
||||
feather52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
|
||||
feather52840.build.ldscript=nrf52840_s140_v6.ld
|
||||
feather52840.build.vid=0x239A
|
||||
feather52840.build.pid=0x8029
|
||||
|
||||
# SofDevice Menu
|
||||
feather52840.menu.softdevice.s140v6=S140 6.1.1
|
||||
feather52840.menu.softdevice.s140v6.build.sd_name=s140
|
||||
feather52840.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
feather52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
feather52840.menu.debug.l0=Level 0 (Release)
|
||||
feather52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
feather52840.menu.debug.l1=Level 1 (Error Message)
|
||||
feather52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
feather52840.menu.debug.l2=Level 2 (Full Debug)
|
||||
feather52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
feather52840.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
feather52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
feather52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
|
||||
# ----------------------------------
|
||||
# Feather nRF52840 sense
|
||||
# ----------------------------------
|
||||
feather52840sense.name=Adafruit Feather nRF52840 Sense
|
||||
|
||||
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
|
||||
feather52840sense.vid.0=0x239A
|
||||
feather52840sense.pid.0=0x8087
|
||||
feather52840sense.vid.1=0x239A
|
||||
feather52840sense.pid.1=0x0087
|
||||
feather52840sense.vid.2=0x239A
|
||||
feather52840sense.pid.2=0x0088
|
||||
feather52840sense.vid.3=0x239A
|
||||
feather52840sense.pid.3=0x8088
|
||||
|
||||
# Upload
|
||||
feather52840sense.bootloader.tool=bootburn
|
||||
feather52840sense.upload.tool=nrfutil
|
||||
feather52840sense.upload.protocol=nrfutil
|
||||
feather52840sense.upload.use_1200bps_touch=true
|
||||
feather52840sense.upload.wait_for_upload_port=true
|
||||
feather52840sense.upload.maximum_size=815104
|
||||
feather52840sense.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
feather52840sense.build.mcu=cortex-m4
|
||||
feather52840sense.build.f_cpu=64000000
|
||||
feather52840sense.build.board=NRF52840_FEATHER_SENSE
|
||||
feather52840sense.build.core=nRF5
|
||||
feather52840sense.build.variant=feather_nrf52840_sense
|
||||
feather52840sense.build.usb_manufacturer="Adafruit LLC"
|
||||
feather52840sense.build.usb_product="Feather nRF52840 Sense"
|
||||
feather52840sense.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
|
||||
feather52840sense.build.ldscript=nrf52840_s140_v6.ld
|
||||
feather52840sense.build.vid=0x239A
|
||||
feather52840sense.build.pid=0x8087
|
||||
|
||||
# SofDevice Menu
|
||||
feather52840sense.menu.softdevice.s140v6=S140 6.1.1
|
||||
feather52840sense.menu.softdevice.s140v6.build.sd_name=s140
|
||||
feather52840sense.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
feather52840sense.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
feather52840sense.menu.debug.l0=Level 0 (Release)
|
||||
feather52840sense.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
feather52840sense.menu.debug.l1=Level 1 (Error Message)
|
||||
feather52840sense.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
feather52840sense.menu.debug.l2=Level 2 (Full Debug)
|
||||
feather52840sense.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
feather52840sense.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
feather52840sense.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
feather52840sense.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
|
||||
# ---------------------------------------------
|
||||
# Bluefruit ItsyBitsy nRF52840 Express
|
||||
# ---------------------------------------------
|
||||
itsybitsy52840.name=Adafruit ItsyBitsy nRF52840 Express
|
||||
|
||||
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
|
||||
itsybitsy52840.vid.0=0x239A
|
||||
itsybitsy52840.pid.0=0x8051
|
||||
itsybitsy52840.vid.1=0x239A
|
||||
itsybitsy52840.pid.1=0x0051
|
||||
itsybitsy52840.vid.2=0x239A
|
||||
itsybitsy52840.pid.2=0x0052
|
||||
itsybitsy52840.vid.3=0x239A
|
||||
itsybitsy52840.pid.3=0x8052
|
||||
|
||||
# Upload
|
||||
itsybitsy52840.bootloader.tool=bootburn
|
||||
itsybitsy52840.upload.tool=nrfutil
|
||||
itsybitsy52840.upload.protocol=nrfutil
|
||||
itsybitsy52840.upload.use_1200bps_touch=true
|
||||
itsybitsy52840.upload.wait_for_upload_port=true
|
||||
itsybitsy52840.upload.maximum_size=815104
|
||||
itsybitsy52840.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
itsybitsy52840.build.mcu=cortex-m4
|
||||
itsybitsy52840.build.f_cpu=64000000
|
||||
itsybitsy52840.build.board=NRF52840_ITSYBITSY
|
||||
itsybitsy52840.build.core=nRF5
|
||||
itsybitsy52840.build.variant=itsybitsy_nrf52840_express
|
||||
itsybitsy52840.build.usb_manufacturer="Adafruit LLC"
|
||||
itsybitsy52840.build.usb_product="ItsyBitsy nRF52840 Express"
|
||||
itsybitsy52840.build.extra_flags=-DNRF52840_XXAA -DARDUINO_NRF52_ITSYBITSY {build.flags.usb}
|
||||
itsybitsy52840.build.ldscript=nrf52840_s140_v6.ld
|
||||
itsybitsy52840.build.vid=0x239A
|
||||
itsybitsy52840.build.pid=0x8051
|
||||
|
||||
# SofDevice Menu
|
||||
itsybitsy52840.menu.softdevice.s140v6=0.2.11 SoftDevice s140 6.1.1
|
||||
itsybitsy52840.menu.softdevice.s140v6.build.sd_name=s140
|
||||
itsybitsy52840.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
itsybitsy52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
itsybitsy52840.menu.debug.l0=Level 0 (Release)
|
||||
itsybitsy52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
itsybitsy52840.menu.debug.l1=Level 1 (Error Message)
|
||||
itsybitsy52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
itsybitsy52840.menu.debug.l2=Level 2 (Full Debug)
|
||||
itsybitsy52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
itsybitsy52840.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
itsybitsy52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
itsybitsy52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
# ---------------------------------------------
|
||||
# Bluefruit Circuit Playground nRF52840 Express
|
||||
# ---------------------------------------------
|
||||
cplaynrf52840.name=Adafruit Circuit Playground Bluefruit
|
||||
|
||||
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
|
||||
cplaynrf52840.vid.0=0x239A
|
||||
cplaynrf52840.pid.0=0x8045
|
||||
cplaynrf52840.vid.1=0x239A
|
||||
cplaynrf52840.pid.1=0x0045
|
||||
cplaynrf52840.vid.2=0x239A
|
||||
cplaynrf52840.pid.2=0x0046
|
||||
cplaynrf52840.vid.3=0x239A
|
||||
cplaynrf52840.pid.3=0x8046
|
||||
|
||||
# Upload
|
||||
cplaynrf52840.bootloader.tool=bootburn
|
||||
cplaynrf52840.upload.tool=nrfutil
|
||||
cplaynrf52840.upload.protocol=nrfutil
|
||||
cplaynrf52840.upload.use_1200bps_touch=true
|
||||
cplaynrf52840.upload.wait_for_upload_port=true
|
||||
cplaynrf52840.upload.maximum_size=815104
|
||||
cplaynrf52840.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
cplaynrf52840.build.mcu=cortex-m4
|
||||
cplaynrf52840.build.f_cpu=64000000
|
||||
cplaynrf52840.build.board=NRF52840_CIRCUITPLAY
|
||||
cplaynrf52840.build.core=nRF5
|
||||
cplaynrf52840.build.variant=circuitplayground_nrf52840
|
||||
cplaynrf52840.build.usb_manufacturer="Adafruit LLC"
|
||||
cplaynrf52840.build.usb_product="Circuit Playground Bluefruit"
|
||||
cplaynrf52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
|
||||
cplaynrf52840.build.ldscript=nrf52840_s140_v6.ld
|
||||
cplaynrf52840.build.vid=0x239A
|
||||
cplaynrf52840.build.pid=0x8045
|
||||
|
||||
# SofDevice Menu
|
||||
cplaynrf52840.menu.softdevice.s140v6=S140 6.1.1
|
||||
cplaynrf52840.menu.softdevice.s140v6.build.sd_name=s140
|
||||
cplaynrf52840.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
cplaynrf52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
cplaynrf52840.menu.debug.l0=Level 0 (Release)
|
||||
cplaynrf52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
cplaynrf52840.menu.debug.l1=Level 1 (Error Message)
|
||||
cplaynrf52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
cplaynrf52840.menu.debug.l2=Level 2 (Full Debug)
|
||||
cplaynrf52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
cplaynrf52840.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
cplaynrf52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
cplaynrf52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
|
||||
# ---------------------------------------------
|
||||
# Clue nRF52840
|
||||
# ---------------------------------------------
|
||||
cluenrf52840.name=Adafruit CLUE
|
||||
|
||||
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
|
||||
cluenrf52840.vid.0=0x239A
|
||||
cluenrf52840.pid.0=0x8072
|
||||
cluenrf52840.vid.1=0x239A
|
||||
cluenrf52840.pid.1=0x0072
|
||||
cluenrf52840.vid.2=0x239A
|
||||
cluenrf52840.pid.2=0x0071
|
||||
cluenrf52840.vid.3=0x239A
|
||||
cluenrf52840.pid.3=0x8071
|
||||
|
||||
# Upload
|
||||
cluenrf52840.bootloader.tool=bootburn
|
||||
cluenrf52840.upload.tool=nrfutil
|
||||
cluenrf52840.upload.protocol=nrfutil
|
||||
cluenrf52840.upload.use_1200bps_touch=true
|
||||
cluenrf52840.upload.wait_for_upload_port=true
|
||||
cluenrf52840.upload.maximum_size=815104
|
||||
cluenrf52840.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
cluenrf52840.build.mcu=cortex-m4
|
||||
cluenrf52840.build.f_cpu=64000000
|
||||
cluenrf52840.build.board=NRF52840_CLUE
|
||||
cluenrf52840.build.core=nRF5
|
||||
cluenrf52840.build.variant=clue_nrf52840
|
||||
cluenrf52840.build.usb_manufacturer="Adafruit LLC"
|
||||
cluenrf52840.build.usb_product="CLUE"
|
||||
cluenrf52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
|
||||
cluenrf52840.build.ldscript=nrf52840_s140_v6.ld
|
||||
cluenrf52840.build.vid=0x239A
|
||||
cluenrf52840.build.pid=0x8071
|
||||
|
||||
# SofDevice Menu
|
||||
cluenrf52840.menu.softdevice.s140v6=S140 6.1.1
|
||||
cluenrf52840.menu.softdevice.s140v6.build.sd_name=s140
|
||||
cluenrf52840.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
cluenrf52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
cluenrf52840.menu.debug.l0=Level 0 (Release)
|
||||
cluenrf52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
cluenrf52840.menu.debug.l1=Level 1 (Error Message)
|
||||
cluenrf52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
cluenrf52840.menu.debug.l2=Level 2 (Full Debug)
|
||||
cluenrf52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
cluenrf52840.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
cluenrf52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
cluenrf52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
# ----------------------------------
|
||||
# Metro nRF52840 Express
|
||||
# ----------------------------------
|
||||
metro52840.name=Adafruit Metro nRF52840 Express
|
||||
|
||||
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
|
||||
metro52840.vid.0=0x239A
|
||||
metro52840.pid.0=0x803F
|
||||
metro52840.vid.1=0x239A
|
||||
metro52840.pid.1=0x003F
|
||||
metro52840.vid.2=0x239A
|
||||
metro52840.pid.2=0x0040
|
||||
metro52840.vid.3=0x239A
|
||||
metro52840.pid.3=0x8040
|
||||
|
||||
# Upload
|
||||
metro52840.bootloader.tool=bootburn
|
||||
metro52840.upload.tool=nrfutil
|
||||
metro52840.upload.protocol=nrfutil
|
||||
metro52840.upload.use_1200bps_touch=true
|
||||
metro52840.upload.wait_for_upload_port=true
|
||||
metro52840.upload.maximum_size=815104
|
||||
metro52840.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
metro52840.build.mcu=cortex-m4
|
||||
metro52840.build.f_cpu=64000000
|
||||
metro52840.build.board=NRF52840_METRO
|
||||
metro52840.build.core=nRF5
|
||||
metro52840.build.variant=metro_nrf52840_express
|
||||
metro52840.build.usb_manufacturer="Adafruit LLC"
|
||||
metro52840.build.usb_product="Metro nRF52840 Express"
|
||||
metro52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
|
||||
metro52840.build.ldscript=nrf52840_s140_v6.ld
|
||||
metro52840.build.vid=0x239A
|
||||
metro52840.build.pid=0x803F
|
||||
|
||||
# SofDevice Menu
|
||||
metro52840.menu.softdevice.s140v6=S140 6.1.1
|
||||
metro52840.menu.softdevice.s140v6.build.sd_name=s140
|
||||
metro52840.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
metro52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
metro52840.menu.debug.l0=Level 0 (Release)
|
||||
metro52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
metro52840.menu.debug.l1=Level 1 (Error Message)
|
||||
metro52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
metro52840.menu.debug.l2=Level 2 (Full Debug)
|
||||
metro52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
metro52840.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
metro52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
metro52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
|
||||
|
||||
|
||||
# -------------------------------------------------------
|
||||
#
|
||||
# Boards that aren't made by Adafruit
|
||||
#
|
||||
# -------------------------------------------------------
|
||||
|
||||
|
||||
# ----------------------------------
|
||||
# Nordic nRF52840DK (PCA10056)
|
||||
# ----------------------------------
|
||||
pca10056.name=Nordic nRF52840DK (PCA10056)
|
||||
pca10056.bootloader.tool=bootburn
|
||||
|
||||
# Upload
|
||||
pca10056.upload.tool=nrfutil
|
||||
pca10056.upload.protocol=nrfutil
|
||||
pca10056.upload.use_1200bps_touch=true
|
||||
pca10056.upload.wait_for_upload_port=true
|
||||
pca10056.upload.maximum_size=815104
|
||||
pca10056.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
pca10056.build.mcu=cortex-m4
|
||||
pca10056.build.f_cpu=64000000
|
||||
pca10056.build.board=NRF52840_PCA10056
|
||||
pca10056.build.core=nRF5
|
||||
pca10056.build.variant=pca10056
|
||||
pca10056.build.usb_manufacturer="Nordic"
|
||||
pca10056.build.usb_product="nRF52840 DK"
|
||||
pca10056.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
|
||||
pca10056.build.ldscript=nrf52840_s140_v6.ld
|
||||
pca10056.build.vid=0x239A
|
||||
pca10056.build.pid=0x8029
|
||||
|
||||
# SofDevice Menu
|
||||
pca10056.menu.softdevice.s140v6=S140 6.1.1
|
||||
pca10056.menu.softdevice.s140v6.build.sd_name=s140
|
||||
pca10056.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
pca10056.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
pca10056.menu.debug.l0=Level 0 (Release)
|
||||
pca10056.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
pca10056.menu.debug.l1=Level 1 (Error Message)
|
||||
pca10056.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
pca10056.menu.debug.l2=Level 2 (Full Debug)
|
||||
pca10056.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
pca10056.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
pca10056.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
pca10056.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
# ----------------------------------
|
||||
# Particle Xenon
|
||||
# ----------------------------------
|
||||
particle_xenon.name=Particle Xenon
|
||||
|
||||
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
|
||||
particle_xenon.vid.0=0x239A
|
||||
particle_xenon.pid.0=0x8029
|
||||
particle_xenon.vid.1=0x239A
|
||||
particle_xenon.pid.1=0x0029
|
||||
particle_xenon.vid.2=0x239A
|
||||
particle_xenon.pid.2=0x002A
|
||||
particle_xenon.vid.3=0x239A
|
||||
particle_xenon.pid.3=0x802A
|
||||
|
||||
# Upload
|
||||
particle_xenon.bootloader.tool=bootburn
|
||||
particle_xenon.upload.tool=nrfutil
|
||||
particle_xenon.upload.protocol=nrfutil
|
||||
particle_xenon.upload.use_1200bps_touch=true
|
||||
particle_xenon.upload.wait_for_upload_port=true
|
||||
particle_xenon.upload.maximum_size=815104
|
||||
particle_xenon.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
particle_xenon.build.mcu=cortex-m4
|
||||
particle_xenon.build.f_cpu=64000000
|
||||
particle_xenon.build.board=PARTICLE_XENON
|
||||
particle_xenon.build.core=nRF5
|
||||
particle_xenon.build.variant=particle_xenon
|
||||
particle_xenon.build.usb_manufacturer="Particle Industries"
|
||||
particle_xenon.build.usb_product="Particle Xenon"
|
||||
particle_xenon.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
|
||||
particle_xenon.build.ldscript=nrf52840_s140_v6.ld
|
||||
particle_xenon.build.vid=0x239A
|
||||
particle_xenon.build.pid=0x8029
|
||||
|
||||
# SofDevice Menu
|
||||
particle_xenon.menu.softdevice.s140v6=S140 6.1.1
|
||||
particle_xenon.menu.softdevice.s140v6.build.sd_name=s140
|
||||
particle_xenon.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
particle_xenon.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
particle_xenon.menu.debug.l0=Level 0 (Release)
|
||||
particle_xenon.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
particle_xenon.menu.debug.l1=Level 1 (Error Message)
|
||||
particle_xenon.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
particle_xenon.menu.debug.l2=Level 2 (Full Debug)
|
||||
particle_xenon.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
particle_xenon.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
particle_xenon.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
particle_xenon.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
# ----------------------------------
|
||||
# Raytac MDBT50Q - RX
|
||||
# ----------------------------------
|
||||
mdbt50qrx.name=Raytac MDBT50Q-RX Dongle
|
||||
|
||||
# VID/PID for bootloader, Arduino + Circuitpython App
|
||||
mdbt50qrx.vid.0=0x239A
|
||||
mdbt50qrx.pid.0=0x810B
|
||||
mdbt50qrx.vid.1=0x239A
|
||||
mdbt50qrx.pid.1=0x010B
|
||||
mdbt50qrx.vid.2=0x239A
|
||||
mdbt50qrx.pid.2=0x810C
|
||||
|
||||
# Upload
|
||||
mdbt50qrx.bootloader.tool=bootburn
|
||||
mdbt50qrx.upload.tool=nrfutil
|
||||
mdbt50qrx.upload.protocol=nrfutil
|
||||
mdbt50qrx.upload.use_1200bps_touch=true
|
||||
mdbt50qrx.upload.wait_for_upload_port=true
|
||||
mdbt50qrx.upload.maximum_size=815104
|
||||
mdbt50qrx.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
mdbt50qrx.build.mcu=cortex-m4
|
||||
mdbt50qrx.build.f_cpu=64000000
|
||||
mdbt50qrx.build.board=MDBT50Q_RX
|
||||
mdbt50qrx.build.core=nRF5
|
||||
mdbt50qrx.build.variant=raytac_mdbt50q_rx
|
||||
mdbt50qrx.build.usb_manufacturer="Raytac"
|
||||
mdbt50qrx.build.usb_product="nRF52840 Dongle"
|
||||
mdbt50qrx.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
|
||||
mdbt50qrx.build.ldscript=nrf52840_s140_v6.ld
|
||||
mdbt50qrx.build.vid=0x239A
|
||||
mdbt50qrx.build.pid=0x810B
|
||||
|
||||
# SofDevice Menu
|
||||
mdbt50qrx.menu.softdevice.s140v6=S140 6.1.1
|
||||
mdbt50qrx.menu.softdevice.s140v6.build.sd_name=s140
|
||||
mdbt50qrx.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
mdbt50qrx.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
mdbt50qrx.menu.debug.l0=Level 0 (Release)
|
||||
mdbt50qrx.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
mdbt50qrx.menu.debug.l1=Level 1 (Error Message)
|
||||
mdbt50qrx.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
mdbt50qrx.menu.debug.l2=Level 2 (Full Debug)
|
||||
mdbt50qrx.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
mdbt50qrx.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
mdbt50qrx.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
mdbt50qrx.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
# ----------------------------------
|
||||
# NINA B302
|
||||
# ----------------------------------
|
||||
ninab302.name=NINA B302 ublox
|
||||
|
||||
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
|
||||
ninab302.vid.0=0x239A
|
||||
ninab302.pid.0=0x8029
|
||||
ninab302.vid.1=0x239A
|
||||
ninab302.pid.1=0x0029
|
||||
ninab302.vid.2=0x7239A
|
||||
ninab302.pid.2=0x002A
|
||||
ninab302.vid.3=0x239A
|
||||
ninab302.pid.3=0x802A
|
||||
|
||||
# Upload
|
||||
ninab302.bootloader.tool=bootburn
|
||||
ninab302.upload.tool=nrfutil
|
||||
ninab302.upload.protocol=nrfutil
|
||||
ninab302.upload.use_1200bps_touch=true
|
||||
ninab302.upload.wait_for_upload_port=true
|
||||
ninab302.upload.maximum_size=815104
|
||||
ninab302.upload.maximum_data_size=237568
|
||||
|
||||
# Build
|
||||
ninab302.build.mcu=cortex-m4
|
||||
ninab302.build.f_cpu=64000000
|
||||
ninab302.build.board=NINA_B302_ublox
|
||||
ninab302.build.core=nRF5
|
||||
ninab302.build.variant=NINA_B302_ublox
|
||||
ninab302.build.usb_manufacturer="Nordic"
|
||||
ninab302.build.usb_product="NINA B302 ublox"
|
||||
ninab302.build.extra_flags=-DNRF52840_XXAA -DNINA_B302_ublox {build.flags.usb}
|
||||
ninab302.build.ldscript=nrf52840_s140_v6.ld
|
||||
ninab302.build.vid=0x239A
|
||||
ninab302.build.pid=0x8029
|
||||
|
||||
# SofDevice Menu
|
||||
ninab302.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1
|
||||
ninab302.menu.softdevice.s140v6.build.sd_name=s140
|
||||
ninab302.menu.softdevice.s140v6.build.sd_version=6.1.1
|
||||
ninab302.menu.softdevice.s140v6.build.sd_fwid=0x00B6
|
||||
|
||||
# Debug Menu
|
||||
ninab302.menu.debug.l0=Level 0 (Release)
|
||||
ninab302.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
ninab302.menu.debug.l1=Level 1 (Error Message)
|
||||
ninab302.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
ninab302.menu.debug.l2=Level 2 (Full Debug)
|
||||
ninab302.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
ninab302.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
ninab302.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
ninab302.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
|
||||
# ----------------------------------
|
||||
# NINA B112
|
||||
# ----------------------------------
|
||||
ninab112.name=NINA B112 ublox
|
||||
ninab112.bootloader.tool=bootburn
|
||||
|
||||
# Upload
|
||||
ninab112.upload.tool=nrfutil
|
||||
ninab112.upload.protocol=nrfutil
|
||||
ninab112.upload.use_1200bps_touch=false
|
||||
ninab112.upload.wait_for_upload_port=false
|
||||
ninab112.upload.native_usb=false
|
||||
ninab112.upload.maximum_size=290816
|
||||
ninab112.upload.maximum_data_size=52224
|
||||
|
||||
# Build
|
||||
ninab112.build.mcu=cortex-m4
|
||||
ninab112.build.f_cpu=64000000
|
||||
ninab112.build.board=NINA_B112_ublox
|
||||
ninab112.build.core=nRF5
|
||||
ninab112.build.variant=NINA_B112_ublox
|
||||
feather52840.build.usb_manufacturer="Adafruit LLC"
|
||||
feather52840.build.usb_product="Feather nRF52832"
|
||||
ninab112.build.extra_flags=-DNRF52832_XXAA -DNINA_B112_ublox -DNRF52
|
||||
ninab112.build.ldscript=nrf52832_s132_v6.ld
|
||||
|
||||
# SofDevice Menu
|
||||
ninab112.menu.softdevice.s132v6=0.3.2 SoftDevice s132 6.1.1
|
||||
ninab112.menu.softdevice.s132v6.build.sd_name=s132
|
||||
ninab112.menu.softdevice.s132v6.build.sd_version=6.1.1
|
||||
ninab112.menu.softdevice.s132v6.build.sd_fwid=0x00B7
|
||||
|
||||
# Debug Menu
|
||||
ninab112.menu.debug.l0=Level 0 (Release)
|
||||
ninab112.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
|
||||
ninab112.menu.debug.l1=Level 1 (Error Message)
|
||||
ninab112.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
|
||||
ninab112.menu.debug.l2=Level 2 (Full Debug)
|
||||
ninab112.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
|
||||
ninab112.menu.debug.l3=Level 3 (Segger SystemView)
|
||||
ninab112.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
|
||||
ninab112.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
|
||||
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
* Udp.cpp: Library to send/receive UDP packets.
|
||||
*
|
||||
* NOTE: UDP is fast, but has some important limitations (thanks to Warren Gray for mentioning these)
|
||||
* 1) UDP does not guarantee the order in which assembled UDP packets are received. This
|
||||
* might not happen often in practice, but in larger network topologies, a UDP
|
||||
* packet can be received out of sequence.
|
||||
* 2) UDP does not guard against lost packets - so packets *can* disappear without the sender being
|
||||
* aware of it. Again, this may not be a concern in practice on small local networks.
|
||||
* For more information, see http://www.cafeaulait.org/course/week12/35.html
|
||||
*
|
||||
* MIT License:
|
||||
* Copyright (c) 2008 Bjoern Hartmann
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
* bjoern@cs.stanford.edu 12/30/2008
|
||||
*/
|
||||
|
||||
#ifndef udp_h
|
||||
#define udp_h
|
||||
|
||||
#include <Stream.h>
|
||||
#include <IPAddress.h>
|
||||
|
||||
class UDP : public Stream {
|
||||
|
||||
public:
|
||||
virtual uint8_t begin(uint16_t) =0; // initialize, start listening on specified port. Returns 1 if successful, 0 if there are no sockets available to use
|
||||
|
||||
// KH, add virtual function to support Multicast, necessary for many services (MDNS, UPnP, etc.)
|
||||
virtual uint8_t beginMulticast(IPAddress, uint16_t) { return 0; } // initialize, start listening on specified multicast IP address and port. Returns 1 if successful, 0 on failure
|
||||
|
||||
virtual void stop() =0; // Finish with the UDP socket
|
||||
|
||||
// Sending UDP packets
|
||||
|
||||
// Start building up a packet to send to the remote host specific in ip and port
|
||||
// Returns 1 if successful, 0 if there was a problem with the supplied IP address or port
|
||||
virtual int beginPacket(IPAddress ip, uint16_t port) =0;
|
||||
// Start building up a packet to send to the remote host specific in host and port
|
||||
// Returns 1 if successful, 0 if there was a problem resolving the hostname or port
|
||||
virtual int beginPacket(const char *host, uint16_t port) =0;
|
||||
// Finish off this packet and send it
|
||||
// Returns 1 if the packet was sent successfully, 0 if there was an error
|
||||
virtual int endPacket() =0;
|
||||
// Write a single byte into the packet
|
||||
virtual size_t write(uint8_t) =0;
|
||||
// Write size bytes from buffer into the packet
|
||||
virtual size_t write(const uint8_t *buffer, size_t size) =0;
|
||||
|
||||
// Start processing the next available incoming packet
|
||||
// Returns the size of the packet in bytes, or 0 if no packets are available
|
||||
virtual int parsePacket() =0;
|
||||
// Number of bytes remaining in the current packet
|
||||
virtual int available() =0;
|
||||
// Read a single byte from the current packet
|
||||
virtual int read() =0;
|
||||
// Read up to len bytes from the current packet and place them into buffer
|
||||
// Returns the number of bytes read, or 0 if none are available
|
||||
virtual int read(unsigned char* buffer, size_t len) =0;
|
||||
// Read up to len characters from the current packet and place them into buffer
|
||||
// Returns the number of characters read, or 0 if none are available
|
||||
virtual int read(char* buffer, size_t len) =0;
|
||||
// Return the next byte from the current packet without moving on to the next byte
|
||||
virtual int peek() =0;
|
||||
virtual void flush() =0; // Finish reading the current packet
|
||||
|
||||
// Return the IP address of the host who sent the current incoming packet
|
||||
virtual IPAddress remoteIP() =0;
|
||||
// Return the port of the host who sent the current incoming packet
|
||||
virtual uint16_t remotePort() =0;
|
||||
protected:
|
||||
uint8_t* rawIPAddress(IPAddress& addr) { return addr.raw_address(); };
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,167 @@
|
||||
# Copyright (c) 2014-2015 Arduino LLC. All right reserved.
|
||||
# Copyright (c) 2016 Sandeep Mistry All right reserved.
|
||||
# Copyright (c) 2017 Adafruit Industries. All rights reserved.
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
name=Adafruit nRF52 Boards
|
||||
version=1.0.0
|
||||
|
||||
# Compile variables
|
||||
# -----------------
|
||||
|
||||
compiler.warning_flags=-w
|
||||
compiler.warning_flags.none=-w
|
||||
compiler.warning_flags.default=
|
||||
compiler.warning_flags.more=-Wall
|
||||
compiler.warning_flags.all=-Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-pointer-arith
|
||||
|
||||
# Allow changing optimization settings via platform.local.txt / boards.local.txt
|
||||
compiler.optimization_flag=-Ofast
|
||||
|
||||
compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/
|
||||
compiler.c.cmd=arm-none-eabi-gcc
|
||||
compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.warning_flags} {build.float_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD
|
||||
|
||||
# KH, Error here to use gcc, must use g++
|
||||
#compiler.c.elf.cmd=arm-none-eabi-gcc
|
||||
compiler.c.elf.cmd=arm-none-eabi-g++
|
||||
|
||||
compiler.c.elf.flags={compiler.optimization_flag} -Wl,--gc-sections -save-temps
|
||||
compiler.S.cmd=arm-none-eabi-gcc
|
||||
compiler.S.flags=-mcpu={build.mcu} -mthumb -mabi=aapcs {compiler.optimization_flag} -g -c {build.float_flags} -x assembler-with-cpp
|
||||
|
||||
compiler.cpp.cmd=arm-none-eabi-g++
|
||||
compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.warning_flags} {build.float_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD
|
||||
compiler.ar.cmd=arm-none-eabi-ar
|
||||
compiler.ar.flags=rcs
|
||||
compiler.objcopy.cmd=arm-none-eabi-objcopy
|
||||
compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0
|
||||
compiler.elf2bin.flags=-O binary
|
||||
compiler.elf2bin.cmd=arm-none-eabi-objcopy
|
||||
compiler.elf2hex.flags=-O ihex
|
||||
compiler.elf2hex.cmd=arm-none-eabi-objcopy
|
||||
compiler.ldflags=-mcpu={build.mcu} -mthumb {build.float_flags} -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align --specs=nano.specs --specs=nosys.specs
|
||||
compiler.size.cmd=arm-none-eabi-size
|
||||
|
||||
# this can be overriden in boards.txt
|
||||
build.float_flags=-mfloat-abi=hard -mfpu=fpv4-sp-d16 -u _printf_float
|
||||
build.debug_flags=-DCFG_DEBUG=0
|
||||
build.logger_flags=-DCFG_LOGGER=1
|
||||
build.sysview_flags=-DCFG_SYSVIEW=0
|
||||
|
||||
# USB flags
|
||||
build.flags.usb= -DUSBCON -DUSE_TINYUSB -DUSB_VID={build.vid} -DUSB_PID={build.pid} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}'
|
||||
|
||||
# These can be overridden in platform.local.txt
|
||||
compiler.c.extra_flags=
|
||||
compiler.c.elf.extra_flags=
|
||||
compiler.cpp.extra_flags=
|
||||
compiler.S.extra_flags=
|
||||
compiler.ar.extra_flags=
|
||||
compiler.libraries.ldflags=
|
||||
compiler.elf2bin.extra_flags=
|
||||
compiler.elf2hex.extra_flags=
|
||||
|
||||
compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-5.7.0.path}/CMSIS/Core/Include/" "-I{runtime.tools.CMSIS-5.7.0.path}/CMSIS/DSP/Include/"
|
||||
compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-5.7.0.path}/CMSIS/DSP/Lib/GCC/" -larm_cortexM4lf_math
|
||||
|
||||
# common compiler for nrf
|
||||
rtos.path={build.core.path}/freertos
|
||||
nordic.path={build.core.path}/nordic
|
||||
|
||||
# build.logger_flags and build.sysview_flags are intentionally empty,
|
||||
# to allow modification via a user's own boards.local.txt or platform.local.txt files.
|
||||
build.flags.nrf= -DSOFTDEVICE_PRESENT -DARDUINO_NRF52_ADAFRUIT -DNRF52_SERIES -DDX_CC_TEE -DLFS_NAME_MAX=64 {compiler.optimization_flag} {build.debug_flags} {build.logger_flags} {build.sysview_flags} {compiler.arm.cmsis.c.flags} "-I{nordic.path}" "-I{nordic.path}/nrfx" "-I{nordic.path}/nrfx/hal" "-I{nordic.path}/nrfx/mdk" "-I{nordic.path}/nrfx/soc" "-I{nordic.path}/nrfx/drivers/include" "-I{nordic.path}/nrfx/drivers/src" "-I{nordic.path}/softdevice/{build.sd_name}_nrf52_{build.sd_version}_API/include" "-I{nordic.path}/softdevice/{build.sd_name}_nrf52_{build.sd_version}_API/include/nrf52" "-I{rtos.path}/Source/include" "-I{rtos.path}/config" "-I{rtos.path}/portable/GCC/nrf52" "-I{rtos.path}/portable/CMSIS/nrf52" "-I{build.core.path}/sysview/SEGGER" "-I{build.core.path}/sysview/Config" "-I{runtime.platform.path}/libraries/Adafruit_TinyUSB_Arduino/src/arduino"
|
||||
|
||||
# Compile patterns
|
||||
# ----------------
|
||||
|
||||
## Compile c files
|
||||
## KH Add -DBOARD_NAME="{build.board}"
|
||||
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} '-DARDUINO_BSP_VERSION="{version}"' {compiler.c.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}"
|
||||
|
||||
## Compile c++ files
|
||||
## KH Add -DBOARD_NAME="{build.board}"
|
||||
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} '-DARDUINO_BSP_VERSION="{version}"' {compiler.cpp.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}"
|
||||
|
||||
## Compile S files
|
||||
## KH Add -DBOARD_NAME="{build.board}"
|
||||
recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}"
|
||||
|
||||
## Create archives
|
||||
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"
|
||||
|
||||
## Combine gc-sections, archives, and objects
|
||||
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-L{build.core.path}/linker" "-T{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} -Wl,--start-group {compiler.arm.cmsis.ldflags} -lm "{build.path}/{archive_file}" {compiler.libraries.ldflags} -Wl,--end-group
|
||||
|
||||
## Create output (bin file)
|
||||
#recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2bin.cmd}" {compiler.elf2bin.flags} {compiler.elf2bin.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin"
|
||||
|
||||
## Create output (hex file)
|
||||
recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex"
|
||||
|
||||
## Create dfu package zip file
|
||||
recipe.objcopy.zip.pattern="{tools.nrfutil.cmd}" dfu genpkg --dev-type 0x0052 --sd-req {build.sd_fwid} --application "{build.path}/{build.project_name}.hex" "{build.path}/{build.project_name}.zip"
|
||||
|
||||
## Create uf2 file
|
||||
#recipe.objcopy.uf2.pattern=python "{runtime.platform.path}/tools/uf2conv/uf2conv.py" -f 0xADA52840 -c -o "{build.path}/{build.project_name}.uf2" "{build.path}/{build.project_name}.hex"
|
||||
|
||||
## Save bin
|
||||
recipe.output.tmp_file_bin={build.project_name}.bin
|
||||
recipe.output.save_file_bin={build.project_name}.save.bin
|
||||
|
||||
## Save hex
|
||||
recipe.output.tmp_file_hex={build.project_name}.hex
|
||||
recipe.output.save_file_hexu={build.project_name}.save.hex
|
||||
|
||||
## Compute size
|
||||
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
|
||||
recipe.size.regex=^(?:\.text|\.data|)\s+([0-9]+).*
|
||||
recipe.size.regex.data=^(?:\.data|\.bss)\s+([0-9]+).*
|
||||
|
||||
## Export Compiled Binary
|
||||
recipe.output.tmp_file={build.project_name}.hex
|
||||
recipe.output.save_file={build.project_name}.{build.variant}.hex
|
||||
|
||||
#***************************************************
|
||||
# adafruit-nrfutil for uploading
|
||||
# https://github.com/adafruit/Adafruit_nRF52_nrfutil
|
||||
# pre-built binaries are provided for macos and windows
|
||||
#***************************************************
|
||||
tools.nrfutil.cmd=adafruit-nrfutil
|
||||
tools.nrfutil.cmd.windows={runtime.platform.path}/tools/adafruit-nrfutil/win32/adafruit-nrfutil.exe
|
||||
tools.nrfutil.cmd.macosx={runtime.platform.path}/tools/adafruit-nrfutil/macos/adafruit-nrfutil
|
||||
|
||||
tools.nrfutil.upload.params.verbose=--verbose
|
||||
tools.nrfutil.upload.params.quiet=
|
||||
tools.nrfutil.upload.pattern="{cmd}" {upload.verbose} dfu serial -pkg "{build.path}/{build.project_name}.zip" -p {serial.port} -b 115200 --singlebank
|
||||
|
||||
#***************************************************
|
||||
# Burning bootloader with either jlink or nrfutil
|
||||
#***************************************************
|
||||
|
||||
# Bootloader version
|
||||
tools.bootburn.bootloader.file={runtime.platform.path}/bootloader/{build.variant}/{build.variant}_bootloader-0.6.1_{build.sd_name}_{build.sd_version}
|
||||
|
||||
tools.bootburn.bootloader.params.verbose=
|
||||
tools.bootburn.bootloader.params.quiet=
|
||||
tools.bootburn.bootloader.pattern={program.burn_pattern}
|
||||
|
||||
# erase flash page while programming
|
||||
tools.bootburn.erase.params.verbose=
|
||||
tools.bootburn.erase.params.quiet=
|
||||
tools.bootburn.erase.pattern=
|
||||
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Lesser General Public License for more details.
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
// API compatibility
|
||||
#include "variant.h"
|
||||
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
|
||||
Copyright (c) 2016 Sandeep Mistry All right reserved.
|
||||
Copyright (c) 2018, Adafruit Industries (adafruit.com)
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
// Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip).
|
||||
// See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1)
|
||||
|
||||
#include "variant.h"
|
||||
#include "wiring_constants.h"
|
||||
#include "wiring_digital.h"
|
||||
#include "nrf.h"
|
||||
|
||||
const uint32_t g_ADigitalPinMap[] = {
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
6,
|
||||
7,
|
||||
8,
|
||||
9,
|
||||
10,
|
||||
11,
|
||||
12,
|
||||
13,
|
||||
14,
|
||||
15,
|
||||
16,
|
||||
17,
|
||||
18,
|
||||
19,
|
||||
20,
|
||||
21,
|
||||
22,
|
||||
23,
|
||||
24,
|
||||
25,
|
||||
26,
|
||||
27,
|
||||
28,
|
||||
29,
|
||||
30,
|
||||
31
|
||||
};
|
||||
|
||||
@@ -0,0 +1,173 @@
|
||||
/*
|
||||
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
|
||||
Copyright (c) 2016 Sandeep Mistry All right reserved.
|
||||
Copyright (c) 2018, Adafruit Industries (adafruit.com)
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Lesser General Public License for more details.
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef _VARIANT_NINA_B112_UBLOX_
|
||||
#define _VARIANT_NINA_B112_UBLOX_
|
||||
|
||||
#define NRF_CLOCK_LFCLKSRC {.source = NRF_CLOCK_LF_SRC_XTAL, \
|
||||
.rc_ctiv = 0, \
|
||||
.rc_temp_ctiv = 0, \
|
||||
.xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM}
|
||||
|
||||
/** Master clock frequency */
|
||||
#define VARIANT_MCK (64000000ul)
|
||||
|
||||
#define USE_LFXO // Board uses 32khz crystal for LF
|
||||
// define USE_LFRC // Board uses RC for LF
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Headers
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
#include "WVariant.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif // __cplusplus
|
||||
|
||||
// Number of pins defined in PinDescription array
|
||||
#define PINS_COUNT (32u)
|
||||
#define NUM_DIGITAL_PINS (32u)
|
||||
#define NUM_ANALOG_INPUTS (6u)
|
||||
#define NUM_ANALOG_OUTPUTS (0u)
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED LED1
|
||||
#define LED_BUILTIN PIN_LED
|
||||
|
||||
//LEDs onboard
|
||||
#define LED1 (8) // Red
|
||||
#define LED2 (16) // Green/SW1
|
||||
#define LED3 (18) // Blue
|
||||
|
||||
#define LED_STATE_ON 1 // State when LED is litted
|
||||
|
||||
//Switch
|
||||
|
||||
#define SW1 (16)
|
||||
#define SW2 (30)
|
||||
|
||||
// NFC
|
||||
#define PIN_NFC_1 (9) // P0.9
|
||||
#define PIN_NFC_2 (10) // P0.10
|
||||
|
||||
/*
|
||||
* Analog pins
|
||||
*/
|
||||
#define PIN_A0 (3) // P0.03
|
||||
#define PIN_A1 (2) // P0.02
|
||||
#define PIN_A2 (4) // P0.04
|
||||
#define PIN_A3 (30) // P0.30
|
||||
#define PIN_A4 (29) // P0.29
|
||||
#define PIN_A5 (28) // P0.28
|
||||
|
||||
static const uint8_t A0 = PIN_A0 ;
|
||||
static const uint8_t A1 = PIN_A1 ;
|
||||
static const uint8_t A2 = PIN_A2 ;
|
||||
static const uint8_t A3 = PIN_A3 ;
|
||||
static const uint8_t A4 = PIN_A4 ;
|
||||
static const uint8_t A5 = PIN_A5 ;
|
||||
|
||||
#define ADC_RESOLUTION 14
|
||||
|
||||
#define PIN_D0 (5) // P0.05
|
||||
#define PIN_D1 (6) // P0.06
|
||||
#define PIN_D2 (7) // P0.07
|
||||
#define PIN_D3 (31) // P0.31
|
||||
#define PIN_D4 (18) // P0.18
|
||||
#define PIN_D6 (9) // P0.09
|
||||
#define PIN_D7 (10) // P0.10
|
||||
#define PIN_D9 (8) // P0.8
|
||||
#define PIN_D10 (11) // P0.11
|
||||
#define PIN_D11 (13) // P0.13
|
||||
#define PIN_D12 (12) // P0.12
|
||||
#define PIN_D13 (14) // P0.14
|
||||
#define PIN_D14 (2) // P0.02
|
||||
#define PIN_D15 (3) // P0.03
|
||||
|
||||
static const uint8_t D0 = PIN_D0 ;
|
||||
static const uint8_t D1 = PIN_D1 ;
|
||||
static const uint8_t D2 = PIN_D2 ;
|
||||
static const uint8_t D3 = PIN_D3 ;
|
||||
static const uint8_t D4 = PIN_D4 ;
|
||||
static const uint8_t D6 = PIN_D6 ;
|
||||
static const uint8_t D7 = PIN_D7 ;
|
||||
static const uint8_t D9 = PIN_D9 ;
|
||||
static const uint8_t D10 = PIN_D10 ;
|
||||
static const uint8_t D11 = PIN_D11 ;
|
||||
static const uint8_t D12 = PIN_D12 ;
|
||||
static const uint8_t D13 = PIN_D13 ;
|
||||
static const uint8_t D14 = PIN_D14 ;
|
||||
static const uint8_t D15 = PIN_D15 ;
|
||||
|
||||
// Other pins
|
||||
//static const uint8_t AREF = PIN_AREF;
|
||||
|
||||
//#define PIN_AREF (24)
|
||||
//#define PIN_VBAT PIN_A7
|
||||
|
||||
/*
|
||||
* Serial interfaces
|
||||
*/
|
||||
//#define PIN_SERIAL_RX (8) //used for original Adafruit Bootloader
|
||||
//#define PIN_SERIAL_TX (6) //used for original Adafruit Bootloader
|
||||
|
||||
#define PIN_SERIAL_RX (5) // P0.05
|
||||
#define PIN_SERIAL_TX (6) // P0.06
|
||||
#define PIN_SERIAL_CTS (7) // P0.07
|
||||
#define PIN_SERIAL_RTS (31) // P0.31
|
||||
#define PIN_SERIAL_DTR (28) // P0.28
|
||||
#define PIN_SERIAL_DSR (29) // P0.29
|
||||
|
||||
/*
|
||||
* SPI Interfaces
|
||||
*/
|
||||
#define SPI_INTERFACES_COUNT 1
|
||||
|
||||
#define PIN_SPI_MISO (12) // P0.12
|
||||
#define PIN_SPI_MOSI (13) // P0.13
|
||||
#define PIN_SPI_SCK (14) // P0.14
|
||||
|
||||
static const uint8_t SS = 11 ; // P0.11
|
||||
static const uint8_t MOSI = PIN_SPI_MOSI ;
|
||||
static const uint8_t MISO = PIN_SPI_MISO ;
|
||||
static const uint8_t SCK = PIN_SPI_SCK ;
|
||||
|
||||
/*
|
||||
* Wire Interfaces
|
||||
*/
|
||||
#define WIRE_INTERFACES_COUNT 1
|
||||
|
||||
#define PIN_WIRE_SDA (2) // P0.02
|
||||
#define PIN_WIRE_SCL (3) // P0.03
|
||||
|
||||
static const uint8_t SDA = PIN_WIRE_SDA;
|
||||
static const uint8_t SCL = PIN_WIRE_SCL;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Arduino objects - C++ only
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
#endif //_VARIANT_NINA_B112_UBLOX_
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Lesser General Public License for more details.
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
// API compatibility
|
||||
#include "variant.h"
|
||||
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
|
||||
Copyright (c) 2016 Sandeep Mistry All right reserved.
|
||||
Copyright (c) 2018, Adafruit Industries (adafruit.com)
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
// Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip).
|
||||
// See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1)
|
||||
|
||||
#include "variant.h"
|
||||
#include "wiring_constants.h"
|
||||
#include "wiring_digital.h"
|
||||
#include "nrf.h"
|
||||
|
||||
const uint32_t g_ADigitalPinMap[] =
|
||||
{
|
||||
// D0 .. D13
|
||||
29, // D0 is P0.29 (UART TX)
|
||||
45, // D1 is P1.13 (UART RX
|
||||
44, // D2 is P1.12 (NFC2)
|
||||
31, // D3 is P0.31 (LED1)
|
||||
13, // D4 is P0.13 (LED2)
|
||||
11, // D5 is P0.11
|
||||
9, // D6 is P0.09
|
||||
10, // D7 is P0.10 (Button)
|
||||
41, // D8 is P1.09
|
||||
12, // D9 is P0.12
|
||||
14, // D10 is P0.14
|
||||
15, // D11 is P0.15
|
||||
32, // D12 is P1.00
|
||||
7, // D13 is P0.07
|
||||
|
||||
// D14 .. D21 (aka A0 .. A5)
|
||||
4, // D14 is P0.04 (A0)
|
||||
30, // D15 is P0.30 (A1)
|
||||
5, // D16 is P0.05 (A2)
|
||||
2, // D17 is P0.02 (A3)
|
||||
28, // D18 is P0.28 (A4)
|
||||
3, // D19 is P0.03 (A5)
|
||||
|
||||
// D20 .. D21 (aka I2C pins)
|
||||
16, // D20 is P0.16 (SDA)
|
||||
24, // D21 is P0.24 (SCL)
|
||||
|
||||
// QSPI pins (not exposed via any header / test point)
|
||||
19, // D22 is P0.19 (QSPI CLK)
|
||||
17, // D23 is P0.17 (QSPI CS)
|
||||
20, // D24 is P0.20 (QSPI Data 0)
|
||||
21, // D25 is P0.21 (QSPI Data 1)
|
||||
22, // D26 is P0.22 (QSPI Data 2)
|
||||
26, // D27 is P0.23 (QSPI Data 3)
|
||||
|
||||
40, // D28 is P1.08 - IO34
|
||||
41, // D29 is P1.01 - IO35
|
||||
44, // D30 is P1.02 - IO36
|
||||
45, // D31 is P1.03 - IO37
|
||||
42, // D32 is P1.10 - IO38
|
||||
43, // D33 is P1.11 - IO39
|
||||
47, // D34 is P1.15 - IO40
|
||||
46, // D35 is P1.14 - IO41
|
||||
26, // D36 is P0.26 - IO42
|
||||
6, // D37 is P0.6 - IO43
|
||||
27, // D38 is P0.27 - IO44
|
||||
};
|
||||
|
||||
void initVariant()
|
||||
{
|
||||
// LED1 & LED2
|
||||
pinMode(PIN_LED1, OUTPUT);
|
||||
ledOff(PIN_LED1);
|
||||
|
||||
pinMode(PIN_LED2, OUTPUT);
|
||||
ledOff(PIN_LED2);
|
||||
}
|
||||
@@ -0,0 +1,149 @@
|
||||
/*
|
||||
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
|
||||
Copyright (c) 2016 Sandeep Mistry All right reserved.
|
||||
Copyright (c) 2018, Adafruit Industries (adafruit.com)
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Lesser General Public License for more details.
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
// Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip).
|
||||
// See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1)
|
||||
|
||||
#ifndef _VARIANT_NINA_B302_UBLOX_
|
||||
#define _VARIANT_NINA_B302_UBLOX_
|
||||
|
||||
/** Master clock frequency */
|
||||
#define VARIANT_MCK (64000000ul)
|
||||
|
||||
#define USE_LFXO // Board uses 32khz crystal for LF
|
||||
// define USE_LFRC // Board uses RC for LF
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Headers
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
#include "WVariant.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif // __cplusplus
|
||||
// Number of pins defined in PinDescription array
|
||||
#define PINS_COUNT (40)
|
||||
#define NUM_DIGITAL_PINS (34)
|
||||
#define NUM_ANALOG_INPUTS (6)
|
||||
#define NUM_ANALOG_OUTPUTS (0)
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED1 (3)
|
||||
#define PIN_LED2 (4)
|
||||
|
||||
#define LED_BUILTIN PIN_LED1
|
||||
#define LED_CONN PIN_LED2
|
||||
|
||||
#define LED_RED PIN_LED1
|
||||
#define LED_BLUE PIN_LED2
|
||||
|
||||
#define LED_STATE_ON 1 // State when LED is litted
|
||||
|
||||
/*
|
||||
* Buttons
|
||||
*/
|
||||
#define PIN_BUTTON1 (7)
|
||||
|
||||
/*
|
||||
* Analog pins
|
||||
*/
|
||||
#define PIN_A0 (14)
|
||||
#define PIN_A1 (15)
|
||||
#define PIN_A2 (16)
|
||||
#define PIN_A3 (17)
|
||||
#define PIN_A4 (18)
|
||||
#define PIN_A5 (19)
|
||||
|
||||
#define D0 (0)
|
||||
#define D1 (1)
|
||||
#define D2 (2)
|
||||
#define D3 (3)
|
||||
#define D4 (4)
|
||||
#define D5 (5)
|
||||
#define D6 (6)
|
||||
#define D7 (7)
|
||||
#define D8 (8)
|
||||
#define D9 (9)
|
||||
#define D10 (10)
|
||||
#define D11 (11)
|
||||
#define D12 (12)
|
||||
#define D13 (13)
|
||||
|
||||
static const uint8_t A0 = PIN_A0 ;
|
||||
static const uint8_t A1 = PIN_A1 ;
|
||||
static const uint8_t A2 = PIN_A2 ;
|
||||
static const uint8_t A3 = PIN_A3 ;
|
||||
static const uint8_t A4 = PIN_A4 ;
|
||||
static const uint8_t A5 = PIN_A5 ;
|
||||
|
||||
#define ADC_RESOLUTION 14
|
||||
|
||||
#define PIN_NFC1 (31)
|
||||
#define PIN_NFC2 (2)
|
||||
|
||||
/*
|
||||
* Serial interfaces
|
||||
*/
|
||||
#define PIN_SERIAL1_RX (1)
|
||||
#define PIN_SERIAL1_TX (0)
|
||||
|
||||
/*
|
||||
* SPI Interfaces
|
||||
*/
|
||||
#define SPI_INTERFACES_COUNT 1
|
||||
|
||||
#define PIN_SPI_MISO (22) //24 original
|
||||
#define PIN_SPI_MOSI (23) //25 original
|
||||
#define PIN_SPI_SCK (24) //26 original
|
||||
|
||||
static const uint8_t SS = (13);
|
||||
static const uint8_t MOSI = PIN_SPI_MOSI;
|
||||
static const uint8_t MISO = PIN_SPI_MISO;
|
||||
static const uint8_t SCK = PIN_SPI_SCK;
|
||||
|
||||
/*
|
||||
* Wire Interfaces
|
||||
*/
|
||||
#define WIRE_INTERFACES_COUNT 1
|
||||
|
||||
#define PIN_WIRE_SDA (20)
|
||||
#define PIN_WIRE_SCL (21)
|
||||
|
||||
// QSPI Pins
|
||||
#define PIN_QSPI_SCK 22
|
||||
#define PIN_QSPI_CS 23
|
||||
#define PIN_QSPI_IO0 24
|
||||
#define PIN_QSPI_IO1 25
|
||||
#define PIN_QSPI_IO2 26
|
||||
#define PIN_QSPI_IO3 27
|
||||
|
||||
// On-board QSPI Flash
|
||||
#define EXTERNAL_FLASH_DEVICES GD25Q16C
|
||||
#define EXTERNAL_FLASH_USE_QSPI
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Arduino objects - C++ only
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
#endif //_VARIANT_NINA_B302_UBLOX_
|
||||
@@ -0,0 +1,226 @@
|
||||
# Copyright (c) 2014-2015 Arduino LLC. All right reserved.
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
# Arduino SAMD Core and platform.
|
||||
#
|
||||
# For more info:
|
||||
# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification
|
||||
|
||||
name=Adafruit SAMD (32-bits ARM Cortex-M0+ and Cortex-M4) Boards
|
||||
version=1.6.7
|
||||
|
||||
# Compile variables
|
||||
# -----------------
|
||||
|
||||
compiler.warning_flags=-w
|
||||
compiler.warning_flags.none=-w
|
||||
compiler.warning_flags.default=
|
||||
compiler.warning_flags.more=-Wall -Wno-expansion-to-defined
|
||||
compiler.warning_flags.all=-Wall -Wextra -Wno-expansion-to-defined
|
||||
|
||||
compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/
|
||||
compiler.c.cmd=arm-none-eabi-gcc
|
||||
compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD -D__SKETCH_NAME__="""{build.project_name}"""
|
||||
compiler.c.elf.cmd=arm-none-eabi-g++
|
||||
compiler.c.elf.flags=-Os -Wl,--gc-sections -save-temps
|
||||
compiler.S.cmd=arm-none-eabi-gcc
|
||||
compiler.S.flags=-c -g -x assembler-with-cpp -MMD
|
||||
compiler.cpp.cmd=arm-none-eabi-g++
|
||||
compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -D__SKETCH_NAME__="""{build.project_name}"""
|
||||
compiler.ar.cmd=arm-none-eabi-ar
|
||||
compiler.ar.flags=rcs
|
||||
compiler.objcopy.cmd=arm-none-eabi-objcopy
|
||||
compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0
|
||||
compiler.elf2hex.bin.flags=-O binary
|
||||
compiler.elf2hex.hex.flags=-O ihex -R .eeprom
|
||||
compiler.elf2hex.cmd=arm-none-eabi-objcopy
|
||||
compiler.ldflags=-mcpu={build.mcu} -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align
|
||||
compiler.size.cmd=arm-none-eabi-size
|
||||
compiler.define=-DARDUINO=
|
||||
compiler.readelf.cmd=arm-none-eabi-readelf
|
||||
|
||||
# this can be overriden in boards.txt
|
||||
build.extra_flags=
|
||||
build.cache_flags=
|
||||
build.flags.optimize=
|
||||
build.flags.maxspi=
|
||||
build.flags.maxqspi=
|
||||
build.flags.usbstack=
|
||||
build.flags.debug=
|
||||
|
||||
# These can be overridden in platform.local.txt
|
||||
compiler.c.extra_flags=
|
||||
compiler.c.elf.extra_flags=
|
||||
#compiler.c.elf.extra_flags=-v
|
||||
compiler.cpp.extra_flags=
|
||||
compiler.S.extra_flags=
|
||||
compiler.ar.extra_flags=
|
||||
compiler.elf2hex.extra_flags=
|
||||
|
||||
compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Core/Include/" "-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/DSP/Include/" "-I{runtime.tools.CMSIS-Atmel-1.2.1.path}/CMSIS/Device/ATMEL/"
|
||||
compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Lib/GCC/" -larm_cortexM0l_math
|
||||
|
||||
compiler.libraries.ldflags=
|
||||
|
||||
# USB Flags
|
||||
# ---------
|
||||
build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON -DUSB_CONFIG_POWER={build.usb_power} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' {build.flags.usbstack} {build.flags.debug} "-I{build.core.path}/TinyUSB" "-I{build.core.path}/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-I{build.core.path}/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src"
|
||||
|
||||
# Default advertised device power setting in mA
|
||||
build.usb_power=100
|
||||
|
||||
# Default usb manufacturer will be replaced at compile time using
|
||||
# numeric vendor ID if available or by board's specific value.
|
||||
build.usb_manufacturer="Unknown"
|
||||
|
||||
|
||||
# Compile patterns
|
||||
# ----------------
|
||||
|
||||
## Compile c files
|
||||
## KH Add -DBOARD_NAME="{build.board}"
|
||||
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}"
|
||||
|
||||
## Compile c++ files
|
||||
## KH Add -DBOARD_NAME="{build.board}"
|
||||
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}"
|
||||
|
||||
## Compile S files
|
||||
## KH Add -DBOARD_NAME="{build.board}"
|
||||
recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.cache_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}"
|
||||
|
||||
## Create archives
|
||||
# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value
|
||||
archive_file_path={build.path}/{archive_file}
|
||||
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"
|
||||
|
||||
## Combine gc-sections, archives, and objects
|
||||
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} {compiler.libraries.ldflags} -Wl,--start-group {compiler.arm.cmsis.ldflags} "-L{build.variant.path}" -lm "{build.path}/{archive_file}" -Wl,--end-group
|
||||
|
||||
## Create output (bin file)
|
||||
recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.bin.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin"
|
||||
|
||||
## Create output (hex file)
|
||||
recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex"
|
||||
|
||||
build.preferred_out_format=bin
|
||||
|
||||
## Save hex
|
||||
recipe.output.tmp_file={build.project_name}.{build.preferred_out_format}
|
||||
recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_out_format}
|
||||
|
||||
## Compute size
|
||||
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
|
||||
recipe.size.regex=\.text\s+([0-9]+).*
|
||||
|
||||
#
|
||||
# BOSSA
|
||||
#
|
||||
tools.bossac.path={runtime.tools.bossac-1.7.0-arduino3.path}
|
||||
tools.bossac.cmd=bossac
|
||||
tools.bossac.cmd.windows=bossac.exe
|
||||
|
||||
tools.bossac.upload.params.verbose=-i -d
|
||||
tools.bossac.upload.params.quiet=
|
||||
tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -i -e -w -v "{build.path}/{build.project_name}.bin" -R
|
||||
|
||||
tools.bossac_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R
|
||||
|
||||
tools.bossac.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA
|
||||
tools.bossac.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b
|
||||
|
||||
# v1.8.0
|
||||
|
||||
tools.bossac18.path={runtime.tools.bossac-1.8.0-48-gb176eee.path}
|
||||
tools.bossac18.cmd=bossac
|
||||
|
||||
tools.bossac18.upload.params.verbose=-i -d
|
||||
tools.bossac18.upload.params.quiet=
|
||||
tools.bossac18.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U -i --offset={upload.offset} -w -v "{build.path}/{build.project_name}.bin" -R
|
||||
|
||||
tools.bossac18.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA
|
||||
tools.bossac18.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b
|
||||
|
||||
#
|
||||
# BOSSA (ignore binary size)
|
||||
#
|
||||
tools.bossacI.path={runtime.tools.bossac-1.7.0-arduino3.path}
|
||||
tools.bossacI.cmd=bossac
|
||||
tools.bossacI.cmd.windows=bossac.exe
|
||||
|
||||
tools.bossacI.upload.params.verbose=-i -d
|
||||
tools.bossacI.upload.params.quiet=
|
||||
tools.bossacI.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -I -U {upload.native_usb} -i -e -w "{build.path}/{build.project_name}.bin" -R
|
||||
|
||||
tools.bossacI_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R
|
||||
|
||||
tools.bossacI.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA
|
||||
tools.bossacI.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b
|
||||
|
||||
|
||||
#
|
||||
# OpenOCD sketch upload
|
||||
#
|
||||
|
||||
tools.openocd.path={runtime.tools.openocd-0.10.0-arduino7.path}
|
||||
tools.openocd.cmd=bin/openocd
|
||||
tools.openocd.cmd.windows=bin/openocd.exe
|
||||
|
||||
tools.openocd.upload.params.verbose=-d2
|
||||
tools.openocd.upload.params.quiet=-d0
|
||||
tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset 0x2000; shutdown"
|
||||
|
||||
tools.openocd.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA
|
||||
tools.openocd.upload.network_pattern={network_cmd} -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b
|
||||
|
||||
# Program flashes the binary at 0x0000, so use the linker script without_bootloader
|
||||
tools.openocd.program.params.verbose=-d2
|
||||
tools.openocd.program.params.quiet=-d0
|
||||
tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown"
|
||||
|
||||
tools.openocd.erase.params.verbose=-d3
|
||||
tools.openocd.erase.params.quiet=-d0
|
||||
tools.openocd.erase.pattern=
|
||||
|
||||
tools.openocd.bootloader.params.verbose=-d2
|
||||
tools.openocd.bootloader.params.quiet=-d0
|
||||
tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown"
|
||||
|
||||
#
|
||||
# OpenOCD sketch upload - version with configurable bootloader size
|
||||
# FIXME: this programmer is a workaround for default options being overwritten by uploadUsingPreferences
|
||||
#
|
||||
|
||||
tools.openocd-withbootsize.path={runtime.tools.openocd-0.10.0-arduino7.path}
|
||||
tools.openocd-withbootsize.cmd=bin/openocd
|
||||
tools.openocd-withbootsize.cmd.windows=bin/openocd.exe
|
||||
|
||||
tools.openocd-withbootsize.upload.params.verbose=-d2
|
||||
tools.openocd-withbootsize.upload.params.quiet=-d0
|
||||
tools.openocd-withbootsize.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset {bootloader.size}; shutdown"
|
||||
|
||||
# Program flashes the binary at 0x0000, so use the linker script without_bootloader
|
||||
tools.openocd-withbootsize.program.params.verbose=-d2
|
||||
tools.openocd-withbootsize.program.params.quiet=-d0
|
||||
tools.openocd-withbootsize.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown"
|
||||
|
||||
tools.openocd-withbootsize.erase.params.verbose=-d3
|
||||
tools.openocd-withbootsize.erase.params.quiet=-d0
|
||||
tools.openocd-withbootsize.erase.pattern=
|
||||
|
||||
tools.openocd-withbootsize.bootloader.params.verbose=-d2
|
||||
tools.openocd-withbootsize.bootloader.params.quiet=-d0
|
||||
tools.openocd-withbootsize.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown"
|
||||
@@ -0,0 +1,226 @@
|
||||
# Copyright (c) 2014-2015 Arduino LLC. All right reserved.
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
# Arduino SAMD Core and platform.
|
||||
#
|
||||
# For more info:
|
||||
# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification
|
||||
|
||||
name=Adafruit SAMD (32-bits ARM Cortex-M0+ and Cortex-M4) Boards
|
||||
version=1.6.8
|
||||
|
||||
# Compile variables
|
||||
# -----------------
|
||||
|
||||
compiler.warning_flags=-w
|
||||
compiler.warning_flags.none=-w
|
||||
compiler.warning_flags.default=
|
||||
compiler.warning_flags.more=-Wall -Wno-expansion-to-defined
|
||||
compiler.warning_flags.all=-Wall -Wextra -Wno-expansion-to-defined
|
||||
|
||||
compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/
|
||||
compiler.c.cmd=arm-none-eabi-gcc
|
||||
compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD -D__SKETCH_NAME__="""{build.project_name}"""
|
||||
compiler.c.elf.cmd=arm-none-eabi-g++
|
||||
compiler.c.elf.flags=-Os -Wl,--gc-sections -save-temps
|
||||
compiler.S.cmd=arm-none-eabi-gcc
|
||||
compiler.S.flags=-c -g -x assembler-with-cpp -MMD
|
||||
compiler.cpp.cmd=arm-none-eabi-g++
|
||||
compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -D__SKETCH_NAME__="""{build.project_name}"""
|
||||
compiler.ar.cmd=arm-none-eabi-ar
|
||||
compiler.ar.flags=rcs
|
||||
compiler.objcopy.cmd=arm-none-eabi-objcopy
|
||||
compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0
|
||||
compiler.elf2hex.bin.flags=-O binary
|
||||
compiler.elf2hex.hex.flags=-O ihex -R .eeprom
|
||||
compiler.elf2hex.cmd=arm-none-eabi-objcopy
|
||||
compiler.ldflags=-mcpu={build.mcu} -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align
|
||||
compiler.size.cmd=arm-none-eabi-size
|
||||
compiler.define=-DARDUINO=
|
||||
compiler.readelf.cmd=arm-none-eabi-readelf
|
||||
|
||||
# this can be overriden in boards.txt
|
||||
build.extra_flags=
|
||||
build.cache_flags=
|
||||
build.flags.optimize=
|
||||
build.flags.maxspi=
|
||||
build.flags.maxqspi=
|
||||
build.flags.usbstack=
|
||||
build.flags.debug=
|
||||
|
||||
# These can be overridden in platform.local.txt
|
||||
compiler.c.extra_flags=
|
||||
compiler.c.elf.extra_flags=
|
||||
#compiler.c.elf.extra_flags=-v
|
||||
compiler.cpp.extra_flags=
|
||||
compiler.S.extra_flags=
|
||||
compiler.ar.extra_flags=
|
||||
compiler.elf2hex.extra_flags=
|
||||
|
||||
compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Core/Include/" "-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/DSP/Include/" "-I{runtime.tools.CMSIS-Atmel-1.2.1.path}/CMSIS/Device/ATMEL/"
|
||||
compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Lib/GCC/" -larm_cortexM0l_math
|
||||
|
||||
compiler.libraries.ldflags=
|
||||
|
||||
# USB Flags
|
||||
# ---------
|
||||
build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON -DUSB_CONFIG_POWER={build.usb_power} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' {build.flags.usbstack} {build.flags.debug} "-I{build.core.path}/TinyUSB" "-I{build.core.path}/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-I{build.core.path}/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src"
|
||||
|
||||
# Default advertised device power setting in mA
|
||||
build.usb_power=100
|
||||
|
||||
# Default usb manufacturer will be replaced at compile time using
|
||||
# numeric vendor ID if available or by board's specific value.
|
||||
build.usb_manufacturer="Unknown"
|
||||
|
||||
|
||||
# Compile patterns
|
||||
# ----------------
|
||||
|
||||
## Compile c files
|
||||
## KH Add -DBOARD_NAME="{build.board}"
|
||||
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}"
|
||||
|
||||
## Compile c++ files
|
||||
## KH Add -DBOARD_NAME="{build.board}"
|
||||
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}"
|
||||
|
||||
## Compile S files
|
||||
## KH Add -DBOARD_NAME="{build.board}"
|
||||
recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.cache_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}"
|
||||
|
||||
## Create archives
|
||||
# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value
|
||||
archive_file_path={build.path}/{archive_file}
|
||||
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"
|
||||
|
||||
## Combine gc-sections, archives, and objects
|
||||
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} {compiler.libraries.ldflags} -Wl,--start-group {compiler.arm.cmsis.ldflags} "-L{build.variant.path}" -lm "{build.path}/{archive_file}" -Wl,--end-group
|
||||
|
||||
## Create output (bin file)
|
||||
recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.bin.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin"
|
||||
|
||||
## Create output (hex file)
|
||||
recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex"
|
||||
|
||||
build.preferred_out_format=bin
|
||||
|
||||
## Save hex
|
||||
recipe.output.tmp_file={build.project_name}.{build.preferred_out_format}
|
||||
recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_out_format}
|
||||
|
||||
## Compute size
|
||||
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
|
||||
recipe.size.regex=\.text\s+([0-9]+).*
|
||||
|
||||
#
|
||||
# BOSSA
|
||||
#
|
||||
tools.bossac.path={runtime.tools.bossac-1.7.0-arduino3.path}
|
||||
tools.bossac.cmd=bossac
|
||||
tools.bossac.cmd.windows=bossac.exe
|
||||
|
||||
tools.bossac.upload.params.verbose=-i -d
|
||||
tools.bossac.upload.params.quiet=
|
||||
tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -i -e -w -v "{build.path}/{build.project_name}.bin" -R
|
||||
|
||||
tools.bossac_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R
|
||||
|
||||
tools.bossac.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA
|
||||
tools.bossac.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b
|
||||
|
||||
# v1.8.0
|
||||
|
||||
tools.bossac18.path={runtime.tools.bossac-1.8.0-48-gb176eee.path}
|
||||
tools.bossac18.cmd=bossac
|
||||
|
||||
tools.bossac18.upload.params.verbose=-i -d
|
||||
tools.bossac18.upload.params.quiet=
|
||||
tools.bossac18.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U -i --offset={upload.offset} -w -v "{build.path}/{build.project_name}.bin" -R
|
||||
|
||||
tools.bossac18.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA
|
||||
tools.bossac18.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b
|
||||
|
||||
#
|
||||
# BOSSA (ignore binary size)
|
||||
#
|
||||
tools.bossacI.path={runtime.tools.bossac-1.7.0-arduino3.path}
|
||||
tools.bossacI.cmd=bossac
|
||||
tools.bossacI.cmd.windows=bossac.exe
|
||||
|
||||
tools.bossacI.upload.params.verbose=-i -d
|
||||
tools.bossacI.upload.params.quiet=
|
||||
tools.bossacI.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -I -U {upload.native_usb} -i -e -w "{build.path}/{build.project_name}.bin" -R
|
||||
|
||||
tools.bossacI_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R
|
||||
|
||||
tools.bossacI.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA
|
||||
tools.bossacI.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b
|
||||
|
||||
|
||||
#
|
||||
# OpenOCD sketch upload
|
||||
#
|
||||
|
||||
tools.openocd.path={runtime.tools.openocd-0.10.0-arduino7.path}
|
||||
tools.openocd.cmd=bin/openocd
|
||||
tools.openocd.cmd.windows=bin/openocd.exe
|
||||
|
||||
tools.openocd.upload.params.verbose=-d2
|
||||
tools.openocd.upload.params.quiet=-d0
|
||||
tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset 0x2000; shutdown"
|
||||
|
||||
tools.openocd.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA
|
||||
tools.openocd.upload.network_pattern={network_cmd} -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b
|
||||
|
||||
# Program flashes the binary at 0x0000, so use the linker script without_bootloader
|
||||
tools.openocd.program.params.verbose=-d2
|
||||
tools.openocd.program.params.quiet=-d0
|
||||
tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown"
|
||||
|
||||
tools.openocd.erase.params.verbose=-d3
|
||||
tools.openocd.erase.params.quiet=-d0
|
||||
tools.openocd.erase.pattern=
|
||||
|
||||
tools.openocd.bootloader.params.verbose=-d2
|
||||
tools.openocd.bootloader.params.quiet=-d0
|
||||
tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown"
|
||||
|
||||
#
|
||||
# OpenOCD sketch upload - version with configurable bootloader size
|
||||
# FIXME: this programmer is a workaround for default options being overwritten by uploadUsingPreferences
|
||||
#
|
||||
|
||||
tools.openocd-withbootsize.path={runtime.tools.openocd-0.10.0-arduino7.path}
|
||||
tools.openocd-withbootsize.cmd=bin/openocd
|
||||
tools.openocd-withbootsize.cmd.windows=bin/openocd.exe
|
||||
|
||||
tools.openocd-withbootsize.upload.params.verbose=-d2
|
||||
tools.openocd-withbootsize.upload.params.quiet=-d0
|
||||
tools.openocd-withbootsize.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset {bootloader.size}; shutdown"
|
||||
|
||||
# Program flashes the binary at 0x0000, so use the linker script without_bootloader
|
||||
tools.openocd-withbootsize.program.params.verbose=-d2
|
||||
tools.openocd-withbootsize.program.params.quiet=-d0
|
||||
tools.openocd-withbootsize.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown"
|
||||
|
||||
tools.openocd-withbootsize.erase.params.verbose=-d3
|
||||
tools.openocd-withbootsize.erase.params.quiet=-d0
|
||||
tools.openocd-withbootsize.erase.pattern=
|
||||
|
||||
tools.openocd-withbootsize.bootloader.params.verbose=-d2
|
||||
tools.openocd-withbootsize.bootloader.params.quiet=-d0
|
||||
tools.openocd-withbootsize.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown"
|
||||
@@ -0,0 +1,226 @@
|
||||
# Copyright (c) 2014-2015 Arduino LLC. All right reserved.
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
# Arduino SAMD Core and platform.
|
||||
#
|
||||
# For more info:
|
||||
# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification
|
||||
|
||||
name=Adafruit SAMD (32-bits ARM Cortex-M0+ and Cortex-M4) Boards
|
||||
version=1.7.0
|
||||
|
||||
# Compile variables
|
||||
# -----------------
|
||||
|
||||
compiler.warning_flags=-w
|
||||
compiler.warning_flags.none=-w
|
||||
compiler.warning_flags.default=
|
||||
compiler.warning_flags.more=-Wall -Wno-expansion-to-defined
|
||||
compiler.warning_flags.all=-Wall -Wextra -Wno-expansion-to-defined
|
||||
|
||||
compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/
|
||||
compiler.c.cmd=arm-none-eabi-gcc
|
||||
compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD -D__SKETCH_NAME__="""{build.project_name}"""
|
||||
compiler.c.elf.cmd=arm-none-eabi-g++
|
||||
compiler.c.elf.flags=-Os -Wl,--gc-sections -save-temps
|
||||
compiler.S.cmd=arm-none-eabi-gcc
|
||||
compiler.S.flags=-c -g -x assembler-with-cpp -MMD
|
||||
compiler.cpp.cmd=arm-none-eabi-g++
|
||||
compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -D__SKETCH_NAME__="""{build.project_name}"""
|
||||
compiler.ar.cmd=arm-none-eabi-ar
|
||||
compiler.ar.flags=rcs
|
||||
compiler.objcopy.cmd=arm-none-eabi-objcopy
|
||||
compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0
|
||||
compiler.elf2hex.bin.flags=-O binary
|
||||
compiler.elf2hex.hex.flags=-O ihex -R .eeprom
|
||||
compiler.elf2hex.cmd=arm-none-eabi-objcopy
|
||||
compiler.ldflags=-mcpu={build.mcu} -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align
|
||||
compiler.size.cmd=arm-none-eabi-size
|
||||
compiler.define=-DARDUINO=
|
||||
compiler.readelf.cmd=arm-none-eabi-readelf
|
||||
|
||||
# this can be overriden in boards.txt
|
||||
build.extra_flags=
|
||||
build.cache_flags=
|
||||
build.flags.optimize=
|
||||
build.flags.maxspi=
|
||||
build.flags.maxqspi=
|
||||
build.flags.usbstack=
|
||||
build.flags.debug=
|
||||
|
||||
# These can be overridden in platform.local.txt
|
||||
compiler.c.extra_flags=
|
||||
compiler.c.elf.extra_flags=
|
||||
#compiler.c.elf.extra_flags=-v
|
||||
compiler.cpp.extra_flags=
|
||||
compiler.S.extra_flags=
|
||||
compiler.ar.extra_flags=
|
||||
compiler.elf2hex.extra_flags=
|
||||
|
||||
compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Core/Include/" "-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/DSP/Include/" "-I{runtime.tools.CMSIS-Atmel-1.2.1.path}/CMSIS/Device/ATMEL/"
|
||||
compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Lib/GCC/" -larm_cortexM0l_math
|
||||
|
||||
compiler.libraries.ldflags=
|
||||
|
||||
# USB Flags
|
||||
# ---------
|
||||
build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON -DUSB_CONFIG_POWER={build.usb_power} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' {build.flags.usbstack} {build.flags.debug} "-I{runtime.platform.path}/libraries/Adafruit_TinyUSB_Arduino/src/arduino"
|
||||
|
||||
# Default advertised device power setting in mA
|
||||
build.usb_power=100
|
||||
|
||||
# Default usb manufacturer will be replaced at compile time using
|
||||
# numeric vendor ID if available or by board's specific value.
|
||||
build.usb_manufacturer="Unknown"
|
||||
|
||||
|
||||
# Compile patterns
|
||||
# ----------------
|
||||
|
||||
## Compile c files
|
||||
## KH Add -DBOARD_NAME="{build.board}"
|
||||
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}"
|
||||
|
||||
## Compile c++ files
|
||||
## KH Add -DBOARD_NAME="{build.board}"
|
||||
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}"
|
||||
|
||||
## Compile S files
|
||||
## KH Add -DBOARD_NAME="{build.board}"
|
||||
recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.cache_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}"
|
||||
|
||||
## Create archives
|
||||
# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value
|
||||
archive_file_path={build.path}/{archive_file}
|
||||
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"
|
||||
|
||||
## Combine gc-sections, archives, and objects
|
||||
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} {compiler.libraries.ldflags} -Wl,--start-group {compiler.arm.cmsis.ldflags} "-L{build.variant.path}" -lm "{build.path}/{archive_file}" -Wl,--end-group
|
||||
|
||||
## Create output (bin file)
|
||||
recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.bin.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin"
|
||||
|
||||
## Create output (hex file)
|
||||
recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex"
|
||||
|
||||
build.preferred_out_format=bin
|
||||
|
||||
## Save hex
|
||||
recipe.output.tmp_file={build.project_name}.{build.preferred_out_format}
|
||||
recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_out_format}
|
||||
|
||||
## Compute size
|
||||
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
|
||||
recipe.size.regex=\.text\s+([0-9]+).*
|
||||
|
||||
#
|
||||
# BOSSA
|
||||
#
|
||||
tools.bossac.path={runtime.tools.bossac-1.7.0-arduino3.path}
|
||||
tools.bossac.cmd=bossac
|
||||
tools.bossac.cmd.windows=bossac.exe
|
||||
|
||||
tools.bossac.upload.params.verbose=-i -d
|
||||
tools.bossac.upload.params.quiet=
|
||||
tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -i -e -w -v "{build.path}/{build.project_name}.bin" -R
|
||||
|
||||
tools.bossac_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R
|
||||
|
||||
tools.bossac.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA
|
||||
tools.bossac.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b
|
||||
|
||||
# v1.8.0
|
||||
|
||||
tools.bossac18.path={runtime.tools.bossac-1.8.0-48-gb176eee.path}
|
||||
tools.bossac18.cmd=bossac
|
||||
|
||||
tools.bossac18.upload.params.verbose=-i -d
|
||||
tools.bossac18.upload.params.quiet=
|
||||
tools.bossac18.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U -i --offset={upload.offset} -w -v "{build.path}/{build.project_name}.bin" -R
|
||||
|
||||
tools.bossac18.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA
|
||||
tools.bossac18.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b
|
||||
|
||||
#
|
||||
# BOSSA (ignore binary size)
|
||||
#
|
||||
tools.bossacI.path={runtime.tools.bossac-1.7.0-arduino3.path}
|
||||
tools.bossacI.cmd=bossac
|
||||
tools.bossacI.cmd.windows=bossac.exe
|
||||
|
||||
tools.bossacI.upload.params.verbose=-i -d
|
||||
tools.bossacI.upload.params.quiet=
|
||||
tools.bossacI.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -I -U {upload.native_usb} -i -e -w "{build.path}/{build.project_name}.bin" -R
|
||||
|
||||
tools.bossacI_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R
|
||||
|
||||
tools.bossacI.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA
|
||||
tools.bossacI.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b
|
||||
|
||||
|
||||
#
|
||||
# OpenOCD sketch upload
|
||||
#
|
||||
|
||||
tools.openocd.path={runtime.tools.openocd-0.10.0-arduino7.path}
|
||||
tools.openocd.cmd=bin/openocd
|
||||
tools.openocd.cmd.windows=bin/openocd.exe
|
||||
|
||||
tools.openocd.upload.params.verbose=-d2
|
||||
tools.openocd.upload.params.quiet=-d0
|
||||
tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset 0x2000; shutdown"
|
||||
|
||||
tools.openocd.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA
|
||||
tools.openocd.upload.network_pattern={network_cmd} -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b
|
||||
|
||||
# Program flashes the binary at 0x0000, so use the linker script without_bootloader
|
||||
tools.openocd.program.params.verbose=-d2
|
||||
tools.openocd.program.params.quiet=-d0
|
||||
tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown"
|
||||
|
||||
tools.openocd.erase.params.verbose=-d3
|
||||
tools.openocd.erase.params.quiet=-d0
|
||||
tools.openocd.erase.pattern=
|
||||
|
||||
tools.openocd.bootloader.params.verbose=-d2
|
||||
tools.openocd.bootloader.params.quiet=-d0
|
||||
tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown"
|
||||
|
||||
#
|
||||
# OpenOCD sketch upload - version with configurable bootloader size
|
||||
# FIXME: this programmer is a workaround for default options being overwritten by uploadUsingPreferences
|
||||
#
|
||||
|
||||
tools.openocd-withbootsize.path={runtime.tools.openocd-0.10.0-arduino7.path}
|
||||
tools.openocd-withbootsize.cmd=bin/openocd
|
||||
tools.openocd-withbootsize.cmd.windows=bin/openocd.exe
|
||||
|
||||
tools.openocd-withbootsize.upload.params.verbose=-d2
|
||||
tools.openocd-withbootsize.upload.params.quiet=-d0
|
||||
tools.openocd-withbootsize.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset {bootloader.size}; shutdown"
|
||||
|
||||
# Program flashes the binary at 0x0000, so use the linker script without_bootloader
|
||||
tools.openocd-withbootsize.program.params.verbose=-d2
|
||||
tools.openocd-withbootsize.program.params.quiet=-d0
|
||||
tools.openocd-withbootsize.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown"
|
||||
|
||||
tools.openocd-withbootsize.erase.params.verbose=-d3
|
||||
tools.openocd-withbootsize.erase.params.quiet=-d0
|
||||
tools.openocd-withbootsize.erase.pattern=
|
||||
|
||||
tools.openocd-withbootsize.bootloader.params.verbose=-d2
|
||||
tools.openocd-withbootsize.bootloader.params.quiet=-d0
|
||||
tools.openocd-withbootsize.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown"
|
||||
@@ -0,0 +1,226 @@
|
||||
# Copyright (c) 2014-2015 Arduino LLC. All right reserved.
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
# Arduino SAMD Core and platform.
|
||||
#
|
||||
# For more info:
|
||||
# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification
|
||||
|
||||
name=Adafruit SAMD (32-bits ARM Cortex-M0+ and Cortex-M4) Boards
|
||||
version=1.7.1
|
||||
|
||||
# Compile variables
|
||||
# -----------------
|
||||
|
||||
compiler.warning_flags=-w
|
||||
compiler.warning_flags.none=-w
|
||||
compiler.warning_flags.default=
|
||||
compiler.warning_flags.more=-Wall -Wno-expansion-to-defined
|
||||
compiler.warning_flags.all=-Wall -Wextra -Wno-expansion-to-defined
|
||||
|
||||
compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/
|
||||
compiler.c.cmd=arm-none-eabi-gcc
|
||||
compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD -D__SKETCH_NAME__="""{build.project_name}"""
|
||||
compiler.c.elf.cmd=arm-none-eabi-g++
|
||||
compiler.c.elf.flags=-Os -Wl,--gc-sections -save-temps
|
||||
compiler.S.cmd=arm-none-eabi-gcc
|
||||
compiler.S.flags=-c -g -x assembler-with-cpp -MMD
|
||||
compiler.cpp.cmd=arm-none-eabi-g++
|
||||
compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -D__SKETCH_NAME__="""{build.project_name}"""
|
||||
compiler.ar.cmd=arm-none-eabi-ar
|
||||
compiler.ar.flags=rcs
|
||||
compiler.objcopy.cmd=arm-none-eabi-objcopy
|
||||
compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0
|
||||
compiler.elf2hex.bin.flags=-O binary
|
||||
compiler.elf2hex.hex.flags=-O ihex -R .eeprom
|
||||
compiler.elf2hex.cmd=arm-none-eabi-objcopy
|
||||
compiler.ldflags=-mcpu={build.mcu} -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align
|
||||
compiler.size.cmd=arm-none-eabi-size
|
||||
compiler.define=-DARDUINO=
|
||||
compiler.readelf.cmd=arm-none-eabi-readelf
|
||||
|
||||
# this can be overriden in boards.txt
|
||||
build.extra_flags=
|
||||
build.cache_flags=
|
||||
build.flags.optimize=
|
||||
build.flags.maxspi=
|
||||
build.flags.maxqspi=
|
||||
build.flags.usbstack=
|
||||
build.flags.debug=
|
||||
|
||||
# These can be overridden in platform.local.txt
|
||||
compiler.c.extra_flags=
|
||||
compiler.c.elf.extra_flags=
|
||||
#compiler.c.elf.extra_flags=-v
|
||||
compiler.cpp.extra_flags=
|
||||
compiler.S.extra_flags=
|
||||
compiler.ar.extra_flags=
|
||||
compiler.elf2hex.extra_flags=
|
||||
|
||||
compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Core/Include/" "-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/DSP/Include/" "-I{runtime.tools.CMSIS-Atmel-1.2.2.path}/CMSIS/Device/ATMEL/"
|
||||
compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Lib/GCC/" -larm_cortexM0l_math
|
||||
|
||||
compiler.libraries.ldflags=
|
||||
|
||||
# USB Flags
|
||||
# ---------
|
||||
build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON -DUSB_CONFIG_POWER={build.usb_power} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' {build.flags.usbstack} {build.flags.debug} "-I{runtime.platform.path}/libraries/Adafruit_TinyUSB_Arduino/src/arduino"
|
||||
|
||||
# Default advertised device power setting in mA
|
||||
build.usb_power=100
|
||||
|
||||
# Default usb manufacturer will be replaced at compile time using
|
||||
# numeric vendor ID if available or by board's specific value.
|
||||
build.usb_manufacturer="Unknown"
|
||||
|
||||
|
||||
# Compile patterns
|
||||
# ----------------
|
||||
|
||||
## Compile c files
|
||||
## KH Add -DBOARD_NAME="{build.board}"
|
||||
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}"
|
||||
|
||||
## Compile c++ files
|
||||
## KH Add -DBOARD_NAME="{build.board}"
|
||||
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}"
|
||||
|
||||
## Compile S files
|
||||
## KH Add -DBOARD_NAME="{build.board}"
|
||||
recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.cache_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}"
|
||||
|
||||
## Create archives
|
||||
# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value
|
||||
archive_file_path={build.path}/{archive_file}
|
||||
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"
|
||||
|
||||
## Combine gc-sections, archives, and objects
|
||||
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} {compiler.libraries.ldflags} -Wl,--start-group {compiler.arm.cmsis.ldflags} "-L{build.variant.path}" -lm "{build.path}/{archive_file}" -Wl,--end-group
|
||||
|
||||
## Create output (bin file)
|
||||
recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.bin.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin"
|
||||
|
||||
## Create output (hex file)
|
||||
recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex"
|
||||
|
||||
build.preferred_out_format=bin
|
||||
|
||||
## Save hex
|
||||
recipe.output.tmp_file={build.project_name}.{build.preferred_out_format}
|
||||
recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_out_format}
|
||||
|
||||
## Compute size
|
||||
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
|
||||
recipe.size.regex=\.text\s+([0-9]+).*
|
||||
|
||||
#
|
||||
# BOSSA
|
||||
#
|
||||
tools.bossac.path={runtime.tools.bossac-1.7.0-arduino3.path}
|
||||
tools.bossac.cmd=bossac
|
||||
tools.bossac.cmd.windows=bossac.exe
|
||||
|
||||
tools.bossac.upload.params.verbose=-i -d
|
||||
tools.bossac.upload.params.quiet=
|
||||
tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -i -e -w -v "{build.path}/{build.project_name}.bin" -R
|
||||
|
||||
tools.bossac_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R
|
||||
|
||||
tools.bossac.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA
|
||||
tools.bossac.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b
|
||||
|
||||
# v1.8.0
|
||||
|
||||
tools.bossac18.path={runtime.tools.bossac-1.8.0-48-gb176eee.path}
|
||||
tools.bossac18.cmd=bossac
|
||||
|
||||
tools.bossac18.upload.params.verbose=-i -d
|
||||
tools.bossac18.upload.params.quiet=
|
||||
tools.bossac18.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U -i --offset={upload.offset} -w -v "{build.path}/{build.project_name}.bin" -R
|
||||
|
||||
tools.bossac18.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA
|
||||
tools.bossac18.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b
|
||||
|
||||
#
|
||||
# BOSSA (ignore binary size)
|
||||
#
|
||||
tools.bossacI.path={runtime.tools.bossac-1.7.0-arduino3.path}
|
||||
tools.bossacI.cmd=bossac
|
||||
tools.bossacI.cmd.windows=bossac.exe
|
||||
|
||||
tools.bossacI.upload.params.verbose=-i -d
|
||||
tools.bossacI.upload.params.quiet=
|
||||
tools.bossacI.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -I -U {upload.native_usb} -i -e -w "{build.path}/{build.project_name}.bin" -R
|
||||
|
||||
tools.bossacI_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R
|
||||
|
||||
tools.bossacI.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA
|
||||
tools.bossacI.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b
|
||||
|
||||
|
||||
#
|
||||
# OpenOCD sketch upload
|
||||
#
|
||||
|
||||
tools.openocd.path={runtime.tools.openocd-0.10.0-arduino7.path}
|
||||
tools.openocd.cmd=bin/openocd
|
||||
tools.openocd.cmd.windows=bin/openocd.exe
|
||||
|
||||
tools.openocd.upload.params.verbose=-d2
|
||||
tools.openocd.upload.params.quiet=-d0
|
||||
tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset 0x2000; shutdown"
|
||||
|
||||
tools.openocd.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA
|
||||
tools.openocd.upload.network_pattern={network_cmd} -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b
|
||||
|
||||
# Program flashes the binary at 0x0000, so use the linker script without_bootloader
|
||||
tools.openocd.program.params.verbose=-d2
|
||||
tools.openocd.program.params.quiet=-d0
|
||||
tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown"
|
||||
|
||||
tools.openocd.erase.params.verbose=-d3
|
||||
tools.openocd.erase.params.quiet=-d0
|
||||
tools.openocd.erase.pattern=
|
||||
|
||||
tools.openocd.bootloader.params.verbose=-d2
|
||||
tools.openocd.bootloader.params.quiet=-d0
|
||||
tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown"
|
||||
|
||||
#
|
||||
# OpenOCD sketch upload - version with configurable bootloader size
|
||||
# FIXME: this programmer is a workaround for default options being overwritten by uploadUsingPreferences
|
||||
#
|
||||
|
||||
tools.openocd-withbootsize.path={runtime.tools.openocd-0.10.0-arduino7.path}
|
||||
tools.openocd-withbootsize.cmd=bin/openocd
|
||||
tools.openocd-withbootsize.cmd.windows=bin/openocd.exe
|
||||
|
||||
tools.openocd-withbootsize.upload.params.verbose=-d2
|
||||
tools.openocd-withbootsize.upload.params.quiet=-d0
|
||||
tools.openocd-withbootsize.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset {bootloader.size}; shutdown"
|
||||
|
||||
# Program flashes the binary at 0x0000, so use the linker script without_bootloader
|
||||
tools.openocd-withbootsize.program.params.verbose=-d2
|
||||
tools.openocd-withbootsize.program.params.quiet=-d0
|
||||
tools.openocd-withbootsize.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown"
|
||||
|
||||
tools.openocd-withbootsize.erase.params.verbose=-d3
|
||||
tools.openocd-withbootsize.erase.params.quiet=-d0
|
||||
tools.openocd-withbootsize.erase.pattern=
|
||||
|
||||
tools.openocd-withbootsize.bootloader.params.verbose=-d2
|
||||
tools.openocd-withbootsize.bootloader.params.quiet=-d0
|
||||
tools.openocd-withbootsize.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown"
|
||||
@@ -0,0 +1,226 @@
|
||||
# Copyright (c) 2014-2015 Arduino LLC. All right reserved.
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
# Arduino SAMD Core and platform.
|
||||
#
|
||||
# For more info:
|
||||
# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification
|
||||
|
||||
name=Adafruit SAMD (32-bits ARM Cortex-M0+ and Cortex-M4) Boards
|
||||
version=1.7.2
|
||||
|
||||
# Compile variables
|
||||
# -----------------
|
||||
|
||||
compiler.warning_flags=-w
|
||||
compiler.warning_flags.none=-w
|
||||
compiler.warning_flags.default=
|
||||
compiler.warning_flags.more=-Wall -Wno-expansion-to-defined
|
||||
compiler.warning_flags.all=-Wall -Wextra -Wno-expansion-to-defined
|
||||
|
||||
compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/
|
||||
compiler.c.cmd=arm-none-eabi-gcc
|
||||
compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD -D__SKETCH_NAME__="""{build.project_name}"""
|
||||
compiler.c.elf.cmd=arm-none-eabi-g++
|
||||
compiler.c.elf.flags=-Os -Wl,--gc-sections -save-temps
|
||||
compiler.S.cmd=arm-none-eabi-gcc
|
||||
compiler.S.flags=-c -g -x assembler-with-cpp -MMD
|
||||
compiler.cpp.cmd=arm-none-eabi-g++
|
||||
compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -D__SKETCH_NAME__="""{build.project_name}"""
|
||||
compiler.ar.cmd=arm-none-eabi-ar
|
||||
compiler.ar.flags=rcs
|
||||
compiler.objcopy.cmd=arm-none-eabi-objcopy
|
||||
compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0
|
||||
compiler.elf2hex.bin.flags=-O binary
|
||||
compiler.elf2hex.hex.flags=-O ihex -R .eeprom
|
||||
compiler.elf2hex.cmd=arm-none-eabi-objcopy
|
||||
compiler.ldflags=-mcpu={build.mcu} -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align
|
||||
compiler.size.cmd=arm-none-eabi-size
|
||||
compiler.define=-DARDUINO=
|
||||
compiler.readelf.cmd=arm-none-eabi-readelf
|
||||
|
||||
# this can be overriden in boards.txt
|
||||
build.extra_flags=
|
||||
build.cache_flags=
|
||||
build.flags.optimize=
|
||||
build.flags.maxspi=
|
||||
build.flags.maxqspi=
|
||||
build.flags.usbstack=
|
||||
build.flags.debug=
|
||||
|
||||
# These can be overridden in platform.local.txt
|
||||
compiler.c.extra_flags=
|
||||
compiler.c.elf.extra_flags=
|
||||
#compiler.c.elf.extra_flags=-v
|
||||
compiler.cpp.extra_flags=
|
||||
compiler.S.extra_flags=
|
||||
compiler.ar.extra_flags=
|
||||
compiler.elf2hex.extra_flags=
|
||||
|
||||
compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Core/Include/" "-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/DSP/Include/" "-I{runtime.tools.CMSIS-Atmel-1.2.2.path}/CMSIS/Device/ATMEL/"
|
||||
compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Lib/GCC/" -larm_cortexM0l_math
|
||||
|
||||
compiler.libraries.ldflags=
|
||||
|
||||
# USB Flags
|
||||
# ---------
|
||||
build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON -DUSB_CONFIG_POWER={build.usb_power} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' {build.flags.usbstack} {build.flags.debug} "-I{runtime.platform.path}/libraries/Adafruit_TinyUSB_Arduino/src/arduino"
|
||||
|
||||
# Default advertised device power setting in mA
|
||||
build.usb_power=100
|
||||
|
||||
# Default usb manufacturer will be replaced at compile time using
|
||||
# numeric vendor ID if available or by board's specific value.
|
||||
build.usb_manufacturer="Unknown"
|
||||
|
||||
|
||||
# Compile patterns
|
||||
# ----------------
|
||||
|
||||
## Compile c files
|
||||
## KH Add -DBOARD_NAME="{build.board}"
|
||||
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}"
|
||||
|
||||
## Compile c++ files
|
||||
## KH Add -DBOARD_NAME="{build.board}"
|
||||
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}"
|
||||
|
||||
## Compile S files
|
||||
## KH Add -DBOARD_NAME="{build.board}"
|
||||
recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.cache_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}"
|
||||
|
||||
## Create archives
|
||||
# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value
|
||||
archive_file_path={build.path}/{archive_file}
|
||||
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"
|
||||
|
||||
## Combine gc-sections, archives, and objects
|
||||
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} {compiler.libraries.ldflags} -Wl,--start-group {compiler.arm.cmsis.ldflags} "-L{build.variant.path}" -lm "{build.path}/{archive_file}" -Wl,--end-group
|
||||
|
||||
## Create output (bin file)
|
||||
recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.bin.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin"
|
||||
|
||||
## Create output (hex file)
|
||||
recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex"
|
||||
|
||||
build.preferred_out_format=bin
|
||||
|
||||
## Save hex
|
||||
recipe.output.tmp_file={build.project_name}.{build.preferred_out_format}
|
||||
recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_out_format}
|
||||
|
||||
## Compute size
|
||||
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
|
||||
recipe.size.regex=\.text\s+([0-9]+).*
|
||||
|
||||
#
|
||||
# BOSSA
|
||||
#
|
||||
tools.bossac.path={runtime.tools.bossac-1.7.0-arduino3.path}
|
||||
tools.bossac.cmd=bossac
|
||||
tools.bossac.cmd.windows=bossac.exe
|
||||
|
||||
tools.bossac.upload.params.verbose=-i -d
|
||||
tools.bossac.upload.params.quiet=
|
||||
tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -i -e -w -v "{build.path}/{build.project_name}.bin" -R
|
||||
|
||||
tools.bossac_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R
|
||||
|
||||
tools.bossac.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA
|
||||
tools.bossac.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b
|
||||
|
||||
# v1.8.0
|
||||
|
||||
tools.bossac18.path={runtime.tools.bossac-1.8.0-48-gb176eee.path}
|
||||
tools.bossac18.cmd=bossac
|
||||
|
||||
tools.bossac18.upload.params.verbose=-i -d
|
||||
tools.bossac18.upload.params.quiet=
|
||||
tools.bossac18.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U -i --offset={upload.offset} -w -v "{build.path}/{build.project_name}.bin" -R
|
||||
|
||||
tools.bossac18.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA
|
||||
tools.bossac18.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b
|
||||
|
||||
#
|
||||
# BOSSA (ignore binary size)
|
||||
#
|
||||
tools.bossacI.path={runtime.tools.bossac-1.7.0-arduino3.path}
|
||||
tools.bossacI.cmd=bossac
|
||||
tools.bossacI.cmd.windows=bossac.exe
|
||||
|
||||
tools.bossacI.upload.params.verbose=-i -d
|
||||
tools.bossacI.upload.params.quiet=
|
||||
tools.bossacI.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -I -U {upload.native_usb} -i -e -w "{build.path}/{build.project_name}.bin" -R
|
||||
|
||||
tools.bossacI_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R
|
||||
|
||||
tools.bossacI.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA
|
||||
tools.bossacI.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b
|
||||
|
||||
|
||||
#
|
||||
# OpenOCD sketch upload
|
||||
#
|
||||
|
||||
tools.openocd.path={runtime.tools.openocd-0.10.0-arduino7.path}
|
||||
tools.openocd.cmd=bin/openocd
|
||||
tools.openocd.cmd.windows=bin/openocd.exe
|
||||
|
||||
tools.openocd.upload.params.verbose=-d2
|
||||
tools.openocd.upload.params.quiet=-d0
|
||||
tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset 0x2000; shutdown"
|
||||
|
||||
tools.openocd.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA
|
||||
tools.openocd.upload.network_pattern={network_cmd} -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b
|
||||
|
||||
# Program flashes the binary at 0x0000, so use the linker script without_bootloader
|
||||
tools.openocd.program.params.verbose=-d2
|
||||
tools.openocd.program.params.quiet=-d0
|
||||
tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown"
|
||||
|
||||
tools.openocd.erase.params.verbose=-d3
|
||||
tools.openocd.erase.params.quiet=-d0
|
||||
tools.openocd.erase.pattern=
|
||||
|
||||
tools.openocd.bootloader.params.verbose=-d2
|
||||
tools.openocd.bootloader.params.quiet=-d0
|
||||
tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown"
|
||||
|
||||
#
|
||||
# OpenOCD sketch upload - version with configurable bootloader size
|
||||
# FIXME: this programmer is a workaround for default options being overwritten by uploadUsingPreferences
|
||||
#
|
||||
|
||||
tools.openocd-withbootsize.path={runtime.tools.openocd-0.10.0-arduino7.path}
|
||||
tools.openocd-withbootsize.cmd=bin/openocd
|
||||
tools.openocd-withbootsize.cmd.windows=bin/openocd.exe
|
||||
|
||||
tools.openocd-withbootsize.upload.params.verbose=-d2
|
||||
tools.openocd-withbootsize.upload.params.quiet=-d0
|
||||
tools.openocd-withbootsize.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset {bootloader.size}; shutdown"
|
||||
|
||||
# Program flashes the binary at 0x0000, so use the linker script without_bootloader
|
||||
tools.openocd-withbootsize.program.params.verbose=-d2
|
||||
tools.openocd-withbootsize.program.params.quiet=-d0
|
||||
tools.openocd-withbootsize.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown"
|
||||
|
||||
tools.openocd-withbootsize.erase.params.verbose=-d3
|
||||
tools.openocd-withbootsize.erase.params.quiet=-d0
|
||||
tools.openocd-withbootsize.erase.pattern=
|
||||
|
||||
tools.openocd-withbootsize.bootloader.params.verbose=-d2
|
||||
tools.openocd-withbootsize.bootloader.params.quiet=-d0
|
||||
tools.openocd-withbootsize.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown"
|
||||
@@ -0,0 +1,226 @@
|
||||
# Copyright (c) 2014-2015 Arduino LLC. All right reserved.
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
# Arduino SAMD Core and platform.
|
||||
#
|
||||
# For more info:
|
||||
# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification
|
||||
|
||||
name=Adafruit SAMD (32-bits ARM Cortex-M0+ and Cortex-M4) Boards
|
||||
version=1.7.3
|
||||
|
||||
# Compile variables
|
||||
# -----------------
|
||||
|
||||
compiler.warning_flags=-w
|
||||
compiler.warning_flags.none=-w
|
||||
compiler.warning_flags.default=
|
||||
compiler.warning_flags.more=-Wall -Wno-expansion-to-defined
|
||||
compiler.warning_flags.all=-Wall -Wextra -Wno-expansion-to-defined
|
||||
|
||||
compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/
|
||||
compiler.c.cmd=arm-none-eabi-gcc
|
||||
compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD -D__SKETCH_NAME__="""{build.project_name}"""
|
||||
compiler.c.elf.cmd=arm-none-eabi-g++
|
||||
compiler.c.elf.flags=-Os -Wl,--gc-sections -save-temps
|
||||
compiler.S.cmd=arm-none-eabi-gcc
|
||||
compiler.S.flags=-c -g -x assembler-with-cpp -MMD
|
||||
compiler.cpp.cmd=arm-none-eabi-g++
|
||||
compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -D__SKETCH_NAME__="""{build.project_name}"""
|
||||
compiler.ar.cmd=arm-none-eabi-ar
|
||||
compiler.ar.flags=rcs
|
||||
compiler.objcopy.cmd=arm-none-eabi-objcopy
|
||||
compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0
|
||||
compiler.elf2hex.bin.flags=-O binary
|
||||
compiler.elf2hex.hex.flags=-O ihex -R .eeprom
|
||||
compiler.elf2hex.cmd=arm-none-eabi-objcopy
|
||||
compiler.ldflags=-mcpu={build.mcu} -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align
|
||||
compiler.size.cmd=arm-none-eabi-size
|
||||
compiler.define=-DARDUINO=
|
||||
compiler.readelf.cmd=arm-none-eabi-readelf
|
||||
|
||||
# this can be overriden in boards.txt
|
||||
build.extra_flags=
|
||||
build.cache_flags=
|
||||
build.flags.optimize=
|
||||
build.flags.maxspi=
|
||||
build.flags.maxqspi=
|
||||
build.flags.usbstack=
|
||||
build.flags.debug=
|
||||
|
||||
# These can be overridden in platform.local.txt
|
||||
compiler.c.extra_flags=
|
||||
compiler.c.elf.extra_flags=
|
||||
#compiler.c.elf.extra_flags=-v
|
||||
compiler.cpp.extra_flags=
|
||||
compiler.S.extra_flags=
|
||||
compiler.ar.extra_flags=
|
||||
compiler.elf2hex.extra_flags=
|
||||
|
||||
compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Core/Include/" "-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/DSP/Include/" "-I{runtime.tools.CMSIS-Atmel-1.2.2.path}/CMSIS/Device/ATMEL/"
|
||||
compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Lib/GCC/" -larm_cortexM0l_math
|
||||
|
||||
compiler.libraries.ldflags=
|
||||
|
||||
# USB Flags
|
||||
# ---------
|
||||
build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON -DUSB_CONFIG_POWER={build.usb_power} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' {build.flags.usbstack} {build.flags.debug} "-I{runtime.platform.path}/libraries/Adafruit_TinyUSB_Arduino/src/arduino"
|
||||
|
||||
# Default advertised device power setting in mA
|
||||
build.usb_power=100
|
||||
|
||||
# Default usb manufacturer will be replaced at compile time using
|
||||
# numeric vendor ID if available or by board's specific value.
|
||||
build.usb_manufacturer="Unknown"
|
||||
|
||||
|
||||
# Compile patterns
|
||||
# ----------------
|
||||
|
||||
## Compile c files
|
||||
## KH Add -DBOARD_NAME="{build.board}"
|
||||
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}"
|
||||
|
||||
## Compile c++ files
|
||||
## KH Add -DBOARD_NAME="{build.board}"
|
||||
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}"
|
||||
|
||||
## Compile S files
|
||||
## KH Add -DBOARD_NAME="{build.board}"
|
||||
recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.cache_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}"
|
||||
|
||||
## Create archives
|
||||
# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value
|
||||
archive_file_path={build.path}/{archive_file}
|
||||
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"
|
||||
|
||||
## Combine gc-sections, archives, and objects
|
||||
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} {compiler.libraries.ldflags} -Wl,--start-group {compiler.arm.cmsis.ldflags} "-L{build.variant.path}" -lm "{build.path}/{archive_file}" -Wl,--end-group
|
||||
|
||||
## Create output (bin file)
|
||||
recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.bin.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin"
|
||||
|
||||
## Create output (hex file)
|
||||
recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex"
|
||||
|
||||
build.preferred_out_format=bin
|
||||
|
||||
## Save hex
|
||||
recipe.output.tmp_file={build.project_name}.{build.preferred_out_format}
|
||||
recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_out_format}
|
||||
|
||||
## Compute size
|
||||
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
|
||||
recipe.size.regex=\.text\s+([0-9]+).*
|
||||
|
||||
#
|
||||
# BOSSA
|
||||
#
|
||||
tools.bossac.path={runtime.tools.bossac-1.7.0-arduino3.path}
|
||||
tools.bossac.cmd=bossac
|
||||
tools.bossac.cmd.windows=bossac.exe
|
||||
|
||||
tools.bossac.upload.params.verbose=-i -d
|
||||
tools.bossac.upload.params.quiet=
|
||||
tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -i -e -w -v "{build.path}/{build.project_name}.bin" -R
|
||||
|
||||
tools.bossac_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R
|
||||
|
||||
tools.bossac.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA
|
||||
tools.bossac.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b
|
||||
|
||||
# v1.8.0
|
||||
|
||||
tools.bossac18.path={runtime.tools.bossac-1.8.0-48-gb176eee.path}
|
||||
tools.bossac18.cmd=bossac
|
||||
|
||||
tools.bossac18.upload.params.verbose=-i -d
|
||||
tools.bossac18.upload.params.quiet=
|
||||
tools.bossac18.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U -i --offset={upload.offset} -w -v "{build.path}/{build.project_name}.bin" -R
|
||||
|
||||
tools.bossac18.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA
|
||||
tools.bossac18.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b
|
||||
|
||||
#
|
||||
# BOSSA (ignore binary size)
|
||||
#
|
||||
tools.bossacI.path={runtime.tools.bossac-1.7.0-arduino3.path}
|
||||
tools.bossacI.cmd=bossac
|
||||
tools.bossacI.cmd.windows=bossac.exe
|
||||
|
||||
tools.bossacI.upload.params.verbose=-i -d
|
||||
tools.bossacI.upload.params.quiet=
|
||||
tools.bossacI.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -I -U {upload.native_usb} -i -e -w "{build.path}/{build.project_name}.bin" -R
|
||||
|
||||
tools.bossacI_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R
|
||||
|
||||
tools.bossacI.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA
|
||||
tools.bossacI.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b
|
||||
|
||||
|
||||
#
|
||||
# OpenOCD sketch upload
|
||||
#
|
||||
|
||||
tools.openocd.path={runtime.tools.openocd-0.10.0-arduino7.path}
|
||||
tools.openocd.cmd=bin/openocd
|
||||
tools.openocd.cmd.windows=bin/openocd.exe
|
||||
|
||||
tools.openocd.upload.params.verbose=-d2
|
||||
tools.openocd.upload.params.quiet=-d0
|
||||
tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset 0x2000; shutdown"
|
||||
|
||||
tools.openocd.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA
|
||||
tools.openocd.upload.network_pattern={network_cmd} -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b
|
||||
|
||||
# Program flashes the binary at 0x0000, so use the linker script without_bootloader
|
||||
tools.openocd.program.params.verbose=-d2
|
||||
tools.openocd.program.params.quiet=-d0
|
||||
tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown"
|
||||
|
||||
tools.openocd.erase.params.verbose=-d3
|
||||
tools.openocd.erase.params.quiet=-d0
|
||||
tools.openocd.erase.pattern=
|
||||
|
||||
tools.openocd.bootloader.params.verbose=-d2
|
||||
tools.openocd.bootloader.params.quiet=-d0
|
||||
tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown"
|
||||
|
||||
#
|
||||
# OpenOCD sketch upload - version with configurable bootloader size
|
||||
# FIXME: this programmer is a workaround for default options being overwritten by uploadUsingPreferences
|
||||
#
|
||||
|
||||
tools.openocd-withbootsize.path={runtime.tools.openocd-0.10.0-arduino7.path}
|
||||
tools.openocd-withbootsize.cmd=bin/openocd
|
||||
tools.openocd-withbootsize.cmd.windows=bin/openocd.exe
|
||||
|
||||
tools.openocd-withbootsize.upload.params.verbose=-d2
|
||||
tools.openocd-withbootsize.upload.params.quiet=-d0
|
||||
tools.openocd-withbootsize.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset {bootloader.size}; shutdown"
|
||||
|
||||
# Program flashes the binary at 0x0000, so use the linker script without_bootloader
|
||||
tools.openocd-withbootsize.program.params.verbose=-d2
|
||||
tools.openocd-withbootsize.program.params.quiet=-d0
|
||||
tools.openocd-withbootsize.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown"
|
||||
|
||||
tools.openocd-withbootsize.erase.params.verbose=-d3
|
||||
tools.openocd-withbootsize.erase.params.quiet=-d0
|
||||
tools.openocd-withbootsize.erase.pattern=
|
||||
|
||||
tools.openocd-withbootsize.bootloader.params.verbose=-d2
|
||||
tools.openocd-withbootsize.bootloader.params.quiet=-d0
|
||||
tools.openocd-withbootsize.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown"
|
||||
@@ -0,0 +1,226 @@
|
||||
# Copyright (c) 2014-2015 Arduino LLC. All right reserved.
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
# Arduino SAMD Core and platform.
|
||||
#
|
||||
# For more info:
|
||||
# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification
|
||||
|
||||
name=Adafruit SAMD (32-bits ARM Cortex-M0+ and Cortex-M4) Boards
|
||||
version=1.7.4
|
||||
|
||||
# Compile variables
|
||||
# -----------------
|
||||
|
||||
compiler.warning_flags=-w
|
||||
compiler.warning_flags.none=-w
|
||||
compiler.warning_flags.default=
|
||||
compiler.warning_flags.more=-Wall -Wno-expansion-to-defined
|
||||
compiler.warning_flags.all=-Wall -Wextra -Wno-expansion-to-defined
|
||||
|
||||
compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/
|
||||
compiler.c.cmd=arm-none-eabi-gcc
|
||||
compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD -D__SKETCH_NAME__="""{build.project_name}"""
|
||||
compiler.c.elf.cmd=arm-none-eabi-g++
|
||||
compiler.c.elf.flags=-Os -Wl,--gc-sections -save-temps
|
||||
compiler.S.cmd=arm-none-eabi-gcc
|
||||
compiler.S.flags=-c -g -x assembler-with-cpp -MMD
|
||||
compiler.cpp.cmd=arm-none-eabi-g++
|
||||
compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -D__SKETCH_NAME__="""{build.project_name}"""
|
||||
compiler.ar.cmd=arm-none-eabi-ar
|
||||
compiler.ar.flags=rcs
|
||||
compiler.objcopy.cmd=arm-none-eabi-objcopy
|
||||
compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0
|
||||
compiler.elf2hex.bin.flags=-O binary
|
||||
compiler.elf2hex.hex.flags=-O ihex -R .eeprom
|
||||
compiler.elf2hex.cmd=arm-none-eabi-objcopy
|
||||
compiler.ldflags=-mcpu={build.mcu} -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align
|
||||
compiler.size.cmd=arm-none-eabi-size
|
||||
compiler.define=-DARDUINO=
|
||||
compiler.readelf.cmd=arm-none-eabi-readelf
|
||||
|
||||
# this can be overriden in boards.txt
|
||||
build.extra_flags=
|
||||
build.cache_flags=
|
||||
build.flags.optimize=
|
||||
build.flags.maxspi=
|
||||
build.flags.maxqspi=
|
||||
build.flags.usbstack=
|
||||
build.flags.debug=
|
||||
|
||||
# These can be overridden in platform.local.txt
|
||||
compiler.c.extra_flags=
|
||||
compiler.c.elf.extra_flags=
|
||||
#compiler.c.elf.extra_flags=-v
|
||||
compiler.cpp.extra_flags=
|
||||
compiler.S.extra_flags=
|
||||
compiler.ar.extra_flags=
|
||||
compiler.elf2hex.extra_flags=
|
||||
|
||||
compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Core/Include/" "-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/DSP/Include/" "-I{runtime.tools.CMSIS-Atmel-1.2.2.path}/CMSIS/Device/ATMEL/"
|
||||
compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Lib/GCC/" -larm_cortexM0l_math
|
||||
|
||||
compiler.libraries.ldflags=
|
||||
|
||||
# USB Flags
|
||||
# ---------
|
||||
build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON -DUSB_CONFIG_POWER={build.usb_power} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' {build.flags.usbstack} {build.flags.debug} "-I{runtime.platform.path}/libraries/Adafruit_TinyUSB_Arduino/src/arduino"
|
||||
|
||||
# Default advertised device power setting in mA
|
||||
build.usb_power=100
|
||||
|
||||
# Default usb manufacturer will be replaced at compile time using
|
||||
# numeric vendor ID if available or by board's specific value.
|
||||
build.usb_manufacturer="Unknown"
|
||||
|
||||
|
||||
# Compile patterns
|
||||
# ----------------
|
||||
|
||||
## Compile c files
|
||||
## KH Add -DBOARD_NAME="{build.board}"
|
||||
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} -DARDUINO_SAMD_ADAFRUIT {compiler.c.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}"
|
||||
|
||||
## Compile c++ files
|
||||
## KH Add -DBOARD_NAME="{build.board}"
|
||||
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} -DARDUINO_SAMD_ADAFRUIT {compiler.cpp.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}"
|
||||
|
||||
## Compile S files
|
||||
## KH Add -DBOARD_NAME="{build.board}"
|
||||
recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} -DARDUINO_SAMD_ADAFRUIT {compiler.S.extra_flags} {build.extra_flags} {build.cache_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}"
|
||||
|
||||
## Create archives
|
||||
# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value
|
||||
archive_file_path={build.path}/{archive_file}
|
||||
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"
|
||||
|
||||
## Combine gc-sections, archives, and objects
|
||||
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} {compiler.libraries.ldflags} -Wl,--start-group {compiler.arm.cmsis.ldflags} "-L{build.variant.path}" -lm "{build.path}/{archive_file}" -Wl,--end-group
|
||||
|
||||
## Create output (bin file)
|
||||
recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.bin.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin"
|
||||
|
||||
## Create output (hex file)
|
||||
recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex"
|
||||
|
||||
build.preferred_out_format=bin
|
||||
|
||||
## Save hex
|
||||
recipe.output.tmp_file={build.project_name}.{build.preferred_out_format}
|
||||
recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_out_format}
|
||||
|
||||
## Compute size
|
||||
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
|
||||
recipe.size.regex=\.text\s+([0-9]+).*
|
||||
|
||||
#
|
||||
# BOSSA
|
||||
#
|
||||
tools.bossac.path={runtime.tools.bossac-1.7.0-arduino3.path}
|
||||
tools.bossac.cmd=bossac
|
||||
tools.bossac.cmd.windows=bossac.exe
|
||||
|
||||
tools.bossac.upload.params.verbose=-i -d
|
||||
tools.bossac.upload.params.quiet=
|
||||
tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -i -e -w -v "{build.path}/{build.project_name}.bin" -R
|
||||
|
||||
tools.bossac_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R
|
||||
|
||||
tools.bossac.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA
|
||||
tools.bossac.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b
|
||||
|
||||
# v1.8.0
|
||||
|
||||
tools.bossac18.path={runtime.tools.bossac-1.8.0-48-gb176eee.path}
|
||||
tools.bossac18.cmd=bossac
|
||||
|
||||
tools.bossac18.upload.params.verbose=-i -d
|
||||
tools.bossac18.upload.params.quiet=
|
||||
tools.bossac18.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U -i --offset={upload.offset} -w -v "{build.path}/{build.project_name}.bin" -R
|
||||
|
||||
tools.bossac18.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA
|
||||
tools.bossac18.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b
|
||||
|
||||
#
|
||||
# BOSSA (ignore binary size)
|
||||
#
|
||||
tools.bossacI.path={runtime.tools.bossac-1.7.0-arduino3.path}
|
||||
tools.bossacI.cmd=bossac
|
||||
tools.bossacI.cmd.windows=bossac.exe
|
||||
|
||||
tools.bossacI.upload.params.verbose=-i -d
|
||||
tools.bossacI.upload.params.quiet=
|
||||
tools.bossacI.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -I -U {upload.native_usb} -i -e -w "{build.path}/{build.project_name}.bin" -R
|
||||
|
||||
tools.bossacI_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R
|
||||
|
||||
tools.bossacI.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA
|
||||
tools.bossacI.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b
|
||||
|
||||
|
||||
#
|
||||
# OpenOCD sketch upload
|
||||
#
|
||||
|
||||
tools.openocd.path={runtime.tools.openocd-0.10.0-arduino7.path}
|
||||
tools.openocd.cmd=bin/openocd
|
||||
tools.openocd.cmd.windows=bin/openocd.exe
|
||||
|
||||
tools.openocd.upload.params.verbose=-d2
|
||||
tools.openocd.upload.params.quiet=-d0
|
||||
tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset 0x2000; shutdown"
|
||||
|
||||
tools.openocd.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA
|
||||
tools.openocd.upload.network_pattern={network_cmd} -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b
|
||||
|
||||
# Program flashes the binary at 0x0000, so use the linker script without_bootloader
|
||||
tools.openocd.program.params.verbose=-d2
|
||||
tools.openocd.program.params.quiet=-d0
|
||||
tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown"
|
||||
|
||||
tools.openocd.erase.params.verbose=-d3
|
||||
tools.openocd.erase.params.quiet=-d0
|
||||
tools.openocd.erase.pattern=
|
||||
|
||||
tools.openocd.bootloader.params.verbose=-d2
|
||||
tools.openocd.bootloader.params.quiet=-d0
|
||||
tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown"
|
||||
|
||||
#
|
||||
# OpenOCD sketch upload - version with configurable bootloader size
|
||||
# FIXME: this programmer is a workaround for default options being overwritten by uploadUsingPreferences
|
||||
#
|
||||
|
||||
tools.openocd-withbootsize.path={runtime.tools.openocd-0.10.0-arduino7.path}
|
||||
tools.openocd-withbootsize.cmd=bin/openocd
|
||||
tools.openocd-withbootsize.cmd.windows=bin/openocd.exe
|
||||
|
||||
tools.openocd-withbootsize.upload.params.verbose=-d2
|
||||
tools.openocd-withbootsize.upload.params.quiet=-d0
|
||||
tools.openocd-withbootsize.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset {bootloader.size}; shutdown"
|
||||
|
||||
# Program flashes the binary at 0x0000, so use the linker script without_bootloader
|
||||
tools.openocd-withbootsize.program.params.verbose=-d2
|
||||
tools.openocd-withbootsize.program.params.quiet=-d0
|
||||
tools.openocd-withbootsize.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown"
|
||||
|
||||
tools.openocd-withbootsize.erase.params.verbose=-d3
|
||||
tools.openocd-withbootsize.erase.params.quiet=-d0
|
||||
tools.openocd-withbootsize.erase.pattern=
|
||||
|
||||
tools.openocd-withbootsize.bootloader.params.verbose=-d2
|
||||
tools.openocd-withbootsize.bootloader.params.quiet=-d0
|
||||
tools.openocd-withbootsize.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown"
|
||||
@@ -0,0 +1,146 @@
|
||||
# Copyright (c) 2021 Earle F. Philhower, III
|
||||
#
|
||||
# Raspberry Pi RP2040 Core platform file
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
# For more info:
|
||||
# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification
|
||||
|
||||
name=Raspberry Pi RP2040 Boards(1.2.1)
|
||||
version=1.2.1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
compiler.path={runtime.tools.pqt-gcc.path}/bin/
|
||||
|
||||
# Compile variables
|
||||
# -----------------
|
||||
|
||||
compiler.warning_flags=-w
|
||||
compiler.warning_flags.none=-w
|
||||
compiler.warning_flags.default=
|
||||
compiler.warning_flags.more=-Wall
|
||||
compiler.warning_flags.all=-Wall -Wextra
|
||||
|
||||
compiler.defines={build.led}
|
||||
compiler.includes="-I{runtime.platform.path}/pico_base/" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/pico_unique_id/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/pico_platform/include/" "-I{runtime.platform.path}/pico-sdk/src/common/pico_base/include/" "-I{runtime.platform.path}/pico-sdk/src/rp2040/hardware_regs/include/" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/hardware_timer/include/" "-I{runtime.platform.path}/pico-sdk/src/common/pico_stdlib/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/hardware_gpio/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/hardware_i2c/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/hardware_flash/include" "-I{runtime.platform.path}/pico-sdk/src/common/pico_base/include" "-I{runtime.platform.path}/pico-examples/build/generated/pico_base" "-I{runtime.platform.path}/pico-sdk/src/boards/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/pico_platform/include" "-I{runtime.platform.path}/pico-sdk/src/rp2040/hardware_regs/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/hardware_base/include" "-I{runtime.platform.path}/pico-sdk/src/rp2040/hardware_structs/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/hardware_claim/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/hardware_sync/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/hardware_uart/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/hardware_divider/include" "-I{runtime.platform.path}/pico-sdk/src/common/pico_time/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/hardware_timer/include" "-I{runtime.platform.path}/pico-sdk/src/common/pico_sync/include" "-I{runtime.platform.path}/pico-sdk/src/common/pico_util/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/pico_runtime/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/hardware_clocks/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/hardware_resets/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/hardware_watchdog/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/hardware_xosc/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/hardware_pll/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/hardware_vreg/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/hardware_irq/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/pico_printf/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/pico_bootrom/include" "-I{runtime.platform.path}/pico-sdk/src/common/pico_bit_ops/include" "-I{runtime.platform.path}/pico-sdk/src/common/pico_divider/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/pico_double/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/pico_int64_ops/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/pico_float/include" "-I{runtime.platform.path}/pico-sdk/src/common/pico_binary_info/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/hardware_pio/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/pico_stdio/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/hardware_dma/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/pico_stdio_uart/include" "-I{runtime.platform.path}/pico-sdk/src/rp2040/hardware_regs/include/" "-I{runtime.platform.path}/pico-sdk/lib/tinyusb/src/" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/pico_stdio_usb/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/hardware_spi/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/hardware_pwm/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/hardware_adc/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/pico_multicore/include" "-I{runtime.platform.path}/cores/rp2040/api/deprecated-avr-comp/" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/pico_multicore/include" "-I{runtime.platform.path}/pico-extras/src/rp2_common/pico_audio_i2s/include" "-I{runtime.platform.path}/pico-extras/src/common/pico_audio/include" "-I{runtime.platform.path}/pico-extras/src/common/pico_util_buffer/include"
|
||||
compiler.flags=-Os -march=armv6-m -mcpu=cortex-m0plus -mthumb -ffunction-sections -fdata-sections
|
||||
compiler.wrap=-Wl,--wrap=acos -Wl,--wrap=acosf -Wl,--wrap=acosh -Wl,--wrap=acoshf -Wl,--wrap=__aeabi_cdcmpeq -Wl,--wrap=__aeabi_cdcmple -Wl,--wrap=__aeabi_cdrcmple -Wl,--wrap=__aeabi_cfcmpeq -Wl,--wrap=__aeabi_cfcmple -Wl,--wrap=__aeabi_cfrcmple -Wl,--wrap=__aeabi_d2f -Wl,--wrap=__aeabi_d2iz -Wl,--wrap=__aeabi_d2lz -Wl,--wrap=__aeabi_d2uiz -Wl,--wrap=__aeabi_d2ulz -Wl,--wrap=__aeabi_dadd -Wl,--wrap=__aeabi_dcmpeq -Wl,--wrap=__aeabi_dcmpge -Wl,--wrap=__aeabi_dcmpgt -Wl,--wrap=__aeabi_dcmple -Wl,--wrap=__aeabi_dcmplt -Wl,--wrap=__aeabi_dcmpun -Wl,--wrap=__aeabi_ddiv -Wl,--wrap=__aeabi_dmul -Wl,--wrap=__aeabi_drsub -Wl,--wrap=__aeabi_dsub -Wl,--wrap=__aeabi_f2d -Wl,--wrap=__aeabi_f2iz -Wl,--wrap=__aeabi_f2lz -Wl,--wrap=__aeabi_f2uiz -Wl,--wrap=__aeabi_f2ulz -Wl,--wrap=__aeabi_fadd -Wl,--wrap=__aeabi_fcmpeq -Wl,--wrap=__aeabi_fcmpge -Wl,--wrap=__aeabi_fcmpgt -Wl,--wrap=__aeabi_fcmple -Wl,--wrap=__aeabi_fcmplt -Wl,--wrap=__aeabi_fcmpun -Wl,--wrap=__aeabi_fdiv -Wl,--wrap=__aeabi_fmul -Wl,--wrap=__aeabi_frsub -Wl,--wrap=__aeabi_fsub -Wl,--wrap=__aeabi_i2d -Wl,--wrap=__aeabi_i2f -Wl,--wrap=__aeabi_idiv -Wl,--wrap=__aeabi_idivmod -Wl,--wrap=__aeabi_l2d -Wl,--wrap=__aeabi_l2f -Wl,--wrap=__aeabi_ldivmod -Wl,--wrap=__aeabi_lmul -Wl,--wrap=__aeabi_memcpy -Wl,--wrap=__aeabi_memcpy4 -Wl,--wrap=__aeabi_memcpy8 -Wl,--wrap=__aeabi_memset -Wl,--wrap=__aeabi_memset4 -Wl,--wrap=__aeabi_memset8 -Wl,--wrap=__aeabi_ui2d -Wl,--wrap=__aeabi_ui2f -Wl,--wrap=__aeabi_uidiv -Wl,--wrap=__aeabi_uidivmod -Wl,--wrap=__aeabi_ul2d -Wl,--wrap=__aeabi_ul2f -Wl,--wrap=__aeabi_uldivmod -Wl,--wrap=asin -Wl,--wrap=asinf -Wl,--wrap=asinh -Wl,--wrap=asinhf -Wl,--wrap=atan -Wl,--wrap=atan2 -Wl,--wrap=atan2f -Wl,--wrap=atanf -Wl,--wrap=atanh -Wl,--wrap=atanhf -Wl,--wrap=calloc -Wl,--wrap=cbrt -Wl,--wrap=cbrtf -Wl,--wrap=ceil -Wl,--wrap=ceilf -Wl,--wrap=__clz -Wl,--wrap=__clzdi2 -Wl,--wrap=__clzl -Wl,--wrap=__clzll -Wl,--wrap=__clzsi2 -Wl,--wrap=copysign -Wl,--wrap=copysignf -Wl,--wrap=cos -Wl,--wrap=cosf -Wl,--wrap=cosh -Wl,--wrap=coshf -Wl,--wrap=__ctzdi2 -Wl,--wrap=__ctzsi2 -Wl,--wrap=drem -Wl,--wrap=dremf -Wl,--wrap=exp -Wl,--wrap=exp10 -Wl,--wrap=exp10f -Wl,--wrap=exp2 -Wl,--wrap=exp2f -Wl,--wrap=expf -Wl,--wrap=expm1 -Wl,--wrap=expm1f -Wl,--wrap=floor -Wl,--wrap=floorf -Wl,--wrap=fma -Wl,--wrap=fmaf -Wl,--wrap=fmod -Wl,--wrap=fmodf -Wl,--wrap=free -Wl,--wrap=hypot -Wl,--wrap=hypotf -Wl,--wrap=ldexp -Wl,--wrap=ldexpf -Wl,--wrap=log -Wl,--wrap=log10 -Wl,--wrap=log10f -Wl,--wrap=log1p -Wl,--wrap=log1pf -Wl,--wrap=log2 -Wl,--wrap=log2f -Wl,--wrap=logf -Wl,--wrap=malloc -Wl,--wrap=memcpy -Wl,--wrap=memset -Wl,--wrap=__popcountdi2 -Wl,--wrap=__popcountsi2 -Wl,--wrap=pow -Wl,--wrap=powf -Wl,--wrap=powint -Wl,--wrap=powintf -Wl,--wrap=remainder -Wl,--wrap=remainderf -Wl,--wrap=remquo -Wl,--wrap=remquof -Wl,--wrap=round -Wl,--wrap=roundf -Wl,--wrap=sin -Wl,--wrap=sincos -Wl,--wrap=sincosf -Wl,--wrap=sinf -Wl,--wrap=sinh -Wl,--wrap=sinhf -Wl,--wrap=sqrt -Wl,--wrap=sqrtf -Wl,--wrap=tan -Wl,--wrap=tanf -Wl,--wrap=tanh -Wl,--wrap=tanhf -Wl,--wrap=trunc -Wl,--wrap=truncf
|
||||
|
||||
compiler.c.cmd=arm-none-eabi-gcc
|
||||
compiler.c.flags=-c {compiler.defines} {compiler.flags} {compiler.includes} -std=gnu17 -g
|
||||
compiler.c.elf.cmd=arm-none-eabi-g++
|
||||
compiler.c.elf.flags={compiler.defines} {compiler.flags} -Wl,--gc-sections -u _printf_float -u _scanf_float
|
||||
compiler.S.cmd=arm-none-eabi-gcc
|
||||
compiler.S.flags=-c -g -x assembler-with-cpp -MMD {compiler.includes} -g
|
||||
compiler.cpp.cmd=arm-none-eabi-g++
|
||||
compiler.cpp.flags=-c {compiler.defines} {compiler.flags} {compiler.includes} -std=gnu++17 -g
|
||||
|
||||
|
||||
compiler.ar.cmd=arm-none-eabi-ar
|
||||
compiler.ar.flags=rcs
|
||||
compiler.objcopy.cmd=arm-none-eabi-objcopy
|
||||
compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0
|
||||
compiler.elf2hex.bin.flags=-O binary
|
||||
compiler.elf2hex.hex.flags=-O ihex -R .eeprom
|
||||
compiler.elf2hex.cmd=arm-none-eabi-objcopy
|
||||
compiler.ldflags={compiler.wrap} -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common
|
||||
compiler.size.cmd=arm-none-eabi-size
|
||||
compiler.define=-DARDUINO=
|
||||
compiler.readelf.cmd=arm-none-eabi-readelf
|
||||
|
||||
# this can be overriden in boards.txt
|
||||
build.extra_flags=
|
||||
|
||||
# These can be overridden in platform.local.txt
|
||||
compiler.c.extra_flags=
|
||||
compiler.c.elf.extra_flags=
|
||||
compiler.cpp.extra_flags=
|
||||
compiler.S.extra_flags=
|
||||
compiler.ar.extra_flags=
|
||||
compiler.elf2hex.extra_flags=
|
||||
|
||||
# Board configuration, set in boards.txt. Present here to ensure substitution works
|
||||
build.flash_length=
|
||||
build.eeprom_start=
|
||||
build.fs_start=
|
||||
build.fs_end=
|
||||
|
||||
build.boot2=boot2_generic_03h_4_padded_checksum
|
||||
|
||||
# Allow Pico boards do be auto-discovered by the IDE
|
||||
discovery.rp2040.pattern="{runtime.tools.pqt-python3.path}/python3" "{runtime.platform.path}/tools/discovery.py"
|
||||
|
||||
|
||||
# Compile patterns
|
||||
# ----------------
|
||||
|
||||
## Compile c files
|
||||
## KH Add -DBOARD_NAME="{build.board}"
|
||||
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} {build.usbpid} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {build.debug_port} {build.debug_level} {includes} "{source_file}" -o "{object_file}"
|
||||
|
||||
## Compile c++ files
|
||||
## KH Add -DBOARD_NAME="{build.board}"
|
||||
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} {build.usbpid} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {build.debug_port} {build.debug_level} {includes} "{source_file}" -o "{object_file}"
|
||||
|
||||
## Compile S files
|
||||
## KH Add -DBOARD_NAME="{build.board}"
|
||||
recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} {build.usbpid} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.debug_port} {build.debug_level} {includes} "{source_file}" -o "{object_file}"
|
||||
|
||||
## Create archives
|
||||
# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value
|
||||
archive_file_path={build.path}/{archive_file}
|
||||
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"
|
||||
|
||||
## Combine gc-sections, archives, and objects
|
||||
recipe.hooks.linking.prelink.1.pattern="{runtime.tools.pqt-python3.path}/python3" "{runtime.platform.path}/tools/simplesub.py" --input "{runtime.platform.path}/lib/memmap_default.ld" --out "{build.path}/memmap_default.ld" --sub __FLASH_LENGTH__ {build.flash_length} --sub __EEPROM_START__ {build.eeprom_start} --sub __FS_START__ {build.fs_start} --sub __FS_END__ {build.fs_end}
|
||||
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-Wl,--script={build.path}/memmap_default.ld" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nosys.specs -Wl,--start-group {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} "{build.path}/{archive_file}" "{runtime.platform.path}/lib/libpico.a" -lm "-I{runtime.platform.path}/pico-sdk/src/rp2040/hardware_regs/include/" "-I{runtime.platform.path}/pico-sdk/src/common/pico_binary_info/include" "{runtime.platform.path}/assembly/{build.boot2}.S" -lc -lstdc++ -Wl,--end-group
|
||||
|
||||
## Create output (UF2 file)
|
||||
recipe.objcopy.uf2.pattern="{runtime.tools.pqt-elf2uf2.path}/elf2uf2" "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.uf2"
|
||||
|
||||
build.preferred_out_format=uf2
|
||||
|
||||
## Save hex
|
||||
recipe.output.tmp_file={build.project_name}.{build.preferred_out_format}
|
||||
recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_out_format}
|
||||
|
||||
## Compute size
|
||||
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
|
||||
recipe.size.regex=^(?:\.boot2|\.text|\.rodata|\.ARM\.extab|\.ARM\.exidx)\s+([0-9]+).*
|
||||
recipe.size.regex.data=^(?:\.data|\.bss|\.ram_vector_table|\.uninitialized_data)\s+([0-9]+).*
|
||||
|
||||
tools.uf2conv.path=
|
||||
# Because the variable expansion doesn't allow one tool to find another, the following lines
|
||||
# will point to "{runtime.platform.path}/tools/python3/python3" in GIT and
|
||||
# "{runtime.tools.pqt-python3.path}/python3" for JSON board manager releases.
|
||||
tools.uf2conv.cmd={runtime.tools.pqt-python3.path}/python3
|
||||
|
||||
tools.uf2conv.upload.protocol=uf2
|
||||
tools.uf2conv.upload.params.verbose=
|
||||
tools.uf2conv.upload.params.quiet=
|
||||
tools.uf2conv.upload.pattern="{cmd}" "{runtime.platform.path}/tools/uf2conv.py" --serial "{serial.port}" --family RP2040 --deploy "{build.path}/{build.project_name}.uf2"
|
||||
|
||||
|
||||
tools.picoprobe.cmd={runtime.tools.pqt-openocd.path}
|
||||
|
||||
tools.picoprobe.upload.protocol=picoprobe
|
||||
tools.picoprobe.upload.params.verbose=
|
||||
tools.picoprobe.upload.params.quiet=
|
||||
tools.picoprobe.upload.pattern="{cmd}/bin/openocd" -f "interface/picoprobe.cfg" -f "target/rp2040.cfg" -s "{cmd}/share/openocd/scripts" -c "program {build.path}/{build.project_name}.elf verify reset exit"
|
||||
@@ -17,49 +17,15 @@
|
||||
* [Supports](#supports)
|
||||
* [Principles of operation](#principles-of-operation)
|
||||
* [Currently supported Boards](#currently-supported-boards)
|
||||
* [Changelog](#changelog)
|
||||
* [Releases v1.2.0](#releases-v120)
|
||||
* [Releases v1.1.5](#releases-v115)
|
||||
* [Releases v1.1.4](#releases-v114)
|
||||
* [Releases v1.1.3](#releases-v113)
|
||||
* [Releases v1.1.2](#releases-v112)
|
||||
* [Releases v1.1.1](#releases-v111)
|
||||
* [Releases v1.1.0](#releases-v110)
|
||||
* [Releases v1.0.2](#releases-v102)
|
||||
* [Releases v1.0.1](#releases-v101)
|
||||
* [Releases v1.0.0](#releases-v100)
|
||||
* [AsyncHTTPRequest_Generic for ESP32, ESP8266 using built-in WiFi and STM32 boards using built-in LAN8742A Ethernet](#asynchttprequest_generic-for-esp32-esp8266-using-built-in-wifi-and-stm32-boards-using-built-in-lan8742a-ethernet)
|
||||
* [Changelog](changelog.md)
|
||||
* [Prerequisites](#prerequisites)
|
||||
* [Installation](#installation)
|
||||
* [Use Arduino Library Manager](#use-arduino-library-manager)
|
||||
* [Manual Install](#manual-install)
|
||||
* [VS Code & PlatformIO](#vs-code--platformio)
|
||||
* [Packages' Patches](#packages-patches)
|
||||
* [1. For Adafruit nRF52840 and nRF52832 boards](#1-for-adafruit-nRF52840-and-nRF52832-boards)
|
||||
* [2. For Teensy boards](#2-for-teensy-boards)
|
||||
* [3. For Arduino SAM DUE boards](#3-for-arduino-sam-due-boards)
|
||||
* [4. For Arduino SAMD boards](#4-for-arduino-samd-boards)
|
||||
* [For core version v1.8.10+](#for-core-version-v1810)
|
||||
* [For core version v1.8.9-](#for-core-version-v189-)
|
||||
* [5. For Adafruit SAMD boards](#5-for-adafruit-samd-boards)
|
||||
* [6. For Seeeduino SAMD boards](#6-for-seeeduino-samd-boards)
|
||||
* [7. For STM32 boards](#7-for-stm32-boards)
|
||||
* [7.1. For STM32 boards to use LAN8720](#71-for-stm32-boards-to-use-lan8720)
|
||||
* [7.2. For STM32 boards to use Serial1](#72-for-stm32-boards-to-use-serial1)
|
||||
* [HOWTO Install esp32-s2 core for ESP32-S2 (Saola, AI-Thinker ESP-12K) boards into Arduino IDE)](#howto-install-esp32-s2-core-for-esp32-s2-saola-ai-thinker-esp-12k-boards-into-arduino-ide)
|
||||
* [1. Save the original esp32 core](#1-save-the-original-esp32-core)
|
||||
* [2. Download esp32-s2 core](#2-download-esp32-s2-core)
|
||||
* [2.1 Download zip](#21-download-zip)
|
||||
* [2.2 Unzip](#22-unzip)
|
||||
* [2.3 Update esp32-s2 core directories](#23-update-esp32-s2-core-directories)
|
||||
* [3. Download tools](#3-download-tools)
|
||||
* [3.1 Download Toolchain for Xtensa (ESP32-S2) based on GCC](#31-download-toolchain-for-xtensa-esp32-s2-based-on-gcc)
|
||||
* [3.2 Download esptool](#32-download-esptool)
|
||||
* [3.3 Unzip](#33-unzip)
|
||||
* [4. Update tools](#4-update-tools)
|
||||
* [4.1 Update Toolchain](#41-update-toolchain)
|
||||
* [4.2 Update esptool](#42-update-esptool)
|
||||
* [5. esp32-s2 WebServer Library Patch](#5-esp32-s2-webserver-library-patch)
|
||||
* [1. For STM32 boards to use LAN8720](#1-for-stm32-boards-to-use-lan8720)
|
||||
* [2. For STM32 boards to use Serial1](#2-for-stm32-boards-to-use-serial1)
|
||||
* [Note for Platform IO using ESP32 LittleFS](#note-for-platform-io-using-esp32-littlefs)
|
||||
* [HOWTO Fix `Multiple Definitions` Linker Error](#howto-fix-multiple-definitions-linker-error)
|
||||
* [Note for Platform IO using ESP32 LittleFS](#note-for-platform-io-using-esp32-littlefs)
|
||||
@@ -90,6 +56,9 @@
|
||||
* [4. AsyncDweetPost_STM32_LAN8720](examples/STM32_LAN8720/AsyncDweetPost_STM32_LAN8720)
|
||||
* [5. AsyncSimpleGET_STM32_LAN8720](examples/STM32_LAN8720/AsyncSimpleGET_STM32_LAN8720)
|
||||
* [6. AsyncWebClientRepeating_STM32_LAN8720](examples/STM32_LAN8720/AsyncWebClientRepeating_STM32_LAN8720)
|
||||
* [For WT32_ETH01](#for-wt32_eth01)
|
||||
* [1. AsyncHTTPRequest_WT32_ETH01](examples/WT32_ETH01/AsyncHTTPRequest_WT32_ETH01)
|
||||
* [2. AsyncHTTPMultiRequests_WT32_ETH01](examples/WT32_ETH01/AsyncHTTPMultiRequests_WT32_ETH01)
|
||||
* [Example AsyncHTTPRequest_STM32](#example-asynchttprequest_stm32)
|
||||
* [1. File AsyncHTTPRequest_STM32.ino](#1-file-asynchttprequest_stm32ino)
|
||||
* [2. File defines.h](#2-file-definesh)
|
||||
@@ -100,10 +69,11 @@
|
||||
* [4. AsyncHTTPRequest_ESP running on ESP8266_NODEMCU](#4-asynchttprequest_esp-running-on-esp8266_nodemcu)
|
||||
* [5. AsyncWebClientRepeating_STM32 running on STM32F7 Nucleo-144 NUCLEO_F767ZI using built-in LAN8742A](#5-asyncwebclientrepeating_stm32-running-on-stm32f7-nucleo-144-nucleo_f767zi-using-built-in-lan8742a)
|
||||
* [6. AsyncWebClientRepeating_STM32_LAN8720 running on STM32F4 BLACK_F407VE using LAN8720](#6-asyncwebclientrepeating_stm32_lan8720-running-on-stm32f4-black_f407ve-using-lan8720)
|
||||
* [7. AsyncHTTPMultiRequests_WT32_ETH01 on ESP32_DEV with ETH_PHY_LAN8720](#7-asynchttpmultirequests_wt32_eth01-on-esp32_dev-with-eth_phy_lan8720)
|
||||
* [8. AsyncHTTPRequest_WT32_ETH01 on ESP32_DEV with ETH_PHY_LAN8720](#8-asynchttprequest_wt32_eth01-on-esp32_dev-with-eth_phy_lan8720)
|
||||
* [Debug](#debug)
|
||||
* [Troubleshooting](#troubleshooting)
|
||||
* [Issues](#issues)
|
||||
* [Releases](#releases)
|
||||
* [TO DO](#to-do)
|
||||
* [DONE](#done)
|
||||
* [Contributions and Thanks](#contributions-and-thanks)
|
||||
@@ -118,7 +88,7 @@
|
||||
|
||||
### Features
|
||||
|
||||
1. Asynchronous HTTP Request library for ESP8266, including ESP32-S2 (ESP32-S2 Saola, AI-Thinker ESP-12K, etc.) using built-in WiFi, and STM32 boards using LAN8720 or built-in LAN8742A Ethernet.
|
||||
1. Asynchronous HTTP Request library for ESP8266, including ESP32-S2 (ESP32-S2 Saola, AI-Thinker ESP-12K, etc.) using built-in WiFi, WT32_ETH01 (ESP32 + LAN8720) and STM32 boards using LAN8720 or built-in LAN8742A Ethernet.
|
||||
2. Providing a subset of HTTP.
|
||||
3. Relying on on **[`ESPAsyncTCP`](https://github.com/me-no-dev/ESPAsyncTCP) for ESP8266, [`AsyncTCP`](https://github.com/me-no-dev/AsyncTCP) for ESP32** using built-in WiFi
|
||||
4. Relying on **[`STM32duino LwIP`](https://github.com/stm32duino/LwIP)/[`STM32duino STM32Ethernet`](https://github.com/stm32duino/STM32Ethernet)/[`STM32AsyncTCP`](https://github.com/philbowles/STM32AsyncTCP) for STM32 using LAN8720 or built-in LAN8742A Ethernet.**
|
||||
@@ -172,81 +142,25 @@ This library is based on, modified from:
|
||||
3. **STM32F4 boards (BLACK_F407VE, BLACK_F407VG, BLACK_F407ZE, BLACK_F407ZG, BLACK_F407VE_Mini, DIYMORE_F407VGT, FK407M1)**
|
||||
|
||||
|
||||
---
|
||||
---
|
||||
|
||||
|
||||
## Changelog
|
||||
|
||||
### Releases v1.2.0
|
||||
|
||||
1. Add support to **LAN8720** Ethernet for many **STM32F4** (F407xx, NUCLEO_F429ZI) and **STM32F7** (DISCO_F746NG, NUCLEO_F746ZG, NUCLEO_F756ZG) boards.
|
||||
2. Add LAN8720 examples
|
||||
3. Add Packages' Patches for STM32 to use LAN8720 with STM32Ethernet and LwIP libraries
|
||||
4. Update ESP_WiFiManager-related example to fix multiWiFi timings to work better with latest esp32 core v1.0.6
|
||||
|
||||
### Releases v1.1.5
|
||||
|
||||
1. Fix dependency on unpublished [**STM32AsyncTCP Library**](https://github.com/philbowles/STM32AsyncTCP). Check [Compilation broken due to error in STM32AsyncTCP dependency](https://github.com/khoih-prog/AsyncWebServer_STM32/issues/4) and [how to run one of the examples?](https://github.com/khoih-prog/AsyncWebServer_STM32/issues/2).
|
||||
|
||||
### Releases v1.1.4
|
||||
|
||||
1. Fix `library.properties` dependency
|
||||
|
||||
### Releases v1.1.3
|
||||
|
||||
1. Fix non-persistent Connection header bug. Check [**'Connection' header expects 'disconnect' instead 'close' ? #13**](https://github.com/khoih-prog/AsyncHTTPRequest_Generic/issues/13)
|
||||
2. Add ESP32-S2 support
|
||||
3. Tested with [**Latest ESP32 Core 1.0.5**](https://github.com/espressif/arduino-esp32) for ESP32-based boards.
|
||||
|
||||
### Releases v1.1.2
|
||||
|
||||
1. Rename _lock and _unlock to avoid conflict with [**ESP32/ESP8266 AsyncWebServer**](https://github.com/me-no-dev/ESPAsyncWebServer) library. Check [**compatibility with ESPAsyncWebServer #11**](https://github.com/khoih-prog/AsyncHTTPRequest_Generic/issues/11)
|
||||
2. Fix compiler warnings.
|
||||
|
||||
### Releases v1.1.1
|
||||
|
||||
1. Prevent crash if request and/or method not correct.
|
||||
|
||||
|
||||
### Releases v1.1.0
|
||||
|
||||
1. Add HTTP PUT, PATCH, DELETE and HEAD methods. Check [Add support for sending PUT, PATCH, DELETE request](https://github.com/khoih-prog/AsyncHTTPRequest_Generic/issues/5)
|
||||
2. Add Table of Contents
|
||||
3. Add Version String
|
||||
|
||||
|
||||
### Releases v1.0.2
|
||||
|
||||
1. Make Mutex Lock and delete more reliable and error-proof to prevent random crash.
|
||||
|
||||
### Releases v1.0.1
|
||||
|
||||
1. Restore cpp code besides Impl.h code to use in case of `multiple definition` linker error. Thanks to [Daniel Brunner](https://github.com/0xFEEDC0DE64) to report and make PR in [**Fixed linker errors when included in multiple .cpp files**](https://github.com/khoih-prog/AsyncHTTPRequest_Generic/pull/1). See [**HOWTO Fix `Multiple Definitions` Linker Error**](https://github.com/khoih-prog/AsyncHTTPRequest_Generic#HOWTO-Fix-Multiple-Definitions-Linker-Error)
|
||||
|
||||
|
||||
### Releases v1.0.0
|
||||
|
||||
1. Initial coding to add support to **STM32F/L/H/G/WB/MP1** using built-in LAN8742A Ethernet (Nucleo-144, DISCOVERY, etc).
|
||||
2. Add examples using STM32 boards.
|
||||
#### 5. **WT32_ETH01** using ESP32-based boards and LAN8720 Ethernet
|
||||
|
||||
---
|
||||
---
|
||||
|
||||
## Prerequisites
|
||||
|
||||
1. [`Arduino IDE 1.8.13+` for Arduino](https://www.arduino.cc/en/Main/Software)
|
||||
2. [`ESP8266 Core 2.7.4+`](https://github.com/esp8266/Arduino) for ESP8266-based boards. [](https://github.com/esp8266/Arduino/releases/latest/)
|
||||
3. [`ESP32 Core 1.0.6+`](https://github.com/espressif/arduino-esp32) for ESP32-based boards. [Latest stable release 
|
||||
4. [`ESP32S2 Core 1.0.4+`](https://github.com/espressif/arduino-esp32/tree/esp32s2) for ESP32-S2-based boards.
|
||||
5. [`Arduino Core for STM32 1.9.0+`](https://github.com/stm32duino/Arduino_Core_STM32) for for STM32 using built-in Ethernet LAN8742A. [](https://github.com/stm32duino/Arduino_Core_STM32/releases/latest)
|
||||
1. [`Arduino IDE 1.8.16+` for Arduino](https://www.arduino.cc/en/Main/Software)
|
||||
2. [`ESP8266 Core 3.0.2+`](https://github.com/esp8266/Arduino) for ESP8266-based boards. [](https://github.com/esp8266/Arduino/releases/latest/)
|
||||
3. [`ESP32 Core 2.0.0+`](https://github.com/espressif/arduino-esp32) for ESP32-based boards. [Latest stable release 
|
||||
5. [`Arduino Core for STM32 2.1.0+`](https://github.com/stm32duino/Arduino_Core_STM32) for for STM32 using built-in Ethernet LAN8742A. [](https://github.com/stm32duino/Arduino_Core_STM32/releases/latest)
|
||||
6. [`ESPAsyncTCP v1.2.2+`](https://github.com/me-no-dev/ESPAsyncTCP) for ESP8266.
|
||||
7. [`AsyncTCP v1.1.1+`](https://github.com/me-no-dev/AsyncTCP) for ESP32.
|
||||
8. [`STM32Ethernet library v1.2.0+`](https://github.com/stm32duino/STM32Ethernet) for STM32 using built-in Ethernet LAN8742A on (Nucleo-144, Discovery). [](https://github.com/stm32duino/STM32Ethernet/releases/latest)
|
||||
9. [`LwIP library v2.1.2+`](https://github.com/stm32duino/LwIP) for STM32 using built-in Ethernet LAN8742A on (Nucleo-144, Discovery). [](https://github.com/stm32duino/LwIP/releases/latest)
|
||||
10. [`STM32AsyncTCP library v1.0.1+`](https://github.com/khoih-prog/STM32AsyncTCP) for built-in Ethernet on (Nucleo-144, Discovery). To install manually for Arduino IDE.
|
||||
11. [`ESPAsync_WiFiManager library v1.6.2+`](https://github.com/khoih-prog/ESPAsync_WiFiManager) for ESP32/ESP8266 using some examples. [](https://github.com/khoih-prog/ESPAsync_WiFiManager/releases)
|
||||
11. [`ESPAsync_WiFiManager library v1.9.4+`](https://github.com/khoih-prog/ESPAsync_WiFiManager) for ESP32/ESP8266 using some examples. [](https://github.com/khoih-prog/ESPAsync_WiFiManager/releases)
|
||||
12. [`LittleFS_esp32 v1.0.6+`](https://github.com/lorol/LITTLEFS) for ESP32-based boards using LittleFS. To install, check [](https://www.ardu-badge.com/LittleFS_esp32).
|
||||
13. [`WebServer_WT32_ETH01 library v1.2.1+`](https://github.com/khoih-prog/WebServer_WT32_ETH01) if necessary to use WT32_ETH01 boards. To install, check [](https://www.ardu-badge.com/WebServer_WT32_ETH01)
|
||||
|
||||
---
|
||||
|
||||
@@ -274,130 +188,7 @@ The best and easiest way is to use `Arduino Library Manager`. Search for `AsyncH
|
||||
|
||||
### Packages' Patches
|
||||
|
||||
#### 1. For Adafruit nRF52840 and nRF52832 boards
|
||||
|
||||
**To be able to compile, run and automatically detect and display BOARD_NAME on nRF52840/nRF52832 boards**, you have to copy the whole [nRF52 0.21.0](Packages_Patches/adafruit/hardware/nrf52/0.21.0) directory into Adafruit nRF52 directory (~/.arduino15/packages/adafruit/hardware/nrf52/0.21.0).
|
||||
|
||||
Supposing the Adafruit nRF52 version is 0.21.0. These files must be copied into the directory:
|
||||
- `~/.arduino15/packages/adafruit/hardware/nrf52/0.21.0/platform.txt`
|
||||
- `~/.arduino15/packages/adafruit/hardware/nrf52/0.21.0/boards.txt`
|
||||
- `~/.arduino15/packages/adafruit/hardware/nrf52/0.21.0/variants/NINA_B302_ublox/variant.h`
|
||||
- `~/.arduino15/packages/adafruit/hardware/nrf52/0.21.0/variants/NINA_B302_ublox/variant.cpp`
|
||||
- `~/.arduino15/packages/adafruit/hardware/nrf52/0.21.0/variants/NINA_B112_ublox/variant.h`
|
||||
- `~/.arduino15/packages/adafruit/hardware/nrf52/0.21.0/variants/NINA_B112_ublox/variant.cpp`
|
||||
- **`~/.arduino15/packages/adafruit/hardware/nrf52/0.21.0/cores/nRF5/Udp.h`**
|
||||
|
||||
Whenever a new version is installed, remember to copy these files into the new version directory. For example, new version is x.yy.z
|
||||
These files must be copied into the directory:
|
||||
|
||||
- `~/.arduino15/packages/adafruit/hardware/nrf52/x.yy.z/platform.txt`
|
||||
- `~/.arduino15/packages/adafruit/hardware/nrf52/x.yy.z/boards.txt`
|
||||
- `~/.arduino15/packages/adafruit/hardware/nrf52/x.yy.z/variants/NINA_B302_ublox/variant.h`
|
||||
- `~/.arduino15/packages/adafruit/hardware/nrf52/x.yy.z/variants/NINA_B302_ublox/variant.cpp`
|
||||
- `~/.arduino15/packages/adafruit/hardware/nrf52/x.yy.z/variants/NINA_B112_ublox/variant.h`
|
||||
- `~/.arduino15/packages/adafruit/hardware/nrf52/x.yy.z/variants/NINA_B112_ublox/variant.cpp`
|
||||
- **`~/.arduino15/packages/adafruit/hardware/nrf52/x.yy.z/cores/nRF5/Udp.h`**
|
||||
|
||||
#### 2. For Teensy boards
|
||||
|
||||
**To be able to compile and run on Teensy boards**, you have to copy the files in [**Packages_Patches for Teensy directory**](Packages_Patches/hardware/teensy/avr) into Teensy hardware directory (./arduino-1.8.13/hardware/teensy/avr/boards.txt).
|
||||
|
||||
Supposing the Arduino version is 1.8.13. These files must be copied into the directory:
|
||||
|
||||
- `./arduino-1.8.13/hardware/teensy/avr/boards.txt`
|
||||
- `./arduino-1.8.13/hardware/teensy/avr/cores/teensy/Stream.h`
|
||||
- `./arduino-1.8.13/hardware/teensy/avr/cores/teensy3/Stream.h`
|
||||
- `./arduino-1.8.13/hardware/teensy/avr/cores/teensy4/Stream.h`
|
||||
|
||||
Whenever a new version is installed, remember to copy this file into the new version directory. For example, new version is x.yy.zz
|
||||
These files must be copied into the directory:
|
||||
|
||||
- `./arduino-x.yy.zz/hardware/teensy/avr/boards.txt`
|
||||
- `./arduino-x.yy.zz/hardware/teensy/avr/cores/teensy/Stream.h`
|
||||
- `./arduino-x.yy.zz/hardware/teensy/avr/cores/teensy3/Stream.h`
|
||||
- `./arduino-x.yy.zz/hardware/teensy/avr/cores/teensy4/Stream.h`
|
||||
|
||||
#### 3. For Arduino SAM DUE boards
|
||||
|
||||
**To be able to compile and run on SAM DUE boards**, you have to copy the whole [SAM DUE](Packages_Patches/arduino/hardware/sam/1.6.12) directory into Arduino sam directory (~/.arduino15/packages/arduino/hardware/sam/1.6.12).
|
||||
|
||||
Supposing the Arduino SAM core version is 1.6.12. This file must be copied into the directory:
|
||||
|
||||
- `~/.arduino15/packages/arduino/hardware/sam/1.6.12/platform.txt`
|
||||
|
||||
Whenever a new version is installed, remember to copy this file into the new version directory. For example, new version is x.yy.zz
|
||||
This file must be copied into the directory:
|
||||
|
||||
- `~/.arduino15/packages/arduino/hardware/sam/x.yy.zz/platform.txt`
|
||||
|
||||
#### 4. For Arduino SAMD boards
|
||||
|
||||
***To be able to compile without error and automatically detect and display BOARD_NAME on Arduino SAMD (Nano-33-IoT, etc) boards***, you have to copy the whole [Arduino SAMD cores 1.8.10](Packages_Patches/arduino/hardware/samd/1.8.10) directory into Arduino SAMD directory (~/.arduino15/packages/arduino/hardware/samd/1.8.10).
|
||||
|
||||
#### For core version v1.8.10+
|
||||
|
||||
Supposing the Arduino SAMD version is 1.8.11. Now only one file must be copied into the directory:
|
||||
|
||||
- `~/.arduino15/packages/arduino/hardware/samd/1.8.11/platform.txt`
|
||||
|
||||
Whenever a new version is installed, remember to copy this files into the new version directory. For example, new version is x.yy.zz
|
||||
|
||||
This file must be copied into the directory:
|
||||
|
||||
- `~/.arduino15/packages/arduino/hardware/samd/x.yy.zz/platform.txt`
|
||||
|
||||
#### For core version v1.8.9-
|
||||
|
||||
Supposing the Arduino SAMD version is 1.8.9. These files must be copied into the directory:
|
||||
|
||||
- `~/.arduino15/packages/arduino/hardware/samd/1.8.9/platform.txt`
|
||||
- ***`~/.arduino15/packages/arduino/hardware/samd/1.8.9/cores/arduino/Arduino.h`***
|
||||
|
||||
Whenever a new version is installed, remember to copy these files into the new version directory. For example, new version is x.yy.z
|
||||
|
||||
These files must be copied into the directory:
|
||||
|
||||
- `~/.arduino15/packages/arduino/hardware/samd/x.yy.z/platform.txt`
|
||||
- ***`~/.arduino15/packages/arduino/hardware/samd/x.yy.z/cores/arduino/Arduino.h`***
|
||||
|
||||
This is mandatory to fix the ***notorious Arduino SAMD compiler error***. See [Improve Arduino compatibility with the STL (min and max macro)](https://github.com/arduino/ArduinoCore-samd/pull/399)
|
||||
|
||||
```
|
||||
...\arm-none-eabi\include\c++\7.2.1\bits\stl_algobase.h:243:56: error: macro "min" passed 3 arguments, but takes just 2
|
||||
min(const _Tp& __a, const _Tp& __b, _Compare __comp)
|
||||
```
|
||||
|
||||
Whenever the above-mentioned compiler error issue is fixed with the new Arduino SAMD release, you don't need to copy the `Arduino.h` file anymore.
|
||||
|
||||
#### 5. For Adafruit SAMD boards
|
||||
|
||||
***To be able to automatically detect and display BOARD_NAME on Adafruit SAMD (Itsy-Bitsy M4, etc) boards***, you have to copy the file [Adafruit SAMD platform.txt](Packages_Patches/adafruit/hardware/samd/1.6.4) into Adafruit samd directory (~/.arduino15/packages/adafruit/hardware/samd/1.6.4).
|
||||
|
||||
Supposing the Adafruit SAMD core version is 1.6.4. This file must be copied into the directory:
|
||||
|
||||
- `~/.arduino15/packages/adafruit/hardware/samd/1.6.4/platform.txt`
|
||||
|
||||
Whenever a new version is installed, remember to copy this file into the new version directory. For example, new version is x.yy.zz
|
||||
This file must be copied into the directory:
|
||||
|
||||
- `~/.arduino15/packages/adafruit/hardware/samd/x.yy.zz/platform.txt`
|
||||
|
||||
#### 6. For Seeeduino SAMD boards
|
||||
|
||||
***To be able to automatically detect and display BOARD_NAME on Seeeduino SAMD (XIAO M0, Wio Terminal, etc) boards***, you have to copy the file [Seeeduino SAMD platform.txt](Packages_Patches/Seeeduino/hardware/samd/1.8.1) into Adafruit samd directory (~/.arduino15/packages/Seeeduino/hardware/samd/1.8.1).
|
||||
|
||||
Supposing the Seeeduino SAMD core version is 1.8.1. This file must be copied into the directory:
|
||||
|
||||
- `~/.arduino15/packages/Seeeduino/hardware/samd/1.8.1/platform.txt`
|
||||
|
||||
Whenever a new version is installed, remember to copy this file into the new version directory. For example, new version is x.yy.zz
|
||||
This file must be copied into the directory:
|
||||
|
||||
- `~/.arduino15/packages/Seeeduino/hardware/samd/x.yy.zz/platform.txt`
|
||||
|
||||
#### 7. For STM32 boards
|
||||
|
||||
#### 7.1. For STM32 boards to use LAN8720
|
||||
#### 1. For STM32 boards to use LAN8720
|
||||
|
||||
To use LAN8720 on some STM32 boards
|
||||
|
||||
@@ -405,12 +196,12 @@ To use LAN8720 on some STM32 boards
|
||||
- **Discovery (DISCO_F746NG)**
|
||||
- **STM32F4 boards (BLACK_F407VE, BLACK_F407VG, BLACK_F407ZE, BLACK_F407ZG, BLACK_F407VE_Mini, DIYMORE_F407VGT, FK407M1)**
|
||||
|
||||
you have to copy the files [stm32f4xx_hal_conf_default.h](Packages_Patches/STM32/hardware/stm32/1.9.0/system/STM32F4xx) and [stm32f7xx_hal_conf_default.h](Packages_Patches/STM32/hardware/stm32/1.9.0/system/STM32F7xx) into STM32 stm32 directory (~/.arduino15/packages/STM32/hardware/stm32/1.9.0/system) to overwrite the old files.
|
||||
you have to copy the files [stm32f4xx_hal_conf_default.h](Packages_Patches/STM32/hardware/stm32/2.1.0/system/STM32F4xx) and [stm32f7xx_hal_conf_default.h](Packages_Patches/STM32/hardware/stm32/2.1.0/system/STM32F7xx) into STM32 stm32 directory (~/.arduino15/packages/STM32/hardware/stm32/2.1.0/system) to overwrite the old files.
|
||||
|
||||
Supposing the STM32 stm32 core version is 1.9.0. These files must be copied into the directory:
|
||||
Supposing the STM32 stm32 core version is 2.1.0. These files must be copied into the directory:
|
||||
|
||||
- `~/.arduino15/packages/STM32/hardware/stm32/1.9.0/system/STM32F4xx/stm32f4xx_hal_conf_default.h` for STM32F4.
|
||||
- `~/.arduino15/packages/STM32/hardware/stm32/1.9.0/system/STM32F7xx/stm32f7xx_hal_conf_default.h` for Nucleo-144 STM32F7.
|
||||
- `~/.arduino15/packages/STM32/hardware/stm32/2.1.0/system/STM32F4xx/stm32f4xx_hal_conf_default.h` for STM32F4.
|
||||
- `~/.arduino15/packages/STM32/hardware/stm32/2.1.0/system/STM32F7xx/stm32f7xx_hal_conf_default.h` for Nucleo-144 STM32F7.
|
||||
|
||||
Whenever a new version is installed, remember to copy this file into the new version directory. For example, new version is x.yy.zz,
|
||||
theses files must be copied into the corresponding directory:
|
||||
@@ -419,130 +210,24 @@ theses files must be copied into the corresponding directory:
|
||||
- `~/.arduino15/packages/STM32/hardware/stm32/x.yy.zz/system/STM32F7xx/stm32f7xx_hal_conf_default.h
|
||||
|
||||
|
||||
#### 7.2. For STM32 boards to use Serial1
|
||||
#### 2. For STM32 boards to use Serial1
|
||||
|
||||
**To use Serial1 on some STM32 boards without Serial1 definition (Nucleo-144 NUCLEO_F767ZI, Nucleo-64 NUCLEO_L053R8, etc.) boards**, you have to copy the files [STM32 variant.h](Packages_Patches/STM32/hardware/stm32/1.9.0) into STM32 stm32 directory (~/.arduino15/packages/STM32/hardware/stm32/1.9.0). You have to modify the files corresponding to your boards, this is just an illustration how to do.
|
||||
**To use Serial1 on some STM32 boards without Serial1 definition (Nucleo-144 NUCLEO_F767ZI, Nucleo-64 NUCLEO_L053R8, etc.) boards**, you have to copy the files [STM32 variant.h](Packages_Patches/STM32/hardware/stm32/2.1.0) into STM32 stm32 directory (~/.arduino15/packages/STM32/hardware/stm32/2.1.0). You have to modify the files corresponding to your boards, this is just an illustration how to do.
|
||||
|
||||
Supposing the STM32 stm32 core version is 1.9.0. These files must be copied into the directory:
|
||||
Supposing the STM32 stm32 core version is 2.1.0. These files must be copied into the directory:
|
||||
|
||||
- `~/.arduino15/packages/STM32/hardware/stm32/1.9.0/variants/NUCLEO_F767ZI/variant.h` for Nucleo-144 NUCLEO_F767ZI.
|
||||
- `~/.arduino15/packages/STM32/hardware/stm32/1.9.0/variants/NUCLEO_L053R8/variant.h` for Nucleo-64 NUCLEO_L053R8.
|
||||
- `~/.arduino15/packages/STM32/hardware/stm32/2.1.0/variants/STM32F7xx/F765Z(G-I)T_F767Z(G-I)T_F777ZIT/NUCLEO_F767ZI/variant.h` for Nucleo-144 NUCLEO_F767ZI.
|
||||
- `~/.arduino15/packages/STM32/hardware/stm32/2.1.0/variants/STM32L0xx/L052R(6-8)T_L053R(6-8)T_L063R8T/NUCLEO_L053R8/variant.h` for Nucleo-64 NUCLEO_L053R8.
|
||||
|
||||
Whenever a new version is installed, remember to copy this file into the new version directory. For example, new version is x.yy.zz,
|
||||
theses files must be copied into the corresponding directory:
|
||||
|
||||
- `~/.arduino15/packages/STM32/hardware/stm32/x.yy.zz/variants/NUCLEO_F767ZI/variant.h`
|
||||
- `~/.arduino15/packages/STM32/hardware/stm32/x.yy.zz/variants/NUCLEO_L053R8/variant.h`
|
||||
- `~/.arduino15/packages/STM32/hardware/stm32/x.yy.zz/variants/STM32F7xx/F765Z(G-I)T_F767Z(G-I)T_F777ZIT/NUCLEO_F767ZI/variant.h`
|
||||
- `~/.arduino15/packages/STM32/hardware/stm32/x.yy.zz/variants/STM32L0xx/L052R(6-8)T_L053R(6-8)T_L063R8T/NUCLEO_L053R8/variant.h`
|
||||
|
||||
---
|
||||
---
|
||||
|
||||
## HOWTO Install esp32-s2 core for ESP32-S2 (Saola, AI-Thinker ESP-12K) boards into Arduino IDE
|
||||
|
||||
|
||||
These are instructions demonstrating the steps to install esp32-s2 core on Ubuntu machines. For Windows or other OS'es, just follow the the similar principles and steps.
|
||||
|
||||
Assuming you already installed Arduino IDE ESP32 core and the installed directory is
|
||||
|
||||
`/home/your_account/.arduino15/packages/esp32`
|
||||
|
||||
|
||||
### 1. Save the original esp32 core
|
||||
|
||||
First, copy the whole original esp32 core to another safe place. Then delete all the sub-directories of
|
||||
|
||||
`/home/your_account/.arduino15/packages/esp32/hardware/esp32/1.0.4`
|
||||
|
||||
---
|
||||
|
||||
### 2. Download esp32-s2 core
|
||||
|
||||
#### 2.1 Download zip
|
||||
|
||||
Download [**esp32-s2 core**](https://github.com/espressif/arduino-esp32/tree/esp32s2) in the `zip` format:
|
||||
|
||||
`arduino-esp32-esp32s2.zip`
|
||||
|
||||
#### 2.2 Unzip
|
||||
|
||||
<p align="center">
|
||||
<img src="https://github.com/khoih-prog/AsyncHTTPRequest_Generic/blob/master/Images/esp32_s2_Core_Unzipped.png">
|
||||
</p>
|
||||
|
||||
#### 2.3 Update esp32-s2 core directories
|
||||
|
||||
Copy all subdirectories of esp32-s2 core into `/home/your_account/.arduino15/packages/esp32/hardware/esp32/1.0.4`
|
||||
|
||||
---
|
||||
|
||||
### 3 Download tools
|
||||
|
||||
|
||||
#### 3.1 Download Toolchain for Xtensa (ESP32-S2) based on GCC
|
||||
|
||||
Download [**esp32-s2 Toolchain**](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/api-guides/tools/idf-tools.html#xtensa-esp32s2-elf) corresponding to your environment (linux-amd64, win64, etc.).
|
||||
|
||||
For example `xtensa-esp32s2-elf-gcc8_4_0-esp-2020r3-linux-amd64.tar.gz`, then un-archive.
|
||||
|
||||
|
||||
<p align="center">
|
||||
<img src="https://github.com/khoih-prog/AsyncHTTPRequest_Generic/blob/master/Images/esp32_s2_Toolchain.png">
|
||||
</p>
|
||||
|
||||
#### 3.2 Download esptool
|
||||
|
||||
|
||||
Download [esptool](https://github.com/espressif/esptool/releases) int the `zip` format:
|
||||
|
||||
`esptool-3.0.zip`
|
||||
|
||||
#### 3.3 Unzip
|
||||
|
||||
<p align="center">
|
||||
<img src="https://github.com/khoih-prog/AsyncHTTPRequest_Generic/blob/master/Images/esp32_s2_esptool.png">
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
### 4. Update tools
|
||||
|
||||
#### 4.1 Update Toolchain
|
||||
|
||||
Copy whole `xtensa-esp32s2-elf` directory into `/home/your_account/.arduino15/packages/esp32/hardware/esp32/1.0.4/tools`
|
||||
|
||||
|
||||
#### 4.2 Update esptool
|
||||
|
||||
Rename `esptool-3.0` directory to `esptool`
|
||||
|
||||
|
||||
Copy whole `esptool` directory into `/home/your_account/.arduino15/packages/esp32/hardware/esp32/1.0.4/tools`
|
||||
|
||||
|
||||
<p align="center">
|
||||
<img src="https://github.com/khoih-prog/AsyncHTTPRequest_Generic/blob/master/Images/esp32_s2_tools.png">
|
||||
</p>
|
||||
|
||||
|
||||
### 5. esp32-s2 WebServer Library Patch
|
||||
|
||||
If you haven't installed a new version with [WebServer.handleClient delay PR #4350](https://github.com/espressif/arduino-esp32/pull/4350) or haven't applied the above mentioned PR, you have to use the following patch.
|
||||
|
||||
|
||||
**To be able to run Config Portal on ESP32-S2 boards**, you have to copy the files in [esp32-s2 WebServer Patch](esp32s2_WebServer_Patch/) directory into esp32-s2 WebServer library directory (~/.arduino15/packages/esp32/hardware/esp32/1.0.4/libraries/WebServer).
|
||||
|
||||
Supposing the esp32-s2 version is 1.0.4, these files `WebServer.h/cpp` must be copied into the directory to replace:
|
||||
|
||||
- `~/.arduino15/packages/esp32/hardware/esp32/1.0.4/libraries/WebServer/src/WebServer.h`
|
||||
- `~/.arduino15/packages/esp32/hardware/esp32/1.0.4/libraries/WebServer/src/WebServer.cpp`
|
||||
|
||||
|
||||
---
|
||||
|
||||
That's it. You're now ready to compile and test for ESP32-S2 now
|
||||
|
||||
---
|
||||
---
|
||||
|
||||
### Note for Platform IO using ESP32 LittleFS
|
||||
|
||||
@@ -728,6 +413,11 @@ Connect FDTI (USB to Serial) as follows:
|
||||
5. [AsyncSimpleGET_STM32_LAN8720](examples/STM32_LAN8720/AsyncSimpleGET_STM32_LAN8720)
|
||||
6. [AsyncWebClientRepeating_STM32_LAN8720](examples/STM32_LAN8720/AsyncWebClientRepeating_STM32_LAN8720)
|
||||
|
||||
#### For WT32_ETH01
|
||||
|
||||
1. [AsyncHTTPRequest_WT32_ETH01](examples/WT32_ETH01/AsyncHTTPRequest_WT32_ETH01)
|
||||
2. [AsyncHTTPMultiRequests_WT32_ETH01](examples/WT32_ETH01/AsyncHTTPMultiRequests_ESP)
|
||||
|
||||
---
|
||||
|
||||
### Example [AsyncHTTPRequest_STM32](examples/AsyncHTTPRequest_STM32)
|
||||
@@ -959,7 +649,7 @@ IPAddress ip(192, 168, 2, 232);
|
||||
|
||||
```
|
||||
Start AsyncHTTPRequest_STM32 on NUCLEO_F767ZI
|
||||
AsyncHTTPRequest_Generic v1.1.5
|
||||
AsyncHTTPRequest_Generic v1.3.1
|
||||
AsyncHTTPRequest @ IP : 192.168.2.72
|
||||
|
||||
**************************************
|
||||
@@ -1004,7 +694,7 @@ week_number: 37
|
||||
|
||||
```
|
||||
Starting AsyncHTTPRequest_ESP_WiFiManager using LittleFS on ESP8266_NODEMCU
|
||||
AsyncHTTPRequest_Generic v1.1.5
|
||||
AsyncHTTPRequest_Generic v1.3.1
|
||||
Stored: SSID = HueNet1, Pass = 12345678
|
||||
Got stored Credentials. Timeout 120s
|
||||
ConnectMultiWiFi in setup
|
||||
@@ -1037,7 +727,7 @@ HHHHHH
|
||||
|
||||
```
|
||||
Starting AsyncHTTPRequest_ESP_WiFiManager using SPIFFS on ESP32_DEV
|
||||
AsyncHTTPRequest_Generic v1.1.5
|
||||
AsyncHTTPRequest_Generic v1.3.1
|
||||
Stored: SSID = HueNet1, Pass = 12345678
|
||||
Got stored Credentials. Timeout 120s
|
||||
ConnectMultiWiFi in setup
|
||||
@@ -1088,7 +778,7 @@ HHHHHHHHH HHHHHHHHHH HHHHHHHHHH
|
||||
|
||||
```
|
||||
Starting AsyncHTTPRequest_ESP using ESP8266_NODEMCU
|
||||
AsyncHTTPRequest_Generic v1.1.5
|
||||
AsyncHTTPRequest_Generic v1.3.1
|
||||
Connecting to WiFi SSID: HueNet1
|
||||
...........
|
||||
HTTP WebServer is @ IP : 192.168.2.81
|
||||
@@ -1120,7 +810,7 @@ HHHHHHHHH HHHHHHHHHH HHHHHHHHHH H
|
||||
|
||||
```
|
||||
Start AsyncWebClientRepeating_STM32 on NUCLEO_F767ZI
|
||||
AsyncHTTPRequest_Generic v1.1.5
|
||||
AsyncHTTPRequest_Generic v1.3.1
|
||||
AsyncHTTPRequest @ IP : 192.168.2.72
|
||||
|
||||
**************************************
|
||||
@@ -1175,7 +865,7 @@ AsyncHTTPRequest @ IP : 192.168.2.72
|
||||
|
||||
```
|
||||
Start AsyncWebClientRepeating_STM32_LAN8720 on BLACK_F407VE
|
||||
AsyncHTTPRequest_Generic v1.2.0
|
||||
AsyncHTTPRequest_Generic v1.3.1
|
||||
AsyncHTTPRequest @ IP : 192.168.2.150
|
||||
|
||||
|
||||
@@ -1224,6 +914,63 @@ AsyncHTTPRequest @ IP : 192.168.2.150
|
||||
**************************************
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
#### 7. [AsyncHTTPMultiRequests_WT32_ETH01](examples/WT32_ETH01/AsyncHTTPMultiRequests_WT32_ETH01) on ESP32_DEV with ETH_PHY_LAN8720
|
||||
|
||||
```
|
||||
Starting AsyncHTTPRequest_WT32_ETH01 on ESP32_DEV with ETH_PHY_LAN8720
|
||||
WebServer_WT32_ETH01 v1.2.1
|
||||
AsyncHTTPRequest_Generic v1.3.1
|
||||
ETH MAC: A8:03:2A:A1:61:73, IPv4: 192.168.2.232, FULL_DUPLEX, 100Mbps
|
||||
AsyncHTTPRequest @ IP : 192.168.2.232
|
||||
|
||||
|
||||
***************Current***************
|
||||
{"lat":-24.32,"lon":-46.9983,"timezone":"America/Sao_Paulo","timezone_offset":-10800,"current":{"dt":1625887856,"sunrise":1625910700,"sunset":1625949281,"temp":290.45,"feels_like":290.51,"pressure":1022,"humidity":87,"dew_point":288.27,"uvi":0,"clouds":97,"visibility":10000,"wind_speed":1.3,"wind_deg":3,"wind_gust":1.77,"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04n"}]}}
|
||||
**************************************
|
||||
HHHHHH
|
||||
***************Minutely***************
|
||||
{"lat":-24.32,"lon":-46.9983,"timezone":"America/Sao_Paulo","timezone_offset":-10800,"minutely":[{"dt":1625887920,"precipitation":0},{"dt":1625887980,"precipitation":0},{"dt":1625888040,"precipitation":0},{"dt":1625888100,"precipitation":0},{"dt":1625888160,"precipitation":0},{"dt":1625888220,"precipitation":0},{"dt":1625888280,"precipitation":0},{"dt":1625888340,"precipitation":0},{"dt":1625888400,"precipitation":0},{"dt":1625888460,"precipitation":0},{"dt":1625888520,"precipitation":0},{"dt":1625888580,"precipitation":0},{"dt":1625888640,"precipitation":0},{"dt":1625888700,"precipitation":0},{"dt":1625888760,"precipitation":0},{"dt":1625888820,"precipitation":0},{"dt":1625888880,"precipitation":0},{"dt":1625888940,"precipitation":0},{"dt":1625889000,"precipitation":0},{"dt":1625889060,"precipitation":0},{"dt":1625889120,"precipitation":0},{"dt":1625889180,"precipitation":0},{"dt":1625889240,"precipitation":0},{"dt":1625889300,"precipitation":0},{"dt":1625889360,"precipitation":0},{"dt":1625889420,"precipitation":0},{"dt":1625889480,"precipitation":0},{"dt":1625889540,"precipitation":0},{"dt":1625889600,"precipitation":0},{"dt":1625889660,"precipitation":0},{"dt":1625889720,"precipitation":0},{"dt":1625889780,"precipitation":0},{"dt":1625889840,"precipitation":0},{"dt":1625889900,"precipitation":0},{"dt":1625889960,"precipitation":0},{"dt":1625890020,"precipitation":0},{"dt":1625890080,"precipitation":0},{"dt":1625890140,"precipitation":0},{"dt":1625890200,"precipitation":0},{"dt":1625890260,"precipitation":0},{"dt":1625890320,"precipitation":0},{"dt":1625890380,"precipitation":0},{"dt":1625890440,"precipitation":0},{"dt":1625890500,"precipitation":0},{"dt":1625890560,"precipitation":0},{"dt":1625890620,"precipitation":0},{"dt":1625890680,"precipitation":0},{"dt":1625890740,"precipitation":0},{"dt":1625890800,"precipitation":0},{"dt":1625890860,"precipitation":0},{"dt":1625890920,"precipitation":0},{"dt":1625890980,"precipitation":0},{"dt":1625891040,"precipitation":0},{"dt":1625891100,"precipitation":0},{"dt":1625891160,"precipitation":0},{"dt":1625891220,"precipitation":0},{"dt":1625891280,"precipitation":0},{"dt":1625891340,"precipitation":0},{"dt":1625891400,"precipitation":0},{"dt":1625891460,"precipitation":0},{"dt":1625891520,"precipitation":0}]}
|
||||
**************************************
|
||||
HHHH HH
|
||||
***************Daily***************
|
||||
{"lat":-24.32,"lon":-46.9983,"timezone":"America/Sao_Paulo","timezone_offset":-10800,"daily":[{"dt":1625929200,"sunrise":1625910700,"sunset":1625949281,"moonrise":1625912640,"moonset":1625951340,"moon_phase":0.02,"temp":{"day":295.51,"min":288.03,"max":295.54,"night":289.23,"eve":290.52,"morn":288.14},"feels_like":{"day":295.42,"night":289.24,"eve":290.69,"morn":288.1},"pressure":1021,"humidity":62,"dew_point":287.26,"wind_speed":2.25,"wind_deg":151,"wind_gust":2.36,"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01d"}],"clouds":0,"pop":0.01,"uvi":4.97},{"dt":1626015600,"sunrise":1625997092,"sunset":1626035705,"moonrise":1626001860,"moonset":1626041220,"moon_phase":0.05,"temp":{"day":295.33,"min":288.28,"max":295.45,"night":290.23,"eve":290.91,"morn":288.28},"feels_like":{"day":295.27,"night":290.5,"eve":291.22,"morn":288.07},"pressure":1021,"humidity":64,"dew_point":287.51,"wind_speed":2.46,"wind_deg":173,"wind_gust":2.85,"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01d"}],"clouds":0,"pop":0,"uvi":5.01},{"dt":1626102000,"sunrise":1626083482,"sunset":1626122130,"moonrise":1626090900,"moonset":1626131100,"moon_phase":0.08,"temp":{"day":295.54,"min":289.16,"max":295.58,"night":290.41,"eve":291.33,"morn":289.32},"feels_like":{"day":295.61,"night":290.7,"eve":291.66,"morn":289.45},"pressure":1022,"humidity":68,"dew_point":288.68,"wind_speed":2.3,"wind_deg":115,"wind_gust":2.47,"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01d"}],"clouds":0,"pop":0.01,"uvi":5.02},{"dt":1626188400,"sunrise":1626169871,"sunset":1626208556,"moonrise":1626179700,"moonset":1626220980,"moon_phase":0.12,"temp":{"day":297.47,"min":288.79,"max":297.47,"night":291.03,"eve":291.51,"morn":288.79},"feels_like":{"day":297.42,"night":291.09,"eve":291.75,"morn":288.73},"pressure":1020,"humidity":56,"dew_point":287.21,"wind_speed":2.26,"wind_deg":6,"wind_gust":2.64,"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01d"}],"clouds":7,"pop":0,"uvi":5.16},{"dt":1626274800,"sunrise":1626256259,"sunset":1626294981,"moonrise":1626268380,"moonset":1626310860,"moon_phase":0.15,"temp":{"day":300.56,"min":291.14,"max":300.56,"night":292.56,"eve":293.32,"morn":291.14},"feels_like":{"day":300.44,"night":292.31,"eve":293.3,"morn":290.64},"pressure":1017,"humidity":42,"dew_point":285.41,"wind_speed":2.21,"wind_deg":9,"wind_gust":2.64,"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04d"}],"clouds":99,"pop":0,"uvi":1.57},{"dt":1626361200,"sunrise":1626342645,"sunset":1626381407,"moonrise":1626356940,"moonset":1626400740,"moon_phase":0.19,"temp":{"day":303.08,"min":291.35,"max":303.08,"night":294.83,"eve":295.82,"morn":291.35},"feels_like":{"day":302.65,"night":294.54,"eve":295.79,"morn":290.77},"pressure":1012,"humidity":39,"dew_point":286.19,"wind_speed":2.6,"wind_deg":343,"wind_gust":5.27,"weather":[{"id":802,"main":"Clouds","description":"scattered clouds","icon":"03d"}],"clouds":40,"pop":0,"uvi":2},{"dt":1626447600,"sunrise":1626429031,"sunset":1626467833,"moonrise":1626445440,"moonset":1626490680,"moon_phase":0.22,"temp":{"day":292.5,"min":289.95,"max":294.21,"night":289.95,"eve":290.68,"morn":291.26},"feels_like":{"day":292.84,"night":290.14,"eve":290.92,"morn":291.4},"pressure":1021,"humidity":90,"dew_point":290.28,"wind_speed":4.17,"wind_deg":265,"wind_gust":7.18,"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10d"}],"clouds":100,"pop":0.76,"rain":4.13,"uvi":2},{"dt":1626534000,"sunrise":1626515415,"sunset":1626554260,"moonrise":1626534060,"moonset":0,"moon_phase":0.25,"temp":{"day":288.1,"min":287.9,"max":289.38,"night":288.96,"eve":288.71,"morn":288.22},"feels_like":{"day":288.16,"night":289.05,"eve":288.78,"morn":288.24},"pressure":1025,"humidity":96,"dew_point":287.06,"wind_speed":3.79,"wind_deg":144,"wind_gust":6.59,"weather":[{"id":501,"main":"Rain","description":"moderate rain","icon":"10d"}],"clouds":100,"pop":1,"rain":32.28,"uvi":2}]}
|
||||
**************************************
|
||||
H
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
#### 8. [AsyncHTTPRequest_WT32_ETH01](examples/WT32_ETH01/AsyncHTTPRequest_WT32_ETH01) on ESP32_DEV with ETH_PHY_LAN8720
|
||||
|
||||
```
|
||||
Starting AsyncHTTPRequest_WT32_ETH01 on ESP32_DEV with ETH_PHY_LAN8720
|
||||
WebServer_WT32_ETH01 v1.2.1
|
||||
AsyncHTTPRequest_Generic v1.3.1
|
||||
ETH MAC: A8:03:2A:A1:61:73, IPv4: 192.168.2.232, FULL_DUPLEX, 100Mbps
|
||||
AsyncHTTPRequest @ IP : 192.168.2.232
|
||||
|
||||
**************************************
|
||||
abbreviation: EDT
|
||||
client_ip: 45.72.193.56
|
||||
datetime: 2021-07-09T23:16:50.506413-04:00
|
||||
day_of_week: 5
|
||||
day_of_year: 190
|
||||
dst: true
|
||||
dst_from: 2021-03-14T07:00:00+00:00
|
||||
dst_offset: 3600
|
||||
dst_until: 2021-11-07T06:00:00+00:00
|
||||
raw_offset: -18000
|
||||
timezone: America/Toronto
|
||||
unixtime: 1625887010
|
||||
utc_datetime: 2021-07-10T03:16:50.506413+00:00
|
||||
utc_offset: -04:00
|
||||
week_number: 27
|
||||
**************************************
|
||||
```
|
||||
|
||||
|
||||
---
|
||||
---
|
||||
|
||||
@@ -1271,58 +1018,7 @@ Submit issues to: [AsyncHTTPRequest_Generic issues](https://github.com/khoih-pro
|
||||
3. Add debugging features.
|
||||
4. Add PUT, PATCH, DELETE and HEAD besides GET and POST.
|
||||
5. Add support to **Ethernet LAN8720** using [STM32Ethernet library](https://github.com/stm32duino/STM32Ethernet), for boards such as **Nucleo-144 (F429ZI, NUCLEO_F746NG, NUCLEO_F746ZG, NUCLEO_F756ZG), Discovery (DISCO_F746NG)** and **STM32F4 boards (BLACK_F407VE, BLACK_F407VG, BLACK_F407ZE, BLACK_F407ZG, BLACK_F407VE_Mini, DIYMORE_F407VGT, FK407M1)**
|
||||
|
||||
|
||||
---
|
||||
|
||||
## Releases
|
||||
|
||||
### Releases v1.2.0
|
||||
|
||||
1. Add support to **LAN8720** Ethernet for many **STM32F4** (F407xx, NUCLEO_F429ZI) and **STM32F7** (DISCO_F746NG, NUCLEO_F746ZG, NUCLEO_F756ZG) boards.
|
||||
2. Add LAN8720 examples
|
||||
3. Add Packages' Patches for STM32 to use LAN8720 with STM32Ethernet and LwIP libraries
|
||||
4. Update ESP_WiFiManager-related example to fix multiWiFi timings to work better with latest esp32 core v1.0.6
|
||||
|
||||
### Releases v1.1.5
|
||||
|
||||
1. Fix dependency on unpublished [**STM32AsyncTCP Library**](https://github.com/philbowles/STM32AsyncTCP). Check [Compilation broken due to error in STM32AsyncTCP dependency](https://github.com/khoih-prog/AsyncWebServer_STM32/issues/4) and [how to run one of the examples?](https://github.com/khoih-prog/AsyncWebServer_STM32/issues/2).
|
||||
|
||||
### Releases v1.1.4
|
||||
|
||||
1. Fix `library.properties` dependency
|
||||
|
||||
### Releases v1.1.3
|
||||
|
||||
1. Fix non-persistent Connection header bug. Check [**'Connection' header expects 'disconnect' instead 'close' ? #13**](https://github.com/khoih-prog/AsyncHTTPRequest_Generic/issues/13)
|
||||
2. Add ESP32-S2 support
|
||||
3. Tested with [**Latest ESP32 Core 1.0.5**](https://github.com/espressif/arduino-esp32) for ESP32-based boards.
|
||||
|
||||
### Releases v1.1.2
|
||||
|
||||
1. Rename _lock and _unlock to avoid conflict with [**ESP32/ESP8266 AsyncWebServer**](https://github.com/me-no-dev/ESPAsyncWebServer) library. Check [**compatibility with ESPAsyncWebServer #11**](https://github.com/khoih-prog/AsyncHTTPRequest_Generic/issues/11)
|
||||
2. Fix compiler warnings.
|
||||
|
||||
### Releases v1.1.1
|
||||
|
||||
1. Prevent crash if request and/or method not correct.
|
||||
|
||||
### Releases v1.1.0
|
||||
|
||||
1. Add HTTP PUT, PATCH, DELETE and HEAD methods. Check [Add support for sending PUT, PATCH, DELETE request](https://github.com/khoih-prog/AsyncHTTPRequest_Generic/issues/5)
|
||||
|
||||
### Releases v1.0.2
|
||||
|
||||
1. Make Mutex Lock and delete more reliable and error-proof to prevent random crash.
|
||||
|
||||
### Releases v1.0.1
|
||||
|
||||
1. Restore cpp code besides Impl.h code to use in case of `multiple definition` linker error. Thanks to [Daniel Brunner](https://github.com/0xFEEDC0DE64) to report and make PR in [**Fixed linker errors when included in multiple .cpp files**](https://github.com/khoih-prog/AsyncHTTPRequest_Generic/pull/1). See [**HOWTO Fix `Multiple Definitions` Linker Error**](https://github.com/khoih-prog/AsyncHTTPRequest_Generic#HOWTO-Fix-Multiple-Definitions-Linker-Error)
|
||||
|
||||
### Releases v1.0.0
|
||||
|
||||
1. Initial coding to add support to **STM32F/L/H/G/WB/MP1** using built-in LAN8742A Ethernet (Nucleo-144, DISCOVERY, etc).
|
||||
2. Add examples using STM32 boards.
|
||||
6. Add support to **WT32_ETH01** using ESP32-based boards and LAN8720 Ethernet
|
||||
|
||||
---
|
||||
---
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
# AsyncHTTPRequest_Generic
|
||||
|
||||
[](https://www.ardu-badge.com/AsyncHTTPRequest_Generic)
|
||||
[](https://github.com/khoih-prog/AsyncHTTPRequest_Generic/releases)
|
||||
[](https://github.com/khoih-prog/AsyncHTTPRequest_Generic/blob/master/LICENSE)
|
||||
[](#Contributing)
|
||||
[](http://github.com/khoih-prog/AsyncHTTPRequest_Generic/issues)
|
||||
|
||||
---
|
||||
---
|
||||
|
||||
## Table of Contents
|
||||
|
||||
* [Changelog](#changelog)
|
||||
* [Releases v1.3.1](#releases-v131)
|
||||
* [Releases v1.3.0](#releases-v130)
|
||||
* [Releases v1.2.0](#releases-v120)
|
||||
* [Releases v1.1.5](#releases-v115)
|
||||
* [Releases v1.1.4](#releases-v114)
|
||||
* [Releases v1.1.3](#releases-v113)
|
||||
* [Releases v1.1.2](#releases-v112)
|
||||
* [Releases v1.1.1](#releases-v111)
|
||||
* [Releases v1.1.0](#releases-v110)
|
||||
* [Releases v1.0.2](#releases-v102)
|
||||
* [Releases v1.0.1](#releases-v101)
|
||||
* [Releases v1.0.0](#releases-v100)
|
||||
|
||||
---
|
||||
---
|
||||
|
||||
## Changelog
|
||||
|
||||
### Releases v1.3.1
|
||||
|
||||
1. Update `platform.ini` and `library.json` to use original `khoih-prog` instead of `khoih.prog` after PIO fix
|
||||
2. Update `Packages' Patches`
|
||||
|
||||
### Releases v1.3.0
|
||||
|
||||
1. Add support to WT32_ETH01 (ESP32 + LAN8720) boards
|
||||
2. Add examples with new features
|
||||
|
||||
### Releases v1.2.0
|
||||
|
||||
1. Add support to **LAN8720** Ethernet for many **STM32F4** (F407xx, NUCLEO_F429ZI) and **STM32F7** (DISCO_F746NG, NUCLEO_F746ZG, NUCLEO_F756ZG) boards.
|
||||
2. Add LAN8720 examples
|
||||
3. Add Packages' Patches for STM32 to use LAN8720 with STM32Ethernet and LwIP libraries
|
||||
4. Update ESP_WiFiManager-related example to fix multiWiFi timings to work better with latest esp32 core v1.0.6
|
||||
|
||||
### Releases v1.1.5
|
||||
|
||||
1. Fix dependency on unpublished [**STM32AsyncTCP Library**](https://github.com/philbowles/STM32AsyncTCP). Check [Compilation broken due to error in STM32AsyncTCP dependency](https://github.com/khoih-prog/AsyncWebServer_STM32/issues/4) and [how to run one of the examples?](https://github.com/khoih-prog/AsyncWebServer_STM32/issues/2).
|
||||
|
||||
### Releases v1.1.4
|
||||
|
||||
1. Fix `library.properties` dependency
|
||||
|
||||
### Releases v1.1.3
|
||||
|
||||
1. Fix non-persistent Connection header bug. Check [**'Connection' header expects 'disconnect' instead 'close' ? #13**](https://github.com/khoih-prog/AsyncHTTPRequest_Generic/issues/13)
|
||||
2. Add ESP32-S2 support
|
||||
3. Tested with [**Latest ESP32 Core 1.0.5**](https://github.com/espressif/arduino-esp32) for ESP32-based boards.
|
||||
|
||||
### Releases v1.1.2
|
||||
|
||||
1. Rename _lock and _unlock to avoid conflict with [**ESP32/ESP8266 AsyncWebServer**](https://github.com/me-no-dev/ESPAsyncWebServer) library. Check [**compatibility with ESPAsyncWebServer #11**](https://github.com/khoih-prog/AsyncHTTPRequest_Generic/issues/11)
|
||||
2. Fix compiler warnings.
|
||||
|
||||
### Releases v1.1.1
|
||||
|
||||
1. Prevent crash if request and/or method not correct.
|
||||
|
||||
|
||||
### Releases v1.1.0
|
||||
|
||||
1. Add HTTP PUT, PATCH, DELETE and HEAD methods. Check [Add support for sending PUT, PATCH, DELETE request](https://github.com/khoih-prog/AsyncHTTPRequest_Generic/issues/5)
|
||||
2. Add Table of Contents
|
||||
3. Add Version String
|
||||
|
||||
|
||||
### Releases v1.0.2
|
||||
|
||||
1. Make Mutex Lock and delete more reliable and error-proof to prevent random crash.
|
||||
|
||||
### Releases v1.0.1
|
||||
|
||||
1. Restore cpp code besides Impl.h code to use in case of `multiple definition` linker error. Thanks to [Daniel Brunner](https://github.com/0xFEEDC0DE64) to report and make PR in [**Fixed linker errors when included in multiple .cpp files**](https://github.com/khoih-prog/AsyncHTTPRequest_Generic/pull/1). See [**HOWTO Fix `Multiple Definitions` Linker Error**](https://github.com/khoih-prog/AsyncHTTPRequest_Generic#HOWTO-Fix-Multiple-Definitions-Linker-Error)
|
||||
|
||||
|
||||
### Releases v1.0.0
|
||||
|
||||
1. Initial coding to add support to **STM32F/L/H/G/WB/MP1** using built-in LAN8742A Ethernet (Nucleo-144, DISCOVERY, etc).
|
||||
2. Add examples using STM32 boards.
|
||||
|
||||
|
||||
@@ -16,21 +16,6 @@
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Version: 1.2.0
|
||||
|
||||
Version Modified By Date Comments
|
||||
------- ----------- ---------- -----------
|
||||
1.0.0 K Hoang 14/09/2020 Initial coding to add support to STM32 using built-in Ethernet (Nucleo-144, DISCOVERY, etc).
|
||||
1.0.1 K Hoang 09/10/2020 Restore cpp code besides Impl.h code.
|
||||
1.0.2 K Hoang 09/11/2020 Make Mutex Lock and delete more reliable and error-proof
|
||||
1.1.0 K Hoang 23/12/2020 Add HTTP PUT, PATCH, DELETE and HEAD methods
|
||||
1.1.1 K Hoang 24/12/2020 Prevent crash if request and/or method not correct.
|
||||
1.1.2 K Hoang 11/02/2021 Rename _lock and _unlock to avoid conflict with AsyncWebServer library
|
||||
1.1.3 K Hoang 25/02/2021 Fix non-persistent Connection header bug
|
||||
1.1.4 K Hoang 21/03/2021 Fix `library.properties` dependency
|
||||
1.1.5 K Hoang 22/03/2021 Fix dependency on STM32AsyncTCP Library
|
||||
1.2.0 K Hoang 11/04/2021 Add support to LAN8720 using STM32F4 or STM32F7
|
||||
*****************************************************************************************************************************/
|
||||
|
||||
#include "defines.h"
|
||||
|
||||
@@ -16,21 +16,6 @@
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Version: 1.2.0
|
||||
|
||||
Version Modified By Date Comments
|
||||
------- ----------- ---------- -----------
|
||||
1.0.0 K Hoang 14/09/2020 Initial coding to add support to STM32 using built-in Ethernet (Nucleo-144, DISCOVERY, etc).
|
||||
1.0.1 K Hoang 09/10/2020 Restore cpp code besides Impl.h code.
|
||||
1.0.2 K Hoang 09/11/2020 Make Mutex Lock and delete more reliable and error-proof
|
||||
1.1.0 K Hoang 23/12/2020 Add HTTP PUT, PATCH, DELETE and HEAD methods
|
||||
1.1.1 K Hoang 24/12/2020 Prevent crash if request and/or method not correct.
|
||||
1.1.2 K Hoang 11/02/2021 Rename _lock and _unlock to avoid conflict with AsyncWebServer library
|
||||
1.1.3 K Hoang 25/02/2021 Fix non-persistent Connection header bug
|
||||
1.1.4 K Hoang 21/03/2021 Fix `library.properties` dependency
|
||||
1.1.5 K Hoang 22/03/2021 Fix dependency on STM32AsyncTCP Library
|
||||
1.2.0 K Hoang 11/04/2021 Add support to LAN8720 using STM32F4 or STM32F7
|
||||
*****************************************************************************************************************************/
|
||||
|
||||
/**
|
||||
|
||||
@@ -16,21 +16,6 @@
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Version: 1.2.0
|
||||
|
||||
Version Modified By Date Comments
|
||||
------- ----------- ---------- -----------
|
||||
1.0.0 K Hoang 14/09/2020 Initial coding to add support to STM32 using built-in Ethernet (Nucleo-144, DISCOVERY, etc).
|
||||
1.0.1 K Hoang 09/10/2020 Restore cpp code besides Impl.h code.
|
||||
1.0.2 K Hoang 09/11/2020 Make Mutex Lock and delete more reliable and error-proof
|
||||
1.1.0 K Hoang 23/12/2020 Add HTTP PUT, PATCH, DELETE and HEAD methods
|
||||
1.1.1 K Hoang 24/12/2020 Prevent crash if request and/or method not correct.
|
||||
1.1.2 K Hoang 11/02/2021 Rename _lock and _unlock to avoid conflict with AsyncWebServer library
|
||||
1.1.3 K Hoang 25/02/2021 Fix non-persistent Connection header bug
|
||||
1.1.4 K Hoang 21/03/2021 Fix `library.properties` dependency
|
||||
1.1.5 K Hoang 22/03/2021 Fix dependency on STM32AsyncTCP Library
|
||||
1.2.0 K Hoang 11/04/2021 Add support to LAN8720 using STM32F4 or STM32F7
|
||||
*****************************************************************************************************************************/
|
||||
|
||||
// Dweet.io POST client. Connects to dweet.io once every ten seconds, sends a POST request and a request body.
|
||||
|
||||
@@ -16,21 +16,6 @@
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Version: 1.2.0
|
||||
|
||||
Version Modified By Date Comments
|
||||
------- ----------- ---------- -----------
|
||||
1.0.0 K Hoang 14/09/2020 Initial coding to add support to STM32 using built-in Ethernet (Nucleo-144, DISCOVERY, etc).
|
||||
1.0.1 K Hoang 09/10/2020 Restore cpp code besides Impl.h code.
|
||||
1.0.2 K Hoang 09/11/2020 Make Mutex Lock and delete more reliable and error-proof
|
||||
1.1.0 K Hoang 23/12/2020 Add HTTP PUT, PATCH, DELETE and HEAD methods
|
||||
1.1.1 K Hoang 24/12/2020 Prevent crash if request and/or method not correct.
|
||||
1.1.2 K Hoang 11/02/2021 Rename _lock and _unlock to avoid conflict with AsyncWebServer library
|
||||
1.1.3 K Hoang 25/02/2021 Fix non-persistent Connection header bug
|
||||
1.1.4 K Hoang 21/03/2021 Fix `library.properties` dependency
|
||||
1.1.5 K Hoang 22/03/2021 Fix dependency on STM32AsyncTCP Library
|
||||
1.2.0 K Hoang 11/04/2021 Add support to LAN8720 using STM32F4 or STM32F7
|
||||
*****************************************************************************************************************************/
|
||||
//************************************************************************************************************
|
||||
//
|
||||
@@ -200,7 +185,7 @@ void setup()
|
||||
Serial.print(".");
|
||||
}
|
||||
|
||||
Serial.print(F("\nHTTP WebServer is @ IP : "));
|
||||
Serial.print(F("AsyncHTTPRequest @ IP : "));
|
||||
Serial.println(WiFi.localIP());
|
||||
|
||||
request.setDebug(false);
|
||||
|
||||
@@ -16,21 +16,6 @@
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Version: 1.2.0
|
||||
|
||||
Version Modified By Date Comments
|
||||
------- ----------- ---------- -----------
|
||||
1.0.0 K Hoang 14/09/2020 Initial coding to add support to STM32 using built-in Ethernet (Nucleo-144, DISCOVERY, etc).
|
||||
1.0.1 K Hoang 09/10/2020 Restore cpp code besides Impl.h code.
|
||||
1.0.2 K Hoang 09/11/2020 Make Mutex Lock and delete more reliable and error-proof
|
||||
1.1.0 K Hoang 23/12/2020 Add HTTP PUT, PATCH, DELETE and HEAD methods
|
||||
1.1.1 K Hoang 24/12/2020 Prevent crash if request and/or method not correct.
|
||||
1.1.2 K Hoang 11/02/2021 Rename _lock and _unlock to avoid conflict with AsyncWebServer library
|
||||
1.1.3 K Hoang 25/02/2021 Fix non-persistent Connection header bug
|
||||
1.1.4 K Hoang 21/03/2021 Fix `library.properties` dependency
|
||||
1.1.5 K Hoang 22/03/2021 Fix dependency on STM32AsyncTCP Library
|
||||
1.2.0 K Hoang 11/04/2021 Add support to LAN8720 using STM32F4 or STM32F7
|
||||
*****************************************************************************************************************************/
|
||||
//************************************************************************************************************
|
||||
//
|
||||
@@ -167,7 +152,7 @@ void setup()
|
||||
Serial.print(".");
|
||||
}
|
||||
|
||||
Serial.print(F("\nHTTP WebServer is @ IP : "));
|
||||
Serial.print(F("AsyncHTTPRequest @ IP : "));
|
||||
Serial.println(WiFi.localIP());
|
||||
|
||||
request.setDebug(false);
|
||||
|
||||
@@ -16,21 +16,6 @@
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Version: 1.2.0
|
||||
|
||||
Version Modified By Date Comments
|
||||
------- ----------- ---------- -----------
|
||||
1.0.0 K Hoang 14/09/2020 Initial coding to add support to STM32 using built-in Ethernet (Nucleo-144, DISCOVERY, etc).
|
||||
1.0.1 K Hoang 09/10/2020 Restore cpp code besides Impl.h code.
|
||||
1.0.2 K Hoang 09/11/2020 Make Mutex Lock and delete more reliable and error-proof
|
||||
1.1.0 K Hoang 23/12/2020 Add HTTP PUT, PATCH, DELETE and HEAD methods
|
||||
1.1.1 K Hoang 24/12/2020 Prevent crash if request and/or method not correct.
|
||||
1.1.2 K Hoang 11/02/2021 Rename _lock and _unlock to avoid conflict with AsyncWebServer library
|
||||
1.1.3 K Hoang 25/02/2021 Fix non-persistent Connection header bug
|
||||
1.1.4 K Hoang 21/03/2021 Fix `library.properties` dependency
|
||||
1.1.5 K Hoang 22/03/2021 Fix dependency on STM32AsyncTCP Library
|
||||
1.2.0 K Hoang 11/04/2021 Add support to LAN8720 using STM32F4 or STM32F7
|
||||
*****************************************************************************************************************************/
|
||||
//************************************************************************************************************
|
||||
//
|
||||
|
||||
@@ -16,21 +16,6 @@
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Version: 1.2.0
|
||||
|
||||
Version Modified By Date Comments
|
||||
------- ----------- ---------- -----------
|
||||
1.0.0 K Hoang 14/09/2020 Initial coding to add support to STM32 using built-in Ethernet (Nucleo-144, DISCOVERY, etc).
|
||||
1.0.1 K Hoang 09/10/2020 Restore cpp code besides Impl.h code.
|
||||
1.0.2 K Hoang 09/11/2020 Make Mutex Lock and delete more reliable and error-proof
|
||||
1.1.0 K Hoang 23/12/2020 Add HTTP PUT, PATCH, DELETE and HEAD methods
|
||||
1.1.1 K Hoang 24/12/2020 Prevent crash if request and/or method not correct.
|
||||
1.1.2 K Hoang 11/02/2021 Rename _lock and _unlock to avoid conflict with AsyncWebServer library
|
||||
1.1.3 K Hoang 25/02/2021 Fix non-persistent Connection header bug
|
||||
1.1.4 K Hoang 21/03/2021 Fix `library.properties` dependency
|
||||
1.1.5 K Hoang 22/03/2021 Fix dependency on STM32AsyncTCP Library
|
||||
1.2.0 K Hoang 11/04/2021 Add support to LAN8720 using STM32F4 or STM32F7
|
||||
*****************************************************************************************************************************/
|
||||
//************************************************************************************************************
|
||||
//
|
||||
|
||||
@@ -16,21 +16,6 @@
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Version: 1.2.0
|
||||
|
||||
Version Modified By Date Comments
|
||||
------- ----------- ---------- -----------
|
||||
1.0.0 K Hoang 14/09/2020 Initial coding to add support to STM32 using built-in Ethernet (Nucleo-144, DISCOVERY, etc).
|
||||
1.0.1 K Hoang 09/10/2020 Restore cpp code besides Impl.h code.
|
||||
1.0.2 K Hoang 09/11/2020 Make Mutex Lock and delete more reliable and error-proof
|
||||
1.1.0 K Hoang 23/12/2020 Add HTTP PUT, PATCH, DELETE and HEAD methods
|
||||
1.1.1 K Hoang 24/12/2020 Prevent crash if request and/or method not correct.
|
||||
1.1.2 K Hoang 11/02/2021 Rename _lock and _unlock to avoid conflict with AsyncWebServer library
|
||||
1.1.3 K Hoang 25/02/2021 Fix non-persistent Connection header bug
|
||||
1.1.4 K Hoang 21/03/2021 Fix `library.properties` dependency
|
||||
1.1.5 K Hoang 22/03/2021 Fix dependency on STM32AsyncTCP Library
|
||||
1.2.0 K Hoang 11/04/2021 Add support to LAN8720 using STM32F4 or STM32F7
|
||||
*****************************************************************************************************************************/
|
||||
|
||||
#include "defines.h"
|
||||
|
||||
@@ -16,21 +16,6 @@
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Version: 1.2.0
|
||||
|
||||
Version Modified By Date Comments
|
||||
------- ----------- ---------- -----------
|
||||
1.0.0 K Hoang 14/09/2020 Initial coding to add support to STM32 using built-in Ethernet (Nucleo-144, DISCOVERY, etc).
|
||||
1.0.1 K Hoang 09/10/2020 Restore cpp code besides Impl.h code.
|
||||
1.0.2 K Hoang 09/11/2020 Make Mutex Lock and delete more reliable and error-proof
|
||||
1.1.0 K Hoang 23/12/2020 Add HTTP PUT, PATCH, DELETE and HEAD methods
|
||||
1.1.1 K Hoang 24/12/2020 Prevent crash if request and/or method not correct.
|
||||
1.1.2 K Hoang 11/02/2021 Rename _lock and _unlock to avoid conflict with AsyncWebServer library
|
||||
1.1.3 K Hoang 25/02/2021 Fix non-persistent Connection header bug
|
||||
1.1.4 K Hoang 21/03/2021 Fix `library.properties` dependency
|
||||
1.1.5 K Hoang 22/03/2021 Fix dependency on STM32AsyncTCP Library
|
||||
1.2.0 K Hoang 11/04/2021 Add support to LAN8720 using STM32F4 or STM32F7
|
||||
*****************************************************************************************************************************/
|
||||
|
||||
#include "defines.h"
|
||||
|
||||
-15
@@ -16,21 +16,6 @@
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Version: 1.2.0
|
||||
|
||||
Version Modified By Date Comments
|
||||
------- ----------- ---------- -----------
|
||||
1.0.0 K Hoang 14/09/2020 Initial coding to add support to STM32 using built-in Ethernet (Nucleo-144, DISCOVERY, etc).
|
||||
1.0.1 K Hoang 09/10/2020 Restore cpp code besides Impl.h code.
|
||||
1.0.2 K Hoang 09/11/2020 Make Mutex Lock and delete more reliable and error-proof
|
||||
1.1.0 K Hoang 23/12/2020 Add HTTP PUT, PATCH, DELETE and HEAD methods
|
||||
1.1.1 K Hoang 24/12/2020 Prevent crash if request and/or method not correct.
|
||||
1.1.2 K Hoang 11/02/2021 Rename _lock and _unlock to avoid conflict with AsyncWebServer library
|
||||
1.1.3 K Hoang 25/02/2021 Fix non-persistent Connection header bug
|
||||
1.1.4 K Hoang 21/03/2021 Fix `library.properties` dependency
|
||||
1.1.5 K Hoang 22/03/2021 Fix dependency on STM32AsyncTCP Library
|
||||
1.2.0 K Hoang 11/04/2021 Add support to LAN8720 using STM32F4 or STM32F7
|
||||
*****************************************************************************************************************************/
|
||||
|
||||
#include "defines.h"
|
||||
|
||||
@@ -16,21 +16,6 @@
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Version: 1.2.0
|
||||
|
||||
Version Modified By Date Comments
|
||||
------- ----------- ---------- -----------
|
||||
1.0.0 K Hoang 14/09/2020 Initial coding to add support to STM32 using built-in Ethernet (Nucleo-144, DISCOVERY, etc).
|
||||
1.0.1 K Hoang 09/10/2020 Restore cpp code besides Impl.h code.
|
||||
1.0.2 K Hoang 09/11/2020 Make Mutex Lock and delete more reliable and error-proof
|
||||
1.1.0 K Hoang 23/12/2020 Add HTTP PUT, PATCH, DELETE and HEAD methods
|
||||
1.1.1 K Hoang 24/12/2020 Prevent crash if request and/or method not correct.
|
||||
1.1.2 K Hoang 11/02/2021 Rename _lock and _unlock to avoid conflict with AsyncWebServer library
|
||||
1.1.3 K Hoang 25/02/2021 Fix non-persistent Connection header bug
|
||||
1.1.4 K Hoang 21/03/2021 Fix `library.properties` dependency
|
||||
1.1.5 K Hoang 22/03/2021 Fix dependency on STM32AsyncTCP Library
|
||||
1.2.0 K Hoang 11/04/2021 Add support to LAN8720 using STM32F4 or STM32F7
|
||||
*****************************************************************************************************************************/
|
||||
|
||||
/**
|
||||
|
||||
@@ -16,21 +16,6 @@
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Version: 1.2.0
|
||||
|
||||
Version Modified By Date Comments
|
||||
------- ----------- ---------- -----------
|
||||
1.0.0 K Hoang 14/09/2020 Initial coding to add support to STM32 using built-in Ethernet (Nucleo-144, DISCOVERY, etc).
|
||||
1.0.1 K Hoang 09/10/2020 Restore cpp code besides Impl.h code.
|
||||
1.0.2 K Hoang 09/11/2020 Make Mutex Lock and delete more reliable and error-proof
|
||||
1.1.0 K Hoang 23/12/2020 Add HTTP PUT, PATCH, DELETE and HEAD methods
|
||||
1.1.1 K Hoang 24/12/2020 Prevent crash if request and/or method not correct.
|
||||
1.1.2 K Hoang 11/02/2021 Rename _lock and _unlock to avoid conflict with AsyncWebServer library
|
||||
1.1.3 K Hoang 25/02/2021 Fix non-persistent Connection header bug
|
||||
1.1.4 K Hoang 21/03/2021 Fix `library.properties` dependency
|
||||
1.1.5 K Hoang 22/03/2021 Fix dependency on STM32AsyncTCP Library
|
||||
1.2.0 K Hoang 11/04/2021 Add support to LAN8720 using STM32F4 or STM32F7
|
||||
*****************************************************************************************************************************/
|
||||
|
||||
// Dweet.io POST client. Connects to dweet.io once every ten seconds, sends a POST request and a request body.
|
||||
|
||||
-15
@@ -16,21 +16,6 @@
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Version: 1.2.0
|
||||
|
||||
Version Modified By Date Comments
|
||||
------- ----------- ---------- -----------
|
||||
1.0.0 K Hoang 14/09/2020 Initial coding to add support to STM32 using built-in Ethernet (Nucleo-144, DISCOVERY, etc).
|
||||
1.0.1 K Hoang 09/10/2020 Restore cpp code besides Impl.h code.
|
||||
1.0.2 K Hoang 09/11/2020 Make Mutex Lock and delete more reliable and error-proof
|
||||
1.1.0 K Hoang 23/12/2020 Add HTTP PUT, PATCH, DELETE and HEAD methods
|
||||
1.1.1 K Hoang 24/12/2020 Prevent crash if request and/or method not correct.
|
||||
1.1.2 K Hoang 11/02/2021 Rename _lock and _unlock to avoid conflict with AsyncWebServer library
|
||||
1.1.3 K Hoang 25/02/2021 Fix non-persistent Connection header bug
|
||||
1.1.4 K Hoang 21/03/2021 Fix `library.properties` dependency
|
||||
1.1.5 K Hoang 22/03/2021 Fix dependency on STM32AsyncTCP Library
|
||||
1.2.0 K Hoang 11/04/2021 Add support to LAN8720 using STM32F4 or STM32F7
|
||||
*****************************************************************************************************************************/
|
||||
//************************************************************************************************************
|
||||
//
|
||||
|
||||
@@ -16,21 +16,6 @@
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Version: 1.2.0
|
||||
|
||||
Version Modified By Date Comments
|
||||
------- ----------- ---------- -----------
|
||||
1.0.0 K Hoang 14/09/2020 Initial coding to add support to STM32 using built-in Ethernet (Nucleo-144, DISCOVERY, etc).
|
||||
1.0.1 K Hoang 09/10/2020 Restore cpp code besides Impl.h code.
|
||||
1.0.2 K Hoang 09/11/2020 Make Mutex Lock and delete more reliable and error-proof
|
||||
1.1.0 K Hoang 23/12/2020 Add HTTP PUT, PATCH, DELETE and HEAD methods
|
||||
1.1.1 K Hoang 24/12/2020 Prevent crash if request and/or method not correct.
|
||||
1.1.2 K Hoang 11/02/2021 Rename _lock and _unlock to avoid conflict with AsyncWebServer library
|
||||
1.1.3 K Hoang 25/02/2021 Fix non-persistent Connection header bug
|
||||
1.1.4 K Hoang 21/03/2021 Fix `library.properties` dependency
|
||||
1.1.5 K Hoang 22/03/2021 Fix dependency on STM32AsyncTCP Library
|
||||
1.2.0 K Hoang 11/04/2021 Add support to LAN8720 using STM32F4 or STM32F7
|
||||
*****************************************************************************************************************************/
|
||||
|
||||
#include "defines.h"
|
||||
|
||||
-15
@@ -16,21 +16,6 @@
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Version: 1.2.0
|
||||
|
||||
Version Modified By Date Comments
|
||||
------- ----------- ---------- -----------
|
||||
1.0.0 K Hoang 14/09/2020 Initial coding to add support to STM32 using built-in Ethernet (Nucleo-144, DISCOVERY, etc).
|
||||
1.0.1 K Hoang 09/10/2020 Restore cpp code besides Impl.h code.
|
||||
1.0.2 K Hoang 09/11/2020 Make Mutex Lock and delete more reliable and error-proof
|
||||
1.1.0 K Hoang 23/12/2020 Add HTTP PUT, PATCH, DELETE and HEAD methods
|
||||
1.1.1 K Hoang 24/12/2020 Prevent crash if request and/or method not correct.
|
||||
1.1.2 K Hoang 11/02/2021 Rename _lock and _unlock to avoid conflict with AsyncWebServer library
|
||||
1.1.3 K Hoang 25/02/2021 Fix non-persistent Connection header bug
|
||||
1.1.4 K Hoang 21/03/2021 Fix `library.properties` dependency
|
||||
1.1.5 K Hoang 22/03/2021 Fix dependency on STM32AsyncTCP Library
|
||||
1.2.0 K Hoang 11/04/2021 Add support to LAN8720 using STM32F4 or STM32F7
|
||||
*****************************************************************************************************************************/
|
||||
|
||||
#include "defines.h"
|
||||
|
||||
+264
@@ -0,0 +1,264 @@
|
||||
/****************************************************************************************************************************
|
||||
AsyncHTTPMultiRequests_WT32_ETH01.ino - Dead simple AsyncHTTPRequest for ESP8266, ESP32 and currently STM32 with built-in LAN8742A Ethernet
|
||||
|
||||
For ESP8266, ESP32 and STM32 with built-in LAN8742A Ethernet (Nucleo-144, DISCOVERY, etc)
|
||||
|
||||
AsyncHTTPRequest_Generic is a library for the ESP8266, ESP32 and currently STM32 run built-in Ethernet WebServer
|
||||
|
||||
Based on and modified from asyncHTTPrequest Library (https://github.com/boblemaire/asyncHTTPrequest)
|
||||
|
||||
Built by Khoi Hoang https://github.com/khoih-prog/AsyncHTTPRequest_Generic
|
||||
Licensed under MIT license
|
||||
|
||||
Copyright (C) <2018> <Bob Lemaire, IoTaWatt, Inc.>
|
||||
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License
|
||||
as published bythe Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*****************************************************************************************************************************/
|
||||
//************************************************************************************************************
|
||||
//
|
||||
// There are scores of ways to use AsyncHTTPRequest. The important thing to keep in mind is that
|
||||
// it is asynchronous and just like in JavaScript, everything is event driven. You will have some
|
||||
// reason to initiate an asynchronous HTTP request in your program, but then sending the request
|
||||
// headers and payload, gathering the response headers and any payload, and processing
|
||||
// of that response, can (and probably should) all be done asynchronously.
|
||||
//
|
||||
// In this example, a Ticker function is setup to fire every 300 seconds to initiate a request.
|
||||
// Everything is handled in AsyncHTTPRequest without blocking.
|
||||
// The callback onReadyStateChange is made progressively and like most JS scripts, we look for
|
||||
// readyState == 4 (complete) here. At that time the response is retrieved and printed.
|
||||
//
|
||||
// Note that there is no code in loop(). A code entered into loop would run oblivious to
|
||||
// the ongoing HTTP requests. The Ticker could be removed and periodic calls to sendRequest()
|
||||
// could be made in loop(), resulting in the same asynchronous handling.
|
||||
//
|
||||
// For demo purposes, debug is turned on for handling of the first request. These are the
|
||||
// events that are being handled in AsyncHTTPRequest. They all begin with Debug(nnn) where
|
||||
// nnn is the elapsed time in milliseconds since the transaction was started.
|
||||
//
|
||||
//*************************************************************************************************************
|
||||
|
||||
#if !( defined(ESP32) )
|
||||
#error This code is intended to run on the ESP32 platform! Please check your Tools->Board setting.
|
||||
#endif
|
||||
|
||||
// Level from 0-4
|
||||
#define ASYNC_HTTP_DEBUG_PORT Serial
|
||||
#define _ASYNC_HTTP_LOGLEVEL_ 1
|
||||
|
||||
// 300s = 5 minutes to not flooding
|
||||
#define HTTP_REQUEST_INTERVAL 60 //300
|
||||
|
||||
// 10s
|
||||
#define HEARTBEAT_INTERVAL 10
|
||||
|
||||
#include <WebServer_WT32_ETH01.h> // https://github.com/khoih-prog/WebServer_WT32_ETH01
|
||||
|
||||
#include <AsyncHTTPRequest_Generic.h> // https://github.com/khoih-prog/AsyncHTTPRequest_Generic
|
||||
#include <Ticker.h>
|
||||
|
||||
AsyncHTTPRequest request;
|
||||
Ticker ticker;
|
||||
Ticker ticker1;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
|
||||
// Select the IP address according to your local network
|
||||
IPAddress myIP(192, 168, 2, 232);
|
||||
IPAddress myGW(192, 168, 2, 1);
|
||||
IPAddress mySN(255, 255, 255, 0);
|
||||
|
||||
// Google DNS Server IP
|
||||
IPAddress myDNS(8, 8, 8, 8);
|
||||
|
||||
bool eth_connected = false;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
|
||||
void heartBeatPrint(void)
|
||||
{
|
||||
static int num = 1;
|
||||
|
||||
if (eth_connected)
|
||||
Serial.print(F("H")); // H means connected to WiFi
|
||||
else
|
||||
Serial.print(F("F")); // F means not connected to WiFi
|
||||
|
||||
if (num == 80)
|
||||
{
|
||||
Serial.println();
|
||||
num = 1;
|
||||
}
|
||||
else if (num++ % 10 == 0)
|
||||
{
|
||||
Serial.print(F(" "));
|
||||
}
|
||||
}
|
||||
|
||||
// To replace with your real APP_API
|
||||
#define APP_API "SECRECT_APP_API"
|
||||
|
||||
String requestPart1 = "http://api.openweathermap.org/data/2.5/onecall?lat=-24.32&lon=-46.9983";
|
||||
String requestAPPID = "&appid=" + String(APP_API);
|
||||
|
||||
// exclude fields: current,minutely,hourly,daily,alerts
|
||||
String requestCurrent = requestPart1 + "&exclude=minutely,hourly,daily,alerts" + requestAPPID;
|
||||
String requestMinutely = requestPart1 + "&exclude=current,hourly,daily,alerts" + requestAPPID;
|
||||
String requestHourly = requestPart1 + "&exclude=current,minutely,daily,alerts" + requestAPPID;
|
||||
String requestDaily = requestPart1 + "&exclude=current,minutely,hourly,alerts" + requestAPPID;
|
||||
String requestAlert = requestPart1 + "&exclude=current,minutely,hourly,daily" + requestAPPID;
|
||||
|
||||
#define NUM_REQUESTS 5
|
||||
|
||||
const char* requestName[ NUM_REQUESTS ] = { "Current", "Minutely", "Hourly", "Daily", "Alert" };
|
||||
|
||||
const char* requestAll[ NUM_REQUESTS ] = { requestCurrent.c_str(), requestMinutely.c_str(), requestHourly.c_str(), requestDaily.c_str(), requestAlert.c_str() };
|
||||
|
||||
uint8_t requestIndex = 0;
|
||||
|
||||
void sendRequest()
|
||||
{
|
||||
static bool requestOpenResult;
|
||||
|
||||
if (request.readyState() == readyStateUnsent || request.readyState() == readyStateDone)
|
||||
{
|
||||
requestOpenResult = request.open("GET", requestAll[requestIndex] );
|
||||
|
||||
if (requestOpenResult)
|
||||
{
|
||||
// Only send() if open() returns true, or crash
|
||||
request.send();
|
||||
}
|
||||
else
|
||||
{
|
||||
Serial.println("Can't send bad request");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Serial.println("Can't send request");
|
||||
}
|
||||
}
|
||||
|
||||
void requestCB(void* optParm, AsyncHTTPRequest* request, int readyState)
|
||||
{
|
||||
(void) optParm;
|
||||
|
||||
if (readyState == readyStateDone)
|
||||
{
|
||||
Serial.print("\n***************"); Serial.print(requestName[ requestIndex ]); Serial.println("***************");
|
||||
Serial.println(request->responseText());
|
||||
Serial.println("**************************************");
|
||||
|
||||
#if 1
|
||||
// Bypass hourly
|
||||
if (requestIndex == 1)
|
||||
requestIndex = 3;
|
||||
else
|
||||
requestIndex = (requestIndex + 1) % NUM_REQUESTS;
|
||||
#else
|
||||
// hourly too long, not display anyway. Not enough heap.
|
||||
requestIndex = (requestIndex + 1) % NUM_REQUESTS;
|
||||
#endif
|
||||
|
||||
request->setDebug(false);
|
||||
}
|
||||
}
|
||||
|
||||
void WiFiEvent(WiFiEvent_t event)
|
||||
{
|
||||
switch (event)
|
||||
{
|
||||
case SYSTEM_EVENT_ETH_START:
|
||||
Serial.println("\nETH Started");
|
||||
//set eth hostname here
|
||||
ETH.setHostname("WT32-ETH01");
|
||||
break;
|
||||
case SYSTEM_EVENT_ETH_CONNECTED:
|
||||
Serial.println("ETH Connected");
|
||||
break;
|
||||
|
||||
case SYSTEM_EVENT_ETH_GOT_IP:
|
||||
if (!eth_connected)
|
||||
{
|
||||
Serial.print("ETH MAC: ");
|
||||
Serial.print(ETH.macAddress());
|
||||
Serial.print(", IPv4: ");
|
||||
Serial.print(ETH.localIP());
|
||||
|
||||
if (ETH.fullDuplex())
|
||||
{
|
||||
Serial.print(", FULL_DUPLEX");
|
||||
}
|
||||
|
||||
Serial.print(", ");
|
||||
Serial.print(ETH.linkSpeed());
|
||||
Serial.println("Mbps");
|
||||
eth_connected = true;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case SYSTEM_EVENT_ETH_DISCONNECTED:
|
||||
Serial.println("ETH Disconnected");
|
||||
eth_connected = false;
|
||||
break;
|
||||
|
||||
case SYSTEM_EVENT_ETH_STOP:
|
||||
Serial.println("\nETH Stopped");
|
||||
eth_connected = false;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void setup()
|
||||
{
|
||||
// put your setup code here, to run once:
|
||||
Serial.begin(115200);
|
||||
while (!Serial);
|
||||
|
||||
delay(200);
|
||||
|
||||
Serial.print("\nStarting AsyncHTTPRequest_WT32_ETH01 on " + String(ARDUINO_BOARD));
|
||||
Serial.println(" with " + String(SHIELD_TYPE));
|
||||
Serial.println(WEBSERVER_WT32_ETH01_VERSION);
|
||||
Serial.println(ASYNC_HTTP_REQUEST_GENERIC_VERSION);
|
||||
|
||||
Serial.setDebugOutput(true);
|
||||
|
||||
//bool begin(uint8_t phy_addr=ETH_PHY_ADDR, int power=ETH_PHY_POWER, int mdc=ETH_PHY_MDC, int mdio=ETH_PHY_MDIO,
|
||||
// eth_phy_type_t type=ETH_PHY_TYPE, eth_clock_mode_t clk_mode=ETH_CLK_MODE);
|
||||
//ETH.begin(ETH_PHY_ADDR, ETH_PHY_POWER, ETH_PHY_MDC, ETH_PHY_MDIO, ETH_PHY_TYPE, ETH_CLK_MODE);
|
||||
ETH.begin(ETH_PHY_ADDR, ETH_PHY_POWER);
|
||||
|
||||
// Static IP, leave without this line to get IP via DHCP
|
||||
//bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = 0, IPAddress dns2 = 0);
|
||||
ETH.config(myIP, myGW, mySN, myDNS);
|
||||
|
||||
WiFi.onEvent(WiFiEvent);
|
||||
|
||||
while (!eth_connected)
|
||||
delay(100);
|
||||
|
||||
Serial.print(F("AsyncHTTPRequest @ IP : "));
|
||||
Serial.println(ETH.localIP());
|
||||
|
||||
request.setDebug(false);
|
||||
|
||||
request.onReadyStateChange(requestCB);
|
||||
ticker.attach(HTTP_REQUEST_INTERVAL, sendRequest);
|
||||
|
||||
ticker1.attach(HEARTBEAT_INTERVAL, heartBeatPrint);
|
||||
|
||||
// Send first request now
|
||||
sendRequest();
|
||||
}
|
||||
|
||||
void loop()
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,231 @@
|
||||
/****************************************************************************************************************************
|
||||
AsyncHTTPRequest_WT32_ETH01.ino - Dead simple AsyncHTTPRequest for ESP8266, ESP32 and currently STM32 with built-in LAN8742A Ethernet
|
||||
|
||||
For ESP8266, ESP32 and STM32 with built-in LAN8742A Ethernet (Nucleo-144, DISCOVERY, etc)
|
||||
|
||||
AsyncHTTPRequest_Generic is a library for the ESP8266, ESP32 and currently STM32 run built-in Ethernet WebServer
|
||||
|
||||
Based on and modified from asyncHTTPrequest Library (https://github.com/boblemaire/asyncHTTPrequest)
|
||||
|
||||
Built by Khoi Hoang https://github.com/khoih-prog/AsyncHTTPRequest_Generic
|
||||
Licensed under MIT license
|
||||
|
||||
Copyright (C) <2018> <Bob Lemaire, IoTaWatt, Inc.>
|
||||
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License
|
||||
as published bythe Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*****************************************************************************************************************************/
|
||||
//************************************************************************************************************
|
||||
//
|
||||
// There are scores of ways to use AsyncHTTPRequest. The important thing to keep in mind is that
|
||||
// it is asynchronous and just like in JavaScript, everything is event driven. You will have some
|
||||
// reason to initiate an asynchronous HTTP request in your program, but then sending the request
|
||||
// headers and payload, gathering the response headers and any payload, and processing
|
||||
// of that response, can (and probably should) all be done asynchronously.
|
||||
//
|
||||
// In this example, a Ticker function is setup to fire every 300 seconds to initiate a request.
|
||||
// Everything is handled in AsyncHTTPRequest without blocking.
|
||||
// The callback onReadyStateChange is made progressively and like most JS scripts, we look for
|
||||
// readyState == 4 (complete) here. At that time the response is retrieved and printed.
|
||||
//
|
||||
// Note that there is no code in loop(). A code entered into loop would run oblivious to
|
||||
// the ongoing HTTP requests. The Ticker could be removed and periodic calls to sendRequest()
|
||||
// could be made in loop(), resulting in the same asynchronous handling.
|
||||
//
|
||||
// For demo purposes, debug is turned on for handling of the first request. These are the
|
||||
// events that are being handled in AsyncHTTPRequest. They all begin with Debug(nnn) where
|
||||
// nnn is the elapsed time in milliseconds since the transaction was started.
|
||||
//
|
||||
//*************************************************************************************************************
|
||||
|
||||
#if !( defined(ESP32) )
|
||||
#error This code is intended to run on the ESP32 platform! Please check your Tools->Board setting.
|
||||
#endif
|
||||
|
||||
// Level from 0-4
|
||||
#define ASYNC_HTTP_DEBUG_PORT Serial
|
||||
#define _ASYNC_HTTP_LOGLEVEL_ 1
|
||||
|
||||
// 300s = 5 minutes to not flooding
|
||||
#define HTTP_REQUEST_INTERVAL 60 //300
|
||||
|
||||
// 10s
|
||||
#define HEARTBEAT_INTERVAL 10
|
||||
|
||||
#include <WebServer_WT32_ETH01.h> // https://github.com/khoih-prog/WebServer_WT32_ETH01
|
||||
|
||||
#include <AsyncHTTPRequest_Generic.h> // https://github.com/khoih-prog/AsyncHTTPRequest_Generic
|
||||
#include <Ticker.h>
|
||||
|
||||
AsyncHTTPRequest request;
|
||||
Ticker ticker;
|
||||
Ticker ticker1;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
|
||||
// Select the IP address according to your local network
|
||||
IPAddress myIP(192, 168, 2, 232);
|
||||
IPAddress myGW(192, 168, 2, 1);
|
||||
IPAddress mySN(255, 255, 255, 0);
|
||||
|
||||
// Google DNS Server IP
|
||||
IPAddress myDNS(8, 8, 8, 8);
|
||||
|
||||
bool eth_connected = false;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
|
||||
void heartBeatPrint(void)
|
||||
{
|
||||
static int num = 1;
|
||||
|
||||
if (eth_connected)
|
||||
Serial.print(F("H")); // H means connected
|
||||
else
|
||||
Serial.print(F("F")); // F means not connected
|
||||
|
||||
if (num == 80)
|
||||
{
|
||||
Serial.println();
|
||||
num = 1;
|
||||
}
|
||||
else if (num++ % 10 == 0)
|
||||
{
|
||||
Serial.print(F(" "));
|
||||
}
|
||||
}
|
||||
|
||||
void sendRequest()
|
||||
{
|
||||
static bool requestOpenResult;
|
||||
|
||||
if (request.readyState() == readyStateUnsent || request.readyState() == readyStateDone)
|
||||
{
|
||||
//requestOpenResult = request.open("GET", "http://worldtimeapi.org/api/timezone/Europe/London.txt");
|
||||
requestOpenResult = request.open("GET", "http://worldtimeapi.org/api/timezone/America/Toronto.txt");
|
||||
|
||||
if (requestOpenResult)
|
||||
{
|
||||
// Only send() if open() returns true, or crash
|
||||
request.send();
|
||||
}
|
||||
else
|
||||
{
|
||||
Serial.println("Can't send bad request");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Serial.println("Can't send request");
|
||||
}
|
||||
}
|
||||
|
||||
void requestCB(void* optParm, AsyncHTTPRequest* request, int readyState)
|
||||
{
|
||||
(void) optParm;
|
||||
|
||||
if (readyState == readyStateDone)
|
||||
{
|
||||
Serial.println("\n**************************************");
|
||||
Serial.println(request->responseText());
|
||||
Serial.println("**************************************");
|
||||
|
||||
request->setDebug(false);
|
||||
}
|
||||
}
|
||||
|
||||
void WiFiEvent(WiFiEvent_t event)
|
||||
{
|
||||
switch (event)
|
||||
{
|
||||
case SYSTEM_EVENT_ETH_START:
|
||||
Serial.println("\nETH Started");
|
||||
//set eth hostname here
|
||||
ETH.setHostname("WT32-ETH01");
|
||||
break;
|
||||
case SYSTEM_EVENT_ETH_CONNECTED:
|
||||
Serial.println("ETH Connected");
|
||||
break;
|
||||
|
||||
case SYSTEM_EVENT_ETH_GOT_IP:
|
||||
if (!eth_connected)
|
||||
{
|
||||
Serial.print("ETH MAC: ");
|
||||
Serial.print(ETH.macAddress());
|
||||
Serial.print(", IPv4: ");
|
||||
Serial.print(ETH.localIP());
|
||||
|
||||
if (ETH.fullDuplex())
|
||||
{
|
||||
Serial.print(", FULL_DUPLEX");
|
||||
}
|
||||
|
||||
Serial.print(", ");
|
||||
Serial.print(ETH.linkSpeed());
|
||||
Serial.println("Mbps");
|
||||
eth_connected = true;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case SYSTEM_EVENT_ETH_DISCONNECTED:
|
||||
Serial.println("ETH Disconnected");
|
||||
eth_connected = false;
|
||||
break;
|
||||
|
||||
case SYSTEM_EVENT_ETH_STOP:
|
||||
Serial.println("\nETH Stopped");
|
||||
eth_connected = false;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void setup()
|
||||
{
|
||||
// put your setup code here, to run once:
|
||||
Serial.begin(115200);
|
||||
while (!Serial);
|
||||
|
||||
Serial.print("\nStarting AsyncHTTPRequest_WT32_ETH01 on " + String(ARDUINO_BOARD));
|
||||
Serial.println(" with " + String(SHIELD_TYPE));
|
||||
Serial.println(WEBSERVER_WT32_ETH01_VERSION);
|
||||
Serial.println(ASYNC_HTTP_REQUEST_GENERIC_VERSION);
|
||||
|
||||
Serial.setDebugOutput(true);
|
||||
|
||||
//bool begin(uint8_t phy_addr=ETH_PHY_ADDR, int power=ETH_PHY_POWER, int mdc=ETH_PHY_MDC, int mdio=ETH_PHY_MDIO,
|
||||
// eth_phy_type_t type=ETH_PHY_TYPE, eth_clock_mode_t clk_mode=ETH_CLK_MODE);
|
||||
//ETH.begin(ETH_PHY_ADDR, ETH_PHY_POWER, ETH_PHY_MDC, ETH_PHY_MDIO, ETH_PHY_TYPE, ETH_CLK_MODE);
|
||||
ETH.begin(ETH_PHY_ADDR, ETH_PHY_POWER);
|
||||
|
||||
// Static IP, leave without this line to get IP via DHCP
|
||||
//bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = 0, IPAddress dns2 = 0);
|
||||
ETH.config(myIP, myGW, mySN, myDNS);
|
||||
|
||||
WiFi.onEvent(WiFiEvent);
|
||||
|
||||
while (!eth_connected)
|
||||
delay(100);
|
||||
|
||||
Serial.print(F("\nHTTP WebClient is @ IP : "));
|
||||
Serial.println(ETH.localIP());
|
||||
|
||||
request.setDebug(false);
|
||||
|
||||
request.onReadyStateChange(requestCB);
|
||||
ticker.attach(HTTP_REQUEST_INTERVAL, sendRequest);
|
||||
|
||||
ticker1.attach(HEARTBEAT_INTERVAL, heartBeatPrint);
|
||||
|
||||
// Send first request now
|
||||
sendRequest();
|
||||
}
|
||||
|
||||
void loop()
|
||||
{
|
||||
}
|
||||
+11
-5
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"name":"AsyncHTTPRequest_Generic",
|
||||
"version": "1.2.0",
|
||||
"description":"Simple Async HTTP Request library, supporting GET, POST, PUT, PATCH, DELETE and HEAD, on top of AsyncTCP libraries, such as AsyncTCP, ESPAsyncTCP, AsyncTCP_STM32, etc.. for ESP32 (including ESP32-S2), ESP8266 and currently STM32 with LAN8720 or built-in LAN8742A Ethernet.",
|
||||
"keywords":"communication, async, tcp, http, ESP8266, ESP32, ESP32-S2, ESPAsyncTCP, AsyncTCP, stm32, ethernet, wifi, lan8742a, lan8720, f407ve, nucleo, nucleo-144, stm32f7, stm32f4",
|
||||
"version": "1.3.1",
|
||||
"description":"Simple Async HTTP Request library, supporting GET, POST, PUT, PATCH, DELETE and HEAD, on top of AsyncTCP libraries, such as AsyncTCP, ESPAsyncTCP, AsyncTCP_STM32, etc.. for ESP32 (including ESP32-S2), WT32_ETH01 (ESP32 + LAN8720), ESP8266 and currently STM32 with LAN8720 or built-in LAN8742A Ethernet.",
|
||||
"keywords":"communication, async, tcp, http, ESP8266, ESP32, ESP32-S2, wt32-eth01, ESPAsyncTCP, AsyncTCP, stm32, ethernet, wifi, lan8742a, lan8720, f407ve, nucleo, nucleo-144, stm32f7, stm32f4",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Bob Lemaire",
|
||||
@@ -37,9 +37,9 @@
|
||||
"platforms": "espressif8266"
|
||||
},
|
||||
{
|
||||
"owner": "khoih.prog",
|
||||
"owner": "khoih-prog",
|
||||
"name": "ESPAsync_WiFiManager",
|
||||
"version": ">=1.6.2",
|
||||
"version": ">=1.9.4",
|
||||
"platforms": ["espressif8266", "espressif32"]
|
||||
},
|
||||
{
|
||||
@@ -60,6 +60,12 @@
|
||||
"version": ">=1.0.6",
|
||||
"platforms": ["espressif32"]
|
||||
},
|
||||
{
|
||||
"owner": "khoih-prog",
|
||||
"name": "WebServer_WT32_ETH01",
|
||||
"version": ">=1.2.1",
|
||||
"platforms": ["espressif32"]
|
||||
},
|
||||
{
|
||||
"name": "STM32AsyncTCP",
|
||||
"version": "https://github.com/khoih-prog/STM32AsyncTCP"
|
||||
|
||||
+3
-3
@@ -1,12 +1,12 @@
|
||||
name=AsyncHTTPRequest_Generic
|
||||
version=1.2.0
|
||||
version=1.3.1
|
||||
author=Bob Lemaire,Khoi Hoang <khoih.prog@gmail.com>
|
||||
maintainer=Khoi Hoang <khoih.prog@gmail.com>
|
||||
license=MIT
|
||||
sentence=Simple Async HTTP Request library, supporting GET, POST, PUT, PATCH, DELETE and HEAD, on top of AsyncTCP libraries, such as AsyncTCP, ESPAsyncTCP, AsyncTCP_STM32, etc.. for ESP32 (including ESP32-S2), ESP8266 and currently STM32 with LAN8720 or built-in LAN8742A Ethernet.
|
||||
sentence=Simple Async HTTP Request library, supporting GET, POST, PUT, PATCH, DELETE and HEAD, on top of AsyncTCP libraries, such as AsyncTCP, ESPAsyncTCP, AsyncTCP_STM32, etc.. for ESP32 (including ESP32-S2), WT32_ETH01 (ESP32 + LAN8720), ESP8266 and currently STM32 with LAN8720 or built-in LAN8742A Ethernet.
|
||||
paragraph=This AsyncHTTPRequest_Generic Library, supporting GET, POST, PUT, PATCH, DELETE and HEAD, for ESP32 (including ESP32-S2), ESP8266 and STM32 with LAN8720 or built-in LAN8742A Ethernet, such as Nucleo-144 F767ZI, F407VE, etc.
|
||||
category=Communication,AsyncTCP,AsyncHTTP
|
||||
url=https://github.com/khoih-prog/AsyncHTTPRequest_Generic
|
||||
architectures=*
|
||||
depends=AsyncTCP,ESPAsyncTCP,ESPAsync_WiFiManager,STM32duino LwIP,STM32duino STM32Ethernet
|
||||
depends=AsyncTCP,ESPAsyncTCP,ESPAsync_WiFiManager,STM32duino LwIP,STM32duino STM32Ethernet,WebServer_WT32_ETH01
|
||||
includes=AsyncHTTPRequest_Generic.h
|
||||
|
||||
@@ -33,6 +33,9 @@ upload_speed = 921600
|
||||
;monitor_speed = 9600
|
||||
;monitor_port = COM11
|
||||
|
||||
; Checks for the compatibility with frameworks and dev/platforms
|
||||
lib_compat_mode = strict
|
||||
|
||||
lib_deps =
|
||||
; PlatformIO 4.x
|
||||
; AsyncTCP@>=1.1.1
|
||||
@@ -40,8 +43,9 @@ lib_deps =
|
||||
; https://github.com/khoih-prog/STM32AsyncTCP.git
|
||||
; STM32duino LwIP@>=2.1.2
|
||||
; STM32duino STM32Ethernet@>=1.2.0
|
||||
; ESPAsync_WiFiManager@>=1.6.2
|
||||
; ESPAsync_WiFiManager@>=1.9.3
|
||||
; LittleFS_esp32@>=1.0.6
|
||||
; WebServer_WT32_ETH01@>=1.2.1
|
||||
; PlatformIO 5.x
|
||||
me-no-dev/AsyncTCP@>=1.1.1
|
||||
me-no-dev/ESPAsyncTCP@>=1.2.2
|
||||
@@ -49,8 +53,9 @@ lib_deps =
|
||||
https://github.com/khoih-prog/STM32AsyncTCP.git
|
||||
stm32duino/STM32duino LwIP@>=2.1.2
|
||||
stm32duino/STM32duino STM32Ethernet@>=1.2.0
|
||||
khoih-prog/ESPAsync_WiFiManager@>=1.6.2
|
||||
khoih-prog/ESPAsync_WiFiManager@>=1.9.3
|
||||
lorol/LittleFS_esp32@>=1.0.6
|
||||
khoih-prog/WebServer_WT32_ETH01@>=1.2.1
|
||||
|
||||
build_flags =
|
||||
; set your debug output (default=Serial)
|
||||
@@ -105,7 +110,7 @@ board = nodemcuv2
|
||||
|
||||
[env:ESP32]
|
||||
platform = espressif32
|
||||
framework = arduino, espidf
|
||||
framework = arduino
|
||||
; ============================================================
|
||||
; Board configuration
|
||||
; choose your board by uncommenting one of the following lines
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Version: 1.2.0
|
||||
Version: 1.3.1
|
||||
|
||||
Version Modified By Date Comments
|
||||
------- ----------- ---------- -----------
|
||||
@@ -31,6 +31,8 @@
|
||||
1.1.4 K Hoang 21/03/2021 Fix `library.properties` dependency
|
||||
1.1.5 K Hoang 22/03/2021 Fix dependency on STM32AsyncTCP Library
|
||||
1.2.0 K Hoang 11/04/2021 Add support to LAN8720 using STM32F4 or STM32F7
|
||||
1.3.0 K Hoang 09/07/2021 Add support to WT32_ETH01 (ESP32 + LAN8720) boards
|
||||
1.3.1 K Hoang 09/10/2021 Update `platform.ini` and `library.json`
|
||||
*****************************************************************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Version: 1.2.0
|
||||
Version: 1.3.1
|
||||
|
||||
Version Modified By Date Comments
|
||||
------- ----------- ---------- -----------
|
||||
@@ -31,6 +31,8 @@
|
||||
1.1.4 K Hoang 21/03/2021 Fix `library.properties` dependency
|
||||
1.1.5 K Hoang 22/03/2021 Fix dependency on STM32AsyncTCP Library
|
||||
1.2.0 K Hoang 11/04/2021 Add support to LAN8720 using STM32F4 or STM32F7
|
||||
1.3.0 K Hoang 09/07/2021 Add support to WT32_ETH01 (ESP32 + LAN8720) boards
|
||||
1.3.1 K Hoang 09/10/2021 Update `platform.ini` and `library.json`
|
||||
*****************************************************************************************************************************/
|
||||
|
||||
#pragma once
|
||||
@@ -38,7 +40,7 @@
|
||||
#ifndef ASYNC_HTTP_REQUEST_GENERIC_H
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_H
|
||||
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION "AsyncHTTPRequest_Generic v1.2.0"
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION "AsyncHTTPRequest_Generic v1.3.1"
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Version: 1.2.0
|
||||
Version: 1.3.1
|
||||
|
||||
Version Modified By Date Comments
|
||||
------- ----------- ---------- -----------
|
||||
@@ -31,6 +31,8 @@
|
||||
1.1.4 K Hoang 21/03/2021 Fix `library.properties` dependency
|
||||
1.1.5 K Hoang 22/03/2021 Fix dependency on STM32AsyncTCP Library
|
||||
1.2.0 K Hoang 11/04/2021 Add support to LAN8720 using STM32F4 or STM32F7
|
||||
1.3.0 K Hoang 09/07/2021 Add support to WT32_ETH01 (ESP32 + LAN8720) boards
|
||||
1.3.1 K Hoang 09/10/2021 Update `platform.ini` and `library.json`
|
||||
*****************************************************************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
+3
-1
@@ -17,7 +17,7 @@
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Version: 1.2.0
|
||||
Version: 1.3.1
|
||||
|
||||
Version Modified By Date Comments
|
||||
------- ----------- ---------- -----------
|
||||
@@ -31,6 +31,8 @@
|
||||
1.1.4 K Hoang 21/03/2021 Fix `library.properties` dependency
|
||||
1.1.5 K Hoang 22/03/2021 Fix dependency on STM32AsyncTCP Library
|
||||
1.2.0 K Hoang 11/04/2021 Add support to LAN8720 using STM32F4 or STM32F7
|
||||
1.3.0 K Hoang 09/07/2021 Add support to WT32_ETH01 (ESP32 + LAN8720) boards
|
||||
1.3.1 K Hoang 09/10/2021 Update `platform.ini` and `library.json`
|
||||
*****************************************************************************************************************************/
|
||||
|
||||
/********************************************************************************************
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Version: 1.2.0
|
||||
Version: 1.3.1
|
||||
|
||||
Version Modified By Date Comments
|
||||
------- ----------- ---------- -----------
|
||||
@@ -31,6 +31,8 @@
|
||||
1.1.4 K Hoang 21/03/2021 Fix `library.properties` dependency
|
||||
1.1.5 K Hoang 22/03/2021 Fix dependency on STM32AsyncTCP Library
|
||||
1.2.0 K Hoang 11/04/2021 Add support to LAN8720 using STM32F4 or STM32F7
|
||||
1.3.0 K Hoang 09/07/2021 Add support to WT32_ETH01 (ESP32 + LAN8720) boards
|
||||
1.3.1 K Hoang 09/10/2021 Update `platform.ini` and `library.json`
|
||||
*****************************************************************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user