2022-04-28 07:32 AM
Using an stm32f105RBt6 :
None of them work once i include FATfs+USBCDCdevice
i dont know what to make up from this, last time i had a similar error i had messed up my include logic.
Solved! Go to Solution.
2022-04-29 07:21 AM
Is this post really the best answer, or is it the post pointing out that you're missing a bracket and where specifically that bracket is?
2022-04-28 08:16 AM
If the compiler says MX_GPIO_Init isn't defined, it's probably not defined. Perhaps you are missing brackets. Hard to tell with the limited information you've provided. If you attach the full main.c file I'm sure the error will be spotted.
2022-04-28 08:20 AM
@TDK You were right, i checked and they are defined but for some reason the compiler throws this error.
Just to clarify, this are all generated by CubeMx i didnt touched them.
The error was not there before i tried to include FatFs (or i tried to include USBCDC in another working FatFs project)
I also checked the "expected declaration..." error, i didnt change anything at all.... i dont think cubeMx missed a ";"
2022-04-28 08:43 AM
You are missing a closing bracket in the USER CODE 3 section to close out the while loop.
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
TransmittingAtruntimeUSB(&htim7);
CANBUSfiletransfer();
/* USER CODE END 3 */
> Just to clarify, this are all generated by CubeMx i didnt touched them.
The content in the USER CODE sections contradicts this.
2022-04-28 11:59 PM
>You are missing a closing bracket in the USER CODE 3 section to close out the while loop.
Youre right!, i will review all brackets.....
> The content in the USER CODE sections contradicts this.
I didnt explain myself right:
2022-04-29 12:18 AM
found the issue, thanks for your help @TDK
I must had copy pasted at some point since the last cubeMx generation the label Inside the while(1) loop by mistake,
/* USER CODE END 3 */
this was confusing cubeMX
I removed the extra label and everything works
2022-04-29 07:21 AM
Is this post really the best answer, or is it the post pointing out that you're missing a bracket and where specifically that bracket is?
2022-05-02 06:14 AM
Maybe i didnt explained myself correctly, i didnt missed any brakets.
As i explained in the previous comment :
with all the brakets in its correct place ...i accidentaly duplicated the comment label
/* USER CODE END 3 */
This made the autogeneration from cubeMx confused and *ate* the last main() closing braket every time i tried to autogenerate the code.
Im thankfull for you help @TDK