RTT: string padding does not work

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • RTT: string padding does not work

      I'm trying to use the segger RTT SEGGER_RTT_vprintf to print a string with padding.

      The following code doesn't seem to work properly

      C Source Code

      1. SEGGER_RTT_vprintf(0, "%d %-10s - %s", 10, "TEST", "module");

      The padding behaviour doesn't work as mentioned in the documentation.

      Expected10 TEST - module
      Actual10 TEST - module



      When looking at the code, in "%s" mode, the FieldWith seems ignored

      C Source Code

      1. case 's':
      2. {
      3. const char * s = va_arg(*pParamList, const char *);
      4. do {
      5. c = *s;
      6. s++;
      7. if (c == '\0') {
      8. break;
      9. }
      10. _StoreChar(&BufferDesc, c);
      11. } while (BufferDesc.ReturnValue >= 0);
      12. }
      13. break;
      Display All

      RTT version: 7.84d


      Best,
      Gabriel