Requests


This page is for you! If you’d like more information about something I’ve posted about, or if there is a topic you think I should post about, please leave a comment and I’ll get right to it (as fast as my schedule permits it)!

I have started to list things in my bucket list (still ongoing).

For feature requests or bug reports on the McuOnEclipse project end Processor Expert components, you should use the GitHub issue tracking system:

Advertisements

817 thoughts on “Requests

  1. Erich,
    I recently discovered a bug in some PEx-generated code for USB. The bug is brought in by invoking your USB component but I believe the problem lies in the Freescale USB Stack V4.1.1 when run on a K40 processor.

    PEx generates two files: wdt_kinetis.c and wdt_kinetis.h, that implement Watchdog_Reset(). The instruction in that subroutine: (void)(WDOG_REFRESH = 0xA602, WDOG_REFRESH = 0xB480); can cause a reset if an interrupt occurs between the two writes to WDOG_REFRESH. This is exactly what you were talking about when you wrote about Critical Sections.

    Watchdog_Reset() is called from usb_dci_kinetis.c, which also appears to be a Freescale USB Stack file.

    Since this code comes from a Freescale driver that I cannot modify and the offending code is re-generated every time I run Processor Expert, what can I do to fix it?

    Thanks,
    Greg

    Like

    • Hi Greg,
      I don’t think that case is a problem, because during the call to Watchdog_Reset() the interrupts are already disabled. Watchdog_Reset() is called from the delay loop in USB_DCI_Assert_Resume() which gets called from USB_Class_Initiate_Resume() which does a DisableInterrupts-EnableInterrupts around it. So there should be no interrupts in this case. Let me know if I’m missing something?

      And you can affect the code generation. First you can disable code generation for a component (see https://mcuoneclipse.com/2012/03/23/disable-my-code-generation/). Second you can directly change the code base used for the code generation, you only need to find out where the component sources are (see https://mcuoneclipse.com/2012/06/30/cde-hacking-where-is-my-stuff-a-dissection/). In my case the USB stack sources are in C:\ProgramData\Processor Expert\PEXDRV_PE5_3\Drivers\FSL_USB_Stack. So you could directly modify the sources there if you want.

      I hope this helps,
      Erich

      Like

      • Erich,

        Your description of how wdt_kinetis is used is correct, except I still have a stylistic issue with it. For a Watchdog Reset function to be sitting alone as it is with no comments regarding interrupts, what is the guarantee that future modifications to the software won’t call it while interrupts are enabled?
        In my case, that’s exactly what I did. I saw it sitting there just waiting to be called, so I called it. Then I started getting unexpected resets…

        Thanks for pointing me to the source code those routines come from.

        Greg

        Like

      • Hi Greg,
        Yes, I 100% agree with you. The Freescale engineers seems to have lumped toghther things for the USB stack that way, unfortunately. Well, there is a newer (better?) stack available in the Kinetis SDK V2.0, but I have not adopted that one because that legacy 4.1.1 stack works very well for what I need, and I did not had the bandwidth to learn that SDK v2.0 stack. Wrapping yet another EnterCritical()-ExitCritical() in the watchdog function could have a solution, but creating nested critical sections that way is not a a good thing neither. So I’m not sure what I should do, and the same time I don’t want to invest too much time into that stack. As for the watchdog, I have used my own routines outside of that one of the USB stack.

        Like

  2. Hello, Erich!
    I have a mini sumo project using the kl46z and four HC-SR04 for detecting enemies.
    I am having troubles with the lack of counters for both the echo pins (the timer units) and the motors.
    My question is if I can use more than TPM0, TPM1 and TPM2. I know they can have multiple channels, but I do not know how to use them

    Alex.

    Like

    • Hi Surdu,
      I would not use HC-SR04 for this task: it is simply not reliable and fast enough. You can use multiple timer channels, depending how you do the measurement. If you do the measurement one after each other, used dedicated pins for triggering the measurement and dedicated pins for the input capture signal.

      Like

  3. Hi Erich
    I am trying to communicate between FRDM-K64F and JY-MCU V1.06. I read your article about a pull-up resistor on the RX line that has to be pulled up. I am using KDS and processor expert. It wont allow me to enable the pull-up. CodeWarrior does allow. Does the Bluetooth_EGBT component do it?
    Is there an example I can follow.
    Also what is the advantage of using the Shell component?
    Thanks
    Eli

    Like

  4. Hi again
    Your program FRDM-K64F_Demo does communication between FRDM-K64F and JY-MCU V1.06.
    I think the download from GitHub needs to be run with Eclipse Kepler.
    What has to be done to compile it with KDS.

    Like

    • I’m using it in several projects with KDS, but probably have not published one of these projects.
      But simply create a new Processor Expert project with KDS, and add the bluetooth component to it and configure it for the UART you are using.

      Like

  5. Hi Erich
    I am trying to create a FreeRTOS project that has 3 tasks. If I enable 1 task it works. 2 or more tasks and it does not work. What am I doing wrong.
    I uploaded the project to GitHub under the name FreeRTOS example. (I think it is there)
    As always, your help is greatly appreciated.

    Like

    • Hi Eli,
      where did you upload it on GitHub?
      Have you checked your heap size (or checked the application in the debugger). I think your heap size is too small so you run into the ‘out of memory’ FreeRTOS hook.
      Erich

      Like

  6. The project is on GitHub at EliNaiman/FreeRTOS-example
    My code does not allocate any memory.
    Once it is working, this should be an example for beginners like me.

    Like

  7. Hi Erich
    In the FreeRTOS-example that is working, I added the following lines in main.c just before going to Run_Applications();

    /* pull up Rx pin (PTC14) for Bluetooth module */
    PORT_PDD_SetPinPullSelect(PORTC_BASE_PTR, 14, PORT_PDD_PULL_UP);
    PORT_PDD_SetPinPullEnable(PORTC_BASE_PTR, 14, PORT_PDD_PULL_ENABLE);

    The system hangs. I think it is causing an interrupt to occur. How do I take care of this.
    I am using the K64F.

    Like

  8. Hi Erich
    I have a question about Bluetooth. I am using the K64F with HC-05 as master and I am communicating with an android tablet.
    If the two are not paired, I use the LINK command, I get a prompt on the tablet to enter a passkey and the two are paired and I am able to send messages back and forth.

    I then turn off the power and then turn on the power on the K64F, I would like the two to reconnect without the prompt. How do I do that?
    As always, I truly appreciate your help.
    Eli

    Like

    • The HC-05+FRDM-K64F automatically are waiting for a connection. What you have to automate is the issue of the Link on the Android. So you would have to change the Android side for this.

      Like

  9. Hi Erich,

    I am interested in the one-wire library but to use on an ESP32 platform with FreeRTOS.
    I looked at the github repository as well as on sourceforge but could not find the “normal” source code files.

    Any hints where I must look?

    Thanks

    Like

  10. Erich
    Can you give me a link to a starting point for using your PE system with the Kinetis SDK v2.2 please?

    I have to change from MQX to FreeRTOS and SDK v2.2 and wanted to use PE. I used PE a long time ago, v10 and before with CodeWarrior but was blocked because of missing BSP’s for parts I was using and so on. So we switched from PE because MQX was limited with PE.

    And now I find the SDK documentation very difficult to follow with no explanation of why a particular design is being done and just basically incorrect (function calls that do not exist, incorrect numbers of parameters and so on in the example code). So I wanted to go back to PE but I am not sure how to start. I have followed your work for sometime now and always appreciated your clear explanations. I noted that you at one point did not have a way to integrate PE with the SDK v2.2 and that FSL/NXP had stopped the integration with PE after SDK v1.3 but am hoping now that you have found a way through the maze, or I may have misunderstood your recent post. The end result is I am trying to start over again by not sure how to begin. Could you point me to a project that you have done that uses a USB FAT system and or an i2c driver please? There are a lot of projects and ways to fail, so i am looking for a starting point if possible. Thanks.

    Robert

    Like

  11. Hi Eric

    A second question please… I over looked. What would be the starting point to get the IDE working? I have KDS installed but also Atollic and would like to use Atollic if possible. Is there a guide to follow to install all the bits and pieces? It used to be a lot of loading of modules into eclipse and I am not sure I remember the steps. I tried to use KDS V3.2 recently with another group and we could not even read the registers of the core peripherals. We tried various google suggestions but failed so we used IAR instead. But I realize eclipse is the key requirement for starting with PE and following your teachings so that is where I want to begin. Thanks again.

    Robert

    Like

  12. Hi Erich!
    I’ve beeing reading your stuff and it’s wonderful what you’ve done here…
    I’m new in this story of embedded system… but I’m enjoying about it in your website.
    I want to use event counter in KL25z, but I always fall into a Cpu_ISR, It looks like int cannot convert some value and stop there.
    Can you please publish a post about event counter. to count external event?

    Thank you!

    Like

  13. Hi Erich,
    I am doing my Master thesis at Lund University, Sweden. I need to design a debugger for a customized Processor. I know what all the things i need to do at the hardware part. But coming to software part i came to know that i need to use GDB and OpenOCD. I am unable to find the design information about these debuggers and what all changes i need to do in them so that i can debug my processor. If you can help me to know about these debuggers in detail will be helpful for my thesis.

    Thank you!
    Dinesh

    Like

      • Hi Erich,
        Thank you so much for the reply.

        I can explain you my thesis in detail.
        I am doing my thesis at a company. They have a customized Processor built on their own. They want me to develop a debugger for that processor. I have implemented Jtag to AHB which connects to the processor. This is on the Hardware part.

        I am using Bus blaster from Dangerous Prototypes to debug this Processor and this Bus blaster uses GDB,OpenOCD and Telnet. In my research i understood that this OpenOCD is compatible to only MIPS and ARM Processor’s. Now i need to make their customized processor also compatible to this OpenOCD. I am stuck at this point. I don’t know what all changes i need to do in these debuggers so that these are compatible with that processor. Most of the sites are explaining oh how to use but not how to add a New target to these debuggers.

        My questions is Do you know how to add a New Target to GDB and OpenOCD debuggers?

        Like

      • I’m affraid that I don’t know that level of details. In any case, as long as your processor uses the standard JTAG access method, you don’t have to change OpenOCD itself. All what you have to do is to add the flash programming and low level register access to it. On the GDB side you should not have to do much (if anything), as this should be handled by the plugin. However, as you have a custom processor with a different instruction sets, you would have to add that to GDB, but I would have to dig into details for this first, but I doubt I won’t be able to do this in the near term.

        Liked by 1 person

  14. Dinesh, how much work you have to do depends on your definition of “custom processor”.
    If their processor is a custom part built around a stock ARM Core, then its not really custom, only the peripherals are.
    But if the core itself is custom (running its own instruction set) then you have a big job.
    I suspect its the former.
    In which case you need to make sure that the registers in the processor that identify the specific ARM Core are presenting that data correctly. Then the debugger should adapt. You may have to select the core when configuring GDB as well.
    That’s my 2 cents.

    Liked by 1 person

  15. Hi Erich,

    I am trying to port code written for stm32f10 MCU in the IAR embedded workbench to codeblocks that has GCC. Could you help me with the same? I do not seem to find a free plugin for the same.

    Thanks,
    Aakash

    Like

  16. Hi Erich,
    I have a K64F with an HC-05 module communicating to a tablet via Bluetooth. The HC-05 is a MASTER and the tablet is a SLAVE. (working great)

    If the slave shuts down, how can I detect that on the K64F when the HC-05 is in automatic connection work mode.

    Thanks
    Eli

    Like

  17. Hi again
    I found the solution. The STATE pin on the HC-05 goes LOW when the slave disconnects.

    I now have to figure out what to do when the slave starts up again.

    Thanks
    Eli

    Like

  18. hi erich, im making a car with navegation per compass and i would know ,how set up the component MAG3110 is a magnetometer and i need the information of cardinal point for be guided per bluetooth for example i send that the car go 5 meter south , 2 noth etc

    Like

    • My feedback is that this will be very hard to accomplish unless you have an absolute position sensor. The compass alone will not help you to reach that goal as it will not be accurate enough.

      Like

      • Yes, but I know it will not be so accurate because it is for practical purposes only demonstration or with you recommend me to do? There is another component that I can use besides the mag3110 but I would still like to know if you can help me to configure this component.

        Like

      • But the compass I only need it to indicate the points and with the programming, with the variations that the compass can make in those points as a starting point to say so.

        Like

      • ok im read the information but can you say me ?whats device or component or sensor can i use for this project i was thinking in giroscope but is there any way to do something similar.

        Like

      • As I don’t know your requirements, I only can give a very generic advice. If you want to move on the ground something to an absolute position, you need an absolute position sensor. Accerlerometer and Gyros will give you only relative information. Due the nature of intergration, you are inherently accumulating the errors: the more error and the more time, the bigger the delta. You can reduce the error with better sensors, sensor fusion and with using an absolute reference point.

        Like

      • A GPS module and antennae is well under US$10 in modest volume. (like 1k)
        If you use a board-mount antennae, then balancing the load, or signal matching, can take a few weeks (we’ve done that). But if you just run to an SMA-A connector (and feed your 3.3v supply through a ferrite to the antennae signal to power an “Active Antennae”) then its easy.

        We use Venus modules from SkyTraq in Taiwan. It has the receiver, LNA, crystal, and passives all in one device that looks like a plain chip. There is a breakout board with the module mounted available for $50- online @ Q=1 from … SparkFun, I think (googling) here it is:
        https://www.sparkfun.com/products/11058

        connect the antennae, apply power, and seconds later the Serial TX pin will start pumping out an NMEA message @ 9600 baud exactly once-per-second. You don’t have to do a thing.
        Message has lattitude, longitude, altitude, and ground-speed IIRC.
        And its all plain ASCII text, readable, with a CR at the end of each line.
        As my buddies from Hong Kong would say: “Piece of cake, man!”

        Like

      • yes, But what would be that sensor to achieve that absolute position would be the accelerometer or the gisroscope?

        Like

      • Excuse me, I better have to ask what sensor I can use to achieve the absolute position or no solution

        Like

      • if you have minimal or no slippage, use an high resolution quadrature encoder for the wheels. In addition to that, use an absolute distance sensor to a known reference point. Outdoor, you could use a GNSS or referential GNSS system. You could use a laser scanner or ToF sensors. It really depends on you requirements: how accurate, for how long, etc.

        Like

      • maybe for 10 or 20 minute but is there a form for save the moves in the area for example the first move or that you propose

        Like

      • hi erich, i managed to configure the componet mag3110 and investigating from there i found that magnetic field of the motors can be isolated but when i try the sensor it does not give me any value or any thing i only have the freescale connected only and still does not give me a value of anything

        Like

  19. Hi Erich,
    I have a doubt in the Hardware Breakpoints. While i am implementing the Hardware Breakpoint i came across the address comparison. The address where you want to put a break point will compare with the PC and if both are equal then it is a Break point.

    Is this the only way to implement hardware break point or there are any other ways to implement hardware break point at the RTL level.

    Regards,
    Dinesh

    Like

      • I’m not sure if I can (or even should) give you an advise on such a general question? The thing is that designing a debug architecture in a processor is for sure not a simple thing. Think about bus access, propagation delays, possible caches and other impacts.

        Like

      • Dinesh, take a look at some of the open-source processors, such as the H32 and see if they have the debug features that you need. You should be able to “borrow” the features that you need from another completed, fully debugged, project. And then (ideally) use their GDB drivers and interface as well.

        Liked by 1 person

  20. Erich,

    Thank you so much for the time you have invested in making these processor expert components so useful and easy to use! I’m currently working on an older project that uses the USB CDC Device component version 1.045. I’m wanting to update the components in my project to the most up to date version released. My problem comes with the shell and xformat components that must be added to the project. I want to make sure that I’m not using any flash/ram for components that I do not plan on using. Is there an option I can use to disable the shell/xformat? Thanks in advance!

    Like

    • Hi Ryan,
      thanks 🙂 !
      There is no impact on RAM and Flash size if you add these two components, as long as you are not going to use the Shell or its functions. The reason why the Shell and Xformat components are referenced is because most users want to use the USB CDC with the Shell, and that way it is more easier and simpler to use it. Otherwise, the linker will remove any not used function or variable so there is not impact for you.
      I hope this helps,
      Erich

      Like

  21. Hi Eric,
    I have been reading your post on “Tutorial: Secure TLS Communication with MQTT using mbedTLS on top of lwip” . Its nice to see a port to a embedded processor and an example where someone actually works though the example. I have struggled to find any real examples on porting the mbed tls code to embedded processors and those running an rtos. The folks at ARM just say its light weight open source configurable library and have no real examples. You ever considered porting to another processor family like renesas synergy or doing an example of connecting to something like amazon or google cloud services?
    Thanks
    Matt

    Like

    • Hi Matt,
      I’m using that library connecting to Azure and MQTT brokers (several providers). I have not used Amazon or the Google could services yet, or using it with a different processor. I would love to do it, but my time is limited, and what I have to direct my time to is guided by what we get funding for at the university, and Renesas did not provide any (yet?) ;-).

      Like

      • Hi Erich,
        Yeah I know what you mean by limited time and funding. I would love to see an example that is more processor independent but understand getting the bills paid. Ill keep and eye on your posts and examples. I like what you do. Take care.
        Thanks
        Matt

        Like

  22. Hi Erich,

    We need to find good “hands on” training for an IDE such as MCUXpresso or CodeWarrior for a project using the MK10DX128VLQ10. Don’t care which IDE at this point as NXP support for MCUXpresso is almost nonexistent and an extensive search for training has turned up nothing in North America! Not interested in a “bucket” of incoherent poorly orchestrated tutorials. Have been trying to build a bare metal project based on a system I built 10 years ago using CodeWarrior, using both the MCUXpresso IDE and Configuration Tools only to find the config tools “project” cannot be imported into the IDE? Kevin Meyer at PEMicro was kind enough to spend a hour of his time to try and get the IDE to talk to my PCB only to find several “bugs” with the MCUXpresso IDE within the first 10 minutes. The MK10DX128VLQ10 apparently will not be supporter in CodeWarrior going forward?

    Please advise.

    Thanks,
    Mike

    Like

    • Hi Mike,
      I have not used any K10 in my projects, so I cannot comment much about this device, so not sure what problems you have faced. Usually connecting with P&E debug probes has been rock solid for me, unless I had an issue with the hardware/board itself. I see that the MK10DX128VLQ10 is supported in CodeWarrior, and it even has Processor Expert support :-). So it is supported in CodeWarrior. However, as pointed out in my blog, NXP does not plan to invest in CodeWarrior and Processor Expert, and everything going forward is with the MCUXpresso IDE, the MCUXpresso Configuration tools and the MCUXpresso SDK.
      About importing the configuration tool projects: at least currently, the tool generates sources files which then can be used by any IDE. I have used that approach (see https://mcuoneclipse.com/2016/06/08/tutorial-muxing-with-the-new-nxp-pins-tool/) and that worked for me. I’m sure there might be some closer intergration coming.
      Speaking about ‘hands on’ trainings: That’s what my students get here at the Lucerne University :-). I have created in the past trainings for external university partners or companies as a service. The challenge is that usually it cannot be a kined of ‘canned’ training, as every user/company needs special things. And the tools landscape is changing so fast (new Eclipse version, new features, …) that makes it hard to update things (or have paid for it). For more general tutorials I have decided to put things up on this blog which seems a good way. If you have any other suggestions or ideas, please let me know.

      Thanks!
      Erich

      Like

  23. Hello Erich,

    I am working on porting code from IAR EWARM to Atollic Truestudio (based on GNU ARM toolchain and Eclipse IDE) for STM32F103RD microcontroller. I have a few questions regarding porting of __ramfunc (IAR extension) to Atollic.
    I have added __attribute__((section(“.RAMFN”))) to all function prototypes and definitions that need to be run out of RAM and modified the linker script to
    { . = ALIGN(4); _sdata = .; /* create a global symbol at data start */ *(.data) /* .data sections */
    *(.data*) /* .data* sections */
    . = ALIGN(4);
    _ramfn_start = .;
    *(.RAMFN)
    *(.RAMFN*)
    _ramfn_end = .;
    _edata = .; /* define a global symbol at data end */
    } >RAM AT> FLASH
    However, I am not sure if/how the startup file needs to be modified to complete this port. It would be great if you could help me with this issue.

    Thanks,
    Aakash

    Like

  24. Hi Erich
    I enjoyed your description of the hike in the Dolomites. I hike too but here in Toronto we do not have mountains like the Alps. Nevertheless, it is still beautiful and rewarding to spend a day with nature.

    I want to report some finding. I am using the K64F and I have read that J2-18 and J2-20 are mixed up.

    I wanted to use one of them to drive a relay.
    When using J2-18 as an output line, on start up there is a pulse on the line and this activated the relay prematurely. Doing the exact same thing on J2-6 there is no pulse.
    I hope this could help someone trying to use J2-18.
    Eli

    Like

      • Erich is right, but its a bit trickier.
        The start bit is a 0.
        Then there is typically 8 data (and with no parity) a stop-bit = 1
        But you don’t know what’s coming between.
        If you get an odd number, then the bit after the start is 1, so you can measure the start-bit width to get the bit period.
        But if you receive “0”, then you have 9 bits in a row that are low (start plus data) … so its more complicated.
        Basically, you have to measure the time between transitions.
        Using those (and optionally the differences) you can find the narrowest, and that gives you the bit period.
        Some protocols have addressed this explicitly in order to build adaptive systems.
        The CAN bus in a car operates on a fixed clock, and micros on the bus needed a real crystal (before the days of internal clocks that are lazer tweaked on the production line) to communicate reliably.
        That drove up the costs.
        So, in the case of a convertible top, if you wanted sensors on the CAN bus at the front corners, you have 2 switches: “Seated” and “latched” (for manual) and maybe a couple outputs: “latch” and “un-latch” at each corner.
        They didn’t want to spend money on a crystal with every processor, so they invented the LIN BUS, which is a “sloppy CAN bus”.
        In LIN, the data starts off with a stream, equivalent to a UART sending 0x55, which as a data stream is just a square wave.
        The processors on the bus count the bit widths on the start of the data stream and use those to adjust their CAN receivers, and then communicate using that timing.
        Of course, these ultra cheap MCUs would operate from a simple oscillator that varied in frequency over temperature and over time, but that didn’t matter.
        The time period was adjusted for every message on the bus, which is much shorter in time than temp. changes.

        If you are designing your owns comms protocol, you can consider things like starting a message with “0x55” sent a couple times, so that you can easily put tiny micros with bit-bashed SW UARTs on the network.
        (NOTE: Sending 0x55 also “balances” the line, so if you’re on a differential line, such as RS-485 on long cables [I once deployed credit-card payment terminals over a SW network on RS-485 spanning 2 ski-hills, so several miles of cable] then you give the cables time for the voltages to settle around the middle, increasing the odds of receivers seeing proper timing, and reducing HW data errors … but that’s getting a bit esoteric relative to the original question, so I’ll stop here 😉

        Like

      • Thank you for your time Erich and Brian!

        You really added some useful information, sending the 0x55 message would really be the best way if I were working with my own protocol, I was thinking in a generic solution so it could be used like a “plug-and-play” listener.

        Like

  25. Hi Eric

    Do you know of any bsp setup for the FreeRTOS-IO and Kinetis kxx. The sourceforge forum appears to be down on doesn’t exist anymore and the only example is for the LPC processor.

    I am trying to use their code base for the i2c driver but there are references to pin specific structures that I don’t know how to map to pin_mux.c,h that I using.

    Can you advise on any example for kinetis or even a working support forum please? Thank you.

    Robert

    Like

    • I have not used the FreeRTOS I/O, and I think while the intention was a good one, I don’t see how this could be relevant without a massive effort. Instead, I’m using the vendor (NXP) provided SDK (MCUXpresso SDK) or Processor Expert with FreeRTOS as low level I/O for all the kxx (and other) devices. The MCUXpresso SDK comes with FreeRTOS and FreeRTOS enabled drivers. The easist way to start with it is with using the MCUXpresso IDE: download the SDK and add it, then you can create examples with (or without) FreeRTOS and with all the drivers. Reference: https://mcuoneclipse.com/2017/03/28/mcuxpresso-ide-unified-eclipse-ide-for-nxps-arm-cortex-m-microcontrollers/
      I hope this helps,
      Erich

      Like

      • Thank you for the reply Erich. The reason I wanted to try FreeRTOS I/O was I could not get the simplest i2c driver to work with the V3.2 SDK for our custom board. There is a labyrinth of board specific definitions for multiple projects and configurations in the SDK example code and in my estimation is a completely confusing mess.

        I can set the NXP whole system up to build and assign all the ports and so on but I do not get a working driver in the end. There are a multitude of callbacks and internal references with no explanation of design or significance. All I want to do is read a value from an accelerometer at address 0x68 which I can do with MQX relatively easy. However with the SDK I do not get a response with the single board master slave configuration. The choice was to try and sort out the NXP mess when I came across the FreeRTOS I/O and it’s promised simplicity. This was very close to the POSIX model that I am familiar with, so I paid the $195 and bought the license (I found out later I didn’t need to pay to try the software, my mistake). But after getting into the details, I find this code base is targeted to the LCP processor group with no explanation as to how to set up the BSP to work with another processor. The BSP was the main thing I wanted to avoid when I changed from MQX to FreeRTOS. I would not have gone down this path if I knew a BSP was a requirement for FreeRTOS I/O. Thisk product is promoted as very simple and easy to setup. I think it is easy to use when setup, but the setup is proving to be impossible in any reasonable amount of time. I think this is misleading in my estimation. Then also the SourceForge link has been down for two days which is used for support.

        Your site is the only one that has a good explanation for all the code examples. I wish that PE was still available, that worked correctly and was simple to setup. I think NXP has outsourced all the support off shore hence the convoluted single example for multiple boards, processors and configurations all wrapped up as one large ball of fuzz.

        What I am trying to find is a working SDK v3.2 i2c driver that I can understand and implement to read a few values. Any reference to that would be of great help. Right now I have been on hold for support at RealTime Engineers (Canada –> London) for 30 minutes. I am going to hang up, I don’t think there is anyone there…

        Thanks

        Robert

        Like

      • Ha ha! “I think NXP has outsourced all the support off shore hence the convoluted single example for multiple boards, processors and configurations all wrapped up as one large ball of fuzz.” We feel your pain!
        My programmer, James, fought with the I2C code for a couple of weeks. Eventually I sketched out a simple SW stack on paper with I2C string, word (start/stop/ack), and bit handling in 3 layers, and he implemented it using bit-bashing in less than 2 days.
        We used the same pins as the I2C function so that maybe, in the distant future, we can come back and use the HW support.
        But in general, we found the Kinetis code to be overly complex. You may find it worthwhile to study the CMSIS interface, write your own code to that, and then use CMSIS as your HAL for portability, and just ignore the higher-layer functionality from Kinetis which adds services, but is not portable across brands (we’re using STM32f, Kinetis, and Renesas Cortex parts)

        Like

      • Hi Robert,
        sorry for the late reply. What I are going through with the I2C driver is something I had to fight with on the SDK UART driver side: lots of not well documented interfaces, not clear callbacks, even wrong information in the documenation of the SDK. I had to do some reverse engineering and debugging to find out how it works to get a UART driver working with interrupts and a ring buffer (did not try the DMA version yet, as even more complicated).
        All this was very easy with Processor Expert, and now is very complex and ‘trial and error’ with the SDK. FreeRTOS is very easy for me, but here again how the SDK drivers implement that ‘RTOS driver version’ is not clear to me and overly complex too? I cannot give you much help on the I2C side (I have not managed to get to the I2C part yet, I wish I could. I plan to write an article about my UART experience, but tied up with too many things so I won’t be able to get to the I2C very soon :-(.

        Like

  26. I am developing firmware for an SAM4E8E,with Atmel studio 7. My software consists of a bootloader and an application. When I debug the application I place the firmware starting from the address 0x00400000, When I build the release version the application goes to a different address and at 0x00400000 I place the bootloader.
    To do this I manually modify my linker script “flash.ld” according with the need.
    Is it available a conditional compilation, or any other automated method, to define different address accordin to DEGUG or NDEBUG definition.
    Thanks
    Samuele

    Like

  27. Hello friends,

    Has anyone attempted to use Erich’s PEx component implementation of the FSL_USB_CDC component to implement multiple CDCs in a single part?

    Is this even possible?

    Thanks,

    -Mike

    Like

    • We didn’t exactly do that. But if you want multiple communications devices in a Kinetis part, I’d suggest looking at the sources for the open-source debugger USBDM.
      Like the Kinetis debug boards, it presents a composite USB device with:
      * serial data port (using K20 UART)
      * debug port (compatible with the Eclipse debugger used with Kinetis tools)
      * mass-storage device interface, but not the storage. Its just used to drag-and-drop binary files from the PC to the target device, where they are programmed using the SWD interface.
      But it works great, and everything is provided in source-code. And its been ported to support many target devices.
      If you need more end-points to be CDC it should be fairly easy to hack (famous last words…)
      https://sourceforge.net/projects/usbdm/

      Like

  28. Hello Erich,

    I am in the process of doing a project with the MCUxpresso IDE with the K82f SDK.
    I am writing the code in C++ and was wondering what subset of C++ is actually supported.
    Unfortunately there is little to no documentation about what does actually work on the MCUs, especially regarding STL, RTTI and Exceptions.

    Maybe you are able to shed a little light on this topic

    Kind regards
    Aron

    Like

      • Thanks for your reply.
        I am working with 10.1.0, but I was wondering what would happen when I use C++ features that need a hosted environment like Exceptions? Does MCUXpresso provide a simplified hosted environment for the chips (possible code size problems?!?) ?

        Like

  29. Hi Erich

    It seems like there is now “Amazon FreeRTOS” – which they appear to be marketing alongside their IoT cloud services. I wonder if you have any comment, either on the FreeRTOS angle, or how Amazon IoT cloud services compares with others?

    Regards – Charles

    Like

    • Yes, I saw that yesterday in the news. Not sure where this is going, but at least I see the change to the MIT license as a positive thing. Well, that move explains a bit why there has been no update to the 9.0.0 FreeRTOS until now. I’ll see how I could upgrade my component to the new 10.0.0 version on the weekend if possible. I had fears for a long time that a silicon or tool vendor could acquire FreeRTOS and ‘kill’ it that way (kind of what happens in my view ith uCOS/Micrium). With Amazon behind FreeRTOS, I think we have to see what happens. I have used Azure and of course MQTT and I’m very happy with MQTT. I have not used the Amazon services as I have the feeling this is all about making money. Maybe there are other thoughts about this?

      Like

      • Interesting happenings.
        In one of my positions, as CTO of a nation-wide franchise company, we manage 10 private servers across the country. We’ve reviewed the cloud offerings.
        Our servers have better uptime than MS Azure or AWS.
        AWS is the discount option. If you’re hosting a shoe-store or such its the way to go with lowest price. Good for hobbiest play too.
        Azure failed till they offered Linux, then took off. But you can’t trust MS to not suddenly make free features a paid-for option (as they’ve done with Skype and are doing with LinkedIn).
        If you are dealing with “big data” then Google and IBM are the way to go.
        Both are also more reliable than the bottom-feeding AWS and Azure.
        If you’re dealing with financial info and concerned about hackers, then IBM is the only way, with the best security out there. (though Google is a very close second)
        You’ll pay a bit more for IBM, but what does it cost if you get hacked?
        Anyway, that’s what we’ve learned from researching options.
        I have other businesses that will use cloud services, so its an important topic for me right now.

        Like

  30. Hi Erich,
    I noticed you had a thorough guide on how to implement middleware stacks for KDS and SDK1.x . However as you know nothing stays the same for long. I would really love an example of how to do this (specifically FatFS for SDHC and USB) for the new MCUXpresso IDE with SDK2.2. Alternatively If you know of somewhere where this is explained in an application note or a ‘how to’ video I’d love to know the link.

    Like

    • Hi Paul,
      yes, indeed things do not stay the same for long. I do have lwip running with the SDK2, but I did not had any bandwidth to write something similar for the SDK2 and MCUXpresso IDE. I recommend that you create with the IDE an example project from the SDK as a starting point, at least this worked for me to some level. And I don’t have a video: videos are even more effort to produce and even faster out of date :-(.

      Like

      • Thanks Erich. I’ll give that a try. I wasn’t expecting a video from you – just thought you may have come across something on line about this and could forward me a link.

        Like

  31. Quick Question Erich: Have you done ANY work with the i.MX-RT processors?
    They look appealing for low-end GUI APPs, though without an LCD I think they’re over-kill for the common end-points of the IoT world, unless you’re actuator requires motion control or fast PID control, etc.

    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