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.
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:
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/)
The driver has been improved for better performance. Additionally it supports the SH1106 driver:
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.
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).
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
- Release on Sourceforge: https://sourceforge.net/projects/mcuoneclipse/files/PEx%20Components/
- Component installation instructions: McuOnEclipse Releases on SourceForge
- McuOnEclipse Library on GitHub: https://github.com/ErichStyger/McuOnEclipseLibrary
Very good!. Anyway, when you are going to create the library for the classic LCD driver SSD1963?
LikeLiked by 1 person
I have not used any SSD1963 in my projects (and I do not have that display), so I did not had the need for that driver. Any contributions are welcome!
LikeLike
Hi,
I have downloaded McuOnEclipseLibrary-master.zip file but have no idea how to add or update new components to Components Library in PE.
Marceli
LikeLike
See the links at the end of the article, for example https://mcuoneclipse.com/2014/10/21/mcuoneclipse-releases-on-sourceforge/
LikeLike
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
LikeLike
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?
LikeLike
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#?
LikeLike
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).
LikeLike
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?
LikeLike
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.
LikeLike
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?
LikeLike
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?
LikeLike
The frequency of the clock or the frequency of the I2C component can interfere with the writing?
LikeLike
Not sure what you mean? If you are using the GenericSWI2C component, then yes, the CPU clock frequency pretty much drives how fast your I2C can be.
LikeLike
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?
LikeLike
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?
LikeLike
Hi Will,
I have added another example how to use DrawMonoBitmap here: https://github.com/ErichStyger/mcuoneclipse/tree/master/Examples/KDS/FRDM-K64F120M/FRDM-K64F_SSD1306
I hope this helps?
LikeLike
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.
LikeLike
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
LikeLike
Yes it helps thanka you. I will hardcode the define as you suggest.
LikeLike
Hi Erich
Is it possible to use a font larger than 24? I found only 8 to 24.
LikeLike
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.
LikeLike
Pingback: McuOnEclipse Components: 1-July-2018 Release | MCU on Eclipse