Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 225812

Forum Post: RE: MCU-PLUS-SDK-AM243X: overwriting sdk-functions with own implementation not working correctly

$
0
0
Hey George, thanks for the hint. It clarifies the situation a bit and yes, we use the --reread_libs-option indeed. Just to get it right: The linker uses the libraries in the command line. If there are undefined symbols referenced and the linker finds them in the library, they will get resolved. Then it will process the linker-command-file (?). and if there are still unresolved symbols, it will read the libraries again with the --reread_libs-option. I understand that mentioning a library in the command-file can confuse things, but sometimes it's needed to place code in faster memory-parts, especially when working with those arm-cores with tcm and internal SRAM as well as external RAM. So we can reduce it but never avoid it completely. Is there also an order of processing inside the linker-command-file? The point here is that the abort-handlers and irq-service-routines are referenced in the vector-table, which only gets placed inside the linker-command-file into the 0x00000000-address. The vector-table is also part of our library, which is mentioned first in the link-order. And the vector-table is placed in the copied files of the sdk like that (the symbols are mentioned on the right side, "HwiP_data_abort_handler" and so on): I checked our link-command and the library containing our implementations is linked first and thus also the vector-table which references our abort-handler-implementations. The freertos-library with the sdk-implementations of the vector-table and abort-handlers is linked last. So I would've expected that the *(.text.hwi), which occurs first in the linker-command-file, so before the mentioned freertos-library, which also contains the same symbols, will reference them there and put them into tcma. But instead I need to explicitly mention our library. That's the point I didn't understand. Because the symbols and the vector-table are already there and were presented to the linker, before the freertos-library. Removing the freertos-library from the linker-command-file will use our implementations again. So it seems a library in the linker-command-file has a higher-priority. Or I do not really understand at which stage in the linking-order the command-file is used. Best regards Felix

Viewing all articles
Browse latest Browse all 225812

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>