On SourceForge I have published an update of the McuOnEclipse software components, with following major changes:
- FreeRTOS updated to version V8.2.2 which comes with TLS (Thread Local Storage) support and GDB debug helpers.
- Percepio Trace updated to V3.0.2 with the release of Segger Real Time Terminal (RTT) for continuous trace streaming.
- FSL_USB_Stack with alternate USB initialization to deal with an issue in combination with the Kinetis SDK v1.3.0
- GenericI2C and GenericSWI2C have added support for custom I2C bus handling.
Updating the Components
Updating the components is simple: download the latest zip package from SourceForge (https://sourceforge.net/projects/mcuoneclipse/files/PEx%20Components/), unpack the archive and then import the components *.PEupd files into Processor Expert (see “McuOnEclipse Releases on SourceForge“).
FreeRTOS is now at version V8.2.2:
FreeRTOS from V8.2.1 includes a cool new feature: Tread Local Storage (TLS, see http://www.freertos.org/thread-local-storage-pointers.html). With TLS I can store data in the task control block and then access it from other tasks without the need for global variables which I then can access from other threads:
The number of thread local storage pointers can be specified in the properties:
As a cool extension for the ARM port, the component can add now GDB helper scripts to simplify thread debugging (see “FreeRTOS ARM Thread Debugging with Eclipse and GDB“):
Percepio Trace V3.0.2
Percepio Trace component has been upgraded to V3.0.2 version which includes the V3.0.2 version of the Segger RTT trace (see “FreeRTOS Continuous Trace Streaming“):
FSL_USB_Stack with Kinetis SDK V1.3.0
There seems to be a bug in/with the Kinetis SDK V1.3.0: With the Kinetis SDK V1.3.0 components installed, there can be issues that for inherited components the wrong or no components are found/assigned. The problem manifests that previously working projects fail with an error like
No inherited component assigned; Failed to create component/template: Init_USB_OTG_VAR0
A workaround is to disable the Kinetis v1.3.0 components in the workspace preferences and then do a restart of Eclipse:
But this workaround prevents usage of the Kinetis SDK 1.3.0 components, so only works out nicely if not using Kinetis SDK components in the workspace.
The other workaround (recommended is) is to use an ‘outside’ component instead of the ‘inside’ inherited one. For this, add the Init_USB_OTG component from the Kinetis Repository to the project:
Make sure that the USB_Init component is using proper settings:
- Clock gate enabled
- Module Clock frequency: 48 MHz (choose proper clock source/prescalers from the available settings)
- External object declaration: extern uint8_t g_Mem;
- Address: ((uint32_t)&g_Mem)
- USB Interrupt request: disabled
- USB ISR name: USB_ISR
- Call Init Method: yes
In the FSL_USB_Component have the ‘Inheritied USB Init’ disabled, and use instead the function name specified (default ‘USB0_Init’):
That way the FSL_USB_Stack Init() function will call the Init_USB_OTG Init function:
It’s not an ideal way, but until that problem with the Kinetis SDK V1.3 is solved (if ever?), I don’t have a better solution 😦
UPDATE: another solution instead to update the component and use the outside linking is to disable the ‘Init_USB_OTG_VAR0.dev’ template file. That file is present where the components have been installed:
UPDATE2: an even better way is to apply the following fix to the Init_USB_OTG_VAR0.dev file: https://github.com/ErichStyger/McuOnEclipse_PEx/commit/a1dec2d8d260bc5fc822e961316781a89f152db6
FSL_USB_CDC_Device with Standard I/O Functions
To simplify using the USB CDC with shell components it has now three additional standard I/O functions implemented:
GenericI2C and GenericSWI2C Custom Bus Handling
Sometimes it is necessary to control the I2C bus transaction on a lower level. For this, the GenericI2C and GenericSWI2C components have added functions and interfaces to deal with this:
The new update comes with a few larger and smaller extensions and updates. I hope that new release is useful for everyone. The release with the full release notes can be found on Sourceforge: https://sourceforge.net/projects/mcuoneclipse/files/PEx%20Components/
Happy Updating 🙂