修改了Web后台的部分界面,增加了HAmqtt中的总电量传感器,后台新增mqtt上报频率设置

This commit is contained in:
OOP
2025-03-03 21:49:41 +08:00
parent e1e00b60ce
commit 9f9d4c7a56
4468 changed files with 1473046 additions and 10728 deletions

View File

@@ -0,0 +1,175 @@
/**
* UNPUBLISHED PROPRIETARY SOURCE CODE
* Copyright (c) 2016 MXCHIP Inc.
*
* The contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of MXCHIP Corporation.
*
*/
Reset_Handler = _start;
ENTRY( _start );
/* Include memory map */
INCLUDE memory.ld
SECTIONS
{
/* Data transfer area for serial flash writing app - at start of memory */
.sflash_trnsf :
{
KEEP(*(*.data_config))
KEEP(*(*.data_transfer))
}>SRAM AT> SRAM
.vectors :
{
. = ALIGN(512);
link_interrupt_vectors_location = .;
KEEP(*(*.interrupt_vector_table))
}>SRAM AT> SRAM
.text :
{
. = ALIGN(4);
link_code_location = .;
KEEP(*(.text.irq ))
*(.text .text.* .gnu.linkonce.t.*)
link_code_end = .;
. = ALIGN(0x4);
link_const_variable_data_location = .;
wifi_firmware_image_location = .;
*(.rodata.wifi_firmware_image)
wifi_firmware_image_end = .;
*(.rodata .rodata.* .gnu.linkonce.r.*)
link_const_variable_data_end = .;
. = ALIGN(0x4);
link_constructors_location = .;
KEEP(*(.preinit_array))
KEEP(*(.init_array))
KEEP (*crtbegin.o(.ctors))
KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
KEEP (*(SORT(.ctors.*)))
KEEP (*crtend.o(.ctors))
link_constructors_end = .;
. = ALIGN(0x4);
link_destructors_location = .;
KEEP (*crtbegin.o(.dtors))
KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
KEEP (*(SORT(.dtors.*)))
KEEP (*crtend.o(.dtors))
link_destructors_end = .;
. = ALIGN(16);
}>SRAM AT> SRAM
/*
* The .ARM.exidx and .ARM.exidx sections are used for C++ exception handling.
* It is located here for completeness. Bare-metal ARM projects
* typically cannot afford the overhead associated with C++
* exceptions handling.
*/
.ARM.exidx :
{
__exidx_start = ALIGN(4);
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
__exidx_end = .;
} >SRAM AT> SRAM
.ARM.extab :
{
__extab_start = ALIGN(4);
*(.ARM.extab*)
__extab_end = .;
} > SRAM AT> SRAM
.fast : /* This section contains code that is run from RAM after being loaded from flash - functions can be put in this section with the C attribute: __attribute__ ((section (".fast"))) */
{
link_run_from_ram_code_flash_location = LOADADDR( .fast ); /* This is the location in flash of the code */
link_run_from_ram_code_ram_location = .;
*(.fast .fast.* .text.fastcode)
link_run_from_ram_code_ram_end = .;
}>SRAM AT> SRAM
.data : /* Contains the non-zero initialised global variables */
{
link_global_data_initial_values = LOADADDR( .data ); /* This is the location in flash of the initial values of global variables */
link_global_data_start = .;
*(.data*)
link_global_data_end = .;
. = ALIGN(., 4);
}>SRAM AT> SRAM
.bss : /* Zero initialised memory used for zero initialised variables */
{
link_bss_location = ALIGN(., 4);
*(.bss*)
*(COMMON)
link_bss_end = .;
. = ALIGN(., 4);
}> SRAM AT> SRAM
.stack : /* Contains the initial stack */
{
link_stack_location = ALIGN(., 4);
*(.stack)
. = ALIGN(MAX(link_stack_location + __STACKSIZE__ , .), 4);
link_stack_end = .;
}> SRAM AT> SRAM
/DISCARD/ :
{
*(.ARM.attributes*)
*(.comment)
*(.init)
*(.preinit)
*(.fini)
*(.fini_array)
*(.ARM.exidx*)
*(.gnu.linkonce.armexidx.*)
*(.eh_frame_hdr)
*(.eh_frame)
*(.gnu.linkonce.armextab.*)
*(.v4_bx)
*(.vfp11_veneer)
*(.gcc_except_table)
*(.eh_frame_hdr)
*(.eh_frame)
*(.glue*)
}
}
/* Declare libc Heap to start at end of allocated RAM */
PROVIDE( _heap = link_stack_end );
/* End of the heap is top of RAM, aligned 8 byte */
PROVIDE( _eheap = ALIGN( ORIGIN( SRAM ) + LENGTH( SRAM ) - 8, 8 ) );
PROVIDE( total_app_image_size = LOADADDR( .data ) - ORIGIN( SRAM ) + link_global_data_end - link_global_data_start );
PROVIDE( wifi_firmware_image_size_from_link = wifi_firmware_image_end - wifi_firmware_image_location );
/* ThreadX aliases */
PROVIDE( __RAM_segment_used_end__ = link_stack_end );
PROVIDE( __tx_free_memory_start = link_stack_end );
PROVIDE( __tx_vectors = link_interrupt_vectors_location );
PROVIDE( wifi_firmware_image = 0 );

