2014-09-06 12:02 AM
Hello all. I just got a STM32F429-DISCO board and compiled my first successful program. I'm working under linux compiling with the GNU toolchain for ARM.
In order to be able to compile my program, I had to modify some files on the firmware package, due to them having incorrect paths on a lot of #include's: they use a backslash instead of a slash in the header files search paths, which works correctly on Windows but returns an error on unix-like systems. Note that the C standards mandate that a slash should be used in this context regardless of the system, it will work on all contexts. So I made a little shell script to correct all the incorrect #include lines on .h and .c files inside the firmware package tree, and the purpose of this message is to share it here in the hope that someone will find it useful :) . Here it is: #!/bin/sh rm -f log_copy.txt for i in `find STM32Cube_FW_F4_V1.3.0 -name ''*.[ch]'' | xargs grep -l -E -e '#include ''\.\.\\\' -e '#include ''\\\'`; do echo ''COPY $i -> $i.orig'' | tee log_copy.txt cp $i $i.orig echo ''CHANGE SLASH $i'' sed -i '/#include/{s|\\|/|g}' $i | tee log_copy.txt diff $i $i.orig | tee log_copy.txt done It will backup the original files to .orig and then modify the wrong #include directives. The script must be placed in the directory where the FW package has been decompressed. As a final word, I'd like to request ST to correct their source files for the next version of the firmware package, and even include makefiles for GNU in addition to the currently present build files. Best regards!2014-11-23 07:25 AM
I had the same problem with Mac OS X. I didn’t do such a thorough check, only fixed the files I needed to for the stm42329i-disco board.
Patch attached. ________________ Attachments : STM32Cube_FW_F4_V1.3.0-unix.diff : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzXV&d=%2Fa%2F0X0000000bNI%2F.0.1MNLYFCAcjbvyJ_5IxS0YIa6Eswj3wrpzw3xQXbk&asPdf=false2014-11-23 07:27 AM
Ugh, stm32f429i-disco :(
2014-11-27 06:26 AM
Hi Gad, Simon,
We’ve notified our development team that this is detected a limitation on Linux platform. Keep an eye out for the next update of STM32Cube_FW_F4 !Regards,Heisenberg.