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

Errors with demo software

Apologies if this is obvious but I am a newbie to ARM and am struggling.

If I load STM32F429-Discovery EmWin example it compiles Ok.

Change the device from STM32F429ZIT to STM32F429IGT (on my board) I get errors:

compiling RTX_Conf_CM.c...
compiling SPI_STM32F4xx.c...
C:\Keil_v5\ARM\PACK\Keil\STM32F4xx_DFP\2.2.0\CMSIS\Driver\SPI_STM32F4xx.c(600): warning: #177-D: function "SPIX_GetVersion" was declared but never referenced static ARM_DRIVER_VERSION SPIX_GetVersion (void) {
C:\Keil_v5\ARM\PACK\Keil\STM32F4xx_DFP\2.2.0\CMSIS\Driver\SPI_STM32F4xx.c(610): warning: #177-D: function "SPIX_GetCapabilities" was declared but never referenced static ARM_SPI_CAPABILITIES SPIX_GetCapabilities (void) {
C:\Keil_v5\ARM\PACK\Keil\STM32F4xx_DFP\2.2.0\CMSIS\Driver\SPI_STM32F4xx.c(622): warning: #177-D: function "SPI_Initialize" was declared but never referenced

etc.

If I now change back to original device I still get these errors. Why?

  • I'm not sure that changing the Device on an existing Projects (entirely) works?

    I'd suspect that it's left (some of) the old device defines in there...?

  • Warnings != Errors

    Check for command line defines passed to the compiler. Be sure that you rebuilt the original project completely and that really did get no warnings.

  • Thank you both for your quick response

    Sorry, you are quite right! There were 11 warnings and 1 error.
    However I don't understand why changing the device (which is just a different pin out)
    and then changing it back to the original again gives these errors/warnings.

    I have done a 'compile all target files' in all 3 cases.

    Having laid out a PCB with a lot of the components similar to the discovery board (slight changes in pin AFs)
    I thought I could just change the device/ pins to try a demo program out.

    (one version I have tried, compiles some of the time but often crashes the MDK program before downloading.

    I guess, from what you are saying, this is not the case and I really need to start afresh.

  • Hello Derek,

    the warning comes from missing selections in the RTE_Device.h file. You find it under Device in the Project window. You need this file, to enable or disable the peripherals and also to assign the pins you are using on your board. Once you change the device, all settings in that file will be deleted and you need to configure it. As you have done nothing in that file, changing back to the original device gives the same errors (unconfigured peripherals). For more information, please check the Middleware documentation. If you have the latest version 6.2 installed have a look at file:///C:/Keil_v5/ARM/PACK/Keil/MDK-Middleware/6.2.0/Doc/General/html/mw_using_generic_steps.html#conf_drivers
    The error comes from a problem in the memory layout. Please check the example carefully and adapt it to your device.

    Kind regards,

    Christopher

  • Thanks Christopher

    That does make sense. I shall look at that.

    Kind regards

    Derek

  • Hello

    Which version of the ST pack are you using?

    from http://www.keil.com/pack

    Also check your RTE_config.h file to make sure you have your SPI interfaces setup correctly.