View File

@@ -0,0 +1,161 @@
/**
* UNPUBLISHED PROPRIETARY SOURCE CODE
* Copyright (c) 2016 MXCHIP Inc.
*
* The contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of MXCHIP Corporation.
*
*/
Reset_Handler = _start;
ENTRY( _start );
/* Include memory map */
INCLUDE memory.ld
SECTIONS
{
.vectors :
{
link_interrupt_vectors_location = .;
KEEP(*(*.interrupt_vector_table))
}>APP_FLASH AT> APP_FLASH
.text :
{
. = ALIGN(4);
link_code_location = .;
KEEP(*(.text.irq ))
*(.text .text.* .gnu.linkonce.t.*)
link_code_end = .;
. = ALIGN(0x4);
link_const_variable_data_location = .;
wifi_firmware_image_location = .;
*(.rodata.wifi_firmware_image)
wifi_firmware_image_end = .;
. = ALIGN(0x4);
*(.rodata.wifi_nvram_image)
*(.rodata .rodata.* .gnu.linkonce.r.*)
link_const_variable_data_end = .;
. = ALIGN(0x4);
link_constructors_location = .;
KEEP(*(.preinit_array))
KEEP(*(.init_array))
KEEP (*crtbegin.o(.ctors))
KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
KEEP (*(SORT(.ctors.*)))
KEEP (*crtend.o(.ctors))
link_constructors_end = .;
. = ALIGN(0x4);
link_destructors_location = .;
KEEP (*crtbegin.o(.dtors))
KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
KEEP (*(SORT(.dtors.*)))
KEEP (*crtend.o(.dtors))
link_destructors_end = .;
. = ALIGN(16);
}>APP_FLASH AT> APP_FLASH
/*
* The .ARM.exidx and .ARM.extab sections are used for C++ exception handling.
* It is located here for completeness. Bare-metal ARM projects
* typically cannot afford the overhead associated with C++
* exceptions handling.
*/
.ARM.exidx :
{
__exidx_start = ALIGN(4);
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
__exidx_end = .;
} > APP_FLASH AT> APP_FLASH
.ARM.extab :
{
__extab_start = ALIGN(4);
*(.ARM.extab*)
__extab_end = .;
} > APP_FLASH AT> APP_FLASH
.fast : /* This section contains code that is run from RAM after being loaded from flash - functions can be put in this section with the C attribute: __attribute__ ((section (".fast"))) */
{
link_run_from_ram_code_flash_location = LOADADDR( .fast ); /* This is the location in flash of the code */
link_run_from_ram_code_ram_location = .;
*(.fast .fast.* .text.fastcode)
link_run_from_ram_code_ram_end = .;
}> SRAM AT> APP_FLASH
.data : /* Contains the non-zero initialised global variables */
{
link_global_data_initial_values = LOADADDR( .data ); /* This is the location in flash of the initial values of global variables */
link_global_data_start = .;
*(.data*)
link_global_data_end = .;
. = ALIGN(., 4);
}> SRAM AT> APP_FLASH
.bss : /* Zero initialised memory used for zero initialised variables */
{
link_bss_location = ALIGN(., 4);
*(.bss*)
*(COMMON)
link_bss_end = .;
. = ALIGN(., 4);
}> SRAM AT>SRAM
.stack : /* Contains the initial stack */
{
link_stack_location = ALIGN(., 4);
*(.stack)
. = ALIGN(MAX(link_stack_location + __STACKSIZE__ , .), 4);
link_stack_end = .;
}> SRAM AT>SRAM
/DISCARD/ :
{
*(.ARM.attributes*)
*(.comment)
*(.init)
*(.preinit)
*(.fini)
*(.fini_array)
*(.ARM.exidx*)
*(.gnu.linkonce.armexidx.*)
*(.eh_frame_hdr)
*(.eh_frame)
*(.gnu.linkonce.armextab.*)
*(.v4_bx)
*(.vfp11_veneer)
*(.gcc_except_table)
*(.eh_frame_hdr)
*(.eh_frame)
*(.glue*)
}
}
/* Declare libc Heap to start at end of allocated RAM */
PROVIDE( _heap = link_stack_end );
/* End of the heap is top of RAM, aligned 8 byte */
PROVIDE( _eheap = ALIGN( ORIGIN( SRAM ) + LENGTH( SRAM ) - 8, 8 ) );

