Commit ee2a5869 authored by wang.yulin's avatar wang.yulin

初步实现正确显示电压电流、按键对应丝印、刷新数据周期1-2s.

parent 11dd1c88
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
; <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8> ; <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
; </h> ; </h>
Stack_Size EQU 0x00000300 Stack_Size EQU 0x00000400
AREA STACK, NOINIT, READWRITE, ALIGN=3 AREA STACK, NOINIT, READWRITE, ALIGN=3
Stack_Mem SPACE Stack_Size Stack_Mem SPACE Stack_Size
...@@ -47,7 +47,7 @@ __initial_sp ...@@ -47,7 +47,7 @@ __initial_sp
; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> ; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
; </h> ; </h>
Heap_Size EQU 0x00000170 Heap_Size EQU 0x00000200
AREA HEAP, NOINIT, READWRITE, ALIGN=3 AREA HEAP, NOINIT, READWRITE, ALIGN=3
__heap_base __heap_base
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#define KEY1 GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_5)//ȡ1 #define KEY1 GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_5)//ȡ1
#define KEY2 GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_6)//ȡ2 #define KEY2 GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_6)//ȡ2
#define KEY3 GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_7)//ȡ3 #define KEY3 GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_7)//ȡ3
#define KEY4 GPIO_ReadInputDataBit(GPIOA, GPIO_Pin_5)//ȡ4 #define KEY4 GPIO_ReadInputDataBit(GPIOA, GPIO_Pin_4)//ȡ4
#define KEY1_PRES 1 //KEY1 #define KEY1_PRES 1 //KEY1
......
...@@ -129,10 +129,8 @@ void displayPower(float* data); ...@@ -129,10 +129,8 @@ void displayPower(float* data);
u8 GetDatalength(float* data); u8 GetDatalength(float* data);
void displayPowerData(float* data); void displayPowerData(float* data);
void displayPDataSpec(float* data); void displayPDataSpec(float* data);
void displayUData(float* data); void displayUIData(float* data);
void displayIData(float* data);
void displayPData(float* data); void displayPData(float* data);
void displayThduata(float* data);
void displayFreq(float* data); void displayFreq(float* data);
void displayHarmU(float* data); void displayHarmU(float* data);
void displayHarmI(float* data); void displayHarmI(float* data);
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#include "stm32f0xx_dma.h" #include "stm32f0xx_dma.h"
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <stdlib.h>
unsigned short GetCRC16(unsigned char *pbuf, unsigned short len); unsigned short GetCRC16(unsigned char *pbuf, unsigned short len);
#define u8 unsigned char #define u8 unsigned char
......
...@@ -110,19 +110,20 @@ void HAL_TIM_PeriodElapsedCallback() ...@@ -110,19 +110,20 @@ void HAL_TIM_PeriodElapsedCallback()
delay_ms(10); delay_ms(10);
if(KEY1==0) if(KEY1==0)
{ {
KeyPressFlag[0]=1; // KeyPressFlag[0]=1;
KeyPressFlag[3]=1; //Enter
} }
else if(KEY2==0) else if(KEY2==0)
{ {
KeyPressFlag[1]=1; KeyPressFlag[1]=1; //menu
} }
else if(KEY3==0) else if(KEY3==0)
{ {
KeyPressFlag[2]=1; KeyPressFlag[0]=1; //right
} }
else if(KEY4==0) else if(KEY4==0)
{ {
KeyPressFlag[3]=1; KeyPressFlag[2]=1; //left
} }
} }
else if(KEY1==1 && KEY2==1 && KEY3==1 && KEY4==1) else if(KEY1==1 && KEY2==1 && KEY3==1 && KEY4==1)
......
...@@ -14,7 +14,7 @@ void init_ht16c23(void){ ...@@ -14,7 +14,7 @@ void init_ht16c23(void){
I2CWriteSingle(0x80,0x00); // I2CWriteSingle(0x80,0x00);
I2CWriteSingle(0x82,0x03); I2CWriteSingle(0x82,0x03);
I2CWriteSingle(0x84,0x03); I2CWriteSingle(0x84,0x03);
I2CWriteSingle(0x86,0x00); I2CWriteSingle(0x86,0x00);
......
...@@ -40,13 +40,13 @@ void KEY_Init(void) ...@@ -40,13 +40,13 @@ void KEY_Init(void)
RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOA,ENABLE); RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOA,ENABLE);
RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOB,ENABLE); RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOB,ENABLE);
GPIO_InitStruct.GPIO_Pin = GPIO_Pin_5|GPIO_Pin_6|GPIO_Pin_7; GPIO_InitStruct.GPIO_Pin = GPIO_Pin_5|GPIO_Pin_6|GPIO_Pin_7;
GPIO_InitStruct.GPIO_Mode = GPIO_Mode_IN; GPIO_InitStruct.GPIO_Mode = GPIO_Mode_IN;
GPIO_InitStruct.GPIO_PuPd = GPIO_PuPd_NOPULL; GPIO_InitStruct.GPIO_PuPd = GPIO_PuPd_NOPULL;
GPIO_Init(GPIOB, &GPIO_InitStruct); GPIO_Init(GPIOB, &GPIO_InitStruct);
/*Configure GPIO pins : PA5 */ /*Configure GPIO pins : PA5 */
GPIO_InitStruct.GPIO_Pin = GPIO_Pin_5; GPIO_InitStruct.GPIO_Pin = GPIO_Pin_4;
GPIO_InitStruct.GPIO_Mode = GPIO_Mode_IN; GPIO_InitStruct.GPIO_Mode = GPIO_Mode_IN;
GPIO_InitStruct.GPIO_PuPd = GPIO_PuPd_NOPULL; GPIO_InitStruct.GPIO_PuPd = GPIO_PuPd_NOPULL;
GPIO_Init(GPIOA, &GPIO_InitStruct); GPIO_Init(GPIOA, &GPIO_InitStruct);
...@@ -66,7 +66,7 @@ void KEY_Init(void) ...@@ -66,7 +66,7 @@ void KEY_Init(void)
*/ */
void keyHandle(void) void keyHandle(void)
{ {
if(KeyPressFlag[0]==1)//KEY1按下 if(KeyPressFlag[0]==1)//right 按下
{ {
if(KEY2_ENTER==0) if(KEY2_ENTER==0)
{ {
...@@ -111,7 +111,7 @@ void keyHandle(void) ...@@ -111,7 +111,7 @@ void keyHandle(void)
} }
KeyPressFlag[0]=0; KeyPressFlag[0]=0;
} }
else if(KeyPressFlag[1]==1)//KEY2 else if(KeyPressFlag[1]==1)//menu
{ {
KEY2_ENTER+=1;//回车键进入设置的不同层级 KEY2_ENTER+=1;//回车键进入设置的不同层级
if(KEY2_ENTER>2) if(KEY2_ENTER>2)
...@@ -121,32 +121,34 @@ void keyHandle(void) ...@@ -121,32 +121,34 @@ void keyHandle(void)
KEY2_ENTER_First_sel=0; KEY2_ENTER_First_sel=0;
} }
ht16c23_clear(); ht16c23_clear();
KeyPressFlag[1]=0; KeyPressFlag[1]=0;
} }
else if(KeyPressFlag[2]==1)//KEY3 else if(KeyPressFlag[2]==1)//left
{ {
if(KEY2_ENTER==0) if(KEY2_ENTER==0)
{ {
MENUnum-=1;//翻页 if (MENUnum == 0)
if(MENUnum<0) MENUnum = 16;
MENUnum=16; else
MENUnum -= 1; //翻页
ht16c23_clear(); ht16c23_clear();
memset(tempArr12,0,16); memset(tempArr12,0,16);
memset(tempArr34,0,16); memset(tempArr34,0,16);
} }
else if(KEY2_ENTER==1) else if(KEY2_ENTER==1)
{ {
KEY2_ENTER_First_sel--; KEY2_ENTER_First_sel--;
if(KEY2_ENTER_First_sel<0) KEY2_ENTER_First_sel=3; //上下选择设置的选项 if(KEY2_ENTER_First_sel<0) KEY2_ENTER_First_sel=3; //上下选择设置的选项
ht16c23_clear(); ht16c23_clear();
} }
else if(KEY2_ENTER_First_sel==0 && KEY2_ENTER==2&&KEY2_ENTER_ADDR_selLocation==1) else if(KEY2_ENTER_First_sel==0 && KEY2_ENTER==2&&KEY2_ENTER_ADDR_selLocation==1)
{ {
ADDR_Num_Single++; ADDR_Num_Single++;
if(ADDR_Num_Single>9) ADDR_Num_Single=0;//设置位上面的数值 if(ADDR_Num_Single>9) ADDR_Num_Single=0;//设置位上面的数值
} }
else if(KEY2_ENTER_First_sel==0 && KEY2_ENTER==2&&KEY2_ENTER_ADDR_selLocation==2) else if(KEY2_ENTER_First_sel==0 && KEY2_ENTER==2&&KEY2_ENTER_ADDR_selLocation==2)
{ {
ADDR_Num_Tens++; ADDR_Num_Tens++;
if(ADDR_Num_Tens>9) ADDR_Num_Tens=0;//设置位上面的数值 if(ADDR_Num_Tens>9) ADDR_Num_Tens=0;//设置位上面的数值
...@@ -207,7 +209,7 @@ void keyHandle(void) ...@@ -207,7 +209,7 @@ void keyHandle(void)
} }
KeyPressFlag[2]=0; KeyPressFlag[2]=0;
} }
else if(KeyPressFlag[3]==1)//KEY4 else if(KeyPressFlag[3]==1)//enter
{ {
if(KEY2_ENTER>0) if(KEY2_ENTER>0)
KEY2_ENTER-=1; KEY2_ENTER-=1;
......
...@@ -27,8 +27,6 @@ int fputc(int ch, FILE *f) ...@@ -27,8 +27,6 @@ int fputc(int ch, FILE *f)
} }
#endif #endif
uint8_t rsTxBuf[USART1_TX_BUFSIZE]; uint8_t rsTxBuf[USART1_TX_BUFSIZE];
uint8_t rsRxBuf[USART1_RX_BUFSIZE]; uint8_t rsRxBuf[USART1_RX_BUFSIZE];
...@@ -49,9 +47,7 @@ extern u8 PT_Huns; ...@@ -49,9 +47,7 @@ extern u8 PT_Huns;
SettingParams SettingPara; SettingParams SettingPara;
volatile DataStructure DataStruc;
DataStructure DataStruc;
u8 sendData[50]={0}; u8 sendData[50]={0};
unsigned char const TabH[] = { //CRC?????? unsigned char const TabH[] = { //CRC??????
...@@ -219,63 +215,57 @@ void USART1_Init(void) ...@@ -219,63 +215,57 @@ void USART1_Init(void)
// //
// USART_ClearFlag(USART1, USART_FLAG_TC); // USART_ClearFlag(USART1, USART_FLAG_TC);
GPIO_InitTypeDef GPIO_InitStructure;
GPIO_InitTypeDef GPIO_InitStructure; USART_InitTypeDef USART_InitStructure;
USART_InitTypeDef USART_InitStructure; NVIC_InitTypeDef NVIC_InitStructure;
NVIC_InitTypeDef NVIC_InitStructure; RCC_AHBPeriphClockCmd( RCC_AHBPeriph_GPIOA, ENABLE);
RCC_AHBPeriphClockCmd( RCC_AHBPeriph_GPIOA, ENABLE); RCC_APB2PeriphClockCmd(RCC_APB2Periph_USART1, ENABLE );
RCC_APB2PeriphClockCmd(RCC_APB2Periph_USART1, ENABLE ); GPIO_PinAFConfig(GPIOA,GPIO_PinSource2,GPIO_AF_1);
GPIO_PinAFConfig(GPIOA,GPIO_PinSource2,GPIO_AF_1); GPIO_PinAFConfig(GPIOA,GPIO_PinSource3,GPIO_AF_1);
GPIO_PinAFConfig(GPIOA,GPIO_PinSource3,GPIO_AF_1); /*
/* * USART1_TX -> PA2 , USART1_RX -> PA3
* USART1_TX -> PA2 , USART1_RX -> PA3 */
*/ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_2;
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_2; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF; GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP; GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; GPIO_Init(GPIOA, &GPIO_InitStructure);
GPIO_Init(GPIOA, &GPIO_InitStructure);
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_3;
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_3; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF; GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP; GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; GPIO_Init(GPIOA, &GPIO_InitStructure);
GPIO_Init(GPIOA, &GPIO_InitStructure); //DMA_Config();
USART_InitStructure.USART_BaudRate = 9600;
USART_InitStructure.USART_WordLength = USART_WordLength_8b;
USART_InitStructure.USART_StopBits = USART_StopBits_1;
USART_InitStructure.USART_Parity = USART_Parity_No;
// DMA_Config(); USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None;
USART_InitStructure.USART_BaudRate = 1200; USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx;
USART_InitStructure.USART_WordLength = USART_WordLength_8b; USART_Init(USART1, &USART_InitStructure);
USART_InitStructure.USART_StopBits = USART_StopBits_1;
USART_InitStructure.USART_Parity = USART_Parity_No; USART_ITConfig(USART1,USART_IT_RXNE,ENABLE);
USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None; USART_ITConfig(USART1,USART_IT_IDLE,ENABLE);
USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx;
USART_Init(USART1, &USART_InitStructure); USART_ClearFlag(USART1, USART_FLAG_TC);
USART_ClearFlag(USART1, USART_IT_RXNE);
USART_ITConfig(USART1,USART_IT_RXNE,ENABLE);
USART_ITConfig(USART1,USART_IT_IDLE,ENABLE); USART1->ICR |= 1<<4;
// USART_DMACmd(USART1,USART_DMAReq_Rx,ENABLE);
USART_ClearFlag(USART1, USART_FLAG_TC); /* Enable USART */
USART_ClearFlag(USART1, USART_IT_RXNE); USART_Cmd(USART1, ENABLE);
USART1->ICR |= 1<<4; /* Enable the USARTx Interrupt */
// USART_DMACmd(USART1,USART_DMAReq_Rx,ENABLE); NVIC_InitStructure.NVIC_IRQChannel = USART1_IRQn;
/* Enable USART */ NVIC_InitStructure.NVIC_IRQChannelPriority = 1;
USART_Cmd(USART1, ENABLE); NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure);
/* Enable the USARTx Interrupt */
NVIC_InitStructure.NVIC_IRQChannel = USART1_IRQn;
NVIC_InitStructure.NVIC_IRQChannelPriority = 1;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure);
} }
//============================================================================= //=============================================================================
//文件名称: //文件名称:
//功能概要:USART1中断函数 //功能概要:USART1中断函数
...@@ -284,59 +274,37 @@ void USART1_Init(void) ...@@ -284,59 +274,37 @@ void USART1_Init(void)
//============================================================================= //=============================================================================
void USART1_IRQHandler() void USART1_IRQHandler()
{ {
u8 Clear; u8 Clear;
// if (USART_GetFlagStatus(USART1, USART_FLAG_ORE) != RESET) //
// {
// rsRxBuf[cnter++] = USART1->RDR;
// }
// if((USART1->ISR & USART_ISR_ORE) == USART_ISR_ORE)
// {
// USART1->ICR = USART_ICR_ORECF;/* clear OverRun flag */
// }
// //
if(USART_GetFlagStatus(USART1,USART_FLAG_ORE) != RESET) // if(USART_GetFlagStatus(USART1,USART_FLAG_ORE) != RESET) //
{ // { //
USART_ReceiveData(USART1); USART_ReceiveData(USART1);
USART_ClearFlag(USART1,USART_FLAG_ORE); // USART_ClearFlag(USART1,USART_FLAG_ORE); //
} }
if(USART_GetITStatus(USART1,USART_IT_RXNE) != RESET) if(USART_GetITStatus(USART1,USART_IT_RXNE) != RESET)
{ {
rsRxBuf[cnter++] = USART1->RDR; rsRxBuf[cnter++] = USART1->RDR;
if(cnter>USART1_RX_BUFSIZE) if(cnter>USART1_RX_BUFSIZE)
cnter=0; cnter=0;
} }
else if(USART_GetITStatus(USART1,USART_IT_IDLE) != RESET) else if(USART_GetITStatus(USART1,USART_IT_IDLE) != RESET)
{ {
Clear = USART1->RDR; Clear = USART1->RDR;
Clear = USART1->ISR; Clear = USART1->ISR;
Usart1_rxFLag =1; Usart1_rxFLag =1;
USART1->ICR |= 1<<4; USART1->ICR |= 1<<4;
} }
// uint16_t Len = 0;
// if(USART_GetITStatus(USART1, USART_IT_IDLE) != RESET)
// {
// USART1->ICR |= 1<< 4; //清除中断
// DMA_Cmd(DMA1_Channel3,DISABLE);
// Len = USART1_RX_BUFSIZE - DMA_GetCurrDataCounter(DMA1_Channel3);
// Usart1_rxFLag =1;
// DMA1_Channel3->CNDTR=USART1_RX_BUFSIZE;
// DMA_Cmd(DMA1_Channel3,ENABLE);
} }
void USART1TxData(void *data,int len) void USART1TxData(void *data, int len)
{ {
u8* p; u8* p;
p = (u8*)data; p = (u8*)data;
while(len--){
while(len--) {
USART_SendData(USART1,*p++); USART_SendData(USART1,*p++);
while(USART_GetFlagStatus(USART1,USART_FLAG_TC) == RESET); while(USART_GetFlagStatus(USART1, USART_FLAG_TC) == RESET);
} }
} }
...@@ -385,23 +353,24 @@ void ExistRXInformation(void) ...@@ -385,23 +353,24 @@ void ExistRXInformation(void)
u8 crcH=0; u8 crcH=0;
u8 crcL=0; u8 crcL=0;
u16 crcCode=0; u16 crcCode=0;
u8 tmp[5] = {0xfa,0xfb,0xfa,0xfb,0x04};
if(Usart1_rxFLag==1)
{ if(Usart1_rxFLag == 1)
{
if(rsRxBuf[5]!=0) if(rsRxBuf[0]==0xfa && rsRxBuf[1]==0xfb && rsRxBuf[2]==0xfa && rsRxBuf[3]==0xfb && rsRxBuf[4]==0x04)//&&rsRxBuf[5]==sizeof(DataStruc)+1)//功能码
{ {
if(rsRxBuf[0]==0xfa&&rsRxBuf[1]==0xfb&&rsRxBuf[2]==0xfa&&rsRxBuf[3]==0xfb&&rsRxBuf[4]==0x04)//&&rsRxBuf[5]==sizeof(DataStruc)+1)//功能码 crcCode = GetCRC16(&rsRxBuf[6],rsRxBuf[5]-2);
crcL = (u8)crcCode&0x00ff;
crcH = (u8)((crcCode&0xff00)>>8);
if((rsRxBuf[cnter-1] == crcH) && (rsRxBuf[cnter-2] == crcL))
{ {
crcCode=GetCRC16(&rsRxBuf[6],rsRxBuf[5]-2); memcpy(&DataStruc, &rsRxBuf[6],sizeof(DataStruc));
crcL=(u8)crcCode&0x00ff;
crcH=(u8)((crcCode&0xff00)>>8);
if(rsRxBuf[cnter-1]==crcH&&rsRxBuf[cnter-2]==crcL)
memcpy(&DataStruc,&rsRxBuf[6],sizeof(DataStruc));
} }
} }
Usart1_rxFLag =0;
cnter=0; Usart1_rxFLag = 0;
cnter = 0;
memset(rsRxBuf,0,USART1_RX_BUFSIZE); memset(rsRxBuf,0,USART1_RX_BUFSIZE);
} }
} }
...@@ -421,7 +390,6 @@ void requestData(void) ...@@ -421,7 +390,6 @@ void requestData(void)
rsTxBuf[Usart1txcounter++]=0x7e; rsTxBuf[Usart1txcounter++]=0x7e;
rsTxBuf[Usart1txcounter++]=0x80; rsTxBuf[Usart1txcounter++]=0x80;
USART1TxData(rsTxBuf,Usart1txcounter); USART1TxData(rsTxBuf,Usart1txcounter);
memset(rsTxBuf,0,sizeof(rsTxBuf)); memset(rsTxBuf,0,sizeof(rsTxBuf));
......
--create ..\OBJ\STM32F030Demo.lib
..\obj\main.o
..\obj\stm32f0xx_it.o
..\obj\system_stm32f0xx.o
..\obj\startup_stm32f0xx.o
..\obj\delay.o
..\obj\gpio.o
..\obj\ht16c23.o
..\obj\key.o
..\obj\myiic.o
..\obj\oled0561.o
..\obj\usart.o
..\obj\led.o
..\obj\stm32f0xx_gpio.o
..\obj\stm32f0xx_rcc.o
..\obj\stm32f0xx_misc.o
..\obj\stm32f0xx_usart.o
..\obj\stm32f0xx_crc.o
..\obj\stm32f0xx_i2c.o
..\obj\stm32f0xx_syscfg.o
..\obj\stm32f0xx_tim.o
..\obj\stm32f0xx_dma.o
No preview for this file type
...@@ -21,28 +21,32 @@ Target DLL: Segger\JL2CM3.dll V2.99.38.0 ...@@ -21,28 +21,32 @@ Target DLL: Segger\JL2CM3.dll V2.99.38.0
Dialog DLL: TARMCM1.DLL V1.14.3.0 Dialog DLL: TARMCM1.DLL V1.14.3.0
<h2>Project:</h2> <h2>Project:</h2>
D:\work\Project\F030\9.14 段码屏新驱动\面板式段码屏\8.11 段码屏 - 测试\User\STM32F030Demo.uvprojx D:\work\Project\F030\9.14 段码屏新驱动\10.16 段码屏\8.11 段码屏 - 测试\User\STM32F030Demo.uvprojx
Project File Date: 10/14/2022 Project File Date: 11/29/2022
<h2>Output:</h2> <h2>Output:</h2>
*** Using Compiler 'V5.06 update 7 (build 960)', folder: 'D:\MDK5\ARM\ARMCC\Bin' *** Using Compiler 'V5.06 update 7 (build 960)', folder: 'D:\MDK5\ARM\ARMCC\Bin'
Build target 'Stm32f030demo' Rebuild target 'Stm32f030demo'
assembling startup_stm32f0xx.s... assembling startup_stm32f0xx.s...
compiling system_stm32f0xx.c...
compiling stm32f0xx_it.c... compiling stm32f0xx_it.c...
compiling gpio.c... compiling gpio.c...
compiling delay.c... compiling delay.c...
compiling system_stm32f0xx.c...
compiling ht16c23.c... compiling ht16c23.c...
compiling main.c... compiling main.c...
compiling myiic.c...
compiling key.c... compiling key.c...
..\HARDWARE\src\key.c(33): warning: #1295-D: Deprecated declaration USART1SendData - give arg types ..\HARDWARE\src\key.c(33): warning: #1295-D: Deprecated declaration USART1SendData - give arg types
extern void USART1SendData(); extern void USART1SendData();
..\HARDWARE\src\key.c: 1 warning, 0 errors ..\HARDWARE\src\key.c: 1 warning, 0 errors
compiling myiic.c...
compiling usart.c... compiling usart.c...
..\HARDWARE\src\usart.c(288): warning: #550-D: variable "Clear" was set but never used ..\HARDWARE\src\usart.c(277): warning: #550-D: variable "Clear" was set but never used
u8 Clear; u8 Clear;
..\HARDWARE\src\usart.c: 1 warning, 0 errors ..\HARDWARE\src\usart.c(368): warning: #167-D: argument of type "volatile DataStructure *" is incompatible with parameter of type "void *restrict"
memcpy(&DataStruc, &rsRxBuf[6],sizeof(DataStruc));
..\HARDWARE\src\usart.c(356): warning: #177-D: variable "tmp" was declared but never referenced
u8 tmp[5] = {0xfa,0xfb,0xfa,0xfb,0x04};
..\HARDWARE\src\usart.c: 3 warnings, 0 errors
compiling oled0561.c... compiling oled0561.c...
compiling led.c... compiling led.c...
compiling stm32f0xx_gpio.c... compiling stm32f0xx_gpio.c...
...@@ -55,8 +59,9 @@ compiling stm32f0xx_syscfg.c... ...@@ -55,8 +59,9 @@ compiling stm32f0xx_syscfg.c...
compiling stm32f0xx_dma.c... compiling stm32f0xx_dma.c...
compiling stm32f0xx_tim.c... compiling stm32f0xx_tim.c...
linking... linking...
Program Size: Code=29528 RO-data=864 RW-data=108 ZI-data=1836 Program Size: Code=26060 RO-data=864 RW-data=108 ZI-data=2092
"..\OBJ\STM32F030Demo.axf" - 0 Error(s), 2 Warning(s). FromELF: creating hex file...
"..\OBJ\STM32F030Demo.axf" - 0 Error(s), 4 Warning(s).
<h2>Software Packages used:</h2> <h2>Software Packages used:</h2>
...@@ -79,7 +84,7 @@ Package Vendor: Keil ...@@ -79,7 +84,7 @@ Package Vendor: Keil
<h2>Collection of Component Files used:</h2> <h2>Collection of Component Files used:</h2>
* Component: ARM::CMSIS:CORE:5.4.0 * Component: ARM::CMSIS:CORE:5.4.0
Build Time Elapsed: 00:00:02 Build Time Elapsed: 00:00:03
</pre> </pre>
</body> </body>
</html> </html>
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
...@@ -16,4 +16,5 @@ ...@@ -16,4 +16,5 @@
..\obj\led.o: D:\MDK5\ARM\ARMCC\Bin\..\include\stdio.h ..\obj\led.o: D:\MDK5\ARM\ARMCC\Bin\..\include\stdio.h
..\obj\led.o: D:\MDK5\ARM\ARMCC\Bin\..\include\string.h ..\obj\led.o: D:\MDK5\ARM\ARMCC\Bin\..\include\string.h
..\obj\led.o: ..\HARDWARE\inc\usart.h ..\obj\led.o: ..\HARDWARE\inc\usart.h
..\obj\led.o: D:\MDK5\ARM\ARMCC\Bin\..\include\stdlib.h
..\obj\led.o: ..\SYSTEM\delay.h ..\obj\led.o: ..\SYSTEM\delay.h
No preview for this file type
No preview for this file type
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
..\obj\main.o: ..\STM32F03x_FWLib\inc\stm32f0xx_dma.h ..\obj\main.o: ..\STM32F03x_FWLib\inc\stm32f0xx_dma.h
..\obj\main.o: D:\MDK5\ARM\ARMCC\Bin\..\include\stdio.h ..\obj\main.o: D:\MDK5\ARM\ARMCC\Bin\..\include\stdio.h
..\obj\main.o: D:\MDK5\ARM\ARMCC\Bin\..\include\string.h ..\obj\main.o: D:\MDK5\ARM\ARMCC\Bin\..\include\string.h
..\obj\main.o: D:\MDK5\ARM\ARMCC\Bin\..\include\stdlib.h
..\obj\main.o: ..\HARDWARE\inc\gpio.h ..\obj\main.o: ..\HARDWARE\inc\gpio.h
..\obj\main.o: ..\SYSTEM\delay.h ..\obj\main.o: ..\SYSTEM\delay.h
..\obj\main.o: ..\HARDWARE\inc\myiic.h ..\obj\main.o: ..\HARDWARE\inc\myiic.h
...@@ -25,5 +26,4 @@ ...@@ -25,5 +26,4 @@
..\obj\main.o: ..\HARDWARE\inc\key.h ..\obj\main.o: ..\HARDWARE\inc\key.h
..\obj\main.o: ..\HARDWARE\inc\flash.h ..\obj\main.o: ..\HARDWARE\inc\flash.h
..\obj\main.o: D:\MDK5\ARM\ARMCC\Bin\..\include\stdbool.h ..\obj\main.o: D:\MDK5\ARM\ARMCC\Bin\..\include\stdbool.h
..\obj\main.o: D:\MDK5\ARM\ARMCC\Bin\..\include\stdlib.h
..\obj\main.o: ..\HARDWARE\inc\led.h ..\obj\main.o: ..\HARDWARE\inc\led.h
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
...@@ -15,3 +15,4 @@ ...@@ -15,3 +15,4 @@
..\obj\usart.o: ..\STM32F03x_FWLib\inc\stm32f0xx_dma.h ..\obj\usart.o: ..\STM32F03x_FWLib\inc\stm32f0xx_dma.h
..\obj\usart.o: D:\MDK5\ARM\ARMCC\Bin\..\include\stdio.h ..\obj\usart.o: D:\MDK5\ARM\ARMCC\Bin\..\include\stdio.h
..\obj\usart.o: D:\MDK5\ARM\ARMCC\Bin\..\include\string.h ..\obj\usart.o: D:\MDK5\ARM\ARMCC\Bin\..\include\string.h
..\obj\usart.o: D:\MDK5\ARM\ARMCC\Bin\..\include\stdlib.h
No preview for this file type
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
<SetRegEntry> <SetRegEntry>
<Number>0</Number> <Number>0</Number>
<Key>JL2CM3</Key> <Key>JL2CM3</Key>
<Name>-U59400616 -O78 -S8 -ZTIFSpeedSel100 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(0BB11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8001 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC1000 -FN1 -FF0STM32F0xx_32.FLM -FS08000000 -FL08000 -FP0($$Device:STM32F030K6$Flash\STM32F0xx_32.FLM)</Name> <Name>-U59400616 -O78 -S8 -ZTIFSpeedSel100 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8001 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC1000 -FN1 -FF0STM32F0xx_32.FLM -FS08000000 -FL08000 -FP0($$Device:STM32F030K6$Flash\STM32F0xx_32.FLM)</Name>
</SetRegEntry> </SetRegEntry>
</TargetDriverDllRegistry> </TargetDriverDllRegistry>
<Breakpoint/> <Breakpoint/>
...@@ -206,13 +206,21 @@ ...@@ -206,13 +206,21 @@
<ItemText>data</ItemText> <ItemText>data</ItemText>
</Ww> </Ww>
</WatchWindow1> </WatchWindow1>
<MemoryWindow1>
<Mm>
<WinNumber>1</WinNumber>
<SubType>0</SubType>
<ItemText>tempc</ItemText>
<AccSizeX>0</AccSizeX>
</Mm>
</MemoryWindow1>
<Tracepoint> <Tracepoint>
<THDelay>0</THDelay> <THDelay>0</THDelay>
</Tracepoint> </Tracepoint>
<DebugFlag> <DebugFlag>
<trace>0</trace> <trace>0</trace>
<periodic>0</periodic> <periodic>0</periodic>
<aLwin>0</aLwin> <aLwin>1</aLwin>
<aCover>0</aCover> <aCover>0</aCover>
<aSer1>0</aSer1> <aSer1>0</aSer1>
<aSer2>0</aSer2> <aSer2>0</aSer2>
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
<OutputName>STM32F030Demo</OutputName> <OutputName>STM32F030Demo</OutputName>
<CreateExecutable>1</CreateExecutable> <CreateExecutable>1</CreateExecutable>
<CreateLib>0</CreateLib> <CreateLib>0</CreateLib>
<CreateHexFile>0</CreateHexFile> <CreateHexFile>1</CreateHexFile>
<DebugInformation>1</DebugInformation> <DebugInformation>1</DebugInformation>
<BrowseInformation>1</BrowseInformation> <BrowseInformation>1</BrowseInformation>
<ListingPath>.\</ListingPath> <ListingPath>.\</ListingPath>
...@@ -518,8 +518,8 @@ ...@@ -518,8 +518,8 @@
<RTE> <RTE>
<apis/> <apis/>
<components> <components>
<component Cclass="CMSIS" Cgroup="CORE" Cvendor="ARM" Cversion="5.1.2" condition="ARMv6_7_8-M Device"> <component Cclass="CMSIS" Cgroup="CORE" Cvendor="ARM" Cversion="5.4.0" condition="ARMv6_7_8-M Device">
<package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="5.4.0"/> <package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="5.7.0"/>
<targetInfos> <targetInfos>
<targetInfo name="Stm32f030demo"/> <targetInfo name="Stm32f030demo"/>
</targetInfos> </targetInfos>
......
SET PATH=D:\MDK5\ARM\ARMCC\Bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;D:\Xshell\;D:\XTP\;D:\Git\cmd;C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;;C:\Users\Administrator\AppData\Local\Programs\Microsoft VS Code\bin
SET CPU_TYPE=STM32F030K6
SET CPU_VENDOR=STMicroelectronics
SET UV2_TARGET=Stm32f030demo
SET CPU_CLOCK=0x00B71B00
"D:\MDK5\ARM\ARMCC\Bin\ArmCC" --Via "..\obj\main.__i"
"D:\MDK5\ARM\ARMCC\Bin\ArmCC" --Via "..\obj\stm32f0xx_it.__i"
"D:\MDK5\ARM\ARMCC\Bin\ArmCC" --Via "..\obj\system_stm32f0xx.__i"
"D:\MDK5\ARM\ARMCC\Bin\ArmAsm" --Via "..\obj\startup_stm32f0xx._ia"
"D:\MDK5\ARM\ARMCC\Bin\ArmCC" --Via "..\obj\delay.__i"
"D:\MDK5\ARM\ARMCC\Bin\ArmCC" --Via "..\obj\gpio.__i"
"D:\MDK5\ARM\ARMCC\Bin\ArmCC" --Via "..\obj\ht16c23.__i"
"D:\MDK5\ARM\ARMCC\Bin\ArmCC" --Via "..\obj\key.__i"
"D:\MDK5\ARM\ARMCC\Bin\ArmCC" --Via "..\obj\myiic.__i"
"D:\MDK5\ARM\ARMCC\Bin\ArmCC" --Via "..\obj\oled0561.__i"
"D:\MDK5\ARM\ARMCC\Bin\ArmCC" --Via "..\obj\usart.__i"
"D:\MDK5\ARM\ARMCC\Bin\ArmCC" --Via "..\obj\led.__i"
"D:\MDK5\ARM\ARMCC\Bin\ArmCC" --Via "..\obj\stm32f0xx_gpio.__i"
"D:\MDK5\ARM\ARMCC\Bin\ArmCC" --Via "..\obj\stm32f0xx_rcc.__i"
"D:\MDK5\ARM\ARMCC\Bin\ArmCC" --Via "..\obj\stm32f0xx_misc.__i"
"D:\MDK5\ARM\ARMCC\Bin\ArmCC" --Via "..\obj\stm32f0xx_usart.__i"
"D:\MDK5\ARM\ARMCC\Bin\ArmCC" --Via "..\obj\stm32f0xx_crc.__i"
"D:\MDK5\ARM\ARMCC\Bin\ArmCC" --Via "..\obj\stm32f0xx_i2c.__i"
"D:\MDK5\ARM\ARMCC\Bin\ArmCC" --Via "..\obj\stm32f0xx_syscfg.__i"
"D:\MDK5\ARM\ARMCC\Bin\ArmCC" --Via "..\obj\stm32f0xx_tim.__i"
"D:\MDK5\ARM\ARMCC\Bin\ArmCC" --Via "..\obj\stm32f0xx_dma.__i"
"D:\MDK5\ARM\ARMCC\Bin\ArmLink" --Via "..\OBJ\STM32F030Demo.lnp"
"D:\MDK5\ARM\ARMCC\Bin\fromelf.exe" "..\OBJ\STM32F030Demo.axf" --i32combined --output "..\OBJ\STM32F030Demo.hex"
This diff is collapsed.
...@@ -58,9 +58,9 @@ ARM Macro Assembler Page 1 ...@@ -58,9 +58,9 @@ ARM Macro Assembler Page 1
36 00000000 ; <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8> 36 00000000 ; <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
37 00000000 ; </h> 37 00000000 ; </h>
38 00000000 38 00000000
39 00000000 00000300 39 00000000 00000400
Stack_Size Stack_Size
EQU 0x00000300 EQU 0x00000400
40 00000000 40 00000000
41 00000000 AREA STACK, NOINIT, READWRITE, ALIGN 41 00000000 AREA STACK, NOINIT, READWRITE, ALIGN
...@@ -72,30 +72,30 @@ ARM Macro Assembler Page 2 ...@@ -72,30 +72,30 @@ ARM Macro Assembler Page 2
=3 =3
42 00000000 Stack_Mem 42 00000000 Stack_Mem
SPACE Stack_Size SPACE Stack_Size
43 00000300 __initial_sp 43 00000400 __initial_sp
44 00000300 44 00000400
45 00000300 45 00000400
46 00000300 ; <h> Heap Configuration 46 00000400 ; <h> Heap Configuration
47 00000300 ; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> 47 00000400 ; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
48 00000300 ; </h> 48 00000400 ; </h>
49 00000300 49 00000400
50 00000300 00000170 50 00000400 00000200
Heap_Size Heap_Size
EQU 0x00000170 EQU 0x00000200
51 00000300 51 00000400
52 00000300 AREA HEAP, NOINIT, READWRITE, ALIGN= 52 00000400 AREA HEAP, NOINIT, READWRITE, ALIGN=
3 3
53 00000000 __heap_base 53 00000000 __heap_base
54 00000000 Heap_Mem 54 00000000 Heap_Mem
SPACE Heap_Size SPACE Heap_Size
55 00000170 __heap_limit 55 00000200 __heap_limit
56 00000170 56 00000200
57 00000170 PRESERVE8 57 00000200 PRESERVE8
58 00000170 THUMB 58 00000200 THUMB
59 00000170 59 00000200
60 00000170 60 00000200
61 00000170 ; Vector Table Mapped to Address 0 at Reset 61 00000200 ; Vector Table Mapped to Address 0 at Reset
62 00000170 AREA RESET, DATA, READONLY 62 00000200 AREA RESET, DATA, READONLY
63 00000000 EXPORT __Vectors 63 00000000 EXPORT __Vectors
64 00000000 EXPORT __Vectors_End 64 00000000 EXPORT __Vectors_End
65 00000000 EXPORT __Vectors_Size 65 00000000 EXPORT __Vectors_Size
...@@ -400,7 +400,7 @@ Symbol: Stack_Mem ...@@ -400,7 +400,7 @@ Symbol: Stack_Mem
Uses Uses
None None
Comment: Stack_Mem unused Comment: Stack_Mem unused
__initial_sp 00000300 __initial_sp 00000400
Symbol: __initial_sp Symbol: __initial_sp
Definitions Definitions
...@@ -440,7 +440,7 @@ Symbol: __heap_base ...@@ -440,7 +440,7 @@ Symbol: __heap_base
Uses Uses
At line 234 in file ..\CORE\startup_stm32f0xx.s At line 234 in file ..\CORE\startup_stm32f0xx.s
Comment: __heap_base used once Comment: __heap_base used once
__heap_limit 00000170 __heap_limit 00000200
Symbol: __heap_limit Symbol: __heap_limit
Definitions Definitions
...@@ -856,7 +856,7 @@ Symbol: WWDG_IRQHandler ...@@ -856,7 +856,7 @@ Symbol: WWDG_IRQHandler
ARM Macro Assembler Page 1 Alphabetic symbol ordering ARM Macro Assembler Page 1 Alphabetic symbol ordering
Absolute symbols Absolute symbols
Heap_Size 00000170 Heap_Size 00000200
Symbol: Heap_Size Symbol: Heap_Size
Definitions Definitions
...@@ -864,7 +864,7 @@ Symbol: Heap_Size ...@@ -864,7 +864,7 @@ Symbol: Heap_Size
Uses Uses
At line 54 in file ..\CORE\startup_stm32f0xx.s At line 54 in file ..\CORE\startup_stm32f0xx.s
Comment: Heap_Size used once Comment: Heap_Size used once
Stack_Size 00000300 Stack_Size 00000400
Symbol: Stack_Size Symbol: Stack_Size
Definitions Definitions
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment