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

Same Keil version, different output files

Hi everybody,
We have a big problem with the MDK 4.60 version. Having the same Keil version, same project, files, libraries etc... Keil generates different output files for programming the STM32F417 on two different computers.

This wouldn't be a problem, but one output file causes fault work of the uC - the UART isn't working.
What could be the cause of this problem? Any suggestions?

Parents
  • __DATE__ (and __FILE__ if the pathnames are different) are also possibilities.

    Do you know where in the .axf/.o files the differences are? fromelf --compare can be useful for this. Start by comparing the .axf files, find the first difference (probably ignoring .debug*). The use a link map to figure out what .o files it came from. The compare the .o files. Or convert them to text with fromelf and compare the text.

Reply
  • __DATE__ (and __FILE__ if the pathnames are different) are also possibilities.

    Do you know where in the .axf/.o files the differences are? fromelf --compare can be useful for this. Start by comparing the .axf files, find the first difference (probably ignoring .debug*). The use a link map to figure out what .o files it came from. The compare the .o files. Or convert them to text with fromelf and compare the text.

Children
  • The differences are in:
    system_stm32f4xx.o
    stm32f4xx_rcc.o

    There are __DATE__! So, the difference could be because of this also...
    But one very interesting thing:
    I used a simple project just with the UART and LEDs.
    Programming with the one computer, it works, Programming with the other - it gives wrong characters.
    But when I copy the stm32f4xx_rcc.o file from the computer where it works to the second and built the project, UART works correctly.

    So, I suppose it can't be from just because of the __DATE__!

  • uhmm
    because system_stm32f4xx.c is involved in setting all the clocks
    If you use a different clk that would cause a baud rate difference.

    check for the definition of the HSE clk.

    I use the stm32f2xx and Keil had a default for the HSE in the enviroment and there is a HSE setting in the source files.

  • I use the stm32f2xx and Keil had a default for the HSE in the enviroment and there is a HSE setting in the source files.

    Ah, the joy of using so-called 'libraries'!
    I wonder if they solve more problems than they create.

  • check the system_stm32f4xx.c and where the project is picking it up from

    If you use a different HSE clk than the standard default Keil value and demo boards you will need to make sure all the clk rates are correct.

    I use a 8 mhz clk rather than the 25Mhz on the eval board so had to use the STM excel app to generate the file.

  • It was the stm32f4xx.h HSE clk!
    Guys, thank you so much for helping!