McuOnEclipse Components: 12-Mar-2017 Release

I’m pleased to announce that a new release of the McuOnEclipse components is available in SourceForge, with the following main features and changes:

  • Wait: Busy-Waiting using ARM DWT cycle counter
  • Percepio FreeRTOS+Trace: Updated to version 3.1.1, simplified usage of streaming and snapshot mode
  • GenericSWI2C: MCUXpresso SDK can be used with the bit-banging I2C driver support
  • FreeRTOS: includes updates of the 9.0.1 release, ‘optimized task selection, enabled MPU support (experimental)
  • Graphical GUI drivers for screens, windows, icons, headers, text widgets and more
  • SSD1351: display driver for Solomon Systech SSD1351 display
  • More components are now supported by the McuLibConfig settings
  • Many other smaller bug fixes and enhancements

Cycle Counting for Cortex-M

The KinetisTools component has been extended with functions to count the execution cycles on Cortex-M with DWT (see “Cycle Counting on ARM Cortex-M with DWT“)

Cycle Counting Functions

Cycle Counting Functions

Wait with ARM Cortex DWT Cycle Counter

The Wait component now can use the ARM Cortex DWT cycle counter for a more accurate busy-waiting (see “Cycle Counting on ARM Cortex-M with DWT“).

The component has a setting which can be turned on for ARM Cortex devices, and if it is an ARM Cortex-M3, M4 or M7, it will use the DWT cycle counter register.

Wait with Cycle Counter

Wait with Cycle Counter

The Cycle Counter gets initialized and started in the new Init() function:

Wait Init and Deinit

Wait Init and Deinit

Compared to the simple (default) ‘nop’ instruction burning, using the cycle counter provides a better accuracy. Additionally the waiting considers that way interrupt time too.

Below is a 10 ms pin toggling using the cycle counter usage (ARM Cortex-M4):

Using Cycle Counter

Using Cycle Counter

Which is better than the ‘burning NOPs’ method:

Wait with NOPs

Wait with NOPs

SD1351 and Graphical GUI Components

The Hexiwear (see “Hexiwear: Teardown of the Hackable ‘Do-Anything’ Device“) uses a Solomon Systech SSD1351 OLED display. For a university research project we are rebuilding the drivers with Processor Expert. For this there is now a Processor Expert component featuring the SSD1351:

SSD1351 Processor Expert Component

SSD1351 Processor Expert Component

SSD1351 Properties

SSD1351 Properties

On top of that, there are now several GUI (Graphical User Interface components) available:

GUI Components

GUI Components

They use the object-oriented Processor Expert approach, and with them I can create screens, windows, headers, icons, text with graphical fonts. Below is an example on the Hexiwear with a multiple choice question to answer on the device :-):

Hexwear GUI

Hexiwear GUI

Compared to the original Hexiwear GUI its footprint (RAM, Flash) is much smaller as more targeted for small displays and embedded microcontroller. Additionally the GUI allows navigation and selections using the capacitive touch buttons of the Hexiwear.

An example how to use the components is available on GitHub.

Percepio Trace V3.1.1

