Are there up-to-date demo projects for the LPC1769 and Keil?

I want to write a webserver with serial 2 ethernet conversion capabilities. I heard many times that it is best to start with a demo project, but I can’t find one for Keil. There is an old demo für LPCXpresso, but when I configure it for Keil, I get errors from FreeRTOS.h saying the portmacro.h is faulty. So I guess this demo is too old. Which would be the best way to start for me?

I don’t think there have been LPC1769 demos created for a while. The following links may assist:


Additionally, if you create an LPC1769 project in the Keil IDE, you can bring the kernel into the project using the IDE’s CMSIS Pack integration.

Yes, I can include FreeRTOS in the pack integration, but it does not make a difference. I get the same error.

Error in include chain (portmacro.h) : use of undeclared label 'basepri'

Maybe I am lacking some includes or I have not included the right portmacro.h. Have been trying to play around with the headers files contained in in the FreeRTOSv10.3.1 archive, but no luck yet.

  • Which compiler are you using (there are three you select between in the Keil IDE)?
  • Which FreeRTOS portable source files are you including in your build - for example the portable files for the Cortex-M3 are in FreeRTOS/Source/portable/[compiler]/ARM_CM3 - what are you using for [compiler].
  • Which line in portmacro.h is the line being generated on? I’m guessing it is inline assembler, but as basepri is a Cortex-M registers that leads me to the last question.
  • Which chip have you selected as the target in your Keil project? If it is not a Cortex-M then basepri is not going to be known to the compiler - if it is a Cortex-M then the compiler should recognise that as a register.
  • I am using the default compiler, i.e. version 5.06. I only have two compilers to choose from. The latest version throws an awful lot of warnings, but this is not related to FreeRTOS. It also does it with the RTX Kernel

  • The portable files are automatically included by Keil. I can also include the ones from the RVDS directory, but it makes no difference. Here is a screenshot of the errors

  • For the device I have the LPC1769 selected of course and thus a Cortex-M

It also seems to me that there are a lot of headers to be included, which are outdated, e.g. FreeRTOS_uart.h, IOUtils_common.h etc. I can find them in some old projects on Github and copy out the raw text. But this can’t be right. They are not included in the up-to-date FreeRTOS source code. Even if I try the quick examples here https://www.freertos.org/FreeRTOS-Plus/FreeRTOS_Plus_IO/Quick_FreeRTOS_Plus_IO_Example.html, I have to include the FreeRTOS_IO.h, which is nowhere to be found, unless I copy them from some old Github projects. The more headers I include the more errors I get really.

So now I found all the important LPC17xx includes, at last. The error remaining is still the portmacro.h basepri thingy.

Do I have to use the AWS source code? Is the non-Amazon stuff outdated? I don’t want to log in there and give them my credit card number. I don’t have a credit card anyway.

These are not compiler errors, just the IDE attempting and failing to understand the code. There are many many many people in many different IDEs who say there are errors in code because parsers in IDEs, especially eclipse, well, just don’t. Do you receive any errors when you actually compile the code?

These headers are not part of FreeRTOS but an addon library, and I don’t think they will have been added by the Keil tools. I would recommend just sticking to the RTOS kernel by itself until you have that running. That only needs to have the location of the FreeRTOSConfig.h file, FreeRTOS/Source/include and FreeRTOS/Source/portable/[compiler]/[port] in its include path.

In the project I am trying to create from scratch, I don’t get any errors when I compile the code. With the demo application I had no luck and I gave up on getting it to work, because I lack the evaluation boards anyway. But I have the feeling that creating a project from scratch is really hard.

If you use the development tools to create a working bare metal project, check the project is working to ensure the start up code, linker script, etc. are correct, then follow the instructions on the FreeRTOS website to add in the four or five FreeRTOS source files you need then … it may not be ‘easy’, but I don’t think you will find any other similar system that is ‘easier’.

It seems to me that everything is correct for now. I have included the necessary headers for the hardware and I am not getting any errors. I am trying to test the UART interface now.

I have also realized that I have to look into knowledge bases from the bare-metal world. An RTOS is just the underlying OS and there are more beginner-friendly tutorials there. It might be easier to first get a super loop to run and then wrap the RTOS around. At the moment I am trying both at once. I will get somewhere eventually.