Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




Loading

LPC17xx port using Keil

Posted by C. L. Uribe on February 18, 2010
I'm new to FreeRTOS and I'm trying to use the files I received with the NXP application book that I just purchased. I get a compiler error in task.c, port.c and queue.c which all point to the same macro, i.e. portSET_INTERRUPT_MASK(), which states #1113: Inline assembler not permitted when generating Thumb code." What can I do to fix this? Thanks for your help.

RE: LPC17xx port using Keil

Posted by C. L. Uribe on February 18, 2010
I forgot to mention, the target micro is LPC1768 and I am using uVision 4.0. After searching the help files, I found where I can use #pragma arm and #pragma thumb around the inline assembly code. However, this generates an additonal error, "#1114-D: this feature not supported on target architecture/processor.

RE: LPC17xx port using Keil

Posted by Dave on February 19, 2010
uVision does not allow inline assembler in THUMB code, and the LPC1768 only allows THUMB code, so this makes the compiler really dumb. There is no way around the inline assembler problem but you can move the code into an assembly file.

RE: LPC17xx port using Keil

Posted by C. L. Uribe on February 19, 2010
Thank you for your reply. However, I think that only applies to macros because it had no problem with vPortSVCHandler() and vPortStartFirstTask() in port.c. Or, am I missing something?

RE: LPC17xx port using Keil

Posted by Richard on February 19, 2010
“Thank you for your reply. However, I think that only applies to macros because it had no problem with vPortSVCHandler() and vPortStartFirstTask() in port.c. Or, am I missing something?”


The two functions you reference are actually assembler functions, they are just defined within a C file. This is quite different to inline assembler, where assembly instructions are manually inserted into C functions.

Regards.

RE: LPC17xx port using Keil

Posted by C. L. Uribe on February 19, 2010
No, you're right. It just wasn't compiling port.c due to the error I think.

RE: LPC17xx port using Keil

Posted by C. L. Uribe on February 19, 2010
Once I took care of the error in the macros, I got the same error #1113 when it tried to compile port.c in the functions mentioned above and in the xPortPendSVHandler() function as well.

RE: LPC17xx port using Keil

Posted by Richard on February 19, 2010
The code that comes with the LPC17xx eBook is configured to compile with GCC, and in particular with the LPCXpresso IDE. Am I right in thinking you are trying to compile it with Keil? I would not expect that to work, however the FreeRTOS download contains a port layer for Keil too so if you want to use Keil you would be better off using the Keil port layer directly rather than trying to convert the GCC port layer.

The book demos rely on the terminal output too - I'm not sure what the Keil IDE will do with the terminal output.

Can you just try using the LPCXpresso IDE? It is a free download. Once you have gone through the book examples you can set up a project using Keil based on one of the standard demos in the main download.

Regards.

RE: LPC17xx port using Keil

Posted by C. L. Uribe on February 19, 2010
Yes, I am trying to compile with Keil uVision 4.0. I had tried to find that Keil layer earlier but I guess I was looking in the wrong place. I found it now and it does compile. I only get a warning now, #1207-D: attribute "naked" ignored in port.c.

I downloaded & installed the LPCXpresso IDE and all the examples compiled ok. However, I can't debug because the target is Keil's MCB1700 board using ULINK2 device. I couldn't find a way to select that device from the IDE.

Thanks for your help.

RE: LPC17xx port using Keil

Posted by Josephine Ubas on July 13, 2010
Hello cluribe2,

You mention that you already compile the examples from LPC17xx ebook into keil.

I have also same problem as yours but unfortunately I can't compile it successfully., could you please share it to me what did u you do? What are the files you included in the project? Is just the same on the project included in the LPCXpresso IDE?
I also try the source code examples for LPC17xx from FreeRTOS in LPCXpresso IDE and it works fine but I need to run on keil for some reasons.
Unfortunately I'm stuck of it on rebuilding or changing some files on KEIL.
Thanks.



RE: LPC17xx port using Keil

Posted by Josephine Ubas on July 14, 2010
Hello,

Good for me, I already compile the files successfully.

RE: LPC17xx port using Keil

Posted by C. L. Uribe on July 19, 2010
I'm sorry I did not reply earlier but I was on vacation last week. I'm glad that you got it to compile successfully.

RE: LPC17xx port using Keil

Posted by Josephine Ubas on July 20, 2010
Yeah, I successfully compile one of the Examples of LPC17xx but unfortunately I can't debug and can't view the output. Is your's is completely compile and can you debug the examples completely? Didn't you encountered some errors during debugging?
What did you do?
Coz i'm stuck on debugging the codes and I think is on port.c the vPortStartFirstTask() or in the startup_LPC17xx.s..


Thanks.

RE: LPC17xx port using Keil

Posted by C. L. Uribe on July 20, 2010
I didn't compile and debug the examples under Keil. I created my own project under Keil then added the FreeRTOS files to my project. For port.c, I used c:\FreeRTOS\Source\portable\RVDS\ARM_CM3\port.c. I had some errors, but I was able to resolve them. Using the correct port.c file is the key. For LPCXpresso, I never could find how to use the ULINK2 debug probe so I was not able to debug those examples.


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists