cancel
Showing results for 
Search instead for 
Did you mean: 

I need help on grayed out part of the code

demir
Senior II

Hello All,

I am working on open bootloader. I have copied all required files. When I compile the code on demo project provided by open bootloader, it works just fine. On the other hand, when I compile on my own project, I get the following error.

I have compared files and I have noticed that even though I have copied the exact same files, my file has grayed out parts, unlikely to the original file. How can I make the grayed out part seen as normal (white) ?

Could you please guide me with that ?

 

demir_0-1706380145249.png

 

 

 

/Loader/ARMCM4_STM32F4/rs232.c:89:3: error: unknown type name 'LL_USART_InitTypeDef'; did you mean 'UART_InitTypeDef'?

89 | LL_USART_InitTypeDef USART_InitStruct;

| ^~~~~~~~~~~~~~~~~~~~

| UART_InitTypeDef

../Loader/ARMCM4_STM32F4/rs232.c:106:19: error: request for member 'BaudRate' in something not a structure or union

106 | USART_InitStruct.BaudRate = BOOT_COM_RS232_BAUDRATE;

| ^

../Loader/ARMCM4_STM32F4/rs232.c:107:19: error: request for member 'DataWidth' in something not a structure or union

107 | USART_InitStruct.DataWidth = LL_USART_DATAWIDTH_8B;

| ^

../Loader/ARMCM4_STM32F4/rs232.c:108:19: error: request for member 'StopBits' in something not a structure or union

108 | USART_InitStruct.StopBits = LL_USART_STOPBITS_1;

| ^

../Loader/ARMCM4_STM32F4/rs232.c:109:19: error: request for member 'Parity' in something not a structure or union

109 | USART_InitStruct.Parity = LL_USART_PARITY_NONE;

| ^

../Loader/ARMCM4_STM32F4/rs232.c:110:19: error: request for member 'TransferDirection' in something not a structure or union

110 | USART_InitStruct.TransferDirection = LL_USART_DIRECTION_TX_RX;

| ^

../Loader/ARMCM4_STM32F4/rs232.c:111:19: error: request for member 'HardwareFlowControl' in something not a structure or union

111 | USART_InitStruct.HardwareFlowControl = LL_USART_HWCONTROL_NONE;

| ^

../Loader/ARMCM4_STM32F4/rs232.c:112:19: error: request for member 'OverSampling' in something not a structure or union

112 | USART_InitStruct.OverSampling = LL_USART_OVERSAMPLING_16;

| ^

../Loader/ARMCM4_STM32F4/rs232.c:114:3: warning: implicit declaration of function 'LL_USART_Init'; did you mean 'HAL_UART_Init'? [-Wimplicit-function-declaration]

114 | LL_USART_Init(USART_CHANNEL, &USART_InitStruct);

| ^~~~~~~~~~~~~

| HAL_UART_Init

make: *** [Loader/ARMCM4_STM32F4/subdir.mk:37: Loader/ARMCM4_STM32F4/rs232.o] Error 1

make: *** Waiting for unfinished jobs....

1 ACCEPTED SOLUTION

Accepted Solutions

Hi,

I have found the issue. The copy is correct actually, but the build settings are different. So, the solution is to add USE_FULL_LL_DRIVER into project --> properties --> settings --> C/C++ Build --> settings --> MCU GCC Compiler --> Preprocessor --> Define symbols (-D). Click Add, and type USE_FULL_LL_DRIVER.

 

demir_0-1706385569241.png

 

View solution in original post

2 REPLIES 2
AScha.3
Chief

Hi,

seems in your copy missing the define:

#define USE_FULL_LL_DRIVER

 

If you feel a post has answered your question, please click "Accept as Solution".

Hi,

I have found the issue. The copy is correct actually, but the build settings are different. So, the solution is to add USE_FULL_LL_DRIVER into project --> properties --> settings --> C/C++ Build --> settings --> MCU GCC Compiler --> Preprocessor --> Define symbols (-D). Click Add, and type USE_FULL_LL_DRIVER.

 

demir_0-1706385569241.png