McuOnEclipse Release 10-Jan-2016

With the start of the new year 2016 I have published a new McuOnEclipse component release with the following major updates:

  1. Updated Segger SystemView and Real Time Transfer (RTT): added terminal functions and extra interfaces
  2. Improved USB CDC with serial number handing
  3. FreeRTOS TaskList shell command
  4. USB Stack: added MSD Host support for MCF52259, added support for K24FN120 and for the 100 MHz K20 devices
  5. New NEOMatrix component for Adafruit NeoPixel Matrix displays

    256 NeoPixel Matrix with FRDM-KL25Z

    256 NeoPixel Matrix with FRDM-KL25Z

Segger SystemView and Segger Real Time Transfer (RTT)

Both the Segger SystemView and Segger Real Time Transfer components have been updated to v2.26. The main changes are:

  • Code has been linted with PC-lint
  • The memory for the task list is now statically allocated (not using malloc()).

The static memory allocation for the task list was problematic because malloc() or the FreeRTOS memory allocation was called from an interrupt context. I have changed the implementation to use static allocated memory, but this requires that the maximum number of tasks needs to be specified at compile time.

Segger SystemView 2.26

Segger SystemView 2.26

Make sure you download the SystemViewer executable and package from https://www.segger.com/systemview.html:

  • Now includes a Mac and Linux version
  • The SystemViewer executable speed on the host has been improved
  • Better UI and scrolling support
  • Added Terminal view

For the terminal view, there are extra functions to print messages (standard, error and warnings) in the component available. Print(), Warn() and Error() send strings to the host, and there are printf() style functions available too. I can select between processing the open arguments on the host or on the target. Additionally, functions to log enter and exit of ISR’s have been added:

Segger SystemView ISR and Printf Functions

Segger SystemView ISR and Printf Functions

With the printing functions, I can now print messages, warnings and errors to the SystemViewer and show them in a ‘Terminal’ view:

Segger SystemView v2.26 with Terminal View

Segger SystemView v2.26 with Terminal View

USB Stack

In order to differentiate between different USB CDC devices (see “USB CDC with the Raspberry Pi“), a new ‘serial number’ property has been added to the USB CDC device properties:

USB CDC Device Serial Number

USB CDC Device Serial Number

Up to 28 characters are supported. I was thinking to add an option to use the Kinetis UID, but only if there would be demand for this. Bus reported device and Bus reported vendor strings can now be smaller than 28 resp. 14 characters (they all use now a flexible limit of 28).

The USB stack now has support for the 100 MHz K20 devices plus for the K24FN120. Additionally, the MCF52259 is supported in MSD Host mode.

RingBuffer

The ring buffer component has two new methods added:

  1. Compare() to compare against a list of items
  2. Putn() to add multiple items to the buffer
RingBuffer Compare and Putn Methods

RingBuffer Compare and Putn Methods

FreeRTOS

In FreeRTOS, the tasks are not listed anymore with the ‘status’ command. Now there is a dedicated ‘tasklist’ command which lists information about the tasks. Compared to the previous output it adds more details as the task handle, the base and actual priority plus runtime information (which must be enabled).

FreeRTOS tasklist command

FreeRTOS tasklist command

New NEOMatrix Component

To simplify using the Adafruit 8×8 NeoPixel Matrix, there is now a new component NEOMatrix. The component works with the graphical font and graphics (lines, circles, etc) library.

NeoMatrix Library with Graphical Libs

NeoMatrix Library with Graphical Libs

NeoMatrix Properties

NeoMatrix Properties

NeoMatrix Methods

NeoMatrix Methods

An example project using it is on GitHub here: https://github.com/ErichStyger/mcuoneclipse/tree/master/Examples/KDS/FRDM-KL25Z/FRDM-KL25Z_NeoShield which uses a 16×16 (4 8×8 modules) pixels showing the graphical font:

64 NeoPixel Matrix with FRDM-KL25Z

16×16 NeoPixel Matrix with FRDM-KL25Z

The component handles flexible matrix wiring. Any pixel of the matrix can be individually addressed.

With the graphics library I can draw lines/circles/etc:

Graphical Display Library

Graphical Display Library

With the graphical UI library I have access to common user interface elements:

Graphical UI Library

Graphical UI Library

With the graphical font library I can draw text:

Font Library

Font Library

Summary

The new components add many extensions plus several bug fixes. The updated Segger RTT and SystemView is a real gem for me. And the NeoMatrix component is now used in three different projects too :-).
You can get the new files and release from SourceForge: https://sourceforge.net/projects/mcuoneclipse/files/PEx%20Components/. I hope you enjoy it.

