-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is RUI3 SDK inside 3.2.0-p2_22q1_final.87 release.
- Loading branch information
1 parent
ac85ac9
commit 5437762
Showing
12,983 changed files
with
4,969,626 additions
and
2 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
# 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 | ||
|
||
# ---------------------------------- | ||
# WisDuo RAK3172 Evaluation Board | ||
# ---------------------------------- | ||
WisDuoRAK3172EvaluationBoard.name=WisDuo RAK3172 Evaluation Board | ||
WisDuoRAK3172EvaluationBoard.bootloader.tool=bootburn | ||
WisDuoRAK3172EvaluationBoard.build.variant_h=variant_{build.board}.h | ||
WisDuoRAK3172EvaluationBoard.build.series=rak3172 | ||
|
||
# Upload | ||
WisDuoRAK3172EvaluationBoard.upload.tool=uploader_3372 | ||
WisDuoRAK3172EvaluationBoard.upload.protocol=uploader_3372 | ||
WisDuoRAK3172EvaluationBoard.upload.use_1200bps_touch=true | ||
WisDuoRAK3172EvaluationBoard.upload.wait_for_upload_port=true | ||
WisDuoRAK3172EvaluationBoard.upload.maximum_size=815104 | ||
WisDuoRAK3172EvaluationBoard.upload.maximum_data_size=237568 | ||
|
||
# Build | ||
WisDuoRAK3172EvaluationBoard.build.mcu=cortex-m4 | ||
WisDuoRAK3172EvaluationBoard.build.f_cpu=64000000 | ||
WisDuoRAK3172EvaluationBoard.build.board=WisDuo_RAK3172_Evaluation_Board | ||
WisDuoRAK3172EvaluationBoard.build.core=STM32WLE | ||
WisDuoRAK3172EvaluationBoard.build.variant=WisDuo_RAK3172_Evaluation_Board | ||
WisDuoRAK3172EvaluationBoard.build.usb_manufacturer="RAKwireless" | ||
WisDuoRAK3172EvaluationBoard.build.usb_product="WisDuo RAK3172 Evaluation Board" | ||
WisDuoRAK3172EvaluationBoard.build.extra_flags=-DSTM32WL55xx {build.flags.usb} | ||
WisDuoRAK3172EvaluationBoard.build.ldscript=flash_stm32wle5xx.ld | ||
WisDuoRAK3172EvaluationBoard.build.vid=0x1A86 | ||
WisDuoRAK3172EvaluationBoard.build.pid=0x7523 | ||
|
||
# Debug Menu | ||
WisDuoRAK3172EvaluationBoard.menu.debug.l0=Level 0 (Release) | ||
WisDuoRAK3172EvaluationBoard.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 | ||
WisDuoRAK3172EvaluationBoard.menu.debug.l1=Level 1 (Error Message) | ||
WisDuoRAK3172EvaluationBoard.debug.l1.build.debug_flags=-DCFG_DEBUG=1 | ||
WisDuoRAK3172EvaluationBoard.menu.debug.l2=Level 2 (Full Debug) | ||
WisDuoRAK3172EvaluationBoard.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 | ||
WisDuoRAK3172EvaluationBoard.menu.debug.l3=Level 3 (Segger SystemView) | ||
WisDuoRAK3172EvaluationBoard.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 | ||
WisDuoRAK3172EvaluationBoard.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 | ||
|
||
# ---------------------------------- | ||
# WisDuo RAK3172-SiP Board | ||
# ---------------------------------- | ||
WisDuoRAK3172SiPBoard.name=WisDuo RAK3272-SiP Board | ||
WisDuoRAK3172SiPBoard.bootloader.tool=bootburn | ||
WisDuoRAK3172SiPBoard.build.variant_h=variant_{build.board}.h | ||
WisDuoRAK3172SiPBoard.build.series=rak3172-sip | ||
|
||
# Upload | ||
WisDuoRAK3172SiPBoard.upload.tool=uploader_3372 | ||
WisDuoRAK3172SiPBoard.upload.protocol=uploader_3372 | ||
WisDuoRAK3172SiPBoard.upload.use_1200bps_touch=true | ||
WisDuoRAK3172SiPBoard.upload.wait_for_upload_port=true | ||
WisDuoRAK3172SiPBoard.upload.maximum_size=815104 | ||
WisDuoRAK3172SiPBoard.upload.maximum_data_size=237568 | ||
|
||
# Build | ||
WisDuoRAK3172SiPBoard.build.mcu=cortex-m4 | ||
WisDuoRAK3172SiPBoard.build.f_cpu=64000000 | ||
WisDuoRAK3172SiPBoard.build.board=WisDuo_RAK3272-SiP_Board | ||
WisDuoRAK3172SiPBoard.build.core=STM32WLE | ||
WisDuoRAK3172SiPBoard.build.variant=WisDuo_RAK3272-SiP_Board | ||
WisDuoRAK3172SiPBoard.build.usb_manufacturer="RAKwireless" | ||
WisDuoRAK3172SiPBoard.build.usb_product="WisDuo RAK3272-SiP Board" | ||
WisDuoRAK3172SiPBoard.build.extra_flags=-DSTM32WL55xx {build.flags.usb} | ||
WisDuoRAK3172SiPBoard.build.ldscript=flash_stm32wle5xx.ld | ||
WisDuoRAK3172SiPBoard.build.vid=0x1A86 | ||
WisDuoRAK3172SiPBoard.build.pid=0x7523 | ||
|
||
# Debug Menu | ||
WisDuoRAK3172SiPBoard.menu.debug.l0=Level 0 (Release) | ||
WisDuoRAK3172SiPBoard.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 | ||
WisDuoRAK3172SiPBoard.menu.debug.l1=Level 1 (Error Message) | ||
WisDuoRAK3172SiPBoard.debug.l1.build.debug_flags=-DCFG_DEBUG=1 | ||
WisDuoRAK3172SiPBoard.menu.debug.l2=Level 2 (Full Debug) | ||
WisDuoRAK3172SiPBoard.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 | ||
WisDuoRAK3172SiPBoard.menu.debug.l3=Level 3 (Segger SystemView) | ||
WisDuoRAK3172SiPBoard.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 | ||
WisDuoRAK3172SiPBoard.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
extern void setup(); | ||
extern void loop(); | ||
|
||
extern "C" void rui_setup() { | ||
setup(); | ||
} | ||
|
||
extern "C" void rui_loop() { | ||
loop(); | ||
} | ||
|
187 changes: 187 additions & 0 deletions
187
cores/STM32WLE/component/core/mcu/stm32wle5xx/flash_stm32wle5xx.ld
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,187 @@ | ||
/* | ||
** LinkerScript | ||
** Note: For specific memory allocation, linker and startup files must be customized. | ||
** Refer to STM32CubeIDE user guide (UM2609), chapter "Modify the linker script". | ||
*/ | ||
|
||
/* Entry Point */ | ||
ENTRY(Reset_Handler) | ||
|
||
/* Highest address of the user mode stack */ | ||
_estack = ORIGIN(RAM1) + LENGTH(RAM1); /* end of "SRAM1" Ram type memory */ | ||
|
||
_Min_Heap_Size = 0x200; /* required amount of heap */ | ||
_Min_Stack_Size = 0x2000; /* required amount of stack */ | ||
|
||
/* Memories definition */ | ||
MEMORY | ||
{ | ||
BL (rx) : ORIGIN = 0x08000000, LENGTH = 24K /* Bootloader */ | ||
ROM (rx) : ORIGIN = 0x08006000, LENGTH = 232K /* Application */ | ||
/*Originally RAM1 and RAM2 are the same size: 32K, but it is not enough size for stack*/ | ||
RAM1 (xrw) : ORIGIN = 0x20000000, LENGTH = 56K /* Non-backup SRAM1 */ | ||
RAM2 (xrw) : ORIGIN = 0x2000E000, LENGTH = 8K /* Backup SRAM2 */ | ||
} | ||
|
||
/* Sections */ | ||
SECTIONS | ||
{ | ||
/* The startup code into "ROM" Rom type memory */ | ||
.isr_vector : | ||
{ | ||
. = ALIGN(8); | ||
KEEP(*(.isr_vector)) /* Startup code */ | ||
. = ALIGN(8); | ||
} >ROM | ||
|
||
/* The program code and other data into "ROM" Rom type memory */ | ||
.text : | ||
{ | ||
. = ALIGN(8); | ||
*(.text) /* .text sections (code) */ | ||
*(.text*) /* .text* sections (code) */ | ||
*(.glue_7) /* glue arm to thumb code */ | ||
*(.glue_7t) /* glue thumb to arm code */ | ||
*(.eh_frame) | ||
|
||
KEEP (*(.init)) | ||
KEEP (*(.fini)) | ||
|
||
. = ALIGN(8); | ||
_etext = .; /* define a global symbols at end of code */ | ||
} >ROM | ||
|
||
/* Constant data into "ROM" Rom type memory */ | ||
.rodata : | ||
{ | ||
. = ALIGN(8); | ||
*(.rodata) /* .rodata sections (constants, strings, etc.) */ | ||
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */ | ||
. = ALIGN(8); | ||
} >ROM | ||
|
||
.ARM.extab : { | ||
. = ALIGN(8); | ||
*(.ARM.extab* .gnu.linkonce.armextab.*) | ||
. = ALIGN(8); | ||
} >ROM | ||
|
||
.ARM : { | ||
. = ALIGN(8); | ||
__exidx_start = .; | ||
*(.ARM.exidx*) | ||
__exidx_end = .; | ||
. = ALIGN(8); | ||
} >ROM | ||
|
||
.preinit_array : | ||
{ | ||
. = ALIGN(8); | ||
PROVIDE_HIDDEN (__preinit_array_start = .); | ||
KEEP (*(.preinit_array*)) | ||
PROVIDE_HIDDEN (__preinit_array_end = .); | ||
. = ALIGN(8); | ||
} >ROM | ||
|
||
.init_array : | ||
{ | ||
. = ALIGN(8); | ||
PROVIDE_HIDDEN (__init_array_start = .); | ||
KEEP (*(SORT(.init_array.*))) | ||
KEEP (*(.init_array*)) | ||
PROVIDE_HIDDEN (__init_array_end = .); | ||
. = ALIGN(8); | ||
} >ROM | ||
|
||
.fini_array : | ||
{ | ||
. = ALIGN(8); | ||
PROVIDE_HIDDEN (__fini_array_start = .); | ||
KEEP (*(SORT(.fini_array.*))) | ||
KEEP (*(.fini_array*)) | ||
PROVIDE_HIDDEN (__fini_array_end = .); | ||
. = ALIGN(8); | ||
} >ROM | ||
|
||
/* Used by the startup to initialize data */ | ||
_sidata = LOADADDR(.data); | ||
|
||
.atcmd_queue : | ||
{ | ||
PROVIDE(__start_atcmd_queue = .); | ||
KEEP(*(.atcmd_queue)) | ||
PROVIDE(__stop_atcmd_queue = .); | ||
} > ROM | ||
|
||
/* Initialized data sections into "SRAM1" Ram type memory */ | ||
.data : | ||
{ | ||
. = ALIGN(8); | ||
_sdata = .; /* create a global symbol at data start */ | ||
*(.data) /* .data sections */ | ||
*(.data*) /* .data* sections */ | ||
|
||
. = ALIGN(8); | ||
_edata = .; /* define a global symbol at data end */ | ||
|
||
} >RAM1 AT> ROM | ||
|
||
/* Uninitialized data section into "SRAM1" Ram type memory */ | ||
. = ALIGN(8); | ||
.bss : | ||
{ | ||
/* This is used by the startup in order to initialize the .bss section */ | ||
_sbss = .; /* define a global symbol at bss start */ | ||
__bss_start__ = _sbss; | ||
*(.bss) | ||
*(.bss*) | ||
*(COMMON) | ||
|
||
. = ALIGN(8); | ||
_ebss = .; /* define a global symbol at bss end */ | ||
__bss_end__ = _ebss; | ||
} >RAM1 | ||
|
||
/* Data section into "SRAM1" Ram type memory: Non-backup SRAM1 dedicated to CM4 */ | ||
. = ALIGN(8); | ||
RAM1_region : | ||
{ | ||
_sRAM1_region = .; /* define a global symbol at section start */ | ||
*(.RAM1_region) | ||
|
||
. = ALIGN(8); | ||
_eRAM1_region = .; /* define a global symbol at section end */ | ||
} >RAM1 | ||
|
||
/* Data section into "SRAM2" Ram type memory: Backup SRAM2 dedicated to CM4 */ | ||
. = ALIGN(8); | ||
RAM2_region : | ||
{ | ||
_sRAM2_region = .; /* define a global symbol at section start */ | ||
*(.RAM2_region) | ||
|
||
. = ALIGN(8); | ||
_eRAM2_region = .; /* define a global symbol at section end */ | ||
} >RAM2 | ||
|
||
/* User_heap_stack section, used to check that there is enough "SRAM1" Ram type memory left */ | ||
._user_heap_stack : | ||
{ | ||
. = ALIGN(8); | ||
PROVIDE ( end = . ); | ||
PROVIDE ( _end = . ); | ||
. = . + _Min_Heap_Size; | ||
. = . + _Min_Stack_Size; | ||
. = ALIGN(8); | ||
} >RAM1 | ||
|
||
/* Remove information from the compiler libraries */ | ||
/DISCARD/ : | ||
{ | ||
libc.a ( * ) | ||
libm.a ( * ) | ||
libgcc.a ( * ) | ||
} | ||
|
||
.ARM.attributes 0 : { *(.ARM.attributes) } | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#ifndef __MCU_BASIC_H__ | ||
#define __MCU_BASIC_H__ | ||
|
||
#define MCU_SYS_CONFIG_NVM_ADDR 0x0803F000 | ||
#define MCU_USER_DATA_NVM_ADDR 0x08037800 | ||
#define MCU_FACTORY_DEFAULT_NVM_ADDR 0x08037000 | ||
|
||
#endif |
Binary file not shown.
27 changes: 27 additions & 0 deletions
27
cores/STM32WLE/component/core/mcu/stm32wle5xx/uhal/uhal_adc.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#ifndef _UHAL_ADC_H_ | ||
#define _UHAL_ADC_H_ | ||
|
||
#include <stdint.h> | ||
#include <stddef.h> | ||
#include "udrv_adc.h" | ||
#include "udrv_errno.h" | ||
#include "stm32wlxx_hal.h" | ||
|
||
#define VDDA_APPLI ((uint16_t)1024) | ||
|
||
#define DIGITAL_SCALE_6BITS ((uint16_t) 0x003F) | ||
#define DIGITAL_SCALE_8BITS ((uint16_t) 0x00FF) | ||
#define DIGITAL_SCALE_10BITS ((uint16_t) 0x03FF) | ||
#define DIGITAL_SCALE_12BITS ((uint16_t) 0x0FFF) | ||
|
||
#define VAR_CONVERTED_DATA_INIT_VALUE (DIGITAL_SCALE_12BITS + 1) | ||
|
||
int32_t uhal_adc_read (uint32_t pin, uint16_t *value); | ||
void uhal_adc_suspend (void); | ||
void uhal_adc_resume (void); | ||
void uhal_adc_set_resolution (UDRV_ADC_RESOLUTION resolution); | ||
UDRV_ADC_RESOLUTION uhal_adc_get_resolution (void); | ||
void uhal_adc_set_mode (UDRV_ADC_MODE mode); | ||
UDRV_ADC_MODE uhal_adc_get_mode (void); | ||
|
||
#endif // #ifndef _UHAL_ADC_H_ |
12 changes: 12 additions & 0 deletions
12
cores/STM32WLE/component/core/mcu/stm32wle5xx/uhal/uhal_delay.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#ifndef _UHAL_DELAY_H_ | ||
#define _UHAL_DELAY_H_ | ||
|
||
#include <stdint.h> | ||
#include <stddef.h> | ||
#include "stm32wlxx_hal.h" | ||
|
||
void uhal_delay_ms (uint32_t ms_time); | ||
|
||
void uhal_delay_us (uint32_t us_time); | ||
|
||
#endif // #ifndef _UHAL_DELAY_H_ |
10 changes: 10 additions & 0 deletions
10
cores/STM32WLE/component/core/mcu/stm32wle5xx/uhal/uhal_dfu.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#ifndef _UHAL_DFU_H_ | ||
#define _UHAL_DFU_H_ | ||
|
||
#include <stdint.h> | ||
#include <stddef.h> | ||
#include "stm32wle5xx.h" | ||
|
||
void uhal_enter_dfu (void); | ||
|
||
#endif // #ifndef _UHAL_DFU_H_ |
28 changes: 28 additions & 0 deletions
28
cores/STM32WLE/component/core/mcu/stm32wle5xx/uhal/uhal_flash.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#ifndef _UHAL_FLASH_H_ | ||
#define _UHAL_FLASH_H_ | ||
|
||
#include <stdint.h> | ||
#include <stddef.h> | ||
#include "udrv_flash.h" | ||
#include "udrv_errno.h" | ||
#include "stm32wlxx_hal.h" | ||
|
||
void uhal_flash_init (void); | ||
|
||
void uhal_flash_deinit (void); | ||
|
||
int32_t uhal_flash_write (uint32_t addr, uint8_t *buff, uint32_t len); | ||
|
||
int32_t uhal_flash_read (uint32_t addr, uint8_t *buff, uint32_t len); | ||
|
||
int32_t uhal_flash_erase (uint32_t addr, uint32_t len); | ||
|
||
uint32_t uhal_flash_get_page_size(void); | ||
|
||
bool uhal_flash_check_addr_valid(uint32_t addr, uint32_t len); | ||
|
||
void uhal_flash_suspend(void); | ||
|
||
void uhal_flash_resume(void); | ||
|
||
#endif // #ifndef _UHAL_FLASH_H_ |
Oops, something went wrong.