FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [February 2010 Threads] LPC17xx port using KeilPosted 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 KeilPosted 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 KeilPosted 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 KeilPosted 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 KeilPosted 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 KeilPosted 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 KeilPosted 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 KeilPosted 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 KeilPosted 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 KeilPosted 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 KeilPosted by Josephine Ubas on July 14, 2010 Hello,
Good for me, I already compile the files successfully.
RE: LPC17xx port using KeilPosted 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 KeilPosted 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 KeilPosted 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.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|