Hello,
I also ran into this issue when building firmware.
FWIW, my steps can be found condensed here:
=====
FROM debian:sid
WORKDIR /build
RUN apt-get update && apt-get -y install gcc-arm-none-eabi git \
cmake make
RUN git clone https://git.morello-project.org/morello/scp-firmware.git && \
cd scp-firmware && git checkout \
97c99fcc60b5f3d86767c66390353d1205bce4a5
RUN mkdir build-scp && cd build-scp && cmake -DCMAKE_BUILD_TYPE=Debug \
-DSCP_FIRMWARE_SOURCE_DIR:PATH=morello/scp_ramfw_soc \
../scp-firmware
RUN cmake --build build-scp
=====
This then led to:
=====
In file included from
/build/scp-firmware/module/cmn_skeena/src/cmn_skeena_ccix.c:18:
/build/scp-firmware/module/cmn_skeena/src/cmn_skeena_ccix.c: In function
'enable_and_start_ccix_link_up_sequence':
/build/scp-firmware/module/cmn_skeena/src/cmn_skeena_ccix.c:383:46:
error: expected ')' before 'PRIx64'
383 | MOD_NAME "CXLA_PCIE_HDR_FIELDS: 0x%" PRIx64,
| ^~~~~~
/build/scp-firmware/framework/include/fwk_log.h:222:46: note: in
definition of macro 'FWK_LOG_INFO'
222 | # define FWK_LOG_INFO(...) fwk_log_printf(__VA_ARGS__)
| ^~~~~~~~~~~
/build/scp-firmware/module/cmn_skeena/src/cmn_skeena_ccix.c:28:18:
error: spurious trailing '%' in format [-Werror=format=]
28 | #define MOD_NAME "[CMN_SKEENA] "
| ^~~~~~~~~~~~~~~
/build/scp-firmware/framework/include/fwk_log.h:222:46: note: in
definition of macro 'FWK_LOG_INFO'
222 | # define FWK_LOG_INFO(...) fwk_log_printf(__VA_ARGS__)
| ^~~~~~~~~~~
/build/scp-firmware/module/cmn_skeena/src/cmn_skeena_ccix.c:383:9: note:
in expansion of macro 'MOD_NAME'
383 | MOD_NAME "CXLA_PCIE_HDR_FIELDS: 0x%" PRIx64,
| ^~~~~~~~
cc1: all warnings being treated as errors
gmake[2]: ***
[module/modules/cmn-skeena/CMakeFiles/module-cmn-skeena.dir/build.make:104:
module/modules/cmn-skeena/CMakeFiles/module-cmn-skeena.dir/src/cmn_skeena_ccix.c.obj]
Error 1
gmake[1]: *** [CMakeFiles/Makefile2:1748:
module/modules/cmn-skeena/CMakeFiles/module-cmn-skeena.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2
=====
With some stracing, it became apparent that the newlib headers were
pulling in an extra stdint.h (that wasn't part of newlib). I rebuilt the
gcc-arm-none-eabi package with the "provide-stdint-for-embedded.patch"
removed. That then allowed me to build the SCP firmware without issue.
Could the stdint patch please be tweaked? (apologies, I haven't the
first clue how it can be tweaked :-( )
Cheers,
--
Steve