Happy McuOnEclipsing 🙂

Advertisements

9 thoughts on “McuOnEclipse Release 10-Jan-2016

  1. About USB-Stack
    Interesting is the introduction of Serial Number for CDC devices.
    But, if is not possible to be set with the Kinetis-UID, at least is useful a method to set S/N and not via properties of component… this require a build/compile for every device.
    What you think Erich?
    Thank

    Like

    • Hi Antonio,
      yes, as noted in the article, I think about adding an option to use the Kinetis UUID for this. It only would mean that the descriptor would use RAM and not FLASH as the UUID would need to be written to a RAM location. Of course it would be possible to re-program the descriptor in FLASH at runtime once, but that’s yet another step. Not sure when I will be able to implement this.

      Like

  2. Hi Erich!

    I now that here isn’t the correct place to make this question… But I don’t know how can I talk with you in another way. I really like your work on this blog, for me your articles are essentials for my academic projects.
    I’m working with the KL27Z microcontroller, and I’m having some dificult to make the USB CDC communication work.
    I implement the USB CDC example provided by KDSK 1.3 – “virtual_com” and it works well in the FRDM-KL27.
    My problem is how can I change the target processor of that example. In another words, I’m working with the KL27Z256 microcontroller, because I need more ROM memory than the KL27Z64 is able.
    I’m my project everything is working nice(SPI and the LPUART), but I tried many of ways to make a comunication with the kl27z256 and I don’t have any success.
    Do you have some way to do this or can you indicate a documentation based on aplication where I can change the target processor configuration?

    Thank’s, sorry my english!

    André Wille Lemke, Electronics Engineering Student.
    Federal University of Pelotas – Brazil

    Really thank you for taking your time…

    Like

    • Hi Andre,
      nice to hear that you like my blog and that it is useful for you. I have not used the KL27Z, and I have not checked all the details. But I would think that the KL27Z256 is simply a KL27Z64 with the same core/peripherals, but just with more RAM/FLASH. At least this has been the case for the other Kinetis L familiy devices I have used. Is only the USB communication not working? I would check if the interrupt vector location/number are the same. And I would set a breakpoint in the USB interrupt service routine to check if the interrupts are firing.
      The other thing I would double check is the clock if it is running with the needed frequency.
      I hope this helps, and many greetings and ‘good luck’ to Brazil!

      Like

  3. In the utility driver, (using ksdk 1.3.0)
    byte strtailcmp(const uint8_t *str, const uint8_t *tail);

    “byte” isn’t included in any of the include files, I assumed you meant to use “uint8_t”

    Like

    • Hi Jason,
      yes, this has been an oversight on my side, sorry for that. It has been already fixed on GitHub, and you should be able to apply the fix on your end as well. Let me know if you need any assistance?

      Erich

      Like

  4. Hello, Erich

    I have a customer who has a product running with a MK20DN256VLH7 and now he wants to update it to include more features in a new version of this same product. We chose MK22FN1M0AVLH12.

    Since he doesn’t have much time available, we are looking for the fastest way. The development platform used in K20 project is CodeWarrior v. 10.6.4 and MQX 4.2 (with Processor Expert in BSP).

    Since MQX 4.2 supports either CodeWarrior and KDS, and MQX 4.2 has only BSP, PSP, FATFS and USB libraries for KDS and decided to move to KDS, but it is a headache moving all the files from Generated Code folder and we found a lot of problems and errors hard to fix. Because Processor Expert differs from each other between the IDE’s.

    USB-MSD-Host is not a problem because we have a demo in MQX for KDS we can use as reference.

    So we thought that we could take another way: Creating a new project with K22 in CW 10.6.4 and using your beans and demos (specially USB-HOST-MSD) as reference. Our great concern is about the peripherals initializations in MQX BSP. It seems that the most of code generated is independent from MQX and doesn’t use its drivers. Your USB-MSD and FAT-FS beans use FreeRTOS. We are not experienced with FreeRTOS and we don’t know how much of the code we can reuse and integrate to FreeRTOS.

    Do you think that would be a good idea?

    Thanks and regards,

    Marco Coelho
    Applications Engineer
    Siletec Eletronica

    Like

    • The problem I see with MQX (which I have not used much) is that its drivers are tightly coupled with the MQX RTOS. So adding or using the MQX BSP in my view will not be simple.
      You better look at the Kinetis SDK and use that with the K22FN, especially as this is the NXP way going forward (not Processor Expert and not MQX).
      I hope this helps,
      Erich

      Like

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s