cancel
Showing results for 
Search instead for 
Did you mean: 

Hi guys, unfortunately, I did something that I can not spot in my project and it is not compiling anymore. cubmixIDE is saying that: "undefined reference to `HAL_UART_Transmit'" anytime I'm using `HAL_UART_Transmit'.

Gbasi.1
Associate II

as people told me, i looked on "makefile" vs last version "makefile" to see any change but i couldnt spot one.

I did all necessary "#incuded" on top of the class.

I'v attached the problematic part:

#include "main.h"
#include <string.h>
#include <stdbool.h>
#include <stdio.h>
#include <time.h>
#include <uart_comm.h>
 
#include "spi.h"
#include "control.h"
#include "flash.h"
#include "comm.h"
#include "func.h"
 
#include "STM32L4xx_HAL_UART.h"
 
int atoi(char* );
void delay1u(int);
void delay1m(int);
 
char string[8];
GPIO_TypeDef* GPIOx;
uint16_t raw;
char msg[10];
bool start= false;
int freqdiv=1;
uint16_t rx_data;
 
UART_HandleTypeDef huart1;
 
uint8_t rx_index = 0;
 
bool in_ques=false, spi_w=false, spi_r=false, tim=false,SendToComm=false;
 
void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart){
	if (huart -> Instance == USART1){
	HAL_UART_Transmit(&huart1, &rx_data, 1,100);
		if (rx_data==0)for (int i = 0 ; i<20; i++)rx_buffer[i]=0;
	else if (rx_data != 13){rx_buffer[rx_index++]= rx_data;}
		else {  mymemcpy(InputMsg,rx_buffer,21); InputMsgProcess();}
		rx_index=0;
		char *p=rx_buffer, *s = InputMsg;
		REGnumber=0;
		while (*p++ || *s++) { // While there are more characters to process...
			rx_buffer[rx_index++]='\0'; InputMsg[rx_index]='\0';}
		rx_index=0;
	}
	HAL_UART_Receive_IT(&huart1, &rx_data,1);
 
}

3 REPLIES 3
Khouloud ZEMMELI
ST Employee

Hello @Gbasi.1​ ,

I want to ask you about the problem related to :  cubmixIDE is saying that: "undefined reference to `HAL_UART_Transmit'" anytime I'm using `HAL_UART_Transmit'.

Could you please share you ioc File where this error message appears ?

Thanks

Khouloud

Gbasi.1
Associate II

problem is not in IOC file. but i will share it anyway the problem accrue in the c file as I attached above.

here i show it in picture:

0693W000005A9i7QAC.png

Gbasi.1
Associate II

0693W000005A9kIQAS.pngthat the IOC pic