野火电子论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7024|回复: 1

萌新求教

[复制链接]
发表于 2020-6-16 23:40:27 | 显示全部楼层 |阅读模式
Build started: Project: Fb-103
*** Using Compiler 'V6.14', folder: 'D:\MDK\mdk\ARM\ARMCLANG\Bin'
Build target 'Target 1'
../Libraries/CMSIS/core_cm3.c(445): error: non-ASM statement in naked function is not supported
  uint32_t result=0;
  ^
../Libraries/CMSIS/core_cm3.c(442): note: attribute is here
uint32_t __get_PSP(void) __attribute__( ( naked ) );
                                          ^
../Libraries/CMSIS/core_cm3.c(465): error: parameter references not allowed in naked functions
                  "BX  lr     \n\t" : : "r" (topOfProcStack) );
                                             ^
../Libraries/CMSIS/core_cm3.c(461): note: attribute is here
void __set_PSP(uint32_t topOfProcStack) __attribute__( ( naked ) );
                                                         ^
../Libraries/CMSIS/core_cm3.c(479): error: non-ASM statement in naked function is not supported
  uint32_t result=0;
  ^
../Libraries/CMSIS/core_cm3.c(476): note: attribute is here
uint32_t __get_MSP(void) __attribute__( ( naked ) );
                                          ^
../Libraries/CMSIS/core_cm3.c(499): error: parameter references not allowed in naked functions
                  "BX  lr     \n\t" : : "r" (topOfMainStack) );
                                             ^
../Libraries/CMSIS/core_cm3.c(495): note: attribute is here
void __set_MSP(uint32_t topOfMainStack) __attribute__( ( naked ) );
                                                         ^
../Libraries/CMSIS/core_cm3.c(509): warning: no previous prototype for function '__get_BASEPRI' [-Wmissing-prototypes]
uint32_t __get_BASEPRI(void)
         ^
../Libraries/CMSIS/core_cm3.c(509): note: declare 'static' if the function is not intended to be used outside of this translation unit
uint32_t __get_BASEPRI(void)
^
static
../Libraries/CMSIS/core_cm3.c(524): warning: no previous prototype for function '__set_BASEPRI' [-Wmissing-prototypes]
void __set_BASEPRI(uint32_t value)
     ^
../Libraries/CMSIS/core_cm3.c(524): note: declare 'static' if the function is not intended to be used outside of this translation unit
void __set_BASEPRI(uint32_t value)
^
static
../Libraries/CMSIS/core_cm3.c(536): warning: no previous prototype for function '__get_PRIMASK' [-Wmissing-prototypes]
uint32_t __get_PRIMASK(void)
         ^
../Libraries/CMSIS/core_cm3.c(536): note: declare 'static' if the function is not intended to be used outside of this translation unit
uint32_t __get_PRIMASK(void)
^
static
../Libraries/CMSIS/core_cm3.c(551): warning: no previous prototype for function '__set_PRIMASK' [-Wmissing-prototypes]
void __set_PRIMASK(uint32_t priMask)
     ^
../Libraries/CMSIS/core_cm3.c(551): note: declare 'static' if the function is not intended to be used outside of this translation unit
void __set_PRIMASK(uint32_t priMask)
^
static
../Libraries/CMSIS/core_cm3.c(563): warning: no previous prototype for function '__get_FAULTMASK' [-Wmissing-prototypes]
uint32_t __get_FAULTMASK(void)
         ^
../Libraries/CMSIS/core_cm3.c(563): note: declare 'static' if the function is not intended to be used outside of this translation unit
uint32_t __get_FAULTMASK(void)
^
static
../Libraries/CMSIS/core_cm3.c(578): warning: no previous prototype for function '__set_FAULTMASK' [-Wmissing-prototypes]
void __set_FAULTMASK(uint32_t faultMask)
     ^
../Libraries/CMSIS/core_cm3.c(578): note: declare 'static' if the function is not intended to be used outside of this translation unit
void __set_FAULTMASK(uint32_t faultMask)
^
static
../Libraries/CMSIS/core_cm3.c(590): warning: no previous prototype for function '__get_CONTROL' [-Wmissing-prototypes]
uint32_t __get_CONTROL(void)
         ^
