This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Mdk-keil conflicts with cubemx and HAL

Hello Everyone,
I am working in following environment,

IDE-Version:
µVision V5.22.0.0
Tool Version Numbers:
Toolchain: MDK-ARM Cortex-M0/M0+ 256K for ST Version: 5.22

We have a custom board with centered MCU STM32F070RBTx.
This is not an example code, my company made it before, I need to mordarate it.
This code was build in Coo-cox environment, I have modified some of its part after changing its main MCU pinout in cubemx.

In pre processor setting, its written -c --cpu Cortex-M0 -D__RTX -g -O3 --apcs=interwork --split_sections --asm --interleave --asm_dir ".\\" -I ../Inc -I ../Drivers/STM32F0xx_HAL_Driver/Inc -I
I am using --C99 control, not C99 mode.

After setting things in mdk-keil, I am having the following ,

1.One very unknown sign appears in my main.c, at condition, if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK),
The system says," implicit declaration of function HAL_RCC_OscConfig that is invalid in C99"

2. ../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_rcc_ex.h(2051): error: #20: identifier "HAL_StatusTypeDef" is undefined....what kind of error is it?
should I have to define HAL_StatusTypeDef any other place ?

3. ../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_i2c.h(216): error: #90: function returning function is not allowed.....kindly tell me why this is coming?

4. I have tried to change /*#define HAL_DMA_MODULE_ENABLED, but still build error log says,

../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_dma.h(134): error: #20: identifier "HAL_LockTypeDef" is undefined

Seems like all errors coming from HAL driver that is automatically generate in MDK keil or those typical errors are coming from mismatching of cubemx code and mxcontants.h. I was trying to look up the settings in stm32f0xx_hal_conf.h, activate and inactivated some HAL_MODULE, seems like these are conflicting with other constant exists elsewhere.

Help me please.

Regards
Hasan