Thalhammer / simcom_dam

Examples for simcoms downloadable modules (Qualcomm SoC)
27 stars 13 forks source link

Make GCC work #1

Closed Thalhammer closed 5 years ago

Thalhammer commented 5 years ago

For some reason I don't know yet, the builds produced by GCC do not work. They compile fine and a quick inspection of the generated file shows no obvious problems and yet when one tries to use it the module gets bricked and a hard reset is required (which makes trial and error debugging quite a challenge). However, the problem is definitely not with objcopy since when used with the elf generated using armcc it generates exactly the same result as fromelf (md5sum match). So there must be something wrong with the generated code. Can't validate linking since the object files generated by armcc don't work with normal ld.

Thalhammer commented 5 years ago

The module no more crashes, but uart only sends garbage for some reason. The same code compiled using armcc works fine. However I can't see any obvious differences in the generated asm.

Thalhammer commented 5 years ago

Figured it out :smile: It does not like -mabi=apcs-gnu, leaving it out it seems to work fine.