mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-21 17:20:01 +00:00
Merge pull request #6071 from dchokola/master
enable LittleFS and encryption on STM32 platform (wio-e5)
This commit is contained in:
commit
dbbcb1d513
@ -8,11 +8,8 @@ extra_scripts =
|
||||
|
||||
build_type = release
|
||||
|
||||
;board_build.flash_offset = 0x08000000
|
||||
|
||||
build_flags =
|
||||
build_flags =
|
||||
${arduino_base.build_flags}
|
||||
-Wl,--undefined=vTaskSwitchContext
|
||||
-flto
|
||||
-Isrc/platform/stm32wl -g
|
||||
-DMESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR
|
||||
@ -22,25 +19,22 @@ build_flags =
|
||||
-DMESHTASTIC_EXCLUDE_SCREEN
|
||||
-DMESHTASTIC_EXCLUDE_MQTT
|
||||
-DMESHTASTIC_EXCLUDE_BLUETOOTH
|
||||
-DMESHTASTIC_EXCLUDE_PKI
|
||||
-DMESHTASTIC_EXCLUDE_GPS
|
||||
; -DVECT_TAB_OFFSET=0x08000000
|
||||
-DconfigUSE_CMSIS_RTOS_V2=1
|
||||
; -DSPI_MODE_0=SPI_MODE0
|
||||
-DDEBUG_MUTE
|
||||
-fmerge-all-constants
|
||||
-ffunction-sections
|
||||
-fdata-sections
|
||||
|
||||
build_src_filter =
|
||||
|
||||
build_src_filter =
|
||||
${arduino_base.build_src_filter} -<platform/esp32/> -<nimble/> -<mesh/api/> -<mesh/wifi/> -<mesh/http/> -<modules/esp32> -<mesh/eth/> -<input> -<buzz> -<modules/RemoteHardwareModule.cpp> -<platform/nrf52> -<platform/portduino> -<platform/rp2xx0> -<mesh/raspihttp>
|
||||
|
||||
board_upload.offset_address = 0x08000000
|
||||
upload_protocol = stlink
|
||||
debug_tool = stlink
|
||||
|
||||
lib_deps =
|
||||
${env.lib_deps}
|
||||
${radiolib_base.lib_deps}
|
||||
stm32duino/STM32duino FreeRTOS@^10.3.2
|
||||
https://github.com/caveman99/Crypto.git#eae9c768054118a9399690f8af202853d1ae8516
|
||||
|
||||
lib_ignore =
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include <freertos/task.h>
|
||||
#endif
|
||||
|
||||
#if defined(ARDUINO_NRF52_ADAFRUIT) || defined(ARDUINO_ARCH_RP2040) || defined(STM32WLE5xx)
|
||||
#if defined(ARDUINO_NRF52_ADAFRUIT) || defined(ARDUINO_ARCH_RP2040)
|
||||
#define HAS_FREE_RTOS
|
||||
|
||||
#include <FreeRTOS.h>
|
||||
|
@ -7,7 +7,9 @@
|
||||
#include "input/SerialKeyboardImpl.h"
|
||||
#include "input/TrackballInterruptImpl1.h"
|
||||
#include "input/UpDownInterruptImpl1.h"
|
||||
#if !MESHTASTIC_EXCLUDE_I2C
|
||||
#include "input/cardKbI2cImpl.h"
|
||||
#endif
|
||||
#include "input/kbMatrixImpl.h"
|
||||
#endif
|
||||
#if !MESHTASTIC_EXCLUDE_ADMIN
|
||||
|
@ -23,41 +23,49 @@
|
||||
*/
|
||||
|
||||
#include "LittleFS.h"
|
||||
#include "stm32wlxx_hal_flash.h"
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* Macro definitions
|
||||
**********************************************************************************************************************/
|
||||
/** This macro is used to suppress compiler messages about a parameter not being used in a function. */
|
||||
#define PARAMETER_NOT_USED(p) (void)((p))
|
||||
#define LFS_UNUSED(p) (void)((p))
|
||||
|
||||
#define STM32WL_SECTOR_SIZE 0x800 /* 2K */
|
||||
#define STM32WL_SECTOR_COUNT 14
|
||||
#define STM32WL_PAGE_SIZE (FLASH_PAGE_SIZE)
|
||||
#define STM32WL_PAGE_COUNT (FLASH_PAGE_NB)
|
||||
#define STM32WL_FLASH_BASE (FLASH_BASE)
|
||||
|
||||
#define LFS_FLASH_TOTAL_SIZE (STM32WL_SECTOR_COUNT * STM32WL_SECTOR_SIZE)
|
||||
#define LFS_BLOCK_SIZE 128
|
||||
/*
|
||||
* FLASH_SIZE from stm32wle5xx.h will read the actual FLASH size from the chip.
|
||||
* FLASH_END_ADDR is calculated from FLASH_SIZE.
|
||||
* Use the last 28 KiB of the FLASH
|
||||
*/
|
||||
#define LFS_FLASH_TOTAL_SIZE (14 * 2048) /* needs to be a multiple of LFS_BLOCK_SIZE */
|
||||
#define LFS_BLOCK_SIZE (2048)
|
||||
#define LFS_FLASH_ADDR_END (FLASH_END_ADDR)
|
||||
#define LFS_FLASH_ADDR_BASE (LFS_FLASH_ADDR_END - LFS_FLASH_TOTAL_SIZE + 1)
|
||||
|
||||
#define LFS_FLASH_ADDR (262144 - LFS_FLASH_TOTAL_SIZE)
|
||||
#if !CFG_DEBUG
|
||||
#define _LFS_DBG(fmt, ...)
|
||||
#else
|
||||
#define _LFS_DBG(fmt, ...) printf("%s:%d (%s): " fmt "\n", __FILE__, __LINE__, __func__, __VA_ARGS__)
|
||||
#endif
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// LFS Disk IO
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
static inline uint32_t lba2addr(uint32_t block)
|
||||
{
|
||||
return ((uint32_t)LFS_FLASH_ADDR) + block * LFS_BLOCK_SIZE;
|
||||
}
|
||||
|
||||
static int _internal_flash_read(const struct lfs_config *c, lfs_block_t block, lfs_off_t off, void *buffer, lfs_size_t size)
|
||||
{
|
||||
PARAMETER_NOT_USED(c);
|
||||
LFS_UNUSED(c);
|
||||
|
||||
if (!buffer || !size) {
|
||||
printf("%s Invalid parameter!\r\n", __func__);
|
||||
_LFS_DBG("%s Invalid parameter!\r\n", __func__);
|
||||
return LFS_ERR_INVAL;
|
||||
}
|
||||
|
||||
lfs_block_t address = LFS_FLASH_ADDR + (block * STM32WL_SECTOR_SIZE + off);
|
||||
// printf("+%s(Addr 0x%06lX, Len 0x%04lX)\r\n",__func__,address,size);
|
||||
// hexdump((void *)address,size);
|
||||
lfs_block_t address = LFS_FLASH_ADDR_BASE + (block * STM32WL_PAGE_SIZE + off);
|
||||
|
||||
memcpy(buffer, (void *)address, size);
|
||||
|
||||
return LFS_ERR_OK;
|
||||
@ -68,38 +76,39 @@ static int _internal_flash_read(const struct lfs_config *c, lfs_block_t block, l
|
||||
// May return LFS_ERR_CORRUPT if the block should be considered bad.
|
||||
static int _internal_flash_prog(const struct lfs_config *c, lfs_block_t block, lfs_off_t off, const void *buffer, lfs_size_t size)
|
||||
{
|
||||
// (void) c;
|
||||
|
||||
// uint32_t addr = lba2addr(block) + off;
|
||||
// VERIFY( flash_nrf5x_write(addr, buffer, size), -1)
|
||||
|
||||
// return 0;
|
||||
PARAMETER_NOT_USED(c);
|
||||
lfs_block_t address = LFS_FLASH_ADDR + (block * STM32WL_SECTOR_SIZE + off);
|
||||
lfs_block_t address = LFS_FLASH_ADDR_BASE + (block * STM32WL_PAGE_SIZE + off);
|
||||
HAL_StatusTypeDef hal_rc = HAL_OK;
|
||||
uint32_t block_count = size / 8;
|
||||
uint32_t dw_count = size / 8;
|
||||
uint64_t *bufp = (uint64_t *) buffer;
|
||||
|
||||
// printf("+%s(Addr 0x%06lX, Len 0x%04lX)\r\n",__func__,address,size);
|
||||
// hexdump((void *)address,size);
|
||||
/* Program the user Flash area word by word
|
||||
(area defined by FLASH_USER_START_ADDR and FLASH_USER_END_ADDR) ***********/
|
||||
LFS_UNUSED(c);
|
||||
|
||||
uint64_t data_source;
|
||||
|
||||
for (uint32_t i = 0; i < block_count; i++) {
|
||||
memcpy(&data_source, buffer, 8); // load the 64-bit source from the buffer
|
||||
hal_rc = HAL_FLASH_Program(FLASH_TYPEPROGRAM_DOUBLEWORD, address, data_source);
|
||||
if (hal_rc == HAL_OK) {
|
||||
address += 8;
|
||||
buffer = (uint8_t *)buffer + 8;
|
||||
} else {
|
||||
_LFS_DBG("Programming %d bytes/%d doublewords at address 0x%08x/block %d, offset %d.", size, dw_count, address, block, off);
|
||||
if (HAL_FLASH_Unlock() != HAL_OK)
|
||||
{
|
||||
return LFS_ERR_IO;
|
||||
}
|
||||
for (uint32_t i = 0; i < dw_count; i++) {
|
||||
if((address < LFS_FLASH_ADDR_BASE) || (address > LFS_FLASH_ADDR_END))
|
||||
{
|
||||
_LFS_DBG("Wanted to program out of bound of FLASH: 0x%08x.\n", address);
|
||||
HAL_FLASH_Lock();
|
||||
return LFS_ERR_INVAL;
|
||||
}
|
||||
hal_rc = HAL_FLASH_Program(FLASH_TYPEPROGRAM_DOUBLEWORD, address, *bufp);
|
||||
if (hal_rc != HAL_OK) {
|
||||
/* Error occurred while writing data in Flash memory.
|
||||
User can add here some code to deal with this error */
|
||||
printf("Program Error, 0x%X\n", hal_rc);
|
||||
|
||||
} // else
|
||||
} // for
|
||||
// printf("-%s\n",__func__);
|
||||
* User can add here some code to deal with this error.
|
||||
*/
|
||||
_LFS_DBG("Program error at (0x%08x), 0x%X, error: 0x%08x\n", address, hal_rc, HAL_FLASH_GetError());
|
||||
}
|
||||
address += 8;
|
||||
bufp += 1;
|
||||
}
|
||||
if(HAL_FLASH_Lock() != HAL_OK)
|
||||
{
|
||||
return LFS_ERR_IO;
|
||||
}
|
||||
|
||||
return hal_rc == HAL_OK ? LFS_ERR_OK : LFS_ERR_IO; // If HAL_OK, return LFS_ERR_OK, else return LFS_ERR_IO
|
||||
}
|
||||
@ -110,38 +119,28 @@ static int _internal_flash_prog(const struct lfs_config *c, lfs_block_t block, l
|
||||
// May return LFS_ERR_CORRUPT if the block should be considered bad.
|
||||
static int _internal_flash_erase(const struct lfs_config *c, lfs_block_t block)
|
||||
{
|
||||
// (void) c;
|
||||
|
||||
// uint32_t addr = lba2addr(block);
|
||||
|
||||
// // implement as write 0xff to whole block address
|
||||
// for(int i=0; i <LFS_BLOCK_SIZE; i++)
|
||||
// {
|
||||
// flash_nrf5x_write8(addr + i, 0xFF);
|
||||
// }
|
||||
|
||||
// // flash_nrf5x_flush();
|
||||
|
||||
// return 0;
|
||||
PARAMETER_NOT_USED(c);
|
||||
lfs_block_t address = LFS_FLASH_ADDR + (block * STM32WL_SECTOR_SIZE);
|
||||
// printf("+%s(Addr 0x%06lX)\r\n",__func__,address);
|
||||
|
||||
lfs_block_t address = LFS_FLASH_ADDR_BASE + (block * STM32WL_PAGE_SIZE);
|
||||
HAL_StatusTypeDef hal_rc;
|
||||
FLASH_EraseInitTypeDef EraseInitStruct;
|
||||
FLASH_EraseInitTypeDef EraseInitStruct = {
|
||||
.TypeErase = FLASH_TYPEERASE_PAGES,
|
||||
.Page = 0,
|
||||
.NbPages = 1
|
||||
};
|
||||
uint32_t PAGEError = 0;
|
||||
|
||||
/* Fill EraseInit structure*/
|
||||
EraseInitStruct.TypeErase = FLASH_TYPEERASE_PAGES;
|
||||
EraseInitStruct.Page = (address - FLASH_BASE) / STM32WL_SECTOR_SIZE;
|
||||
EraseInitStruct.NbPages = 1;
|
||||
hal_rc = HAL_FLASHEx_Erase(&EraseInitStruct, &PAGEError);
|
||||
// if (hal_rc != HAL_OK)
|
||||
// {
|
||||
// printf("%s ERROR 0x%X\n",__func__,hal_rc);
|
||||
// }
|
||||
// else
|
||||
// printf("%s SUCCESS\n",__func__);
|
||||
LFS_UNUSED(c);
|
||||
|
||||
if((address < LFS_FLASH_ADDR_BASE) || (address > LFS_FLASH_ADDR_END))
|
||||
{
|
||||
_LFS_DBG("Wanted to erase out of bound of FLASH: 0x%08x.\n", address);
|
||||
return LFS_ERR_INVAL;
|
||||
}
|
||||
/* calculate the absolute page, i.e. what the ST wants */
|
||||
EraseInitStruct.Page = (address - STM32WL_FLASH_BASE) / STM32WL_PAGE_SIZE;
|
||||
_LFS_DBG("Erasing block %d at 0x%08x... ", block, address);
|
||||
HAL_FLASH_Unlock();
|
||||
hal_rc = HAL_FLASHEx_Erase(&EraseInitStruct, &PAGEError);
|
||||
HAL_FLASH_Lock();
|
||||
|
||||
return hal_rc == HAL_OK ? LFS_ERR_OK : LFS_ERR_IO; // If HAL_OK, return LFS_ERR_OK, else return LFS_ERR_IO
|
||||
}
|
||||
@ -150,33 +149,31 @@ static int _internal_flash_erase(const struct lfs_config *c, lfs_block_t block)
|
||||
// are propogated to the user.
|
||||
static int _internal_flash_sync(const struct lfs_config *c)
|
||||
{
|
||||
// (void) c;
|
||||
// flash_nrf5x_flush();
|
||||
// return 0;
|
||||
PARAMETER_NOT_USED(c);
|
||||
LFS_UNUSED(c);
|
||||
// write function performs no caching. No need for sync.
|
||||
// printf("+%s()\r\n",__func__);
|
||||
|
||||
return LFS_ERR_OK;
|
||||
// return LFS_ERR_IO;
|
||||
}
|
||||
|
||||
static struct lfs_config _InternalFSConfig = {.context = NULL,
|
||||
static struct lfs_config _InternalFSConfig = {
|
||||
.context = NULL,
|
||||
|
||||
.read = _internal_flash_read,
|
||||
.prog = _internal_flash_prog,
|
||||
.erase = _internal_flash_erase,
|
||||
.sync = _internal_flash_sync,
|
||||
.read = _internal_flash_read,
|
||||
.prog = _internal_flash_prog,
|
||||
.erase = _internal_flash_erase,
|
||||
.sync = _internal_flash_sync,
|
||||
|
||||
.read_size = LFS_BLOCK_SIZE,
|
||||
.prog_size = LFS_BLOCK_SIZE,
|
||||
.block_size = LFS_BLOCK_SIZE,
|
||||
.block_count = LFS_FLASH_TOTAL_SIZE / LFS_BLOCK_SIZE,
|
||||
.lookahead = 128,
|
||||
.read_size = LFS_BLOCK_SIZE,
|
||||
.prog_size = LFS_BLOCK_SIZE,
|
||||
.block_size = LFS_BLOCK_SIZE,
|
||||
.block_count = LFS_FLASH_TOTAL_SIZE / LFS_BLOCK_SIZE,
|
||||
.lookahead = 128,
|
||||
|
||||
.read_buffer = NULL,
|
||||
.prog_buffer = NULL,
|
||||
.lookahead_buffer = NULL,
|
||||
.file_buffer = NULL};
|
||||
.read_buffer = NULL,
|
||||
.prog_buffer = NULL,
|
||||
.lookahead_buffer = NULL,
|
||||
.file_buffer = NULL
|
||||
};
|
||||
|
||||
LittleFS InternalFS;
|
||||
|
||||
@ -188,11 +185,16 @@ LittleFS::LittleFS(void) : STM32_LittleFS(&_InternalFSConfig) {}
|
||||
|
||||
bool LittleFS::begin(void)
|
||||
{
|
||||
// failed to mount, erase all sector then format and mount again
|
||||
if(FLASH_BASE >= LFS_FLASH_ADDR_BASE)
|
||||
{
|
||||
/* There is not enough space on this device for a filesystem. */
|
||||
return false;
|
||||
}
|
||||
// failed to mount, erase all pages then format and mount again
|
||||
if (!STM32_LittleFS::begin()) {
|
||||
// Erase all sectors of internal flash region for Filesystem.
|
||||
for (uint32_t addr = LFS_FLASH_ADDR; addr < LFS_FLASH_ADDR + LFS_FLASH_TOTAL_SIZE; addr += STM32WL_SECTOR_SIZE) {
|
||||
_internal_flash_erase(&_InternalFSConfig, (addr - LFS_FLASH_ADDR) / STM32WL_SECTOR_SIZE);
|
||||
// Erase all pages of internal flash region for Filesystem.
|
||||
for (uint32_t addr = LFS_FLASH_ADDR_BASE; addr < (LFS_FLASH_ADDR_END + 1); addr += STM32WL_PAGE_SIZE) {
|
||||
_internal_flash_erase(&_InternalFSConfig, (addr - LFS_FLASH_ADDR_BASE) / STM32WL_PAGE_SIZE);
|
||||
}
|
||||
|
||||
// lfs format
|
||||
|
@ -42,7 +42,6 @@ STM32_LittleFS::STM32_LittleFS(struct lfs_config *cfg)
|
||||
varclr(&_lfs);
|
||||
_lfs_cfg = cfg;
|
||||
_mounted = false;
|
||||
_mutex = xSemaphoreCreateMutexStatic(&this->_MutexStorageSpace);
|
||||
}
|
||||
|
||||
STM32_LittleFS::~STM32_LittleFS() {}
|
||||
|
@ -76,17 +76,13 @@ class STM32_LittleFS
|
||||
* code. User should not call these directly
|
||||
*------------------------------------------------------------------*/
|
||||
lfs_t *_getFS(void) { return &_lfs; }
|
||||
void _lockFS(void) { xSemaphoreTake(_mutex, portMAX_DELAY); }
|
||||
void _unlockFS(void) { xSemaphoreGive(_mutex); }
|
||||
void _lockFS(void) { /* no-op */ }
|
||||
void _unlockFS(void) { /* no-op */ }
|
||||
|
||||
protected:
|
||||
bool _mounted;
|
||||
struct lfs_config *_lfs_cfg;
|
||||
lfs_t _lfs;
|
||||
SemaphoreHandle_t _mutex;
|
||||
|
||||
private:
|
||||
StaticSemaphore_t _MutexStorageSpace;
|
||||
};
|
||||
|
||||
#if !CFG_DEBUG
|
||||
@ -97,7 +93,7 @@ class STM32_LittleFS
|
||||
#define PRINT_LFS_ERR(_err) \
|
||||
do { \
|
||||
if (_err) { \
|
||||
VERIFY_MESS((long int)_err, dbg_strerr_lfs); \
|
||||
printf("%s:%d, LFS error: %d\n", __FILE__, __LINE__, _err); \
|
||||
} \
|
||||
} while (0) // LFS_ERR are of type int, VERIFY_MESS expects long_int
|
||||
|
||||
|
@ -174,8 +174,7 @@ void lfs_crc(uint32_t *crc, const void *buffer, size_t size);
|
||||
static inline void *lfs_malloc(size_t size)
|
||||
{
|
||||
#ifndef LFS_NO_MALLOC
|
||||
extern void *pvPortMalloc(size_t xWantedSize);
|
||||
return pvPortMalloc(size);
|
||||
return malloc(size);
|
||||
#else
|
||||
(void)size;
|
||||
return NULL;
|
||||
@ -186,8 +185,7 @@ static inline void *lfs_malloc(size_t size)
|
||||
static inline void lfs_free(void *p)
|
||||
{
|
||||
#ifndef LFS_NO_MALLOC
|
||||
extern void vPortFree(void *pv);
|
||||
vPortFree(p);
|
||||
free(p);
|
||||
#else
|
||||
(void)p;
|
||||
#endif
|
||||
|
@ -32,6 +32,8 @@ void powerCommandsCheck()
|
||||
delete screen;
|
||||
LOG_DEBUG("final reboot!");
|
||||
reboot();
|
||||
#elif defined(ARCH_STM32WL)
|
||||
HAL_NVIC_SystemReset();
|
||||
#else
|
||||
rebootAtMsec = -1;
|
||||
LOG_WARN("FIXME implement reboot for this platform. Note that some settings require a restart to be applied");
|
||||
|
@ -1,7 +1,7 @@
|
||||
[env:wio-e5]
|
||||
extends = stm32_base
|
||||
board = lora_e5_dev_board
|
||||
board_upload.maximum_size = 233472 ; reserve the last 28KB for filesystem
|
||||
board_upload.maximum_size = 233472 ; reserve the last 128KB for filesystem
|
||||
build_flags =
|
||||
${stm32_base.build_flags}
|
||||
-Ivariants/wio-e5
|
||||
@ -9,31 +9,19 @@ build_flags =
|
||||
-DPIN_SERIAL_RX=PB7
|
||||
-DPIN_SERIAL_TX=PB6
|
||||
-DHAL_DAC_MODULE_ONLY
|
||||
-DHAL_ADC_MODULE_DISABLED
|
||||
-DHAL_COMP_MODULE_DISABLED
|
||||
-DHAL_CRC_MODULE_DISABLED
|
||||
-DHAL_CRYP_MODULE_DISABLED
|
||||
-DHAL_GTZC_MODULE_DISABLED
|
||||
-DHAL_HSEM_MODULE_DISABLED
|
||||
-DHAL_I2C_MODULE_DISABLED
|
||||
-DHAL_I2S_MODULE_DISABLED
|
||||
-DHAL_IPCC_MODULE_DISABLED
|
||||
-DHAL_IRDA_MODULE_DISABLED
|
||||
-DHAL_IWDG_MODULE_DISABLED
|
||||
-DHAL_LPTIM_MODULE_DISABLED
|
||||
-DHAL_PKA_MODULE_DISABLED
|
||||
-DHAL_RNG_MODULE_DISABLED
|
||||
-DHAL_RTC_MODULE_DISABLED
|
||||
-DHAL_SMARTCARD_MODULE_DISABLED
|
||||
-DHAL_SMBUS_MODULE_DISABLED
|
||||
-DHAL_TIM_MODULE_DISABLED
|
||||
-DHAL_WWDG_MODULE_DISABLED
|
||||
-DHAL_EXTI_MODULE_DISABLED
|
||||
-DHAL_SAI_MODULE_DISABLED
|
||||
-DHAL_ICACHE_MODULE_DISABLED
|
||||
-DHAL_RNG_MODULE_ENABLED
|
||||
-DRADIOLIB_EXCLUDE_SX128X=1
|
||||
-DRADIOLIB_EXCLUDE_SX127X=1
|
||||
-DRADIOLIB_EXCLUDE_LR11X0=1
|
||||
; -D PIO_FRAMEWORK_ARDUINO_NANOLIB_FLOAT_PRINTF
|
||||
-DMESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR=1
|
||||
-DMESHTASTIC_EXCLUDE_I2C=1
|
||||
-DMESHTASTIC_EXCLUDE_WIFI=1
|
||||
-DMESHTASTIC_EXCLUDE_BLUETOOTH=1
|
||||
-DMESHTASTIC_EXCLUDE_GPS=1
|
||||
-DMESHTASTIC_EXCLUDE_SCREEN=1
|
||||
-DMESHTASTIC_EXCLUDE_MQTT=1
|
||||
-DMESHTASTIC_EXCLUDE_POWERMON=1
|
||||
;-DPIO_FRAMEWORK_ARDUINO_NANOLIB_FLOAT_PRINTF
|
||||
;-DCFG_DEBUG
|
||||
|
||||
upload_port = stlink
|
@ -18,4 +18,9 @@ Do not expect a working Meshtastic device with this target.
|
||||
#define LED_PIN PB5
|
||||
#define LED_STATE_ON 1
|
||||
|
||||
#if (defined(LED_BUILTIN) && LED_BUILTIN == PNUM_NOT_DEFINED)
|
||||
#undef LED_BUILTIN
|
||||
#define LED_BUILTIN (LED_PIN)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user