Re: Create tar archive automatically in build process
Posted: Fri May 26, 2023 5:08 pm
I've noticed the tar file is actually generated every build.
However "data_file_embed_asm.cmake" script doesn't run every build. That script converts the file into C source file with byte array of that file, and is called by custom command in target_add_binary_data() function located in {IDF_PATH}/tools/cmake/utilities.cmake.
I did a simple test - increment a number in particular file, run build, then check generated tar file in component's directory and generated embedded.tar.S.obj file in build directory. In generated tar file was the up-to-date number (e.g. 5), while in generated .obj file (checked by "hexdump -C -n 2K") was the number from previous build iteration (e.g. 4).
I also added message() to "data_file_embed_asm.cmake" script, and I can see this message every other build. I mean: first build yes, second nope, third yes, fourth no, and so on... Even if I don't modify any file. Maybe some cache has to be cleared?
However "data_file_embed_asm.cmake" script doesn't run every build. That script converts the file into C source file with byte array of that file, and is called by custom command in target_add_binary_data() function located in {IDF_PATH}/tools/cmake/utilities.cmake.
I did a simple test - increment a number in particular file, run build, then check generated tar file in component's directory and generated embedded.tar.S.obj file in build directory. In generated tar file was the up-to-date number (e.g. 5), while in generated .obj file (checked by "hexdump -C -n 2K") was the number from previous build iteration (e.g. 4).
I also added message() to "data_file_embed_asm.cmake" script, and I can see this message every other build. I mean: first build yes, second nope, third yes, fourth no, and so on... Even if I don't modify any file. Maybe some cache has to be cleared?