Hi,
I'd like to use the uart to interface a gnss which spits out NMEA data and in order to achive this I'd like to modify the UART driver.
I've imported the file which holds the definitions for (among other functions) UART_Handler_func into my project (based on ble_app_security), and when trying to compile I get the following errors:
.\out_585\ble_app_security_585.axf: Error: L6200E: Symbol UART_Handler_func multiply defined (by da14585_symbols.txt and uart_ea.o). .\out_585\ble_app_security_585.axf: Error: L6200E: Symbol uart_finish_transfers_func multiply defined (by da14585_symbols.txt and uart_ea.o). .\out_585\ble_app_security_585.axf: Error: L6200E: Symbol uart_flow_off_func multiply defined (by da14585_symbols.txt and uart_ea.o). .\out_585\ble_app_security_585.axf: Error: L6200E: Symbol uart_flow_on_func multiply defined (by da14585_symbols.txt and uart_ea.o). .\out_585\ble_app_security_585.axf: Error: L6200E: Symbol uart_init_func multiply defined (by da14585_symbols.txt and uart_ea.o). .\out_585\ble_app_security_585.axf: Error: L6200E: Symbol uart_read_func multiply defined (by da14585_symbols.txt and uart_ea.o). .\out_585\ble_app_security_585.axf: Error: L6200E: Symbol uart_write_func multiply defined (by da14585_symbols.txt and uart_ea.o). .\out_585\ble_app_security_585.axf: Error: L6200E: Symbol uart_set_flow_off_retries_limit multiply defined (by da14585_symbols.txt and uart_ea.o). .\out_585\ble_app_security_585.axf: Error: L6200E: Symbol uart_env multiply defined (by da14585_symbols.txt and uart_ea.o).
Why are these functions defined in da14585_symbols.txt?
How can I modify the driver in the easiest possible way?
Best regards
Martin
Device:
Hi mapart,
This is an error form the linker because all of the functions are executed by the ROM code. I would not recommend you to modify the UART driver but if you would like to do it you should override the functions from the ROM code. For example if you would like to have your own uart_finish_transfers_func() you should do the following modifications:
You should follow this procedure for all the functions that you are using.
Thanks, PM_Dialog
Hi,
Thanks for your answer!
Just to make sure I understand this correctly:
Is this correct?
然后我有一个问题:
What is the purpose of having both "uart_init_func" and "uart_init", "UART_Handler_func" and "UART_Handler", et.c. ?
Best regards
Martin
Hi mapart,
Yes, you are correct! The purpose is to override the ROM functions and use your custom uart_init_func etc. As I mentioned in my previous post, this error comes from the linker because all of the functions are executed by the ROM code. If you found any answer useful, please mark it as accepted.
Thanks, PM_Dialog