../Libraries/CMSIS/core_cm3.c(590): note: declare 'static' if the function is not intended to be used outside of this translation unit
uint32_t __get_CONTROL(void)
^
static
../Libraries/CMSIS/core_cm3.c(605): warning: no previous prototype for function '__set_CONTROL' [-Wmissing-prototypes]
void __set_CONTROL(uint32_t control)
     ^
../Libraries/CMSIS/core_cm3.c(605): note: declare 'static' if the function is not intended to be used outside of this translation unit
void __set_CONTROL(uint32_t control)
^
static
../Libraries/CMSIS/core_cm3.c(619): warning: no previous prototype for function '__REV' [-Wmissing-prototypes]
uint32_t __REV(uint32_t value)
         ^
../Libraries/CMSIS/core_cm3.c(619): note: declare 'static' if the function is not intended to be used outside of this translation unit
uint32_t __REV(uint32_t value)
^
static
../Libraries/CMSIS/core_cm3.c(635): warning: no previous prototype for function '__REV16' [-Wmissing-prototypes]
uint32_t __REV16(uint16_t value)
         ^
../Libraries/CMSIS/core_cm3.c(635): note: declare 'static' if the function is not intended to be used outside of this translation unit
uint32_t __REV16(uint16_t value)
^
static
../Libraries/CMSIS/core_cm3.c(656): warning: implicit conversion changes signedness: 'uint32_t' (aka 'unsigned int') to 'int32_t' (aka 'int') [-Wsign-conversion]
  return(result);
  ~~~~~~ ^~~~~~
../Libraries/CMSIS/core_cm3.c(651): warning: no previous prototype for function '__REVSH' [-Wmissing-prototypes]
int32_t __REVSH(int16_t value)
        ^
../Libraries/CMSIS/core_cm3.c(651): note: declare 'static' if the function is not intended to be used outside of this translation unit
int32_t __REVSH(int16_t value)
^
static
../Libraries/CMSIS/core_cm3.c(667): warning: no previous prototype for function '__RBIT' [-Wmissing-prototypes]
uint32_t __RBIT(uint32_t value)
         ^
../Libraries/CMSIS/core_cm3.c(667): note: declare 'static' if the function is not intended to be used outside of this translation unit
uint32_t __RBIT(uint32_t value)
^
static
../Libraries/CMSIS/core_cm3.c(683): warning: no previous prototype for function '__LDREXB' [-Wmissing-prototypes]
uint8_t __LDREXB(uint8_t *addr)
        ^
../Libraries/CMSIS/core_cm3.c(683): note: declare 'static' if the function is not intended to be used outside of this translation unit
uint8_t __LDREXB(uint8_t *addr)
^
static
../Libraries/CMSIS/core_cm3.c(699): warning: no previous prototype for function '__LDREXH' [-Wmissing-prototypes]
uint16_t __LDREXH(uint16_t *addr)
         ^
../Libraries/CMSIS/core_cm3.c(699): note: declare 'static' if the function is not intended to be used outside of this translation unit
uint16_t __LDREXH(uint16_t *addr)
^
static
../Libraries/CMSIS/core_cm3.c(715): warning: no previous prototype for function '__LDREXW' [-Wmissing-prototypes]
uint32_t __LDREXW(uint32_t *addr)
         ^
../Libraries/CMSIS/core_cm3.c(715): note: declare 'static' if the function is not intended to be used outside of this translation unit
uint32_t __LDREXW(uint32_t *addr)
^
static
../Libraries/CMSIS/core_cm3.c(732): warning: no previous prototype for function '__STREXB' [-Wmissing-prototypes]
uint32_t __STREXB(uint8_t value, uint8_t *addr)
         ^
../Libraries/CMSIS/core_cm3.c(732): note: declare 'static' if the function is not intended to be used outside of this translation unit
uint32_t __STREXB(uint8_t value, uint8_t *addr)
^
static
../Libraries/CMSIS/core_cm3.c(749): warning: no previous prototype for function '__STREXH' [-Wmissing-prototypes]
uint32_t __STREXH(uint16_t value, uint16_t *addr)
         ^
../Libraries/CMSIS/core_cm3.c(749): note: declare 'static' if the function is not intended to be used outside of this translation unit
uint32_t __STREXH(uint16_t value, uint16_t *addr)
^
static
../Libraries/CMSIS/core_cm3.c(766): warning: no previous prototype for function '__STREXW' [-Wmissing-prototypes]
uint32_t __STREXW(uint32_t value, uint32_t *addr)
         ^
../Libraries/CMSIS/core_cm3.c(766): note: declare 'static' if the function is not intended to be used outside of this translation unit
uint32_t __STREXW(uint32_t value, uint32_t *addr)
^
static
19 warnings and 4 errors generated.
compiling core_cm3.c...
../Libraries/STM32F10x_StdPeriph_Driver/src/misc.c(24): warning: In file included from...
../Libraries/STM32F10x_StdPeriph_Driver/inc\misc.h(32): warning: In file included from...
../Libraries/CMSIS\stm32f10x.h(478): warning: In file included from...
../Libraries/CMSIS/core_cm3.h(1720): warning: function 'NVIC_SystemReset' could be declared with attribute 'noreturn' [-Wmissing-noreturn]
{
^
../Libraries/STM32F10x_StdPeriph_Driver/src/misc.c(132): warning: implicit conversion loses integer precision: 'uint32_t' (aka 'unsigned int') to 'uint8_t' (aka 'unsigned char') [-Wimplicit-int-conversion]
    NVIC->IP[NVIC_InitStruct->NVIC_IRQChannel] = tmppriority;
                                               ~ ^~~~~~~~~~~
2 warnings generated.
compiling misc.c...
../Libraries/CMSIS/system_stm32f10x.c(65): warning: In file included from...
../Libraries/CMSIS/stm32f10x.h(478): warning: In file included from...
../Libraries/CMSIS/core_cm3.h(1720): warning: function 'NVIC_SystemReset' could be declared with attribute 'noreturn' [-Wmissing-noreturn]
{
^
../Libraries/CMSIS/system_stm32f10x.c(167): warning: no previous extern declaration for non-static variable 'AHBPrescTable' [-Wmissing-variable-declarations]
__I uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};
            ^
../Libraries/CMSIS/system_stm32f10x.c(167): note: declare 'static' if the variable is not intended to be used outside of this translation unit
__I uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};
    ^
2 warnings generated.
compiling system_stm32f10x.c...
../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_bkp.c(23): warning: In file included from...
../Libraries/STM32F10x_StdPeriph_Driver/inc\stm32f10x_bkp.h(32): warning: In file included from...
../Libraries/CMSIS\stm32f10x.h(478): warning: In file included from...
../Libraries/CMSIS/core_cm3.h(1720): warning: function 'NVIC_SystemReset' could be declared with attribute 'noreturn' [-Wmissing-noreturn]
{
^
1 warning generated.
compiling stm32f10x_bkp.c...
../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_cec.c(23): warning: In file included from...
../Libraries/STM32F10x_StdPeriph_Driver/inc\stm32f10x_cec.h(32): warning: In file included from...
../Libraries/CMSIS\stm32f10x.h(478): warning: In file included from...
../Libraries/CMSIS/core_cm3.h(1720): warning: function 'NVIC_SystemReset' could be declared with attribute 'noreturn' [-Wmissing-noreturn]
{
^
../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_cec.c(145): warning: implicit conversion loses integer precision: 'volatile uint32_t' (aka 'volatile unsigned int') to 'uint16_t' (aka 'unsigned short') [-Wimplicit-int-conversion]
  tmpreg = CEC->CFGR;
         ~ ~~~~~^~~~
2 warnings generated.
compiling stm32f10x_cec.c...
../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_adc.c(23): warning: In file included from...
../Libraries/STM32F10x_StdPeriph_Driver/inc\stm32f10x_adc.h(32): warning: In file included from...
../Libraries/CMSIS\stm32f10x.h(478): warning: In file included from...
../Libraries/CMSIS/core_cm3.h(1720): warning: function 'NVIC_SystemReset' could be declared with attribute 'noreturn' [-Wmissing-noreturn]
{
^
../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_adc.c(23): warning: In file included from...
../Libraries/STM32F10x_StdPeriph_Driver/inc\stm32f10x_adc.h(64): warning: padding struct 'ADC_InitTypeDef' with 2 bytes to align 'ADC_ExternalTrigConv' [-Wpadded]
  uint32_t ADC_ExternalTrigConv;          /*!< Defines the external trigger used to start the analog
           ^
../Libraries/STM32F10x_StdPeriph_Driver/inc\stm32f10x_adc.h(50): warning: padding size of 'ADC_InitTypeDef' with 3 bytes to alignment boundary [-Wpadded]
typedef struct
        ^
3 warnings generated.
compiling stm32f10x_adc.c...
../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_can.c(23): warning: In file included from...
../Libraries/STM32F10x_StdPeriph_Driver/inc\stm32f10x_can.h(32): warning: In file included from...
../Libraries/CMSIS\stm32f10x.h(478): warning: In file included from...
../Libraries/CMSIS/core_cm3.h(1720): warning: function 'NVIC_SystemReset' could be declared with attribute 'noreturn' [-Wmissing-noreturn]
{
^
../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_can.c(23): warning: In file included from...
../Libraries/STM32F10x_StdPeriph_Driver/inc\stm32f10x_can.h(145): warning: padding size of 'CanTxMsg' with 1 byte to alignment boundary [-Wpadded]
typedef struct
        ^
2 warnings generated.
compiling stm32f10x_can.c...
../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_crc.c(23): warning: In file included from...
../Libraries/STM32F10x_StdPeriph_Driver/inc\stm32f10x_crc.h(32): warning: In file included from...
../Libraries/CMSIS\stm32f10x.h(478): warning: In file included from...
../Libraries/CMSIS/core_cm3.h(1720): warning: function 'NVIC_SystemReset' could be declared with attribute 'noreturn' [-Wmissing-noreturn]
{
^
1 warning generated.
compiling stm32f10x_crc.c...
../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_dac.c(23): warning: In file included from...
../Libraries/STM32F10x_StdPeriph_Driver/inc\stm32f10x_dac.h(32): warning: In file included from...
../Libraries/CMSIS\stm32f10x.h(478): warning: In file included from...
../Libraries/CMSIS/core_cm3.h(1720): warning: function 'NVIC_SystemReset' could be declared with attribute 'noreturn' [-Wmissing-noreturn]
{
^
1 warning generated.
compiling stm32f10x_dac.c...
../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_dbgmcu.c(23): warning: In file included from...
../Libraries/STM32F10x_StdPeriph_Driver/inc\stm32f10x_dbgmcu.h(32): warning: In file included from...
../Libraries/CMSIS\stm32f10x.h(478): warning: In file included from...
../Libraries/CMSIS/core_cm3.h(1720): warning: function 'NVIC_SystemReset' could be declared with attribute 'noreturn' [-Wmissing-noreturn]
{
^
1 warning generated.
compiling stm32f10x_dbgmcu.c...
../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_dma.c(23): warning: In file included from...
../Libraries/STM32F10x_StdPeriph_Driver/inc\stm32f10x_dma.h(32): warning: In file included from...
../Libraries/CMSIS\stm32f10x.h(478): warning: In file included from...
../Libraries/CMSIS/core_cm3.h(1720): warning: function 'NVIC_SystemReset' could be declared with attribute 'noreturn' [-Wmissing-noreturn]
{
^
1 warning generated.
compiling stm32f10x_dma.c...
../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_exti.c(23): warning: In file included from...
../Libraries/STM32F10x_StdPeriph_Driver/inc\stm32f10x_exti.h(32): warning: In file included from...
../Libraries/CMSIS\stm32f10x.h(478): warning: In file included from...
../Libraries/CMSIS/core_cm3.h(1720): warning: function 'NVIC_SystemReset' could be declared with attribute 'noreturn' [-Wmissing-noreturn]
{
^
../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_exti.c(23): warning: In file included from...
../Libraries/STM32F10x_StdPeriph_Driver/inc\stm32f10x_exti.h(76): warning: padding size of 'EXTI_InitTypeDef' with 1 byte to alignment boundary [-Wpadded]
typedef struct
        ^
2 warnings generated.
compiling stm32f10x_exti.c...
../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_gpio.c(23): warning: In file included from...
../Libraries/STM32F10x_StdPeriph_Driver/inc\stm32f10x_gpio.h(32): warning: In file included from...
../Libraries/CMSIS\stm32f10x.h(478): warning: In file included from...
../Libraries/CMSIS/core_cm3.h(1720): warning: function 'NVIC_SystemReset' could be declared with attribute 'noreturn' [-Wmissing-noreturn]
{
^
1 warning generated.
compiling stm32f10x_gpio.c...
../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_flash.c(23): warning: In file included from...
../Libraries/STM32F10x_StdPeriph_Driver/inc\stm32f10x_flash.h(32): warning: In file included from...
../Libraries/CMSIS\stm32f10x.h(478): warning: In file included from...
../Libraries/CMSIS/core_cm3.h(1720): warning: function 'NVIC_SystemReset' could be declared with attribute 'noreturn' [-Wmissing-noreturn]
{
^
1 warning generated.
compiling stm32f10x_flash.c...
../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_fsmc.c(23): warning: In file included from...
../Libraries/STM32F10x_StdPeriph_Driver/inc\stm32f10x_fsmc.h(32): warning: In file included from...
../Libraries/CMSIS\stm32f10x.h(478): warning: In file included from...
../Libraries/CMSIS/core_cm3.h(1720): warning: function 'NVIC_SystemReset' could be declared with attribute 'noreturn' [-Wmissing-noreturn]
{
^
1 warning generated.
compiling stm32f10x_fsmc.c...
../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_iwdg.c(23): warning: In file included from...
../Libraries/STM32F10x_StdPeriph_Driver/inc\stm32f10x_iwdg.h(32): warning: In file included from...
../Libraries/CMSIS\stm32f10x.h(478): warning: In file included from...
../Libraries/CMSIS/core_cm3.h(1720): warning: function 'NVIC_SystemReset' could be declared with attribute 'noreturn' [-Wmissing-noreturn]
{
^
1 warning generated.
compiling stm32f10x_iwdg.c...
../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_pwr.c(23): warning: In file included from...
../Libraries/STM32F10x_StdPeriph_Driver/inc\stm32f10x_pwr.h(32): warning: In file included from...
../Libraries/CMSIS\stm32f10x.h(478): warning: In file included from...
../Libraries/CMSIS/core_cm3.h(1720): warning: function 'NVIC_SystemReset' could be declared with attribute 'noreturn' [-Wmissing-noreturn]
{
^
1 warning generated.
compiling stm32f10x_pwr.c...
../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_i2c.c(23): warning: In file included from...
../Libraries/STM32F10x_StdPeriph_Driver/inc\stm32f10x_i2c.h(32): warning: In file included from...
../Libraries/CMSIS\stm32f10x.h(478): warning: In file included from...
../Libraries/CMSIS/core_cm3.h(1720): warning: function 'NVIC_SystemReset' could be declared with attribute 'noreturn' [-Wmissing-noreturn]
{
^
../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_i2c.c(23): warning: In file included from...
../Libraries/STM32F10x_StdPeriph_Driver/inc\stm32f10x_i2c.h(50): warning: padding size of 'I2C_InitTypeDef' with 2 bytes to alignment boundary [-Wpadded]
typedef struct
        ^
2 warnings generated.
compiling stm32f10x_i2c.c...
../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_rcc.c(23): warning: In file included from...
../Libraries/STM32F10x_StdPeriph_Driver/inc\stm32f10x_rcc.h(32): warning: In file included from...
../Libraries/CMSIS\stm32f10x.h(478): warning: In file included from...
../Libraries/CMSIS/core_cm3.h(1720): warning: function 'NVIC_SystemReset' could be declared with attribute 'noreturn' [-Wmissing-noreturn]
{
^
1 warning generated.
compiling stm32f10x_rcc.c...
../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_rtc.c(23): warning: In file included from...
../Libraries/STM32F10x_StdPeriph_Driver/inc\stm32f10x_rtc.h(32): warning: In file included from...
../Libraries/CMSIS\stm32f10x.h(478): warning: In file included from...
../Libraries/CMSIS/core_cm3.h(1720): warning: function 'NVIC_SystemReset' could be declared with attribute 'noreturn' [-Wmissing-noreturn]
{
^
1 warning generated.
compiling stm32f10x_rtc.c...
../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_sdio.c(23): warning: In file included from...
../Libraries/STM32F10x_StdPeriph_Driver/inc\stm32f10x_sdio.h(32): warning: In file included from...
../Libraries/CMSIS\stm32f10x.h(478): warning: In file included from...
../Libraries/CMSIS/core_cm3.h(1720): warning: function 'NVIC_SystemReset' could be declared with attribute 'noreturn' [-Wmissing-noreturn]
{
^
../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_sdio.c(23): warning: In file included from...
../Libraries/STM32F10x_StdPeriph_Driver/inc\stm32f10x_sdio.h(46): warning: padding size of 'SDIO_InitTypeDef' with 3 bytes to alignment boundary [-Wpadded]
typedef struct
        ^
2 warnings generated.
compiling stm32f10x_sdio.c...
../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_spi.c(23): warning: In file included from...
../Libraries/STM32F10x_StdPeriph_Driver/inc\stm32f10x_spi.h(32): warning: In file included from...
../Libraries/CMSIS\stm32f10x.h(478): warning: In file included from...
../Libraries/CMSIS/core_cm3.h(1720): warning: function 'NVIC_SystemReset' could be declared with attribute 'noreturn' [-Wmissing-noreturn]
{
^
../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_spi.c(23): warning: In file included from...
../Libraries/STM32F10x_StdPeriph_Driver/inc\stm32f10x_spi.h(87): warning: padding size of 'I2S_InitTypeDef' with 2 bytes to alignment boundary [-Wpadded]
typedef struct
        ^
../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_spi.c(494): warning: implicit conversion loses integer precision: 'int' to 'uint16_t' (aka 'unsigned short') [-Wimplicit-int-conversion]
  itmask = (uint16_t)1 << (uint16_t)itpos;
         ~ ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_spi.c(839): warning: implicit conversion loses integer precision: 'int' to 'uint16_t' (aka 'unsigned short') [-Wimplicit-int-conversion]
  itpos = 0x01 << (SPI_I2S_IT & 0x0F);
        ~ ~~~~~^~~~~~~~~~~~~~~~~~~~~~
../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_spi.c(845): warning: implicit conversion loses integer precision: 'int' to 'uint16_t' (aka 'unsigned short') [-Wimplicit-int-conversion]
  itmask = 0x01 << itmask;
         ~ ~~~~~^~~~~~~~~
../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_spi.c(891): warning: implicit conversion loses integer precision: 'int' to 'uint16_t' (aka 'unsigned short') [-Wimplicit-int-conversion]
  itpos = 0x01 << (SPI_I2S_IT & 0x0F);
        ~ ~~~~~^~~~~~~~~~~~~~~~~~~~~~
6 warnings generated.
compiling stm32f10x_spi.c...
../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_wwdg.c(23): warning: In file included from...
../Libraries/STM32F10x_StdPeriph_Driver/inc\stm32f10x_wwdg.h(32): warning: In file included from...
../Libraries/CMSIS\stm32f10x.h(478): warning: In file included from...
../Libraries/CMSIS/core_cm3.h(1720): warning: function 'NVIC_SystemReset' could be declared with attribute 'noreturn' [-Wmissing-noreturn]
{
^
1 warning generated.
compiling stm32f10x_wwdg.c...
../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_usart.c(23): warning: In file included from...
../Libraries/STM32F10x_StdPeriph_Driver/inc\stm32f10x_usart.h(32): warning: In file included from...
../Libraries/CMSIS\stm32f10x.h(478): warning: In file included from...
../Libraries/CMSIS/core_cm3.h(1720): warning: function 'NVIC_SystemReset' could be declared with attribute 'noreturn' [-Wmissing-noreturn]
{
^
../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_usart.c(23): warning: In file included from...
../Libraries/STM32F10x_StdPeriph_Driver/inc\stm32f10x_usart.h(50): warning: padding size of 'USART_InitTypeDef' with 2 bytes to alignment boundary [-Wpadded]
typedef struct
        ^
../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_usart.c(1043): warning: implicit conversion loses integer precision: 'int' to 'uint16_t' (aka 'unsigned short') [-Wimplicit-int-conversion]
  itmask = ((uint16_t)0x01 << (uint16_t)bitpos);
         ~  ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
3 warnings generated.
compiling stm32f10x_usart.c...
../User/main.c(1): warning: In file included from...
../Libraries/CMSIS\stm32f10x.h(478): warning: In file included from...
../Libraries/CMSIS/core_cm3.h(1720): warning: function 'NVIC_SystemReset' could be declared with attribute 'noreturn' [-Wmissing-noreturn]
{
^
../User/main.c(6): warning: no newline at end of file [-Wnewline-eof]
}
^
2 warnings generated.
compiling main.c...
../User/stm32f10x_it.c(25): warning: In file included from...
../User/stm32f10x_it.h(31): warning: In file included from...
../Libraries/CMSIS\stm32f10x.h(478): warning: In file included from...
../Libraries/CMSIS/core_cm3.h(1720): warning: function 'NVIC_SystemReset' could be declared with attribute 'noreturn' [-Wmissing-noreturn]
{
^
../User/stm32f10x_it.c(57): warning: function 'HardFault_Handler' could be declared with attribute 'noreturn' [-Wmissing-noreturn]
{
^
../User/stm32f10x_it.c(70): warning: function 'MemManage_Handler' could be declared with attribute 'noreturn' [-Wmissing-noreturn]
{
^
../User/stm32f10x_it.c(83): warning: function 'BusFault_Handler' could be declared with attribute 'noreturn' [-Wmissing-noreturn]
{
^
../User/stm32f10x_it.c(96): warning: function 'UsageFault_Handler' could be declared with attribute 'noreturn' [-Wmissing-noreturn]
{
^
5 warnings generated.
compiling stm32f10x_it.c...
../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_tim.c(23): warning: In file included from...
../Libraries/STM32F10x_StdPeriph_Driver/inc\stm32f10x_tim.h(32): warning: In file included from...
../Libraries/CMSIS\stm32f10x.h(478): warning: In file included from...
../Libraries/CMSIS/core_cm3.h(1720): warning: function 'NVIC_SystemReset' could be declared with attribute 'noreturn' [-Wmissing-noreturn]
{
^
../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_tim.c(23): warning: In file included from...
../Libraries/STM32F10x_StdPeriph_Driver/inc\stm32f10x_tim.h(51): warning: padding size of 'TIM_TimeBaseInitTypeDef' with 1 byte to alignment boundary [-Wpadded]
typedef struct
        ^
../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_tim.c(726): warning: implicit conversion loses integer precision: 'unsigned int' to 'uint16_t' (aka 'unsigned short') [-Wimplicit-int-conversion]
             TIM_BDTRInitStruct->TIM_Break | TIM_BDTRInitStruct->TIM_BreakPolarity |
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_tim.c(1983): warning: implicit conversion loses integer precision: 'int' to 'uint16_t' (aka 'unsigned short') [-Wimplicit-int-conversion]
  tmp = CCER_CCE_Set << TIM_Channel;
      ~ ~~~~~~~~~~~~~^~~~~~~~~~~~~~
../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_tim.c(2013): warning: implicit conversion loses integer precision: 'int' to 'uint16_t' (aka 'unsigned short') [-Wimplicit-int-conversion]
  tmp = CCER_CCNE_Set << TIM_Channel;
      ~ ~~~~~~~~~~~~~~^~~~~~~~~~~~~~
../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_tim.c(2058): warning: implicit conversion loses integer precision: 'int' to 'uint16_t' (aka 'unsigned short') [-Wimplicit-int-conversion]
  tmp1 = CCER_CCE_Set << (uint16_t)TIM_Channel;
       ~ ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
6 warnings generated.
compiling stm32f10x_tim.c...
".\Objects\Fb-103.axf" - 4 Error(s), 71 Warning(s).
Target not created.
Build Time Elapsed:  00:00:02

回复

使用道具 举报

 楼主| 发表于 2020-6-17 08:58:49 | 显示全部楼层
不好意思各位,这个问题我已经解决了,没删掉这个帖子,所以问题来了,论坛里该怎么删除这个帖子呢?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

联系站长|手机版|野火电子官网|野火淘宝店铺|野火电子论坛 ( 粤ICP备14069197号 ) 大学生ARM嵌入式2群

GMT+8, 2024-11-25 19:50 , Processed in 0.027063 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表