使用 stm32 srand time 报错

2019-08-17 06:57发布


#include <string.h>
#include<stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>


        srand(time(0));
       
        Controller_Param[3]='Z'*256+'N';
        Controller_Param[4]=( rand()%10 +48 )*256 + rand()%10 +48;
        Controller_Param[5]=( rand()%10 +48 )*256 + rand()%10 +48;
        Controller_Param[6]=( rand()%10 +48 )*256 + rand()%10 +48;;
        Controller_Param[7]=( rand()%10 +48 )*256 + rand()%26 +65;;


.OBJ est.axf: Error: L6915E: Library reports error: __use_no_semihosting was requested, but time was referenced
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。