Hi,
We are using the last Halcogen, for the tmdx570ls31USB and we generated files for using the GCC toolchain.
When we tried to use it against a toolchain we were using (with the proper multilib for big endian and in thumb mode), we encountered some problems:
first, the _c_int00 function has the attribute target ("arm") but the compiler says that there doesnt exist such option.
As far as I can see, perhaps we have to configure our gnu toolchain with some option to enable this attribute target or we must use some other way to tell the compiler to compile this in arm mode. (We use gcc 4.9.2)
As a workaround we compiled the file where that function was defined, with -marm and it worked (still the warning about the missing option, but compiled in arm mode)
But then we could see another problem:
We are compiling our .c files with gcc in thumb mode, and when some function tries to call an halcogen assembler function generated code it doesn't recognize that the assembler function is in arm mode and doesnt emit the corresponding interworking instruction (blx instead of bl). In order to make our first example working we compiled everything in arm mode. but we could see that marking the assembler functions as functions this way:
.weak _pmuEnableCountersGlobal_
.type _pmuEnableCountersGlobal_, %function
_pmuEnableCountersGlobal_:
stmfd sp!, {r0}
mrc p15, #0, r0, c9, c12, #0
orr r0, r0, #7
mcr p15, #0, r0, c9, c12, #0
ldmfd sp!, {r0}
bx lr
The linker could generate the blx or bl code correctly. After some research, we saw that all assembler functions should be marked as functions.
Could it be possible for Halcogen to generate such code?
Thanks!