The Percepio FreeRTOS trace library has been updated to the latest version V3.1.1 (see https://percepio.com/2017/03/03/tracealyzer-freertos-v3-1-1-better-eclipse-support/). With the new component and version several new settings have been added. It is now possible specify trace enable settings for snapshot and streaming mode. Asserts in the code can be turned off and a separate user event buffer is supported in the settings:

Percepio FreeRTOS Trace

Percepio FreeRTOS Trace

The component works nicely with the new Percepio Eclipse plugin (see “Percepio FreeRTOS Tracealyzer Plugin for Eclipse“).

Summary

For the full history see the commits 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.

I hope you find the new release useful for your projects.

Happy Updating 🙂

Links

Advertisements

23 thoughts on “McuOnEclipse Components: 12-Mar-2017 Release

  1. [ Calimero mode ON]
    What torment to see every time your component updates or new tuto.
    I (and friends) do not use processor expert ; Eclipse and all the interfaces and settings of the environment being already very complex and expert processor even more.

    Why Erich Styger is not a fan of basic pairs of .h .c files ??!!
    sniff
    [ Calimero mode OFF]
    Thank you for your work. PE will never make us flee so much your contents are interesting !

    Like

    • [Calimero response mode ON]
      I think you might have missed several points about Processor Expert:
      1) It actually simplies using Eclipse and developing drivers/software for these very complex ARM Cortex devices. So it is the other way around: it makes it very simple and easy.
      2) Processor Expert generates normal C source files and header files. If you love normal pairs of .c and .h files, you are a lover of Processor Expert.
      3) Erich Styger is a big fan of basic pairs of .h and .c files too. That’s why he is using Processor Expert.
      4) Because not everyone likes GUI tools like in point 1), that person in point 3) publishes on https://github.com/ErichStyger/McuOnEclipseLibrary the source code for others .c and .h lovers.
      [Calimero response mode OFF]
      Thank you for your comment (appreciated!). Not every tool and every development method works for everyone. Processor Expert is not perfect as no tool is perfect, but it is really a productivity tool.
      Maybe similar like moving from pure assembly coding to C/C++: like there are many benefits for using assembly (I still use it!), I don’t want to go back to build my systems in full assembly code as in early days.
      As always, there are pros and cons, but I try to make things available both for the Processor-Expert-Lovers and the ones who don’t want or cannot use it 🙂

      Like

      • Besides integrating expert processor to eclipse which is already a big gas factory, I do not understand what processor expert does.
        For years I use PE to quickly find how to initialize a device but the generated code seems very complicated and scattered in a structure that I do not understand.
        There’s a nice article topic : PE for long-time Dummies !

        Like

      • What it does is keeping track of all the different clocks, the pin muxing and other resource usage and reports any conflicts. I use it as well to initialize the device (and copy that code), because what it generates actually works and can be used as a reference implementation. The Reference Manual description usually leaves a lot room for interpretation, and with Processor Expert I get working code.
        The other benefit I was using with a lot of projects: it allows me to quickly move an application say from an S08 to a ColdFire or to an ARM core, as with the hardware components (SPI, UART, I2C, GPIO, etc) it gives me a hardware abstraction. The downside (as you mention) is that as any other tool I have to learn it and to learn how things are done. Still, I can take it as a ‘working example’ and then do it my way if I like to do it differently.
        The other thing what it does (and that’s the reason why I provide these components): it is a nice way to distribute software using a component model, years before ARM came up with CMSIS-Packs.

        Liked by 1 person

      • I agree with PO. The best programmers write simple code, in simple to find .c/.h files or other languages.

        I have yet to try a tool that produced simple to follow code that is amicable to Code Inspections or MISRA compliance, which are required in may safety sectors of Industry. It is my liability that is on the line in the products that I ship, not the tool vendor’s. ‘Productivity’ is of no value if you can not be sure what the generated code does or will do in obscure corner cases.

        KDS 2.0 is somewhat of an improvement over PE. In KDS 2.0 the source code can at least be found, it is not hidden in abstractions of abstractions of abstractions five header levels deep unlike PE code I’ve looked at.

        MISRA – The Motor Industry Software Reliability Association
        https://www.misra.org.uk/

        Introduction to Code Inspections:

        http://www.ganssle.com/inspections.htm

        “What’s the cheapest way to get rid of bugs?

        Don’t put them in in the first place.”

        Especially important in something like a satellite…

        For you satellite have you considered SPARK? This is the language that is used when “must not fail” is the important bit. The tools must match the application, we should not use the tools simply because we know them well if they do not fit the safety requirements for the project.

        Like

  2. I had a similar question. These components you have released, do they work along with KDS or is it a choice between PE and KDS at that level? I just did my first full project using KDS 2.0, and found that even with the included demo examples, it took a lot of pulling at the edges to understand what things connect to what. For instance, I wanted to try using a DWT based counter, but the only example I found had it mixed in with a DMA analog event so that it was just very complicated to sort out where one started and one ended for a different use case.

    I’ve hesitated to use PE because of earlier experiences that it created dependencies that were just too complex to maintain otherwise. It seemed like a great tool to get things up and running, but harder to really use for longer term development.

    What would be ideal in your opinion? You mention using PE to kind of setup a project and perhaps get specific examples that function, but that you potentially would replace once you have that pattern to start from. And then there is the portability side of all of this that you mentioned.

    I guess on one end we would have the safety and traceability requirements of some projects that need to have things to be clear enough for a person to understand quickly and on the other end we would have something that may be completely obfuscated for readability but is completely maintainable via some clear and simple interface. Something like a GUI programming environment that has a lot of low-level tricks available and only really creates assembly or a complex but highly optimized source would be a potential example of the latter.

    Like

    • These components I have released, they work on one hand in a ‘normal’ way with Processor Expert. On the other hand most of them can now be used with the SDK v2. That means that they use SDK API functions as you would do ‘by hand’. For example if you use the LED component, all what you have to do is to specify the port and pin plus if you want to have the component to care about the muxing, and it will do this all for you, as you would have done it manually. But on top it provides functions to turn on the LED or turn it off (depending on the connection to the microcontroller). No magic behind this, it simply helps to get started with the SDK too, and enables me (and my students) to get up and running quickly. The other benfit is: as there we have many, many applications with Processor Expert, it allows us to migrate to the SDK: the application logic is using LEDs, accelerometers, radio transceivers, etc, and Processor Expert is simply the hardware abstraction to it, with a GUI front end to configure the drivers. Now with Processor Expert not available for the SDK v2, we started adding the glue logic to have our own components work with the SDK.
      And for the hundreds (if not thousands users out there using the McuOnEclipse components).

      Liked by 1 person

  3. Hello Erich!
    Error component GenericSWI2C
    only PE,not SDK.

    CPU MK20DX50

    D:\workspace_RS\Conv6x\Debug/../Generated_Code/I2C1.c:940: undefined reference to `SDA1_Init’
    D:\workspace_RS\Conv6x\Debug/../Generated_Code/I2C1.c:941: undefined reference to `SCL1_Init’

    Like

  4. Pingback: Better FreeRTOS Debugging in Eclipse | MCU on Eclipse

  5. Is there a way to roll back to a previous version? I imported the latest and came accross some issues i dont have time to fix

    Like

  6. Pingback: Tutorial: Using Eclipse with NXP MCUXpresso SDK v2 and Processor Expert | 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 )

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