This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/TM4C1294NCPDT: System_sprintf(%x, 0x23FF), is there way for upper case hex not lower case. It does not support %X or %hx

Part Number: TM4C1294NCPDT
Other Parts Discussed in Thread: SYSBIOS

Tool/software: TI-RTOS

I have the following statement in CCS8 (most recent) to create session log and then posted into UART. However, it only comes out lower hex from %x. 
BufferLength += bytes_added(System_sprintf((char*)Buffer+BufferLength, "%02x| ",i));

After reading this doc.
 and realised using System_sprintf() does not support uppercase hex via X
within the statement, is there way or trick to make uppercase hex possible? , if not never mind.
  • WHAT ... 'Never mind' ... are you (Monsieur Richard)  Krazy?

    Purely a 'SWAG' ... have you tried 'subtracting 0X20' from (each) 'x'?     (i.e. 'a' = 0X61; 'A' = 0X41)     Perhaps this may 'fool'  - vendor's implementation. And 'Yes' - I do recognize that many/most such 'cb1' posts - fall w/in that pristine (swag) category.    

    (Some staff here - believe that PRO IDEs (IAR/Keil)  may meet your desire...)     Yet it proves (most always) 'fun' - to 'force massage' an issue - into (some/slight) compliance!

    Desperate issues - (may) require - equally desperate solutions...

  • Hi Richard,

    Please see this link where all the various TI-RTOS printf formats are supported. I don't see the uppercase %X is listed.

    rtsc.eclipse.org/.../System.html

    Thanks to cb1's suggestion. It never crossed my mind until you mentioned the idea. Very clever! Poster needs to decide if it is worth the CPU's time to
    do this conversion.
  • Thank you, Charles - might TWO 'Blind Squirrel HITS' - w/in the same day - render the 'Sighted yet inept population' even more frustrated?
  • Is there source code in System_sprintf() so I can insert %X supports. If so where it is, I just copy System_sprintf() to System_sprintfX() with mods. 

    I was asking aloud for a possible solution but not desperate, hence that where "never mind" come in. I would curious for a quick fix somehow. 

  • Investors & Key Clients would never accept a 'Vendor Restricted/Limited' solution - thus we've (always & only) employed the 'Pro IDE - IAR.'    Firm/I thus have no knowledge of vendor's (limited) RTOS - which blocks further response.

    Unknown - is that 'logic' you deploy - which (somehow) disqualifies 'desperate' - from possible!'      (such appears as 'failed'  logic - btw.)

    Until tried/attempted - no such 'conclusion' may be fairly/properly 'drawn & presented!'

  • Very sorry cb1_mobile, without being too rude: I quite struggled to understand your message.

    It harder to read 0x32af response than full cap 0x32AF which obviously asking for practical solution.

    Are u speaking political rather than engineering solution?. I don't know where/why word 'desperate' cooked up in this case.

    Simple No or "source code is protected by RTOS copyright", etc etc is more than sufficient message. That where "Never mind, let move on" come in play.