2016-11-28 08:49 PM
Dear Sir,
I want to disable DMA module application from my project.Is there any relation it with flash module?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 undefinedAccording to document UM1749, HAL_LockTypeDef is basically use in data field.Dont you think, this error generates because of disabling DMA module?Is there any other way to deactivate it?Thank you .RegardsHasan2016-11-29 01:25 AM
Hi Hasa,
As indicated in the same file , the DMA module is enabled to include the relevant header :''#ifdef HAL_DMA_MODULE_ENABLED #include ''stm32f0xx_hal_dma.h''''when DMA module is not enabled, the header will not included which may causes errors due to the existing DMA code. Ti avoid this error you should delet all related DMA conde (defines, structures, functions..)-Hannibal-2016-11-29 05:57 PM
Dear Sir Hannboi,
I do appreciate your suggestion.My application is not much wide, I want to delete DMA and I2C part.I did inactive in this way, //#ifdef HAL_DMA_MODULE_ENABLED // #include ''stm32f0xx_hal_dma.h'' At the beggining of this fille, #define are inactivate using /*, am I wrong ?Even I did so, there is no change on the build output !For your kind information, I did 1. This code was build in Coo-cox environment, I have modified some of its part after changing its main MCU pinout in cubemx.2. What I have modified is, its tim.h. spi.h, gpio.h, files combine in one main.c file. Remove I2C h file. some time I did #include #define. 3. Make changes in mxconstant.h file, as we changes GPIO in cubemx.Do you feel mdk keil making problem in creating folder, take a look this project tree.2016-12-10 10:38 AM
Most linkers have option to automatically remove from the final flash memory any function that is not used (no reference or no pointer to it).
You can check this in the optionally generated MAP file by the linker. The code size of the module that is not used should show 0 bytes of flash. Otherwise, look into the *_hal_conf.h file if present in the workspace.
2016-12-11 10:01 PM
Dear Sir Marsanne,
Thank you for texting here.
It was a problem where I was trying to build my custom stm project in mdk-keil.
Things we avoided, due to compiler did not compile files from Visual studio.
Keep in touch, this cause may arise in Eclipse again.