MikroC Compiler problems with W5500_CortexM3_Firmware

I am trying to integrate the W5500_CortexM3_Firmware_for_legacy with a STM32F2xx MCU using a developer board from MikroE. The compiler form MikroC is causing a lot of compiler errors, which most have been fixed now by also using a working STM32F2xx_StdPeriph_Driver.
But I still have a few undeclared identifier, and would need some help.

The error message:
[color=#FF0000]Undeclared identifier ‘FLASH_PrefetchBuffer_Enable’ in expression main.c
Undeclared identifier ‘RCC_PLLSource_HSE_Div1’ in expression main.c
Undeclared identifier ‘__disable_fault_irq’ in expression w5500.c[/color]

But all are declared in the STM32F2xx_flash.h and STM32F2xx_rcc.h
Which are part of the STM32F2xx_StdPeriph_Driver or Types.h (Wiznet)

I have even #include all header files for testing purpose still these files are not declared.
The same done with the W7200_AN_HTTPS_V111 App and the STM32F10x MCU, didn’t cause this

So did I missed something? Is somebody using the same application for development and could help me out or even have a solution or a hint for me?

The MicroC application can be downloaded from here as a demo:
mikroe.com/downloads/get/176 … _setup.zip

main.c Source which is a standard function:

void RCC_Configuration(void)
        ErrorStatus HSEStartUpStatus;

        /* RCC system reset(for debug purpose) */

        /* Enable HSE */

        /* Wait till HSE is ready */
        HSEStartUpStatus = RCC_WaitForHSEStartUp();

        if(HSEStartUpStatus == SUCCESS)
                /* Enable Prefetch Buffer */

                /* Flash 2 wait state */

                /* HCLK = SYSCLK */

                /* PCLK2 = HCLK */

                /* PCLK1 = HCLK/2 */

                /* PLLCLK = 8MHz * 9 = 72 MHz */
                RCC_PLLConfig(RCC_PLLSource_HSE_Div1, RCC_PLLMul_9);

                /* Enable PLL */

                /* Wait till PLL is ready */
                while(RCC_GetFlagStatus(RCC_FLAG_PLLRDY) == RESET)

                /* Select PLL as system clock source */

                /* Wait till PLL is used as system clock source */
                while(RCC_GetSYSCLKSource() != 0x08)

Solved found my user error :blush:

I’m happy too.

Can you explain more the solving problem “For others forum users.”, Plz…^^;

Thank you.

Okay they really were not declared and that’s because having a look at the specification of the STM32F2xx Chip these is done different.

So not really solved the problem at this stage but understand now where these needs to be done.

Have found a helpful document form STM:
Migrating a microcontroller application from STM32F1 to STM32F2 series

st.com/st-web-ui/static/acti … 033267.pdf

But as I am using MicroC as development environment and facing new problems.
Therefore will still need help. Is anybody here using MikroC as well?
If not can you please tell me what software are you using?

Some problems with MikroC are for example:

  • They do not support printf must switch all to sprintf
  • The variable declarations must be put at the beginning of function, you cannot declare them later
  • Data is Arguments cannot specificator in w5500.h for example: uint8 data

Best regards

Thank so much.
Your comment are very helpful for others.