Curent code generated by HalCoGen can't work with GCC compiler. Problem is assembler files. Here is sniplet:
@ Enable interrupts - CPU IRQ & FIQ
.weak _enable_interrupt_
_enable_interrupt_:
cpsie if
bx lr
But exporting function name by ".weak" keyword don't inform compiller about ARM/thumb function type. With this code compiler will use "BX" instruction to call and it's mistake. Minimal change to get working code is this here:
@ Enable interrupts - CPU IRQ & FIQ
.weak _enable_interrupt_
.type _enable_interrupt_, function
_enable_interrupt_:
cpsie if
bx lr
And formally perfect code is:
@ Enable interrupts - CPU IRQ & FIQ
.global _enable_interrupt_
.type _enable_interrupt_, function
.func _enable_interrupt_
_enable_interrupt_:
cpsie if
bx lr
.endfunc