McuOnEclipse Components: 1-Apr-2018 Release

It’s April Fool’s Day, but be assured this is not a joke ;-): I’m pleased to announce that a new release of the McuOnEclipse components is available in SourceForge. This release includes several smaller bug fixes and components have been upgraded for FreeRTOS V10.0.1.

SourceForge

SourceForge

And what if you are not using Processor Expert? No worries, I have you covered. The source code of many components are hosted on GitHub:
https://github.com/ErichStyger/McuOnEclipseLibrary

That way you can use the sources with any project or microcontroller :-).

Changes

The following major changes have been applied since the last release:

  • FreeRTOS: Updated to V10.0.1
  • SDK integration for graphics library and display drivers
  • Refactoring of SSD1306 and I2C drivers, improved speed and support for SH1106
  • Segger RTT: added printf
  • XFormat: updated to latest version
  • Various smaller bug fixes and improvements

FontDisplay

The FontDisplay component manages multiple graphical fonts for LCD or other displays. The component and the graphics subsystem now has a setting to be used with different SDKs and APIs:

FontDisplay

FontDisplay

SDK Configuration

SDK Configuration

SSD1306 and GenericI2C

The SSD1306 and GenericI2C drivers have been updated so they are generic and can be used with any microcontroller, for example STM32 (see https://mcuoneclipse.com/2017/12/17/new-concept-for-2018-mini-sumo-roboter/)

SSD1306

SSD1306

The driver has been improved for better performance. Additionally it supports the SH1106 driver:

SH1106

SH1106

It is possible now to update the display with more than 30 frames/sec. The driver h as been tested with several OEM/China modules and the modules from Adafruit.

FreeRTOS

FreeRTOS has been updated to V10.0.1. Compared to V10.0.0 the changes are very small, and the task lists reports now the currently executing task.

FreeRTOS V10.0.1

FreeRTOS V10.0.1

XFormat

The XFormat component has been updated to the latest version. Additionally it has a setting to use static buffers (non-reentrant, but saves stack space).

XFormat

XFormat

Static Option

Static Option

Summary

The changes are documented on GitHub. The release is available on SourceForge: https://sourceforge.net/projects/mcuoneclipse/files/PEx%20Components/. See “McuOnEclipse Releases on SourceForge” how to install the update. If you are not using Processor Expert: the components are available in normal source form on https://github.com/ErichStyger/McuOnEclipseLibrary.

 

I hope you find the new release useful.

Happy Updating 🙂

Links

Advertisements

23 thoughts on “McuOnEclipse Components: 1-Apr-2018 Release

  1. Hi Erich,

    Thank you, for the new components. Recently I have got PCAL6524 IO expansion chip sample from NXP. Chip has has useful debounce filter for use with push buttons on our joysticks. Now, I am trying to make component PCAL6524 similar to PCA9554 existing in PE component. Is it possible to be added to Component Libraries?

    Regards
    Marceli

    Like

    • Hi Marceli,
      I have not used that PCAL6524, but it looks like an interesting device. I won’t have the bandwidth to create a driver for it, but I’m sure you would be able to create such a component yourself?

      Like

      • Hi Erich,
        I will make source and header files and check is working in the product. It be interesting to make PE Component Inspector. Is any template or build example for this? Is it made in Visual C#?

        Like

        • No, there is no such template. Things are pretty much in normal C language with some extensions (special keywords starting with % character). The framework is called CDE (Component Development Environment).

          Like

        • Hi Erich,

          It is great I can make new Embedded Component from File menu. Is it possible to copy common methods from one component to new one, to save on design time?

          Like

        • To be honest, I tried that CDE inside Eclipse, but it had too many issues and bugs. So I sticked with the ‘classic’ Bean Wizard from CodeWarrior (which is only available in the Pro edition).
          So if you do a component with the Eclipse based CDE, it won’t be backwards compatible with the BeanWizard, so it would be rather hard for me if you want to add it to the McuOnEclipse library because I won’t be able to maintain it.
          But this does not stop you from doing your own thing.
          As for copy: you can ‘clone’ or copy an existing component, maybe this is the way to go for you? Other than that: the CDE files are text files, in many cases I use a normal text editor to edit them.

          Like

  2. Hi Erich,

    I use the SSD1306 Drive Display. I’m having trouble refreshing the screen by the Clear () method of component SSD1306. Every time I use the Clear () method and then write on the display again, it is possible to notice the screen being erased and written. I wish this was not remarkable. how to solve this?

    Like

    • The reason is that Clear() does UpdateFull() att he end.
      You can use the GDisplay component which has a higher level interface to the display.
      In that component there is a Clear() method too, but the display is only affected after to call its UpdateFull() method().
      So I recommend you use the GDisplay component for the SSD1306.
      But I could add a ClearBuffer() method to the component too?

      Like

  3. Hi erich

    Do you have any examples using the GDisp1_DrawMonoBitmap method?
    My question is how to load the bmp image into the GDisp1_DrawMonoBitmap method?

    Like

    • I checked GitHub, but it looks I have not published any example about it :-(.
      I see that I can publish one. Until then, here is an example:

      static void Demo3(void) {
      PIMAGE image = ImageWait_GetImage();
      FDisp1_PixelDim x, y, xCursor;

      GDisp1_Clear();
      if (GDisp1_GetWidth() > GDisp1_GetHeight()) { /* landscape */
      x = GDisp1_GetWidth()/2;
      y = 0;
      } else {
      x = 0;
      y = GDisp1_GetHeight()/2;
      }
      xCursor = x;
      FDisp1_WriteString("Bitmap:", GDisp1_COLOR_BLACK, &xCursor, &y, Helv08n_GetFont());
      y += Helv08n_GetBoxHeight()+1;
      GDisp1_DrawMonoBitmap(x, y, image, GDisp1_COLOR_BLACK, GDisp1_COLOR_WHITE);
      xCursor = x;
      y += image->height;
      FDisp1_WriteString("Helv 12pt", GDisp1_COLOR_BLACK, &xCursor, &y, Helv12n_GetFont());
      GDisp1_UpdateFull();
      }

      The ‘ImageWait’ is from the BWImage component I have used which generates this:

      /** ###################################################################
      ** THIS COMPONENT MODULE IS GENERATED BY THE TOOL. DO NOT MODIFY IT.
      ** Filename : ImageWait.C
      ** Project : ChLCD_SRB
      ** Processor : MC13213
      ** Component : BWimage
      ** Version : Component 02.032, Driver 01.08, CPU db: 2.87.131
      ** Compiler : CodeWarrior HCS08 C Compiler
      ** Date/Time : 28.04.2010, 19:17
      ** Abstract :
      ** This component "BWimage" enables to display images
      ** on graphical display.
      ** Settings :
      ** Image : waitImage_small.bmp
      ** Contents :
      ** GetImage - PIMAGE ImageWait_GetImage(void);
      **
      ** Copyright : 1997 - 2009 Freescale Semiconductor, Inc. All Rights Reserved.
      **
      ** http : www.freescale.com
      ** mail : support@freescale.com
      ** ###################################################################*/

      /* MODULE ImageWait. */

      #include "PE_Error.h"
      #include "ImageWait.h"

      static TIMAGE Image;
      static const byte FileName[] = "waitImage_small.bmp";

      const byte ImageWait_Pixmap[0xA8] = {
      0x00,0x03,0xE2,0x00,0x00,0x00,0x00,0x7F,0xE2,0x12,0x00,0x00,0x00,0x00,0x80,0x12,0x12,0x38,0x70,0xE1,0xC0,0x80,0x12,0x12,0x44,
      0x89,0x12,0x20,0xFF,0xF3,0xE2,0x44,0x09,0x02,0x20,0x80,0x12,0x02,0x7C,0x78,0xE3,0xE0,0x80,0x12,0x02,0x40,0x88,0x12,0x00,0x80,
      0x12,0x02,0x44,0x99,0x12,0x20,0x7F,0xE2,0x02,0x38,0x68,0xE1,0xC0,0x34,0x80,0x00,0x00,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x00,
      0x00,0x00,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x80,0x00,0x00,0x00,0x00,0x00,0x30,0x80,
      0x00,0x00,0x00,0x00,0x00,0x40,0x60,0x00,0x00,0x48,0x00,0x00,0xC4,0x70,0x00,0x00,0x08,0x00,0x00,0x8F,0x10,0x88,0x9C,0x5C,0x00,
      0x00,0x8F,0x10,0x88,0xA2,0x48,0x00,0x00,0xBF,0x90,0x55,0x02,0x48,0x00,0x00,0xFF,0xF0,0x55,0x1E,0x48,0x00,0x00,0xFF,0xF0,0x55,
      0x22,0x48,0x00,0x00,0x7F,0xE0,0x22,0x26,0x48,0x00,0x00,0x00,0x00,0x22,0x1A,0x4C,0x24,0x80};

      /*
      ** ===================================================================
      ** Method : ImageWait_GetImage (component BWimage)
      **
      ** Description :
      ** Get image information.
      ** Parameters : None
      ** Returns :
      ** --- - Pointer to structure TIMAGE
      ** ===================================================================
      */
      PIMAGE ImageWait_GetImage(void)
      {
      Image.width = 0x38;
      Image.height = 0x18;
      Image.size = 0xA8;
      Image.name = (byte *)FileName;
      Image.pixmap = (byte *)ImageWait_Pixmap;
      return &Image;
      }

      /* END ImageWait. */

      /*
      ** ###################################################################
      **
      ** This file was created by Processor Expert 3.08 [04.39]
      ** for the Freescale HCS08 series of microcontrollers.
      **
      ** ###################################################################
      */

      and this:

      /** ###################################################################
      ** THIS COMPONENT MODULE IS GENERATED BY THE TOOL. DO NOT MODIFY IT.
      ** Filename : ImageWait.H
      ** Project : ChLCD_SRB
      ** Processor : MC13213
      ** Component : BWimage
      ** Version : Component 02.032, Driver 01.08, CPU db: 2.87.131
      ** Compiler : CodeWarrior HCS08 C Compiler
      ** Date/Time : 28.04.2010, 19:17
      ** Abstract :
      ** This component "BWimage" enables to display images
      ** on graphical display.
      ** Settings :
      ** Image : waitImage_small.bmp
      ** Contents :
      ** GetImage - PIMAGE ImageWait_GetImage(void);
      **
      ** Copyright : 1997 - 2009 Freescale Semiconductor, Inc. All Rights Reserved.
      **
      ** http : www.freescale.com
      ** mail : support@freescale.com
      ** ###################################################################*/

      #ifndef __ImageWait
      #define __ImageWait

      /* MODULE ImageWait. */

      #include "Cpu.h"
      #include "PE_Types.h"

      /* PUBLISHED CONSTANTS for black & white image */
      #define ImageWait_IMAGE_WIDTH 0x38U /* Image width in pixels */
      #define ImageWait_IMAGE_HEIGHT 0x18U /* Image height in pixels */
      #define ImageWait_IMAGE_SIZE 0xA8U /* Image size in bytes */
      #define ImageWait_IMAGE_FILE_NAME "waitImage_small.bmp" /* Image file name */

      extern const byte ImageWait_Pixmap[0xA8]; /* Image pixel bitmap */

      PIMAGE ImageWait_GetImage(void);
      /*
      ** ===================================================================
      ** Method : ImageWait_GetImage (component BWimage)
      **
      ** Description :
      ** Get image information.
      ** Parameters : None
      ** Returns :
      ** --- - Pointer to structure TIMAGE
      ** ===================================================================
      */

      /* END ImageWait. */

      /*
      ** ###################################################################
      **
      ** This file was created by Processor Expert 3.08 [04.39]
      ** for the Freescale HCS08 series of microcontrollers.
      **
      ** ###################################################################
      */

      #endif /* ifndef __ImageWait */

      It seems that the latest Processor Expert does not include the BWimage component, but similar tools can create an array of data from a black and white image. I’ll dig into this more

      I hope this helps as a starter?

      Like

  4. Hi Erich,
    I am trying to use the SEGGER_RTT module from the McuOnEclipseLibrary repo.
    Can you tell me why the McuLib.h file is included in the SEGGER_RTT_Config.h file ?
    It did not seem to be included in previous versions of the files (before 1st april update).
    I would like to avoid including any file outside of the SEGGER ones.

    Regards.

    Like

    • Hi Nathan,
      It is used because some ‘global’ settings from McuLib.h/McuLibConfig.h are used, for example McuLib_CONFIG_SDK_USE_FREERTOS.
      That’s currently the only setting (so you could hardcode that one), but in the future other settings might be added.
      I hope this helps,
      Erich

      Like

    • There is no technical limiation for a larger font size, but the ones I have implemented are going up to 24 pixels. I had no need for larger fonts.
      But you certainly can create your own and larger font.

      Like

  5. Pingback: McuOnEclipse Components: 1-July-2018 Release | MCU on Eclipse

What do you think?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.