View File

@@ -0,0 +1,150 @@
/**
* UNPUBLISHED PROPRIETARY SOURCE CODE
* Copyright (c) 2016 MXCHIP Inc.
*
* The contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of MXCHIP Corporation.
*
*/
Reset_Handler = _start;
ENTRY( _start );
/* Include memory map */
INCLUDE memory.ld
SECTIONS
{
.vectors :
{
link_interrupt_vectors_location = .;
KEEP(*(*.interrupt_vector_table))
} >BL_FLASH AT> BL_FLASH
.text :
{
link_code_location = .;
KEEP(*(.text.irq ))
*(.text .text.* .gnu.linkonce.t.*)
link_code_end = .;
. = ALIGN(0x4);
link_const_variable_data_location = .;
*(.rodata .rodata.* .gnu.linkonce.r.*)
link_const_variable_data_end = .;
. = ALIGN(0x4);
link_constructors_location = .;
KEEP(*(.preinit_array))
KEEP(*(.init_array))
KEEP (*crtbegin.o(.ctors))
KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
KEEP (*(SORT(.ctors.*)))
KEEP (*crtend.o(.ctors))
link_constructors_end = .;
. = ALIGN(0x4);
link_destructors_location = .;
KEEP (*crtbegin.o(.dtors))
KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
KEEP (*(SORT(.dtors.*)))
KEEP (*crtend.o(.dtors))
link_destructors_end = .;
. = ALIGN(16);
}>BL_FLASH AT> BL_FLASH
/*
* The .ARM.exidx and .ARM.extab sections are used for C++ exception handling.
* It is located here for completeness. Bare-metal ARM projects
* typically cannot afford the overhead associated with C++
* exceptions handling.
*/
.ARM.exidx :
{
__exidx_start = ALIGN(4);
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
__exidx_end = .;
} > BL_FLASH AT> BL_FLASH
.ARM.extab :
{
__extab_start = ALIGN(4);
*(.ARM.extab*)
__extab_end = .;
} > BL_FLASH AT> BL_FLASH
.fast : /* This section contains code that is run from RAM after being loaded from flash - functions can be put in this section with the C attribute: __attribute__ ((section (".fast"))) */
{
link_run_from_ram_code_flash_location = LOADADDR( .fast ); /* This is the location in flash of the code */
link_run_from_ram_code_ram_location = .;
*(.fast .fast.* .text.fastcode)
link_run_from_ram_code_ram_end = .;
}> SRAM AT> BL_FLASH
.data : /* Contains the non-zero initialised global variables */
{
link_global_data_initial_values = LOADADDR( .data ); /* This is the location in flash of the initial values of global variables */
link_global_data_start = .;
*(.data*)
link_global_data_end = .;
. = ALIGN(., 4);
}> SRAM AT> BL_FLASH
.bss : /* Zero initialised memory used for zero initialised variables */
{
link_bss_location = ALIGN(., 4);
*(.bss*)
*(COMMON)
link_bss_end = .;
. = ALIGN(., 4);
}> SRAM AT> SRAM
.stack : /* Contains the initial stack */
{
link_stack_location = ALIGN(., 4);
*(.stack)
. = ALIGN(MAX(link_stack_location + __STACKSIZE__ , .), 4);
link_stack_end = .;
}> SRAM AT> SRAM
/DISCARD/ :
{
/* Usage of Global variables is banned in bootloader */
/* *(.bss*) */
*(COMMON)
*(.ARM.attributes*)
*(.comment)
*(.init)
*(.preinit)
*(.fini)
*(.fini_array)
*(.ARM.exidx*)
*(.gnu.linkonce.armexidx.*)
*(.eh_frame_hdr)
*(.eh_frame)
*(.gnu.linkonce.armextab.*)
*(.v4_bx)
*(.vfp11_veneer)
*(.gcc_except_table)
*(.eh_frame_hdr)
*(.eh_frame)
*(.glue*)
}
}
/* Declare libc Heap to start at end of allocated RAM */
PROVIDE( _heap = link_stack_end );
/* End of the heap is top of RAM, aligned 8 byte */
PROVIDE( _eheap = ALIGN( ORIGIN( SRAM ) + LENGTH( SRAM ) - 8, 8 ) );

