Hi,I used the MCAL demo that comes with the S32K344 EVB and configured the UART module. The EVB can send messages normally. I added printf(), but the program does not seem to be retargeted. I need help, thank you very much.
Solved! Go to Solution.
Hello @jacst,
Sorry for late reply. Looks like there are three problems in your project:
1. The NEW_LIB library is linked to the old compiler (gcc_b1620, not gcc_9.2). I have to change the path as below:
2. In retarget.c, write function only has 1 underscore instead of 2 (_write instead of __write).
3. You need to implement Uart_SyncSend function in _write function instead of async, otherwise you will need to wait until the transmission is completed.
I have attached the fixed project, after fix these things I can see printf function is retargeted.
Best Regards,
Nam
Hello @jacst,
Sorry for late reply. Looks like there are three problems in your project:
1. The NEW_LIB library is linked to the old compiler (gcc_b1620, not gcc_9.2). I have to change the path as below:
2. In retarget.c, write function only has 1 underscore instead of 2 (_write instead of __write).
3. You need to implement Uart_SyncSend function in _write function instead of async, otherwise you will need to wait until the transmission is completed.
I have attached the fixed project, after fix these things I can see printf function is retargeted.
Best Regards,
Nam