Basil Mathew09/27/2022, 6:03 PM
daniel09/28/2022, 12:54 PM
were introduce which are simpler but rely on the software model for the toolchain configuration (reuse over reimplementing). When I left Gradle, I started Nokee because my passion has always being native support in Gradle. Nokee is superior to the newer core plugins. As for the software model, Nokee still has some feature that we are missing, mainly around edge cases. In general, we should be able to make then work without much issues. Nokee is in full time development which is the advantage over the other native support. I’m working with Gradle to clear the confusion but at the moment, it’s a bit messy. 😞 There’s a fundamental difference between Make/Scons and Gradle. In Make/Scons, users focus on how the software is built. In Gradle, we focus on what is been built. In your example, what you are creating is an executable linked against a library all implemented in C which target TRICORE. With recent change in Nokee, it should be possible to achieve this. If you could point me to a working same in Make/SCons and the TASKING compiler (hopefully available freely), then I can create a demonstration on how it’s done. The reason why Gradle don’t simply allow users to specify the command line to execute relies in the fact that the command line can and will be different depending on the target. For example, building an executable for Linux, macOS or Windows all follow the same basic concept but the resulting command line will be different (picture Gcc/Clang vs MSVC). The idea is to abstract away how the command line looks and focus on what is been built. You can still modify the command line for each variant. It’s a same for dependencies. Regardless where your dependency comes from (built locally, prebuilt, 3rd-party package, system library, etc), it’s always the same. It’s some kind of artifact with a set of attributes.
Basil Mathew09/28/2022, 7:20 PM
A typical command line looks like this. We perform a splitted compilation where in the C-file is first converted to assembly file and then assembled using an assembler to generate the object file.
class CtcAurix_TC27xx(Platform): def __init__(self, env): Platform.__init__(self, env) """ Paths to executables used by this platform """ # Path to the compiler suite bin folder bin_path = posixpath.join(env['TOOLSPATH'],'CTC_AURIX',env['TOOLVERSION'],'ctc','bin') # Path to the compiler executable self.CCPATH = posixpath.join(bin_path,'ctc.exe') # Path to the assembler executable self.ASMPATH = posixpath.join(bin_path,'astc.exe') # Path to the archiver executable self.ARPATH = posixpath.join(bin_path,'artc.exe') # Path to the linker executable self.LINKPATH = posixpath.join(bin_path,'ltc.exe') # Path to the MCS executables mcs_bin_path = posixpath.join(env['TOOLSPATH'],'CTC_AURIX',env['TOOLVERSION'],'cmcs','bin') # Path to the MCS compiler executable self.MCSCOMPPATH = posixpath.join(mcs_bin_path,'cmcs.exe') # Path to the MCS assembler executable self.MCSASPATH = posixpath.join(mcs_bin_path,'asmcs.exe') # Path to the c51 executables scr_bin_path = posixpath.join(env['TOOLSPATH'],'CTC_AURIX',env['TOOLVERSION'],'c51','bin') # Path to the SCR compiler executable self.SCRCOMPPATH = posixpath.join(scr_bin_path,'c51.exe') # Path to the SCR assembler executable self.SCRASPATH = posixpath.join(scr_bin_path,'as51.exe')
c:\legacyapp/CTC_AURIX/6.2r1p2/ctc/bin/ctc.exe work\bsw\arch\arlib\bfx\bfx\pi\i\bfx_main.c --error-file=../log/err/bfx_main.c_err -g -OacefgIklmnopRsuvwy --eabi=DCfHnsW --immediate-in-code -t3 -F -N0 -Z0 -Y0 --core=tc1.6.2 --iso=99 --no-macs --switch=linear -f./includes.txt -Ic:\legacyapp/CTC_AURIX/6.2r1p2/ctc/include -o work\bsw\arch\arlib\bfx\bfx\pi\i\bfx_main.src
We usually copy the installation package to our local machine and execute the build using the executables with-in the compiler suite. If you have a look at the SCons configuration file, you will see many executables getting used for the build, this is basically because other than the normal compilation, some C-files are specifically used for certain features like the XC800 Standby controller (SCR), and MCS/GTM timer module of AURIX TC3xx, and Peripheral Control Processor (PCP) and needs to be compiled with the relevant executables; Also link step is handled specially that these object files from the special C-files are to be linked with a separate argument in the linker command line call. Please let me know if you were expecting more information.
c:\legacyapp/CTC_AURIX/6.2r1p2/ctc/bin/astc.exe --error-file=../log/err/bfx_main.s_err -il --core=tc1.6.2 -f./includes.txt -Ic:\legacyapp/CTC_AURIX/6.2r1p2/ctc/include -o work\bsw\arch\arlib\bfx\bfx\pi\i\bfx_main.o work\bsw\arch\arlib\bfx\bfx\pi\i\bfx_main.src
daniel09/29/2022, 2:35 PM
Basil Mathew09/29/2022, 5:33 PM
Please find a sample linker command line that we are using, see the linker arguments starting with "--new-task --core=mpe:mcs00" in the linker command; they represent the mcs object file(s) while the normal object file(s) are passed inside a text file as "-f ./objects.txt"
c:\legacyapp/CTC_AURIX/6.2r1p2/cmcs/bin/asmcs.exe --error-file=../log/err/iopt_sent.mcs_err -Os -il -mt -f./includes.txt -Ic:\legacyapp/CTC_AURIX/6.2r1p2/ctc/include work\bsw\firmware\sent\sent\pd_gtm\i\iopt_sent.mcs -o work\bsw\firmware\sent\sent\pd_gtm\i\iopt_sent.o
c:\legacyapp/CTC_AURIX/6.2r1p2/ctc/bin/ltc.exe -f ./objects.txt --warnings-as-errors -OcLTXY -M -mCdFiKlmNOQRSU --auto-base-register -Cmpe:vtc -lcs_fpu -lrt -lfp_fpu -Lc:/legacyapp/CTC_AURIX/6.2r1p2//ctc/lib/tc162 --error-file=../log/err/FS_0GT3_0U0_166.err --map-file=_out/FS_0GT3_0U0_166.map -d _lcf/loc_opt_pp.def -o _out\FS_0GT3_0U0_166.elf -o _out/FS_0GT3_0U0_166.tmp:SREC -o _out/FS_0GT3_0U0_166.hex:IHEX --new-task --core=mpe:mcs00 --map-file=_out/mcs00.map _FS_0gt3_0u0_CTC_developer-normal\proc\ARPROC\out\iopt_gtm_mcs_00.o work\bsw\firmware\sent\sent\pd_gtm\i\iopt_sent.o --new-task --core=mpe:mcs03 --map-file=_out/mcs03.map _FS_0gt3_0u0_CTC_developer-normal\proc\ARPROC\out\iopt_gtm_mcs_03.o work\bsw\test\angpwm\i\iopt_mcs_ang_pwm.o
daniel09/29/2022, 7:14 PM
Basil Mathew09/30/2022, 9:14 AM