Jump to content

Recommended Posts

Posted

Hi everyone, I am facing a issue to compile ugfx library code with KEIL MDK 5. I don't know why the drivers provide by ugfx for STM32f7 coudn't work well with stm32 cube .h files..

Here I attach my compile error for more understanding everyone.

../Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_gpio.h(256): error:  #20: identifier "HAL_StatusTypeDef" is undefined
  HAL_StatusTypeDef HAL_GPIO_LockPin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin);
../Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_dma.h(162): error:  #20: identifier "HAL_LockTypeDef" is undefined
    HAL_LockTypeDef            Lock;                                                         /*!< DMA locking object                     */  
../Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_dma_ex.h(130): error:  #20: identifier "HAL_StatusTypeDef" is undefined
  HAL_StatusTypeDef HAL_DMAEx_MultiBufferStart(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t SecondMemAddress, uint32_t DataLength);
../Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_dma_ex.h(131): error:  #20: identifier "HAL_StatusTypeDef" is undefined
  HAL_StatusTypeDef HAL_DMAEx_MultiBufferStart_IT(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t SecondMemAddress, uint32_t DataLength);
../Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_dma_ex.h(132): error:  #20: identifier "HAL_StatusTypeDef" is undefined
  HAL_StatusTypeDef HAL_DMAEx_ChangeMemory(DMA_HandleTypeDef *hdma, uint32_t Address, HAL_DMA_MemoryTypeDef memory);
../Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_dma.h(645): error:  #20: identifier "HAL_StatusTypeDef" is undefined
  HAL_StatusTypeDef HAL_DMA_Init(DMA_HandleTypeDef *hdma); 
../Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_dma.h(646): error:  #20: identifier "HAL_StatusTypeDef" is undefined
  HAL_StatusTypeDef HAL_DMA_DeInit(DMA_HandleTypeDef *hdma);
../Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_dma.h(655): error:  #20: identifier "HAL_StatusTypeDef" is undefined
  HAL_StatusTypeDef HAL_DMA_Start (DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t DataLength);
../Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_dma.h(656): error:  #20: identifier "HAL_StatusTypeDef" is undefined
  HAL_StatusTypeDef HAL_DMA_Start_IT(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t DataLength);
../Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_dma.h(657): error:  #20: identifier "HAL_StatusTypeDef" is undefined
  HAL_StatusTypeDef HAL_DMA_Abort(DMA_HandleTypeDef *hdma);
../Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_dma.h(658): error:  #20: identifier "HAL_StatusTypeDef" is undefined
  HAL_StatusTypeDef HAL_DMA_Abort_IT(DMA_HandleTypeDef *hdma);
../Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_dma.h(659): error:  #20: identifier "HAL_StatusTypeDef" is undefined
  HAL_StatusTypeDef HAL_DMA_PollForTransfer(DMA_HandleTypeDef *hdma, HAL_DMA_LevelCompleteTypeDef CompleteLevel, uint32_t Timeout);
../Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_dma.h(661): error:  #20: identifier "HAL_StatusTypeDef" is undefined
  HAL_StatusTypeDef HAL_DMA_CleanCallbacks(DMA_HandleTypeDef *hdma);
../Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_dma.h(662): error:  #20: identifier "HAL_StatusTypeDef" is undefined
  HAL_StatusTypeDef HAL_DMA_RegisterCallback(DMA_HandleTypeDef *hdma, HAL_DMA_CallbackIDTypeDef CallbackID, void (* pCallback)(DMA_HandleTypeDef *_hdma));
../Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_dma.h(663): error:  #20: identifier "HAL_StatusTypeDef" is undefined
  HAL_StatusTypeDef HAL_DMA_UnRegisterCallback(DMA_HandleTypeDef *hdma, HAL_DMA_CallbackIDTypeDef CallbackID);
../Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_adc.h(220): error:  #20: identifier "HAL_LockTypeDef" is undefined
    HAL_LockTypeDef               Lock;                        /*!< ADC locking object */
../Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_adc_ex.h(258): error:  #20: identifier "HAL_StatusTypeDef" is undefined
  HAL_StatusTypeDef HAL_ADCEx_InjectedStart(ADC_HandleTypeDef* hadc);
../Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_adc_ex.h(259): error:  #20: identifier "HAL_StatusTypeDef" is undefined
  HAL_StatusTypeDef HAL_ADCEx_InjectedStop(ADC_HandleTypeDef* hadc);
../Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_adc_ex.h(260): error:  #20: identifier "HAL_StatusTypeDef" is undefined
  HAL_StatusTypeDef HAL_ADCEx_InjectedPollForConversion(ADC_HandleTypeDef* hadc, uint32_t Timeout);
../Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_adc_ex.h(261): error:  #20: identifier "HAL_StatusTypeDef" is undefined
  HAL_StatusTypeDef HAL_ADCEx_InjectedStart_IT(ADC_HandleTypeDef* hadc);
../Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_adc_ex.h(262): error:  #20: identifier "HAL_StatusTypeDef" is undefined
  HAL_StatusTypeDef HAL_ADCEx_InjectedStop_IT(ADC_HandleTypeDef* hadc);
../Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_adc_ex.h(264): error:  #20: identifier "HAL_StatusTypeDef" is undefined
  HAL_StatusTypeDef HAL_ADCEx_MultiModeStart_DMA(ADC_HandleTypeDef* hadc, uint32_t* pData, uint32_t Length);
../Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_adc_ex.h(265): error:  #20: identifier "HAL_StatusTypeDef" is undefined
  HAL_StatusTypeDef HAL_ADCEx_MultiModeStop_DMA(ADC_HandleTypeDef* hadc);
../Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_adc_ex.h(270): error:  #20: identifier "HAL_StatusTypeDef" is undefined
  HAL_StatusTypeDef HAL_ADCEx_InjectedConfigChannel(ADC_HandleTypeDef* hadc,ADC_InjectionConfTypeDef* sConfigInjected);
../Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_adc_ex.h(271): error:  #20: identifier "HAL_StatusTypeDef" is undefined
  HAL_StatusTypeDef HAL_ADCEx_MultiModeConfigChannel(ADC_HandleTypeDef* hadc, ADC_MultiModeTypeDef* multimode);
../Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_adc.h(569): error:  #20: identifier "HAL_StatusTypeDef" is undefined
  HAL_StatusTypeDef HAL_ADC_Init(ADC_HandleTypeDef* hadc);
../Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_adc.h(570): error:  #20: identifier "HAL_StatusTypeDef" is undefined
  HAL_StatusTypeDef HAL_ADC_DeInit(ADC_HandleTypeDef *hadc);
../Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_adc.h(581): error:  #20: identifier "HAL_StatusTypeDef" is undefined
  HAL_StatusTypeDef HAL_ADC_Start(ADC_HandleTypeDef* hadc);
../Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_adc.h(582): error:  #20: identifier "HAL_StatusTypeDef" is undefined
  HAL_StatusTypeDef HAL_ADC_Stop(ADC_HandleTypeDef* hadc);
../Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_adc.h(583): error:  #20: identifier "HAL_StatusTypeDef" is undefined
  HAL_StatusTypeDef HAL_ADC_PollForConversion(ADC_HandleTypeDef* hadc, uint32_t Timeout);
..\..\ugfx\drivers\gdisp\STM32LTDC\gdisp_lld_STM32LTDC.c: 0 warnings, 30 errors

 

Thank you guys.

Posted

1. Make sure you are using the latest version of the F7 HAL files. STM change them often and in incompatible ways. We try and keep compatible with several versions of the HAL but it is a losing battle with the time we have available.

2. If that doesn't work look for where HAL_StatusTypeDef is defined and find out why the definition is not being included. Please let us know what you find.

Posted
On 7/24/2017 at 06:51, inmarket said:

1. Make sure you are using the latest version of the F7 HAL files. STM change them often and in incompatible ways. We try and keep compatible with several versions of the HAL but it is a losing battle with the time we have available.

2. If that doesn't work look for where HAL_StatusTypeDef is defined and find out why the definition is not being included. Please let us know what you find.

Hi, from what I know the HAL_StatusTypeDef is defined in stm32f7xx_hal_def.h since I use stm32f7 discovery board and when I check the header file it's defined there.. But I still getting this error.. Making me go nuts 