View File

@@ -0,0 +1,119 @@
/**
* UNPUBLISHED PROPRIETARY SOURCE CODE
* Copyright (c) 2016 MXCHIP Inc.
*
* The contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of MXCHIP Corporation.
*
*/
/** @file
* Defines ATSAMG55 default unhandled ISR and default mappings to unhandled ISR
*/
#include <stdint.h>
#include "platform_assert.h"
#include "platform_cmsis.h"
#include "platform_isr.h"
/******************************************************
* Macros
******************************************************/
/******************************************************
* Constants
******************************************************/
/******************************************************
* Enumerations
******************************************************/
/******************************************************
* Type Definitions
******************************************************/
/******************************************************
* Structures
******************************************************/
/******************************************************
* Static Function Declarations
******************************************************/
extern void UnhandledInterrupt( void );
/******************************************************
* Variable Definitions
******************************************************/
/******************************************************
* Function Definitions
******************************************************/
PLATFORM_DEFINE_ISR( UnhandledInterrupt )
{
uint32_t active_interrupt_vector = (uint32_t) ( SCB->ICSR & 0x3fU );
//
// /* This variable tells you which interrupt vector is currently active */
(void)active_interrupt_vector;
// MICO_TRIGGER_BREAKPOINT( );
while( 1 )
{
}
}
/******************************************************
* Default IRQ Handler Declarations
******************************************************/
PLATFORM_SET_DEFAULT_ISR( NMI_Handler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( HardFault_Handler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( MemManage_Handler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( BusFault_Handler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( UsageFault_Handler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( SVC_Handler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( DebugMon_Handler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( PendSV_Handler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( SysTick_Handler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( WDT_IRQHandler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( BOD_IRQHandler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( Reserved_IRQHandler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( DMA_IRQHandler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( GINT0_IRQHandler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( PIN_INT0_IRQHandler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( PIN_INT1_IRQHandler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( PIN_INT2_IRQHandler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( PIN_INT3_IRQHandler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( UTICK_IRQHandler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( MRT_IRQHandler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( CT32B0_IRQHandler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( CT32B1_IRQHandler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( CT32B2_IRQHandler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( CT32B3_IRQHandler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( CT32B4_IRQHandler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( SCT0_IRQHandler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( UART0_IRQHandler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( UART1_IRQHandler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( UART2_IRQHandler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( UART3_IRQHandler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( I2C0_IRQHandler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( I2C1_IRQHandler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( I2C2_IRQHandler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( SPI0_IRQHandler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( SPI1_IRQHandler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( ADC_SEQA_IRQHandler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( ADC_SEQB_IRQHandler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( ADC_THCMP_IRQHandler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( RTC_IRQHandler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( MAILBOX_IRQHandler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( GINT1_IRQHandler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( PIN_INT4_IRQHandler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( PIN_INT5_IRQHandler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( PIN_INT6_IRQHandler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( PIN_INT7_IRQHandler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( RIT_IRQHandler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( Reserved41_IRQHandler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( Reserved42_IRQHandler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( Reserved43_IRQHandler , UnhandledInterrupt )
PLATFORM_SET_DEFAULT_ISR( Reserved44_IRQHandler , UnhandledInterrupt )