I'm using the SDK for the LPCXpresso845MAX board I would like to use sprintf() but I see that it is not included in the SDK. I see that in your devices/LPC845/utilities/debug_console_lite directory you have a files named fsl_debug_console.c/h. I like using this driver because it provides a printf() function I can use with my UART.
However, I notice that you declare DbgConsole_PrintfFormattedData() (line 605 in my copy) as static, which means I cannot access it from outside the file. This is unfortunate because I could easily use that function to create a sprintf() by passing in a pointer to a function that writes to a character string.
Since I cannot do that and I do not want to alter my copy of the SDK, I am forced to include the libnano version of sprintf(), which drags in a bunch of unwanted library functions such as malloc() and free() that compete with my own versions.
I would ask that you make DbgConsole_PrintfFormattedData() non-static in future versions of the SDK so we can access its functionality from our code without modifying the SDK files themselves.
Regards,
Albert
解決済! 解決策の投稿を見る。
 
					
				
		
 Alice_Yang
		
			Alice_Yang
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hello Albert,
Thanks for your sharing.
Just kindly reminder, you can create PRINTF by Config Tool:
BR
Alice
Yes I realize I can get printf. It's sprintf that I'm looking for.
I don't want to edit my copy of fsl_debug_console.c/h to make the necessary function accessible externally, otherwise my changes will get overwritten whenever I update my copy of the SDK.
 
					
				
		
 Alice_Yang
		
			Alice_Yang
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hello,
OK, I know your meaning, and will submit request to SDK team, thanks for your suggestion.
BR
Alice
 
					
				
		
 Alice_Yang
		
			Alice_Yang
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hello Albert,
Thanks for your sharing.
Just kindly reminder, you can create PRINTF by Config Tool:
BR
Alice