Posted
On 7/24/2017 at 06:51, inmarket said:

1. Make sure you are using the latest version of the F7 HAL files. STM change them often and in incompatible ways. We try and keep compatible with several versions of the HAL but it is a losing battle with the time we have available.

2. If that doesn't work look for where HAL_StatusTypeDef is defined and find out why the definition is not being included. Please let us know what you find.

I have able to solve by including some header file manually but still I have issue compiling my main() if I include gfx.h, I found that ur colour definition clashes with STM32 CUBEmx generated structure member's 

 

Eg :

 

 pLayerCfg.Backcolor.Blue = 0;
  pLayerCfg.Backcolor.Green = 0;
  pLayerCfg.Backcolor.Red = 0;

 

See the member's colour they clashes with gfx :0.. Any suggestion how to go about it ?

Posted

Hi again, I started embedded programming after a long time break from it, I would also like to ask since I notice like there is a internal flash memory on the STM32f7 disc board, I generated my code from cube, i checked my sdram, flash everything is initialized... but i still get only static white screen after successful compile of demo code on baremetal port raw32... Is there anything I missing ?.. btw anyone can explain how and where does the uGFX fetch it's code Is it from internal flash or from the 16mb external flash the board ?.... Hope I would able to solve this because I am evaluating uGFX for a start up in Malaysia.. We will be getting support and licensing from uGFX after successful evaluation with my team.   

Posted
6 hours ago, manoj said:

I have able to solve by including some header file manually but still I have issue compiling my main() if I include gfx.h, I found that ur colour definition clashes with STM32 CUBEmx generated structure member's 

They clash indeed. If I remember correctly the problems occur in the HAL_LTDC and HAL_DMA2D files. The problem can be solved by putting:

#undef Green
#undef Red
#undef Blue

at the top of the conflicting files. I also had to do this in the HAL libraries used in the STM32F7 demo project I uploaded here. You could use that as a reference.

 

2 hours ago, manoj said:

but i still get only static white screen after successful compile of demo code on baremetal port raw32

Do you have some more info? What board are you using? What display are you using? What demo did you try? Does debugging hang anywhere?

Posted
7 hours ago, cpu20 said:

They clash indeed. If I remember correctly the problems occur in the HAL_LTDC and HAL_DMA2D files. The problem can be solved by putting:


#undef Green
#undef Red
#undef Blue

at the top of the conflicting files. I also had to do this in the HAL libraries used in the STM32F7 demo project I uploaded here. You could use that as a reference.

 

Do you have some more info? What board are you using? What display are you using? What demo did you try? Does debugging hang anywhere?

Hi there, thanks for the reply, yes #undef should work, thanks for pointing it out. 

 

About the debugging I'll try to do and post the result here.

Posted

The issue with the color names and various other name conflicts that occur on some platforms will be fixed in uGFX v3.0. The colors Red, Green, Blue etc will be renamed as GFXRED etc. The old color names will still be defined in v3 (for user program compatibility reasons) unless you rurn off V2.x compatibility.

The reason this is being done in V3 (a new major version) is because changing these color names breaks existing user program code. 

Posted
25 minutes ago, inmarket said:

The issue with the color names and various other name conflicts that occur on some platforms will be fixed in uGFX v3.0. The colors Red, Green, Blue etc will be renamed as GFXRED etc. The old color names will still be defined in v3 (for user program compatibility reasons) unless you rurn off V2.x compatibility.

The reason this is being done in V3 (a new major version) is because changing these color names breaks existing user program code. 

This would be great and giving me a confidence to use uGFX. Just knew uGFX 2 days ago.. Keep coming, we will support !

Posted
42 minutes ago, inmarket said:

The issue with the color names and various other name conflicts that occur on some platforms will be fixed in uGFX v3.0. The colors Red, Green, Blue etc will be renamed as GFXRED etc. The old color names will still be defined in v3 (for user program compatibility reasons) unless you rurn off V2.x compatibility.

The reason this is being done in V3 (a new major version) is because changing these color names breaks existing user program code. 

You can also consider making uGFX entirely compatible with Cube MX generated code.. Let me know you guys need help on testing anything on my platform.. I can help whenever I am able. Best Regards !

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...