Hi all….. In our last tutorial, we have seen how to port FreeRTOS into LPC2148. If you haven’t seen please go Here. Today we are going to see RTX RTOS Porting for LPC2148 in Keil. Before that, we should know the RTOS. Please read RTOS Basics PART 1, PART 2.
Table of Contents
RTX RTOS Porting for LPC2148 in Keil
Traditionally developers of small, embedded applications have had to write virtually all the code that runs on the microcontroller. Typically, this is in the form of interrupt handlers with a main background-scheduling loop. While there is nothing intrinsically wrong with this, it does rather miss the last few decades of advancement in program structure and design. Now, for the first time, with the introduction of 32-bit ARM processor-based microcontrollers we have low-cost, high-performance devices with increasingly large amounts of internal SRAM and Flash memory. This makes it possible to use more advanced software development techniques.
Introducing a Real-Time Operating System (RTOS) or real-time executive into your project development is an important step in the right direction. With an RTOS, all the functional blocks of your design are developed as tasks, which are then scheduled by RTX. This forces a detailed design analysis and consideration of the final program structure at the beginning of the development. Each of the program tasks can be developed, debugged, and tested in isolation before integration into the full system. Each RTOS task is then easier to maintain, document, and reuse. However, using an RTOS is only half the story. Increasingly, customers want products that are more complex in shorter and shorter times. While microcontrollers with suitable peripherals are available, the challenge is to develop applications without spending months writing the low-level driver code.
- Royalty-free, deterministic RTOS with source code
- Flexible Scheduling: round-robin, pre-emptive, and collaborative
- High-Speed real-time operation with low interrupt latency
- Small footprint for resource constrained systems
- Unlimited number of tasks each with 254 priority levels
- Unlimited number of mailboxes, semaphores, mutex, and timers
- Support for multithreading and thread-safe operation
- Kernel aware debug support in MDK-ARM
- Dialog-based setup using µVision Configuration Wizard
While it is certainly possible to create real-time programs without an RTOS (by executing one or more functions in a Super-loop), there are numerous scheduling, maintenance, and timing issues that an RTOS like the Keil RTX solves for you.
Let’s see how to porting this RTX RTOS in Keil. It is pretty straightforward.
1. Open Keil and create a project. If you don’t know how to create a project please read this.
2. Add the header file in the code. (e.g #include <RTL.H>)
3. Add RTX_Config.c file to project
4. Click Projects -> Options for Target. Then click target then select the operating system as RTX kernel.
5. Change the Startup.s code (copy and paste).
That’s all guys. We have ported the RTX kernel into Keil for LPC2148. Thank you for reading this. I will provide the RTX RTOS tutorial for LPC2148 soon.
You can also read the below tutorials.
Embedded Software | Firmware | Linux Devic Deriver | RTOS
Hi, I’m SLR. I am a tech blogger and an Embedded Engineer. I am always eager to learn and explore tech-related concepts. And also, I wanted to share my knowledge with everyone in a more straightforward way with easy practical examples. I strongly believe that learning by doing is more powerful than just learning by reading. I love to do experiments. If you want to help or support me on my journey, consider sharing my articles, or Buy me a Coffee! Thank you for reading my blog! Happy learning!